0010cef0 : #define MAXSYMLINK 5 int IMFS_Set_handlers( rtems_filesystem_location_info_t *loc ) { 10cef0: 55 push %ebp 10cef1: 89 e5 mov %esp,%ebp 10cef3: 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; 10cef6: 8b 50 10 mov 0x10(%eax),%edx 10cef9: 8b 52 34 mov 0x34(%edx),%edx switch( node->type ) { 10cefc: 8b 08 mov (%eax),%ecx 10cefe: 8b 49 4c mov 0x4c(%ecx),%ecx 10cf01: 49 dec %ecx 10cf02: 83 f9 06 cmp $0x6,%ecx 10cf05: 77 2d ja 10cf34 <== ALWAYS TAKEN 10cf07: ff 24 8d fc d7 11 00 jmp *0x11d7fc(,%ecx,4) case IMFS_DIRECTORY: loc->handlers = fs_info->directory_handlers; 10cf0e: 8b 52 08 mov 0x8(%edx),%edx 10cf11: eb 15 jmp 10cf28 <== ALWAYS TAKEN break; case IMFS_DEVICE: loc->handlers = &IMFS_device_handlers; 10cf13: c7 40 08 cc d8 11 00 movl $0x11d8cc,0x8(%eax) break; 10cf1a: eb 18 jmp 10cf34 <== ALWAYS TAKEN case IMFS_SYM_LINK: case IMFS_HARD_LINK: loc->handlers = &IMFS_link_handlers; 10cf1c: c7 40 08 04 d9 11 00 movl $0x11d904,0x8(%eax) break; 10cf23: eb 0f jmp 10cf34 <== ALWAYS TAKEN case IMFS_LINEAR_FILE: loc->handlers = fs_info->memfile_handlers; 10cf25: 8b 52 04 mov 0x4(%edx),%edx 10cf28: 89 50 08 mov %edx,0x8(%eax) break; 10cf2b: eb 07 jmp 10cf34 <== ALWAYS TAKEN case IMFS_MEMORY_FILE: loc->handlers = fs_info->memfile_handlers; break; case IMFS_FIFO: loc->handlers = &IMFS_fifo_handlers; 10cf2d: c7 40 08 18 d8 11 00 movl $0x11d818,0x8(%eax) break; } return 0; } 10cf34: 31 c0 xor %eax,%eax 10cf36: c9 leave 10cf37: c3 ret 0010f5ac : IMFS_jnode_t *IMFS_allocate_node( IMFS_jnode_types_t type, const char *name, mode_t mode ) { 10f5ac: 55 push %ebp 10f5ad: 89 e5 mov %esp,%ebp 10f5af: 53 push %ebx 10f5b0: 83 ec 1c sub $0x1c,%esp struct timeval tv; /* * Allocate an IMFS jnode */ node = calloc( 1, sizeof( IMFS_jnode_t ) ); 10f5b3: 6a 64 push $0x64 10f5b5: 6a 01 push $0x1 10f5b7: e8 c4 e4 ff ff call 10da80 10f5bc: 89 c3 mov %eax,%ebx if ( !node ) 10f5be: 83 c4 10 add $0x10,%esp 10f5c1: 85 c0 test %eax,%eax 10f5c3: 74 49 je 10f60e <== ALWAYS TAKEN return NULL; /* * Fill in the basic information */ node->st_nlink = 1; 10f5c5: 66 c7 40 34 01 00 movw $0x1,0x34(%eax) node->type = type; 10f5cb: 8b 45 08 mov 0x8(%ebp),%eax 10f5ce: 89 43 4c mov %eax,0x4c(%ebx) strncpy( node->name, name, IMFS_NAME_MAX ); 10f5d1: 51 push %ecx 10f5d2: 6a 20 push $0x20 10f5d4: ff 75 0c pushl 0xc(%ebp) 10f5d7: 8d 43 0c lea 0xc(%ebx),%eax 10f5da: 50 push %eax 10f5db: e8 08 19 00 00 call 110ee8 /* * Fill in the mode and permission information for the jnode structure. */ node->st_mode = mode; 10f5e0: 8b 45 10 mov 0x10(%ebp),%eax 10f5e3: 89 43 30 mov %eax,0x30(%ebx) #if defined(RTEMS_POSIX_API) node->st_uid = geteuid(); node->st_gid = getegid(); #else node->st_uid = 0; 10f5e6: 66 c7 43 3c 00 00 movw $0x0,0x3c(%ebx) node->st_gid = 0; 10f5ec: 66 c7 43 3e 00 00 movw $0x0,0x3e(%ebx) #endif /* * Now set all the times. */ gettimeofday( &tv, 0 ); 10f5f2: 58 pop %eax 10f5f3: 5a pop %edx 10f5f4: 6a 00 push $0x0 10f5f6: 8d 45 f0 lea -0x10(%ebp),%eax 10f5f9: 50 push %eax 10f5fa: e8 f1 e5 ff ff call 10dbf0 node->stat_atime = (time_t) tv.tv_sec; 10f5ff: 8b 45 f0 mov -0x10(%ebp),%eax 10f602: 89 43 40 mov %eax,0x40(%ebx) node->stat_mtime = (time_t) tv.tv_sec; 10f605: 89 43 44 mov %eax,0x44(%ebx) node->stat_ctime = (time_t) tv.tv_sec; 10f608: 89 43 48 mov %eax,0x48(%ebx) return node; 10f60b: 83 c4 10 add $0x10,%esp } 10f60e: 89 d8 mov %ebx,%eax 10f610: 8b 5d fc mov -0x4(%ebp),%ebx 10f613: c9 leave 10f614: c3 ret 0010f648 : IMFS_jnode_types_t type, const char *name, mode_t mode, const IMFS_types_union *info ) { 10f648: 55 push %ebp 10f649: 89 e5 mov %esp,%ebp 10f64b: 57 push %edi 10f64c: 56 push %esi 10f64d: 53 push %ebx 10f64e: 83 ec 1c sub $0x1c,%esp 10f651: 8b 75 08 mov 0x8(%ebp),%esi 10f654: 8b 7d 0c mov 0xc(%ebp),%edi 10f657: 8b 5d 18 mov 0x18(%ebp),%ebx IMFS_fs_info_t *fs_info; /* * MUST have a parent node to call this routine. */ if ( parent_loc == NULL ) 10f65a: 31 c0 xor %eax,%eax 10f65c: 85 f6 test %esi,%esi 10f65e: 0f 84 da 00 00 00 je 10f73e <== ALWAYS TAKEN return NULL; /* * Allocate filesystem node and fill in basic information */ node = IMFS_allocate_node( type, name, mode & ~rtems_filesystem_umask ); 10f664: 50 push %eax 10f665: a1 60 16 12 00 mov 0x121660,%eax 10f66a: 8b 40 2c mov 0x2c(%eax),%eax 10f66d: f7 d0 not %eax 10f66f: 23 45 14 and 0x14(%ebp),%eax 10f672: 50 push %eax 10f673: ff 75 10 pushl 0x10(%ebp) 10f676: 57 push %edi 10f677: e8 30 ff ff ff call 10f5ac <== ALWAYS TAKEN if ( !node ) 10f67c: 83 c4 10 add $0x10,%esp 10f67f: 85 c0 test %eax,%eax 10f681: 0f 84 b7 00 00 00 je 10f73e <== ALWAYS TAKEN return NULL; /* * Set the type specific information */ switch (type) { 10f687: 4f dec %edi 10f688: 83 ff 06 cmp $0x6,%edi 10f68b: 77 73 ja 10f700 <== ALWAYS TAKEN 10f68d: ff 24 bd a0 da 11 00 jmp *0x11daa0(,%edi,4) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 10f694: 8d 50 54 lea 0x54(%eax),%edx 10f697: 89 50 50 mov %edx,0x50(%eax) the_chain->permanent_null = NULL; 10f69a: c7 40 54 00 00 00 00 movl $0x0,0x54(%eax) the_chain->last = _Chain_Head(the_chain); 10f6a1: 8d 50 50 lea 0x50(%eax),%edx 10f6a4: 89 50 58 mov %edx,0x58(%eax) 10f6a7: eb 6d jmp 10f716 <== ALWAYS TAKEN 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; 10f6a9: 8b 13 mov (%ebx),%edx 10f6ab: 89 50 50 mov %edx,0x50(%eax) break; 10f6ae: eb 66 jmp 10f716 <== ALWAYS TAKEN case IMFS_DEVICE: node->info.device.major = info->device.major; 10f6b0: 8b 13 mov (%ebx),%edx 10f6b2: 89 50 50 mov %edx,0x50(%eax) node->info.device.minor = info->device.minor; 10f6b5: 8b 53 04 mov 0x4(%ebx),%edx 10f6b8: 89 50 54 mov %edx,0x54(%eax) break; 10f6bb: eb 59 jmp 10f716 <== ALWAYS TAKEN case IMFS_LINEAR_FILE: node->info.linearfile.size = 0; 10f6bd: c7 40 50 00 00 00 00 movl $0x0,0x50(%eax) <== NOT EXECUTED 10f6c4: c7 40 54 00 00 00 00 movl $0x0,0x54(%eax) <== NOT EXECUTED node->info.linearfile.direct = 0; 10f6cb: c7 40 58 00 00 00 00 movl $0x0,0x58(%eax) <== NOT EXECUTED case IMFS_MEMORY_FILE: node->info.file.size = 0; 10f6d2: c7 40 50 00 00 00 00 movl $0x0,0x50(%eax) 10f6d9: c7 40 54 00 00 00 00 movl $0x0,0x54(%eax) node->info.file.indirect = 0; 10f6e0: c7 40 58 00 00 00 00 movl $0x0,0x58(%eax) node->info.file.doubly_indirect = 0; 10f6e7: c7 40 5c 00 00 00 00 movl $0x0,0x5c(%eax) node->info.file.triply_indirect = 0; 10f6ee: c7 40 60 00 00 00 00 movl $0x0,0x60(%eax) break; 10f6f5: eb 1f jmp 10f716 <== ALWAYS TAKEN case IMFS_FIFO: node->info.fifo.pipe = NULL; 10f6f7: c7 40 50 00 00 00 00 movl $0x0,0x50(%eax) break; 10f6fe: eb 16 jmp 10f716 <== ALWAYS TAKEN default: assert(0); 10f700: 68 cc cc 11 00 push $0x11cccc <== NOT EXECUTED 10f705: 68 bc da 11 00 push $0x11dabc <== NOT EXECUTED 10f70a: 6a 5c push $0x5c <== NOT EXECUTED 10f70c: 68 54 da 11 00 push $0x11da54 <== NOT EXECUTED 10f711: e8 2a 77 ff ff call 106e40 <__assert_func> <== NOT EXECUTED } /* * This node MUST have a parent, so put it in that directory list. */ parent = parent_loc->node_access; 10f716: 8b 16 mov (%esi),%edx fs_info = parent_loc->mt_entry->fs_info; 10f718: 8b 4e 10 mov 0x10(%esi),%ecx 10f71b: 8b 59 34 mov 0x34(%ecx),%ebx node->Parent = parent; 10f71e: 89 50 08 mov %edx,0x8(%eax) node->st_ino = ++fs_info->ino_count; 10f721: 8b 0b mov (%ebx),%ecx 10f723: 41 inc %ecx 10f724: 89 0b mov %ecx,(%ebx) 10f726: 89 48 38 mov %ecx,0x38(%eax) RTEMS_INLINE_ROUTINE void rtems_chain_append( rtems_chain_control *the_chain, rtems_chain_node *the_node ) { _Chain_Append( the_chain, the_node ); 10f729: 53 push %ebx 10f72a: 53 push %ebx 10f72b: 50 push %eax 10f72c: 83 c2 50 add $0x50,%edx 10f72f: 52 push %edx 10f730: 89 45 e4 mov %eax,-0x1c(%ebp) 10f733: e8 08 b0 ff ff call 10a740 <_Chain_Append> rtems_chain_append( &parent->info.directory.Entries, &node->Node ); return node; 10f738: 83 c4 10 add $0x10,%esp 10f73b: 8b 45 e4 mov -0x1c(%ebp),%eax } 10f73e: 8d 65 f4 lea -0xc(%ebp),%esp 10f741: 5b pop %ebx 10f742: 5e pop %esi 10f743: 5f pop %edi 10f744: c9 leave 10f745: c3 ret 0010f615 : IMFS_jnode_t *IMFS_create_root_node(void) { 10f615: 55 push %ebp 10f616: 89 e5 mov %esp,%ebp 10f618: 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) ); 10f61b: 68 ed 41 00 00 push $0x41ed 10f620: 68 9d d4 11 00 push $0x11d49d 10f625: 6a 01 push $0x1 10f627: e8 80 ff ff ff call 10f5ac <== ALWAYS TAKEN if ( !node ) 10f62c: 83 c4 10 add $0x10,%esp 10f62f: 85 c0 test %eax,%eax 10f631: 74 13 je 10f646 <== ALWAYS TAKEN */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 10f633: 8d 50 54 lea 0x54(%eax),%edx 10f636: 89 50 50 mov %edx,0x50(%eax) the_chain->permanent_null = NULL; 10f639: c7 40 54 00 00 00 00 movl $0x0,0x54(%eax) the_chain->last = _Chain_Head(the_chain); 10f640: 8d 50 50 lea 0x50(%eax),%edx 10f643: 89 50 58 mov %edx,0x58(%eax) * NOTE: Root node is always a directory. */ rtems_chain_initialize_empty(&node->info.directory.Entries); return node; } 10f646: c9 leave 10f647: c3 ret 001085a1 : * NOTE: Assuming the "/" directory is bad. * Not checking that the starting directory is in an IMFS is bad. */ void IMFS_dump( void ) { 1085a1: 55 push %ebp 1085a2: 89 e5 mov %esp,%ebp 1085a4: 83 ec 10 sub $0x10,%esp fprintf(stdout, "*************** Dump of Entire IMFS ***************\n" ); 1085a7: a1 e0 6f 12 00 mov 0x126fe0,%eax 1085ac: ff 70 08 pushl 0x8(%eax) 1085af: 68 b7 24 12 00 push $0x1224b7 1085b4: e8 bf b9 00 00 call 113f78 fprintf(stdout, "/\n" ); 1085b9: 5a pop %edx 1085ba: 59 pop %ecx 1085bb: a1 e0 6f 12 00 mov 0x126fe0,%eax 1085c0: ff 70 08 pushl 0x8(%eax) 1085c3: 68 ec 24 12 00 push $0x1224ec 1085c8: e8 ab b9 00 00 call 113f78 IMFS_dump_directory( rtems_filesystem_root.node_access, 0 ); 1085cd: 59 pop %ecx 1085ce: 58 pop %eax 1085cf: 6a 00 push $0x0 1085d1: a1 60 6f 12 00 mov 0x126f60,%eax 1085d6: ff 70 18 pushl 0x18(%eax) 1085d9: e8 0d ff ff ff call 1084eb <== ALWAYS TAKEN fprintf(stdout, "*************** End of Dump ***************\n" ); 1085de: 58 pop %eax 1085df: 5a pop %edx 1085e0: a1 e0 6f 12 00 mov 0x126fe0,%eax 1085e5: ff 70 08 pushl 0x8(%eax) 1085e8: 68 ef 24 12 00 push $0x1224ef 1085ed: e8 86 b9 00 00 call 113f78 1085f2: 83 c4 10 add $0x10,%esp } 1085f5: c9 leave 1085f6: c3 ret 001084eb : void IMFS_dump_directory( IMFS_jnode_t *the_directory, int level ) { 1084eb: 55 push %ebp 1084ec: 89 e5 mov %esp,%ebp 1084ee: 57 push %edi 1084ef: 56 push %esi 1084f0: 53 push %ebx 1084f1: 83 ec 1c sub $0x1c,%esp 1084f4: 8b 45 08 mov 0x8(%ebp),%eax 1084f7: 8b 75 0c mov 0xc(%ebp),%esi rtems_chain_node *the_node; rtems_chain_control *the_chain; IMFS_jnode_t *the_jnode; int i; assert( the_directory ); 1084fa: 85 c0 test %eax,%eax 1084fc: 75 11 jne 10850f <== NEVER TAKEN 1084fe: 68 73 24 12 00 push $0x122473 <== NOT EXECUTED 108503: 68 60 25 12 00 push $0x122560 <== NOT EXECUTED 108508: 68 84 00 00 00 push $0x84 <== NOT EXECUTED 10850d: eb 13 jmp 108522 <== NOT EXECUTED assert( level >= 0 ); 10850f: 85 f6 test %esi,%esi 108511: 79 19 jns 10852c <== NEVER TAKEN 108513: 68 81 24 12 00 push $0x122481 <== NOT EXECUTED 108518: 68 60 25 12 00 push $0x122560 <== NOT EXECUTED 10851d: 68 86 00 00 00 push $0x86 <== NOT EXECUTED 108522: 68 c7 23 12 00 push $0x1223c7 <== NOT EXECUTED 108527: e8 6c 06 00 00 call 108b98 <__assert_func> <== NOT EXECUTED assert( the_directory->type == IMFS_DIRECTORY ); 10852c: 83 78 4c 01 cmpl $0x1,0x4c(%eax) 108530: 74 11 je 108543 <== NEVER TAKEN 108532: 68 8c 24 12 00 push $0x12248c <== NOT EXECUTED 108537: 68 60 25 12 00 push $0x122560 <== NOT EXECUTED 10853c: 68 88 00 00 00 push $0x88 <== NOT EXECUTED 108541: eb df jmp 108522 <== NOT EXECUTED the_chain = &the_directory->info.directory.Entries; for ( the_node = the_chain->first; 108543: 8b 58 50 mov 0x50(%eax),%ebx */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 108546: 83 c0 54 add $0x54,%eax 108549: 89 45 e4 mov %eax,-0x1c(%ebp) for ( i=0 ; i<=level ; i++ ) fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); if ( the_jnode->type == IMFS_DIRECTORY ) IMFS_dump_directory( the_jnode, level + 1 ); 10854c: 8d 46 01 lea 0x1(%esi),%eax 10854f: 89 45 e0 mov %eax,-0x20(%ebp) assert( the_directory->type == IMFS_DIRECTORY ); the_chain = &the_directory->info.directory.Entries; for ( the_node = the_chain->first; 108552: eb 40 jmp 108594 <== ALWAYS TAKEN !rtems_chain_is_tail( the_chain, the_node ); the_node = the_node->next ) { the_jnode = (IMFS_jnode_t *) the_node; 108554: 31 ff xor %edi,%edi for ( i=0 ; i<=level ; i++ ) fprintf(stdout, "...." ); 108556: 51 push %ecx 108557: 51 push %ecx 108558: a1 e0 6f 12 00 mov 0x126fe0,%eax 10855d: ff 70 08 pushl 0x8(%eax) 108560: 68 b2 24 12 00 push $0x1224b2 108565: e8 0e ba 00 00 call 113f78 !rtems_chain_is_tail( the_chain, the_node ); the_node = the_node->next ) { the_jnode = (IMFS_jnode_t *) the_node; for ( i=0 ; i<=level ; i++ ) 10856a: 47 inc %edi 10856b: 83 c4 10 add $0x10,%esp 10856e: 39 f7 cmp %esi,%edi 108570: 7e e4 jle 108556 fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); 108572: 83 ec 0c sub $0xc,%esp 108575: 53 push %ebx 108576: e8 53 fe ff ff call 1083ce <== ALWAYS TAKEN if ( the_jnode->type == IMFS_DIRECTORY ) 10857b: 83 c4 10 add $0x10,%esp 10857e: 83 7b 4c 01 cmpl $0x1,0x4c(%ebx) 108582: 75 0e jne 108592 IMFS_dump_directory( the_jnode, level + 1 ); 108584: 52 push %edx 108585: 52 push %edx 108586: ff 75 e0 pushl -0x20(%ebp) 108589: 53 push %ebx 10858a: e8 5c ff ff ff call 1084eb <== ALWAYS TAKEN 10858f: 83 c4 10 add $0x10,%esp the_chain = &the_directory->info.directory.Entries; for ( the_node = the_chain->first; !rtems_chain_is_tail( the_chain, the_node ); the_node = the_node->next ) { 108592: 8b 1b mov (%ebx),%ebx assert( the_directory->type == IMFS_DIRECTORY ); the_chain = &the_directory->info.directory.Entries; for ( the_node = the_chain->first; 108594: 3b 5d e4 cmp -0x1c(%ebp),%ebx 108597: 75 bb jne 108554 fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); if ( the_jnode->type == IMFS_DIRECTORY ) IMFS_dump_directory( the_jnode, level + 1 ); } } 108599: 8d 65 f4 lea -0xc(%ebp),%esp 10859c: 5b pop %ebx 10859d: 5e pop %esi 10859e: 5f pop %edi 10859f: c9 leave 1085a0: c3 ret 0010d05f : const char *pathname, /* IN */ int pathnamelen, /* IN */ int flags, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 10d05f: 55 push %ebp 10d060: 89 e5 mov %esp,%ebp 10d062: 57 push %edi 10d063: 56 push %esi 10d064: 53 push %ebx 10d065: 83 ec 5c sub $0x5c,%esp 10d068: 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; 10d06b: 8b 3b mov (%ebx),%edi 10d06d: b8 01 00 00 00 mov $0x1,%eax 10d072: c7 45 a4 00 00 00 00 movl $0x0,-0x5c(%ebp) * Evaluate all tokens until we are done or an error occurs. */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { type = IMFS_get_token( &pathname[i], pathnamelen, token, &len ); 10d079: 8d 75 af lea -0x51(%ebp),%esi /* * Evaluate all tokens until we are done or an error occurs. */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { 10d07c: e9 38 01 00 00 jmp 10d1b9 <== ALWAYS TAKEN type = IMFS_get_token( &pathname[i], pathnamelen, token, &len ); 10d081: 8d 45 e4 lea -0x1c(%ebp),%eax 10d084: 50 push %eax 10d085: 56 push %esi 10d086: ff 75 0c pushl 0xc(%ebp) 10d089: 8b 45 08 mov 0x8(%ebp),%eax 10d08c: 03 45 a4 add -0x5c(%ebp),%eax 10d08f: 50 push %eax 10d090: e8 a7 06 00 00 call 10d73c <== ALWAYS TAKEN pathnamelen -= len; 10d095: 8b 4d e4 mov -0x1c(%ebp),%ecx i += len; if ( !pathloc->node_access ) 10d098: 8b 13 mov (%ebx),%edx 10d09a: 83 c4 10 add $0x10,%esp 10d09d: 85 d2 test %edx,%edx 10d09f: 0f 84 ed 00 00 00 je 10d192 <== ALWAYS 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 ) 10d0a5: 85 c0 test %eax,%eax 10d0a7: 74 10 je 10d0b9 if ( node->type == IMFS_DIRECTORY ) 10d0a9: 83 7f 4c 01 cmpl $0x1,0x4c(%edi) 10d0ad: 75 0a jne 10d0b9 /* * If all of the flags are set we have permission * to do this. */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) 10d0af: f6 42 30 40 testb $0x40,0x30(%edx) 10d0b3: 0f 84 77 01 00 00 je 10d230 */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { type = IMFS_get_token( &pathname[i], pathnamelen, token, &len ); pathnamelen -= len; 10d0b9: 29 4d 0c sub %ecx,0xc(%ebp) i += len; 10d0bc: 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; 10d0bf: 89 d7 mov %edx,%edi switch( type ) { 10d0c1: 83 f8 03 cmp $0x3,%eax 10d0c4: 74 5b je 10d121 10d0c6: 83 f8 04 cmp $0x4,%eax 10d0c9: 0f 84 da 00 00 00 je 10d1a9 10d0cf: 83 f8 02 cmp $0x2,%eax 10d0d2: 0f 85 e1 00 00 00 jne 10d1b9 case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) 10d0d8: a1 60 16 12 00 mov 0x121660,%eax 10d0dd: 3b 50 18 cmp 0x18(%eax),%edx 10d0e0: 74 9f je 10d081 /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == pathloc->mt_entry->mt_fs_root.node_access) { 10d0e2: 8b 43 10 mov 0x10(%ebx),%eax /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == 10d0e5: 3b 50 1c cmp 0x1c(%eax),%edx 10d0e8: 75 32 jne 10d11c 10d0ea: 89 4d a0 mov %ecx,-0x60(%ebp) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; /* Throw out the .. in this case */ } else { newloc = pathloc->mt_entry->mt_point_node; 10d0ed: 8d 7d d0 lea -0x30(%ebp),%edi 10d0f0: 8d 70 08 lea 0x8(%eax),%esi 10d0f3: b9 05 00 00 00 mov $0x5,%ecx 10d0f8: f3 a5 rep movsl %ds:(%esi),%es:(%edi) *pathloc = newloc; 10d0fa: 8d 75 d0 lea -0x30(%ebp),%esi 10d0fd: b1 05 mov $0x5,%cl 10d0ff: 89 df mov %ebx,%edi 10d101: f3 a5 rep movsl %ds:(%esi),%es:(%edi) return (*pathloc->ops->evalpath_h)(&(pathname[i-len]), 10d103: 8b 53 0c mov 0xc(%ebx),%edx 10d106: 53 push %ebx 10d107: ff 75 10 pushl 0x10(%ebp) 10d10a: 8b 45 a0 mov -0x60(%ebp),%eax 10d10d: 03 45 0c add 0xc(%ebp),%eax 10d110: 50 push %eax 10d111: 8b 45 a4 mov -0x5c(%ebp),%eax 10d114: 2b 45 a0 sub -0x60(%ebp),%eax 10d117: e9 e4 00 00 00 jmp 10d200 <== ALWAYS TAKEN pathnamelen+len, flags,pathloc); } } else { if ( !node->Parent ) 10d11c: 8b 7a 08 mov 0x8(%edx),%edi 10d11f: eb 6d jmp 10d18e <== ALWAYS TAKEN case IMFS_NAME: /* * If we are at a link follow it. */ if ( node->type == IMFS_HARD_LINK ) { 10d121: 8b 42 4c mov 0x4c(%edx),%eax 10d124: 83 f8 03 cmp $0x3,%eax 10d127: 75 15 jne 10d13e IMFS_evaluate_hard_link( pathloc, 0 ); 10d129: 51 push %ecx 10d12a: 51 push %ecx 10d12b: 6a 00 push $0x0 10d12d: 53 push %ebx 10d12e: e8 22 fe ff ff call 10cf55 <== ALWAYS TAKEN node = pathloc->node_access; 10d133: 8b 3b mov (%ebx),%edi if ( !node ) 10d135: 83 c4 10 add $0x10,%esp 10d138: 85 ff test %edi,%edi 10d13a: 75 1f jne 10d15b <== NEVER TAKEN 10d13c: eb 23 jmp 10d161 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTDIR ); } else if ( node->type == IMFS_SYM_LINK ) { 10d13e: 83 f8 04 cmp $0x4,%eax 10d141: 75 18 jne 10d15b result = IMFS_evaluate_sym_link( pathloc, 0 ); 10d143: 52 push %edx 10d144: 52 push %edx 10d145: 6a 00 push $0x0 10d147: 53 push %ebx 10d148: e8 60 fe ff ff call 10cfad <== ALWAYS TAKEN node = pathloc->node_access; 10d14d: 8b 3b mov (%ebx),%edi if ( result == -1 ) 10d14f: 83 c4 10 add $0x10,%esp 10d152: 83 f8 ff cmp $0xffffffff,%eax 10d155: 0f 84 cd 00 00 00 je 10d228 <== ALWAYS TAKEN /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) 10d15b: 83 7f 4c 01 cmpl $0x1,0x4c(%edi) 10d15f: 74 10 je 10d171 rtems_set_errno_and_return_minus_one( ENOTDIR ); 10d161: e8 ea 30 00 00 call 110250 <__errno> 10d166: c7 00 14 00 00 00 movl $0x14,(%eax) 10d16c: e9 ca 00 00 00 jmp 10d23b <== ALWAYS TAKEN /* * 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 ) { 10d171: 8b 47 5c mov 0x5c(%edi),%eax 10d174: 85 c0 test %eax,%eax 10d176: 74 08 je 10d180 newloc = node->info.directory.mt_fs->mt_fs_root; 10d178: 8d 7d d0 lea -0x30(%ebp),%edi 10d17b: 8d 70 1c lea 0x1c(%eax),%esi 10d17e: eb 59 jmp 10d1d9 <== ALWAYS TAKEN /* * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); 10d180: 50 push %eax 10d181: 50 push %eax 10d182: 56 push %esi 10d183: 57 push %edi 10d184: e8 27 05 00 00 call 10d6b0 <== ALWAYS TAKEN 10d189: 89 c7 mov %eax,%edi if ( !node ) 10d18b: 83 c4 10 add $0x10,%esp 10d18e: 85 ff test %edi,%edi 10d190: 75 10 jne 10d1a2 rtems_set_errno_and_return_minus_one( ENOENT ); 10d192: e8 b9 30 00 00 call 110250 <__errno> 10d197: c7 00 02 00 00 00 movl $0x2,(%eax) 10d19d: e9 99 00 00 00 jmp 10d23b <== ALWAYS TAKEN /* * Set the node access to the point we have found. */ pathloc->node_access = node; 10d1a2: 89 3b mov %edi,(%ebx) 10d1a4: e9 d8 fe ff ff jmp 10d081 <== ALWAYS TAKEN case IMFS_NO_MORE_PATH: case IMFS_CURRENT_DIR: break; case IMFS_INVALID_TOKEN: rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); 10d1a9: e8 a2 30 00 00 call 110250 <__errno> 10d1ae: c7 00 5b 00 00 00 movl $0x5b,(%eax) 10d1b4: e9 82 00 00 00 jmp 10d23b <== ALWAYS TAKEN /* * Evaluate all tokens until we are done or an error occurs. */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { 10d1b9: 83 f8 04 cmp $0x4,%eax 10d1bc: 74 08 je 10d1c6 <== ALWAYS TAKEN 10d1be: 85 c0 test %eax,%eax 10d1c0: 0f 85 bb fe ff ff jne 10d081 * 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 ) { 10d1c6: 83 7f 4c 01 cmpl $0x1,0x4c(%edi) 10d1ca: 75 3f jne 10d20b if ( node->info.directory.mt_fs != NULL ) { 10d1cc: 8b 77 5c mov 0x5c(%edi),%esi 10d1cf: 85 f6 test %esi,%esi 10d1d1: 74 38 je 10d20b newloc = node->info.directory.mt_fs->mt_fs_root; 10d1d3: 8d 7d d0 lea -0x30(%ebp),%edi 10d1d6: 83 c6 1c add $0x1c,%esi 10d1d9: b9 05 00 00 00 mov $0x5,%ecx 10d1de: f3 a5 rep movsl %ds:(%esi),%es:(%edi) *pathloc = newloc; 10d1e0: 8d 75 d0 lea -0x30(%ebp),%esi 10d1e3: b1 05 mov $0x5,%cl 10d1e5: 89 df mov %ebx,%edi 10d1e7: f3 a5 rep movsl %ds:(%esi),%es:(%edi) return (*pathloc->ops->evalpath_h)( &pathname[i-len], 10d1e9: 8b 45 e4 mov -0x1c(%ebp),%eax 10d1ec: 8b 53 0c mov 0xc(%ebx),%edx 10d1ef: 53 push %ebx 10d1f0: ff 75 10 pushl 0x10(%ebp) 10d1f3: 8b 4d 0c mov 0xc(%ebp),%ecx 10d1f6: 01 c1 add %eax,%ecx 10d1f8: 51 push %ecx 10d1f9: 8b 4d a4 mov -0x5c(%ebp),%ecx 10d1fc: 29 c1 sub %eax,%ecx 10d1fe: 89 c8 mov %ecx,%eax 10d200: 03 45 08 add 0x8(%ebp),%eax 10d203: 50 push %eax 10d204: ff 12 call *(%edx) 10d206: 83 c4 10 add $0x10,%esp 10d209: eb 1d jmp 10d228 <== ALWAYS TAKEN flags, pathloc ); } else { result = IMFS_Set_handlers( pathloc ); } } else { result = IMFS_Set_handlers( pathloc ); 10d20b: 83 ec 0c sub $0xc,%esp 10d20e: 53 push %ebx 10d20f: e8 dc fc ff ff call 10cef0 <== ALWAYS TAKEN 10d214: 83 c4 10 add $0x10,%esp /* * If all of the flags are set we have permission * to do this. */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) 10d217: 8b 55 10 mov 0x10(%ebp),%edx 10d21a: c1 e2 06 shl $0x6,%edx if ( !rtems_libio_is_valid_perms( flags ) ) { assert( 0 ); rtems_set_errno_and_return_minus_one( EIO ); } jnode = node->node_access; 10d21d: 8b 0b mov (%ebx),%ecx 10d21f: 8b 49 30 mov 0x30(%ecx),%ecx 10d222: 21 d1 and %edx,%ecx 10d224: 39 d1 cmp %edx,%ecx 10d226: 75 08 jne 10d230 if ( !IMFS_evaluate_permission( pathloc, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 10d228: 8d 65 f4 lea -0xc(%ebp),%esp 10d22b: 5b pop %ebx 10d22c: 5e pop %esi 10d22d: 5f pop %edi 10d22e: c9 leave 10d22f: c3 ret /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( pathloc, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); 10d230: e8 1b 30 00 00 call 110250 <__errno> 10d235: c7 00 0d 00 00 00 movl $0xd,(%eax) 10d23b: 83 c8 ff or $0xffffffff,%eax 10d23e: eb e8 jmp 10d228 <== ALWAYS TAKEN 0010d2c3 : int IMFS_evaluate_for_make( const char *path, /* IN */ rtems_filesystem_location_info_t *pathloc, /* IN/OUT */ const char **name /* OUT */ ) { 10d2c3: 55 push %ebp 10d2c4: 89 e5 mov %esp,%ebp 10d2c6: 57 push %edi 10d2c7: 56 push %esi 10d2c8: 53 push %ebx 10d2c9: 83 ec 5c sub $0x5c,%esp 10d2cc: 8b 55 0c mov 0xc(%ebp),%edx /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; 10d2cf: 8b 1a mov (%edx),%ebx /* * Get the path length. */ pathlen = strlen( path ); 10d2d1: 31 c0 xor %eax,%eax 10d2d3: 83 c9 ff or $0xffffffff,%ecx 10d2d6: 8b 7d 08 mov 0x8(%ebp),%edi 10d2d9: f2 ae repnz scas %es:(%edi),%al 10d2db: f7 d1 not %ecx 10d2dd: 8d 79 ff lea -0x1(%ecx),%edi 10d2e0: 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 ); 10d2e7: 8d 75 af lea -0x51(%ebp),%esi 10d2ea: 89 7d a0 mov %edi,-0x60(%ebp) 10d2ed: 89 d7 mov %edx,%edi 10d2ef: 8d 45 e4 lea -0x1c(%ebp),%eax 10d2f2: 50 push %eax 10d2f3: 56 push %esi 10d2f4: ff 75 a0 pushl -0x60(%ebp) 10d2f7: 8b 45 08 mov 0x8(%ebp),%eax 10d2fa: 03 45 a4 add -0x5c(%ebp),%eax 10d2fd: 50 push %eax 10d2fe: e8 39 04 00 00 call 10d73c <== ALWAYS TAKEN pathlen -= len; 10d303: 8b 4d e4 mov -0x1c(%ebp),%ecx 10d306: 29 4d a0 sub %ecx,-0x60(%ebp) i += len; if ( !pathloc->node_access ) 10d309: 8b 17 mov (%edi),%edx 10d30b: 83 c4 10 add $0x10,%esp 10d30e: 85 d2 test %edx,%edx 10d310: 0f 84 53 01 00 00 je 10d469 <== ALWAYS TAKEN /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) 10d316: 85 c0 test %eax,%eax 10d318: 74 10 je 10d32a if ( node->type == IMFS_DIRECTORY ) 10d31a: 83 7b 4c 01 cmpl $0x1,0x4c(%ebx) 10d31e: 75 0a jne 10d32a /* * If all of the flags are set we have permission * to do this. */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) 10d320: f6 42 30 40 testb $0x40,0x30(%edx) 10d324: 0f 84 92 01 00 00 je 10d4bc while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); pathlen -= len; i += len; 10d32a: 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; 10d32d: 89 d3 mov %edx,%ebx switch( type ) { 10d32f: 83 f8 02 cmp $0x2,%eax 10d332: 74 1b je 10d34f 10d334: 77 0a ja 10d340 10d336: 85 c0 test %eax,%eax 10d338: 0f 84 e8 00 00 00 je 10d426 10d33e: eb af jmp 10d2ef <== ALWAYS TAKEN 10d340: 83 f8 03 cmp $0x3,%eax 10d343: 74 55 je 10d39a 10d345: 83 f8 04 cmp $0x4,%eax 10d348: 75 a5 jne 10d2ef <== ALWAYS TAKEN 10d34a: e9 e7 00 00 00 jmp 10d436 <== ALWAYS TAKEN case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) 10d34f: a1 60 16 12 00 mov 0x121660,%eax 10d354: 3b 50 18 cmp 0x18(%eax),%edx 10d357: 74 96 je 10d2ef /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == pathloc->mt_entry->mt_fs_root.node_access){ 10d359: 8b 47 10 mov 0x10(%edi),%eax 10d35c: 3b 50 1c cmp 0x1c(%eax),%edx 10d35f: 75 29 jne 10d38a 10d361: 89 cb mov %ecx,%ebx 10d363: 89 fa mov %edi,%edx if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; } else { newloc = pathloc->mt_entry->mt_point_node; 10d365: 8d 7d d0 lea -0x30(%ebp),%edi 10d368: 8d 70 08 lea 0x8(%eax),%esi 10d36b: b9 05 00 00 00 mov $0x5,%ecx 10d370: f3 a5 rep movsl %ds:(%esi),%es:(%edi) *pathloc = newloc; 10d372: 8d 75 d0 lea -0x30(%ebp),%esi 10d375: b1 05 mov $0x5,%cl 10d377: 89 d7 mov %edx,%edi 10d379: f3 a5 rep movsl %ds:(%esi),%es:(%edi) return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); 10d37b: 51 push %ecx 10d37c: 8b 42 0c mov 0xc(%edx),%eax 10d37f: ff 75 10 pushl 0x10(%ebp) 10d382: 52 push %edx 10d383: 8b 55 a4 mov -0x5c(%ebp),%edx 10d386: 29 da sub %ebx,%edx 10d388: eb 74 jmp 10d3fe <== ALWAYS TAKEN } } else { if ( !node->Parent ) 10d38a: 8b 5a 08 mov 0x8(%edx),%ebx 10d38d: 85 db test %ebx,%ebx 10d38f: 0f 85 8a 00 00 00 jne 10d41f 10d395: e9 cf 00 00 00 jmp 10d469 <== ALWAYS TAKEN pathloc->node_access = node; break; case IMFS_NAME: if ( node->type == IMFS_HARD_LINK ) { 10d39a: 8b 42 4c mov 0x4c(%edx),%eax 10d39d: 83 f8 03 cmp $0x3,%eax 10d3a0: 74 05 je 10d3a7 result = IMFS_evaluate_link( pathloc, 0 ); if ( result == -1 ) return -1; } else if ( node->type == IMFS_SYM_LINK ) { 10d3a2: 83 f8 04 cmp $0x4,%eax 10d3a5: 75 16 jne 10d3bd result = IMFS_evaluate_link( pathloc, 0 ); 10d3a7: 50 push %eax 10d3a8: 50 push %eax 10d3a9: 6a 00 push $0x0 10d3ab: 57 push %edi 10d3ac: e8 8f fe ff ff call 10d240 <== ALWAYS TAKEN if ( result == -1 ) 10d3b1: 83 c4 10 add $0x10,%esp 10d3b4: 83 f8 ff cmp $0xffffffff,%eax 10d3b7: 0f 84 f7 00 00 00 je 10d4b4 <== ALWAYS TAKEN return -1; } node = pathloc->node_access; 10d3bd: 8b 17 mov (%edi),%edx if ( !node ) 10d3bf: 85 d2 test %edx,%edx 10d3c1: 0f 84 cf 00 00 00 je 10d496 <== ALWAYS TAKEN /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) 10d3c7: 83 7a 4c 01 cmpl $0x1,0x4c(%edx) 10d3cb: 0f 85 c5 00 00 00 jne 10d496 /* * 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 ) { 10d3d1: 8b 42 5c mov 0x5c(%edx),%eax 10d3d4: 85 c0 test %eax,%eax 10d3d6: 74 35 je 10d40d 10d3d8: 89 fa mov %edi,%edx newloc = node->info.directory.mt_fs->mt_fs_root; 10d3da: 8d 7d d0 lea -0x30(%ebp),%edi 10d3dd: 8d 70 1c lea 0x1c(%eax),%esi 10d3e0: b9 05 00 00 00 mov $0x5,%ecx 10d3e5: f3 a5 rep movsl %ds:(%esi),%es:(%edi) *pathloc = newloc; 10d3e7: 8d 75 d0 lea -0x30(%ebp),%esi 10d3ea: b1 05 mov $0x5,%cl 10d3ec: 89 d7 mov %edx,%edi 10d3ee: f3 a5 rep movsl %ds:(%esi),%es:(%edi) return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); 10d3f0: 53 push %ebx 10d3f1: 8b 42 0c mov 0xc(%edx),%eax 10d3f4: ff 75 10 pushl 0x10(%ebp) 10d3f7: 52 push %edx 10d3f8: 8b 55 a4 mov -0x5c(%ebp),%edx 10d3fb: 2b 55 e4 sub -0x1c(%ebp),%edx 10d3fe: 03 55 08 add 0x8(%ebp),%edx 10d401: 52 push %edx 10d402: ff 50 04 call *0x4(%eax) 10d405: 83 c4 10 add $0x10,%esp 10d408: e9 a7 00 00 00 jmp 10d4b4 <== ALWAYS TAKEN /* * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); 10d40d: 51 push %ecx 10d40e: 51 push %ecx 10d40f: 56 push %esi 10d410: 52 push %edx 10d411: e8 9a 02 00 00 call 10d6b0 <== ALWAYS TAKEN 10d416: 89 c3 mov %eax,%ebx /* * If there is no node we have found the name of the node we * wish to create. */ if ( ! node ) 10d418: 83 c4 10 add $0x10,%esp 10d41b: 85 c0 test %eax,%eax 10d41d: 74 27 je 10d446 done = true; else pathloc->node_access = node; 10d41f: 89 1f mov %ebx,(%edi) 10d421: e9 c9 fe ff ff jmp 10d2ef <== ALWAYS TAKEN break; case IMFS_NO_MORE_PATH: rtems_set_errno_and_return_minus_one( EEXIST ); 10d426: e8 25 2e 00 00 call 110250 <__errno> 10d42b: c7 00 11 00 00 00 movl $0x11,(%eax) 10d431: e9 91 00 00 00 jmp 10d4c7 <== ALWAYS TAKEN break; case IMFS_INVALID_TOKEN: rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); 10d436: e8 15 2e 00 00 call 110250 <__errno> 10d43b: c7 00 5b 00 00 00 movl $0x5b,(%eax) 10d441: e9 81 00 00 00 jmp 10d4c7 <== ALWAYS TAKEN 10d446: 89 fa mov %edi,%edx case IMFS_CURRENT_DIR: break; } } *name = &path[ i - len ]; 10d448: 8b 45 a4 mov -0x5c(%ebp),%eax 10d44b: 2b 45 e4 sub -0x1c(%ebp),%eax 10d44e: 03 45 08 add 0x8(%ebp),%eax 10d451: 8b 4d 10 mov 0x10(%ebp),%ecx 10d454: 89 01 mov %eax,(%ecx) 10d456: 8b 45 08 mov 0x8(%ebp),%eax 10d459: 03 45 a4 add -0x5c(%ebp),%eax /* * 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++) { 10d45c: eb 18 jmp 10d476 <== ALWAYS TAKEN 10d45e: 40 inc %eax if ( !IMFS_is_separator( path[ i ] ) ) 10d45f: 80 f9 5c cmp $0x5c,%cl 10d462: 74 12 je 10d476 10d464: 80 f9 2f cmp $0x2f,%cl 10d467: 74 0d je 10d476 rtems_set_errno_and_return_minus_one( ENOENT ); 10d469: e8 e2 2d 00 00 call 110250 <__errno> 10d46e: c7 00 02 00 00 00 movl $0x2,(%eax) 10d474: eb 51 jmp 10d4c7 <== ALWAYS TAKEN /* * 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++) { 10d476: 8a 08 mov (%eax),%cl 10d478: 84 c9 test %cl,%cl 10d47a: 75 e2 jne 10d45e /* * Verify we can execute and write to this directory. */ result = IMFS_Set_handlers( pathloc ); 10d47c: 83 ec 0c sub $0xc,%esp 10d47f: 52 push %edx 10d480: 89 55 9c mov %edx,-0x64(%ebp) 10d483: e8 68 fa ff ff call 10cef0 <== ALWAYS TAKEN /* * The returned node must be a directory */ node = pathloc->node_access; 10d488: 8b 55 9c mov -0x64(%ebp),%edx 10d48b: 8b 12 mov (%edx),%edx if ( node->type != IMFS_DIRECTORY ) 10d48d: 83 c4 10 add $0x10,%esp 10d490: 83 7a 4c 01 cmpl $0x1,0x4c(%edx) 10d494: 74 0d je 10d4a3 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOTDIR ); 10d496: e8 b5 2d 00 00 call 110250 <__errno> 10d49b: c7 00 14 00 00 00 movl $0x14,(%eax) 10d4a1: eb 24 jmp 10d4c7 <== ALWAYS TAKEN /* * If all of the flags are set we have permission * to do this. */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) 10d4a3: 8b 52 30 mov 0x30(%edx),%edx 10d4a6: 81 e2 c0 00 00 00 and $0xc0,%edx 10d4ac: 81 fa c0 00 00 00 cmp $0xc0,%edx 10d4b2: 75 08 jne 10d4bc if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 10d4b4: 8d 65 f4 lea -0xc(%ebp),%esp 10d4b7: 5b pop %ebx 10d4b8: 5e pop %esi 10d4b9: 5f pop %edi 10d4ba: c9 leave 10d4bb: c3 ret /* * We must have Write and execute permission on the returned node. */ if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) ) rtems_set_errno_and_return_minus_one( EACCES ); 10d4bc: e8 8f 2d 00 00 call 110250 <__errno> 10d4c1: c7 00 0d 00 00 00 movl $0xd,(%eax) 10d4c7: 83 c8 ff or $0xffffffff,%eax 10d4ca: eb e8 jmp 10d4b4 <== ALWAYS TAKEN 0010cf55 : int IMFS_evaluate_hard_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 10cf55: 55 push %ebp 10cf56: 89 e5 mov %esp,%ebp 10cf58: 53 push %ebx 10cf59: 83 ec 04 sub $0x4,%esp 10cf5c: 8b 5d 08 mov 0x8(%ebp),%ebx IMFS_jnode_t *jnode = node->node_access; 10cf5f: 8b 03 mov (%ebx),%eax /* * Check for things that should never happen. */ if ( jnode->type != IMFS_HARD_LINK ) 10cf61: 83 78 4c 03 cmpl $0x3,0x4c(%eax) 10cf65: 74 0d je 10cf74 <== NEVER TAKEN rtems_fatal_error_occurred (0xABCD0000); 10cf67: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10cf6a: 68 00 00 cd ab push $0xabcd0000 <== NOT EXECUTED 10cf6f: e8 70 d5 ff ff call 10a4e4 <== NOT EXECUTED /* * Set the hard link value and the handlers. */ node->node_access = jnode->info.hard_link.link_node; 10cf74: 8b 40 50 mov 0x50(%eax),%eax 10cf77: 89 03 mov %eax,(%ebx) IMFS_Set_handlers( node ); 10cf79: 83 ec 0c sub $0xc,%esp 10cf7c: 53 push %ebx 10cf7d: e8 6e ff ff ff call 10cef0 <== ALWAYS TAKEN /* * If all of the flags are set we have permission * to do this. */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) 10cf82: 8b 45 0c mov 0xc(%ebp),%eax 10cf85: c1 e0 06 shl $0x6,%eax if ( !rtems_libio_is_valid_perms( flags ) ) { assert( 0 ); rtems_set_errno_and_return_minus_one( EIO ); } jnode = node->node_access; 10cf88: 8b 13 mov (%ebx),%edx 10cf8a: 8b 52 30 mov 0x30(%edx),%edx 10cf8d: 21 c2 and %eax,%edx 10cf8f: 83 c4 10 add $0x10,%esp 10cf92: 39 c2 cmp %eax,%edx 10cf94: 75 07 jne 10cf9d <== ALWAYS TAKEN 10cf96: 31 c0 xor %eax,%eax if ( !IMFS_evaluate_permission( node, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 10cf98: 8b 5d fc mov -0x4(%ebp),%ebx 10cf9b: c9 leave 10cf9c: c3 ret /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); 10cf9d: e8 ae 32 00 00 call 110250 <__errno> <== NOT EXECUTED 10cfa2: c7 00 0d 00 00 00 movl $0xd,(%eax) <== NOT EXECUTED 10cfa8: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 10cfab: eb eb jmp 10cf98 <== NOT EXECUTED 0010d240 : int IMFS_evaluate_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 10d240: 55 push %ebp 10d241: 89 e5 mov %esp,%ebp 10d243: 57 push %edi 10d244: 56 push %esi 10d245: 53 push %ebx 10d246: 83 ec 0c sub $0xc,%esp 10d249: 8b 5d 08 mov 0x8(%ebp),%ebx 10d24c: 8b 75 0c mov 0xc(%ebp),%esi IMFS_jnode_t *jnode; int result = 0; do { jnode = node->node_access; 10d24f: 8b 3b mov (%ebx),%edi /* * Increment and check the link counter. */ rtems_filesystem_link_counts ++; 10d251: a1 60 16 12 00 mov 0x121660,%eax 10d256: 8b 50 30 mov 0x30(%eax),%edx 10d259: 42 inc %edx 10d25a: 66 89 50 30 mov %dx,0x30(%eax) if ( rtems_filesystem_link_counts > MAXSYMLINK ) { 10d25e: 66 83 fa 05 cmp $0x5,%dx 10d262: 76 16 jbe 10d27a rtems_filesystem_link_counts = 0; 10d264: 66 c7 40 30 00 00 movw $0x0,0x30(%eax) rtems_set_errno_and_return_minus_one( ELOOP ); 10d26a: e8 e1 2f 00 00 call 110250 <__errno> 10d26f: c7 00 5c 00 00 00 movl $0x5c,(%eax) 10d275: 83 c8 ff or $0xffffffff,%eax 10d278: eb 41 jmp 10d2bb <== ALWAYS TAKEN /* * Follow the Link node. */ if ( jnode->type == IMFS_HARD_LINK ) 10d27a: 8b 47 4c mov 0x4c(%edi),%eax 10d27d: 83 f8 03 cmp $0x3,%eax 10d280: 75 0b jne 10d28d result = IMFS_evaluate_hard_link( node, flags ); 10d282: 52 push %edx 10d283: 52 push %edx 10d284: 56 push %esi 10d285: 53 push %ebx 10d286: e8 ca fc ff ff call 10cf55 <== ALWAYS TAKEN 10d28b: eb 0e jmp 10d29b <== ALWAYS TAKEN else if (jnode->type == IMFS_SYM_LINK ) 10d28d: 83 f8 04 cmp $0x4,%eax 10d290: 75 10 jne 10d2a2 result = IMFS_evaluate_sym_link( node, flags ); 10d292: 50 push %eax 10d293: 50 push %eax 10d294: 56 push %esi 10d295: 53 push %ebx 10d296: e8 12 fd ff ff call 10cfad <== ALWAYS TAKEN 10d29b: 83 c4 10 add $0x10,%esp } while ( ( result == 0 ) && ( ( jnode->type == IMFS_SYM_LINK ) || ( jnode->type == IMFS_HARD_LINK ) ) ); 10d29e: 85 c0 test %eax,%eax 10d2a0: 75 0d jne 10d2af result = IMFS_evaluate_hard_link( node, flags ); else if (jnode->type == IMFS_SYM_LINK ) result = IMFS_evaluate_sym_link( node, flags ); } while ( ( result == 0 ) && ( ( jnode->type == IMFS_SYM_LINK ) || 10d2a2: 8b 47 4c mov 0x4c(%edi),%eax 10d2a5: 83 e8 03 sub $0x3,%eax 10d2a8: 83 f8 01 cmp $0x1,%eax 10d2ab: 76 a2 jbe 10d24f 10d2ad: 31 c0 xor %eax,%eax /* * Clear link counter. */ rtems_filesystem_link_counts = 0; 10d2af: 8b 15 60 16 12 00 mov 0x121660,%edx 10d2b5: 66 c7 42 30 00 00 movw $0x0,0x30(%edx) return result; } 10d2bb: 8d 65 f4 lea -0xc(%ebp),%esp 10d2be: 5b pop %ebx 10d2bf: 5e pop %esi 10d2c0: 5f pop %edi 10d2c1: c9 leave 10d2c2: c3 ret 0010cf38 : int IMFS_evaluate_permission( rtems_filesystem_location_info_t *node, int flags ) { 10cf38: 55 push %ebp <== NOT EXECUTED 10cf39: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10cf3b: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED /* * If all of the flags are set we have permission * to do this. */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) 10cf3e: c1 e0 06 shl $0x6,%eax <== NOT EXECUTED 10cf41: 8b 55 08 mov 0x8(%ebp),%edx <== NOT EXECUTED 10cf44: 8b 12 mov (%edx),%edx <== NOT EXECUTED 10cf46: 8b 52 30 mov 0x30(%edx),%edx <== NOT EXECUTED 10cf49: 21 c2 and %eax,%edx <== NOT EXECUTED 10cf4b: 39 c2 cmp %eax,%edx <== NOT EXECUTED 10cf4d: 0f 94 c0 sete %al <== NOT EXECUTED 10cf50: 0f b6 c0 movzbl %al,%eax <== NOT EXECUTED return 1; return 0; } 10cf53: c9 leave <== NOT EXECUTED 10cf54: c3 ret <== NOT EXECUTED 0010cfad : int IMFS_evaluate_sym_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 10cfad: 55 push %ebp 10cfae: 89 e5 mov %esp,%ebp 10cfb0: 57 push %edi 10cfb1: 56 push %esi 10cfb2: 53 push %ebx 10cfb3: 83 ec 0c sub $0xc,%esp 10cfb6: 8b 5d 08 mov 0x8(%ebp),%ebx IMFS_jnode_t *jnode = node->node_access; 10cfb9: 8b 03 mov (%ebx),%eax /* * Check for things that should never happen. */ if ( jnode->type != IMFS_SYM_LINK ) 10cfbb: 83 78 4c 04 cmpl $0x4,0x4c(%eax) 10cfbf: 74 0a je 10cfcb <== NEVER TAKEN rtems_fatal_error_occurred (0xABCD0000); 10cfc1: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10cfc4: 68 00 00 cd ab push $0xabcd0000 <== NOT EXECUTED 10cfc9: eb 0f jmp 10cfda <== NOT EXECUTED if ( !jnode->Parent ) 10cfcb: 8b 50 08 mov 0x8(%eax),%edx 10cfce: 85 d2 test %edx,%edx 10cfd0: 75 0d jne 10cfdf <== NEVER TAKEN rtems_fatal_error_occurred( 0xBAD00000 ); 10cfd2: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10cfd5: 68 00 00 d0 ba push $0xbad00000 <== NOT EXECUTED 10cfda: e8 05 d5 ff ff call 10a4e4 <== 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; 10cfdf: 89 13 mov %edx,(%ebx) rtems_filesystem_get_sym_start_loc( 10cfe1: 8b 50 50 mov 0x50(%eax),%edx 10cfe4: 8a 0a mov (%edx),%cl 10cfe6: 80 f9 5c cmp $0x5c,%cl 10cfe9: 74 0b je 10cff6 <== ALWAYS TAKEN 10cfeb: 80 f9 2f cmp $0x2f,%cl 10cfee: 74 06 je 10cff6 10cff0: 31 d2 xor %edx,%edx 10cff2: 84 c9 test %cl,%cl 10cff4: 75 17 jne 10d00d <== NEVER TAKEN 10cff6: 8b 35 60 16 12 00 mov 0x121660,%esi 10cffc: 83 c6 18 add $0x18,%esi 10cfff: b9 05 00 00 00 mov $0x5,%ecx 10d004: 89 df mov %ebx,%edi 10d006: f3 a5 rep movsl %ds:(%esi),%es:(%edi) 10d008: ba 01 00 00 00 mov $0x1,%edx * Use eval path to evaluate the path of the symbolic link. */ result = IMFS_eval_path( &jnode->info.sym_link.name[i], strlen( &jnode->info.sym_link.name[i] ), 10d00d: 03 50 50 add 0x50(%eax),%edx 10d010: 31 c0 xor %eax,%eax 10d012: 83 c9 ff or $0xffffffff,%ecx 10d015: 89 d7 mov %edx,%edi 10d017: f2 ae repnz scas %es:(%edi),%al 10d019: f7 d1 not %ecx 10d01b: 49 dec %ecx /* * Use eval path to evaluate the path of the symbolic link. */ result = IMFS_eval_path( 10d01c: 53 push %ebx 10d01d: ff 75 0c pushl 0xc(%ebp) 10d020: 51 push %ecx 10d021: 52 push %edx 10d022: e8 38 00 00 00 call 10d05f <== ALWAYS TAKEN 10d027: 89 c6 mov %eax,%esi strlen( &jnode->info.sym_link.name[i] ), flags, node ); IMFS_Set_handlers( node ); 10d029: 89 1c 24 mov %ebx,(%esp) 10d02c: e8 bf fe ff ff call 10cef0 <== ALWAYS TAKEN /* * If all of the flags are set we have permission * to do this. */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) 10d031: 8b 45 0c mov 0xc(%ebp),%eax 10d034: c1 e0 06 shl $0x6,%eax if ( !rtems_libio_is_valid_perms( flags ) ) { assert( 0 ); rtems_set_errno_and_return_minus_one( EIO ); } jnode = node->node_access; 10d037: 8b 13 mov (%ebx),%edx 10d039: 8b 52 30 mov 0x30(%edx),%edx 10d03c: 21 c2 and %eax,%edx 10d03e: 83 c4 10 add $0x10,%esp 10d041: 39 c2 cmp %eax,%edx 10d043: 75 0a jne 10d04f <== ALWAYS TAKEN if ( !IMFS_evaluate_permission( node, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 10d045: 89 f0 mov %esi,%eax 10d047: 8d 65 f4 lea -0xc(%ebp),%esp 10d04a: 5b pop %ebx 10d04b: 5e pop %esi 10d04c: 5f pop %edi 10d04d: c9 leave 10d04e: c3 ret /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); 10d04f: e8 fc 31 00 00 call 110250 <__errno> <== NOT EXECUTED 10d054: c7 00 0d 00 00 00 movl $0xd,(%eax) <== NOT EXECUTED 10d05a: 83 ce ff or $0xffffffff,%esi <== NOT EXECUTED 10d05d: eb e6 jmp 10d045 <== NOT EXECUTED 0010d614 : } int IMFS_fifo_close( rtems_libio_t *iop ) { 10d614: 55 push %ebp <== NOT EXECUTED 10d615: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10d617: 57 push %edi <== NOT EXECUTED 10d618: 56 push %esi <== NOT EXECUTED 10d619: 53 push %ebx <== NOT EXECUTED 10d61a: 83 ec 14 sub $0x14,%esp <== NOT EXECUTED 10d61d: 8b 7d 08 mov 0x8(%ebp),%edi <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; 10d620: 8b 77 38 mov 0x38(%edi),%esi <== NOT EXECUTED int err = pipe_release(&JNODE2PIPE(jnode), iop); 10d623: 57 push %edi <== NOT EXECUTED 10d624: 8d 46 50 lea 0x50(%esi),%eax <== NOT EXECUTED 10d627: 50 push %eax <== NOT EXECUTED 10d628: e8 87 1b 00 00 call 10f1b4 <== NOT EXECUTED 10d62d: 89 c3 mov %eax,%ebx <== NOT EXECUTED if (! err) { 10d62f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10d632: 83 f8 00 cmp $0x0,%eax <== NOT EXECUTED 10d635: 75 2c jne 10d663 <== NOT EXECUTED iop->flags &= ~LIBIO_FLAGS_OPEN; 10d637: 81 67 14 ff fe ff ff andl $0xfffffeff,0x14(%edi) <== NOT EXECUTED /* Free jnode if file is already unlinked and no one opens it */ if (! rtems_libio_is_file_open(jnode) && jnode->st_nlink < 1) 10d63e: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10d641: 56 push %esi <== NOT EXECUTED 10d642: e8 5b 06 00 00 call 10dca2 <== NOT EXECUTED 10d647: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10d64a: 85 c0 test %eax,%eax <== NOT EXECUTED 10d64c: 75 23 jne 10d671 <== NOT EXECUTED 10d64e: 66 83 7e 34 00 cmpw $0x0,0x34(%esi) <== NOT EXECUTED 10d653: 75 1c jne 10d671 <== NOT EXECUTED free(jnode); 10d655: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10d658: 56 push %esi <== NOT EXECUTED 10d659: e8 d2 9a ff ff call 107130 <== NOT EXECUTED 10d65e: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10d661: eb 0e jmp 10d671 <== NOT EXECUTED } IMFS_FIFO_RETURN(err); 10d663: 7d 0c jge 10d671 <== NOT EXECUTED 10d665: e8 e6 2b 00 00 call 110250 <__errno> <== NOT EXECUTED 10d66a: f7 db neg %ebx <== NOT EXECUTED 10d66c: 89 18 mov %ebx,(%eax) <== NOT EXECUTED 10d66e: 83 cb ff or $0xffffffff,%ebx <== NOT EXECUTED } 10d671: 89 d8 mov %ebx,%eax <== NOT EXECUTED 10d673: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 10d676: 5b pop %ebx <== NOT EXECUTED 10d677: 5e pop %esi <== NOT EXECUTED 10d678: 5f pop %edi <== NOT EXECUTED 10d679: c9 leave <== NOT EXECUTED 10d67a: c3 ret <== NOT EXECUTED 0010d507 : int IMFS_fifo_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) { 10d507: 55 push %ebp <== NOT EXECUTED 10d508: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10d50a: 53 push %ebx <== NOT EXECUTED 10d50b: 83 ec 04 sub $0x4,%esp <== NOT EXECUTED 10d50e: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 10d511: 8b 4d 0c mov 0xc(%ebp),%ecx <== NOT EXECUTED 10d514: 8b 55 10 mov 0x10(%ebp),%edx <== NOT EXECUTED int err; if (command == FIONBIO) { 10d517: 81 f9 7e 66 04 80 cmp $0x8004667e,%ecx <== NOT EXECUTED 10d51d: 75 1c jne 10d53b <== NOT EXECUTED if (buffer == NULL) 10d51f: bb f2 ff ff ff mov $0xfffffff2,%ebx <== NOT EXECUTED 10d524: 85 d2 test %edx,%edx <== NOT EXECUTED 10d526: 74 2a je 10d552 <== NOT EXECUTED err = -EFAULT; else { if (*(int *)buffer) 10d528: 83 3a 00 cmpl $0x0,(%edx) <== NOT EXECUTED 10d52b: 74 06 je 10d533 <== NOT EXECUTED iop->flags |= LIBIO_FLAGS_NO_DELAY; 10d52d: 83 48 14 01 orl $0x1,0x14(%eax) <== NOT EXECUTED 10d531: eb 04 jmp 10d537 <== NOT EXECUTED else iop->flags &= ~LIBIO_FLAGS_NO_DELAY; 10d533: 83 60 14 fe andl $0xfffffffe,0x14(%eax) <== NOT EXECUTED 10d537: 31 db xor %ebx,%ebx <== NOT EXECUTED 10d539: eb 23 jmp 10d55e <== NOT EXECUTED return 0; } } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); 10d53b: 50 push %eax <== NOT EXECUTED 10d53c: 52 push %edx <== NOT EXECUTED 10d53d: 51 push %ecx <== NOT EXECUTED 10d53e: 8b 40 38 mov 0x38(%eax),%eax <== NOT EXECUTED 10d541: ff 70 50 pushl 0x50(%eax) <== NOT EXECUTED 10d544: e8 e6 18 00 00 call 10ee2f <== NOT EXECUTED 10d549: 89 c3 mov %eax,%ebx <== NOT EXECUTED IMFS_FIFO_RETURN(err); 10d54b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10d54e: 85 c0 test %eax,%eax <== NOT EXECUTED 10d550: 79 0c jns 10d55e <== NOT EXECUTED 10d552: e8 f9 2c 00 00 call 110250 <__errno> <== NOT EXECUTED 10d557: f7 db neg %ebx <== NOT EXECUTED 10d559: 89 18 mov %ebx,(%eax) <== NOT EXECUTED 10d55b: 83 cb ff or $0xffffffff,%ebx <== NOT EXECUTED } 10d55e: 89 d8 mov %ebx,%eax <== NOT EXECUTED 10d560: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 10d563: c9 leave <== NOT EXECUTED 10d564: c3 ret <== NOT EXECUTED 0010d4cc : rtems_off64_t IMFS_fifo_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { 10d4cc: 55 push %ebp <== NOT EXECUTED 10d4cd: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10d4cf: 53 push %ebx <== NOT EXECUTED 10d4d0: 83 ec 04 sub $0x4,%esp <== NOT EXECUTED 10d4d3: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED off_t err = pipe_lseek(LIBIO2PIPE(iop), offset, whence, iop); 10d4d6: 50 push %eax <== NOT EXECUTED 10d4d7: ff 75 14 pushl 0x14(%ebp) <== NOT EXECUTED 10d4da: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED 10d4dd: 8b 40 38 mov 0x38(%eax),%eax <== NOT EXECUTED 10d4e0: ff 70 50 pushl 0x50(%eax) <== NOT EXECUTED 10d4e3: e8 f0 18 00 00 call 10edd8 <== NOT EXECUTED 10d4e8: 89 c3 mov %eax,%ebx <== NOT EXECUTED IMFS_FIFO_RETURN(err); 10d4ea: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10d4ed: 85 c0 test %eax,%eax <== NOT EXECUTED 10d4ef: 79 10 jns 10d501 <== NOT EXECUTED 10d4f1: e8 5a 2d 00 00 call 110250 <__errno> <== NOT EXECUTED 10d4f6: f7 db neg %ebx <== NOT EXECUTED 10d4f8: 89 18 mov %ebx,(%eax) <== NOT EXECUTED 10d4fa: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 10d4fd: 89 c2 mov %eax,%edx <== NOT EXECUTED 10d4ff: eb 01 jmp 10d502 <== NOT EXECUTED 10d501: 99 cltd <== NOT EXECUTED } 10d502: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 10d505: c9 leave <== NOT EXECUTED 10d506: c3 ret <== NOT EXECUTED 0010d67b : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 10d67b: 55 push %ebp 10d67c: 89 e5 mov %esp,%ebp 10d67e: 53 push %ebx 10d67f: 83 ec 0c sub $0xc,%esp 10d682: 8b 45 08 mov 0x8(%ebp),%eax IMFS_jnode_t *jnode = iop->file_info; int err = fifo_open(&JNODE2PIPE(jnode), iop); 10d685: 50 push %eax 10d686: 8b 40 38 mov 0x38(%eax),%eax 10d689: 83 c0 50 add $0x50,%eax 10d68c: 50 push %eax 10d68d: e8 f2 1b 00 00 call 10f284 10d692: 89 c3 mov %eax,%ebx IMFS_FIFO_RETURN(err); 10d694: 83 c4 10 add $0x10,%esp 10d697: 85 c0 test %eax,%eax 10d699: 79 0c jns 10d6a7 <== ALWAYS TAKEN 10d69b: e8 b0 2b 00 00 call 110250 <__errno> 10d6a0: f7 db neg %ebx 10d6a2: 89 18 mov %ebx,(%eax) 10d6a4: 83 cb ff or $0xffffffff,%ebx } 10d6a7: 89 d8 mov %ebx,%eax 10d6a9: 8b 5d fc mov -0x4(%ebp),%ebx 10d6ac: c9 leave 10d6ad: c3 ret 0010d5be : ssize_t IMFS_fifo_read( rtems_libio_t *iop, void *buffer, size_t count ) { 10d5be: 55 push %ebp <== NOT EXECUTED 10d5bf: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10d5c1: 56 push %esi <== NOT EXECUTED 10d5c2: 53 push %ebx <== NOT EXECUTED 10d5c3: 83 ec 10 sub $0x10,%esp <== NOT EXECUTED 10d5c6: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; 10d5c9: 8b 70 38 mov 0x38(%eax),%esi <== NOT EXECUTED int err = pipe_read(JNODE2PIPE(jnode), buffer, count, iop); 10d5cc: 50 push %eax <== NOT EXECUTED 10d5cd: ff 75 10 pushl 0x10(%ebp) <== NOT EXECUTED 10d5d0: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED 10d5d3: ff 76 50 pushl 0x50(%esi) <== NOT EXECUTED 10d5d6: e8 3c 1a 00 00 call 10f017 <== NOT EXECUTED 10d5db: 89 c3 mov %eax,%ebx <== NOT EXECUTED if (err > 0) 10d5dd: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10d5e0: 83 f8 00 cmp $0x0,%eax <== NOT EXECUTED 10d5e3: 7e 18 jle 10d5fd <== NOT EXECUTED IMFS_update_atime(jnode); 10d5e5: 52 push %edx <== NOT EXECUTED 10d5e6: 52 push %edx <== NOT EXECUTED 10d5e7: 6a 00 push $0x0 <== NOT EXECUTED 10d5e9: 8d 45 f0 lea -0x10(%ebp),%eax <== NOT EXECUTED 10d5ec: 50 push %eax <== NOT EXECUTED 10d5ed: e8 fe 05 00 00 call 10dbf0 <== NOT EXECUTED 10d5f2: 8b 45 f0 mov -0x10(%ebp),%eax <== NOT EXECUTED 10d5f5: 89 46 40 mov %eax,0x40(%esi) <== NOT EXECUTED 10d5f8: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10d5fb: eb 0e jmp 10d60b <== NOT EXECUTED IMFS_FIFO_RETURN(err); 10d5fd: 74 0c je 10d60b <== NOT EXECUTED 10d5ff: e8 4c 2c 00 00 call 110250 <__errno> <== NOT EXECUTED 10d604: f7 db neg %ebx <== NOT EXECUTED 10d606: 89 18 mov %ebx,(%eax) <== NOT EXECUTED 10d608: 83 cb ff or $0xffffffff,%ebx <== NOT EXECUTED } 10d60b: 89 d8 mov %ebx,%eax <== NOT EXECUTED 10d60d: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED 10d610: 5b pop %ebx <== NOT EXECUTED 10d611: 5e pop %esi <== NOT EXECUTED 10d612: c9 leave <== NOT EXECUTED 10d613: c3 ret <== NOT EXECUTED 0010d565 : ssize_t IMFS_fifo_write( rtems_libio_t *iop, const void *buffer, size_t count ) { 10d565: 55 push %ebp <== NOT EXECUTED 10d566: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10d568: 56 push %esi <== NOT EXECUTED 10d569: 53 push %ebx <== NOT EXECUTED 10d56a: 83 ec 10 sub $0x10,%esp <== NOT EXECUTED 10d56d: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; 10d570: 8b 70 38 mov 0x38(%eax),%esi <== NOT EXECUTED int err = pipe_write(JNODE2PIPE(jnode), buffer, count, iop); 10d573: 50 push %eax <== NOT EXECUTED 10d574: ff 75 10 pushl 0x10(%ebp) <== NOT EXECUTED 10d577: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED 10d57a: ff 76 50 pushl 0x50(%esi) <== NOT EXECUTED 10d57d: e8 03 19 00 00 call 10ee85 <== NOT EXECUTED 10d582: 89 c3 mov %eax,%ebx <== NOT EXECUTED if (err > 0) { 10d584: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10d587: 83 f8 00 cmp $0x0,%eax <== NOT EXECUTED 10d58a: 7e 1b jle 10d5a7 <== NOT EXECUTED IMFS_mtime_ctime_update(jnode); 10d58c: 50 push %eax <== NOT EXECUTED 10d58d: 50 push %eax <== NOT EXECUTED 10d58e: 6a 00 push $0x0 <== NOT EXECUTED 10d590: 8d 45 f0 lea -0x10(%ebp),%eax <== NOT EXECUTED 10d593: 50 push %eax <== NOT EXECUTED 10d594: e8 57 06 00 00 call 10dbf0 <== NOT EXECUTED 10d599: 8b 45 f0 mov -0x10(%ebp),%eax <== NOT EXECUTED 10d59c: 89 46 44 mov %eax,0x44(%esi) <== NOT EXECUTED 10d59f: 89 46 48 mov %eax,0x48(%esi) <== NOT EXECUTED 10d5a2: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10d5a5: eb 0e jmp 10d5b5 <== NOT EXECUTED } IMFS_FIFO_RETURN(err); 10d5a7: 74 0c je 10d5b5 <== NOT EXECUTED 10d5a9: e8 a2 2c 00 00 call 110250 <__errno> <== NOT EXECUTED 10d5ae: f7 db neg %ebx <== NOT EXECUTED 10d5b0: 89 18 mov %ebx,(%eax) <== NOT EXECUTED 10d5b2: 83 cb ff or $0xffffffff,%ebx <== NOT EXECUTED } 10d5b5: 89 d8 mov %ebx,%eax <== NOT EXECUTED 10d5b7: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED 10d5ba: 5b pop %ebx <== NOT EXECUTED 10d5bb: 5e pop %esi <== NOT EXECUTED 10d5bc: c9 leave <== NOT EXECUTED 10d5bd: c3 ret <== NOT EXECUTED 0010d6b0 : IMFS_jnode_t *IMFS_find_match_in_dir( IMFS_jnode_t *directory, char *name ) { 10d6b0: 55 push %ebp 10d6b1: 89 e5 mov %esp,%ebp 10d6b3: 57 push %edi 10d6b4: 56 push %esi 10d6b5: 53 push %ebx 10d6b6: 83 ec 0c sub $0xc,%esp 10d6b9: 8b 5d 08 mov 0x8(%ebp),%ebx 10d6bc: 8b 7d 0c mov 0xc(%ebp),%edi /* * Check for fatal errors. A NULL directory show a problem in the * the IMFS code. */ assert( directory ); 10d6bf: 85 db test %ebx,%ebx 10d6c1: 75 16 jne 10d6d9 <== NEVER TAKEN 10d6c3: 68 50 d8 11 00 push $0x11d850 <== NOT EXECUTED 10d6c8: 68 b0 d8 11 00 push $0x11d8b0 <== NOT EXECUTED 10d6cd: 6a 2a push $0x2a <== NOT EXECUTED 10d6cf: 68 5a d8 11 00 push $0x11d85a <== NOT EXECUTED 10d6d4: e8 67 97 ff ff call 106e40 <__assert_func> <== NOT EXECUTED if ( !name ) 10d6d9: 85 ff test %edi,%edi 10d6db: 74 52 je 10d72f <== ALWAYS TAKEN /* * Check for "." and ".." */ if ( !strcmp( name, dotname ) ) 10d6dd: 56 push %esi 10d6de: 56 push %esi 10d6df: 68 a8 d8 11 00 push $0x11d8a8 10d6e4: 57 push %edi 10d6e5: e8 52 36 00 00 call 110d3c 10d6ea: 83 c4 10 add $0x10,%esp 10d6ed: 85 c0 test %eax,%eax 10d6ef: 74 40 je 10d731 <== ALWAYS TAKEN return directory; if ( !strcmp( name, dotdotname ) ) 10d6f1: 51 push %ecx 10d6f2: 51 push %ecx 10d6f3: 68 aa d8 11 00 push $0x11d8aa 10d6f8: 57 push %edi 10d6f9: e8 3e 36 00 00 call 110d3c 10d6fe: 83 c4 10 add $0x10,%esp 10d701: 85 c0 test %eax,%eax 10d703: 75 05 jne 10d70a <== NEVER TAKEN return directory->Parent; 10d705: 8b 5b 08 mov 0x8(%ebx),%ebx <== NOT EXECUTED 10d708: eb 27 jmp 10d731 <== NOT EXECUTED the_chain = &directory->info.directory.Entries; for ( the_node = the_chain->first; 10d70a: 8b 73 50 mov 0x50(%ebx),%esi */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10d70d: 83 c3 54 add $0x54,%ebx 10d710: eb 19 jmp 10d72b <== ALWAYS TAKEN !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 ) ) 10d712: 8d 46 0c lea 0xc(%esi),%eax 10d715: 52 push %edx 10d716: 52 push %edx 10d717: 50 push %eax 10d718: 57 push %edi 10d719: e8 1e 36 00 00 call 110d3c 10d71e: 83 c4 10 add $0x10,%esp 10d721: 85 c0 test %eax,%eax 10d723: 75 04 jne 10d729 10d725: 89 f3 mov %esi,%ebx 10d727: eb 08 jmp 10d731 <== ALWAYS TAKEN 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 ) { 10d729: 8b 36 mov (%esi),%esi if ( !strcmp( name, dotdotname ) ) return directory->Parent; the_chain = &directory->info.directory.Entries; for ( the_node = the_chain->first; 10d72b: 39 de cmp %ebx,%esi 10d72d: 75 e3 jne 10d712 10d72f: 31 db xor %ebx,%ebx if ( !strcmp( name, the_jnode->name ) ) return the_jnode; } return 0; } 10d731: 89 d8 mov %ebx,%eax 10d733: 8d 65 f4 lea -0xc(%ebp),%esp 10d736: 5b pop %ebx 10d737: 5e pop %esi 10d738: 5f pop %edi 10d739: c9 leave 10d73a: c3 ret 00111a60 : ((IMFS_jnode_t *)( rtems_chain_head( jnode_get_control( jnode ) )->next)) int IMFS_fsunmount( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { 111a60: 55 push %ebp 111a61: 89 e5 mov %esp,%ebp 111a63: 57 push %edi 111a64: 56 push %esi 111a65: 53 push %ebx 111a66: 83 ec 2c sub $0x2c,%esp 111a69: 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; 111a6c: 8b 58 1c mov 0x1c(%eax),%ebx loc = temp_mt_entry->mt_fs_root; 111a6f: 8d 7d d4 lea -0x2c(%ebp),%edi 111a72: 8d 70 1c lea 0x1c(%eax),%esi 111a75: b9 05 00 00 00 mov $0x5,%ecx 111a7a: 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; 111a7c: c7 40 1c 00 00 00 00 movl $0x0,0x1c(%eax) do { next = jnode->Parent; loc.node_access = (void *)jnode; IMFS_Set_handlers( &loc ); 111a83: 8d 75 d4 lea -0x2c(%ebp),%esi */ temp_mt_entry->mt_fs_root.node_access = NULL; do { next = jnode->Parent; 111a86: 8b 7b 08 mov 0x8(%ebx),%edi loc.node_access = (void *)jnode; 111a89: 89 5d d4 mov %ebx,-0x2c(%ebp) IMFS_Set_handlers( &loc ); 111a8c: 83 ec 0c sub $0xc,%esp 111a8f: 56 push %esi 111a90: e8 03 f8 ff ff call 111298 <== ALWAYS TAKEN if ( jnode->type != IMFS_DIRECTORY ) { 111a95: 83 c4 10 add $0x10,%esp 111a98: 83 7b 4c 01 cmpl $0x1,0x4c(%ebx) 111a9c: 75 08 jne 111aa6 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 111a9e: 8d 43 54 lea 0x54(%ebx),%eax 111aa1: 39 43 50 cmp %eax,0x50(%ebx) 111aa4: 75 13 jne 111ab9 result = IMFS_unlink( NULL, &loc ); if (result != 0) return -1; jnode = next; } else if ( jnode_has_no_children( jnode ) ) { result = IMFS_unlink( NULL, &loc ); 111aa6: 50 push %eax 111aa7: 50 push %eax 111aa8: 56 push %esi 111aa9: 6a 00 push $0x0 111aab: e8 b0 62 ff ff call 107d60 if (result != 0) 111ab0: 83 c4 10 add $0x10,%esp 111ab3: 85 c0 test %eax,%eax 111ab5: 75 1d jne 111ad4 <== ALWAYS TAKEN 111ab7: 89 fb mov %edi,%ebx return -1; jnode = next; } if ( jnode != NULL ) { 111ab9: 85 db test %ebx,%ebx 111abb: 74 1c je 111ad9 if ( jnode->type == IMFS_DIRECTORY ) { 111abd: 83 7b 4c 01 cmpl $0x1,0x4c(%ebx) 111ac1: 75 c3 jne 111a86 <== ALWAYS TAKEN 111ac3: 8d 43 54 lea 0x54(%ebx),%eax 111ac6: 39 43 50 cmp %eax,0x50(%ebx) 111ac9: 74 bb je 111a86 if ( jnode_has_children( jnode ) ) jnode = jnode_get_first_child( jnode ); 111acb: 8b 5b 50 mov 0x50(%ebx),%ebx } } } while (jnode != NULL); 111ace: 85 db test %ebx,%ebx 111ad0: 75 b4 jne 111a86 <== NEVER TAKEN 111ad2: eb 05 jmp 111ad9 <== NOT EXECUTED 111ad4: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 111ad7: eb 02 jmp 111adb <== NOT EXECUTED 111ad9: 31 c0 xor %eax,%eax return 0; } 111adb: 8d 65 f4 lea -0xc(%ebp),%esp 111ade: 5b pop %ebx 111adf: 5e pop %esi 111ae0: 5f pop %edi 111ae1: c9 leave 111ae2: c3 ret 0010d73c : const char *path, int pathlen, char *token, int *token_len ) { 10d73c: 55 push %ebp 10d73d: 89 e5 mov %esp,%ebp 10d73f: 56 push %esi 10d740: 53 push %ebx 10d741: 8b 5d 08 mov 0x8(%ebp),%ebx 10d744: 8b 4d 0c mov 0xc(%ebp),%ecx 10d747: 8b 75 10 mov 0x10(%ebp),%esi register char c; /* * Copy a name into token. (Remember NULL is a token.) */ c = path[i]; 10d74a: 8a 13 mov (%ebx),%dl 10d74c: 31 c0 xor %eax,%eax while ( (!IMFS_is_separator(c)) && (i < pathlen) && (i <= IMFS_NAME_MAX) ) { 10d74e: eb 13 jmp 10d763 <== ALWAYS TAKEN token[i] = c; 10d750: 88 14 06 mov %dl,(%esi,%eax,1) if ( i == IMFS_NAME_MAX ) 10d753: 83 f8 20 cmp $0x20,%eax 10d756: 75 07 jne 10d75f 10d758: bb 04 00 00 00 mov $0x4,%ebx 10d75d: eb 7c jmp 10d7db <== ALWAYS TAKEN return IMFS_INVALID_TOKEN; if ( !IMFS_is_valid_name_char(c) ) type = IMFS_INVALID_TOKEN; c = path [++i]; 10d75f: 40 inc %eax 10d760: 8a 14 03 mov (%ebx,%eax,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) ) { 10d763: 80 fa 5c cmp $0x5c,%dl 10d766: 74 0d je 10d775 10d768: 80 fa 2f cmp $0x2f,%dl 10d76b: 74 08 je 10d775 10d76d: 39 c8 cmp %ecx,%eax 10d76f: 7d 04 jge 10d775 10d771: 84 d2 test %dl,%dl 10d773: 75 db jne 10d750 <== NEVER TAKEN /* * Copy a seperator into token. */ if ( i == 0 ) { 10d775: 85 c0 test %eax,%eax 10d777: 75 17 jne 10d790 token[i] = c; 10d779: 88 16 mov %dl,(%esi) if ( (token[i] != '\0') && pathlen ) { 10d77b: 84 d2 test %dl,%dl 10d77d: 74 0d je 10d78c 10d77f: 85 c9 test %ecx,%ecx 10d781: 74 09 je 10d78c 10d783: bb 01 00 00 00 mov $0x1,%ebx 10d788: b0 01 mov $0x1,%al 10d78a: eb 14 jmp 10d7a0 <== ALWAYS TAKEN 10d78c: 31 db xor %ebx,%ebx 10d78e: eb 10 jmp 10d7a0 <== ALWAYS TAKEN i++; type = IMFS_CURRENT_DIR; } else { type = IMFS_NO_MORE_PATH; } } else if (token[ i-1 ] != '\0') { 10d790: bb 03 00 00 00 mov $0x3,%ebx 10d795: 80 7c 06 ff 00 cmpb $0x0,-0x1(%esi,%eax,1) 10d79a: 74 04 je 10d7a0 <== ALWAYS TAKEN token[i] = '\0'; 10d79c: c6 04 06 00 movb $0x0,(%esi,%eax,1) /* * Set token_len to the number of characters copied. */ *token_len = i; 10d7a0: 8b 55 14 mov 0x14(%ebp),%edx 10d7a3: 89 02 mov %eax,(%edx) /* * If we copied something that was not a seperator see if * it was a special name. */ if ( type == IMFS_NAME ) { 10d7a5: 83 fb 03 cmp $0x3,%ebx 10d7a8: 75 31 jne 10d7db if ( strcmp( token, "..") == 0 ) 10d7aa: 52 push %edx 10d7ab: 52 push %edx 10d7ac: 68 c7 d8 11 00 push $0x11d8c7 10d7b1: 56 push %esi 10d7b2: e8 85 35 00 00 call 110d3c 10d7b7: 83 c4 10 add $0x10,%esp 10d7ba: 85 c0 test %eax,%eax 10d7bc: 75 04 jne 10d7c2 10d7be: b3 02 mov $0x2,%bl 10d7c0: eb 19 jmp 10d7db <== ALWAYS TAKEN type = IMFS_UP_DIR; else if ( strcmp( token, "." ) == 0 ) 10d7c2: 50 push %eax 10d7c3: 50 push %eax 10d7c4: 68 c8 d8 11 00 push $0x11d8c8 10d7c9: 56 push %esi 10d7ca: e8 6d 35 00 00 call 110d3c 10d7cf: 83 c4 10 add $0x10,%esp 10d7d2: 85 c0 test %eax,%eax 10d7d4: 75 05 jne 10d7db 10d7d6: bb 01 00 00 00 mov $0x1,%ebx type = IMFS_CURRENT_DIR; } return type; } 10d7db: 89 d8 mov %ebx,%eax 10d7dd: 8d 65 f8 lea -0x8(%ebp),%esp 10d7e0: 5b pop %ebx 10d7e1: 5e pop %esi 10d7e2: c9 leave 10d7e3: c3 ret 001079d0 : */ int IMFS_initialize( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { 1079d0: 55 push %ebp 1079d1: 89 e5 mov %esp,%ebp 1079d3: 83 ec 08 sub $0x8,%esp return IMFS_initialize_support( 1079d6: 68 14 22 12 00 push $0x122214 1079db: 68 84 22 12 00 push $0x122284 1079e0: 68 e8 1b 12 00 push $0x121be8 1079e5: ff 75 08 pushl 0x8(%ebp) 1079e8: e8 03 00 00 00 call 1079f0 <== ALWAYS TAKEN temp_mt_entry, &IMFS_ops, &IMFS_memfile_handlers, &IMFS_directory_handlers ); } 1079ed: c9 leave 1079ee: c3 ret 0010d7e4 : rtems_filesystem_mount_table_entry_t *temp_mt_entry, const rtems_filesystem_operations_table *op_table, const rtems_filesystem_file_handlers_r *memfile_handlers, const rtems_filesystem_file_handlers_r *directory_handlers ) { 10d7e4: 55 push %ebp 10d7e5: 89 e5 mov %esp,%ebp 10d7e7: 57 push %edi 10d7e8: 56 push %esi 10d7e9: 53 push %ebx 10d7ea: 83 ec 0c sub $0xc,%esp 10d7ed: 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, 10d7f0: 8b 0d 68 f8 11 00 mov 0x11f868,%ecx 10d7f6: 31 d2 xor %edx,%edx 10d7f8: b8 10 00 00 00 mov $0x10,%eax int bit_mask; /* * check, whether requested bytes per block is valid */ for (bit_mask = 16; !is_valid && (bit_mask <= 512); bit_mask <<= 1) { 10d7fd: 39 c8 cmp %ecx,%eax 10d7ff: 74 0d je 10d80e 10d801: d1 e0 shl %eax 10d803: 42 inc %edx 10d804: 83 fa 06 cmp $0x6,%edx 10d807: 75 f4 jne 10d7fd <== NEVER TAKEN 10d809: b8 80 00 00 00 mov $0x80,%eax <== NOT EXECUTED if (bit_mask == requested_bytes_per_block) { is_valid = true; } } *dest_bytes_per_block = ((is_valid) 10d80e: a3 14 35 12 00 mov %eax,0x123514 /* * 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(); 10d813: e8 fd 1d 00 00 call 10f615 10d818: 89 43 1c mov %eax,0x1c(%ebx) temp_mt_entry->mt_fs_root.handlers = directory_handlers; 10d81b: 8b 45 14 mov 0x14(%ebp),%eax 10d81e: 89 43 24 mov %eax,0x24(%ebx) temp_mt_entry->mt_fs_root.ops = op_table; 10d821: 8b 45 0c mov 0xc(%ebp),%eax 10d824: 89 43 28 mov %eax,0x28(%ebx) temp_mt_entry->pathconf_limits_and_options = IMFS_LIMITS_AND_OPTIONS; 10d827: 8d 7b 38 lea 0x38(%ebx),%edi 10d82a: be 24 da 11 00 mov $0x11da24,%esi 10d82f: b9 0c 00 00 00 mov $0xc,%ecx 10d834: f3 a5 rep movsl %ds:(%esi),%es:(%edi) /* * Create custom file system data. */ fs_info = calloc( 1, sizeof( IMFS_fs_info_t ) ); 10d836: 50 push %eax 10d837: 50 push %eax 10d838: 6a 0c push $0xc 10d83a: 6a 01 push $0x1 10d83c: e8 3f 02 00 00 call 10da80 <== ALWAYS TAKEN if ( !fs_info ) { 10d841: 83 c4 10 add $0x10,%esp 10d844: 85 c0 test %eax,%eax 10d846: 75 1e jne 10d866 <== NEVER TAKEN free(temp_mt_entry->mt_fs_root.node_access); 10d848: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10d84b: ff 73 1c pushl 0x1c(%ebx) <== NOT EXECUTED 10d84e: e8 dd 98 ff ff call 107130 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOMEM); 10d853: e8 f8 29 00 00 call 110250 <__errno> <== NOT EXECUTED 10d858: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED 10d85e: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 10d861: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10d864: eb 26 jmp 10d88c <== NOT EXECUTED } temp_mt_entry->fs_info = fs_info; 10d866: 89 43 34 mov %eax,0x34(%ebx) /* * Set st_ino for the root to 1. */ fs_info->ino_count = 1; 10d869: c7 00 01 00 00 00 movl $0x1,(%eax) fs_info->memfile_handlers = memfile_handlers; 10d86f: 8b 55 10 mov 0x10(%ebp),%edx 10d872: 89 50 04 mov %edx,0x4(%eax) fs_info->directory_handlers = directory_handlers; 10d875: 8b 55 14 mov 0x14(%ebp),%edx 10d878: 89 50 08 mov %edx,0x8(%eax) jnode = temp_mt_entry->mt_fs_root.node_access; jnode->st_ino = fs_info->ino_count; 10d87b: 8b 43 1c mov 0x1c(%ebx),%eax 10d87e: c7 40 38 01 00 00 00 movl $0x1,0x38(%eax) /* Initialize POSIX FIFO/pipe module */ rtems_pipe_initialize(); 10d885: e8 58 15 00 00 call 10ede2 10d88a: 31 c0 xor %eax,%eax return 0; } 10d88c: 8d 65 f4 lea -0xc(%ebp),%esp 10d88f: 5b pop %ebx 10d890: 5e pop %esi 10d891: 5f pop %edi 10d892: c9 leave 10d893: c3 ret 00107aa0 : int IMFS_link( rtems_filesystem_location_info_t *to_loc, /* IN */ rtems_filesystem_location_info_t *parent_loc, /* IN */ const char *token /* IN */ ) { 107aa0: 55 push %ebp 107aa1: 89 e5 mov %esp,%ebp 107aa3: 57 push %edi 107aa4: 53 push %ebx 107aa5: 83 ec 50 sub $0x50,%esp 107aa8: 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; 107aab: 8b 45 08 mov 0x8(%ebp),%eax 107aae: 8b 00 mov (%eax),%eax 107ab0: 89 45 d8 mov %eax,-0x28(%ebp) if ( info.hard_link.link_node->st_nlink >= LINK_MAX ) 107ab3: 66 83 78 34 07 cmpw $0x7,0x34(%eax) 107ab8: 76 0d jbe 107ac7 rtems_set_errno_and_return_minus_one( EMLINK ); 107aba: e8 65 ce 00 00 call 114924 <__errno> 107abf: c7 00 1f 00 00 00 movl $0x1f,(%eax) 107ac5: eb 43 jmp 107b0a <== ALWAYS TAKEN /* * Remove any separators at the end of the string. */ IMFS_get_token( token, strlen( token ), new_name, &i ); 107ac7: 31 c0 xor %eax,%eax 107ac9: 83 c9 ff or $0xffffffff,%ecx 107acc: 89 d7 mov %edx,%edi 107ace: f2 ae repnz scas %es:(%edi),%al 107ad0: f7 d1 not %ecx 107ad2: 49 dec %ecx 107ad3: 8d 45 f4 lea -0xc(%ebp),%eax 107ad6: 50 push %eax 107ad7: 8d 5d b7 lea -0x49(%ebp),%ebx 107ada: 53 push %ebx 107adb: 51 push %ecx 107adc: 52 push %edx 107add: e8 8e a0 00 00 call 111b70 * 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( 107ae2: 8d 45 d8 lea -0x28(%ebp),%eax 107ae5: 89 04 24 mov %eax,(%esp) 107ae8: 68 ff a1 00 00 push $0xa1ff 107aed: 53 push %ebx 107aee: 6a 03 push $0x3 107af0: ff 75 0c pushl 0xc(%ebp) 107af3: e8 a0 96 00 00 call 111198 new_name, ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if ( !new_node ) 107af8: 83 c4 20 add $0x20,%esp 107afb: 85 c0 test %eax,%eax 107afd: 75 10 jne 107b0f <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOMEM ); 107aff: e8 20 ce 00 00 call 114924 <__errno> <== NOT EXECUTED 107b04: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED 107b0a: 83 c8 ff or $0xffffffff,%eax 107b0d: eb 22 jmp 107b31 <== ALWAYS TAKEN /* * Increment the link count of the node being pointed to. */ info.hard_link.link_node->st_nlink++; 107b0f: 8b 45 d8 mov -0x28(%ebp),%eax 107b12: 66 ff 40 34 incw 0x34(%eax) IMFS_update_ctime( info.hard_link.link_node ); 107b16: 50 push %eax 107b17: 50 push %eax 107b18: 6a 00 push $0x0 107b1a: 8d 45 ec lea -0x14(%ebp),%eax 107b1d: 50 push %eax 107b1e: e8 f1 07 00 00 call 108314 107b23: 8b 55 ec mov -0x14(%ebp),%edx 107b26: 8b 45 d8 mov -0x28(%ebp),%eax 107b29: 89 50 48 mov %edx,0x48(%eax) 107b2c: 31 c0 xor %eax,%eax return 0; 107b2e: 83 c4 10 add $0x10,%esp } 107b31: 8d 65 f8 lea -0x8(%ebp),%esp 107b34: 5b pop %ebx 107b35: 5f pop %edi 107b36: c9 leave 107b37: c3 ret 00113880 : MEMFILE_STATIC int IMFS_memfile_addblock( IMFS_jnode_t *the_jnode, unsigned int block ) { 113880: 55 push %ebp 113881: 89 e5 mov %esp,%ebp 113883: 53 push %ebx 113884: 83 ec 04 sub $0x4,%esp 113887: 8b 45 08 mov 0x8(%ebp),%eax block_p memory; block_p *block_entry_ptr; assert( the_jnode ); 11388a: 85 c0 test %eax,%eax 11388c: 75 11 jne 11389f <== NEVER TAKEN 11388e: 68 6c 23 12 00 push $0x12236c <== NOT EXECUTED 113893: 68 10 25 12 00 push $0x122510 <== NOT EXECUTED 113898: 68 69 01 00 00 push $0x169 <== NOT EXECUTED 11389d: eb 15 jmp 1138b4 <== NOT EXECUTED if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 11389f: 83 78 4c 05 cmpl $0x5,0x4c(%eax) 1138a3: 74 19 je 1138be <== NEVER TAKEN 1138a5: 68 bc 23 12 00 push $0x1223bc <== NOT EXECUTED 1138aa: 68 10 25 12 00 push $0x122510 <== NOT EXECUTED 1138af: 68 6d 01 00 00 push $0x16d <== NOT EXECUTED 1138b4: 68 76 23 12 00 push $0x122376 <== NOT EXECUTED 1138b9: e8 b2 46 ff ff call 107f70 <__assert_func> <== NOT EXECUTED if ( the_jnode->type != IMFS_MEMORY_FILE ) rtems_set_errno_and_return_minus_one( EIO ); block_entry_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 1 ); 1138be: 52 push %edx 1138bf: 6a 01 push $0x1 1138c1: ff 75 0c pushl 0xc(%ebp) 1138c4: 50 push %eax 1138c5: e8 84 fb ff ff call 11344e <== ALWAYS TAKEN 1138ca: 89 c3 mov %eax,%ebx if ( *block_entry_ptr ) 1138cc: 83 c4 10 add $0x10,%esp 1138cf: 31 c0 xor %eax,%eax 1138d1: 83 3b 00 cmpl $0x0,(%ebx) 1138d4: 75 14 jne 1138ea #if 0 fprintf(stdout, "%d %p", block, block_entry_ptr ); fflush(stdout); #endif memory = memfile_alloc_block(); 1138d6: e8 51 fb ff ff call 11342c <== ALWAYS TAKEN 1138db: 89 c2 mov %eax,%edx if ( !memory ) 1138dd: b8 01 00 00 00 mov $0x1,%eax 1138e2: 85 d2 test %edx,%edx 1138e4: 74 04 je 1138ea <== ALWAYS TAKEN return 1; *block_entry_ptr = memory; 1138e6: 89 13 mov %edx,(%ebx) 1138e8: 30 c0 xor %al,%al return 0; } 1138ea: 8b 5d fc mov -0x4(%ebp),%ebx 1138ed: c9 leave 1138ee: c3 ret 001138ef : MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, off_t new_length ) { 1138ef: 55 push %ebp 1138f0: 89 e5 mov %esp,%ebp 1138f2: 57 push %edi 1138f3: 56 push %esi 1138f4: 53 push %ebx 1138f5: 83 ec 1c sub $0x1c,%esp 1138f8: 8b 5d 08 mov 0x8(%ebp),%ebx /* * Perform internal consistency checks */ assert( the_jnode ); 1138fb: 85 db test %ebx,%ebx 1138fd: 75 11 jne 113910 <== NEVER TAKEN 1138ff: 68 6c 23 12 00 push $0x12236c <== NOT EXECUTED 113904: 68 28 25 12 00 push $0x122528 <== NOT EXECUTED 113909: 68 31 01 00 00 push $0x131 <== NOT EXECUTED 11390e: eb 15 jmp 113925 <== NOT EXECUTED if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 113910: 83 7b 4c 05 cmpl $0x5,0x4c(%ebx) 113914: 74 19 je 11392f <== NEVER TAKEN 113916: 68 bc 23 12 00 push $0x1223bc <== NOT EXECUTED 11391b: 68 28 25 12 00 push $0x122528 <== NOT EXECUTED 113920: 68 35 01 00 00 push $0x135 <== NOT EXECUTED 113925: 68 76 23 12 00 push $0x122376 <== NOT EXECUTED 11392a: e8 41 46 ff ff call 107f70 <__assert_func> <== NOT EXECUTED if ( the_jnode->type != IMFS_MEMORY_FILE ) rtems_set_errno_and_return_minus_one( EIO ); if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) 11392f: 8b 0d fc 7e 12 00 mov 0x127efc,%ecx 113935: 89 ce mov %ecx,%esi 113937: c1 ee 02 shr $0x2,%esi 11393a: 8d 56 01 lea 0x1(%esi),%edx 11393d: 0f af d6 imul %esi,%edx 113940: 42 inc %edx 113941: 0f af d6 imul %esi,%edx 113944: 4a dec %edx 113945: 0f af d1 imul %ecx,%edx 113948: 39 55 0c cmp %edx,0xc(%ebp) 11394b: 72 0d jb 11395a <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); 11394d: e8 d2 0f 00 00 call 114924 <__errno> <== NOT EXECUTED 113952: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 113958: eb 66 jmp 1139c0 <== NOT EXECUTED if ( new_length <= the_jnode->info.file.size ) 11395a: 8b 45 0c mov 0xc(%ebp),%eax 11395d: 99 cltd 11395e: 89 45 e0 mov %eax,-0x20(%ebp) 113961: 89 55 e4 mov %edx,-0x1c(%ebp) 113964: 8b 73 50 mov 0x50(%ebx),%esi 113967: 8b 7b 54 mov 0x54(%ebx),%edi 11396a: 39 fa cmp %edi,%edx 11396c: 7f 06 jg 113974 <== ALWAYS TAKEN 11396e: 7c 67 jl 1139d7 <== ALWAYS TAKEN 113970: 39 f0 cmp %esi,%eax 113972: 76 63 jbe 1139d7 /* * Calculate the number of range of blocks to allocate */ new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK; 113974: 8b 45 0c mov 0xc(%ebp),%eax 113977: 99 cltd 113978: f7 f9 idiv %ecx 11397a: 89 45 dc mov %eax,-0x24(%ebp) old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; 11397d: 89 c8 mov %ecx,%eax 11397f: 99 cltd 113980: 52 push %edx 113981: 51 push %ecx 113982: 57 push %edi 113983: 56 push %esi 113984: e8 a3 bf 00 00 call 11f92c <__divdi3> 113989: 83 c4 10 add $0x10,%esp 11398c: 89 c7 mov %eax,%edi 11398e: 89 c6 mov %eax,%esi /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { 113990: eb 34 jmp 1139c6 <== ALWAYS TAKEN if ( IMFS_memfile_addblock( the_jnode, block ) ) { 113992: 50 push %eax 113993: 50 push %eax 113994: 56 push %esi 113995: 53 push %ebx 113996: e8 e5 fe ff ff call 113880 <== ALWAYS TAKEN 11399b: 83 c4 10 add $0x10,%esp 11399e: 85 c0 test %eax,%eax 1139a0: 74 23 je 1139c5 <== NEVER TAKEN 1139a2: eb 0d jmp 1139b1 <== NOT EXECUTED for ( ; block>=old_blocks ; block-- ) { IMFS_memfile_remove_block( the_jnode, block ); 1139a4: 51 push %ecx <== NOT EXECUTED 1139a5: 51 push %ecx <== NOT EXECUTED 1139a6: 56 push %esi <== NOT EXECUTED 1139a7: 53 push %ebx <== NOT EXECUTED 1139a8: e8 92 fc ff ff call 11363f <== 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-- ) { 1139ad: 4e dec %esi <== NOT EXECUTED 1139ae: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 1139b1: 39 fe cmp %edi,%esi <== NOT EXECUTED 1139b3: 73 ef jae 1139a4 <== NOT EXECUTED IMFS_memfile_remove_block( the_jnode, block ); } rtems_set_errno_and_return_minus_one( ENOSPC ); 1139b5: e8 6a 0f 00 00 call 114924 <__errno> <== NOT EXECUTED 1139ba: c7 00 1c 00 00 00 movl $0x1c,(%eax) <== NOT EXECUTED 1139c0: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 1139c3: eb 14 jmp 1139d9 <== NOT EXECUTED /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { 1139c5: 46 inc %esi 1139c6: 3b 75 dc cmp -0x24(%ebp),%esi 1139c9: 76 c7 jbe 113992 /* * Set the new length of the file. */ the_jnode->info.file.size = new_length; 1139cb: 8b 45 e0 mov -0x20(%ebp),%eax 1139ce: 8b 55 e4 mov -0x1c(%ebp),%edx 1139d1: 89 43 50 mov %eax,0x50(%ebx) 1139d4: 89 53 54 mov %edx,0x54(%ebx) 1139d7: 31 c0 xor %eax,%eax return 0; } 1139d9: 8d 65 f4 lea -0xc(%ebp),%esp 1139dc: 5b pop %ebx 1139dd: 5e pop %esi 1139de: 5f pop %edi 1139df: c9 leave 1139e0: c3 ret 0011344e : #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { 11344e: 55 push %ebp 11344f: 89 e5 mov %esp,%ebp 113451: 57 push %edi 113452: 56 push %esi 113453: 53 push %ebx 113454: 83 ec 1c sub $0x1c,%esp 113457: 8b 5d 08 mov 0x8(%ebp),%ebx 11345a: 8b 7d 0c mov 0xc(%ebp),%edi 11345d: 8b 75 10 mov 0x10(%ebp),%esi /* * Perform internal consistency checks */ assert( the_jnode ); 113460: 85 db test %ebx,%ebx 113462: 75 11 jne 113475 <== NEVER TAKEN 113464: 68 6c 23 12 00 push $0x12236c <== NOT EXECUTED 113469: 68 78 24 12 00 push $0x122478 <== NOT EXECUTED 11346e: 68 88 03 00 00 push $0x388 <== NOT EXECUTED 113473: eb 15 jmp 11348a <== NOT EXECUTED if ( !the_jnode ) return NULL; assert( the_jnode->type == IMFS_MEMORY_FILE ); 113475: 83 7b 4c 05 cmpl $0x5,0x4c(%ebx) 113479: 74 19 je 113494 <== NEVER TAKEN 11347b: 68 bc 23 12 00 push $0x1223bc <== NOT EXECUTED 113480: 68 78 24 12 00 push $0x122478 <== NOT EXECUTED 113485: 68 8c 03 00 00 push $0x38c <== NOT EXECUTED 11348a: 68 76 23 12 00 push $0x122376 <== NOT EXECUTED 11348f: e8 dc 4a ff ff call 107f70 <__assert_func> <== NOT EXECUTED /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { 113494: 8b 0d fc 7e 12 00 mov 0x127efc,%ecx 11349a: c1 e9 02 shr $0x2,%ecx 11349d: 8d 41 ff lea -0x1(%ecx),%eax 1134a0: 39 c7 cmp %eax,%edi 1134a2: 77 2f ja 1134d3 <== ALWAYS TAKEN #if 0 fprintf(stdout, "(s %d) ", block ); fflush(stdout); #endif p = info->indirect; 1134a4: 8b 53 58 mov 0x58(%ebx),%edx if ( malloc_it ) { 1134a7: 85 f6 test %esi,%esi 1134a9: 74 23 je 1134ce if ( !p ) { 1134ab: 85 d2 test %edx,%edx 1134ad: 75 10 jne 1134bf p = memfile_alloc_block(); 1134af: e8 78 ff ff ff call 11342c <== ALWAYS TAKEN if ( !p ) 1134b4: 85 c0 test %eax,%eax 1134b6: 0f 84 0f 01 00 00 je 1135cb <== ALWAYS TAKEN return 0; info->indirect = p; 1134bc: 89 43 58 mov %eax,0x58(%ebx) } return &info->indirect[ my_block ]; 1134bf: 8d 04 bd 00 00 00 00 lea 0x0(,%edi,4),%eax 1134c6: 03 43 58 add 0x58(%ebx),%eax 1134c9: e9 ff 00 00 00 jmp 1135cd <== ALWAYS TAKEN } if ( !p ) return 0; return &info->indirect[ my_block ]; 1134ce: 8d 04 ba lea (%edx,%edi,4),%eax 1134d1: eb 69 jmp 11353c <== ALWAYS TAKEN /* * Is the block number in the doubly indirect portion? */ if ( my_block <= LAST_DOUBLY_INDIRECT ) { 1134d3: 8d 41 01 lea 0x1(%ecx),%eax <== NOT EXECUTED 1134d6: 0f af c1 imul %ecx,%eax <== NOT EXECUTED 1134d9: 8d 50 ff lea -0x1(%eax),%edx <== NOT EXECUTED 1134dc: 39 d7 cmp %edx,%edi <== NOT EXECUTED 1134de: 77 69 ja 113549 <== NOT EXECUTED #if 0 fprintf(stdout, "(d %d) ", block ); fflush(stdout); #endif my_block -= FIRST_DOUBLY_INDIRECT; 1134e0: 29 cf sub %ecx,%edi <== NOT EXECUTED singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 1134e2: 89 f8 mov %edi,%eax <== NOT EXECUTED 1134e4: 31 d2 xor %edx,%edx <== NOT EXECUTED 1134e6: f7 f1 div %ecx <== NOT EXECUTED 1134e8: 89 55 e4 mov %edx,-0x1c(%ebp) <== NOT EXECUTED 1134eb: 89 c7 mov %eax,%edi <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; p = info->doubly_indirect; 1134ed: 8b 43 5c mov 0x5c(%ebx),%eax <== NOT EXECUTED if ( malloc_it ) { 1134f0: 85 f6 test %esi,%esi <== NOT EXECUTED 1134f2: 74 37 je 11352b <== NOT EXECUTED if ( !p ) { 1134f4: 85 c0 test %eax,%eax <== NOT EXECUTED 1134f6: 75 10 jne 113508 <== NOT EXECUTED p = memfile_alloc_block(); 1134f8: e8 2f ff ff ff call 11342c <== NOT EXECUTED if ( !p ) 1134fd: 85 c0 test %eax,%eax <== NOT EXECUTED 1134ff: 0f 84 c6 00 00 00 je 1135cb <== NOT EXECUTED return 0; info->doubly_indirect = p; 113505: 89 43 5c mov %eax,0x5c(%ebx) <== NOT EXECUTED } p1 = (block_p *)p[ doubly ]; 113508: 8d 1c b8 lea (%eax,%edi,4),%ebx <== NOT EXECUTED 11350b: 8b 03 mov (%ebx),%eax <== NOT EXECUTED if ( !p1 ) { 11350d: 85 c0 test %eax,%eax <== NOT EXECUTED 11350f: 75 0f jne 113520 <== NOT EXECUTED p1 = memfile_alloc_block(); 113511: e8 16 ff ff ff call 11342c <== NOT EXECUTED if ( !p1 ) 113516: 85 c0 test %eax,%eax <== NOT EXECUTED 113518: 0f 84 ad 00 00 00 je 1135cb <== NOT EXECUTED return 0; p[ doubly ] = (block_p) p1; 11351e: 89 03 mov %eax,(%ebx) <== NOT EXECUTED } return (block_p *)&p1[ singly ]; 113520: 8b 4d e4 mov -0x1c(%ebp),%ecx <== NOT EXECUTED 113523: 8d 04 88 lea (%eax,%ecx,4),%eax <== NOT EXECUTED 113526: e9 a2 00 00 00 jmp 1135cd <== NOT EXECUTED } if ( !p ) 11352b: 85 c0 test %eax,%eax <== NOT EXECUTED 11352d: 0f 84 98 00 00 00 je 1135cb <== NOT EXECUTED return 0; p = (block_p *)p[ doubly ]; 113533: 8b 14 b8 mov (%eax,%edi,4),%edx <== NOT EXECUTED #if 0 fprintf(stdout, "(d %d %d %d %d %p %p) ", block, my_block, doubly, singly, p, &p[singly] ); fflush(stdout); #endif return (block_p *)&p[ singly ]; 113536: 8b 4d e4 mov -0x1c(%ebp),%ecx <== NOT EXECUTED 113539: 8d 04 8a lea (%edx,%ecx,4),%eax <== NOT EXECUTED if ( !p ) return 0; p = (block_p *)p[ doubly ]; if ( !p ) 11353c: 85 d2 test %edx,%edx 11353e: 0f 85 89 00 00 00 jne 1135cd <== NEVER TAKEN 113544: e9 82 00 00 00 jmp 1135cb <== NOT EXECUTED #endif /* * Is the block number in the triply indirect portion? */ if ( my_block <= LAST_TRIPLY_INDIRECT ) { 113549: 8d 50 01 lea 0x1(%eax),%edx <== NOT EXECUTED 11354c: 0f af d1 imul %ecx,%edx <== NOT EXECUTED 11354f: 4a dec %edx <== NOT EXECUTED 113550: 39 d7 cmp %edx,%edi <== NOT EXECUTED 113552: 77 77 ja 1135cb <== NOT EXECUTED my_block -= FIRST_TRIPLY_INDIRECT; 113554: 29 c7 sub %eax,%edi <== NOT EXECUTED 113556: 89 f8 mov %edi,%eax <== NOT EXECUTED singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 113558: 31 d2 xor %edx,%edx <== NOT EXECUTED 11355a: f7 f1 div %ecx <== NOT EXECUTED 11355c: 89 55 e4 mov %edx,-0x1c(%ebp) <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS; 11355f: 31 d2 xor %edx,%edx <== NOT EXECUTED 113561: f7 f1 div %ecx <== NOT EXECUTED 113563: 89 55 e0 mov %edx,-0x20(%ebp) <== NOT EXECUTED 113566: 89 c7 mov %eax,%edi <== NOT EXECUTED doubly %= IMFS_MEMFILE_BLOCK_SLOTS; p = info->triply_indirect; 113568: 8b 43 60 mov 0x60(%ebx),%eax <== NOT EXECUTED if ( malloc_it ) { 11356b: 85 f6 test %esi,%esi <== NOT EXECUTED 11356d: 74 43 je 1135b2 <== NOT EXECUTED if ( !p ) { 11356f: 85 c0 test %eax,%eax <== NOT EXECUTED 113571: 75 0c jne 11357f <== NOT EXECUTED p = memfile_alloc_block(); 113573: e8 b4 fe ff ff call 11342c <== NOT EXECUTED if ( !p ) 113578: 85 c0 test %eax,%eax <== NOT EXECUTED 11357a: 74 4f je 1135cb <== NOT EXECUTED return 0; info->triply_indirect = p; 11357c: 89 43 60 mov %eax,0x60(%ebx) <== NOT EXECUTED } p1 = (block_p *) p[ triply ]; 11357f: 8d 1c b8 lea (%eax,%edi,4),%ebx <== NOT EXECUTED 113582: 8b 03 mov (%ebx),%eax <== NOT EXECUTED if ( !p1 ) { 113584: 85 c0 test %eax,%eax <== NOT EXECUTED 113586: 75 0b jne 113593 <== NOT EXECUTED p1 = memfile_alloc_block(); 113588: e8 9f fe ff ff call 11342c <== NOT EXECUTED if ( !p1 ) 11358d: 85 c0 test %eax,%eax <== NOT EXECUTED 11358f: 74 3a je 1135cb <== NOT EXECUTED return 0; p[ triply ] = (block_p) p1; 113591: 89 03 mov %eax,(%ebx) <== NOT EXECUTED } p2 = (block_p *)p1[ doubly ]; 113593: 8b 4d e0 mov -0x20(%ebp),%ecx <== NOT EXECUTED 113596: 8d 1c 88 lea (%eax,%ecx,4),%ebx <== NOT EXECUTED 113599: 8b 03 mov (%ebx),%eax <== NOT EXECUTED if ( !p2 ) { 11359b: 85 c0 test %eax,%eax <== NOT EXECUTED 11359d: 75 0b jne 1135aa <== NOT EXECUTED p2 = memfile_alloc_block(); 11359f: e8 88 fe ff ff call 11342c <== NOT EXECUTED if ( !p2 ) 1135a4: 85 c0 test %eax,%eax <== NOT EXECUTED 1135a6: 74 23 je 1135cb <== NOT EXECUTED return 0; p1[ doubly ] = (block_p) p2; 1135a8: 89 03 mov %eax,(%ebx) <== NOT EXECUTED } return (block_p *)&p2[ singly ]; 1135aa: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED 1135ad: 8d 04 90 lea (%eax,%edx,4),%eax <== NOT EXECUTED 1135b0: eb 1b jmp 1135cd <== NOT EXECUTED } if ( !p ) 1135b2: 85 c0 test %eax,%eax <== NOT EXECUTED 1135b4: 74 15 je 1135cb <== NOT EXECUTED #if 0 fprintf(stdout, "(t %d %d %d %d %d) ", block, my_block, triply, doubly, singly ); fflush(stdout); #endif p1 = (block_p *) p[ triply ]; 1135b6: 8b 14 b8 mov (%eax,%edi,4),%edx <== NOT EXECUTED if ( !p1 ) 1135b9: 85 d2 test %edx,%edx <== NOT EXECUTED 1135bb: 74 0e je 1135cb <== NOT EXECUTED p2 = (block_p *)p1[ doubly ]; if ( !p ) return 0; return (block_p *)&p2[ singly ]; 1135bd: 8b 45 e4 mov -0x1c(%ebp),%eax <== NOT EXECUTED 1135c0: c1 e0 02 shl $0x2,%eax <== NOT EXECUTED 1135c3: 8b 4d e0 mov -0x20(%ebp),%ecx <== NOT EXECUTED 1135c6: 03 04 8a add (%edx,%ecx,4),%eax <== NOT EXECUTED 1135c9: eb 02 jmp 1135cd <== NOT EXECUTED 1135cb: 31 c0 xor %eax,%eax <== NOT EXECUTED /* * This means the requested block number is out of range. */ return 0; } 1135cd: 8d 65 f4 lea -0xc(%ebp),%esp 1135d0: 5b pop %ebx 1135d1: 5e pop %esi 1135d2: 5f pop %edi 1135d3: c9 leave 1135d4: c3 ret 00113d29 : IMFS_jnode_t *the_jnode, off_t start, unsigned char *destination, unsigned int length ) { 113d29: 55 push %ebp 113d2a: 89 e5 mov %esp,%ebp 113d2c: 57 push %edi 113d2d: 56 push %esi 113d2e: 53 push %ebx 113d2f: 83 ec 3c sub $0x3c,%esp /* * Perform internal consistency checks */ assert( the_jnode ); 113d32: 83 7d 08 00 cmpl $0x0,0x8(%ebp) 113d36: 75 11 jne 113d49 <== NEVER TAKEN 113d38: 68 6c 23 12 00 push $0x12236c <== NOT EXECUTED 113d3d: 68 ac 24 12 00 push $0x1224ac <== NOT EXECUTED 113d42: 68 4c 02 00 00 push $0x24c <== NOT EXECUTED 113d47: eb 1d jmp 113d66 <== NOT EXECUTED if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE || 113d49: 8b 45 08 mov 0x8(%ebp),%eax 113d4c: 8b 48 4c mov 0x4c(%eax),%ecx 113d4f: 8d 59 fb lea -0x5(%ecx),%ebx 113d52: 83 fb 01 cmp $0x1,%ebx 113d55: 76 19 jbe 113d70 <== NEVER TAKEN 113d57: 68 26 24 12 00 push $0x122426 <== NOT EXECUTED 113d5c: 68 ac 24 12 00 push $0x1224ac <== NOT EXECUTED 113d61: 68 51 02 00 00 push $0x251 <== NOT EXECUTED 113d66: 68 76 23 12 00 push $0x122376 <== NOT EXECUTED 113d6b: e8 00 42 ff ff call 107f70 <__assert_func> <== NOT EXECUTED /* * Error checks on arguments */ assert( dest ); 113d70: 83 7d 10 00 cmpl $0x0,0x10(%ebp) 113d74: 75 11 jne 113d87 <== NEVER TAKEN 113d76: 68 71 24 12 00 push $0x122471 <== NOT EXECUTED 113d7b: 68 ac 24 12 00 push $0x1224ac <== NOT EXECUTED 113d80: 68 5a 02 00 00 push $0x25a <== NOT EXECUTED 113d85: eb df jmp 113d66 <== NOT EXECUTED /* * If there is nothing to read, then quick exit. */ my_length = length; if ( !my_length ) 113d87: 83 7d 14 00 cmpl $0x0,0x14(%ebp) 113d8b: 75 13 jne 113da0 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); 113d8d: e8 92 0b 00 00 call 114924 <__errno> <== NOT EXECUTED 113d92: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 113d98: 83 cb ff or $0xffffffff,%ebx <== NOT EXECUTED 113d9b: e9 a3 01 00 00 jmp 113f43 <== NOT EXECUTED /* * Linear files (as created from a tar file are easier to handle * than block files). */ if (the_jnode->type == IMFS_LINEAR_FILE) { 113da0: 83 f9 06 cmp $0x6,%ecx 113da3: 75 64 jne 113e09 <== NEVER TAKEN unsigned char *file_ptr; file_ptr = (unsigned char *)the_jnode->info.linearfile.direct; 113da5: 8b 55 08 mov 0x8(%ebp),%edx <== NOT EXECUTED 113da8: 8b 7a 58 mov 0x58(%edx),%edi <== NOT EXECUTED if (my_length > (the_jnode->info.linearfile.size - start)) 113dab: 8b 5a 50 mov 0x50(%edx),%ebx <== NOT EXECUTED 113dae: 8b 72 54 mov 0x54(%edx),%esi <== NOT EXECUTED 113db1: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED 113db4: 99 cltd <== NOT EXECUTED 113db5: 89 45 d0 mov %eax,-0x30(%ebp) <== NOT EXECUTED 113db8: 89 55 d4 mov %edx,-0x2c(%ebp) <== NOT EXECUTED 113dbb: 89 da mov %ebx,%edx <== NOT EXECUTED 113dbd: 89 f1 mov %esi,%ecx <== NOT EXECUTED 113dbf: 2b 55 d0 sub -0x30(%ebp),%edx <== NOT EXECUTED 113dc2: 1b 4d d4 sbb -0x2c(%ebp),%ecx <== NOT EXECUTED 113dc5: 89 55 d0 mov %edx,-0x30(%ebp) <== NOT EXECUTED 113dc8: 89 4d d4 mov %ecx,-0x2c(%ebp) <== NOT EXECUTED 113dcb: 31 c9 xor %ecx,%ecx <== NOT EXECUTED 113dcd: 3b 4d d4 cmp -0x2c(%ebp),%ecx <== NOT EXECUTED 113dd0: 7f 0c jg 113dde <== NOT EXECUTED 113dd2: 7c 05 jl 113dd9 <== NOT EXECUTED 113dd4: 39 55 14 cmp %edx,0x14(%ebp) <== NOT EXECUTED 113dd7: 77 05 ja 113dde <== NOT EXECUTED 113dd9: 8b 5d 14 mov 0x14(%ebp),%ebx <== NOT EXECUTED 113ddc: eb 03 jmp 113de1 <== NOT EXECUTED my_length = the_jnode->info.linearfile.size - start; 113dde: 2b 5d 0c sub 0xc(%ebp),%ebx <== NOT EXECUTED memcpy(dest, &file_ptr[start], my_length); 113de1: 8b 4d 0c mov 0xc(%ebp),%ecx <== NOT EXECUTED 113de4: 8d 34 0f lea (%edi,%ecx,1),%esi <== NOT EXECUTED 113de7: 8b 7d 10 mov 0x10(%ebp),%edi <== NOT EXECUTED 113dea: 89 d9 mov %ebx,%ecx <== NOT EXECUTED 113dec: f3 a4 rep movsb %ds:(%esi),%es:(%edi) <== NOT EXECUTED IMFS_update_atime( the_jnode ); 113dee: 51 push %ecx <== NOT EXECUTED 113def: 51 push %ecx <== NOT EXECUTED 113df0: 6a 00 push $0x0 <== NOT EXECUTED 113df2: 8d 45 e0 lea -0x20(%ebp),%eax <== NOT EXECUTED 113df5: 50 push %eax <== NOT EXECUTED 113df6: e8 19 45 ff ff call 108314 <== NOT EXECUTED 113dfb: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED 113dfe: 8b 7d 08 mov 0x8(%ebp),%edi <== NOT EXECUTED 113e01: 89 47 40 mov %eax,0x40(%edi) <== NOT EXECUTED 113e04: e9 37 01 00 00 jmp 113f40 <== NOT EXECUTED * If the last byte we are supposed to read is past the end of this * in memory file, then shorten the length to read. */ last_byte = start + length; if ( last_byte > the_jnode->info.file.size ) 113e09: 8b 45 08 mov 0x8(%ebp),%eax 113e0c: 8b 58 50 mov 0x50(%eax),%ebx 113e0f: 8b 4d 14 mov 0x14(%ebp),%ecx 113e12: 03 4d 0c add 0xc(%ebp),%ecx 113e15: 31 f6 xor %esi,%esi 113e17: 3b 70 54 cmp 0x54(%eax),%esi 113e1a: 7f 0e jg 113e2a <== ALWAYS TAKEN 113e1c: 7c 04 jl 113e22 <== ALWAYS TAKEN 113e1e: 39 d9 cmp %ebx,%ecx 113e20: 77 08 ja 113e2a <== NEVER TAKEN 113e22: 8b 55 14 mov 0x14(%ebp),%edx <== NOT EXECUTED 113e25: 89 55 d0 mov %edx,-0x30(%ebp) <== NOT EXECUTED 113e28: eb 06 jmp 113e30 <== NOT EXECUTED my_length = the_jnode->info.file.size - start; 113e2a: 2b 5d 0c sub 0xc(%ebp),%ebx 113e2d: 89 5d d0 mov %ebx,-0x30(%ebp) /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 113e30: 8b 1d fc 7e 12 00 mov 0x127efc,%ebx 113e36: 8b 45 0c mov 0xc(%ebp),%eax 113e39: 99 cltd 113e3a: f7 fb idiv %ebx 113e3c: 89 d6 mov %edx,%esi 113e3e: 89 45 c4 mov %eax,-0x3c(%ebp) block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 113e41: 89 c2 mov %eax,%edx if ( start_offset ) { 113e43: 85 f6 test %esi,%esi 113e45: 75 0a jne 113e51 113e47: 8b 4d 10 mov 0x10(%ebp),%ecx 113e4a: 89 4d c8 mov %ecx,-0x38(%ebp) 113e4d: 31 db xor %ebx,%ebx 113e4f: eb 49 jmp 113e9a <== ALWAYS TAKEN 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 ); 113e51: 52 push %edx 113e52: 6a 00 push $0x0 113e54: ff 75 c4 pushl -0x3c(%ebp) 113e57: ff 75 08 pushl 0x8(%ebp) 113e5a: e8 ef f5 ff ff call 11344e <== ALWAYS TAKEN assert( block_ptr ); 113e5f: 83 c4 10 add $0x10,%esp 113e62: 85 c0 test %eax,%eax 113e64: 75 14 jne 113e7a <== NEVER TAKEN 113e66: 68 ec 23 12 00 push $0x1223ec <== NOT EXECUTED 113e6b: 68 ac 24 12 00 push $0x1224ac <== NOT EXECUTED 113e70: 68 96 02 00 00 push $0x296 <== NOT EXECUTED 113e75: e9 ec fe ff ff jmp 113d66 <== NOT EXECUTED */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; if ( start_offset ) { to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset; 113e7a: 89 da mov %ebx,%edx 113e7c: 29 f2 sub %esi,%edx 113e7e: 8b 5d d0 mov -0x30(%ebp),%ebx 113e81: 39 d3 cmp %edx,%ebx 113e83: 76 02 jbe 113e87 113e85: 89 d3 mov %edx,%ebx to_copy = my_length; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr ); if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ start_offset ], to_copy ); 113e87: 03 30 add (%eax),%esi dest += to_copy; 113e89: 8b 7d 10 mov 0x10(%ebp),%edi 113e8c: 89 d9 mov %ebx,%ecx 113e8e: f3 a4 rep movsb %ds:(%esi),%es:(%edi) 113e90: 89 7d c8 mov %edi,-0x38(%ebp) block++; 113e93: 8b 55 c4 mov -0x3c(%ebp),%edx 113e96: 42 inc %edx my_length -= to_copy; 113e97: 29 5d d0 sub %ebx,-0x30(%ebp) /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; 113e9a: a1 fc 7e 12 00 mov 0x127efc,%eax 113e9f: 89 45 cc mov %eax,-0x34(%ebp) while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 113ea2: eb 43 jmp 113ee7 <== ALWAYS TAKEN block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 113ea4: 50 push %eax 113ea5: 6a 00 push $0x0 113ea7: 52 push %edx 113ea8: ff 75 08 pushl 0x8(%ebp) 113eab: 89 55 c0 mov %edx,-0x40(%ebp) 113eae: e8 9b f5 ff ff call 11344e <== ALWAYS TAKEN assert( block_ptr ); 113eb3: 83 c4 10 add $0x10,%esp 113eb6: 85 c0 test %eax,%eax 113eb8: 8b 55 c0 mov -0x40(%ebp),%edx 113ebb: 75 14 jne 113ed1 <== NEVER TAKEN 113ebd: 68 ec 23 12 00 push $0x1223ec <== NOT EXECUTED 113ec2: 68 ac 24 12 00 push $0x1224ac <== NOT EXECUTED 113ec7: 68 a7 02 00 00 push $0x2a7 <== NOT EXECUTED 113ecc: e9 95 fe ff ff jmp 113d66 <== NOT EXECUTED if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); 113ed1: 8b 30 mov (%eax),%esi 113ed3: 8b 7d c8 mov -0x38(%ebp),%edi 113ed6: 8b 4d cc mov -0x34(%ebp),%ecx 113ed9: f3 a4 rep movsb %ds:(%esi),%es:(%edi) dest += to_copy; 113edb: 89 7d c8 mov %edi,-0x38(%ebp) block++; 113ede: 42 inc %edx my_length -= to_copy; 113edf: 8b 4d cc mov -0x34(%ebp),%ecx 113ee2: 29 4d d0 sub %ecx,-0x30(%ebp) copied += to_copy; 113ee5: 01 cb add %ecx,%ebx /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 113ee7: 8b 7d d0 mov -0x30(%ebp),%edi 113eea: 3b 3d fc 7e 12 00 cmp 0x127efc,%edi 113ef0: 73 b2 jae 113ea4 * Phase 3: possibly the first part of one block */ assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); if ( my_length ) { 113ef2: 85 ff test %edi,%edi 113ef4: 74 34 je 113f2a block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 113ef6: 57 push %edi 113ef7: 6a 00 push $0x0 113ef9: 52 push %edx 113efa: ff 75 08 pushl 0x8(%ebp) 113efd: e8 4c f5 ff ff call 11344e <== ALWAYS TAKEN assert( block_ptr ); 113f02: 83 c4 10 add $0x10,%esp 113f05: 85 c0 test %eax,%eax 113f07: 75 14 jne 113f1d <== NEVER TAKEN 113f09: 68 ec 23 12 00 push $0x1223ec <== NOT EXECUTED 113f0e: 68 ac 24 12 00 push $0x1224ac <== NOT EXECUTED 113f13: 68 b9 02 00 00 push $0x2b9 <== NOT EXECUTED 113f18: e9 49 fe ff ff jmp 113d66 <== NOT EXECUTED if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], my_length ); 113f1d: 8b 30 mov (%eax),%esi 113f1f: 8b 7d c8 mov -0x38(%ebp),%edi 113f22: 8b 4d d0 mov -0x30(%ebp),%ecx 113f25: f3 a4 rep movsb %ds:(%esi),%es:(%edi) copied += my_length; 113f27: 03 5d d0 add -0x30(%ebp),%ebx } IMFS_update_atime( the_jnode ); 113f2a: 56 push %esi 113f2b: 56 push %esi 113f2c: 6a 00 push $0x0 113f2e: 8d 45 e0 lea -0x20(%ebp),%eax 113f31: 50 push %eax 113f32: e8 dd 43 ff ff call 108314 113f37: 8b 45 e0 mov -0x20(%ebp),%eax 113f3a: 8b 55 08 mov 0x8(%ebp),%edx 113f3d: 89 42 40 mov %eax,0x40(%edx) return copied; 113f40: 83 c4 10 add $0x10,%esp } 113f43: 89 d8 mov %ebx,%eax 113f45: 8d 65 f4 lea -0xc(%ebp),%esp 113f48: 5b pop %ebx 113f49: 5e pop %esi 113f4a: 5f pop %edi 113f4b: c9 leave 113f4c: c3 ret 0011368a : */ int IMFS_memfile_remove( IMFS_jnode_t *the_jnode ) { 11368a: 55 push %ebp 11368b: 89 e5 mov %esp,%ebp 11368d: 57 push %edi 11368e: 56 push %esi 11368f: 53 push %ebx 113690: 83 ec 1c sub $0x1c,%esp 113693: 8b 5d 08 mov 0x8(%ebp),%ebx /* * Perform internal consistency checks */ assert( the_jnode ); 113696: 85 db test %ebx,%ebx 113698: 75 11 jne 1136ab <== NEVER TAKEN 11369a: 68 6c 23 12 00 push $0x12236c <== NOT EXECUTED 11369f: 68 c0 24 12 00 push $0x1224c0 <== NOT EXECUTED 1136a4: 68 ee 01 00 00 push $0x1ee <== NOT EXECUTED 1136a9: eb 15 jmp 1136c0 <== NOT EXECUTED if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 1136ab: 83 7b 4c 05 cmpl $0x5,0x4c(%ebx) 1136af: 74 19 je 1136ca <== NEVER TAKEN 1136b1: 68 bc 23 12 00 push $0x1223bc <== NOT EXECUTED 1136b6: 68 c0 24 12 00 push $0x1224c0 <== NOT EXECUTED 1136bb: 68 f2 01 00 00 push $0x1f2 <== NOT EXECUTED 1136c0: 68 76 23 12 00 push $0x122376 <== NOT EXECUTED 1136c5: e8 a6 48 ff ff call 107f70 <__assert_func> <== NOT EXECUTED /* * 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; 1136ca: 8b 35 fc 7e 12 00 mov 0x127efc,%esi 1136d0: c1 ee 02 shr $0x2,%esi * + indirect * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; 1136d3: 83 7b 58 00 cmpl $0x0,0x58(%ebx) 1136d7: 74 0f je 1136e8 if ( info->indirect ) { memfile_free_blocks_in_table( &info->indirect, to_free ); 1136d9: 57 push %edi 1136da: 57 push %edi 1136db: 56 push %esi 1136dc: 8d 43 58 lea 0x58(%ebx),%eax 1136df: 50 push %eax 1136e0: e8 f0 fe ff ff call 1135d5 <== ALWAYS TAKEN 1136e5: 83 c4 10 add $0x10,%esp * + indirect * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; 1136e8: 31 ff xor %edi,%edi 1136ea: 83 7b 5c 00 cmpl $0x0,0x5c(%ebx) 1136ee: 75 21 jne 113711 <== ALWAYS TAKEN 1136f0: eb 3a jmp 11372c <== ALWAYS TAKEN } if ( info->doubly_indirect ) { for ( i=0 ; idoubly_indirect[i] ) { 1136f2: 8b 43 5c mov 0x5c(%ebx),%eax <== NOT EXECUTED 1136f5: 8d 14 bd 00 00 00 00 lea 0x0(,%edi,4),%edx <== NOT EXECUTED 1136fc: 83 3c b8 00 cmpl $0x0,(%eax,%edi,4) <== NOT EXECUTED 113700: 74 0e je 113710 <== NOT EXECUTED memfile_free_blocks_in_table( 113702: 51 push %ecx <== NOT EXECUTED 113703: 51 push %ecx <== NOT EXECUTED 113704: 56 push %esi <== NOT EXECUTED 113705: 01 d0 add %edx,%eax <== NOT EXECUTED 113707: 50 push %eax <== NOT EXECUTED 113708: e8 c8 fe ff ff call 1135d5 <== NOT EXECUTED 11370d: 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 ); 11371d: 57 push %edi <== NOT EXECUTED 11371e: 57 push %edi <== NOT EXECUTED 11371f: 56 push %esi <== NOT EXECUTED 113720: 8d 43 5c lea 0x5c(%ebx),%eax <== NOT EXECUTED 113723: 50 push %eax <== NOT EXECUTED 113724: e8 ac fe ff ff call 1135d5 <== NOT EXECUTED 113729: 83 c4 10 add $0x10,%esp <== NOT EXECUTED * + indirect * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; 11372c: 31 ff xor %edi,%edi 11372e: 83 7b 60 00 cmpl $0x0,0x60(%ebx) 113732: 75 5b jne 11378f <== ALWAYS TAKEN 113734: eb 74 jmp 1137aa <== ALWAYS TAKEN 113736: 8d 04 bd 00 00 00 00 lea 0x0(,%edi,4),%eax <== NOT EXECUTED 11373d: 89 45 e4 mov %eax,-0x1c(%ebp) <== NOT EXECUTED } if ( info->triply_indirect ) { for ( i=0 ; itriply_indirect[i]; 113740: 8b 43 60 mov 0x60(%ebx),%eax <== NOT EXECUTED 113743: 8b 04 b8 mov (%eax,%edi,4),%eax <== NOT EXECUTED if ( !p ) /* ensure we have a valid pointer */ 113746: 85 c0 test %eax,%eax <== NOT EXECUTED 113748: 74 51 je 11379b <== NOT EXECUTED 11374a: 31 d2 xor %edx,%edx <== NOT EXECUTED 11374c: eb 21 jmp 11376f <== NOT EXECUTED break; for ( j=0 ; j <== NOT EXECUTED memfile_free_blocks_in_table( (block_p **)&p[j], to_free); 113753: 51 push %ecx <== NOT EXECUTED 113754: 51 push %ecx <== NOT EXECUTED 113755: 56 push %esi <== NOT EXECUTED 113756: 50 push %eax <== NOT EXECUTED 113757: 89 45 e0 mov %eax,-0x20(%ebp) <== NOT EXECUTED 11375a: 89 55 dc mov %edx,-0x24(%ebp) <== NOT EXECUTED 11375d: e8 73 fe ff ff call 1135d5 <== NOT EXECUTED 113762: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 113765: 8b 55 dc mov -0x24(%ebp),%edx <== NOT EXECUTED 113768: 8b 45 e0 mov -0x20(%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( 11377c: 52 push %edx <== NOT EXECUTED 11377d: 52 push %edx <== NOT EXECUTED 11377e: 56 push %esi <== NOT EXECUTED 11377f: 8b 45 e4 mov -0x1c(%ebp),%eax <== NOT EXECUTED 113782: 03 43 60 add 0x60(%ebx),%eax <== NOT EXECUTED 113785: 50 push %eax <== NOT EXECUTED 113786: e8 4a fe ff ff call 1135d5 <== 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( 11379b: 50 push %eax <== NOT EXECUTED 11379c: 50 push %eax <== NOT EXECUTED 11379d: 56 push %esi <== NOT EXECUTED 11379e: 83 c3 60 add $0x60,%ebx <== NOT EXECUTED 1137a1: 53 push %ebx <== NOT EXECUTED 1137a2: e8 2e fe ff ff call 1135d5 <== NOT EXECUTED 1137a7: 83 c4 10 add $0x10,%esp <== NOT EXECUTED (block_p **)&info->triply_indirect, to_free ); } return 0; } 1137aa: 31 c0 xor %eax,%eax 1137ac: 8d 65 f4 lea -0xc(%ebp),%esp 1137af: 5b pop %ebx 1137b0: 5e pop %esi 1137b1: 5f pop %edi 1137b2: c9 leave 1137b3: c3 ret 0011363f : MEMFILE_STATIC int IMFS_memfile_remove_block( IMFS_jnode_t *the_jnode, unsigned int block ) { 11363f: 55 push %ebp <== NOT EXECUTED 113640: 89 e5 mov %esp,%ebp <== NOT EXECUTED 113642: 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 ); 113645: 6a 00 push $0x0 <== NOT EXECUTED 113647: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED 11364a: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED 11364d: e8 fc fd ff ff call 11344e <== NOT EXECUTED assert( block_ptr ); 113652: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 113655: 85 c0 test %eax,%eax <== NOT EXECUTED 113657: 75 19 jne 113672 <== NOT EXECUTED 113659: 68 ec 23 12 00 push $0x1223ec <== NOT EXECUTED 11365e: 68 f4 24 12 00 push $0x1224f4 <== NOT EXECUTED 113663: 68 96 01 00 00 push $0x196 <== NOT EXECUTED 113668: 68 76 23 12 00 push $0x122376 <== NOT EXECUTED 11366d: e8 fe 48 ff ff call 107f70 <__assert_func> <== NOT EXECUTED if ( block_ptr ) { ptr = *block_ptr; 113672: 8b 10 mov (%eax),%edx <== NOT EXECUTED *block_ptr = 0; 113674: c7 00 00 00 00 00 movl $0x0,(%eax) <== NOT EXECUTED memfile_free_block( ptr ); 11367a: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 11367d: 52 push %edx <== NOT EXECUTED 11367e: e8 90 fd ff ff call 113413 <== NOT EXECUTED } return 1; } 113683: b8 01 00 00 00 mov $0x1,%eax <== NOT EXECUTED 113688: c9 leave <== NOT EXECUTED 113689: c3 ret <== NOT EXECUTED 00113a9c : IMFS_jnode_t *the_jnode, off_t start, const unsigned char *source, unsigned int length ) { 113a9c: 55 push %ebp 113a9d: 89 e5 mov %esp,%ebp 113a9f: 57 push %edi 113aa0: 56 push %esi 113aa1: 53 push %ebx 113aa2: 83 ec 3c sub $0x3c,%esp 113aa5: 8b 5d 08 mov 0x8(%ebp),%ebx 113aa8: 8b 7d 0c mov 0xc(%ebp),%edi /* * Perform internal consistency checks */ assert( the_jnode ); 113aab: 85 db test %ebx,%ebx 113aad: 75 11 jne 113ac0 <== NEVER TAKEN 113aaf: 68 6c 23 12 00 push $0x12236c <== NOT EXECUTED 113ab4: 68 98 24 12 00 push $0x122498 <== NOT EXECUTED 113ab9: 68 e3 02 00 00 push $0x2e3 <== NOT EXECUTED 113abe: eb 15 jmp 113ad5 <== NOT EXECUTED if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 113ac0: 83 7b 4c 05 cmpl $0x5,0x4c(%ebx) 113ac4: 74 19 je 113adf <== NEVER TAKEN 113ac6: 68 bc 23 12 00 push $0x1223bc <== NOT EXECUTED 113acb: 68 98 24 12 00 push $0x122498 <== NOT EXECUTED 113ad0: 68 e7 02 00 00 push $0x2e7 <== NOT EXECUTED 113ad5: 68 76 23 12 00 push $0x122376 <== NOT EXECUTED 113ada: e8 91 44 ff ff call 107f70 <__assert_func> <== NOT EXECUTED /* * Error check arguments */ assert( source ); 113adf: 83 7d 10 00 cmpl $0x0,0x10(%ebp) 113ae3: 75 11 jne 113af6 <== NEVER TAKEN 113ae5: 68 f6 23 12 00 push $0x1223f6 <== NOT EXECUTED 113aea: 68 98 24 12 00 push $0x122498 <== NOT EXECUTED 113aef: 68 ef 02 00 00 push $0x2ef <== NOT EXECUTED 113af4: eb df jmp 113ad5 <== NOT EXECUTED /* * If there is nothing to write, then quick exit. */ my_length = length; if ( !my_length ) 113af6: 83 7d 14 00 cmpl $0x0,0x14(%ebp) 113afa: 75 0d jne 113b09 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); 113afc: e8 23 0e 00 00 call 114924 <__errno> <== NOT EXECUTED 113b01: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 113b07: eb 2e jmp 113b37 <== 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; 113b09: 8b 45 14 mov 0x14(%ebp),%eax 113b0c: 01 f8 add %edi,%eax if ( last_byte > the_jnode->info.file.size ) { 113b0e: 31 d2 xor %edx,%edx 113b10: 3b 53 54 cmp 0x54(%ebx),%edx 113b13: 7c 2a jl 113b3f <== ALWAYS TAKEN 113b15: 7f 05 jg 113b1c <== ALWAYS TAKEN 113b17: 3b 43 50 cmp 0x50(%ebx),%eax 113b1a: 76 23 jbe 113b3f <== ALWAYS TAKEN status = IMFS_memfile_extend( the_jnode, last_byte ); 113b1c: 51 push %ecx 113b1d: 51 push %ecx 113b1e: 50 push %eax 113b1f: 53 push %ebx 113b20: e8 ca fd ff ff call 1138ef <== ALWAYS TAKEN if ( status ) 113b25: 83 c4 10 add $0x10,%esp 113b28: 85 c0 test %eax,%eax 113b2a: 74 13 je 113b3f <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOSPC ); 113b2c: e8 f3 0d 00 00 call 114924 <__errno> <== NOT EXECUTED 113b31: c7 00 1c 00 00 00 movl $0x1c,(%eax) <== NOT EXECUTED 113b37: 83 ca ff or $0xffffffff,%edx <== NOT EXECUTED 113b3a: e9 29 01 00 00 jmp 113c68 <== NOT EXECUTED /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 113b3f: 8b 35 fc 7e 12 00 mov 0x127efc,%esi 113b45: 89 f8 mov %edi,%eax 113b47: 99 cltd 113b48: f7 fe idiv %esi 113b4a: 89 d7 mov %edx,%edi 113b4c: 89 45 c8 mov %eax,-0x38(%ebp) block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 113b4f: 89 45 cc mov %eax,-0x34(%ebp) if ( start_offset ) { 113b52: 85 d2 test %edx,%edx 113b54: 75 0d jne 113b63 113b56: 8b 75 10 mov 0x10(%ebp),%esi 113b59: 8b 45 14 mov 0x14(%ebp),%eax 113b5c: 89 45 d4 mov %eax,-0x2c(%ebp) 113b5f: 31 d2 xor %edx,%edx 113b61: eb 53 jmp 113bb6 <== ALWAYS TAKEN 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 ); 113b63: 52 push %edx 113b64: 6a 00 push $0x0 113b66: ff 75 c8 pushl -0x38(%ebp) 113b69: 53 push %ebx 113b6a: e8 df f8 ff ff call 11344e <== ALWAYS TAKEN 113b6f: 89 c2 mov %eax,%edx assert( block_ptr ); 113b71: 83 c4 10 add $0x10,%esp 113b74: 85 c0 test %eax,%eax 113b76: 75 14 jne 113b8c <== NEVER TAKEN 113b78: 68 ec 23 12 00 push $0x1223ec <== NOT EXECUTED 113b7d: 68 98 24 12 00 push $0x122498 <== NOT EXECUTED 113b82: 68 1c 03 00 00 push $0x31c <== NOT EXECUTED 113b87: e9 49 ff ff ff jmp 113ad5 <== NOT EXECUTED */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; if ( start_offset ) { to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset; 113b8c: 89 f0 mov %esi,%eax 113b8e: 29 f8 sub %edi,%eax 113b90: 3b 45 14 cmp 0x14(%ebp),%eax 113b93: 76 03 jbe 113b98 <== ALWAYS TAKEN 113b95: 8b 45 14 mov 0x14(%ebp),%eax if ( !block_ptr ) return copied; #if 0 fprintf(stdout, "write %d at %d in %d: %*s\n", to_copy, start_offset, block, to_copy, src ); #endif memcpy( &(*block_ptr)[ start_offset ], src, to_copy ); 113b98: 8b 12 mov (%edx),%edx 113b9a: 01 fa add %edi,%edx src += to_copy; 113b9c: 89 d7 mov %edx,%edi 113b9e: 8b 75 10 mov 0x10(%ebp),%esi 113ba1: 89 c1 mov %eax,%ecx 113ba3: f3 a4 rep movsb %ds:(%esi),%es:(%edi) block++; 113ba5: 8b 55 c8 mov -0x38(%ebp),%edx 113ba8: 42 inc %edx 113ba9: 89 55 cc mov %edx,-0x34(%ebp) my_length -= to_copy; 113bac: 8b 55 14 mov 0x14(%ebp),%edx 113baf: 29 c2 sub %eax,%edx 113bb1: 89 55 d4 mov %edx,-0x2c(%ebp) copied += to_copy; 113bb4: 89 c2 mov %eax,%edx /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; 113bb6: a1 fc 7e 12 00 mov 0x127efc,%eax 113bbb: 89 45 d0 mov %eax,-0x30(%ebp) while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 113bbe: eb 41 jmp 113c01 <== ALWAYS TAKEN block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 113bc0: 50 push %eax 113bc1: 6a 00 push $0x0 113bc3: ff 75 cc pushl -0x34(%ebp) 113bc6: 53 push %ebx 113bc7: 89 55 c4 mov %edx,-0x3c(%ebp) 113bca: e8 7f f8 ff ff call 11344e <== ALWAYS TAKEN assert( block_ptr ); 113bcf: 83 c4 10 add $0x10,%esp 113bd2: 85 c0 test %eax,%eax 113bd4: 8b 55 c4 mov -0x3c(%ebp),%edx 113bd7: 75 14 jne 113bed <== NEVER TAKEN 113bd9: 68 ec 23 12 00 push $0x1223ec <== NOT EXECUTED 113bde: 68 98 24 12 00 push $0x122498 <== NOT EXECUTED 113be3: 68 30 03 00 00 push $0x330 <== NOT EXECUTED 113be8: e9 e8 fe ff ff jmp 113ad5 <== NOT EXECUTED if ( !block_ptr ) return copied; #if 0 fprintf(stdout, "write %d in %d: %*s\n", to_copy, block, to_copy, src ); #endif memcpy( &(*block_ptr)[ 0 ], src, to_copy ); 113bed: 8b 00 mov (%eax),%eax src += to_copy; 113bef: 89 c7 mov %eax,%edi 113bf1: 8b 4d d0 mov -0x30(%ebp),%ecx 113bf4: f3 a4 rep movsb %ds:(%esi),%es:(%edi) block++; 113bf6: ff 45 cc incl -0x34(%ebp) my_length -= to_copy; 113bf9: 8b 45 d0 mov -0x30(%ebp),%eax 113bfc: 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( 113bff: 01 c2 add %eax,%edx /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 113c01: 8b 45 d4 mov -0x2c(%ebp),%eax 113c04: 3b 05 fc 7e 12 00 cmp 0x127efc,%eax 113c0a: 73 b4 jae 113bc0 */ assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); to_copy = my_length; if ( my_length ) { 113c0c: 85 c0 test %eax,%eax 113c0e: 74 39 je 113c49 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 113c10: 57 push %edi 113c11: 6a 00 push $0x0 113c13: ff 75 cc pushl -0x34(%ebp) 113c16: 53 push %ebx 113c17: 89 55 c4 mov %edx,-0x3c(%ebp) 113c1a: e8 2f f8 ff ff call 11344e <== ALWAYS TAKEN assert( block_ptr ); 113c1f: 83 c4 10 add $0x10,%esp 113c22: 85 c0 test %eax,%eax 113c24: 8b 55 c4 mov -0x3c(%ebp),%edx 113c27: 75 14 jne 113c3d <== NEVER TAKEN 113c29: 68 ec 23 12 00 push $0x1223ec <== NOT EXECUTED 113c2e: 68 98 24 12 00 push $0x122498 <== NOT EXECUTED 113c33: 68 46 03 00 00 push $0x346 <== NOT EXECUTED 113c38: e9 98 fe ff ff jmp 113ad5 <== NOT EXECUTED if ( !block_ptr ) return copied; #if 0 fprintf(stdout, "write %d in %d: %*s\n", to_copy, block, to_copy, src ); #endif memcpy( &(*block_ptr)[ 0 ], src, my_length ); 113c3d: 8b 00 mov (%eax),%eax 113c3f: 89 c7 mov %eax,%edi 113c41: 8b 4d d4 mov -0x2c(%ebp),%ecx 113c44: f3 a4 rep movsb %ds:(%esi),%es:(%edi) my_length = 0; copied += to_copy; 113c46: 03 55 d4 add -0x2c(%ebp),%edx } IMFS_mtime_ctime_update( the_jnode ); 113c49: 51 push %ecx 113c4a: 51 push %ecx 113c4b: 6a 00 push $0x0 113c4d: 8d 45 e0 lea -0x20(%ebp),%eax 113c50: 50 push %eax 113c51: 89 55 c4 mov %edx,-0x3c(%ebp) 113c54: e8 bb 46 ff ff call 108314 113c59: 8b 45 e0 mov -0x20(%ebp),%eax 113c5c: 89 43 44 mov %eax,0x44(%ebx) 113c5f: 89 43 48 mov %eax,0x48(%ebx) return copied; 113c62: 83 c4 10 add $0x10,%esp 113c65: 8b 55 c4 mov -0x3c(%ebp),%edx } 113c68: 89 d0 mov %edx,%eax 113c6a: 8d 65 f4 lea -0xc(%ebp),%esp 113c6d: 5b pop %ebx 113c6e: 5e pop %esi 113c6f: 5f pop %edi 113c70: c9 leave 113c71: c3 ret 0010d894 : const char *token, /* IN */ mode_t mode, /* IN */ dev_t dev, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 10d894: 55 push %ebp 10d895: 89 e5 mov %esp,%ebp 10d897: 57 push %edi 10d898: 56 push %esi 10d899: 53 push %ebx 10d89a: 83 ec 4c sub $0x4c,%esp 10d89d: 8b 55 08 mov 0x8(%ebp),%edx 10d8a0: 8b 5d 10 mov 0x10(%ebp),%ebx 10d8a3: 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 ); 10d8a6: 31 c0 xor %eax,%eax 10d8a8: 83 c9 ff or $0xffffffff,%ecx 10d8ab: 89 d7 mov %edx,%edi 10d8ad: f2 ae repnz scas %es:(%edi),%al 10d8af: f7 d1 not %ecx 10d8b1: 49 dec %ecx 10d8b2: 8d 45 e4 lea -0x1c(%ebp),%eax 10d8b5: 50 push %eax 10d8b6: 8d 45 af lea -0x51(%ebp),%eax 10d8b9: 50 push %eax 10d8ba: 51 push %ecx 10d8bb: 52 push %edx 10d8bc: e8 7b fe ff ff call 10d73c <== ALWAYS TAKEN /* * Figure out what type of IMFS node this is. */ if ( S_ISDIR(mode) ) 10d8c1: 8b 45 0c mov 0xc(%ebp),%eax 10d8c4: 25 00 f0 00 00 and $0xf000,%eax 10d8c9: 83 c4 10 add $0x10,%esp 10d8cc: 3d 00 40 00 00 cmp $0x4000,%eax 10d8d1: 74 40 je 10d913 type = IMFS_DIRECTORY; else if ( S_ISREG(mode) ) 10d8d3: ba 05 00 00 00 mov $0x5,%edx 10d8d8: 3d 00 80 00 00 cmp $0x8000,%eax 10d8dd: 74 39 je 10d918 type = IMFS_MEMORY_FILE; else if ( S_ISBLK(mode) || S_ISCHR(mode) ) { 10d8df: 3d 00 20 00 00 cmp $0x2000,%eax 10d8e4: 74 07 je 10d8ed 10d8e6: 3d 00 60 00 00 cmp $0x6000,%eax 10d8eb: 75 0d jne 10d8fa type = IMFS_DEVICE; rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor ); 10d8ed: 89 5d d0 mov %ebx,-0x30(%ebp) 10d8f0: 89 75 d4 mov %esi,-0x2c(%ebp) 10d8f3: ba 02 00 00 00 mov $0x2,%edx 10d8f8: eb 1e jmp 10d918 <== ALWAYS TAKEN } else if (S_ISFIFO(mode)) 10d8fa: ba 07 00 00 00 mov $0x7,%edx 10d8ff: 3d 00 10 00 00 cmp $0x1000,%eax 10d904: 74 12 je 10d918 <== NEVER TAKEN type = IMFS_FIFO; else { rtems_set_errno_and_return_minus_one( EINVAL ); 10d906: e8 45 29 00 00 call 110250 <__errno> <== NOT EXECUTED 10d90b: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 10d911: eb 32 jmp 10d945 <== NOT EXECUTED 10d913: ba 01 00 00 00 mov $0x1,%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( 10d918: 83 ec 0c sub $0xc,%esp 10d91b: 8d 45 d0 lea -0x30(%ebp),%eax 10d91e: 50 push %eax 10d91f: ff 75 0c pushl 0xc(%ebp) 10d922: 8d 45 af lea -0x51(%ebp),%eax 10d925: 50 push %eax 10d926: 52 push %edx 10d927: ff 75 18 pushl 0x18(%ebp) 10d92a: e8 19 1d 00 00 call 10f648 10d92f: 89 c2 mov %eax,%edx new_name, mode, &info ); if ( !new_node ) 10d931: 83 c4 20 add $0x20,%esp 10d934: 31 c0 xor %eax,%eax 10d936: 85 d2 test %edx,%edx 10d938: 75 0e jne 10d948 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOMEM ); 10d93a: e8 11 29 00 00 call 110250 <__errno> <== NOT EXECUTED 10d93f: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED 10d945: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED return 0; } 10d948: 8d 65 f4 lea -0xc(%ebp),%esp 10d94b: 5b pop %ebx 10d94c: 5e pop %esi 10d94d: 5f pop %edi 10d94e: c9 leave 10d94f: c3 ret 00107bf4 : #include int IMFS_mount( rtems_filesystem_mount_table_entry_t *mt_entry ) { 107bf4: 55 push %ebp 107bf5: 89 e5 mov %esp,%ebp 107bf7: 83 ec 08 sub $0x8,%esp 107bfa: 8b 55 08 mov 0x8(%ebp),%edx IMFS_jnode_t *node; node = mt_entry->mt_point_node.node_access; 107bfd: 8b 42 08 mov 0x8(%edx),%eax /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 107c00: 83 78 4c 01 cmpl $0x1,0x4c(%eax) 107c04: 74 10 je 107c16 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOTDIR ); 107c06: e8 19 cd 00 00 call 114924 <__errno> <== NOT EXECUTED 107c0b: c7 00 14 00 00 00 movl $0x14,(%eax) <== NOT EXECUTED 107c11: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 107c14: eb 05 jmp 107c1b <== 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; 107c16: 89 50 5c mov %edx,0x5c(%eax) 107c19: 31 c0 xor %eax,%eax return 0; } 107c1b: c9 leave 107c1c: c3 ret 001083ce : */ void IMFS_print_jnode( IMFS_jnode_t *the_jnode ) { 1083ce: 55 push %ebp 1083cf: 89 e5 mov %esp,%ebp 1083d1: 53 push %ebx 1083d2: 83 ec 04 sub $0x4,%esp 1083d5: 8b 5d 08 mov 0x8(%ebp),%ebx assert( the_jnode ); 1083d8: 85 db test %ebx,%ebx 1083da: 75 11 jne 1083ed <== NEVER TAKEN 1083dc: 68 bd 23 12 00 push $0x1223bd <== NOT EXECUTED 1083e1: 68 74 25 12 00 push $0x122574 <== NOT EXECUTED 1083e6: 6a 38 push $0x38 <== NOT EXECUTED 1083e8: e9 98 00 00 00 jmp 108485 <== NOT EXECUTED fprintf(stdout, "%s", the_jnode->name ); 1083ed: 50 push %eax 1083ee: 50 push %eax 1083ef: a1 e0 6f 12 00 mov 0x126fe0,%eax 1083f4: ff 70 08 pushl 0x8(%eax) 1083f7: 8d 43 0c lea 0xc(%ebx),%eax 1083fa: 50 push %eax 1083fb: e8 78 bb 00 00 call 113f78 switch( the_jnode->type ) { 108400: 8b 43 4c mov 0x4c(%ebx),%eax 108403: 83 c4 10 add $0x10,%esp 108406: 8d 50 ff lea -0x1(%eax),%edx 108409: 83 fa 06 cmp $0x6,%edx 10840c: 0f 87 b7 00 00 00 ja 1084c9 <== ALWAYS TAKEN 108412: a1 e0 6f 12 00 mov 0x126fe0,%eax 108417: ff 24 95 44 25 12 00 jmp *0x122544(,%edx,4) case IMFS_DIRECTORY: fprintf(stdout, "/" ); 10841e: 53 push %ebx 10841f: 53 push %ebx 108420: ff 70 08 pushl 0x8(%eax) 108423: 6a 2f push $0x2f 108425: e8 62 ba 00 00 call 113e8c 10842a: eb 2b jmp 108457 <== ALWAYS TAKEN break; case IMFS_DEVICE: fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")", 10842c: ff 73 54 pushl 0x54(%ebx) 10842f: ff 73 50 pushl 0x50(%ebx) 108432: 68 10 24 12 00 push $0x122410 108437: eb 16 jmp 10844f <== ALWAYS TAKEN the_jnode->info.device.major, the_jnode->info.device.minor ); break; case IMFS_LINEAR_FILE: fprintf(stdout, " (file %" PRId32 " %p)", 108439: ff 73 58 pushl 0x58(%ebx) <== NOT EXECUTED 10843c: ff 73 50 pushl 0x50(%ebx) <== NOT EXECUTED 10843f: 68 23 24 12 00 push $0x122423 <== NOT EXECUTED 108444: eb 09 jmp 10844f <== NOT EXECUTED the_jnode->info.file.indirect, the_jnode->info.file.doubly_indirect, the_jnode->info.file.triply_indirect ); #else fprintf(stdout, " (file %" PRId32 ")", 108446: 51 push %ecx 108447: ff 73 50 pushl 0x50(%ebx) 10844a: 68 32 24 12 00 push $0x122432 10844f: ff 70 08 pushl 0x8(%eax) 108452: e8 f9 b9 00 00 call 113e50 (uint32_t)the_jnode->info.file.size ); #endif break; 108457: 83 c4 10 add $0x10,%esp default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); 10845a: c7 45 08 d3 26 12 00 movl $0x1226d3,0x8(%ebp) } 108461: 8b 5d fc mov -0x4(%ebp),%ebx 108464: c9 leave default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); 108465: e9 76 d1 00 00 jmp 1155e0 (uint32_t)the_jnode->info.file.size ); #endif break; case IMFS_HARD_LINK: fprintf(stdout, " links not printed\n" ); 10846a: 52 push %edx <== NOT EXECUTED 10846b: 52 push %edx <== NOT EXECUTED 10846c: ff 70 08 pushl 0x8(%eax) <== NOT EXECUTED 10846f: 68 3e 24 12 00 push $0x12243e <== NOT EXECUTED 108474: e8 ff ba 00 00 call 113f78 <== NOT EXECUTED assert(0); 108479: 68 78 1c 12 00 push $0x121c78 <== NOT EXECUTED 10847e: 68 74 25 12 00 push $0x122574 <== NOT EXECUTED 108483: 6a 5d push $0x5d <== NOT EXECUTED 108485: 68 c7 23 12 00 push $0x1223c7 <== NOT EXECUTED 10848a: e8 09 07 00 00 call 108b98 <__assert_func> <== NOT EXECUTED break; case IMFS_SYM_LINK: fprintf(stdout, " links not printed\n" ); 10848f: 53 push %ebx <== NOT EXECUTED 108490: 53 push %ebx <== NOT EXECUTED 108491: ff 70 08 pushl 0x8(%eax) <== NOT EXECUTED 108494: 68 3e 24 12 00 push $0x12243e <== NOT EXECUTED 108499: e8 da ba 00 00 call 113f78 <== NOT EXECUTED assert(0); 10849e: 68 78 1c 12 00 push $0x121c78 <== NOT EXECUTED 1084a3: 68 74 25 12 00 push $0x122574 <== NOT EXECUTED 1084a8: 6a 62 push $0x62 <== NOT EXECUTED 1084aa: eb d9 jmp 108485 <== NOT EXECUTED break; case IMFS_FIFO: fprintf(stdout, " FIFO not printed\n" ); 1084ac: 51 push %ecx <== NOT EXECUTED 1084ad: 51 push %ecx <== NOT EXECUTED 1084ae: ff 70 08 pushl 0x8(%eax) <== NOT EXECUTED 1084b1: 68 52 24 12 00 push $0x122452 <== NOT EXECUTED 1084b6: e8 bd ba 00 00 call 113f78 <== NOT EXECUTED assert(0); 1084bb: 68 78 1c 12 00 push $0x121c78 <== NOT EXECUTED 1084c0: 68 74 25 12 00 push $0x122574 <== NOT EXECUTED 1084c5: 6a 67 push $0x67 <== NOT EXECUTED 1084c7: eb bc jmp 108485 <== NOT EXECUTED break; default: fprintf(stdout, " bad type %d\n", the_jnode->type ); 1084c9: 52 push %edx <== NOT EXECUTED 1084ca: 50 push %eax <== NOT EXECUTED 1084cb: 68 65 24 12 00 push $0x122465 <== NOT EXECUTED 1084d0: a1 e0 6f 12 00 mov 0x126fe0,%eax <== NOT EXECUTED 1084d5: ff 70 08 pushl 0x8(%eax) <== NOT EXECUTED 1084d8: e8 73 b9 00 00 call 113e50 <== NOT EXECUTED assert(0); 1084dd: 68 78 1c 12 00 push $0x121c78 <== NOT EXECUTED 1084e2: 68 74 25 12 00 push $0x122574 <== NOT EXECUTED 1084e7: 6a 6c push $0x6c <== NOT EXECUTED 1084e9: eb 9a jmp 108485 <== NOT EXECUTED 00107c30 : int IMFS_readlink( rtems_filesystem_location_info_t *loc, char *buf, /* OUT */ size_t bufsize ) { 107c30: 55 push %ebp 107c31: 89 e5 mov %esp,%ebp 107c33: 56 push %esi 107c34: 53 push %ebx 107c35: 8b 75 0c mov 0xc(%ebp),%esi 107c38: 8b 5d 10 mov 0x10(%ebp),%ebx IMFS_jnode_t *node; int i; node = loc->node_access; 107c3b: 8b 45 08 mov 0x8(%ebp),%eax 107c3e: 8b 10 mov (%eax),%edx if ( node->type != IMFS_SYM_LINK ) 107c40: 31 c0 xor %eax,%eax 107c42: 83 7a 4c 04 cmpl $0x4,0x4c(%edx) 107c46: 74 14 je 107c5c <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); 107c48: e8 d7 cc 00 00 call 114924 <__errno> <== NOT EXECUTED 107c4d: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 107c53: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 107c56: eb 12 jmp 107c6a <== NOT EXECUTED for( i=0; ((iinfo.sym_link.name[i] != '\0')); i++ ) buf[i] = node->info.sym_link.name[i]; 107c58: 88 0c 06 mov %cl,(%esi,%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++ ) 107c5b: 40 inc %eax 107c5c: 39 d8 cmp %ebx,%eax 107c5e: 73 0a jae 107c6a 107c60: 8b 4a 50 mov 0x50(%edx),%ecx 107c63: 8a 0c 01 mov (%ecx,%eax,1),%cl 107c66: 84 c9 test %cl,%cl 107c68: 75 ee jne 107c58 buf[i] = node->info.sym_link.name[i]; return i; } 107c6a: 5b pop %ebx 107c6b: 5e pop %esi 107c6c: c9 leave 107c6d: c3 ret 00107c70 : 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 */ ) { 107c70: 55 push %ebp <== NOT EXECUTED 107c71: 89 e5 mov %esp,%ebp <== NOT EXECUTED 107c73: 53 push %ebx <== NOT EXECUTED 107c74: 83 ec 18 sub $0x18,%esp <== NOT EXECUTED IMFS_jnode_t *the_jnode; IMFS_jnode_t *new_parent; the_jnode = old_loc->node_access; 107c77: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED 107c7a: 8b 18 mov (%eax),%ebx <== NOT EXECUTED strncpy( the_jnode->name, new_name, IMFS_NAME_MAX ); 107c7c: 6a 20 push $0x20 <== NOT EXECUTED 107c7e: ff 75 14 pushl 0x14(%ebp) <== NOT EXECUTED 107c81: 8d 43 0c lea 0xc(%ebx),%eax <== NOT EXECUTED 107c84: 50 push %eax <== NOT EXECUTED 107c85: e8 ee d8 00 00 call 115578 <== NOT EXECUTED if ( the_jnode->Parent != NULL ) 107c8a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 107c8d: 83 7b 08 00 cmpl $0x0,0x8(%ebx) <== NOT EXECUTED 107c91: 74 0c je 107c9f <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 107c93: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 107c96: 53 push %ebx <== NOT EXECUTED 107c97: e8 b4 40 00 00 call 10bd50 <_Chain_Extract> <== NOT EXECUTED 107c9c: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_chain_extract( (rtems_chain_node *) the_jnode ); new_parent = new_parent_loc->node_access; 107c9f: 8b 45 10 mov 0x10(%ebp),%eax <== NOT EXECUTED 107ca2: 8b 00 mov (%eax),%eax <== NOT EXECUTED the_jnode->Parent = new_parent; 107ca4: 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 ); 107ca7: 51 push %ecx <== NOT EXECUTED 107ca8: 51 push %ecx <== NOT EXECUTED 107ca9: 53 push %ebx <== NOT EXECUTED 107caa: 83 c0 50 add $0x50,%eax <== NOT EXECUTED 107cad: 50 push %eax <== NOT EXECUTED 107cae: e8 79 40 00 00 call 10bd2c <_Chain_Append> <== NOT EXECUTED rtems_chain_append( &new_parent->info.directory.Entries, &the_jnode->Node ); /* * Update the time. */ IMFS_update_ctime( the_jnode ); 107cb3: 58 pop %eax <== NOT EXECUTED 107cb4: 5a pop %edx <== NOT EXECUTED 107cb5: 6a 00 push $0x0 <== NOT EXECUTED 107cb7: 8d 45 f0 lea -0x10(%ebp),%eax <== NOT EXECUTED 107cba: 50 push %eax <== NOT EXECUTED 107cbb: e8 54 06 00 00 call 108314 <== NOT EXECUTED 107cc0: 8b 45 f0 mov -0x10(%ebp),%eax <== NOT EXECUTED 107cc3: 89 43 48 mov %eax,0x48(%ebx) <== NOT EXECUTED return 0; } 107cc6: 31 c0 xor %eax,%eax <== NOT EXECUTED 107cc8: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 107ccb: c9 leave <== NOT EXECUTED 107ccc: c3 ret <== NOT EXECUTED 0010d960 : int IMFS_rmnod( rtems_filesystem_location_info_t *parent_pathloc, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN */ ) { 10d960: 55 push %ebp 10d961: 89 e5 mov %esp,%ebp 10d963: 56 push %esi 10d964: 53 push %ebx 10d965: 83 ec 10 sub $0x10,%esp 10d968: 8b 75 0c mov 0xc(%ebp),%esi IMFS_jnode_t *the_jnode; the_jnode = (IMFS_jnode_t *) pathloc->node_access; 10d96b: 8b 1e mov (%esi),%ebx /* * Take the node out of the parent's chain that contains this node */ if ( the_jnode->Parent != NULL ) { 10d96d: 83 7b 08 00 cmpl $0x0,0x8(%ebx) 10d971: 74 13 je 10d986 <== ALWAYS TAKEN */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 10d973: 83 ec 0c sub $0xc,%esp 10d976: 53 push %ebx 10d977: e8 3c 09 00 00 call 10e2b8 <_Chain_Extract> rtems_chain_extract( (rtems_chain_node *) the_jnode ); the_jnode->Parent = NULL; 10d97c: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx) 10d983: 83 c4 10 add $0x10,%esp /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; 10d986: 66 ff 4b 34 decw 0x34(%ebx) IMFS_update_ctime( the_jnode ); 10d98a: 50 push %eax 10d98b: 50 push %eax 10d98c: 6a 00 push $0x0 10d98e: 8d 45 f0 lea -0x10(%ebp),%eax 10d991: 50 push %eax 10d992: e8 59 02 00 00 call 10dbf0 10d997: 8b 45 f0 mov -0x10(%ebp),%eax 10d99a: 89 43 48 mov %eax,0x48(%ebx) /* * The file cannot be open and the link must be less than 1 to free. */ if ( !rtems_libio_is_file_open( the_jnode ) && (the_jnode->st_nlink < 1) ) { 10d99d: 89 1c 24 mov %ebx,(%esp) 10d9a0: e8 fd 02 00 00 call 10dca2 <== ALWAYS TAKEN 10d9a5: 83 c4 10 add $0x10,%esp 10d9a8: 85 c0 test %eax,%eax 10d9aa: 75 3f jne 10d9eb <== ALWAYS TAKEN 10d9ac: 66 83 7b 34 00 cmpw $0x0,0x34(%ebx) 10d9b1: 75 38 jne 10d9eb <== ALWAYS TAKEN /* * Is rtems_filesystem_current this node? */ if ( rtems_filesystem_current.node_access == pathloc->node_access ) 10d9b3: a1 60 16 12 00 mov 0x121660,%eax 10d9b8: 8b 50 04 mov 0x4(%eax),%edx 10d9bb: 3b 16 cmp (%esi),%edx 10d9bd: 75 07 jne 10d9c6 <== NEVER TAKEN rtems_filesystem_current.node_access = NULL; 10d9bf: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax) <== NOT EXECUTED /* * Free memory associated with a memory file. */ if ( the_jnode->type == IMFS_SYM_LINK ) { 10d9c6: 83 7b 4c 04 cmpl $0x4,0x4c(%ebx) 10d9ca: 75 13 jne 10d9df if ( the_jnode->info.sym_link.name ) 10d9cc: 8b 43 50 mov 0x50(%ebx),%eax 10d9cf: 85 c0 test %eax,%eax 10d9d1: 74 0c je 10d9df <== ALWAYS TAKEN free( (void*) the_jnode->info.sym_link.name ); 10d9d3: 83 ec 0c sub $0xc,%esp 10d9d6: 50 push %eax 10d9d7: e8 54 97 ff ff call 107130 10d9dc: 83 c4 10 add $0x10,%esp } free( the_jnode ); 10d9df: 83 ec 0c sub $0xc,%esp 10d9e2: 53 push %ebx 10d9e3: e8 48 97 ff ff call 107130 10d9e8: 83 c4 10 add $0x10,%esp } return 0; } 10d9eb: 31 c0 xor %eax,%eax 10d9ed: 8d 65 f8 lea -0x8(%ebp),%esp 10d9f0: 5b pop %ebx 10d9f1: 5e pop %esi 10d9f2: c9 leave 10d9f3: c3 ret 0010d9f4 : int IMFS_stat( rtems_filesystem_location_info_t *loc, struct stat *buf ) { 10d9f4: 55 push %ebp 10d9f5: 89 e5 mov %esp,%ebp 10d9f7: 53 push %ebx 10d9f8: 83 ec 04 sub $0x4,%esp 10d9fb: 8b 45 0c mov 0xc(%ebp),%eax IMFS_jnode_t *the_jnode; IMFS_device_t *io; the_jnode = loc->node_access; 10d9fe: 8b 55 08 mov 0x8(%ebp),%edx 10da01: 8b 12 mov (%edx),%edx switch ( the_jnode->type ) { 10da03: 8b 4a 4c mov 0x4c(%edx),%ecx 10da06: 83 e9 02 sub $0x2,%ecx 10da09: 83 f9 05 cmp $0x5,%ecx 10da0c: 77 26 ja 10da34 <== ALWAYS TAKEN 10da0e: ff 24 8d 3c d9 11 00 jmp *0x11d93c(,%ecx,4) case IMFS_DEVICE: io = &the_jnode->info.device; buf->st_rdev = rtems_filesystem_make_dev_t( io->major, io->minor ); 10da15: 8b 4a 54 mov 0x54(%edx),%ecx rtems_device_minor_number _minor ) { union __rtems_dev_t temp; temp.__overlay.major = _major; 10da18: 8b 5a 50 mov 0x50(%edx),%ebx 10da1b: 89 58 18 mov %ebx,0x18(%eax) 10da1e: 89 48 1c mov %ecx,0x1c(%eax) break; 10da21: eb 21 jmp 10da44 <== ALWAYS TAKEN case IMFS_LINEAR_FILE: case IMFS_MEMORY_FILE: buf->st_size = the_jnode->info.file.size; 10da23: 8b 4a 50 mov 0x50(%edx),%ecx 10da26: 89 48 20 mov %ecx,0x20(%eax) break; 10da29: eb 19 jmp 10da44 <== ALWAYS TAKEN case IMFS_SYM_LINK: buf->st_size = 0; break; case IMFS_FIFO: buf->st_size = 0; 10da2b: c7 40 20 00 00 00 00 movl $0x0,0x20(%eax) <== NOT EXECUTED break; 10da32: eb 10 jmp 10da44 <== NOT EXECUTED default: rtems_set_errno_and_return_minus_one( ENOTSUP ); 10da34: e8 17 28 00 00 call 110250 <__errno> <== NOT EXECUTED 10da39: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 10da3f: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 10da42: eb 36 jmp 10da7a <== NOT EXECUTED break; } buf->st_mode = the_jnode->st_mode; 10da44: 8b 4a 30 mov 0x30(%edx),%ecx 10da47: 89 48 0c mov %ecx,0xc(%eax) buf->st_nlink = the_jnode->st_nlink; 10da4a: 8b 4a 34 mov 0x34(%edx),%ecx 10da4d: 66 89 48 10 mov %cx,0x10(%eax) buf->st_ino = the_jnode->st_ino; 10da51: 8b 4a 38 mov 0x38(%edx),%ecx 10da54: 89 48 08 mov %ecx,0x8(%eax) buf->st_uid = the_jnode->st_uid; 10da57: 8b 4a 3c mov 0x3c(%edx),%ecx 10da5a: 66 89 48 12 mov %cx,0x12(%eax) buf->st_gid = the_jnode->st_gid; 10da5e: 66 8b 4a 3e mov 0x3e(%edx),%cx 10da62: 66 89 48 14 mov %cx,0x14(%eax) buf->st_atime = the_jnode->stat_atime; 10da66: 8b 4a 40 mov 0x40(%edx),%ecx 10da69: 89 48 24 mov %ecx,0x24(%eax) buf->st_mtime = the_jnode->stat_mtime; 10da6c: 8b 4a 44 mov 0x44(%edx),%ecx 10da6f: 89 48 2c mov %ecx,0x2c(%eax) buf->st_ctime = the_jnode->stat_ctime; 10da72: 8b 52 48 mov 0x48(%edx),%edx 10da75: 89 50 34 mov %edx,0x34(%eax) 10da78: 31 c0 xor %eax,%eax return 0; } 10da7a: 5a pop %edx 10da7b: 5b pop %ebx 10da7c: c9 leave 10da7d: c3 ret 00107cd0 : int IMFS_symlink( rtems_filesystem_location_info_t *parent_loc, const char *link_name, const char *node_name ) { 107cd0: 55 push %ebp 107cd1: 89 e5 mov %esp,%ebp 107cd3: 57 push %edi 107cd4: 53 push %ebx 107cd5: 83 ec 40 sub $0x40,%esp 107cd8: 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 ); 107cdb: 31 c0 xor %eax,%eax 107cdd: 83 c9 ff or $0xffffffff,%ecx 107ce0: 89 d7 mov %edx,%edi 107ce2: f2 ae repnz scas %es:(%edi),%al 107ce4: f7 d1 not %ecx 107ce6: 49 dec %ecx 107ce7: 8d 45 f4 lea -0xc(%ebp),%eax 107cea: 50 push %eax 107ceb: 8d 5d bf lea -0x41(%ebp),%ebx 107cee: 53 push %ebx 107cef: 51 push %ecx 107cf0: 52 push %edx 107cf1: e8 7a 9e 00 00 call 111b70 /* * Duplicate link name */ info.sym_link.name = strdup(link_name); 107cf6: 58 pop %eax 107cf7: ff 75 0c pushl 0xc(%ebp) 107cfa: e8 21 d7 00 00 call 115420 107cff: 89 45 e0 mov %eax,-0x20(%ebp) if (info.sym_link.name == NULL) { 107d02: 83 c4 10 add $0x10,%esp 107d05: 85 c0 test %eax,%eax 107d07: 75 10 jne 107d19 <== NEVER TAKEN rtems_set_errno_and_return_minus_one(ENOMEM); 107d09: e8 16 cc 00 00 call 114924 <__errno> <== NOT EXECUTED 107d0e: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED 107d14: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 107d17: eb 3e jmp 107d57 <== 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( 107d19: 83 ec 0c sub $0xc,%esp 107d1c: 8d 45 e0 lea -0x20(%ebp),%eax 107d1f: 50 push %eax 107d20: 68 ff a1 00 00 push $0xa1ff 107d25: 53 push %ebx 107d26: 6a 04 push $0x4 107d28: ff 75 08 pushl 0x8(%ebp) 107d2b: e8 68 94 00 00 call 111198 107d30: 89 c2 mov %eax,%edx new_name, ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if (new_node == NULL) { 107d32: 83 c4 20 add $0x20,%esp 107d35: 31 c0 xor %eax,%eax 107d37: 85 d2 test %edx,%edx 107d39: 75 1c jne 107d57 <== NEVER TAKEN free(info.sym_link.name); 107d3b: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 107d3e: ff 75 e0 pushl -0x20(%ebp) <== NOT EXECUTED 107d41: e8 56 05 00 00 call 10829c <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOMEM); 107d46: e8 d9 cb 00 00 call 114924 <__errno> <== NOT EXECUTED 107d4b: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED 107d51: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 107d54: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } return 0; } 107d57: 8d 65 f8 lea -0x8(%ebp),%esp 107d5a: 5b pop %ebx 107d5b: 5f pop %edi 107d5c: c9 leave 107d5d: c3 ret 00107d60 : int IMFS_unlink( rtems_filesystem_location_info_t *parentloc, /* IN */ rtems_filesystem_location_info_t *loc /* IN */ ) { 107d60: 55 push %ebp 107d61: 89 e5 mov %esp,%ebp 107d63: 57 push %edi 107d64: 56 push %esi 107d65: 53 push %ebx 107d66: 83 ec 2c sub $0x2c,%esp IMFS_jnode_t *node; rtems_filesystem_location_info_t the_link; int result = 0; node = loc->node_access; 107d69: 8b 45 0c mov 0xc(%ebp),%eax 107d6c: 8b 18 mov (%eax),%ebx /* * If this is the last last pointer to the node * free the node. */ if ( node->type == IMFS_HARD_LINK ) { 107d6e: 83 7b 4c 03 cmpl $0x3,0x4c(%ebx) 107d72: 75 7a jne 107dee if ( !node->info.hard_link.link_node ) 107d74: 8b 43 50 mov 0x50(%ebx),%eax 107d77: 85 c0 test %eax,%eax 107d79: 75 10 jne 107d8b <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); 107d7b: e8 a4 cb 00 00 call 114924 <__errno> <== NOT EXECUTED 107d80: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 107d86: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 107d89: eb 75 jmp 107e00 <== NOT EXECUTED the_link = *loc; 107d8b: 8d 7d cc lea -0x34(%ebp),%edi 107d8e: b9 05 00 00 00 mov $0x5,%ecx 107d93: 8b 75 0c mov 0xc(%ebp),%esi 107d96: f3 a5 rep movsl %ds:(%esi),%es:(%edi) the_link.node_access = node->info.hard_link.link_node; 107d98: 89 45 cc mov %eax,-0x34(%ebp) IMFS_Set_handlers( &the_link ); 107d9b: 83 ec 0c sub $0xc,%esp 107d9e: 8d 75 cc lea -0x34(%ebp),%esi 107da1: 56 push %esi 107da2: e8 f1 94 00 00 call 111298 /* * 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) 107da7: 8b 43 50 mov 0x50(%ebx),%eax 107daa: 8b 50 34 mov 0x34(%eax),%edx 107dad: 83 c4 10 add $0x10,%esp 107db0: 66 83 fa 01 cmp $0x1,%dx 107db4: 75 1a jne 107dd0 { result = (*the_link.handlers->rmnod_h)( parentloc, &the_link ); 107db6: 51 push %ecx 107db7: 51 push %ecx 107db8: 56 push %esi 107db9: ff 75 08 pushl 0x8(%ebp) 107dbc: 8b 45 d4 mov -0x2c(%ebp),%eax 107dbf: ff 50 34 call *0x34(%eax) 107dc2: 89 c2 mov %eax,%edx if ( result != 0 ) 107dc4: 83 c4 10 add $0x10,%esp 107dc7: 83 c8 ff or $0xffffffff,%eax 107dca: 85 d2 test %edx,%edx 107dcc: 74 20 je 107dee 107dce: eb 30 jmp 107e00 <== ALWAYS TAKEN return -1; } else { node->info.hard_link.link_node->st_nlink --; 107dd0: 4a dec %edx 107dd1: 66 89 50 34 mov %dx,0x34(%eax) IMFS_update_ctime( node->info.hard_link.link_node ); 107dd5: 52 push %edx 107dd6: 52 push %edx 107dd7: 6a 00 push $0x0 107dd9: 8d 45 e0 lea -0x20(%ebp),%eax 107ddc: 50 push %eax 107ddd: e8 32 05 00 00 call 108314 107de2: 8b 43 50 mov 0x50(%ebx),%eax 107de5: 8b 55 e0 mov -0x20(%ebp),%edx 107de8: 89 50 48 mov %edx,0x48(%eax) 107deb: 83 c4 10 add $0x10,%esp /* * Now actually free the node we were asked to free. */ result = (*loc->handlers->rmnod_h)( parentloc, loc ); 107dee: 50 push %eax 107def: 50 push %eax 107df0: 8b 55 0c mov 0xc(%ebp),%edx 107df3: 8b 42 08 mov 0x8(%edx),%eax 107df6: 52 push %edx 107df7: ff 75 08 pushl 0x8(%ebp) 107dfa: ff 50 34 call *0x34(%eax) return result; 107dfd: 83 c4 10 add $0x10,%esp } 107e00: 8d 65 f4 lea -0xc(%ebp),%esp 107e03: 5b pop %ebx 107e04: 5e pop %esi 107e05: 5f pop %edi 107e06: c9 leave 107e07: c3 ret 00107e08 : #include int IMFS_unmount( rtems_filesystem_mount_table_entry_t *mt_entry ) { 107e08: 55 push %ebp 107e09: 89 e5 mov %esp,%ebp 107e0b: 83 ec 08 sub $0x8,%esp IMFS_jnode_t *node; node = mt_entry->mt_point_node.node_access; 107e0e: 8b 45 08 mov 0x8(%ebp),%eax 107e11: 8b 40 08 mov 0x8(%eax),%eax /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 107e14: 83 78 4c 01 cmpl $0x1,0x4c(%eax) 107e18: 74 0d je 107e27 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOTDIR ); 107e1a: e8 05 cb 00 00 call 114924 <__errno> <== NOT EXECUTED 107e1f: c7 00 14 00 00 00 movl $0x14,(%eax) <== NOT EXECUTED 107e25: eb 11 jmp 107e38 <== NOT EXECUTED /* * Did the node indicate that there was a directory mounted here? */ if ( node->info.directory.mt_fs == NULL ) 107e27: 83 78 5c 00 cmpl $0x0,0x5c(%eax) 107e2b: 75 10 jne 107e3d <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); /* XXX */ 107e2d: e8 f2 ca 00 00 call 114924 <__errno> <== NOT EXECUTED 107e32: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 107e38: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 107e3b: eb 09 jmp 107e46 <== 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; 107e3d: c7 40 5c 00 00 00 00 movl $0x0,0x5c(%eax) 107e44: 31 c0 xor %eax,%eax return 0; } 107e46: c9 leave 107e47: c3 ret 001072b4 : void RTEMS_Malloc_Initialize( void *heap_begin, uintptr_t heap_size, size_t sbrk_amount ) { 1072b4: 55 push %ebp 1072b5: 89 e5 mov %esp,%ebp 1072b7: 57 push %edi 1072b8: 56 push %esi 1072b9: 53 push %ebx 1072ba: 83 ec 0c sub $0xc,%esp 1072bd: 8b 5d 08 mov 0x8(%ebp),%ebx 1072c0: 8b 75 0c mov 0xc(%ebp),%esi #endif /* * If configured, initialize the statistics support */ if ( rtems_malloc_statistics_helpers != NULL ) { 1072c3: a1 d0 1b 12 00 mov 0x121bd0,%eax 1072c8: 85 c0 test %eax,%eax 1072ca: 74 02 je 1072ce <== NEVER TAKEN (*rtems_malloc_statistics_helpers->initialize)(); 1072cc: ff 10 call *(%eax) <== NOT EXECUTED } /* * Initialize the garbage collection list to start with nothing on it. */ malloc_deferred_frees_initialize(); 1072ce: e8 7c ff ff ff call 10724f <== ALWAYS TAKEN /* * Initialize the optional sbrk support for extending the heap */ if ( rtems_malloc_sbrk_helpers != NULL ) { 1072d3: a1 d4 1b 12 00 mov 0x121bd4,%eax 1072d8: 85 c0 test %eax,%eax 1072da: 74 12 je 1072ee <== NEVER TAKEN void *new_heap_begin = (*rtems_malloc_sbrk_helpers->initialize)( 1072dc: 52 push %edx <== NOT EXECUTED 1072dd: 52 push %edx <== NOT EXECUTED 1072de: ff 75 10 pushl 0x10(%ebp) <== NOT EXECUTED 1072e1: 53 push %ebx <== NOT EXECUTED 1072e2: ff 10 call *(%eax) <== NOT EXECUTED heap_begin, sbrk_amount ); heap_size -= (uintptr_t) new_heap_begin - (uintptr_t) heap_begin; 1072e4: 8d 34 33 lea (%ebx,%esi,1),%esi <== NOT EXECUTED 1072e7: 29 c6 sub %eax,%esi <== NOT EXECUTED 1072e9: 89 c3 mov %eax,%ebx <== NOT EXECUTED 1072eb: 83 c4 10 add $0x10,%esp <== NOT EXECUTED * of the time under UNIX because zero'ing memory when it is first * given to a process eliminates the chance of a process seeing data * left over from another process. This would be a security violation. */ if ( 1072ee: 80 3d cd 1b 12 00 00 cmpb $0x0,0x121bcd 1072f5: 75 11 jne 107308 !rtems_unified_work_area && rtems_configuration_get_do_zero_of_workspace() 1072f7: 80 3d 40 f9 11 00 00 cmpb $0x0,0x11f940 1072fe: 74 08 je 107308 ) { memset( heap_begin, 0, heap_size ); 107300: 31 c0 xor %eax,%eax 107302: 89 df mov %ebx,%edi 107304: 89 f1 mov %esi,%ecx 107306: f3 aa rep stos %al,%es:(%edi) * Unfortunately we cannot use assert if this fails because if this * has failed we do not have a heap and if we do not have a heap * STDIO cannot work because there will be no buffers. */ if ( !rtems_unified_work_area ) { 107308: 80 3d cd 1b 12 00 00 cmpb $0x0,0x121bcd 10730f: 75 20 jne 107331 void *area_begin, uintptr_t area_size, uintptr_t page_size ) { return _Heap_Initialize( heap, area_begin, area_size, page_size ); 107311: 6a 04 push $0x4 107313: 56 push %esi 107314: 53 push %ebx 107315: ff 35 70 f8 11 00 pushl 0x11f870 10731b: e8 94 38 00 00 call 10abb4 <_Heap_Initialize> RTEMS_Malloc_Heap, heap_begin, heap_size, CPU_HEAP_ALIGNMENT ); if ( status == 0 ) { 107320: 83 c4 10 add $0x10,%esp 107323: 85 c0 test %eax,%eax 107325: 75 0a jne 107331 <== NEVER TAKEN rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); 107327: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10732a: 6a 1a push $0x1a <== NOT EXECUTED 10732c: e8 b3 31 00 00 call 10a4e4 <== NOT EXECUTED } } MSBUMP( space_available, _Protected_heap_Get_size(RTEMS_Malloc_Heap) ); 107331: 8b 1d 30 37 12 00 mov 0x123730,%ebx 107337: 83 ec 0c sub $0xc,%esp 10733a: ff 35 70 f8 11 00 pushl 0x11f870 107340: e8 db 42 00 00 call 10b620 <_Protected_heap_Get_size> 107345: 8d 1c 18 lea (%eax,%ebx,1),%ebx 107348: 89 1d 30 37 12 00 mov %ebx,0x123730 10734e: 83 c4 10 add $0x10,%esp printk( "\n" ); rtems_print_buffer( (heap_begin + heap_size) - 48, 48 ); rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); } #endif } 107351: 8d 65 f4 lea -0xc(%ebp),%esp 107354: 5b pop %ebx 107355: 5e pop %esi 107356: 5f pop %edi 107357: c9 leave 107358: c3 ret 0010a046 : static rtems_printk_plugin_t print_handler; void Stack_check_Dump_threads_usage( Thread_Control *the_thread ) { 10a046: 55 push %ebp <== NOT EXECUTED 10a047: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10a049: 57 push %edi <== NOT EXECUTED 10a04a: 56 push %esi <== NOT EXECUTED 10a04b: 53 push %ebx <== NOT EXECUTED 10a04c: 83 ec 2c sub $0x2c,%esp <== NOT EXECUTED 10a04f: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED void *high_water_mark; void *current; Stack_Control *stack; char name[5]; if ( !the_thread ) 10a052: 85 db test %ebx,%ebx <== NOT EXECUTED 10a054: 0f 84 fa 00 00 00 je 10a154 <== NOT EXECUTED return; if ( !print_handler ) 10a05a: a1 40 07 16 00 mov 0x160740,%eax <== NOT EXECUTED 10a05f: 89 45 d0 mov %eax,-0x30(%ebp) <== NOT EXECUTED 10a062: 85 c0 test %eax,%eax <== NOT EXECUTED 10a064: 0f 84 ea 00 00 00 je 10a154 <== NOT EXECUTED /* * Obtain interrupt stack information */ if (the_thread == (Thread_Control *) -1) { 10a06a: 83 fb ff cmp $0xffffffff,%ebx <== NOT EXECUTED 10a06d: 75 1d jne 10a08c <== NOT EXECUTED if (Stack_check_Interrupt_stack.area) { 10a06f: 83 3d ec 33 16 00 00 cmpl $0x0,0x1633ec <== NOT EXECUTED 10a076: 0f 84 d8 00 00 00 je 10a154 <== NOT EXECUTED 10a07c: be e8 33 16 00 mov $0x1633e8,%esi <== NOT EXECUTED 10a081: c7 45 cc 00 00 00 00 movl $0x0,-0x34(%ebp) <== NOT EXECUTED 10a088: 31 db xor %ebx,%ebx <== NOT EXECUTED 10a08a: eb 0f jmp 10a09b <== NOT EXECUTED current = 0; } else return; } else { stack = &the_thread->Start.Initial_stack; 10a08c: 8d b3 c0 00 00 00 lea 0xc0(%ebx),%esi <== NOT EXECUTED current = (void *)_CPU_Context_Get_SP( &the_thread->Registers ); 10a092: 8b 8b d4 00 00 00 mov 0xd4(%ebx),%ecx <== NOT EXECUTED 10a098: 89 4d cc mov %ecx,-0x34(%ebp) <== NOT EXECUTED } low = Stack_check_usable_stack_start(stack); 10a09b: 8b 56 04 mov 0x4(%esi),%edx <== NOT EXECUTED 10a09e: 83 c2 10 add $0x10,%edx <== NOT EXECUTED size = Stack_check_usable_stack_size(stack); 10a0a1: 8b 06 mov (%esi),%eax <== NOT EXECUTED 10a0a3: 83 e8 10 sub $0x10,%eax <== NOT EXECUTED 10a0a6: 89 45 d4 mov %eax,-0x2c(%ebp) <== NOT EXECUTED high_water_mark = Stack_check_find_high_water_mark(low, size); 10a0a9: 50 push %eax <== NOT EXECUTED 10a0aa: 52 push %edx <== NOT EXECUTED 10a0ab: 89 55 c8 mov %edx,-0x38(%ebp) <== NOT EXECUTED 10a0ae: e8 6c ff ff ff call 10a01f <== NOT EXECUTED if ( high_water_mark ) 10a0b3: 59 pop %ecx <== NOT EXECUTED 10a0b4: 5f pop %edi <== NOT EXECUTED 10a0b5: 31 ff xor %edi,%edi <== NOT EXECUTED 10a0b7: 85 c0 test %eax,%eax <== NOT EXECUTED 10a0b9: 8b 55 c8 mov -0x38(%ebp),%edx <== NOT EXECUTED 10a0bc: 74 08 je 10a0c6 <== NOT EXECUTED used = Stack_check_Calculate_used( low, size, high_water_mark ); 10a0be: 8b 4d d4 mov -0x2c(%ebp),%ecx <== NOT EXECUTED 10a0c1: 8d 3c 0a lea (%edx,%ecx,1),%edi <== NOT EXECUTED 10a0c4: 29 c7 sub %eax,%edi <== NOT EXECUTED else used = 0; if ( the_thread ) { 10a0c6: 85 db test %ebx,%ebx <== NOT EXECUTED 10a0c8: 74 26 je 10a0f0 <== NOT EXECUTED (*print_handler)( 10a0ca: 52 push %edx <== NOT EXECUTED 10a0cb: 8d 45 e3 lea -0x1d(%ebp),%eax <== NOT EXECUTED 10a0ce: 50 push %eax <== NOT EXECUTED 10a0cf: 6a 05 push $0x5 <== NOT EXECUTED 10a0d1: ff 73 08 pushl 0x8(%ebx) <== NOT EXECUTED 10a0d4: e8 d3 51 00 00 call 10f2ac <== NOT EXECUTED 10a0d9: 50 push %eax <== NOT EXECUTED 10a0da: ff 73 08 pushl 0x8(%ebx) <== NOT EXECUTED 10a0dd: 68 34 07 15 00 push $0x150734 <== NOT EXECUTED 10a0e2: ff 35 3c 07 16 00 pushl 0x16073c <== NOT EXECUTED 10a0e8: ff 55 d0 call *-0x30(%ebp) <== NOT EXECUTED 10a0eb: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 10a0ee: eb 14 jmp 10a104 <== 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 ); 10a0f0: 50 push %eax <== NOT EXECUTED 10a0f1: 6a ff push $0xffffffff <== NOT EXECUTED 10a0f3: 68 41 07 15 00 push $0x150741 <== NOT EXECUTED 10a0f8: ff 35 3c 07 16 00 pushl 0x16073c <== NOT EXECUTED 10a0fe: ff 55 d0 call *-0x30(%ebp) <== NOT EXECUTED 10a101: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } (*print_handler)( 10a104: 8b 46 04 mov 0x4(%esi),%eax <== NOT EXECUTED 10a107: 53 push %ebx <== NOT EXECUTED 10a108: 53 push %ebx <== NOT EXECUTED 10a109: ff 75 d4 pushl -0x2c(%ebp) <== NOT EXECUTED 10a10c: ff 75 cc pushl -0x34(%ebp) <== NOT EXECUTED 10a10f: 8b 16 mov (%esi),%edx <== NOT EXECUTED 10a111: 8d 54 10 ff lea -0x1(%eax,%edx,1),%edx <== NOT EXECUTED 10a115: 52 push %edx <== NOT EXECUTED 10a116: 50 push %eax <== NOT EXECUTED 10a117: 68 4f 07 15 00 push $0x15074f <== NOT EXECUTED 10a11c: ff 35 3c 07 16 00 pushl 0x16073c <== NOT EXECUTED 10a122: ff 15 40 07 16 00 call *0x160740 <== NOT EXECUTED stack->area + stack->size - 1, current, size ); if (Stack_check_Initialized == 0) { 10a128: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 10a12b: 83 3d 38 07 16 00 00 cmpl $0x0,0x160738 <== NOT EXECUTED 10a132: a1 40 07 16 00 mov 0x160740,%eax <== NOT EXECUTED 10a137: 75 09 jne 10a142 <== NOT EXECUTED (*print_handler)( print_context, "Unavailable\n" ); 10a139: 51 push %ecx <== NOT EXECUTED 10a13a: 51 push %ecx <== NOT EXECUTED 10a13b: 68 6d 07 15 00 push $0x15076d <== NOT EXECUTED 10a140: eb 07 jmp 10a149 <== NOT EXECUTED } else { (*print_handler)( print_context, "%8" PRId32 "\n", used ); 10a142: 52 push %edx <== NOT EXECUTED 10a143: 57 push %edi <== NOT EXECUTED 10a144: 68 7a 07 15 00 push $0x15077a <== NOT EXECUTED 10a149: ff 35 3c 07 16 00 pushl 0x16073c <== NOT EXECUTED 10a14f: ff d0 call *%eax <== NOT EXECUTED 10a151: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } } 10a154: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 10a157: 5b pop %ebx <== NOT EXECUTED 10a158: 5e pop %esi <== NOT EXECUTED 10a159: 5f pop %edi <== NOT EXECUTED 10a15a: c9 leave <== NOT EXECUTED 10a15b: c3 ret <== NOT EXECUTED 0010a359 : /* * Stack_check_Initialize */ void Stack_check_Initialize( void ) { 10a359: 55 push %ebp 10a35a: 89 e5 mov %esp,%ebp 10a35c: 57 push %edi static uint32_t pattern[ 4 ] = { 0xFEEDF00D, 0x0BAD0D06, /* FEED FOOD to BAD DOG */ 0xDEADF00D, 0x600D0D06 /* DEAD FOOD but GOOD DOG */ }; if (Stack_check_Initialized) 10a35d: 83 3d 38 07 16 00 00 cmpl $0x0,0x160738 10a364: 75 4d jne 10a3b3 10a366: 31 c0 xor %eax,%eax /* * Dope the pattern and fill areas */ p = Stack_check_Pattern.pattern; for ( i = 0; i < PATTERN_SIZE_WORDS; i++ ) { p[i] = pattern[ i%4 ]; 10a368: 89 c2 mov %eax,%edx 10a36a: 83 e2 03 and $0x3,%edx 10a36d: 8b 14 95 b4 08 15 00 mov 0x1508b4(,%edx,4),%edx 10a374: 89 14 85 d8 33 16 00 mov %edx,0x1633d8(,%eax,4) /* * Dope the pattern and fill areas */ p = Stack_check_Pattern.pattern; for ( i = 0; i < PATTERN_SIZE_WORDS; i++ ) { 10a37b: 40 inc %eax 10a37c: 83 f8 04 cmp $0x4,%eax 10a37f: 75 e7 jne 10a368 /* * If appropriate, setup the interrupt stack for high water testing * also. */ #if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE) if (_CPU_Interrupt_stack_low && _CPU_Interrupt_stack_high) { 10a381: 8b 15 5c 35 16 00 mov 0x16355c,%edx 10a387: 85 d2 test %edx,%edx 10a389: 74 1e je 10a3a9 <== ALWAYS TAKEN 10a38b: 8b 0d 1c 35 16 00 mov 0x16351c,%ecx 10a391: 85 c9 test %ecx,%ecx 10a393: 74 14 je 10a3a9 <== ALWAYS TAKEN Stack_check_Interrupt_stack.area = _CPU_Interrupt_stack_low; 10a395: 89 15 ec 33 16 00 mov %edx,0x1633ec Stack_check_Interrupt_stack.size = (char *) _CPU_Interrupt_stack_high - 10a39b: 29 d1 sub %edx,%ecx 10a39d: 89 0d e8 33 16 00 mov %ecx,0x1633e8 (char *) _CPU_Interrupt_stack_low; Stack_check_Dope_stack(&Stack_check_Interrupt_stack); 10a3a3: b0 a5 mov $0xa5,%al 10a3a5: 89 d7 mov %edx,%edi 10a3a7: f3 aa rep stos %al,%es:(%edi) } #endif Stack_check_Initialized = 1; 10a3a9: c7 05 38 07 16 00 01 movl $0x1,0x160738 10a3b0: 00 00 00 } 10a3b3: 5f pop %edi 10a3b4: c9 leave 10a3b5: c3 ret 0010a01f : */ void *Stack_check_find_high_water_mark( const void *s, size_t n ) { 10a01f: 55 push %ebp <== NOT EXECUTED 10a020: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10a022: 8b 55 0c mov 0xc(%ebp),%edx <== NOT EXECUTED /* * start at lower memory and find first word that does not * match pattern */ base += PATTERN_SIZE_WORDS; 10a025: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 10a028: 83 c0 10 add $0x10,%eax <== NOT EXECUTED for (ebase = base + length; base < ebase; base++) 10a02b: 83 e2 fc and $0xfffffffc,%edx <== NOT EXECUTED 10a02e: 8d 14 10 lea (%eax,%edx,1),%edx <== NOT EXECUTED 10a031: eb 0b jmp 10a03e <== NOT EXECUTED if (*base != U32_PATTERN) 10a033: 81 38 a5 a5 a5 a5 cmpl $0xa5a5a5a5,(%eax) <== NOT EXECUTED 10a039: 75 09 jne 10a044 <== NOT EXECUTED * start at lower memory and find first word that does not * match pattern */ base += PATTERN_SIZE_WORDS; for (ebase = base + length; base < ebase; base++) 10a03b: 83 c0 04 add $0x4,%eax <== NOT EXECUTED 10a03e: 39 d0 cmp %edx,%eax <== NOT EXECUTED 10a040: 72 f1 jb 10a033 <== NOT EXECUTED 10a042: 31 c0 xor %eax,%eax <== NOT EXECUTED if (*base != U32_PATTERN) return (void *) base; #endif return (void *)0; } 10a044: c9 leave <== NOT EXECUTED 10a045: c3 ret <== NOT EXECUTED 0010a1d4 : * * NOTE: The system is in a questionable state... we may not get * the following message out. */ void Stack_check_report_blown_task(Thread_Control *running, bool pattern_ok) { 10a1d4: 55 push %ebp <== NOT EXECUTED 10a1d5: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10a1d7: 56 push %esi <== NOT EXECUTED 10a1d8: 53 push %ebx <== NOT EXECUTED 10a1d9: 83 ec 3c sub $0x3c,%esp <== NOT EXECUTED 10a1dc: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED 10a1df: 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); 10a1e2: 8b b3 c4 00 00 00 mov 0xc4(%ebx),%esi <== NOT EXECUTED char name [32]; printk("BLOWN STACK!!!\n"); 10a1e8: 68 e1 07 15 00 push $0x1507e1 <== NOT EXECUTED 10a1ed: 88 55 d4 mov %dl,-0x2c(%ebp) <== NOT EXECUTED 10a1f0: e8 37 25 00 00 call 10c72c <== NOT EXECUTED printk("task control block: 0x%08lx\n", (unsigned long) running); 10a1f5: 5a pop %edx <== NOT EXECUTED 10a1f6: 59 pop %ecx <== NOT EXECUTED 10a1f7: 53 push %ebx <== NOT EXECUTED 10a1f8: 68 f1 07 15 00 push $0x1507f1 <== NOT EXECUTED 10a1fd: e8 2a 25 00 00 call 10c72c <== NOT EXECUTED printk("task ID: 0x%08lx\n", (unsigned long) running->Object.id); 10a202: 59 pop %ecx <== NOT EXECUTED 10a203: 58 pop %eax <== NOT EXECUTED 10a204: ff 73 08 pushl 0x8(%ebx) <== NOT EXECUTED 10a207: 68 0e 08 15 00 push $0x15080e <== NOT EXECUTED 10a20c: e8 1b 25 00 00 call 10c72c <== NOT EXECUTED printk( 10a211: 58 pop %eax <== NOT EXECUTED 10a212: 5a pop %edx <== NOT EXECUTED 10a213: ff 73 0c pushl 0xc(%ebx) <== NOT EXECUTED 10a216: 68 20 08 15 00 push $0x150820 <== NOT EXECUTED 10a21b: e8 0c 25 00 00 call 10c72c <== NOT EXECUTED "task name: 0x%08lx\n", (unsigned long) running->Object.name.name_u32 ); printk( 10a220: 83 c4 0c add $0xc,%esp <== NOT EXECUTED 10a223: 8d 45 d8 lea -0x28(%ebp),%eax <== NOT EXECUTED 10a226: 50 push %eax <== NOT EXECUTED 10a227: 6a 20 push $0x20 <== NOT EXECUTED 10a229: ff 73 08 pushl 0x8(%ebx) <== NOT EXECUTED 10a22c: e8 7b 50 00 00 call 10f2ac <== NOT EXECUTED 10a231: 5a pop %edx <== NOT EXECUTED 10a232: 59 pop %ecx <== NOT EXECUTED 10a233: 50 push %eax <== NOT EXECUTED 10a234: 68 34 08 15 00 push $0x150834 <== NOT EXECUTED 10a239: e8 ee 24 00 00 call 10c72c <== NOT EXECUTED ); printk( "task stack area (%lu Bytes): 0x%08lx .. 0x%08lx\n", (unsigned long) stack->size, (unsigned long) stack->area, (unsigned long) ((char *) stack->area + stack->size) 10a23e: 8b 8b c4 00 00 00 mov 0xc4(%ebx),%ecx <== NOT EXECUTED 10a244: 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( 10a24a: 8d 1c 01 lea (%ecx,%eax,1),%ebx <== NOT EXECUTED 10a24d: 53 push %ebx <== NOT EXECUTED 10a24e: 51 push %ecx <== NOT EXECUTED 10a24f: 50 push %eax <== NOT EXECUTED 10a250: 68 4a 08 15 00 push $0x15084a <== NOT EXECUTED 10a255: e8 d2 24 00 00 call 10c72c <== NOT EXECUTED "task stack area (%lu Bytes): 0x%08lx .. 0x%08lx\n", (unsigned long) stack->size, (unsigned long) stack->area, (unsigned long) ((char *) stack->area + stack->size) ); if (!pattern_ok) { 10a25a: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 10a25d: 8a 55 d4 mov -0x2c(%ebp),%dl <== NOT EXECUTED 10a260: 84 d2 test %dl,%dl <== NOT EXECUTED 10a262: 75 17 jne 10a27b <== NOT EXECUTED * the following message out. */ void Stack_check_report_blown_task(Thread_Control *running, bool pattern_ok) { Stack_Control *stack = &running->Start.Initial_stack; void *pattern_area = Stack_check_Get_pattern_area(stack); 10a264: 8d 46 08 lea 0x8(%esi),%eax <== NOT EXECUTED (unsigned long) stack->size, (unsigned long) stack->area, (unsigned long) ((char *) stack->area + stack->size) ); if (!pattern_ok) { printk( 10a267: 83 c6 18 add $0x18,%esi <== NOT EXECUTED 10a26a: 56 push %esi <== NOT EXECUTED 10a26b: 50 push %eax <== NOT EXECUTED 10a26c: 6a 10 push $0x10 <== NOT EXECUTED 10a26e: 68 7b 08 15 00 push $0x15087b <== NOT EXECUTED 10a273: e8 b4 24 00 00 call 10c72c <== NOT EXECUTED 10a278: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_configuration_get_user_multiprocessing_table()->node ); } #endif rtems_fatal_error_occurred(0x81); 10a27b: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10a27e: 68 81 00 00 00 push $0x81 <== NOT EXECUTED 10a283: e8 d0 57 00 00 call 10fa58 <== NOT EXECUTED 0010a670 <_API_Mutex_Allocate>: #include void _API_Mutex_Allocate( API_Mutex_Control **the_mutex ) { 10a670: 55 push %ebp 10a671: 89 e5 mov %esp,%ebp 10a673: 57 push %edi 10a674: 56 push %esi 10a675: 83 ec 1c sub $0x1c,%esp CORE_mutex_Attributes attr = { CORE_MUTEX_NESTING_IS_ERROR, false, CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT, 0 }; 10a678: 8d 7d e8 lea -0x18(%ebp),%edi 10a67b: be 40 d5 11 00 mov $0x11d540,%esi 10a680: b9 04 00 00 00 mov $0x4,%ecx 10a685: f3 a5 rep movsl %ds:(%esi),%es:(%edi) mutex = (API_Mutex_Control *) _Objects_Allocate( &_API_Mutex_Information ); 10a687: 68 5c 39 12 00 push $0x12395c 10a68c: e8 ab 08 00 00 call 10af3c <_Objects_Allocate> <== ALWAYS TAKEN 10a691: 89 c6 mov %eax,%esi _CORE_mutex_Initialize( &mutex->Mutex, &attr, CORE_MUTEX_UNLOCKED ); 10a693: 83 c4 0c add $0xc,%esp 10a696: 6a 01 push $0x1 10a698: 8d 45 e8 lea -0x18(%ebp),%eax 10a69b: 50 push %eax 10a69c: 8d 46 10 lea 0x10(%esi),%eax 10a69f: 50 push %eax 10a6a0: e8 87 01 00 00 call 10a82c <_CORE_mutex_Initialize> <== ALWAYS TAKEN #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10a6a5: 0f b7 56 08 movzwl 0x8(%esi),%edx 10a6a9: a1 78 39 12 00 mov 0x123978,%eax 10a6ae: 89 34 90 mov %esi,(%eax,%edx,4) _Objects_Get_index( the_object->id ), the_object ); /* ASSERT: information->is_string == false */ the_object->name.name_u32 = name; 10a6b1: c7 46 0c 01 00 00 00 movl $0x1,0xc(%esi) _Objects_Open_u32( &_API_Mutex_Information, &mutex->Object, 1 ); *the_mutex = mutex; 10a6b8: 8b 45 08 mov 0x8(%ebp),%eax 10a6bb: 89 30 mov %esi,(%eax) 10a6bd: 83 c4 10 add $0x10,%esp } 10a6c0: 8d 65 f8 lea -0x8(%ebp),%esp 10a6c3: 5e pop %esi 10a6c4: 5f pop %edi 10a6c5: c9 leave 10a6c6: c3 ret 0010a6ec <_API_Mutex_Initialization>: #include void _API_Mutex_Initialization( uint32_t maximum_mutexes ) { 10a6ec: 55 push %ebp 10a6ed: 89 e5 mov %esp,%ebp 10a6ef: 83 ec 0c sub $0xc,%esp _Objects_Initialize_information( 10a6f2: 6a 00 push $0x0 10a6f4: 6a 00 push $0x0 10a6f6: 6a 74 push $0x74 10a6f8: ff 75 08 pushl 0x8(%ebp) 10a6fb: 6a 02 push $0x2 10a6fd: 6a 01 push $0x1 10a6ff: 68 5c 39 12 00 push $0x12395c 10a704: e8 9f 0c 00 00 call 10b3a8 <_Objects_Initialize_information> <== ALWAYS TAKEN 10a709: 83 c4 20 add $0x20,%esp , true, /* true if this is a global object class */ NULL /* Proxy extraction support callout */ #endif ); } 10a70c: c9 leave 10a70d: c3 ret 0010a6c8 <_API_Mutex_Lock>: #include void _API_Mutex_Lock( API_Mutex_Control *the_mutex ) { 10a6c8: 55 push %ebp 10a6c9: 89 e5 mov %esp,%ebp 10a6cb: 83 ec 14 sub $0x14,%esp 10a6ce: 8b 45 08 mov 0x8(%ebp),%eax ISR_Level level; _ISR_Disable( level ); 10a6d1: 9c pushf 10a6d2: fa cli 10a6d3: 5a pop %edx _CORE_mutex_Seize( 10a6d4: 52 push %edx 10a6d5: 6a 00 push $0x0 10a6d7: 6a 01 push $0x1 10a6d9: ff 70 08 pushl 0x8(%eax) 10a6dc: 83 c0 10 add $0x10,%eax 10a6df: 50 push %eax 10a6e0: e8 30 02 00 00 call 10a915 <_CORE_mutex_Seize> <== ALWAYS TAKEN 10a6e5: 83 c4 20 add $0x20,%esp the_mutex->Object.id, true, 0, level ); } 10a6e8: c9 leave 10a6e9: c3 ret 0010a710 <_API_Mutex_Unlock>: #include void _API_Mutex_Unlock( API_Mutex_Control *the_mutex ) { 10a710: 55 push %ebp 10a711: 89 e5 mov %esp,%ebp 10a713: 83 ec 0c sub $0xc,%esp 10a716: 8b 45 08 mov 0x8(%ebp),%eax rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10a719: 8b 15 74 38 12 00 mov 0x123874,%edx 10a71f: 42 inc %edx 10a720: 89 15 74 38 12 00 mov %edx,0x123874 _Thread_Disable_dispatch(); _CORE_mutex_Surrender( 10a726: 6a 00 push $0x0 10a728: ff 70 08 pushl 0x8(%eax) 10a72b: 83 c0 10 add $0x10,%eax 10a72e: 50 push %eax 10a72f: e8 78 02 00 00 call 10a9ac <_CORE_mutex_Surrender> <== ALWAYS TAKEN &the_mutex->Mutex, the_mutex->Object.id, NULL ); _Thread_Enable_dispatch(); 10a734: 83 c4 10 add $0x10,%esp } 10a737: c9 leave _CORE_mutex_Surrender( &the_mutex->Mutex, the_mutex->Object.id, NULL ); _Thread_Enable_dispatch(); 10a738: e9 d8 13 00 00 jmp 10bb15 <_Thread_Enable_dispatch> 0010a658 <_API_extensions_Add>: */ void _API_extensions_Add( API_extensions_Control *the_extension ) { 10a658: 55 push %ebp 10a659: 89 e5 mov %esp,%ebp 10a65b: 83 ec 10 sub $0x10,%esp _Chain_Append( &_API_extensions_List, &the_extension->Node ); 10a65e: ff 75 08 pushl 0x8(%ebp) 10a661: 68 90 3a 12 00 push $0x123a90 10a666: e8 d5 00 00 00 call 10a740 <_Chain_Append> <== ALWAYS TAKEN 10a66b: 83 c4 10 add $0x10,%esp } 10a66e: c9 leave 10a66f: c3 ret 0010a60b <_API_extensions_Run_postdriver>: * * _API_extensions_Run_postdriver */ void _API_extensions_Run_postdriver( void ) { 10a60b: 55 push %ebp 10a60c: 89 e5 mov %esp,%ebp 10a60e: 53 push %ebx 10a60f: 83 ec 04 sub $0x4,%esp Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; 10a612: 8b 1d 90 3a 12 00 mov 0x123a90,%ebx 10a618: eb 05 jmp 10a61f <_API_extensions_Run_postdriver+0x14> <== ALWAYS TAKEN * Currently all APIs configure this hook so it is always non-NULL. */ #if defined(FUNCTIONALITY_NOT_CURRENTLY_USED_BY_ANY_API) if ( the_extension->postdriver_hook ) #endif (*the_extension->postdriver_hook)(); 10a61a: ff 53 08 call *0x8(%ebx) Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; !_Chain_Is_tail( &_API_extensions_List, the_node ) ; the_node = the_node->next ) { 10a61d: 8b 1b mov (%ebx),%ebx */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10a61f: 81 fb 94 3a 12 00 cmp $0x123a94,%ebx 10a625: 75 f3 jne 10a61a <_API_extensions_Run_postdriver+0xf> #if defined(FUNCTIONALITY_NOT_CURRENTLY_USED_BY_ANY_API) if ( the_extension->postdriver_hook ) #endif (*the_extension->postdriver_hook)(); } } 10a627: 58 pop %eax 10a628: 5b pop %ebx 10a629: c9 leave 10a62a: c3 ret 0010a62b <_API_extensions_Run_postswitch>: * * _API_extensions_Run_postswitch */ void _API_extensions_Run_postswitch( void ) { 10a62b: 55 push %ebp 10a62c: 89 e5 mov %esp,%ebp 10a62e: 53 push %ebx 10a62f: 83 ec 04 sub $0x4,%esp Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; 10a632: 8b 1d 90 3a 12 00 mov 0x123a90,%ebx 10a638: eb 11 jmp 10a64b <_API_extensions_Run_postswitch+0x20> <== ALWAYS TAKEN * provide this hook. */ #if defined(RTEMS_ITRON_API) if ( the_extension->postswitch_hook ) #endif (*the_extension->postswitch_hook)( _Thread_Executing ); 10a63a: 83 ec 0c sub $0xc,%esp 10a63d: ff 35 30 39 12 00 pushl 0x123930 10a643: ff 53 0c call *0xc(%ebx) Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; !_Chain_Is_tail( &_API_extensions_List, the_node ) ; the_node = the_node->next ) { 10a646: 8b 1b mov (%ebx),%ebx 10a648: 83 c4 10 add $0x10,%esp 10a64b: 81 fb 94 3a 12 00 cmp $0x123a94,%ebx 10a651: 75 e7 jne 10a63a <_API_extensions_Run_postswitch+0xf> #if defined(RTEMS_ITRON_API) if ( the_extension->postswitch_hook ) #endif (*the_extension->postswitch_hook)( _Thread_Executing ); } } 10a653: 8b 5d fc mov -0x4(%ebp),%ebx 10a656: c9 leave 10a657: c3 ret 0010fc40 <_CORE_barrier_Release>: #else Objects_Id id __attribute__((unused)), CORE_barrier_API_mp_support_callout api_barrier_mp_support __attribute__((unused)) #endif ) { 10fc40: 55 push %ebp 10fc41: 89 e5 mov %esp,%ebp 10fc43: 56 push %esi 10fc44: 53 push %ebx 10fc45: 8b 75 08 mov 0x8(%ebp),%esi Thread_Control *the_thread; uint32_t count; count = 0; while ( (the_thread = _Thread_queue_Dequeue(&the_barrier->Wait_queue)) ) { 10fc48: 31 db xor %ebx,%ebx 10fc4a: eb 01 jmp 10fc4d <_CORE_barrier_Release+0xd> <== ALWAYS TAKEN #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) (*api_barrier_mp_support) ( the_thread, id ); #endif count++; 10fc4c: 43 inc %ebx { Thread_Control *the_thread; uint32_t count; count = 0; while ( (the_thread = _Thread_queue_Dequeue(&the_barrier->Wait_queue)) ) { 10fc4d: 83 ec 0c sub $0xc,%esp 10fc50: 56 push %esi 10fc51: e8 26 c2 ff ff call 10be7c <_Thread_queue_Dequeue> 10fc56: 83 c4 10 add $0x10,%esp 10fc59: 85 c0 test %eax,%eax 10fc5b: 75 ef jne 10fc4c <_CORE_barrier_Release+0xc> if ( !_Objects_Is_local_id( the_thread->Object.id ) ) (*api_barrier_mp_support) ( the_thread, id ); #endif count++; } the_barrier->number_of_waiting_threads = 0; 10fc5d: c7 46 48 00 00 00 00 movl $0x0,0x48(%esi) return count; } 10fc64: 89 d8 mov %ebx,%eax 10fc66: 8d 65 f8 lea -0x8(%ebp),%esp 10fc69: 5b pop %ebx 10fc6a: 5e pop %esi 10fc6b: c9 leave 10fc6c: c3 ret 0010fc70 <_CORE_barrier_Wait>: Objects_Id id, bool wait, Watchdog_Interval timeout, CORE_barrier_API_mp_support_callout api_barrier_mp_support ) { 10fc70: 55 push %ebp 10fc71: 89 e5 mov %esp,%ebp 10fc73: 57 push %edi 10fc74: 56 push %esi 10fc75: 53 push %ebx 10fc76: 83 ec 1c sub $0x1c,%esp 10fc79: 8b 45 08 mov 0x8(%ebp),%eax 10fc7c: 8b 4d 0c mov 0xc(%ebp),%ecx 10fc7f: 8b 75 14 mov 0x14(%ebp),%esi 10fc82: 8b 7d 18 mov 0x18(%ebp),%edi Thread_Control *executing; ISR_Level level; executing = _Thread_Executing; 10fc85: 8b 15 30 39 12 00 mov 0x123930,%edx executing->Wait.return_code = CORE_BARRIER_STATUS_SUCCESSFUL; 10fc8b: c7 42 34 00 00 00 00 movl $0x0,0x34(%edx) _ISR_Disable( level ); 10fc92: 9c pushf 10fc93: fa cli 10fc94: 8f 45 e4 popl -0x1c(%ebp) the_barrier->number_of_waiting_threads++; 10fc97: 8b 58 48 mov 0x48(%eax),%ebx 10fc9a: 43 inc %ebx 10fc9b: 89 58 48 mov %ebx,0x48(%eax) if ( _CORE_barrier_Is_automatic( &the_barrier->Attributes ) ) { 10fc9e: 83 78 40 00 cmpl $0x0,0x40(%eax) 10fca2: 75 25 jne 10fcc9 <_CORE_barrier_Wait+0x59> if ( the_barrier->number_of_waiting_threads == the_barrier->Attributes.maximum_count) { 10fca4: 3b 58 44 cmp 0x44(%eax),%ebx 10fca7: 75 20 jne 10fcc9 <_CORE_barrier_Wait+0x59> executing->Wait.return_code = CORE_BARRIER_STATUS_AUTOMATICALLY_RELEASED; 10fca9: c7 42 34 01 00 00 00 movl $0x1,0x34(%edx) _ISR_Enable( level ); 10fcb0: ff 75 e4 pushl -0x1c(%ebp) 10fcb3: 9d popf _CORE_barrier_Release( the_barrier, id, api_barrier_mp_support ); 10fcb4: 89 7d 10 mov %edi,0x10(%ebp) 10fcb7: 89 4d 0c mov %ecx,0xc(%ebp) 10fcba: 89 45 08 mov %eax,0x8(%ebp) executing->Wait.queue = &the_barrier->Wait_queue; executing->Wait.id = id; _ISR_Enable( level ); _Thread_queue_Enqueue( &the_barrier->Wait_queue, timeout ); } 10fcbd: 83 c4 1c add $0x1c,%esp 10fcc0: 5b pop %ebx 10fcc1: 5e pop %esi 10fcc2: 5f pop %edi 10fcc3: c9 leave if ( _CORE_barrier_Is_automatic( &the_barrier->Attributes ) ) { if ( the_barrier->number_of_waiting_threads == the_barrier->Attributes.maximum_count) { executing->Wait.return_code = CORE_BARRIER_STATUS_AUTOMATICALLY_RELEASED; _ISR_Enable( level ); _CORE_barrier_Release( the_barrier, id, api_barrier_mp_support ); 10fcc4: e9 77 ff ff ff jmp 10fc40 <_CORE_barrier_Release> <== ALWAYS TAKEN 10fcc9: c7 40 30 01 00 00 00 movl $0x1,0x30(%eax) return; } } _Thread_queue_Enter_critical_section( &the_barrier->Wait_queue ); executing->Wait.queue = &the_barrier->Wait_queue; 10fcd0: 89 42 44 mov %eax,0x44(%edx) executing->Wait.id = id; 10fcd3: 89 4a 20 mov %ecx,0x20(%edx) _ISR_Enable( level ); 10fcd6: ff 75 e4 pushl -0x1c(%ebp) 10fcd9: 9d popf _Thread_queue_Enqueue( &the_barrier->Wait_queue, timeout ); 10fcda: c7 45 10 3c c2 10 00 movl $0x10c23c,0x10(%ebp) 10fce1: 89 75 0c mov %esi,0xc(%ebp) 10fce4: 89 45 08 mov %eax,0x8(%ebp) } 10fce7: 83 c4 1c add $0x1c,%esp 10fcea: 5b pop %ebx 10fceb: 5e pop %esi 10fcec: 5f pop %edi 10fced: c9 leave _Thread_queue_Enter_critical_section( &the_barrier->Wait_queue ); executing->Wait.queue = &the_barrier->Wait_queue; executing->Wait.id = id; _ISR_Enable( level ); _Thread_queue_Enqueue( &the_barrier->Wait_queue, timeout ); 10fcee: e9 8d c2 ff ff jmp 10bf80 <_Thread_queue_Enqueue_with_handler> 00116d70 <_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 ) { 116d70: 55 push %ebp 116d71: 89 e5 mov %esp,%ebp 116d73: 57 push %edi 116d74: 56 push %esi 116d75: 53 push %ebx 116d76: 83 ec 1c sub $0x1c,%esp 116d79: 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 ) { 116d7c: b8 01 00 00 00 mov $0x1,%eax 116d81: 8b 55 10 mov 0x10(%ebp),%edx 116d84: 3b 53 4c cmp 0x4c(%ebx),%edx 116d87: 77 4c ja 116dd5 <_CORE_message_queue_Broadcast+0x65> <== ALWAYS TAKEN * There must be no pending messages if there is a thread waiting to * receive a message. */ number_broadcasted = 0; while ((the_thread = _Thread_queue_Dequeue(&the_message_queue->Wait_queue))) { 116d89: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) * 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 ) { 116d90: 83 7b 48 00 cmpl $0x0,0x48(%ebx) 116d94: 74 23 je 116db9 <_CORE_message_queue_Broadcast+0x49> *count = 0; 116d96: 8b 45 1c mov 0x1c(%ebp),%eax 116d99: c7 00 00 00 00 00 movl $0x0,(%eax) 116d9f: eb 32 jmp 116dd3 <_CORE_message_queue_Broadcast+0x63> <== ALWAYS TAKEN */ number_broadcasted = 0; while ((the_thread = _Thread_queue_Dequeue(&the_message_queue->Wait_queue))) { waitp = &the_thread->Wait; number_broadcasted += 1; 116da1: ff 45 e4 incl -0x1c(%ebp) const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 116da4: 8b 42 2c mov 0x2c(%edx),%eax 116da7: 89 c7 mov %eax,%edi 116da9: 8b 75 0c mov 0xc(%ebp),%esi 116dac: 8b 4d 10 mov 0x10(%ebp),%ecx 116daf: f3 a4 rep movsb %ds:(%esi),%es:(%edi) buffer, waitp->return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; 116db1: 8b 42 28 mov 0x28(%edx),%eax 116db4: 8b 55 10 mov 0x10(%ebp),%edx 116db7: 89 10 mov %edx,(%eax) * There must be no pending messages if there is a thread waiting to * receive a message. */ number_broadcasted = 0; while ((the_thread = _Thread_queue_Dequeue(&the_message_queue->Wait_queue))) { 116db9: 83 ec 0c sub $0xc,%esp 116dbc: 53 push %ebx 116dbd: e8 8e 20 00 00 call 118e50 <_Thread_queue_Dequeue> 116dc2: 89 c2 mov %eax,%edx /* * There must be no pending messages if there is a thread waiting to * receive a message. */ number_broadcasted = 0; while ((the_thread = 116dc4: 83 c4 10 add $0x10,%esp 116dc7: 85 c0 test %eax,%eax 116dc9: 75 d6 jne 116da1 <_CORE_message_queue_Broadcast+0x31> if ( !_Objects_Is_local_id( the_thread->Object.id ) ) (*api_message_queue_mp_support) ( the_thread, id ); #endif } *count = number_broadcasted; 116dcb: 8b 55 e4 mov -0x1c(%ebp),%edx 116dce: 8b 45 1c mov 0x1c(%ebp),%eax 116dd1: 89 10 mov %edx,(%eax) 116dd3: 31 c0 xor %eax,%eax return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } 116dd5: 8d 65 f4 lea -0xc(%ebp),%esp 116dd8: 5b pop %ebx 116dd9: 5e pop %esi 116dda: 5f pop %edi 116ddb: c9 leave 116ddc: c3 ret 00113cfc <_CORE_message_queue_Close>: void _CORE_message_queue_Close( CORE_message_queue_Control *the_message_queue, Thread_queue_Flush_callout remote_extract_callout, uint32_t status ) { 113cfc: 55 push %ebp 113cfd: 89 e5 mov %esp,%ebp 113cff: 53 push %ebx 113d00: 83 ec 08 sub $0x8,%esp 113d03: 8b 5d 08 mov 0x8(%ebp),%ebx /* * This will flush blocked threads whether they were blocked on * a send or receive. */ _Thread_queue_Flush( 113d06: ff 75 10 pushl 0x10(%ebp) 113d09: ff 75 0c pushl 0xc(%ebp) 113d0c: 53 push %ebx 113d0d: e8 e6 ba ff ff call 10f7f8 <_Thread_queue_Flush> * This removes all messages from the pending message queue. Since * we just flushed all waiting threads, we don't have to worry about * the flush satisfying any blocked senders as a side-effect. */ if ( the_message_queue->number_of_pending_messages != 0 ) 113d12: 83 c4 10 add $0x10,%esp 113d15: 83 7b 48 00 cmpl $0x0,0x48(%ebx) 113d19: 74 0c je 113d27 <_CORE_message_queue_Close+0x2b> (void) _CORE_message_queue_Flush_support( the_message_queue ); 113d1b: 83 ec 0c sub $0xc,%esp 113d1e: 53 push %ebx 113d1f: e8 14 00 00 00 call 113d38 <_CORE_message_queue_Flush_support> <== ALWAYS TAKEN 113d24: 83 c4 10 add $0x10,%esp (void) _Workspace_Free( the_message_queue->message_buffers ); 113d27: 8b 43 5c mov 0x5c(%ebx),%eax 113d2a: 89 45 08 mov %eax,0x8(%ebp) } 113d2d: 8b 5d fc mov -0x4(%ebp),%ebx 113d30: c9 leave */ if ( the_message_queue->number_of_pending_messages != 0 ) (void) _CORE_message_queue_Flush_support( the_message_queue ); (void) _Workspace_Free( the_message_queue->message_buffers ); 113d31: e9 63 c4 ff ff jmp 110199 <_Workspace_Free> 00116e1c <_CORE_message_queue_Flush>: */ uint32_t _CORE_message_queue_Flush( CORE_message_queue_Control *the_message_queue ) { 116e1c: 55 push %ebp 116e1d: 89 e5 mov %esp,%ebp 116e1f: 83 ec 08 sub $0x8,%esp 116e22: 8b 45 08 mov 0x8(%ebp),%eax if ( the_message_queue->number_of_pending_messages != 0 ) 116e25: 83 78 48 00 cmpl $0x0,0x48(%eax) 116e29: 75 04 jne 116e2f <_CORE_message_queue_Flush+0x13> return _CORE_message_queue_Flush_support( the_message_queue ); else return 0; } 116e2b: 31 c0 xor %eax,%eax 116e2d: c9 leave 116e2e: c3 ret uint32_t _CORE_message_queue_Flush( CORE_message_queue_Control *the_message_queue ) { if ( the_message_queue->number_of_pending_messages != 0 ) return _CORE_message_queue_Flush_support( the_message_queue ); 116e2f: 89 45 08 mov %eax,0x8(%ebp) else return 0; } 116e32: c9 leave uint32_t _CORE_message_queue_Flush( CORE_message_queue_Control *the_message_queue ) { if ( the_message_queue->number_of_pending_messages != 0 ) return _CORE_message_queue_Flush_support( the_message_queue ); 116e33: e9 00 00 00 00 jmp 116e38 <_CORE_message_queue_Flush_support> <== ALWAYS TAKEN 001121b4 <_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 ) { 1121b4: 55 push %ebp 1121b5: 89 e5 mov %esp,%ebp 1121b7: 57 push %edi 1121b8: 56 push %esi 1121b9: 53 push %ebx 1121ba: 83 ec 0c sub $0xc,%esp 1121bd: 8b 5d 08 mov 0x8(%ebp),%ebx 1121c0: 8b 75 10 mov 0x10(%ebp),%esi 1121c3: 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; 1121c6: 89 73 44 mov %esi,0x44(%ebx) the_message_queue->number_of_pending_messages = 0; 1121c9: c7 43 48 00 00 00 00 movl $0x0,0x48(%ebx) the_message_queue->maximum_message_size = maximum_message_size; 1121d0: 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)) { 1121d3: 89 d0 mov %edx,%eax 1121d5: f6 c2 03 test $0x3,%dl 1121d8: 74 0a je 1121e4 <_CORE_message_queue_Initialize+0x30> allocated_message_size += sizeof(uint32_t); 1121da: 8d 42 04 lea 0x4(%edx),%eax allocated_message_size &= ~(sizeof(uint32_t) - 1); 1121dd: 83 e0 fc and $0xfffffffc,%eax } if (allocated_message_size < maximum_message_size) 1121e0: 39 d0 cmp %edx,%eax 1121e2: 72 5f jb 112243 <_CORE_message_queue_Initialize+0x8f> <== ALWAYS 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)); 1121e4: 8d 78 10 lea 0x10(%eax),%edi /* * Calculate how much total memory is required for message buffering and * check for overflow on the multiplication. */ message_buffering_required = (size_t) maximum_pending_messages * 1121e7: 89 fa mov %edi,%edx 1121e9: 0f af d6 imul %esi,%edx (allocated_message_size + sizeof(CORE_message_queue_Buffer_control)); if (message_buffering_required < allocated_message_size) 1121ec: 39 c2 cmp %eax,%edx 1121ee: 72 53 jb 112243 <_CORE_message_queue_Initialize+0x8f> <== ALWAYS TAKEN return false; /* * Attempt to allocate the message memory */ the_message_queue->message_buffers = (CORE_message_queue_Buffer *) 1121f0: 83 ec 0c sub $0xc,%esp 1121f3: 52 push %edx 1121f4: e8 e3 24 00 00 call 1146dc <_Workspace_Allocate> 1121f9: 89 43 5c mov %eax,0x5c(%ebx) _Workspace_Allocate( message_buffering_required ); if (the_message_queue->message_buffers == 0) 1121fc: 83 c4 10 add $0x10,%esp 1121ff: 85 c0 test %eax,%eax 112201: 74 40 je 112243 <_CORE_message_queue_Initialize+0x8f> /* * Initialize the pool of inactive messages, pending messages, * and set of waiting threads. */ _Chain_Initialize ( 112203: 57 push %edi 112204: 56 push %esi 112205: 50 push %eax 112206: 8d 43 60 lea 0x60(%ebx),%eax 112209: 50 push %eax 11220a: e8 d1 3c 00 00 call 115ee0 <_Chain_Initialize> <== ALWAYS TAKEN */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 11220f: 8d 43 54 lea 0x54(%ebx),%eax 112212: 89 43 50 mov %eax,0x50(%ebx) the_chain->permanent_null = NULL; 112215: c7 43 54 00 00 00 00 movl $0x0,0x54(%ebx) the_chain->last = _Chain_Head(the_chain); 11221c: 8d 43 50 lea 0x50(%ebx),%eax 11221f: 89 43 58 mov %eax,0x58(%ebx) allocated_message_size + sizeof( CORE_message_queue_Buffer_control ) ); _Chain_Initialize_empty( &the_message_queue->Pending_messages ); _Thread_queue_Initialize( 112222: 6a 06 push $0x6 112224: 68 80 00 00 00 push $0x80 112229: 8b 45 0c mov 0xc(%ebp),%eax 11222c: 83 38 01 cmpl $0x1,(%eax) 11222f: 0f 94 c0 sete %al 112232: 0f b6 c0 movzbl %al,%eax 112235: 50 push %eax 112236: 53 push %ebx 112237: e8 ac 1b 00 00 call 113de8 <_Thread_queue_Initialize> 11223c: b0 01 mov $0x1,%al THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO, STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; 11223e: 83 c4 20 add $0x20,%esp 112241: eb 02 jmp 112245 <_CORE_message_queue_Initialize+0x91> <== ALWAYS TAKEN 112243: 31 c0 xor %eax,%eax } 112245: 8d 65 f4 lea -0xc(%ebp),%esp 112248: 5b pop %ebx 112249: 5e pop %esi 11224a: 5f pop %edi 11224b: c9 leave 11224c: c3 ret 0010e308 <_CORE_message_queue_Insert_message>: void _CORE_message_queue_Insert_message( CORE_message_queue_Control *the_message_queue, CORE_message_queue_Buffer_control *the_message, CORE_message_queue_Submit_types submit_type ) { 10e308: 55 push %ebp 10e309: 89 e5 mov %esp,%ebp 10e30b: 53 push %ebx 10e30c: 8b 55 08 mov 0x8(%ebp),%edx 10e30f: 8b 45 0c mov 0xc(%ebp),%eax #endif _CORE_message_queue_Set_message_priority( the_message, submit_type ); #if !defined(RTEMS_SCORE_COREMSG_ENABLE_MESSAGE_PRIORITY) _ISR_Disable( level ); 10e312: 9c pushf 10e313: fa cli 10e314: 5b pop %ebx SET_NOTIFY(); the_message_queue->number_of_pending_messages++; 10e315: ff 42 48 incl 0x48(%edx) if ( submit_type == CORE_MESSAGE_QUEUE_SEND_REQUEST ) 10e318: 81 7d 10 ff ff ff 7f cmpl $0x7fffffff,0x10(%ebp) 10e31f: 75 12 jne 10e333 <_CORE_message_queue_Insert_message+0x2b> Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 10e321: 8d 4a 54 lea 0x54(%edx),%ecx 10e324: 89 08 mov %ecx,(%eax) old_last_node = the_chain->last; 10e326: 8b 4a 58 mov 0x58(%edx),%ecx the_chain->last = the_node; 10e329: 89 42 58 mov %eax,0x58(%edx) old_last_node->next = the_node; 10e32c: 89 01 mov %eax,(%ecx) the_node->previous = old_last_node; 10e32e: 89 48 04 mov %ecx,0x4(%eax) 10e331: eb 11 jmp 10e344 <_CORE_message_queue_Insert_message+0x3c> <== ALWAYS TAKEN */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Head( Chain_Control *the_chain ) { return (Chain_Node *) the_chain; 10e333: 8d 4a 50 lea 0x50(%edx),%ecx Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 10e336: 89 48 04 mov %ecx,0x4(%eax) before_node = after_node->next; 10e339: 8b 4a 50 mov 0x50(%edx),%ecx after_node->next = the_node; 10e33c: 89 42 50 mov %eax,0x50(%edx) the_node->next = before_node; 10e33f: 89 08 mov %ecx,(%eax) before_node->previous = the_node; 10e341: 89 41 04 mov %eax,0x4(%ecx) _CORE_message_queue_Append_unprotected(the_message_queue, the_message); else _CORE_message_queue_Prepend_unprotected(the_message_queue, the_message); _ISR_Enable( level ); 10e344: 53 push %ebx 10e345: 9d popf * the message is actually in the queue at this point. */ if ( notify && the_message_queue->notify_handler ) (*the_message_queue->notify_handler)(the_message_queue->notify_argument); #endif } 10e346: 5b pop %ebx 10e347: c9 leave 10e348: c3 ret 00112250 <_CORE_message_queue_Seize>: void *buffer, size_t *size_p, bool wait, Watchdog_Interval timeout ) { 112250: 55 push %ebp 112251: 89 e5 mov %esp,%ebp 112253: 57 push %edi 112254: 56 push %esi 112255: 53 push %ebx 112256: 83 ec 2c sub $0x2c,%esp 112259: 8b 45 08 mov 0x8(%ebp),%eax 11225c: 8b 55 0c mov 0xc(%ebp),%edx 11225f: 89 55 dc mov %edx,-0x24(%ebp) 112262: 8b 55 10 mov 0x10(%ebp),%edx 112265: 89 55 e0 mov %edx,-0x20(%ebp) 112268: 8b 7d 14 mov 0x14(%ebp),%edi 11226b: 8b 55 1c mov 0x1c(%ebp),%edx 11226e: 89 55 d4 mov %edx,-0x2c(%ebp) 112271: 8a 55 18 mov 0x18(%ebp),%dl 112274: 88 55 db mov %dl,-0x25(%ebp) ISR_Level level; CORE_message_queue_Buffer_control *the_message; Thread_Control *executing; executing = _Thread_Executing; 112277: 8b 0d 78 b3 12 00 mov 0x12b378,%ecx executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; 11227d: c7 41 34 00 00 00 00 movl $0x0,0x34(%ecx) _ISR_Disable( level ); 112284: 9c pushf 112285: fa cli 112286: 8f 45 e4 popl -0x1c(%ebp) */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 112289: 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; 11228c: 8d 58 54 lea 0x54(%eax),%ebx 11228f: 39 da cmp %ebx,%edx 112291: 74 47 je 1122da <_CORE_message_queue_Seize+0x8a> { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; 112293: 8b 32 mov (%edx),%esi the_chain->first = new_first; 112295: 89 70 50 mov %esi,0x50(%eax) new_first->previous = _Chain_Head(the_chain); 112298: 8d 58 50 lea 0x50(%eax),%ebx 11229b: 89 5e 04 mov %ebx,0x4(%esi) the_message = _CORE_message_queue_Get_pending_message( the_message_queue ); if ( the_message != NULL ) { 11229e: 85 d2 test %edx,%edx 1122a0: 74 38 je 1122da <_CORE_message_queue_Seize+0x8a> <== ALWAYS TAKEN the_message_queue->number_of_pending_messages -= 1; 1122a2: ff 48 48 decl 0x48(%eax) _ISR_Enable( level ); 1122a5: ff 75 e4 pushl -0x1c(%ebp) 1122a8: 9d popf *size_p = the_message->Contents.size; 1122a9: 8b 4a 08 mov 0x8(%edx),%ecx 1122ac: 89 0f mov %ecx,(%edi) _Thread_Executing->Wait.count = 1122ae: 8b 0d 78 b3 12 00 mov 0x12b378,%ecx 1122b4: c7 41 24 00 00 00 00 movl $0x0,0x24(%ecx) const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 1122bb: 8d 72 0c lea 0xc(%edx),%esi 1122be: 8b 0f mov (%edi),%ecx 1122c0: 8b 7d e0 mov -0x20(%ebp),%edi 1122c3: 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 ); 1122c5: 89 55 0c mov %edx,0xc(%ebp) 1122c8: 83 c0 60 add $0x60,%eax 1122cb: 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 ); } 1122ce: 83 c4 2c add $0x2c,%esp 1122d1: 5b pop %ebx 1122d2: 5e pop %esi 1122d3: 5f pop %edi 1122d4: c9 leave 1122d5: e9 5a fe ff ff jmp 112134 <_Chain_Append> <== ALWAYS TAKEN return; } #endif } if ( !wait ) { 1122da: 80 7d db 00 cmpb $0x0,-0x25(%ebp) 1122de: 75 13 jne 1122f3 <_CORE_message_queue_Seize+0xa3> _ISR_Enable( level ); 1122e0: ff 75 e4 pushl -0x1c(%ebp) 1122e3: 9d popf executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT; 1122e4: 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 ); } 1122eb: 83 c4 2c add $0x2c,%esp 1122ee: 5b pop %ebx 1122ef: 5e pop %esi 1122f0: 5f pop %edi 1122f1: c9 leave 1122f2: 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; 1122f3: 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; 1122fa: 89 41 44 mov %eax,0x44(%ecx) executing->Wait.id = id; 1122fd: 8b 55 dc mov -0x24(%ebp),%edx 112300: 89 51 20 mov %edx,0x20(%ecx) executing->Wait.return_argument_second.mutable_object = buffer; 112303: 8b 55 e0 mov -0x20(%ebp),%edx 112306: 89 51 2c mov %edx,0x2c(%ecx) executing->Wait.return_argument = size_p; 112309: 89 79 28 mov %edi,0x28(%ecx) /* Wait.count will be filled in with the message priority */ _ISR_Enable( level ); 11230c: ff 75 e4 pushl -0x1c(%ebp) 11230f: 9d popf _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); 112310: c7 45 10 8c 3e 11 00 movl $0x113e8c,0x10(%ebp) 112317: 8b 55 d4 mov -0x2c(%ebp),%edx 11231a: 89 55 0c mov %edx,0xc(%ebp) 11231d: 89 45 08 mov %eax,0x8(%ebp) } 112320: 83 c4 2c add $0x2c,%esp 112323: 5b pop %ebx 112324: 5e pop %esi 112325: 5f pop %edi 112326: 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 ); 112327: e9 a4 18 00 00 jmp 113bd0 <_Thread_queue_Enqueue_with_handler> 0010a788 <_CORE_message_queue_Submit>: #endif CORE_message_queue_Submit_types submit_type, bool wait, Watchdog_Interval timeout ) { 10a788: 55 push %ebp 10a789: 89 e5 mov %esp,%ebp 10a78b: 57 push %edi 10a78c: 56 push %esi 10a78d: 53 push %ebx 10a78e: 83 ec 0c sub $0xc,%esp 10a791: 8b 5d 08 mov 0x8(%ebp),%ebx 10a794: 8b 75 0c mov 0xc(%ebp),%esi CORE_message_queue_Buffer_control *the_message; Thread_Control *the_thread; if ( size > the_message_queue->maximum_message_size ) { 10a797: b8 01 00 00 00 mov $0x1,%eax 10a79c: 8b 55 10 mov 0x10(%ebp),%edx 10a79f: 3b 53 4c cmp 0x4c(%ebx),%edx 10a7a2: 77 71 ja 10a815 <_CORE_message_queue_Submit+0x8d> <== ALWAYS TAKEN } /* * Is there a thread currently waiting on this message queue? */ if ( the_message_queue->number_of_pending_messages == 0 ) { 10a7a4: 83 7b 48 00 cmpl $0x0,0x48(%ebx) 10a7a8: 75 2e jne 10a7d8 <_CORE_message_queue_Submit+0x50> the_thread = _Thread_queue_Dequeue( &the_message_queue->Wait_queue ); 10a7aa: 83 ec 0c sub $0xc,%esp 10a7ad: 53 push %ebx 10a7ae: e8 c9 16 00 00 call 10be7c <_Thread_queue_Dequeue> 10a7b3: 89 c2 mov %eax,%edx if ( the_thread ) { 10a7b5: 83 c4 10 add $0x10,%esp 10a7b8: 85 c0 test %eax,%eax 10a7ba: 74 1c je 10a7d8 <_CORE_message_queue_Submit+0x50> const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 10a7bc: 8b 40 2c mov 0x2c(%eax),%eax 10a7bf: 89 c7 mov %eax,%edi 10a7c1: 8b 4d 10 mov 0x10(%ebp),%ecx 10a7c4: f3 a4 rep movsb %ds:(%esi),%es:(%edi) _CORE_message_queue_Copy_buffer( buffer, the_thread->Wait.return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; 10a7c6: 8b 42 28 mov 0x28(%edx),%eax 10a7c9: 8b 4d 10 mov 0x10(%ebp),%ecx 10a7cc: 89 08 mov %ecx,(%eax) the_thread->Wait.count = (uint32_t) submit_type; 10a7ce: 8b 45 1c mov 0x1c(%ebp),%eax 10a7d1: 89 42 24 mov %eax,0x24(%edx) 10a7d4: 31 c0 xor %eax,%eax #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) (*api_message_queue_mp_support) ( the_thread, id ); #endif return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; 10a7d6: eb 3d jmp 10a815 <_CORE_message_queue_Submit+0x8d> <== ALWAYS TAKEN /* * No one waiting on the message queue at this time, so attempt to * queue the message up for a future receive. */ if ( the_message_queue->number_of_pending_messages < the_message_queue->maximum_pending_messages ) { 10a7d8: 8b 53 48 mov 0x48(%ebx),%edx 10a7db: b8 02 00 00 00 mov $0x2,%eax 10a7e0: 3b 53 44 cmp 0x44(%ebx),%edx 10a7e3: 73 30 jae 10a815 <_CORE_message_queue_Submit+0x8d> RTEMS_INLINE_ROUTINE CORE_message_queue_Buffer_control * _CORE_message_queue_Allocate_message_buffer ( CORE_message_queue_Control *the_message_queue ) { return (CORE_message_queue_Buffer_control *) 10a7e5: 83 ec 0c sub $0xc,%esp 10a7e8: 8d 43 60 lea 0x60(%ebx),%eax 10a7eb: 50 push %eax 10a7ec: e8 73 ff ff ff call 10a764 <_Chain_Get> <== ALWAYS TAKEN 10a7f1: 89 c2 mov %eax,%edx const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 10a7f3: 8d 40 0c lea 0xc(%eax),%eax 10a7f6: 89 c7 mov %eax,%edi 10a7f8: 8b 4d 10 mov 0x10(%ebp),%ecx 10a7fb: f3 a4 rep movsb %ds:(%esi),%es:(%edi) _CORE_message_queue_Copy_buffer( buffer, the_message->Contents.buffer, size ); the_message->Contents.size = size; 10a7fd: 8b 4d 10 mov 0x10(%ebp),%ecx 10a800: 89 4a 08 mov %ecx,0x8(%edx) _CORE_message_queue_Set_message_priority( the_message, submit_type ); _CORE_message_queue_Insert_message( 10a803: 83 c4 0c add $0xc,%esp 10a806: ff 75 1c pushl 0x1c(%ebp) 10a809: 52 push %edx 10a80a: 53 push %ebx 10a80b: e8 f8 3a 00 00 call 10e308 <_CORE_message_queue_Insert_message> 10a810: 31 c0 xor %eax,%eax the_message_queue, the_message, submit_type ); return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; 10a812: 83 c4 10 add $0x10,%esp _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); } return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT; #endif } 10a815: 8d 65 f4 lea -0xc(%ebp),%esp 10a818: 5b pop %ebx 10a819: 5e pop %esi 10a81a: 5f pop %edi 10a81b: c9 leave 10a81c: c3 ret 0010a82c <_CORE_mutex_Initialize>: CORE_mutex_Status _CORE_mutex_Initialize( CORE_mutex_Control *the_mutex, CORE_mutex_Attributes *the_mutex_attributes, uint32_t initial_lock ) { 10a82c: 55 push %ebp 10a82d: 89 e5 mov %esp,%ebp 10a82f: 57 push %edi 10a830: 56 push %esi 10a831: 53 push %ebx 10a832: 83 ec 0c sub $0xc,%esp 10a835: 8b 55 08 mov 0x8(%ebp),%edx 10a838: 8b 5d 0c mov 0xc(%ebp),%ebx 10a83b: 8b 45 10 mov 0x10(%ebp),%eax /* Add this to the RTEMS environment later ????????? rtems_assert( initial_lock == CORE_MUTEX_LOCKED || initial_lock == CORE_MUTEX_UNLOCKED ); */ the_mutex->Attributes = *the_mutex_attributes; 10a83e: 8d 7a 40 lea 0x40(%edx),%edi 10a841: b9 04 00 00 00 mov $0x4,%ecx 10a846: 89 de mov %ebx,%esi 10a848: f3 a5 rep movsl %ds:(%esi),%es:(%edi) the_mutex->lock = initial_lock; 10a84a: 89 42 50 mov %eax,0x50(%edx) the_mutex->blocked_count = 0; 10a84d: c7 42 58 00 00 00 00 movl $0x0,0x58(%edx) if ( initial_lock == CORE_MUTEX_LOCKED ) { 10a854: 85 c0 test %eax,%eax 10a856: 75 35 jne 10a88d <_CORE_mutex_Initialize+0x61> the_mutex->nest_count = 1; 10a858: c7 42 54 01 00 00 00 movl $0x1,0x54(%edx) the_mutex->holder = _Thread_Executing; 10a85f: 8b 0d 30 39 12 00 mov 0x123930,%ecx 10a865: 89 4a 5c mov %ecx,0x5c(%edx) the_mutex->holder_id = _Thread_Executing->Object.id; 10a868: 8b 41 08 mov 0x8(%ecx),%eax 10a86b: 89 42 60 mov %eax,0x60(%edx) */ RTEMS_INLINE_ROUTINE bool _CORE_mutex_Is_inherit_priority( CORE_mutex_Attributes *the_attribute ) { return the_attribute->discipline == CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; 10a86e: 8b 42 48 mov 0x48(%edx),%eax if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 10a871: 83 f8 02 cmp $0x2,%eax 10a874: 74 05 je 10a87b <_CORE_mutex_Initialize+0x4f> 10a876: 83 f8 03 cmp $0x3,%eax 10a879: 75 27 jne 10a8a2 <_CORE_mutex_Initialize+0x76> _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { if ( _Thread_Executing->current_priority < the_mutex->Attributes.priority_ceiling ) 10a87b: 8b 71 14 mov 0x14(%ecx),%esi 10a87e: b8 06 00 00 00 mov $0x6,%eax 10a883: 3b 72 4c cmp 0x4c(%edx),%esi 10a886: 72 36 jb 10a8be <_CORE_mutex_Initialize+0x92> _Chain_Prepend_unprotected( &_Thread_Executing->lock_mutex, &the_mutex->queue.lock_queue ); the_mutex->queue.priority_before = _Thread_Executing->current_priority; #endif _Thread_Executing->resource_count++; 10a888: ff 41 1c incl 0x1c(%ecx) 10a88b: eb 15 jmp 10a8a2 <_CORE_mutex_Initialize+0x76> <== ALWAYS TAKEN } } else { the_mutex->nest_count = 0; 10a88d: c7 42 54 00 00 00 00 movl $0x0,0x54(%edx) the_mutex->holder = NULL; 10a894: c7 42 5c 00 00 00 00 movl $0x0,0x5c(%edx) the_mutex->holder_id = 0; 10a89b: c7 42 60 00 00 00 00 movl $0x0,0x60(%edx) } _Thread_queue_Initialize( 10a8a2: 6a 05 push $0x5 10a8a4: 68 00 04 00 00 push $0x400 10a8a9: 31 c0 xor %eax,%eax 10a8ab: 83 7b 08 00 cmpl $0x0,0x8(%ebx) 10a8af: 0f 95 c0 setne %al 10a8b2: 50 push %eax 10a8b3: 52 push %edx 10a8b4: e8 df 18 00 00 call 10c198 <_Thread_queue_Initialize> 10a8b9: 31 c0 xor %eax,%eax THREAD_QUEUE_DISCIPLINE_FIFO : THREAD_QUEUE_DISCIPLINE_PRIORITY, STATES_WAITING_FOR_MUTEX, CORE_MUTEX_TIMEOUT ); return CORE_MUTEX_STATUS_SUCCESSFUL; 10a8bb: 83 c4 10 add $0x10,%esp } 10a8be: 8d 65 f4 lea -0xc(%ebp),%esp 10a8c1: 5b pop %ebx 10a8c2: 5e pop %esi 10a8c3: 5f pop %edi 10a8c4: c9 leave 10a8c5: c3 ret 0010a915 <_CORE_mutex_Seize>: Objects_Id _id, bool _wait, Watchdog_Interval _timeout, ISR_Level _level ) { 10a915: 55 push %ebp 10a916: 89 e5 mov %esp,%ebp 10a918: 53 push %ebx 10a919: 83 ec 14 sub $0x14,%esp 10a91c: 8b 5d 08 mov 0x8(%ebp),%ebx 10a91f: 8a 55 10 mov 0x10(%ebp),%dl _CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level ); 10a922: a1 74 38 12 00 mov 0x123874,%eax 10a927: 85 c0 test %eax,%eax 10a929: 74 19 je 10a944 <_CORE_mutex_Seize+0x2f> 10a92b: 84 d2 test %dl,%dl 10a92d: 74 15 je 10a944 <_CORE_mutex_Seize+0x2f> <== ALWAYS TAKEN 10a92f: 83 3d 0c 3a 12 00 01 cmpl $0x1,0x123a0c 10a936: 76 0c jbe 10a944 <_CORE_mutex_Seize+0x2f> 10a938: 53 push %ebx 10a939: 6a 13 push $0x13 10a93b: 6a 00 push $0x0 10a93d: 6a 00 push $0x0 10a93f: e8 60 05 00 00 call 10aea4 <_Internal_error_Occurred> 10a944: 51 push %ecx 10a945: 51 push %ecx 10a946: 8d 45 18 lea 0x18(%ebp),%eax 10a949: 50 push %eax 10a94a: 53 push %ebx 10a94b: 88 55 f4 mov %dl,-0xc(%ebp) 10a94e: e8 f9 39 00 00 call 10e34c <_CORE_mutex_Seize_interrupt_trylock> 10a953: 83 c4 10 add $0x10,%esp 10a956: 85 c0 test %eax,%eax 10a958: 8a 55 f4 mov -0xc(%ebp),%dl 10a95b: 74 48 je 10a9a5 <_CORE_mutex_Seize+0x90> 10a95d: 84 d2 test %dl,%dl 10a95f: 75 12 jne 10a973 <_CORE_mutex_Seize+0x5e> 10a961: ff 75 18 pushl 0x18(%ebp) 10a964: 9d popf 10a965: a1 30 39 12 00 mov 0x123930,%eax 10a96a: c7 40 34 01 00 00 00 movl $0x1,0x34(%eax) 10a971: eb 32 jmp 10a9a5 <_CORE_mutex_Seize+0x90> <== ALWAYS 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; 10a973: c7 43 30 01 00 00 00 movl $0x1,0x30(%ebx) 10a97a: a1 30 39 12 00 mov 0x123930,%eax 10a97f: 89 58 44 mov %ebx,0x44(%eax) 10a982: 8b 55 0c mov 0xc(%ebp),%edx 10a985: 89 50 20 mov %edx,0x20(%eax) 10a988: a1 74 38 12 00 mov 0x123874,%eax 10a98d: 40 inc %eax 10a98e: a3 74 38 12 00 mov %eax,0x123874 10a993: ff 75 18 pushl 0x18(%ebp) 10a996: 9d popf 10a997: 50 push %eax 10a998: 50 push %eax 10a999: ff 75 14 pushl 0x14(%ebp) 10a99c: 53 push %ebx 10a99d: e8 26 ff ff ff call 10a8c8 <_CORE_mutex_Seize_interrupt_blocking> <== ALWAYS TAKEN 10a9a2: 83 c4 10 add $0x10,%esp } 10a9a5: 8b 5d fc mov -0x4(%ebp),%ebx 10a9a8: c9 leave 10a9a9: c3 ret 0010a8c8 <_CORE_mutex_Seize_interrupt_blocking>: void _CORE_mutex_Seize_interrupt_blocking( CORE_mutex_Control *the_mutex, Watchdog_Interval timeout ) { 10a8c8: 55 push %ebp 10a8c9: 89 e5 mov %esp,%ebp 10a8cb: 56 push %esi 10a8cc: 53 push %ebx 10a8cd: 8b 5d 08 mov 0x8(%ebp),%ebx 10a8d0: 8b 75 0c mov 0xc(%ebp),%esi Thread_Control *executing; executing = _Thread_Executing; 10a8d3: 8b 15 30 39 12 00 mov 0x123930,%edx if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) ) { 10a8d9: 83 7b 48 02 cmpl $0x2,0x48(%ebx) 10a8dd: 75 18 jne 10a8f7 <_CORE_mutex_Seize_interrupt_blocking+0x2f> if ( the_mutex->holder->current_priority > executing->current_priority ) { 10a8df: 8b 43 5c mov 0x5c(%ebx),%eax 10a8e2: 8b 52 14 mov 0x14(%edx),%edx 10a8e5: 39 50 14 cmp %edx,0x14(%eax) 10a8e8: 76 0d jbe 10a8f7 <_CORE_mutex_Seize_interrupt_blocking+0x2f> _Thread_Change_priority( 10a8ea: 51 push %ecx 10a8eb: 6a 00 push $0x0 10a8ed: 52 push %edx 10a8ee: 50 push %eax 10a8ef: e8 84 0d 00 00 call 10b678 <_Thread_Change_priority> <== ALWAYS TAKEN 10a8f4: 83 c4 10 add $0x10,%esp false ); } } the_mutex->blocked_count++; 10a8f7: ff 43 58 incl 0x58(%ebx) _Thread_queue_Enqueue( &the_mutex->Wait_queue, timeout ); 10a8fa: 50 push %eax 10a8fb: 68 3c c2 10 00 push $0x10c23c 10a900: 56 push %esi 10a901: 53 push %ebx 10a902: e8 79 16 00 00 call 10bf80 <_Thread_queue_Enqueue_with_handler> _Thread_Enable_dispatch(); 10a907: 83 c4 10 add $0x10,%esp } 10a90a: 8d 65 f8 lea -0x8(%ebp),%esp 10a90d: 5b pop %ebx 10a90e: 5e pop %esi 10a90f: c9 leave } the_mutex->blocked_count++; _Thread_queue_Enqueue( &the_mutex->Wait_queue, timeout ); _Thread_Enable_dispatch(); 10a910: e9 00 12 00 00 jmp 10bb15 <_Thread_Enable_dispatch> 0010e34c <_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 ) { 10e34c: 55 push %ebp 10e34d: 89 e5 mov %esp,%ebp 10e34f: 53 push %ebx 10e350: 83 ec 04 sub $0x4,%esp 10e353: 8b 45 08 mov 0x8(%ebp),%eax 10e356: 8b 4d 0c mov 0xc(%ebp),%ecx { Thread_Control *executing; /* disabled when you get here */ executing = _Thread_Executing; 10e359: 8b 15 30 39 12 00 mov 0x123930,%edx executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; 10e35f: c7 42 34 00 00 00 00 movl $0x0,0x34(%edx) if ( !_CORE_mutex_Is_locked( the_mutex ) ) { 10e366: 83 78 50 00 cmpl $0x0,0x50(%eax) 10e36a: 0f 84 87 00 00 00 je 10e3f7 <_CORE_mutex_Seize_interrupt_trylock+0xab> the_mutex->lock = CORE_MUTEX_LOCKED; 10e370: c7 40 50 00 00 00 00 movl $0x0,0x50(%eax) the_mutex->holder = executing; 10e377: 89 50 5c mov %edx,0x5c(%eax) the_mutex->holder_id = executing->Object.id; 10e37a: 8b 5a 08 mov 0x8(%edx),%ebx 10e37d: 89 58 60 mov %ebx,0x60(%eax) the_mutex->nest_count = 1; 10e380: c7 40 54 01 00 00 00 movl $0x1,0x54(%eax) */ RTEMS_INLINE_ROUTINE bool _CORE_mutex_Is_inherit_priority( CORE_mutex_Attributes *the_attribute ) { return the_attribute->discipline == CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; 10e387: 8b 58 48 mov 0x48(%eax),%ebx if ( !_CORE_mutex_Is_locked( the_mutex ) ) { the_mutex->lock = CORE_MUTEX_LOCKED; the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 10e38a: 83 fb 02 cmp $0x2,%ebx 10e38d: 74 05 je 10e394 <_CORE_mutex_Seize_interrupt_trylock+0x48> 10e38f: 83 fb 03 cmp $0x3,%ebx 10e392: 75 08 jne 10e39c <_CORE_mutex_Seize_interrupt_trylock+0x50> _Chain_Prepend_unprotected( &executing->lock_mutex, &the_mutex->queue.lock_queue ); the_mutex->queue.priority_before = executing->current_priority; #endif executing->resource_count++; 10e394: ff 42 1c incl 0x1c(%edx) } if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { 10e397: 83 fb 03 cmp $0x3,%ebx 10e39a: 74 05 je 10e3a1 <_CORE_mutex_Seize_interrupt_trylock+0x55> _ISR_Enable( *level_p ); 10e39c: ff 31 pushl (%ecx) 10e39e: 9d popf 10e39f: eb 7b jmp 10e41c <_CORE_mutex_Seize_interrupt_trylock+0xd0> <== ALWAYS TAKEN { Priority_Control ceiling; Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; current = executing->current_priority; 10e3a1: 8b 5a 14 mov 0x14(%edx),%ebx if ( current == ceiling ) { 10e3a4: 3b 58 4c cmp 0x4c(%eax),%ebx 10e3a7: 75 05 jne 10e3ae <_CORE_mutex_Seize_interrupt_trylock+0x62> _ISR_Enable( *level_p ); 10e3a9: ff 31 pushl (%ecx) 10e3ab: 9d popf 10e3ac: eb 6e jmp 10e41c <_CORE_mutex_Seize_interrupt_trylock+0xd0> <== ALWAYS TAKEN return 0; } if ( current > ceiling ) { 10e3ae: 76 2a jbe 10e3da <_CORE_mutex_Seize_interrupt_trylock+0x8e> rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10e3b0: 8b 15 74 38 12 00 mov 0x123874,%edx 10e3b6: 42 inc %edx 10e3b7: 89 15 74 38 12 00 mov %edx,0x123874 _Thread_Disable_dispatch(); _ISR_Enable( *level_p ); 10e3bd: ff 31 pushl (%ecx) 10e3bf: 9d popf _Thread_Change_priority( 10e3c0: 52 push %edx 10e3c1: 6a 00 push $0x0 10e3c3: ff 70 4c pushl 0x4c(%eax) 10e3c6: ff 70 5c pushl 0x5c(%eax) 10e3c9: e8 aa d2 ff ff call 10b678 <_Thread_Change_priority> the_mutex->holder, the_mutex->Attributes.priority_ceiling, false ); _Thread_Enable_dispatch(); 10e3ce: e8 42 d7 ff ff call 10bb15 <_Thread_Enable_dispatch> 10e3d3: 31 c0 xor %eax,%eax 10e3d5: 83 c4 10 add $0x10,%esp 10e3d8: eb 4b jmp 10e425 <_CORE_mutex_Seize_interrupt_trylock+0xd9> <== ALWAYS TAKEN return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; 10e3da: c7 42 34 06 00 00 00 movl $0x6,0x34(%edx) the_mutex->lock = CORE_MUTEX_UNLOCKED; 10e3e1: c7 40 50 01 00 00 00 movl $0x1,0x50(%eax) the_mutex->nest_count = 0; /* undo locking above */ 10e3e8: c7 40 54 00 00 00 00 movl $0x0,0x54(%eax) executing->resource_count--; /* undo locking above */ 10e3ef: ff 4a 1c decl 0x1c(%edx) _ISR_Enable( *level_p ); 10e3f2: ff 31 pushl (%ecx) 10e3f4: 9d popf 10e3f5: eb 25 jmp 10e41c <_CORE_mutex_Seize_interrupt_trylock+0xd0> <== ALWAYS TAKEN /* * 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 ) ) { 10e3f7: 8b 58 5c mov 0x5c(%eax),%ebx 10e3fa: 39 d3 cmp %edx,%ebx 10e3fc: 75 22 jne 10e420 <_CORE_mutex_Seize_interrupt_trylock+0xd4> switch ( the_mutex->Attributes.lock_nesting_behavior ) { 10e3fe: 8b 50 40 mov 0x40(%eax),%edx 10e401: 85 d2 test %edx,%edx 10e403: 74 05 je 10e40a <_CORE_mutex_Seize_interrupt_trylock+0xbe> 10e405: 4a dec %edx 10e406: 75 18 jne 10e420 <_CORE_mutex_Seize_interrupt_trylock+0xd4> <== NEVER TAKEN 10e408: eb 08 jmp 10e412 <_CORE_mutex_Seize_interrupt_trylock+0xc6> <== NOT EXECUTED case CORE_MUTEX_NESTING_ACQUIRES: the_mutex->nest_count++; 10e40a: ff 40 54 incl 0x54(%eax) _ISR_Enable( *level_p ); 10e40d: ff 31 pushl (%ecx) 10e40f: 9d popf 10e410: eb 0a jmp 10e41c <_CORE_mutex_Seize_interrupt_trylock+0xd0> <== ALWAYS TAKEN return 0; case CORE_MUTEX_NESTING_IS_ERROR: executing->Wait.return_code = CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED; 10e412: c7 43 34 02 00 00 00 movl $0x2,0x34(%ebx) <== NOT EXECUTED _ISR_Enable( *level_p ); 10e419: ff 31 pushl (%ecx) <== NOT EXECUTED 10e41b: 9d popf <== NOT EXECUTED 10e41c: 31 c0 xor %eax,%eax 10e41e: eb 05 jmp 10e425 <_CORE_mutex_Seize_interrupt_trylock+0xd9> <== ALWAYS TAKEN 10e420: b8 01 00 00 00 mov $0x1,%eax return _CORE_mutex_Seize_interrupt_trylock_body( the_mutex, level_p ); } 10e425: 8b 5d fc mov -0x4(%ebp),%ebx 10e428: c9 leave 10e429: c3 ret 0010a9ac <_CORE_mutex_Surrender>: #else Objects_Id id __attribute__((unused)), CORE_mutex_API_mp_support_callout api_mutex_mp_support __attribute__((unused)) #endif ) { 10a9ac: 55 push %ebp 10a9ad: 89 e5 mov %esp,%ebp 10a9af: 53 push %ebx 10a9b0: 83 ec 04 sub $0x4,%esp 10a9b3: 8b 5d 08 mov 0x8(%ebp),%ebx Thread_Control *the_thread; Thread_Control *holder; #ifdef __RTEMS_STRICT_ORDER_MUTEX__ Chain_Node *first_node; #endif holder = the_mutex->holder; 10a9b6: 8b 53 5c mov 0x5c(%ebx),%edx * allowed when the mutex in quetion is FIFO or simple Priority * discipline. But Priority Ceiling or Priority Inheritance mutexes * must be released by the thread which acquired them. */ if ( the_mutex->Attributes.only_owner_release ) { 10a9b9: 80 7b 44 00 cmpb $0x0,0x44(%ebx) 10a9bd: 74 11 je 10a9d0 <_CORE_mutex_Surrender+0x24> if ( !_Thread_Is_executing( holder ) ) 10a9bf: b8 03 00 00 00 mov $0x3,%eax 10a9c4: 3b 15 30 39 12 00 cmp 0x123930,%edx 10a9ca: 0f 85 b6 00 00 00 jne 10aa86 <_CORE_mutex_Surrender+0xda> return CORE_MUTEX_STATUS_NOT_OWNER_OF_RESOURCE; } /* XXX already unlocked -- not right status */ if ( !the_mutex->nest_count ) 10a9d0: 8b 43 54 mov 0x54(%ebx),%eax 10a9d3: 85 c0 test %eax,%eax 10a9d5: 0f 84 a9 00 00 00 je 10aa84 <_CORE_mutex_Surrender+0xd8> return CORE_MUTEX_STATUS_SUCCESSFUL; the_mutex->nest_count--; 10a9db: 48 dec %eax 10a9dc: 89 43 54 mov %eax,0x54(%ebx) if ( the_mutex->nest_count != 0 ) { 10a9df: 85 c0 test %eax,%eax 10a9e1: 0f 85 9d 00 00 00 jne 10aa84 <_CORE_mutex_Surrender+0xd8> 10a9e7: 8b 43 48 mov 0x48(%ebx),%eax /* * Formally release the mutex before possibly transferring it to a * blocked thread. */ if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 10a9ea: 83 f8 02 cmp $0x2,%eax 10a9ed: 74 05 je 10a9f4 <_CORE_mutex_Surrender+0x48> 10a9ef: 83 f8 03 cmp $0x3,%eax 10a9f2: 75 03 jne 10a9f7 <_CORE_mutex_Surrender+0x4b> the_mutex->nest_count++; return CORE_MUTEX_RELEASE_NOT_ORDER; } first_node = _Chain_Get_first_unprotected(&holder->lock_mutex); #endif holder->resource_count--; 10a9f4: ff 4a 1c decl 0x1c(%edx) } the_mutex->holder = NULL; 10a9f7: c7 43 5c 00 00 00 00 movl $0x0,0x5c(%ebx) the_mutex->holder_id = 0; 10a9fe: c7 43 60 00 00 00 00 movl $0x0,0x60(%ebx) 10aa05: 8b 43 48 mov 0x48(%ebx),%eax /* * Whether or not someone is waiting for the mutex, an * inherited priority must be lowered if this is the last * mutex (i.e. resource) this task has. */ if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 10aa08: 83 f8 02 cmp $0x2,%eax 10aa0b: 74 05 je 10aa12 <_CORE_mutex_Surrender+0x66> 10aa0d: 83 f8 03 cmp $0x3,%eax 10aa10: 75 1b jne 10aa2d <_CORE_mutex_Surrender+0x81> _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { #ifdef __RTEMS_STRICT_ORDER_MUTEX__ if(the_mutex->queue.priority_before != holder->current_priority) _Thread_Change_priority(holder,the_mutex->queue.priority_before,true); #endif if ( holder->resource_count == 0 && 10aa12: 83 7a 1c 00 cmpl $0x0,0x1c(%edx) 10aa16: 75 15 jne 10aa2d <_CORE_mutex_Surrender+0x81> holder->real_priority != holder->current_priority ) { 10aa18: 8b 42 18 mov 0x18(%edx),%eax 10aa1b: 3b 42 14 cmp 0x14(%edx),%eax 10aa1e: 74 0d je 10aa2d <_CORE_mutex_Surrender+0x81> _Thread_Change_priority( holder, holder->real_priority, true ); 10aa20: 51 push %ecx 10aa21: 6a 01 push $0x1 10aa23: 50 push %eax 10aa24: 52 push %edx 10aa25: e8 4e 0c 00 00 call 10b678 <_Thread_Change_priority> <== ALWAYS TAKEN 10aa2a: 83 c4 10 add $0x10,%esp /* * Now we check if another thread was waiting for this mutex. If so, * transfer the mutex to that thread. */ if ( ( the_thread = _Thread_queue_Dequeue( &the_mutex->Wait_queue ) ) ) { 10aa2d: 83 ec 0c sub $0xc,%esp 10aa30: 53 push %ebx 10aa31: e8 46 14 00 00 call 10be7c <_Thread_queue_Dequeue> 10aa36: 83 c4 10 add $0x10,%esp 10aa39: 85 c0 test %eax,%eax 10aa3b: 74 40 je 10aa7d <_CORE_mutex_Surrender+0xd1> } else #endif { the_mutex->holder = the_thread; 10aa3d: 89 43 5c mov %eax,0x5c(%ebx) the_mutex->holder_id = the_thread->Object.id; 10aa40: 8b 50 08 mov 0x8(%eax),%edx 10aa43: 89 53 60 mov %edx,0x60(%ebx) the_mutex->nest_count = 1; 10aa46: c7 43 54 01 00 00 00 movl $0x1,0x54(%ebx) switch ( the_mutex->Attributes.discipline ) { 10aa4d: 8b 53 48 mov 0x48(%ebx),%edx 10aa50: 83 fa 02 cmp $0x2,%edx 10aa53: 74 07 je 10aa5c <_CORE_mutex_Surrender+0xb0> 10aa55: 83 fa 03 cmp $0x3,%edx 10aa58: 75 2a jne 10aa84 <_CORE_mutex_Surrender+0xd8> 10aa5a: eb 05 jmp 10aa61 <_CORE_mutex_Surrender+0xb5> <== ALWAYS TAKEN case CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT: #ifdef __RTEMS_STRICT_ORDER_MUTEX__ _Chain_Prepend_unprotected(&the_thread->lock_mutex,&the_mutex->queue.lock_queue); the_mutex->queue.priority_before = the_thread->current_priority; #endif the_thread->resource_count++; 10aa5c: ff 40 1c incl 0x1c(%eax) 10aa5f: eb 23 jmp 10aa84 <_CORE_mutex_Surrender+0xd8> <== ALWAYS TAKEN case CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING: #ifdef __RTEMS_STRICT_ORDER_MUTEX__ _Chain_Prepend_unprotected(&the_thread->lock_mutex,&the_mutex->queue.lock_queue); the_mutex->queue.priority_before = the_thread->current_priority; #endif the_thread->resource_count++; 10aa61: ff 40 1c incl 0x1c(%eax) if (the_mutex->Attributes.priority_ceiling < 10aa64: 8b 53 4c mov 0x4c(%ebx),%edx the_thread->current_priority){ 10aa67: 3b 50 14 cmp 0x14(%eax),%edx 10aa6a: 73 18 jae 10aa84 <_CORE_mutex_Surrender+0xd8> _Thread_Change_priority( 10aa6c: 51 push %ecx 10aa6d: 6a 00 push $0x0 10aa6f: 52 push %edx 10aa70: 50 push %eax 10aa71: e8 02 0c 00 00 call 10b678 <_Thread_Change_priority> 10aa76: 31 c0 xor %eax,%eax 10aa78: 83 c4 10 add $0x10,%esp 10aa7b: eb 09 jmp 10aa86 <_CORE_mutex_Surrender+0xda> <== ALWAYS TAKEN } break; } } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; 10aa7d: c7 43 50 01 00 00 00 movl $0x1,0x50(%ebx) 10aa84: 31 c0 xor %eax,%eax return CORE_MUTEX_STATUS_SUCCESSFUL; } 10aa86: 8b 5d fc mov -0x4(%ebp),%ebx 10aa89: c9 leave 10aa8a: c3 ret 0010aad8 <_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 ) { 10aad8: 55 push %ebp 10aad9: 89 e5 mov %esp,%ebp 10aadb: 53 push %ebx 10aadc: 83 ec 10 sub $0x10,%esp 10aadf: 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)) ) { 10aae2: 53 push %ebx 10aae3: e8 94 13 00 00 call 10be7c <_Thread_queue_Dequeue> 10aae8: 89 c2 mov %eax,%edx 10aaea: 83 c4 10 add $0x10,%esp 10aaed: 31 c0 xor %eax,%eax 10aaef: 85 d2 test %edx,%edx 10aaf1: 75 15 jne 10ab08 <_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 ); 10aaf3: 9c pushf 10aaf4: fa cli 10aaf5: 59 pop %ecx if ( the_semaphore->count < the_semaphore->Attributes.maximum_count ) 10aaf6: 8b 53 48 mov 0x48(%ebx),%edx 10aaf9: b0 04 mov $0x4,%al 10aafb: 3b 53 40 cmp 0x40(%ebx),%edx 10aafe: 73 06 jae 10ab06 <_CORE_semaphore_Surrender+0x2e> <== ALWAYS TAKEN the_semaphore->count += 1; 10ab00: 42 inc %edx 10ab01: 89 53 48 mov %edx,0x48(%ebx) 10ab04: 30 c0 xor %al,%al else status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); 10ab06: 51 push %ecx 10ab07: 9d popf } return status; } 10ab08: 8b 5d fc mov -0x4(%ebp),%ebx 10ab0b: c9 leave 10ab0c: c3 ret 0010a764 <_Chain_Get>: */ Chain_Node *_Chain_Get( Chain_Control *the_chain ) { 10a764: 55 push %ebp 10a765: 89 e5 mov %esp,%ebp 10a767: 53 push %ebx 10a768: 8b 55 08 mov 0x8(%ebp),%edx ISR_Level level; Chain_Node *return_node; return_node = NULL; _ISR_Disable( level ); 10a76b: 9c pushf 10a76c: fa cli 10a76d: 5b pop %ebx */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 10a76e: 8b 02 mov (%edx),%eax */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10a770: 8d 4a 04 lea 0x4(%edx),%ecx 10a773: 39 c8 cmp %ecx,%eax 10a775: 75 04 jne 10a77b <_Chain_Get+0x17> 10a777: 31 c0 xor %eax,%eax 10a779: eb 07 jmp 10a782 <_Chain_Get+0x1e> <== ALWAYS TAKEN { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; 10a77b: 8b 08 mov (%eax),%ecx the_chain->first = new_first; 10a77d: 89 0a mov %ecx,(%edx) new_first->previous = _Chain_Head(the_chain); 10a77f: 89 51 04 mov %edx,0x4(%ecx) if ( !_Chain_Is_empty( the_chain ) ) return_node = _Chain_Get_first_unprotected( the_chain ); _ISR_Enable( level ); 10a782: 53 push %ebx 10a783: 9d popf return return_node; } 10a784: 5b pop %ebx 10a785: c9 leave 10a786: c3 ret 0010e2d0 <_Chain_Initialize>: Chain_Control *the_chain, void *starting_address, size_t number_nodes, size_t node_size ) { 10e2d0: 55 push %ebp 10e2d1: 89 e5 mov %esp,%ebp 10e2d3: 56 push %esi 10e2d4: 53 push %ebx 10e2d5: 8b 4d 08 mov 0x8(%ebp),%ecx 10e2d8: 8b 5d 10 mov 0x10(%ebp),%ebx 10e2db: 8b 75 14 mov 0x14(%ebp),%esi */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Head( Chain_Control *the_chain ) { return (Chain_Node *) the_chain; 10e2de: 89 c8 mov %ecx,%eax Chain_Node *current; Chain_Node *next; count = number_nodes; current = _Chain_Head( the_chain ); the_chain->permanent_null = NULL; 10e2e0: c7 41 04 00 00 00 00 movl $0x0,0x4(%ecx) next = starting_address; 10e2e7: 8b 55 0c mov 0xc(%ebp),%edx while ( count-- ) { 10e2ea: eb 0a jmp 10e2f6 <_Chain_Initialize+0x26> <== ALWAYS TAKEN current->next = next; 10e2ec: 89 10 mov %edx,(%eax) next->previous = current; 10e2ee: 89 42 04 mov %eax,0x4(%edx) current = next; next = (Chain_Node *) 10e2f1: 4b dec %ebx 10e2f2: 89 d0 mov %edx,%eax 10e2f4: 01 f2 add %esi,%edx count = number_nodes; current = _Chain_Head( the_chain ); the_chain->permanent_null = NULL; next = starting_address; while ( count-- ) { 10e2f6: 85 db test %ebx,%ebx 10e2f8: 75 f2 jne 10e2ec <_Chain_Initialize+0x1c> next->previous = current; current = next; next = (Chain_Node *) _Addresses_Add_offset( (void *) next, node_size ); } current->next = _Chain_Tail( the_chain ); 10e2fa: 8d 51 04 lea 0x4(%ecx),%edx 10e2fd: 89 10 mov %edx,(%eax) the_chain->last = current; 10e2ff: 89 41 08 mov %eax,0x8(%ecx) } 10e302: 5b pop %ebx 10e303: 5e pop %esi 10e304: c9 leave 10e305: c3 ret 001099b8 <_Event_Seize>: rtems_event_set event_in, rtems_option option_set, rtems_interval ticks, rtems_event_set *event_out ) { 1099b8: 55 push %ebp 1099b9: 89 e5 mov %esp,%ebp 1099bb: 57 push %edi 1099bc: 56 push %esi 1099bd: 53 push %ebx 1099be: 83 ec 1c sub $0x1c,%esp 1099c1: 8b 45 08 mov 0x8(%ebp),%eax 1099c4: 8b 75 0c mov 0xc(%ebp),%esi 1099c7: 8b 55 10 mov 0x10(%ebp),%edx 1099ca: 89 55 dc mov %edx,-0x24(%ebp) 1099cd: 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; 1099d0: 8b 1d 30 39 12 00 mov 0x123930,%ebx executing->Wait.return_code = RTEMS_SUCCESSFUL; 1099d6: c7 43 34 00 00 00 00 movl $0x0,0x34(%ebx) api = executing->API_Extensions[ THREAD_API_RTEMS ]; 1099dd: 8b bb f0 00 00 00 mov 0xf0(%ebx),%edi _ISR_Disable( level ); 1099e3: 9c pushf 1099e4: fa cli 1099e5: 8f 45 e4 popl -0x1c(%ebp) pending_events = api->pending_events; 1099e8: 8b 17 mov (%edi),%edx 1099ea: 89 55 e0 mov %edx,-0x20(%ebp) seized_events = _Event_sets_Get( pending_events, event_in ); if ( !_Event_sets_Is_empty( seized_events ) && 1099ed: 21 c2 and %eax,%edx 1099ef: 74 1b je 109a0c <_Event_Seize+0x54> 1099f1: 39 c2 cmp %eax,%edx 1099f3: 74 08 je 1099fd <_Event_Seize+0x45> 1099f5: f7 c6 02 00 00 00 test $0x2,%esi 1099fb: 74 0f je 109a0c <_Event_Seize+0x54> <== ALWAYS TAKEN (seized_events == event_in || _Options_Is_any( option_set )) ) { api->pending_events = 1099fd: 89 d0 mov %edx,%eax 1099ff: f7 d0 not %eax 109a01: 23 45 e0 and -0x20(%ebp),%eax 109a04: 89 07 mov %eax,(%edi) _Event_sets_Clear( pending_events, seized_events ); _ISR_Enable( level ); 109a06: ff 75 e4 pushl -0x1c(%ebp) 109a09: 9d popf 109a0a: eb 13 jmp 109a1f <_Event_Seize+0x67> <== ALWAYS TAKEN *event_out = seized_events; return; } if ( _Options_Is_no_wait( option_set ) ) { 109a0c: f7 c6 01 00 00 00 test $0x1,%esi 109a12: 74 12 je 109a26 <_Event_Seize+0x6e> _ISR_Enable( level ); 109a14: ff 75 e4 pushl -0x1c(%ebp) 109a17: 9d popf executing->Wait.return_code = RTEMS_UNSATISFIED; 109a18: c7 43 34 0d 00 00 00 movl $0xd,0x34(%ebx) *event_out = seized_events; 109a1f: 89 11 mov %edx,(%ecx) return; 109a21: e9 91 00 00 00 jmp 109ab7 <_Event_Seize+0xff> <== ALWAYS TAKEN * 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; 109a26: 89 73 30 mov %esi,0x30(%ebx) executing->Wait.count = (uint32_t) event_in; 109a29: 89 43 24 mov %eax,0x24(%ebx) executing->Wait.return_argument = event_out; 109a2c: 89 4b 28 mov %ecx,0x28(%ebx) _Event_Sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 109a2f: c7 05 c8 3a 12 00 01 movl $0x1,0x123ac8 109a36: 00 00 00 _ISR_Enable( level ); 109a39: ff 75 e4 pushl -0x1c(%ebp) 109a3c: 9d popf if ( ticks ) { 109a3d: 83 7d dc 00 cmpl $0x0,-0x24(%ebp) 109a41: 74 34 je 109a77 <_Event_Seize+0xbf> _Watchdog_Initialize( 109a43: 8b 43 08 mov 0x8(%ebx),%eax Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 109a46: c7 43 50 00 00 00 00 movl $0x0,0x50(%ebx) the_watchdog->routine = routine; 109a4d: c7 43 64 f4 9b 10 00 movl $0x109bf4,0x64(%ebx) the_watchdog->id = id; 109a54: 89 43 68 mov %eax,0x68(%ebx) the_watchdog->user_data = user_data; 109a57: c7 43 6c 00 00 00 00 movl $0x0,0x6c(%ebx) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 109a5e: 8b 45 dc mov -0x24(%ebp),%eax 109a61: 89 43 54 mov %eax,0x54(%ebx) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 109a64: 52 push %edx 109a65: 52 push %edx 109a66: 8d 43 48 lea 0x48(%ebx),%eax 109a69: 50 push %eax 109a6a: 68 50 39 12 00 push $0x123950 109a6f: e8 04 2e 00 00 call 10c878 <_Watchdog_Insert> 109a74: 83 c4 10 add $0x10,%esp NULL ); _Watchdog_Insert_ticks( &executing->Timer, ticks ); } _Thread_Set_state( executing, STATES_WAITING_FOR_EVENT ); 109a77: 50 push %eax 109a78: 50 push %eax 109a79: 68 00 01 00 00 push $0x100 109a7e: 53 push %ebx 109a7f: e8 54 28 00 00 call 10c2d8 <_Thread_Set_state> _ISR_Disable( level ); 109a84: 9c pushf 109a85: fa cli 109a86: 5a pop %edx sync_state = _Event_Sync_state; 109a87: a1 c8 3a 12 00 mov 0x123ac8,%eax _Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 109a8c: c7 05 c8 3a 12 00 00 movl $0x0,0x123ac8 109a93: 00 00 00 if ( sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) { 109a96: 83 c4 10 add $0x10,%esp 109a99: 83 f8 01 cmp $0x1,%eax 109a9c: 75 04 jne 109aa2 <_Event_Seize+0xea> _ISR_Enable( level ); 109a9e: 52 push %edx 109a9f: 9d popf 109aa0: eb 15 jmp 109ab7 <_Event_Seize+0xff> <== ALWAYS TAKEN * 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 ); 109aa2: 89 55 10 mov %edx,0x10(%ebp) 109aa5: 89 5d 0c mov %ebx,0xc(%ebp) 109aa8: 89 45 08 mov %eax,0x8(%ebp) } 109aab: 8d 65 f4 lea -0xc(%ebp),%esp 109aae: 5b pop %ebx 109aaf: 5e pop %esi 109ab0: 5f pop %edi 109ab1: 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 ); 109ab2: e9 75 1b 00 00 jmp 10b62c <_Thread_blocking_operation_Cancel> } 109ab7: 8d 65 f4 lea -0xc(%ebp),%esp 109aba: 5b pop %ebx 109abb: 5e pop %esi 109abc: 5f pop %edi 109abd: c9 leave 109abe: c3 ret 00109b0c <_Event_Surrender>: */ void _Event_Surrender( Thread_Control *the_thread ) { 109b0c: 55 push %ebp 109b0d: 89 e5 mov %esp,%ebp 109b0f: 57 push %edi 109b10: 56 push %esi 109b11: 53 push %ebx 109b12: 83 ec 2c sub $0x2c,%esp 109b15: 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 ]; 109b18: 8b bb f0 00 00 00 mov 0xf0(%ebx),%edi option_set = (rtems_option) the_thread->Wait.option; 109b1e: 8b 43 30 mov 0x30(%ebx),%eax 109b21: 89 45 e0 mov %eax,-0x20(%ebp) _ISR_Disable( level ); 109b24: 9c pushf 109b25: fa cli 109b26: 58 pop %eax pending_events = api->pending_events; 109b27: 8b 17 mov (%edi),%edx 109b29: 89 55 d4 mov %edx,-0x2c(%ebp) event_condition = (rtems_event_set) the_thread->Wait.count; 109b2c: 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 ) ) { 109b2f: 21 f2 and %esi,%edx 109b31: 75 07 jne 109b3a <_Event_Surrender+0x2e> _ISR_Enable( level ); 109b33: 50 push %eax 109b34: 9d popf return; 109b35: e9 b0 00 00 00 jmp 109bea <_Event_Surrender+0xde> <== ALWAYS TAKEN /* * 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() && 109b3a: 8b 0d 0c 39 12 00 mov 0x12390c,%ecx 109b40: 85 c9 test %ecx,%ecx 109b42: 74 49 je 109b8d <_Event_Surrender+0x81> 109b44: 3b 1d 30 39 12 00 cmp 0x123930,%ebx 109b4a: 75 41 jne 109b8d <_Event_Surrender+0x81> _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || 109b4c: 8b 0d c8 3a 12 00 mov 0x123ac8,%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() && 109b52: 83 f9 02 cmp $0x2,%ecx 109b55: 74 09 je 109b60 <_Event_Surrender+0x54> <== ALWAYS TAKEN _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || (_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) { 109b57: 8b 0d c8 3a 12 00 mov 0x123ac8,%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() && 109b5d: 49 dec %ecx 109b5e: 75 2d jne 109b8d <_Event_Surrender+0x81> <== ALWAYS TAKEN _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || (_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) { if ( seized_events == event_condition || _Options_Is_any(option_set) ) { 109b60: 39 f2 cmp %esi,%edx 109b62: 74 06 je 109b6a <_Event_Surrender+0x5e> 109b64: f6 45 e0 02 testb $0x2,-0x20(%ebp) 109b68: 74 1f je 109b89 <_Event_Surrender+0x7d> <== ALWAYS TAKEN api->pending_events = _Event_sets_Clear( pending_events,seized_events ); 109b6a: 89 d6 mov %edx,%esi 109b6c: f7 d6 not %esi 109b6e: 23 75 d4 and -0x2c(%ebp),%esi 109b71: 89 37 mov %esi,(%edi) the_thread->Wait.count = 0; 109b73: c7 43 24 00 00 00 00 movl $0x0,0x24(%ebx) *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 109b7a: 8b 4b 28 mov 0x28(%ebx),%ecx 109b7d: 89 11 mov %edx,(%ecx) _Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; 109b7f: c7 05 c8 3a 12 00 03 movl $0x3,0x123ac8 109b86: 00 00 00 } _ISR_Enable( level ); 109b89: 50 push %eax 109b8a: 9d popf return; 109b8b: eb 5d jmp 109bea <_Event_Surrender+0xde> <== ALWAYS TAKEN } /* * Otherwise, this is a normal send to another thread */ if ( _States_Is_waiting_for_event( the_thread->current_state ) ) { 109b8d: f6 43 11 01 testb $0x1,0x11(%ebx) 109b91: 74 55 je 109be8 <_Event_Surrender+0xdc> <== ALWAYS TAKEN if ( seized_events == event_condition || _Options_Is_any( option_set ) ) { 109b93: 39 f2 cmp %esi,%edx 109b95: 74 06 je 109b9d <_Event_Surrender+0x91> 109b97: f6 45 e0 02 testb $0x2,-0x20(%ebp) 109b9b: 74 4b je 109be8 <_Event_Surrender+0xdc> <== ALWAYS TAKEN api->pending_events = _Event_sets_Clear( pending_events, seized_events ); 109b9d: 89 d6 mov %edx,%esi 109b9f: f7 d6 not %esi 109ba1: 23 75 d4 and -0x2c(%ebp),%esi 109ba4: 89 37 mov %esi,(%edi) the_thread->Wait.count = 0; 109ba6: c7 43 24 00 00 00 00 movl $0x0,0x24(%ebx) *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 109bad: 8b 4b 28 mov 0x28(%ebx),%ecx 109bb0: 89 11 mov %edx,(%ecx) _ISR_Flash( level ); 109bb2: 50 push %eax 109bb3: 9d popf 109bb4: fa cli if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 109bb5: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 109bb9: 74 06 je 109bc1 <_Event_Surrender+0xb5> _ISR_Enable( level ); 109bbb: 50 push %eax 109bbc: 9d popf RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 109bbd: 51 push %ecx 109bbe: 51 push %ecx 109bbf: eb 17 jmp 109bd8 <_Event_Surrender+0xcc> <== ALWAYS TAKEN RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 109bc1: c7 43 50 03 00 00 00 movl $0x3,0x50(%ebx) _Thread_Unblock( the_thread ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 109bc8: 50 push %eax 109bc9: 9d popf (void) _Watchdog_Remove( &the_thread->Timer ); 109bca: 83 ec 0c sub $0xc,%esp 109bcd: 8d 43 48 lea 0x48(%ebx),%eax 109bd0: 50 push %eax 109bd1: e8 ba 2d 00 00 call 10c990 <_Watchdog_Remove> 109bd6: 58 pop %eax 109bd7: 5a pop %edx 109bd8: 68 f8 ff 03 10 push $0x1003fff8 109bdd: 53 push %ebx 109bde: e8 b5 1b 00 00 call 10b798 <_Thread_Clear_state> 109be3: 83 c4 10 add $0x10,%esp 109be6: eb 02 jmp 109bea <_Event_Surrender+0xde> <== ALWAYS TAKEN _Thread_Unblock( the_thread ); } return; } } _ISR_Enable( level ); 109be8: 50 push %eax <== NOT EXECUTED 109be9: 9d popf <== NOT EXECUTED } 109bea: 8d 65 f4 lea -0xc(%ebp),%esp 109bed: 5b pop %ebx 109bee: 5e pop %esi 109bef: 5f pop %edi 109bf0: c9 leave 109bf1: c3 ret 00109bf4 <_Event_Timeout>: void _Event_Timeout( Objects_Id id, void *ignored ) { 109bf4: 55 push %ebp 109bf5: 89 e5 mov %esp,%ebp 109bf7: 83 ec 20 sub $0x20,%esp Thread_Control *the_thread; Objects_Locations location; ISR_Level level; the_thread = _Thread_Get( id, &location ); 109bfa: 8d 45 f4 lea -0xc(%ebp),%eax 109bfd: 50 push %eax 109bfe: ff 75 08 pushl 0x8(%ebp) 109c01: e8 32 1f 00 00 call 10bb38 <_Thread_Get> switch ( location ) { 109c06: 83 c4 10 add $0x10,%esp 109c09: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 109c0d: 75 49 jne 109c58 <_Event_Timeout+0x64> <== ALWAYS 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 ); 109c0f: 9c pushf 109c10: fa cli 109c11: 5a pop %edx _ISR_Enable( level ); return; } #endif the_thread->Wait.count = 0; 109c12: c7 40 24 00 00 00 00 movl $0x0,0x24(%eax) if ( _Thread_Is_executing( the_thread ) ) { 109c19: 3b 05 30 39 12 00 cmp 0x123930,%eax 109c1f: 75 13 jne 109c34 <_Event_Timeout+0x40> if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) 109c21: 8b 0d c8 3a 12 00 mov 0x123ac8,%ecx 109c27: 49 dec %ecx 109c28: 75 0a jne 109c34 <_Event_Timeout+0x40> _Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; 109c2a: c7 05 c8 3a 12 00 02 movl $0x2,0x123ac8 109c31: 00 00 00 } the_thread->Wait.return_code = RTEMS_TIMEOUT; 109c34: c7 40 34 06 00 00 00 movl $0x6,0x34(%eax) _ISR_Enable( level ); 109c3b: 52 push %edx 109c3c: 9d popf 109c3d: 52 push %edx 109c3e: 52 push %edx 109c3f: 68 f8 ff 03 10 push $0x1003fff8 109c44: 50 push %eax 109c45: e8 4e 1b 00 00 call 10b798 <_Thread_Clear_state> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 109c4a: a1 74 38 12 00 mov 0x123874,%eax 109c4f: 48 dec %eax 109c50: a3 74 38 12 00 mov %eax,0x123874 109c55: 83 c4 10 add $0x10,%esp case OBJECTS_REMOTE: /* impossible */ #endif case OBJECTS_ERROR: break; } } 109c58: c9 leave 109c59: c3 ret 0010a4bc <_Extension_Manager_initialization>: * * Output parameters: NONE */ void _Extension_Manager_initialization(void) { 10a4bc: 55 push %ebp 10a4bd: 89 e5 mov %esp,%ebp 10a4bf: 83 ec 0c sub $0xc,%esp _Objects_Initialize_information( 10a4c2: 6a 04 push $0x4 10a4c4: 6a 00 push $0x0 10a4c6: 6a 44 push $0x44 10a4c8: ff 35 20 f9 11 00 pushl 0x11f920 10a4ce: 6a 09 push $0x9 10a4d0: 6a 02 push $0x2 10a4d2: 68 0c 3b 12 00 push $0x123b0c 10a4d7: e8 cc 0e 00 00 call 10b3a8 <_Objects_Initialize_information> <== ALWAYS TAKEN 10a4dc: 83 c4 20 add $0x20,%esp , false, /* true if this is a global object class */ NULL /* Proxy extraction support callout */ #endif ); } 10a4df: c9 leave 10a4e0: c3 ret 0010e4e4 <_Heap_Allocate_aligned_with_boundary>: Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { 10e4e4: 55 push %ebp 10e4e5: 89 e5 mov %esp,%ebp 10e4e7: 57 push %edi 10e4e8: 56 push %esi 10e4e9: 53 push %ebx 10e4ea: 83 ec 2c sub $0x2c,%esp 10e4ed: 8b 75 08 mov 0x8(%ebp),%esi return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 10e4f0: 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 - HEAP_BLOCK_SIZE_OFFSET; uintptr_t const page_size = heap->page_size; 10e4f3: 8b 46 10 mov 0x10(%esi),%eax 10e4f6: 89 45 e0 mov %eax,-0x20(%ebp) uintptr_t alloc_begin = 0; uint32_t search_count = 0; if ( block_size_floor < alloc_size ) { 10e4f9: 8b 45 0c mov 0xc(%ebp),%eax 10e4fc: 83 c0 04 add $0x4,%eax 10e4ff: 89 45 cc mov %eax,-0x34(%ebp) 10e502: 0f 82 2f 01 00 00 jb 10e637 <_Heap_Allocate_aligned_with_boundary+0x153> /* Integer overflow occured */ return NULL; } if ( boundary != 0 ) { 10e508: 83 7d 14 00 cmpl $0x0,0x14(%ebp) 10e50c: 74 18 je 10e526 <_Heap_Allocate_aligned_with_boundary+0x42> if ( boundary < alloc_size ) { 10e50e: 8b 45 0c mov 0xc(%ebp),%eax 10e511: 39 45 14 cmp %eax,0x14(%ebp) 10e514: 0f 82 1d 01 00 00 jb 10e637 <_Heap_Allocate_aligned_with_boundary+0x153> return NULL; } if ( alignment == 0 ) { 10e51a: 83 7d 10 00 cmpl $0x0,0x10(%ebp) 10e51e: 75 06 jne 10e526 <_Heap_Allocate_aligned_with_boundary+0x42> 10e520: 8b 45 e0 mov -0x20(%ebp),%eax 10e523: 89 45 10 mov %eax,0x10(%ebp) 10e526: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const block_end = block_begin + block_size; uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_begin_ceiling = block_end - min_block_size + HEAP_BLOCK_HEADER_SIZE + page_size - 1; 10e52d: 8b 45 e0 mov -0x20(%ebp),%eax 10e530: 83 c0 07 add $0x7,%eax 10e533: 89 45 c8 mov %eax,-0x38(%ebp) uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET; uintptr_t alloc_begin = alloc_end - alloc_size; 10e536: c7 45 d8 04 00 00 00 movl $0x4,-0x28(%ebp) 10e53d: 8b 45 0c mov 0xc(%ebp),%eax 10e540: 29 45 d8 sub %eax,-0x28(%ebp) 10e543: 89 f7 mov %esi,%edi 10e545: e9 ba 00 00 00 jmp 10e604 <_Heap_Allocate_aligned_with_boundary+0x120> <== ALWAYS TAKEN while ( block != free_list_tail ) { _HAssert( _Heap_Is_prev_used( block ) ); /* Statistics */ ++search_count; 10e54a: 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 ) { 10e54d: 8b 59 04 mov 0x4(%ecx),%ebx 10e550: 3b 5d cc cmp -0x34(%ebp),%ebx 10e553: 0f 86 a8 00 00 00 jbe 10e601 <_Heap_Allocate_aligned_with_boundary+0x11d> if ( alignment == 0 ) { 10e559: 83 7d 10 00 cmpl $0x0,0x10(%ebp) 10e55d: 8d 41 08 lea 0x8(%ecx),%eax 10e560: 89 45 dc mov %eax,-0x24(%ebp) 10e563: 75 07 jne 10e56c <_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; 10e565: 89 c3 mov %eax,%ebx 10e567: e9 91 00 00 00 jmp 10e5fd <_Heap_Allocate_aligned_with_boundary+0x119> <== ALWAYS TAKEN uintptr_t alignment, uintptr_t boundary ) { uintptr_t const page_size = heap->page_size; uintptr_t const min_block_size = heap->min_block_size; 10e56c: 8b 47 14 mov 0x14(%edi),%eax 10e56f: 89 45 d4 mov %eax,-0x2c(%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; 10e572: 83 e3 fe and $0xfffffffe,%ebx 10e575: 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; 10e578: 8b 75 c8 mov -0x38(%ebp),%esi 10e57b: 29 c6 sub %eax,%esi 10e57d: 01 de add %ebx,%esi uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET; uintptr_t alloc_begin = alloc_end - alloc_size; 10e57f: 03 5d d8 add -0x28(%ebp),%ebx RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 10e582: 89 d8 mov %ebx,%eax 10e584: 31 d2 xor %edx,%edx 10e586: f7 75 10 divl 0x10(%ebp) 10e589: 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 ) { 10e58b: 39 f3 cmp %esi,%ebx 10e58d: 76 0b jbe 10e59a <_Heap_Allocate_aligned_with_boundary+0xb6> 10e58f: 89 f0 mov %esi,%eax 10e591: 31 d2 xor %edx,%edx 10e593: f7 75 10 divl 0x10(%ebp) 10e596: 89 f3 mov %esi,%ebx 10e598: 29 d3 sub %edx,%ebx } alloc_end = alloc_begin + alloc_size; /* Ensure boundary constaint */ if ( boundary != 0 ) { 10e59a: 83 7d 14 00 cmpl $0x0,0x14(%ebp) 10e59e: 74 3f je 10e5df <_Heap_Allocate_aligned_with_boundary+0xfb> /* 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; 10e5a0: 8b 45 0c mov 0xc(%ebp),%eax 10e5a3: 8d 34 03 lea (%ebx,%eax,1),%esi /* Ensure boundary constaint */ if ( boundary != 0 ) { uintptr_t const boundary_floor = alloc_begin_floor + alloc_size; 10e5a6: 8b 45 dc mov -0x24(%ebp),%eax 10e5a9: 03 45 0c add 0xc(%ebp),%eax 10e5ac: 89 45 d0 mov %eax,-0x30(%ebp) 10e5af: eb 19 jmp 10e5ca <_Heap_Allocate_aligned_with_boundary+0xe6> <== ALWAYS TAKEN uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary ); while ( alloc_begin < boundary_line && boundary_line < alloc_end ) { if ( boundary_line < boundary_floor ) { 10e5b1: 3b 55 d0 cmp -0x30(%ebp),%edx 10e5b4: 72 4b jb 10e601 <_Heap_Allocate_aligned_with_boundary+0x11d> return 0; } alloc_begin = boundary_line - alloc_size; 10e5b6: 89 d3 mov %edx,%ebx 10e5b8: 2b 5d 0c sub 0xc(%ebp),%ebx 10e5bb: 89 d8 mov %ebx,%eax 10e5bd: 31 d2 xor %edx,%edx 10e5bf: f7 75 10 divl 0x10(%ebp) 10e5c2: 29 d3 sub %edx,%ebx alloc_begin = _Heap_Align_down( alloc_begin, alignment ); alloc_end = alloc_begin + alloc_size; 10e5c4: 8b 45 0c mov 0xc(%ebp),%eax 10e5c7: 8d 34 03 lea (%ebx,%eax,1),%esi 10e5ca: 89 f0 mov %esi,%eax 10e5cc: 31 d2 xor %edx,%edx 10e5ce: f7 75 14 divl 0x14(%ebp) 10e5d1: 89 f0 mov %esi,%eax 10e5d3: 29 d0 sub %edx,%eax 10e5d5: 89 c2 mov %eax,%edx /* Ensure boundary constaint */ if ( boundary != 0 ) { uintptr_t const boundary_floor = alloc_begin_floor + alloc_size; uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary ); while ( alloc_begin < boundary_line && boundary_line < alloc_end ) { 10e5d7: 39 f0 cmp %esi,%eax 10e5d9: 73 04 jae 10e5df <_Heap_Allocate_aligned_with_boundary+0xfb> 10e5db: 39 c3 cmp %eax,%ebx 10e5dd: 72 d2 jb 10e5b1 <_Heap_Allocate_aligned_with_boundary+0xcd> 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 ) { 10e5df: 3b 5d dc cmp -0x24(%ebp),%ebx 10e5e2: 72 1d jb 10e601 <_Heap_Allocate_aligned_with_boundary+0x11d> 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; 10e5e4: be f8 ff ff ff mov $0xfffffff8,%esi 10e5e9: 29 ce sub %ecx,%esi 10e5eb: 01 de add %ebx,%esi 10e5ed: 89 d8 mov %ebx,%eax 10e5ef: 31 d2 xor %edx,%edx 10e5f1: f7 75 e0 divl -0x20(%ebp) if ( free_size >= min_block_size || free_size == 0 ) { 10e5f4: 29 d6 sub %edx,%esi 10e5f6: 74 05 je 10e5fd <_Heap_Allocate_aligned_with_boundary+0x119> 10e5f8: 3b 75 d4 cmp -0x2c(%ebp),%esi 10e5fb: 72 04 jb 10e601 <_Heap_Allocate_aligned_with_boundary+0x11d> boundary ); } } if ( alloc_begin != 0 ) { 10e5fd: 85 db test %ebx,%ebx 10e5ff: 75 11 jne 10e612 <_Heap_Allocate_aligned_with_boundary+0x12e> <== NEVER TAKEN break; } block = block->next; 10e601: 8b 49 08 mov 0x8(%ecx),%ecx if ( alignment == 0 ) { alignment = page_size; } } while ( block != free_list_tail ) { 10e604: 39 f9 cmp %edi,%ecx 10e606: 0f 85 3e ff ff ff jne 10e54a <_Heap_Allocate_aligned_with_boundary+0x66> 10e60c: 89 fe mov %edi,%esi 10e60e: 31 db xor %ebx,%ebx 10e610: eb 16 jmp 10e628 <_Heap_Allocate_aligned_with_boundary+0x144> <== ALWAYS TAKEN 10e612: 89 fe mov %edi,%esi block = block->next; } if ( alloc_begin != 0 ) { /* Statistics */ stats->searches += search_count; 10e614: 8b 45 e4 mov -0x1c(%ebp),%eax 10e617: 01 47 4c add %eax,0x4c(%edi) block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size ); 10e61a: ff 75 0c pushl 0xc(%ebp) 10e61d: 53 push %ebx 10e61e: 51 push %ecx 10e61f: 57 push %edi 10e620: e8 a3 c7 ff ff call 10adc8 <_Heap_Block_allocate> <== ALWAYS TAKEN 10e625: 83 c4 10 add $0x10,%esp uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { Heap_Statistics *const stats = &heap->stats; 10e628: 8b 45 e4 mov -0x1c(%ebp),%eax 10e62b: 39 46 44 cmp %eax,0x44(%esi) 10e62e: 73 03 jae 10e633 <_Heap_Allocate_aligned_with_boundary+0x14f> ); } /* Statistics */ if ( stats->max_search < search_count ) { stats->max_search = search_count; 10e630: 89 46 44 mov %eax,0x44(%esi) } return (void *) alloc_begin; 10e633: 89 d8 mov %ebx,%eax 10e635: eb 02 jmp 10e639 <_Heap_Allocate_aligned_with_boundary+0x155> <== ALWAYS TAKEN 10e637: 31 c0 xor %eax,%eax } 10e639: 8d 65 f4 lea -0xc(%ebp),%esp 10e63c: 5b pop %ebx 10e63d: 5e pop %esi 10e63e: 5f pop %edi 10e63f: c9 leave 10e640: c3 ret 0010adc8 <_Heap_Block_allocate>: Heap_Control *heap, Heap_Block *block, uintptr_t alloc_begin, uintptr_t alloc_size ) { 10adc8: 55 push %ebp 10adc9: 89 e5 mov %esp,%ebp 10adcb: 57 push %edi 10adcc: 56 push %esi 10adcd: 53 push %ebx 10adce: 83 ec 10 sub $0x10,%esp 10add1: 8b 75 08 mov 0x8(%ebp),%esi 10add4: 8b 5d 0c mov 0xc(%ebp),%ebx 10add7: 8b 45 10 mov 0x10(%ebp),%eax RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block( const Heap_Block *block ) { return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE; 10adda: 89 5d e8 mov %ebx,-0x18(%ebp) 10addd: 8d 50 f8 lea -0x8(%eax),%edx 10ade0: 89 55 f0 mov %edx,-0x10(%ebp) Heap_Statistics *const stats = &heap->stats; uintptr_t const alloc_area_begin = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_area_offset = alloc_begin - alloc_area_begin; 10ade3: 89 d7 mov %edx,%edi 10ade5: 29 df sub %ebx,%edi Heap_Block *free_list_anchor = NULL; _HAssert( alloc_area_begin <= alloc_begin ); if ( _Heap_Is_free( block ) ) { 10ade7: 8b 53 04 mov 0x4(%ebx),%edx 10adea: 83 e2 fe and $0xfffffffe,%edx /* Statistics */ --stats->free_blocks; ++stats->used_blocks; stats->free_size -= _Heap_Block_size( block ); } else { free_list_anchor = _Heap_Free_list_head( heap ); 10aded: 89 f1 mov %esi,%ecx Heap_Block *free_list_anchor = NULL; _HAssert( alloc_area_begin <= alloc_begin ); if ( _Heap_Is_free( block ) ) { 10adef: f6 44 13 04 01 testb $0x1,0x4(%ebx,%edx,1) 10adf4: 75 1b jne 10ae11 <_Heap_Block_allocate+0x49> free_list_anchor = block->prev; 10adf6: 8b 4b 0c mov 0xc(%ebx),%ecx return _Heap_Free_list_tail(heap)->prev; } RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block ) { Heap_Block *next = block->next; 10adf9: 8b 53 08 mov 0x8(%ebx),%edx Heap_Block *prev = block->prev; prev->next = next; 10adfc: 89 51 08 mov %edx,0x8(%ecx) next->prev = prev; 10adff: 89 4a 0c mov %ecx,0xc(%edx) _Heap_Free_list_remove( block ); /* Statistics */ --stats->free_blocks; 10ae02: ff 4e 38 decl 0x38(%esi) ++stats->used_blocks; 10ae05: ff 46 40 incl 0x40(%esi) stats->free_size -= _Heap_Block_size( block ); 10ae08: 8b 53 04 mov 0x4(%ebx),%edx 10ae0b: 83 e2 fe and $0xfffffffe,%edx 10ae0e: 29 56 30 sub %edx,0x30(%esi) } else { free_list_anchor = _Heap_Free_list_head( heap ); } if ( alloc_area_offset < heap->page_size ) { 10ae11: 8b 56 10 mov 0x10(%esi),%edx 10ae14: 89 55 e4 mov %edx,-0x1c(%ebp) 10ae17: 39 d7 cmp %edx,%edi 10ae19: 73 0e jae 10ae29 <_Heap_Block_allocate+0x61> Heap_Block *block, Heap_Block *free_list_anchor, uintptr_t alloc_size ) { _Heap_Block_split( heap, block, free_list_anchor, alloc_size ); 10ae1b: 03 7d 14 add 0x14(%ebp),%edi 10ae1e: 57 push %edi 10ae1f: 51 push %ecx 10ae20: 53 push %ebx 10ae21: 56 push %esi 10ae22: e8 cc fe ff ff call 10acf3 <_Heap_Block_split> <== ALWAYS TAKEN 10ae27: eb 62 jmp 10ae8b <_Heap_Block_allocate+0xc3> <== ALWAYS 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; 10ae29: 8b 7b 04 mov 0x4(%ebx),%edi 10ae2c: 89 7d ec mov %edi,-0x14(%ebp) RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_of_alloc_area( uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) 10ae2f: 31 d2 xor %edx,%edx 10ae31: f7 75 e4 divl -0x1c(%ebp) 10ae34: 8b 45 f0 mov -0x10(%ebp),%eax 10ae37: 29 d0 sub %edx,%eax 10ae39: 89 c7 mov %eax,%edi _Heap_Block_of_alloc_area( alloc_begin, heap->page_size ); uintptr_t const new_block_begin = (uintptr_t) new_block; uintptr_t const new_block_size = block_end - new_block_begin; block_end = new_block_begin; block_size = block_end - block_begin; 10ae3b: 29 d8 sub %ebx,%eax _HAssert( block_size >= heap->min_block_size ); _HAssert( new_block_size >= heap->min_block_size ); /* Statistics */ stats->free_size += block_size; 10ae3d: 01 46 30 add %eax,0x30(%esi) if ( _Heap_Is_prev_used( block ) ) { 10ae40: f6 43 04 01 testb $0x1,0x4(%ebx) 10ae44: 74 16 je 10ae5c <_Heap_Block_allocate+0x94> RTEMS_INLINE_ROUTINE void _Heap_Free_list_insert_after( Heap_Block *block_before, Heap_Block *new_block ) { Heap_Block *next = block_before->next; 10ae46: 8b 51 08 mov 0x8(%ecx),%edx new_block->next = next; 10ae49: 89 53 08 mov %edx,0x8(%ebx) new_block->prev = block_before; 10ae4c: 89 4b 0c mov %ecx,0xc(%ebx) block_before->next = new_block; 10ae4f: 89 59 08 mov %ebx,0x8(%ecx) next->prev = new_block; 10ae52: 89 5a 0c mov %ebx,0xc(%edx) _Heap_Free_list_insert_after( free_list_anchor, block ); free_list_anchor = block; /* Statistics */ ++stats->free_blocks; 10ae55: ff 46 38 incl 0x38(%esi) 10ae58: 89 d9 mov %ebx,%ecx 10ae5a: eb 0a jmp 10ae66 <_Heap_Block_allocate+0x9e> <== ALWAYS TAKEN RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Prev_block( const Heap_Block *block ) { return (Heap_Block *) ((uintptr_t) block - block->prev_size); 10ae5c: 2b 1b sub (%ebx),%ebx Heap_Block *const prev_block = _Heap_Prev_block( block ); uintptr_t const prev_block_size = _Heap_Block_size( prev_block ); block = prev_block; block_begin = (uintptr_t) block; block_size += prev_block_size; 10ae5e: 8b 53 04 mov 0x4(%ebx),%edx 10ae61: 83 e2 fe and $0xfffffffe,%edx 10ae64: 01 d0 add %edx,%eax } block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED; 10ae66: 89 c2 mov %eax,%edx 10ae68: 83 ca 01 or $0x1,%edx 10ae6b: 89 53 04 mov %edx,0x4(%ebx) new_block->prev_size = block_size; 10ae6e: 89 07 mov %eax,(%edi) new_block->size_and_flag = new_block_size; 10ae70: 8b 45 ec mov -0x14(%ebp),%eax 10ae73: 83 e0 fe and $0xfffffffe,%eax 10ae76: 03 45 e8 add -0x18(%ebp),%eax 10ae79: 29 f8 sub %edi,%eax 10ae7b: 89 47 04 mov %eax,0x4(%edi) _Heap_Block_split( heap, new_block, free_list_anchor, alloc_size ); 10ae7e: ff 75 14 pushl 0x14(%ebp) 10ae81: 51 push %ecx 10ae82: 57 push %edi 10ae83: 56 push %esi 10ae84: e8 6a fe ff ff call 10acf3 <_Heap_Block_split> <== ALWAYS TAKEN 10ae89: 89 fb mov %edi,%ebx 10ae8b: 83 c4 10 add $0x10,%esp alloc_size ); } /* Statistics */ if ( stats->min_free_size > stats->free_size ) { 10ae8e: 8b 46 30 mov 0x30(%esi),%eax Heap_Block *block, uintptr_t alloc_begin, uintptr_t alloc_size ) { Heap_Statistics *const stats = &heap->stats; 10ae91: 39 46 34 cmp %eax,0x34(%esi) 10ae94: 76 03 jbe 10ae99 <_Heap_Block_allocate+0xd1> ); } /* Statistics */ if ( stats->min_free_size > stats->free_size ) { stats->min_free_size = stats->free_size; 10ae96: 89 46 34 mov %eax,0x34(%esi) } return block; } 10ae99: 89 d8 mov %ebx,%eax 10ae9b: 8d 65 f4 lea -0xc(%ebp),%esp 10ae9e: 5b pop %ebx 10ae9f: 5e pop %esi 10aea0: 5f pop %edi 10aea1: c9 leave 10aea2: c3 ret 0010acf3 <_Heap_Block_split>: Heap_Control *heap, Heap_Block *block, Heap_Block *free_list_anchor, uintptr_t alloc_size ) { 10acf3: 55 push %ebp 10acf4: 89 e5 mov %esp,%ebp 10acf6: 57 push %edi 10acf7: 56 push %esi 10acf8: 53 push %ebx 10acf9: 83 ec 10 sub $0x10,%esp 10acfc: 8b 4d 08 mov 0x8(%ebp),%ecx Heap_Statistics *const stats = &heap->stats; uintptr_t const page_size = heap->page_size; 10acff: 8b 71 10 mov 0x10(%ecx),%esi uintptr_t const min_block_size = heap->min_block_size; 10ad02: 8b 41 14 mov 0x14(%ecx),%eax 10ad05: 89 45 e4 mov %eax,-0x1c(%ebp) - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 10ad08: 8b 55 0c mov 0xc(%ebp),%edx 10ad0b: 8b 52 04 mov 0x4(%edx),%edx 10ad0e: 89 55 e8 mov %edx,-0x18(%ebp) 10ad11: 83 e2 fe and $0xfffffffe,%edx 10ad14: 89 55 ec mov %edx,-0x14(%ebp) uintptr_t const min_alloc_size = min_block_size - HEAP_BLOCK_HEADER_SIZE; uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const used_size = _Heap_Max( alloc_size, min_alloc_size ) + HEAP_BLOCK_HEADER_SIZE; 10ad17: 89 c2 mov %eax,%edx 10ad19: 83 ea 08 sub $0x8,%edx 10ad1c: 8b 45 14 mov 0x14(%ebp),%eax 10ad1f: 39 d0 cmp %edx,%eax 10ad21: 73 02 jae 10ad25 <_Heap_Block_split+0x32> 10ad23: 89 d0 mov %edx,%eax 10ad25: 83 c0 08 add $0x8,%eax 10ad28: 89 45 f0 mov %eax,-0x10(%ebp) RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_up( uintptr_t value, uintptr_t alignment ) { uintptr_t remainder = value % alignment; 10ad2b: 31 d2 xor %edx,%edx 10ad2d: f7 f6 div %esi if ( remainder != 0 ) { 10ad2f: 8b 7d f0 mov -0x10(%ebp),%edi 10ad32: 85 d2 test %edx,%edx 10ad34: 74 04 je 10ad3a <_Heap_Block_split+0x47> return value - remainder + alignment; 10ad36: 01 f7 add %esi,%edi 10ad38: 29 d7 sub %edx,%edi RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 10ad3a: 8b 45 0c mov 0xc(%ebp),%eax 10ad3d: 03 45 ec add -0x14(%ebp),%eax 10ad40: 89 c2 mov %eax,%edx Heap_Block *next_block = _Heap_Block_at( block, block_size ); _HAssert( used_size <= block_size + HEAP_BLOCK_SIZE_OFFSET ); _HAssert( used_size + free_size == block_size + HEAP_BLOCK_SIZE_OFFSET ); if ( free_size >= free_size_limit ) { 10ad42: 8b 5d ec mov -0x14(%ebp),%ebx 10ad45: 83 c3 04 add $0x4,%ebx 10ad48: 2b 5d f0 sub -0x10(%ebp),%ebx 10ad4b: 8b 75 e4 mov -0x1c(%ebp),%esi 10ad4e: 83 c6 04 add $0x4,%esi 10ad51: 39 f3 cmp %esi,%ebx 10ad53: 72 67 jb 10adbc <_Heap_Block_split+0xc9> 10ad55: 8b 5d 0c mov 0xc(%ebp),%ebx 10ad58: 8d 04 1f lea (%edi,%ebx,1),%eax Heap_Block *const free_block = _Heap_Block_at( block, used_block_size ); uintptr_t free_block_size = block_size - used_block_size; 10ad5b: 8b 75 ec mov -0x14(%ebp),%esi 10ad5e: 29 fe sub %edi,%esi uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; block->size_and_flag = size | flag; 10ad60: 8b 5d e8 mov -0x18(%ebp),%ebx 10ad63: 83 e3 01 and $0x1,%ebx 10ad66: 09 fb or %edi,%ebx 10ad68: 8b 7d 0c mov 0xc(%ebp),%edi 10ad6b: 89 5f 04 mov %ebx,0x4(%edi) _HAssert( used_block_size + free_block_size == block_size ); _Heap_Block_set_size( block, used_block_size ); /* Statistics */ stats->free_size += free_block_size; 10ad6e: 01 71 30 add %esi,0x30(%ecx) - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 10ad71: 8b 5a 04 mov 0x4(%edx),%ebx 10ad74: 83 e3 fe and $0xfffffffe,%ebx if ( _Heap_Is_used( next_block ) ) { 10ad77: f6 44 1a 04 01 testb $0x1,0x4(%edx,%ebx,1) 10ad7c: 74 17 je 10ad95 <_Heap_Block_split+0xa2> RTEMS_INLINE_ROUTINE void _Heap_Free_list_insert_after( Heap_Block *block_before, Heap_Block *new_block ) { Heap_Block *next = block_before->next; 10ad7e: 8b 7d 10 mov 0x10(%ebp),%edi 10ad81: 8b 5f 08 mov 0x8(%edi),%ebx new_block->next = next; 10ad84: 89 58 08 mov %ebx,0x8(%eax) new_block->prev = block_before; 10ad87: 89 78 0c mov %edi,0xc(%eax) block_before->next = new_block; 10ad8a: 89 47 08 mov %eax,0x8(%edi) next->prev = new_block; 10ad8d: 89 43 0c mov %eax,0xc(%ebx) _Heap_Free_list_insert_after( free_list_anchor, free_block ); /* Statistics */ ++stats->free_blocks; 10ad90: ff 41 38 incl 0x38(%ecx) 10ad93: eb 17 jmp 10adac <_Heap_Block_split+0xb9> <== ALWAYS TAKEN RTEMS_INLINE_ROUTINE void _Heap_Free_list_replace( Heap_Block *old_block, Heap_Block *new_block ) { Heap_Block *next = old_block->next; 10ad95: 8b 4a 08 mov 0x8(%edx),%ecx Heap_Block *prev = old_block->prev; 10ad98: 8b 52 0c mov 0xc(%edx),%edx new_block->next = next; 10ad9b: 89 48 08 mov %ecx,0x8(%eax) new_block->prev = prev; 10ad9e: 89 50 0c mov %edx,0xc(%eax) next->prev = new_block; 10ada1: 89 41 0c mov %eax,0xc(%ecx) prev->next = new_block; 10ada4: 89 42 08 mov %eax,0x8(%edx) } else { uintptr_t const next_block_size = _Heap_Block_size( next_block ); _Heap_Free_list_replace( next_block, free_block ); free_block_size += next_block_size; 10ada7: 01 de add %ebx,%esi RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 10ada9: 8d 14 06 lea (%esi,%eax,1),%edx next_block = _Heap_Block_at( free_block, free_block_size ); } free_block->size_and_flag = free_block_size | HEAP_PREV_BLOCK_USED; 10adac: 89 f1 mov %esi,%ecx 10adae: 83 c9 01 or $0x1,%ecx 10adb1: 89 48 04 mov %ecx,0x4(%eax) next_block->prev_size = free_block_size; 10adb4: 89 32 mov %esi,(%edx) next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 10adb6: 83 62 04 fe andl $0xfffffffe,0x4(%edx) 10adba: eb 04 jmp 10adc0 <_Heap_Block_split+0xcd> <== ALWAYS TAKEN } else { next_block->size_and_flag |= HEAP_PREV_BLOCK_USED; 10adbc: 83 48 04 01 orl $0x1,0x4(%eax) } } 10adc0: 83 c4 10 add $0x10,%esp 10adc3: 5b pop %ebx 10adc4: 5e pop %esi 10adc5: 5f pop %edi 10adc6: c9 leave 10adc7: c3 ret 00111880 <_Heap_Extend>: Heap_Control *heap, void *area_begin_ptr, uintptr_t area_size, uintptr_t *amount_extended ) { 111880: 55 push %ebp 111881: 89 e5 mov %esp,%ebp 111883: 56 push %esi 111884: 53 push %ebx 111885: 8b 4d 08 mov 0x8(%ebp),%ecx 111888: 8b 55 0c mov 0xc(%ebp),%edx Heap_Statistics *const stats = &heap->stats; uintptr_t const area_begin = (uintptr_t) area_begin_ptr; uintptr_t const heap_area_begin = heap->area_begin; uintptr_t const heap_area_end = heap->area_end; 11188b: 8b 71 1c mov 0x1c(%ecx),%esi uintptr_t const new_heap_area_end = heap_area_end + area_size; uintptr_t extend_size = 0; Heap_Block *const last_block = heap->last_block; 11188e: 8b 59 24 mov 0x24(%ecx),%ebx * 5. non-contiguous higher address (NOT SUPPORTED) * * As noted, this code only supports (4). */ if ( area_begin >= heap_area_begin && area_begin < heap_area_end ) { 111891: 39 f2 cmp %esi,%edx 111893: 73 0a jae 11189f <_Heap_Extend+0x1f> uintptr_t *amount_extended ) { Heap_Statistics *const stats = &heap->stats; uintptr_t const area_begin = (uintptr_t) area_begin_ptr; uintptr_t const heap_area_begin = heap->area_begin; 111895: b8 01 00 00 00 mov $0x1,%eax 11189a: 3b 51 18 cmp 0x18(%ecx),%edx 11189d: 73 5f jae 1118fe <_Heap_Extend+0x7e> * As noted, this code only supports (4). */ if ( area_begin >= heap_area_begin && area_begin < heap_area_end ) { return HEAP_EXTEND_ERROR; /* case 3 */ } else if ( area_begin != heap_area_end ) { 11189f: b8 02 00 00 00 mov $0x2,%eax 1118a4: 39 f2 cmp %esi,%edx 1118a6: 75 56 jne 1118fe <_Heap_Extend+0x7e> { Heap_Statistics *const stats = &heap->stats; uintptr_t const area_begin = (uintptr_t) area_begin_ptr; uintptr_t const heap_area_begin = heap->area_begin; uintptr_t const heap_area_end = heap->area_end; uintptr_t const new_heap_area_end = heap_area_end + area_size; 1118a8: 03 55 10 add 0x10(%ebp),%edx * Currently only case 4 should make it to this point. * The basic trick is to make the extend area look like a used * block and free it. */ heap->area_end = new_heap_area_end; 1118ab: 89 51 1c mov %edx,0x1c(%ecx) extend_size = new_heap_area_end 1118ae: 29 da sub %ebx,%edx 1118b0: 8d 72 f8 lea -0x8(%edx),%esi RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 1118b3: 89 f0 mov %esi,%eax 1118b5: 31 d2 xor %edx,%edx 1118b7: f7 71 10 divl 0x10(%ecx) 1118ba: 29 d6 sub %edx,%esi - (uintptr_t) last_block - HEAP_BLOCK_HEADER_SIZE; extend_size = _Heap_Align_down( extend_size, heap->page_size ); *amount_extended = extend_size; 1118bc: 8b 45 14 mov 0x14(%ebp),%eax 1118bf: 89 30 mov %esi,(%eax) if( extend_size >= heap->min_block_size ) { 1118c1: 31 c0 xor %eax,%eax 1118c3: 3b 71 14 cmp 0x14(%ecx),%esi 1118c6: 72 36 jb 1118fe <_Heap_Extend+0x7e> <== ALWAYS TAKEN RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 1118c8: 8d 14 1e lea (%esi,%ebx,1),%edx uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; block->size_and_flag = size | flag; 1118cb: 8b 43 04 mov 0x4(%ebx),%eax 1118ce: 83 e0 01 and $0x1,%eax 1118d1: 09 f0 or %esi,%eax 1118d3: 89 43 04 mov %eax,0x4(%ebx) Heap_Block *const new_last_block = _Heap_Block_at( last_block, extend_size ); _Heap_Block_set_size( last_block, extend_size ); new_last_block->size_and_flag = 1118d6: 8b 41 20 mov 0x20(%ecx),%eax 1118d9: 29 d0 sub %edx,%eax 1118db: 83 c8 01 or $0x1,%eax 1118de: 89 42 04 mov %eax,0x4(%edx) ((uintptr_t) heap->first_block - (uintptr_t) new_last_block) | HEAP_PREV_BLOCK_USED; heap->last_block = new_last_block; 1118e1: 89 51 24 mov %edx,0x24(%ecx) /* Statistics */ stats->size += extend_size; 1118e4: 01 71 2c add %esi,0x2c(%ecx) ++stats->used_blocks; 1118e7: ff 41 40 incl 0x40(%ecx) --stats->frees; /* Do not count subsequent call as actual free() */ 1118ea: ff 49 50 decl 0x50(%ecx) _Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block )); 1118ed: 50 push %eax 1118ee: 50 push %eax 1118ef: 83 c3 08 add $0x8,%ebx 1118f2: 53 push %ebx 1118f3: 51 push %ecx 1118f4: e8 7b be ff ff call 10d774 <_Heap_Free> <== ALWAYS TAKEN 1118f9: 31 c0 xor %eax,%eax 1118fb: 83 c4 10 add $0x10,%esp } return HEAP_EXTEND_SUCCESSFUL; } 1118fe: 8d 65 f8 lea -0x8(%ebp),%esp 111901: 5b pop %ebx 111902: 5e pop %esi 111903: c9 leave 111904: c3 ret 0010e644 <_Heap_Free>: #include #include #include bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) { 10e644: 55 push %ebp 10e645: 89 e5 mov %esp,%ebp 10e647: 57 push %edi 10e648: 56 push %esi 10e649: 53 push %ebx 10e64a: 83 ec 14 sub $0x14,%esp 10e64d: 8b 4d 08 mov 0x8(%ebp),%ecx 10e650: 8b 45 0c mov 0xc(%ebp),%eax RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_of_alloc_area( uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) 10e653: 8d 58 f8 lea -0x8(%eax),%ebx 10e656: 31 d2 xor %edx,%edx 10e658: f7 71 10 divl 0x10(%ecx) 10e65b: 29 d3 sub %edx,%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; 10e65d: 8b 41 20 mov 0x20(%ecx),%eax 10e660: 89 45 f0 mov %eax,-0x10(%ebp) RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap( const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block 10e663: 31 c0 xor %eax,%eax 10e665: 3b 5d f0 cmp -0x10(%ebp),%ebx 10e668: 72 08 jb 10e672 <_Heap_Free+0x2e> 10e66a: 31 c0 xor %eax,%eax 10e66c: 39 59 24 cmp %ebx,0x24(%ecx) 10e66f: 0f 93 c0 setae %al 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 ) ) { 10e672: 85 c0 test %eax,%eax 10e674: 0f 84 2d 01 00 00 je 10e7a7 <_Heap_Free+0x163> - 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; 10e67a: 8b 7b 04 mov 0x4(%ebx),%edi 10e67d: 89 fa mov %edi,%edx 10e67f: 83 e2 fe and $0xfffffffe,%edx 10e682: 89 55 e0 mov %edx,-0x20(%ebp) RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 10e685: 8d 04 13 lea (%ebx,%edx,1),%eax RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap( const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block 10e688: 31 f6 xor %esi,%esi 10e68a: 3b 45 f0 cmp -0x10(%ebp),%eax 10e68d: 72 0e jb 10e69d <_Heap_Free+0x59> <== ALWAYS TAKEN 10e68f: 39 41 24 cmp %eax,0x24(%ecx) 10e692: 0f 93 c2 setae %dl 10e695: 89 d6 mov %edx,%esi 10e697: 81 e6 ff 00 00 00 and $0xff,%esi } block_size = _Heap_Block_size( block ); next_block = _Heap_Block_at( block, block_size ); if ( !_Heap_Is_block_in_heap( heap, next_block ) ) { 10e69d: 85 f6 test %esi,%esi 10e69f: 0f 84 02 01 00 00 je 10e7a7 <_Heap_Free+0x163> <== ALWAYS TAKEN block->size_and_flag = size | flag; } RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block ) { return block->size_and_flag & HEAP_PREV_BLOCK_USED; 10e6a5: 8b 70 04 mov 0x4(%eax),%esi _HAssert( false ); return false; } if ( !_Heap_Is_prev_used( next_block ) ) { 10e6a8: f7 c6 01 00 00 00 test $0x1,%esi 10e6ae: 0f 84 f3 00 00 00 je 10e7a7 <_Heap_Free+0x163> <== ALWAYS 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; 10e6b4: 83 e6 fe and $0xfffffffe,%esi 10e6b7: 89 75 e8 mov %esi,-0x18(%ebp) return false; } next_block_size = _Heap_Block_size( next_block ); next_is_free = next_block != heap->last_block && !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size )); 10e6ba: 8b 51 24 mov 0x24(%ecx),%edx 10e6bd: 89 55 e4 mov %edx,-0x1c(%ebp) _HAssert( false ); return false; } next_block_size = _Heap_Block_size( next_block ); next_is_free = next_block != heap->last_block 10e6c0: 31 f6 xor %esi,%esi 10e6c2: 39 d0 cmp %edx,%eax 10e6c4: 74 0d je 10e6d3 <_Heap_Free+0x8f> 10e6c6: 8b 55 e8 mov -0x18(%ebp),%edx 10e6c9: 8b 74 10 04 mov 0x4(%eax,%edx,1),%esi 10e6cd: 83 e6 01 and $0x1,%esi 10e6d0: 83 f6 01 xor $0x1,%esi && !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size )); if ( !_Heap_Is_prev_used( block ) ) { 10e6d3: 83 e7 01 and $0x1,%edi 10e6d6: 75 64 jne 10e73c <_Heap_Free+0xf8> uintptr_t const prev_size = block->prev_size; 10e6d8: 8b 13 mov (%ebx),%edx 10e6da: 89 55 ec mov %edx,-0x14(%ebp) RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 10e6dd: 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 10e6df: 31 ff xor %edi,%edi 10e6e1: 3b 5d f0 cmp -0x10(%ebp),%ebx 10e6e4: 72 0e jb 10e6f4 <_Heap_Free+0xb0> <== ALWAYS TAKEN 10e6e6: 39 5d e4 cmp %ebx,-0x1c(%ebp) 10e6e9: 0f 93 c2 setae %dl 10e6ec: 89 d7 mov %edx,%edi 10e6ee: 81 e7 ff 00 00 00 and $0xff,%edi Heap_Block * const prev_block = _Heap_Block_at( block, -prev_size ); if ( !_Heap_Is_block_in_heap( heap, prev_block ) ) { 10e6f4: 85 ff test %edi,%edi 10e6f6: 0f 84 ab 00 00 00 je 10e7a7 <_Heap_Free+0x163> <== ALWAYS 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) ) { 10e6fc: f6 43 04 01 testb $0x1,0x4(%ebx) 10e700: 0f 84 a1 00 00 00 je 10e7a7 <_Heap_Free+0x163> <== ALWAYS TAKEN _HAssert( false ); return( false ); } if ( next_is_free ) { /* coalesce both */ 10e706: 89 f2 mov %esi,%edx 10e708: 84 d2 test %dl,%dl 10e70a: 74 1a je 10e726 <_Heap_Free+0xe2> uintptr_t const size = block_size + prev_size + next_block_size; 10e70c: 8b 75 e0 mov -0x20(%ebp),%esi 10e70f: 03 75 e8 add -0x18(%ebp),%esi 10e712: 03 75 ec add -0x14(%ebp),%esi return _Heap_Free_list_tail(heap)->prev; } RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block ) { Heap_Block *next = block->next; 10e715: 8b 78 08 mov 0x8(%eax),%edi Heap_Block *prev = block->prev; 10e718: 8b 40 0c mov 0xc(%eax),%eax prev->next = next; 10e71b: 89 78 08 mov %edi,0x8(%eax) next->prev = prev; 10e71e: 89 47 0c mov %eax,0xc(%edi) _Heap_Free_list_remove( next_block ); stats->free_blocks -= 1; 10e721: ff 49 38 decl 0x38(%ecx) 10e724: eb 34 jmp 10e75a <_Heap_Free+0x116> <== ALWAYS TAKEN 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; 10e726: 8b 75 e0 mov -0x20(%ebp),%esi 10e729: 03 75 ec add -0x14(%ebp),%esi prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 10e72c: 89 f7 mov %esi,%edi 10e72e: 83 cf 01 or $0x1,%edi 10e731: 89 7b 04 mov %edi,0x4(%ebx) next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 10e734: 83 60 04 fe andl $0xfffffffe,0x4(%eax) next_block->prev_size = size; 10e738: 89 30 mov %esi,(%eax) 10e73a: eb 5b jmp 10e797 <_Heap_Free+0x153> <== ALWAYS TAKEN } } else if ( next_is_free ) { /* coalesce next */ 10e73c: 89 f2 mov %esi,%edx 10e73e: 84 d2 test %dl,%dl 10e740: 74 25 je 10e767 <_Heap_Free+0x123> uintptr_t const size = block_size + next_block_size; 10e742: 8b 75 e8 mov -0x18(%ebp),%esi 10e745: 03 75 e0 add -0x20(%ebp),%esi RTEMS_INLINE_ROUTINE void _Heap_Free_list_replace( Heap_Block *old_block, Heap_Block *new_block ) { Heap_Block *next = old_block->next; 10e748: 8b 78 08 mov 0x8(%eax),%edi Heap_Block *prev = old_block->prev; 10e74b: 8b 40 0c mov 0xc(%eax),%eax new_block->next = next; 10e74e: 89 7b 08 mov %edi,0x8(%ebx) new_block->prev = prev; 10e751: 89 43 0c mov %eax,0xc(%ebx) next->prev = new_block; 10e754: 89 5f 0c mov %ebx,0xc(%edi) prev->next = new_block; 10e757: 89 58 08 mov %ebx,0x8(%eax) _Heap_Free_list_replace( next_block, block ); block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 10e75a: 89 f0 mov %esi,%eax 10e75c: 83 c8 01 or $0x1,%eax 10e75f: 89 43 04 mov %eax,0x4(%ebx) next_block = _Heap_Block_at( block, size ); next_block->prev_size = size; 10e762: 89 34 33 mov %esi,(%ebx,%esi,1) 10e765: eb 30 jmp 10e797 <_Heap_Free+0x153> <== ALWAYS TAKEN RTEMS_INLINE_ROUTINE void _Heap_Free_list_insert_after( Heap_Block *block_before, Heap_Block *new_block ) { Heap_Block *next = block_before->next; 10e767: 8b 71 08 mov 0x8(%ecx),%esi new_block->next = next; 10e76a: 89 73 08 mov %esi,0x8(%ebx) new_block->prev = block_before; 10e76d: 89 4b 0c mov %ecx,0xc(%ebx) block_before->next = new_block; 10e770: 89 59 08 mov %ebx,0x8(%ecx) next->prev = new_block; 10e773: 89 5e 0c mov %ebx,0xc(%esi) } 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; 10e776: 8b 75 e0 mov -0x20(%ebp),%esi 10e779: 83 ce 01 or $0x1,%esi 10e77c: 89 73 04 mov %esi,0x4(%ebx) next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 10e77f: 83 60 04 fe andl $0xfffffffe,0x4(%eax) next_block->prev_size = block_size; 10e783: 8b 55 e0 mov -0x20(%ebp),%edx 10e786: 89 10 mov %edx,(%eax) /* Statistics */ ++stats->free_blocks; 10e788: 8b 41 38 mov 0x38(%ecx),%eax 10e78b: 40 inc %eax 10e78c: 89 41 38 mov %eax,0x38(%ecx) #include #include bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) { Heap_Statistics *const stats = &heap->stats; 10e78f: 39 41 3c cmp %eax,0x3c(%ecx) 10e792: 73 03 jae 10e797 <_Heap_Free+0x153> next_block->prev_size = block_size; /* Statistics */ ++stats->free_blocks; if ( stats->max_free_blocks < stats->free_blocks ) { stats->max_free_blocks = stats->free_blocks; 10e794: 89 41 3c mov %eax,0x3c(%ecx) } } /* Statistics */ --stats->used_blocks; 10e797: ff 49 40 decl 0x40(%ecx) ++stats->frees; 10e79a: ff 41 50 incl 0x50(%ecx) stats->free_size += block_size; 10e79d: 8b 45 e0 mov -0x20(%ebp),%eax 10e7a0: 01 41 30 add %eax,0x30(%ecx) 10e7a3: b0 01 mov $0x1,%al return( true ); 10e7a5: eb 02 jmp 10e7a9 <_Heap_Free+0x165> <== ALWAYS TAKEN 10e7a7: 31 c0 xor %eax,%eax } 10e7a9: 83 c4 14 add $0x14,%esp 10e7ac: 5b pop %ebx 10e7ad: 5e pop %esi 10e7ae: 5f pop %edi 10e7af: c9 leave 10e7b0: c3 ret 00127e18 <_Heap_Get_free_information>: void _Heap_Get_free_information( Heap_Control *the_heap, Heap_Information *info ) { 127e18: 55 push %ebp 127e19: 89 e5 mov %esp,%ebp 127e1b: 53 push %ebx 127e1c: 8b 5d 08 mov 0x8(%ebp),%ebx 127e1f: 8b 45 0c mov 0xc(%ebp),%eax Heap_Block *the_block; Heap_Block *const tail = _Heap_Free_list_tail(the_heap); info->number = 0; 127e22: c7 00 00 00 00 00 movl $0x0,(%eax) info->largest = 0; 127e28: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax) info->total = 0; 127e2f: c7 40 08 00 00 00 00 movl $0x0,0x8(%eax) return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 127e36: 8b 4b 08 mov 0x8(%ebx),%ecx for(the_block = _Heap_Free_list_first(the_heap); 127e39: eb 16 jmp 127e51 <_Heap_Get_free_information+0x39> <== ALWAYS 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; 127e3b: 8b 51 04 mov 0x4(%ecx),%edx 127e3e: 83 e2 fe and $0xfffffffe,%edx uint32_t const the_size = _Heap_Block_size(the_block); /* As we always coalesce free blocks, prev block must have been used. */ _HAssert(_Heap_Is_prev_used(the_block)); info->number++; 127e41: ff 00 incl (%eax) info->total += the_size; 127e43: 01 50 08 add %edx,0x8(%eax) if ( info->largest < the_size ) 127e46: 39 50 04 cmp %edx,0x4(%eax) 127e49: 73 03 jae 127e4e <_Heap_Get_free_information+0x36> info->largest = the_size; 127e4b: 89 50 04 mov %edx,0x4(%eax) info->largest = 0; info->total = 0; for(the_block = _Heap_Free_list_first(the_heap); the_block != tail; the_block = the_block->next) 127e4e: 8b 49 08 mov 0x8(%ecx),%ecx info->number = 0; info->largest = 0; info->total = 0; for(the_block = _Heap_Free_list_first(the_heap); 127e51: 39 d9 cmp %ebx,%ecx 127e53: 75 e6 jne 127e3b <_Heap_Get_free_information+0x23> info->number++; info->total += the_size; if ( info->largest < the_size ) info->largest = the_size; } } 127e55: 5b pop %ebx 127e56: c9 leave 127e57: c3 ret 00134404 <_Heap_Get_information>: void _Heap_Get_information( Heap_Control *the_heap, Heap_Information_block *the_info ) { 134404: 55 push %ebp 134405: 89 e5 mov %esp,%ebp 134407: 57 push %edi 134408: 56 push %esi 134409: 53 push %ebx 13440a: 8b 4d 08 mov 0x8(%ebp),%ecx 13440d: 8b 45 0c mov 0xc(%ebp),%eax Heap_Block *the_block = the_heap->first_block; 134410: 8b 51 20 mov 0x20(%ecx),%edx Heap_Block *const end = the_heap->last_block; 134413: 8b 71 24 mov 0x24(%ecx),%esi _HAssert(the_block->prev_size == the_heap->page_size); _HAssert(_Heap_Is_prev_used(the_block)); the_info->Free.number = 0; 134416: c7 00 00 00 00 00 movl $0x0,(%eax) the_info->Free.total = 0; 13441c: c7 40 08 00 00 00 00 movl $0x0,0x8(%eax) the_info->Free.largest = 0; 134423: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax) the_info->Used.number = 0; 13442a: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax) the_info->Used.total = 0; 134431: c7 40 14 00 00 00 00 movl $0x0,0x14(%eax) the_info->Used.largest = 0; 134438: c7 40 10 00 00 00 00 movl $0x0,0x10(%eax) uintptr_t const the_size = _Heap_Block_size(the_block); Heap_Block *const next_block = _Heap_Block_at(the_block, the_size); Heap_Information *info; if ( _Heap_Is_prev_used(next_block) ) info = &the_info->Used; 13443f: 8d 58 0c lea 0xc(%eax),%ebx the_info->Free.largest = 0; the_info->Used.number = 0; the_info->Used.total = 0; the_info->Used.largest = 0; while ( the_block != end ) { 134442: eb 22 jmp 134466 <_Heap_Get_information+0x62> <== ALWAYS 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; 134444: 8b 4a 04 mov 0x4(%edx),%ecx 134447: 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); 13444a: 8d 3c 0a lea (%edx,%ecx,1),%edi uintptr_t const the_size = _Heap_Block_size(the_block); Heap_Block *const next_block = _Heap_Block_at(the_block, the_size); Heap_Information *info; if ( _Heap_Is_prev_used(next_block) ) 13444d: 89 c2 mov %eax,%edx 13444f: f6 47 04 01 testb $0x1,0x4(%edi) 134453: 74 02 je 134457 <_Heap_Get_information+0x53> 134455: 89 da mov %ebx,%edx info = &the_info->Used; else info = &the_info->Free; info->number++; 134457: ff 02 incl (%edx) info->total += the_size; 134459: 01 4a 08 add %ecx,0x8(%edx) if ( info->largest < the_size ) 13445c: 39 4a 04 cmp %ecx,0x4(%edx) 13445f: 73 03 jae 134464 <_Heap_Get_information+0x60> info->largest = the_size; 134461: 89 4a 04 mov %ecx,0x4(%edx) 134464: 89 fa mov %edi,%edx the_info->Free.largest = 0; the_info->Used.number = 0; the_info->Used.total = 0; the_info->Used.largest = 0; while ( the_block != end ) { 134466: 39 f2 cmp %esi,%edx 134468: 75 da jne 134444 <_Heap_Get_information+0x40> /* * Handle the last dummy block. Don't consider this block to be * "used" as client never allocated it. Make 'Used.total' contain this * blocks' overhead though. */ the_info->Used.total += HEAP_BLOCK_HEADER_SIZE; 13446a: 83 40 14 08 addl $0x8,0x14(%eax) } 13446e: 5b pop %ebx 13446f: 5e pop %esi 134470: 5f pop %edi 134471: c9 leave 134472: c3 ret 0010abb4 <_Heap_Initialize>: Heap_Control *heap, void *heap_area_begin_ptr, uintptr_t heap_area_size, uintptr_t page_size ) { 10abb4: 55 push %ebp 10abb5: 89 e5 mov %esp,%ebp 10abb7: 57 push %edi 10abb8: 56 push %esi 10abb9: 53 push %ebx 10abba: 83 ec 0c sub $0xc,%esp 10abbd: 8b 4d 08 mov 0x8(%ebp),%ecx 10abc0: 8b 5d 14 mov 0x14(%ebp),%ebx uintptr_t min_block_size = 0; uintptr_t overhead = 0; Heap_Block *first_block = NULL; Heap_Block *last_block = NULL; if ( page_size == 0 ) { 10abc3: 85 db test %ebx,%ebx 10abc5: 75 04 jne 10abcb <_Heap_Initialize+0x17> 10abc7: b3 04 mov $0x4,%bl 10abc9: eb 15 jmp 10abe0 <_Heap_Initialize+0x2c> <== ALWAYS TAKEN uintptr_t alignment ) { uintptr_t remainder = value % alignment; if ( remainder != 0 ) { 10abcb: 89 d8 mov %ebx,%eax 10abcd: 83 e0 03 and $0x3,%eax 10abd0: 74 05 je 10abd7 <_Heap_Initialize+0x23> return value - remainder + alignment; 10abd2: 83 c3 04 add $0x4,%ebx 10abd5: 29 c3 sub %eax,%ebx page_size = CPU_ALIGNMENT; } else { page_size = _Heap_Align_up( page_size, CPU_ALIGNMENT ); if ( page_size < CPU_ALIGNMENT ) { 10abd7: 83 fb 03 cmp $0x3,%ebx 10abda: 0f 86 01 01 00 00 jbe 10ace1 <_Heap_Initialize+0x12d> RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_up( uintptr_t value, uintptr_t alignment ) { uintptr_t remainder = value % alignment; 10abe0: b8 10 00 00 00 mov $0x10,%eax 10abe5: 31 d2 xor %edx,%edx 10abe7: f7 f3 div %ebx if ( remainder != 0 ) { 10abe9: c7 45 f0 10 00 00 00 movl $0x10,-0x10(%ebp) 10abf0: 85 d2 test %edx,%edx 10abf2: 74 08 je 10abfc <_Heap_Initialize+0x48> return value - remainder + alignment; 10abf4: 8d 43 10 lea 0x10(%ebx),%eax 10abf7: 29 d0 sub %edx,%eax 10abf9: 89 45 f0 mov %eax,-0x10(%ebp) ) { Heap_Statistics *const stats = &heap->stats; uintptr_t const heap_area_begin = (uintptr_t) heap_area_begin_ptr; uintptr_t const heap_area_end = heap_area_begin + heap_area_size; uintptr_t alloc_area_begin = heap_area_begin + HEAP_BLOCK_HEADER_SIZE; 10abfc: 8b 7d 0c mov 0xc(%ebp),%edi 10abff: 83 c7 08 add $0x8,%edi RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_up( uintptr_t value, uintptr_t alignment ) { uintptr_t remainder = value % alignment; 10ac02: 89 f8 mov %edi,%eax 10ac04: 31 d2 xor %edx,%edx 10ac06: f7 f3 div %ebx if ( remainder != 0 ) { 10ac08: 85 d2 test %edx,%edx 10ac0a: 74 05 je 10ac11 <_Heap_Initialize+0x5d> return value - remainder + alignment; 10ac0c: 8d 3c 3b lea (%ebx,%edi,1),%edi 10ac0f: 29 d7 sub %edx,%edi uintptr_t page_size ) { Heap_Statistics *const stats = &heap->stats; uintptr_t const heap_area_begin = (uintptr_t) heap_area_begin_ptr; uintptr_t const heap_area_end = heap_area_begin + heap_area_size; 10ac11: 8b 45 0c mov 0xc(%ebp),%eax 10ac14: 03 45 10 add 0x10(%ebp),%eax 10ac17: 89 45 ec mov %eax,-0x14(%ebp) } min_block_size = _Heap_Align_up( sizeof( Heap_Block ), page_size ); alloc_area_begin = _Heap_Align_up( alloc_area_begin, page_size ); first_block_begin = alloc_area_begin - HEAP_BLOCK_HEADER_SIZE; overhead = HEAP_BLOCK_HEADER_SIZE + (first_block_begin - heap_area_begin); 10ac1a: 8d 77 f8 lea -0x8(%edi),%esi 10ac1d: 2b 7d 0c sub 0xc(%ebp),%edi first_block_size = heap_area_size - overhead; first_block_size = _Heap_Align_down ( first_block_size, page_size ); alloc_area_size = first_block_size - HEAP_BLOCK_HEADER_SIZE; if ( 10ac20: 39 7d 10 cmp %edi,0x10(%ebp) 10ac23: 0f 86 b8 00 00 00 jbe 10ace1 <_Heap_Initialize+0x12d> 10ac29: 8b 45 0c mov 0xc(%ebp),%eax 10ac2c: 39 45 ec cmp %eax,-0x14(%ebp) 10ac2f: 0f 82 ac 00 00 00 jb 10ace1 <_Heap_Initialize+0x12d> min_block_size = _Heap_Align_up( sizeof( Heap_Block ), page_size ); alloc_area_begin = _Heap_Align_up( alloc_area_begin, page_size ); first_block_begin = alloc_area_begin - HEAP_BLOCK_HEADER_SIZE; overhead = HEAP_BLOCK_HEADER_SIZE + (first_block_begin - heap_area_begin); first_block_size = heap_area_size - overhead; 10ac35: 8b 45 10 mov 0x10(%ebp),%eax 10ac38: 29 f8 sub %edi,%eax 10ac3a: 89 c7 mov %eax,%edi RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 10ac3c: 31 d2 xor %edx,%edx 10ac3e: f7 f3 div %ebx 10ac40: 29 d7 sub %edx,%edi first_block_size = _Heap_Align_down ( first_block_size, page_size ); alloc_area_size = first_block_size - HEAP_BLOCK_HEADER_SIZE; if ( 10ac42: 3b 7d f0 cmp -0x10(%ebp),%edi 10ac45: 0f 82 96 00 00 00 jb 10ace1 <_Heap_Initialize+0x12d> alloc_area_begin = _Heap_Align_up( alloc_area_begin, page_size ); first_block_begin = alloc_area_begin - HEAP_BLOCK_HEADER_SIZE; overhead = HEAP_BLOCK_HEADER_SIZE + (first_block_begin - heap_area_begin); first_block_size = heap_area_size - overhead; first_block_size = _Heap_Align_down ( first_block_size, page_size ); alloc_area_size = first_block_size - HEAP_BLOCK_HEADER_SIZE; 10ac4b: 8d 47 f8 lea -0x8(%edi),%eax 10ac4e: 89 45 e8 mov %eax,-0x18(%ebp) return 0; } /* First block */ first_block = (Heap_Block *) first_block_begin; first_block->prev_size = page_size; 10ac51: 89 1e mov %ebx,(%esi) first_block->size_and_flag = first_block_size | HEAP_PREV_BLOCK_USED; 10ac53: 89 fa mov %edi,%edx 10ac55: 83 ca 01 or $0x1,%edx 10ac58: 89 56 04 mov %edx,0x4(%esi) first_block->next = _Heap_Free_list_tail( heap ); 10ac5b: 89 4e 08 mov %ecx,0x8(%esi) first_block->prev = _Heap_Free_list_head( heap ); 10ac5e: 89 4e 0c mov %ecx,0xc(%esi) RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 10ac61: 8d 14 37 lea (%edi,%esi,1),%edx * block indicates that the previous block is used, this ensures that the * last block appears as used for the _Heap_Is_used() and _Heap_Is_free() * functions. */ last_block = _Heap_Block_at( first_block, first_block_size ); last_block->prev_size = first_block_size; 10ac64: 89 3a mov %edi,(%edx) last_block->size_and_flag = first_block_begin - (uintptr_t) last_block; 10ac66: 89 f0 mov %esi,%eax 10ac68: 29 d0 sub %edx,%eax 10ac6a: 89 42 04 mov %eax,0x4(%edx) /* Heap control */ heap->page_size = page_size; 10ac6d: 89 59 10 mov %ebx,0x10(%ecx) heap->min_block_size = min_block_size; 10ac70: 8b 45 f0 mov -0x10(%ebp),%eax 10ac73: 89 41 14 mov %eax,0x14(%ecx) heap->area_begin = heap_area_begin; 10ac76: 8b 45 0c mov 0xc(%ebp),%eax 10ac79: 89 41 18 mov %eax,0x18(%ecx) heap->area_end = heap_area_end; 10ac7c: 8b 45 ec mov -0x14(%ebp),%eax 10ac7f: 89 41 1c mov %eax,0x1c(%ecx) heap->first_block = first_block; 10ac82: 89 71 20 mov %esi,0x20(%ecx) heap->last_block = last_block; 10ac85: 89 51 24 mov %edx,0x24(%ecx) _Heap_Free_list_head( heap )->next = first_block; 10ac88: 89 71 08 mov %esi,0x8(%ecx) _Heap_Free_list_tail( heap )->prev = first_block; 10ac8b: 89 71 0c mov %esi,0xc(%ecx) /* Statistics */ stats->size = first_block_size; 10ac8e: 89 79 2c mov %edi,0x2c(%ecx) stats->free_size = first_block_size; 10ac91: 89 79 30 mov %edi,0x30(%ecx) stats->min_free_size = first_block_size; 10ac94: 89 79 34 mov %edi,0x34(%ecx) stats->free_blocks = 1; 10ac97: c7 41 38 01 00 00 00 movl $0x1,0x38(%ecx) stats->max_free_blocks = 1; 10ac9e: c7 41 3c 01 00 00 00 movl $0x1,0x3c(%ecx) stats->used_blocks = 0; 10aca5: c7 41 40 00 00 00 00 movl $0x0,0x40(%ecx) stats->max_search = 0; 10acac: c7 41 44 00 00 00 00 movl $0x0,0x44(%ecx) stats->allocs = 0; 10acb3: c7 41 48 00 00 00 00 movl $0x0,0x48(%ecx) stats->searches = 0; 10acba: c7 41 4c 00 00 00 00 movl $0x0,0x4c(%ecx) stats->frees = 0; 10acc1: c7 41 50 00 00 00 00 movl $0x0,0x50(%ecx) stats->resizes = 0; 10acc8: c7 41 54 00 00 00 00 movl $0x0,0x54(%ecx) stats->instance = instance++; 10accf: 8b 15 0c 35 12 00 mov 0x12350c,%edx 10acd5: 89 51 28 mov %edx,0x28(%ecx) 10acd8: 42 inc %edx 10acd9: 89 15 0c 35 12 00 mov %edx,0x12350c ); _HAssert( _Heap_Is_aligned( _Heap_Alloc_area_of_block( last_block ), page_size ) ); return alloc_area_size; 10acdf: eb 07 jmp 10ace8 <_Heap_Initialize+0x134> <== ALWAYS TAKEN 10ace1: c7 45 e8 00 00 00 00 movl $0x0,-0x18(%ebp) } 10ace8: 8b 45 e8 mov -0x18(%ebp),%eax 10aceb: 83 c4 0c add $0xc,%esp 10acee: 5b pop %ebx 10acef: 5e pop %esi 10acf0: 5f pop %edi 10acf1: c9 leave 10acf2: c3 ret 0011ba08 <_Heap_Resize_block>: void *alloc_begin_ptr, uintptr_t new_alloc_size, uintptr_t *old_size, uintptr_t *new_size ) { 11ba08: 55 push %ebp 11ba09: 89 e5 mov %esp,%ebp 11ba0b: 57 push %edi 11ba0c: 56 push %esi 11ba0d: 53 push %ebx 11ba0e: 83 ec 2c sub $0x2c,%esp 11ba11: 8b 5d 08 mov 0x8(%ebp),%ebx 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 ) 11ba14: 8b 4d 0c mov 0xc(%ebp),%ecx 11ba17: 83 e9 08 sub $0x8,%ecx 11ba1a: 8b 45 0c mov 0xc(%ebp),%eax 11ba1d: 31 d2 xor %edx,%edx 11ba1f: f7 73 10 divl 0x10(%ebx) 11ba22: 29 d1 sub %edx,%ecx uintptr_t const alloc_begin = (uintptr_t) alloc_begin_ptr; Heap_Block *const block = _Heap_Block_of_alloc_area( alloc_begin, page_size ); *old_size = 0; 11ba24: 8b 45 14 mov 0x14(%ebp),%eax 11ba27: c7 00 00 00 00 00 movl $0x0,(%eax) *new_size = 0; 11ba2d: 8b 55 18 mov 0x18(%ebp),%edx 11ba30: c7 02 00 00 00 00 movl $0x0,(%edx) RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap( const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block 11ba36: 39 4b 20 cmp %ecx,0x20(%ebx) 11ba39: 0f 87 ac 00 00 00 ja 11baeb <_Heap_Resize_block+0xe3> 11ba3f: 39 4b 24 cmp %ecx,0x24(%ebx) 11ba42: 0f 82 a3 00 00 00 jb 11baeb <_Heap_Resize_block+0xe3> - 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; 11ba48: 8b 51 04 mov 0x4(%ecx),%edx 11ba4b: 83 e2 fe and $0xfffffffe,%edx { Heap_Statistics *const stats = &heap->stats; uintptr_t const block_begin = (uintptr_t) block; uintptr_t block_size = _Heap_Block_size( block ); uintptr_t block_end = block_begin + block_size; 11ba4e: 8d 3c 11 lea (%ecx,%edx,1),%edi uintptr_t alloc_size = block_end - alloc_begin + HEAP_BLOCK_SIZE_OFFSET; 11ba51: 89 f8 mov %edi,%eax 11ba53: 2b 45 0c sub 0xc(%ebp),%eax 11ba56: 83 c0 04 add $0x4,%eax 11ba59: 89 45 e4 mov %eax,-0x1c(%ebp) 11ba5c: 8b 77 04 mov 0x4(%edi),%esi 11ba5f: 83 e6 fe and $0xfffffffe,%esi 11ba62: 89 75 d4 mov %esi,-0x2c(%ebp) RTEMS_INLINE_ROUTINE bool _Heap_Is_free( const Heap_Block *block ) { return !_Heap_Is_used( block ); 11ba65: 8b 44 37 04 mov 0x4(%edi,%esi,1),%eax 11ba69: 83 e0 01 and $0x1,%eax 11ba6c: 89 45 d0 mov %eax,-0x30(%ebp) bool next_block_is_free = _Heap_Is_free( next_block );; _HAssert( _Heap_Is_block_in_heap( heap, next_block ) ); _HAssert( _Heap_Is_prev_used( next_block ) ); *old_size = alloc_size; 11ba6f: 8b 45 e4 mov -0x1c(%ebp),%eax 11ba72: 8b 75 14 mov 0x14(%ebp),%esi 11ba75: 89 06 mov %eax,(%esi) if ( next_block_is_free ) { 11ba77: 8a 45 d0 mov -0x30(%ebp),%al 11ba7a: 34 01 xor $0x1,%al 11ba7c: 88 45 e3 mov %al,-0x1d(%ebp) 11ba7f: 74 09 je 11ba8a <_Heap_Resize_block+0x82> block_size += next_block_size; 11ba81: 03 55 d4 add -0x2c(%ebp),%edx alloc_size += next_block_size; 11ba84: 8b 75 d4 mov -0x2c(%ebp),%esi 11ba87: 01 75 e4 add %esi,-0x1c(%ebp) } if ( new_alloc_size > alloc_size ) { 11ba8a: b8 01 00 00 00 mov $0x1,%eax 11ba8f: 8b 75 e4 mov -0x1c(%ebp),%esi 11ba92: 39 75 10 cmp %esi,0x10(%ebp) 11ba95: 77 59 ja 11baf0 <_Heap_Resize_block+0xe8> return HEAP_RESIZE_UNSATISFIED; } if ( next_block_is_free ) { 11ba97: 80 7d e3 00 cmpb $0x0,-0x1d(%ebp) 11ba9b: 74 25 je 11bac2 <_Heap_Resize_block+0xba> uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; block->size_and_flag = size | flag; 11ba9d: 8b 41 04 mov 0x4(%ecx),%eax 11baa0: 83 e0 01 and $0x1,%eax 11baa3: 09 d0 or %edx,%eax 11baa5: 89 41 04 mov %eax,0x4(%ecx) return _Heap_Free_list_tail(heap)->prev; } RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block ) { Heap_Block *next = block->next; 11baa8: 8b 47 08 mov 0x8(%edi),%eax Heap_Block *prev = block->prev; 11baab: 8b 7f 0c mov 0xc(%edi),%edi prev->next = next; 11baae: 89 47 08 mov %eax,0x8(%edi) next->prev = prev; 11bab1: 89 78 0c mov %edi,0xc(%eax) _Heap_Block_set_size( block, block_size ); _Heap_Free_list_remove( next_block ); next_block = _Heap_Block_at( block, block_size ); next_block->size_and_flag |= HEAP_PREV_BLOCK_USED; 11bab4: 83 4c 0a 04 01 orl $0x1,0x4(%edx,%ecx,1) /* Statistics */ --stats->free_blocks; 11bab9: ff 4b 38 decl 0x38(%ebx) stats->free_size -= next_block_size; 11babc: 8b 45 d4 mov -0x2c(%ebp),%eax 11babf: 29 43 30 sub %eax,0x30(%ebx) } block = _Heap_Block_allocate( heap, block, alloc_begin, new_alloc_size ); 11bac2: ff 75 10 pushl 0x10(%ebp) 11bac5: ff 75 0c pushl 0xc(%ebp) 11bac8: 51 push %ecx 11bac9: 53 push %ebx 11baca: e8 f9 f2 fe ff call 10adc8 <_Heap_Block_allocate> <== ALWAYS TAKEN block_size = _Heap_Block_size( block ); next_block = _Heap_Block_at( block, block_size ); *new_size = (uintptr_t) next_block - alloc_begin + HEAP_BLOCK_SIZE_OFFSET; 11bacf: 8b 50 04 mov 0x4(%eax),%edx 11bad2: 83 e2 fe and $0xfffffffe,%edx 11bad5: 2b 45 0c sub 0xc(%ebp),%eax 11bad8: 8d 44 10 04 lea 0x4(%eax,%edx,1),%eax 11badc: 8b 55 18 mov 0x18(%ebp),%edx 11badf: 89 02 mov %eax,(%edx) /* Statistics */ ++stats->resizes; 11bae1: ff 43 54 incl 0x54(%ebx) 11bae4: 31 c0 xor %eax,%eax 11bae6: 83 c4 10 add $0x10,%esp 11bae9: eb 05 jmp 11baf0 <_Heap_Resize_block+0xe8> <== ALWAYS TAKEN 11baeb: b8 02 00 00 00 mov $0x2,%eax new_size ); } else { return HEAP_RESIZE_FATAL_ERROR; } } 11baf0: 8d 65 f4 lea -0xc(%ebp),%esp 11baf3: 5b pop %ebx 11baf4: 5e pop %esi 11baf5: 5f pop %edi 11baf6: c9 leave 11baf7: c3 ret 0011baf8 <_Heap_Size_of_alloc_area>: bool _Heap_Size_of_alloc_area( Heap_Control *heap, void *alloc_begin_ptr, uintptr_t *alloc_size ) { 11baf8: 55 push %ebp 11baf9: 89 e5 mov %esp,%ebp 11bafb: 56 push %esi 11bafc: 53 push %ebx 11bafd: 8b 5d 08 mov 0x8(%ebp),%ebx 11bb00: 8b 75 0c mov 0xc(%ebp),%esi RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_of_alloc_area( uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) 11bb03: 8d 4e f8 lea -0x8(%esi),%ecx 11bb06: 89 f0 mov %esi,%eax 11bb08: 31 d2 xor %edx,%edx 11bb0a: f7 73 10 divl 0x10(%ebx) 11bb0d: 29 d1 sub %edx,%ecx const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block && (uintptr_t) block <= (uintptr_t) heap->last_block; 11bb0f: 8b 53 20 mov 0x20(%ebx),%edx RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap( const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block 11bb12: 31 c0 xor %eax,%eax 11bb14: 39 d1 cmp %edx,%ecx 11bb16: 72 08 jb 11bb20 <_Heap_Size_of_alloc_area+0x28> 11bb18: 31 c0 xor %eax,%eax 11bb1a: 39 4b 24 cmp %ecx,0x24(%ebx) 11bb1d: 0f 93 c0 setae %al 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 ) ) { 11bb20: 85 c0 test %eax,%eax 11bb22: 74 2e je 11bb52 <_Heap_Size_of_alloc_area+0x5a> RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 11bb24: 8b 41 04 mov 0x4(%ecx),%eax 11bb27: 83 e0 fe and $0xfffffffe,%eax 11bb2a: 01 c1 add %eax,%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 11bb2c: 31 c0 xor %eax,%eax 11bb2e: 39 d1 cmp %edx,%ecx 11bb30: 72 08 jb 11bb3a <_Heap_Size_of_alloc_area+0x42> <== ALWAYS TAKEN 11bb32: 31 c0 xor %eax,%eax 11bb34: 39 4b 24 cmp %ecx,0x24(%ebx) 11bb37: 0f 93 c0 setae %al } block_size = _Heap_Block_size( block ); next_block = _Heap_Block_at( block, block_size ); if ( 11bb3a: 85 c0 test %eax,%eax 11bb3c: 74 14 je 11bb52 <_Heap_Size_of_alloc_area+0x5a> <== ALWAYS TAKEN 11bb3e: f6 41 04 01 testb $0x1,0x4(%ecx) 11bb42: 74 0e je 11bb52 <_Heap_Size_of_alloc_area+0x5a> <== ALWAYS TAKEN || !_Heap_Is_prev_used( next_block ) ) { return false; } *alloc_size = (uintptr_t) next_block + HEAP_BLOCK_SIZE_OFFSET - alloc_begin; 11bb44: 29 f1 sub %esi,%ecx 11bb46: 8d 51 04 lea 0x4(%ecx),%edx 11bb49: 8b 45 10 mov 0x10(%ebp),%eax 11bb4c: 89 10 mov %edx,(%eax) 11bb4e: b0 01 mov $0x1,%al return true; 11bb50: eb 02 jmp 11bb54 <_Heap_Size_of_alloc_area+0x5c> <== ALWAYS TAKEN 11bb52: 31 c0 xor %eax,%eax } 11bb54: 5b pop %ebx 11bb55: 5e pop %esi 11bb56: c9 leave 11bb57: c3 ret 0010b8b5 <_Heap_Walk>: bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { 10b8b5: 55 push %ebp 10b8b6: 89 e5 mov %esp,%ebp 10b8b8: 57 push %edi 10b8b9: 56 push %esi 10b8ba: 53 push %ebx 10b8bb: 83 ec 4c sub $0x4c,%esp 10b8be: 8b 7d 08 mov 0x8(%ebp),%edi 10b8c1: 8b 75 0c mov 0xc(%ebp),%esi uintptr_t const page_size = heap->page_size; 10b8c4: 8b 4f 10 mov 0x10(%edi),%ecx uintptr_t const min_block_size = heap->min_block_size; 10b8c7: 8b 47 14 mov 0x14(%edi),%eax 10b8ca: 89 45 dc mov %eax,-0x24(%ebp) Heap_Block *const last_block = heap->last_block; 10b8cd: 8b 57 24 mov 0x24(%edi),%edx 10b8d0: 89 55 d0 mov %edx,-0x30(%ebp) Heap_Block *block = heap->first_block; 10b8d3: 8b 5f 20 mov 0x20(%edi),%ebx Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; 10b8d6: c7 45 e4 c7 bb 10 00 movl $0x10bbc7,-0x1c(%ebp) 10b8dd: 80 7d 10 00 cmpb $0x0,0x10(%ebp) 10b8e1: 75 07 jne 10b8ea <_Heap_Walk+0x35> 10b8e3: c7 45 e4 b0 b8 10 00 movl $0x10b8b0,-0x1c(%ebp) if ( !_System_state_Is_up( _System_state_Get() ) ) { 10b8ea: 83 3d 74 53 12 00 03 cmpl $0x3,0x125374 10b8f1: 0f 85 c6 02 00 00 jne 10bbbd <_Heap_Walk+0x308> 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)( 10b8f7: 50 push %eax 10b8f8: ff 77 0c pushl 0xc(%edi) 10b8fb: ff 77 08 pushl 0x8(%edi) 10b8fe: ff 75 d0 pushl -0x30(%ebp) 10b901: 53 push %ebx 10b902: ff 77 1c pushl 0x1c(%edi) 10b905: ff 77 18 pushl 0x18(%edi) 10b908: ff 75 dc pushl -0x24(%ebp) 10b90b: 51 push %ecx 10b90c: 68 e8 e4 11 00 push $0x11e4e8 10b911: 6a 00 push $0x0 10b913: 56 push %esi 10b914: 89 4d bc mov %ecx,-0x44(%ebp) 10b917: 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 ) { 10b91a: 83 c4 30 add $0x30,%esp 10b91d: 8b 4d bc mov -0x44(%ebp),%ecx 10b920: 85 c9 test %ecx,%ecx 10b922: 75 0b jne 10b92f <_Heap_Walk+0x7a> (*printer)( source, true, "page size is zero\n" ); 10b924: 53 push %ebx 10b925: 68 79 e5 11 00 push $0x11e579 10b92a: e9 5b 02 00 00 jmp 10bb8a <_Heap_Walk+0x2d5> <== ALWAYS TAKEN return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { 10b92f: f6 c1 03 test $0x3,%cl 10b932: 74 0b je 10b93f <_Heap_Walk+0x8a> (*printer)( 10b934: 51 push %ecx 10b935: 68 8c e5 11 00 push $0x11e58c 10b93a: e9 4b 02 00 00 jmp 10bb8a <_Heap_Walk+0x2d5> <== ALWAYS TAKEN ); return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { 10b93f: 8b 45 dc mov -0x24(%ebp),%eax 10b942: 31 d2 xor %edx,%edx 10b944: f7 f1 div %ecx 10b946: 85 d2 test %edx,%edx 10b948: 74 0d je 10b957 <_Heap_Walk+0xa2> (*printer)( 10b94a: ff 75 dc pushl -0x24(%ebp) 10b94d: 68 aa e5 11 00 push $0x11e5aa 10b952: e9 33 02 00 00 jmp 10bb8a <_Heap_Walk+0x2d5> <== ALWAYS TAKEN ); return false; } if ( 10b957: 8d 43 08 lea 0x8(%ebx),%eax 10b95a: 31 d2 xor %edx,%edx 10b95c: f7 f1 div %ecx 10b95e: 85 d2 test %edx,%edx 10b960: 74 0b je 10b96d <_Heap_Walk+0xb8> !_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size ) ) { (*printer)( 10b962: 53 push %ebx 10b963: 68 ce e5 11 00 push $0x11e5ce 10b968: e9 1d 02 00 00 jmp 10bb8a <_Heap_Walk+0x2d5> <== ALWAYS TAKEN ); return false; } if ( !_Heap_Is_prev_used( first_block ) ) { 10b96d: f6 43 04 01 testb $0x1,0x4(%ebx) 10b971: 75 0b jne 10b97e <_Heap_Walk+0xc9> (*printer)( 10b973: 51 push %ecx 10b974: 68 ff e5 11 00 push $0x11e5ff 10b979: e9 0c 02 00 00 jmp 10bb8a <_Heap_Walk+0x2d5> <== ALWAYS TAKEN ); return false; } if ( first_block->prev_size != page_size ) { 10b97e: 8b 03 mov (%ebx),%eax 10b980: 89 45 d4 mov %eax,-0x2c(%ebp) 10b983: 39 c8 cmp %ecx,%eax 10b985: 74 0f je 10b996 <_Heap_Walk+0xe1> (*printer)( 10b987: 83 ec 0c sub $0xc,%esp 10b98a: 51 push %ecx 10b98b: 50 push %eax 10b98c: 68 2d e6 11 00 push $0x11e62d 10b991: e9 3d 01 00 00 jmp 10bad3 <_Heap_Walk+0x21e> <== ALWAYS TAKEN ); return false; } if ( _Heap_Is_free( last_block ) ) { 10b996: 8b 55 d0 mov -0x30(%ebp),%edx 10b999: 8b 42 04 mov 0x4(%edx),%eax 10b99c: 83 e0 fe and $0xfffffffe,%eax 10b99f: f6 44 02 04 01 testb $0x1,0x4(%edx,%eax,1) 10b9a4: 75 0b jne 10b9b1 <_Heap_Walk+0xfc> (*printer)( 10b9a6: 52 push %edx 10b9a7: 68 58 e6 11 00 push $0x11e658 10b9ac: e9 d9 01 00 00 jmp 10bb8a <_Heap_Walk+0x2d5> <== ALWAYS TAKEN int source, Heap_Walk_printer printer, Heap_Control *heap ) { uintptr_t const page_size = heap->page_size; 10b9b1: 8b 4f 10 mov 0x10(%edi),%ecx 10b9b4: 89 4d d8 mov %ecx,-0x28(%ebp) return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 10b9b7: 8b 4f 08 mov 0x8(%edi),%ecx 10b9ba: 89 7d e0 mov %edi,-0x20(%ebp) 10b9bd: eb 6a jmp 10ba29 <_Heap_Walk+0x174> <== ALWAYS TAKEN 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 10b9bf: 31 c0 xor %eax,%eax 10b9c1: 39 4f 20 cmp %ecx,0x20(%edi) 10b9c4: 77 08 ja 10b9ce <_Heap_Walk+0x119> 10b9c6: 31 c0 xor %eax,%eax 10b9c8: 39 4f 24 cmp %ecx,0x24(%edi) 10b9cb: 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 ) ) { 10b9ce: 85 c0 test %eax,%eax 10b9d0: 75 0b jne 10b9dd <_Heap_Walk+0x128> (*printer)( 10b9d2: 51 push %ecx 10b9d3: 68 6d e6 11 00 push $0x11e66d 10b9d8: e9 ad 01 00 00 jmp 10bb8a <_Heap_Walk+0x2d5> <== ALWAYS TAKEN ); return false; } if ( 10b9dd: 8d 41 08 lea 0x8(%ecx),%eax 10b9e0: 31 d2 xor %edx,%edx 10b9e2: f7 75 d8 divl -0x28(%ebp) 10b9e5: 85 d2 test %edx,%edx 10b9e7: 74 0b je 10b9f4 <_Heap_Walk+0x13f> !_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size ) ) { (*printer)( 10b9e9: 51 push %ecx 10b9ea: 68 8d e6 11 00 push $0x11e68d 10b9ef: e9 96 01 00 00 jmp 10bb8a <_Heap_Walk+0x2d5> <== ALWAYS TAKEN ); return false; } if ( _Heap_Is_used( free_block ) ) { 10b9f4: 8b 41 04 mov 0x4(%ecx),%eax 10b9f7: 83 e0 fe and $0xfffffffe,%eax 10b9fa: f6 44 01 04 01 testb $0x1,0x4(%ecx,%eax,1) 10b9ff: 74 0b je 10ba0c <_Heap_Walk+0x157> (*printer)( 10ba01: 51 push %ecx 10ba02: 68 bd e6 11 00 push $0x11e6bd 10ba07: e9 7e 01 00 00 jmp 10bb8a <_Heap_Walk+0x2d5> <== ALWAYS TAKEN ); return false; } if ( free_block->prev != prev_block ) { 10ba0c: 8b 41 0c mov 0xc(%ecx),%eax 10ba0f: 3b 45 e0 cmp -0x20(%ebp),%eax 10ba12: 74 0f je 10ba23 <_Heap_Walk+0x16e> (*printer)( 10ba14: 83 ec 0c sub $0xc,%esp 10ba17: 50 push %eax 10ba18: 51 push %ecx 10ba19: 68 d9 e6 11 00 push $0x11e6d9 10ba1e: e9 b0 00 00 00 jmp 10bad3 <_Heap_Walk+0x21e> <== ALWAYS TAKEN return false; } prev_block = free_block; free_block = free_block->next; 10ba23: 89 4d e0 mov %ecx,-0x20(%ebp) 10ba26: 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 ) { 10ba29: 39 f9 cmp %edi,%ecx 10ba2b: 75 92 jne 10b9bf <_Heap_Walk+0x10a> 10ba2d: 89 75 e0 mov %esi,-0x20(%ebp) 10ba30: e9 7f 01 00 00 jmp 10bbb4 <_Heap_Walk+0x2ff> <== ALWAYS 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; 10ba35: 8b 43 04 mov 0x4(%ebx),%eax 10ba38: 89 c1 mov %eax,%ecx 10ba3a: 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); 10ba3d: 8d 34 0b lea (%ebx,%ecx,1),%esi uintptr_t const block_size = _Heap_Block_size( block ); bool const prev_used = _Heap_Is_prev_used( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); uintptr_t const next_block_begin = (uintptr_t) next_block; if ( prev_used ) { 10ba40: a8 01 test $0x1,%al 10ba42: 74 0c je 10ba50 <_Heap_Walk+0x19b> (*printer)( 10ba44: 83 ec 0c sub $0xc,%esp 10ba47: 51 push %ecx 10ba48: 53 push %ebx 10ba49: 68 0b e7 11 00 push $0x11e70b 10ba4e: eb 0b jmp 10ba5b <_Heap_Walk+0x1a6> <== ALWAYS TAKEN "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( 10ba50: 50 push %eax 10ba51: 50 push %eax 10ba52: ff 33 pushl (%ebx) 10ba54: 51 push %ecx 10ba55: 53 push %ebx 10ba56: 68 22 e7 11 00 push $0x11e722 10ba5b: 6a 00 push $0x0 10ba5d: ff 75 e0 pushl -0x20(%ebp) 10ba60: 89 4d bc mov %ecx,-0x44(%ebp) 10ba63: ff 55 e4 call *-0x1c(%ebp) 10ba66: 83 c4 20 add $0x20,%esp 10ba69: 8b 4d bc mov -0x44(%ebp),%ecx RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap( const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block 10ba6c: 31 c0 xor %eax,%eax 10ba6e: 39 77 20 cmp %esi,0x20(%edi) 10ba71: 77 08 ja 10ba7b <_Heap_Walk+0x1c6> <== ALWAYS TAKEN 10ba73: 31 c0 xor %eax,%eax 10ba75: 39 77 24 cmp %esi,0x24(%edi) 10ba78: 0f 93 c0 setae %al block_size, block->prev_size ); } if ( !_Heap_Is_block_in_heap( heap, next_block ) ) { 10ba7b: 85 c0 test %eax,%eax 10ba7d: 75 11 jne 10ba90 <_Heap_Walk+0x1db> 10ba7f: 89 f1 mov %esi,%ecx 10ba81: 8b 75 e0 mov -0x20(%ebp),%esi (*printer)( 10ba84: 83 ec 0c sub $0xc,%esp 10ba87: 51 push %ecx 10ba88: 53 push %ebx 10ba89: 68 47 e7 11 00 push $0x11e747 10ba8e: eb 43 jmp 10bad3 <_Heap_Walk+0x21e> <== ALWAYS TAKEN ); return false; } if ( !_Heap_Is_aligned( block_size, page_size ) ) { 10ba90: 89 c8 mov %ecx,%eax 10ba92: 31 d2 xor %edx,%edx 10ba94: f7 75 d4 divl -0x2c(%ebp) 10ba97: 85 d2 test %edx,%edx 10ba99: 74 0f je 10baaa <_Heap_Walk+0x1f5> 10ba9b: 8b 75 e0 mov -0x20(%ebp),%esi (*printer)( 10ba9e: 83 ec 0c sub $0xc,%esp 10baa1: 51 push %ecx 10baa2: 53 push %ebx 10baa3: 68 74 e7 11 00 push $0x11e774 10baa8: eb 29 jmp 10bad3 <_Heap_Walk+0x21e> <== ALWAYS TAKEN ); return false; } if ( block_size < min_block_size ) { 10baaa: 3b 4d dc cmp -0x24(%ebp),%ecx 10baad: 73 11 jae 10bac0 <_Heap_Walk+0x20b> 10baaf: 8b 75 e0 mov -0x20(%ebp),%esi (*printer)( 10bab2: 57 push %edi 10bab3: 57 push %edi 10bab4: ff 75 dc pushl -0x24(%ebp) 10bab7: 51 push %ecx 10bab8: 53 push %ebx 10bab9: 68 a2 e7 11 00 push $0x11e7a2 10babe: eb 13 jmp 10bad3 <_Heap_Walk+0x21e> <== ALWAYS TAKEN ); return false; } if ( next_block_begin <= block_begin ) { 10bac0: 39 de cmp %ebx,%esi 10bac2: 77 1f ja 10bae3 <_Heap_Walk+0x22e> 10bac4: 89 f1 mov %esi,%ecx 10bac6: 8b 75 e0 mov -0x20(%ebp),%esi (*printer)( 10bac9: 83 ec 0c sub $0xc,%esp 10bacc: 51 push %ecx 10bacd: 53 push %ebx 10bace: 68 cd e7 11 00 push $0x11e7cd 10bad3: 6a 01 push $0x1 10bad5: 56 push %esi 10bad6: ff 55 e4 call *-0x1c(%ebp) 10bad9: 31 c0 xor %eax,%eax "block 0x%08x: next block 0x%08x is not a successor\n", block, next_block ); return false; 10badb: 83 c4 20 add $0x20,%esp 10bade: e9 dc 00 00 00 jmp 10bbbf <_Heap_Walk+0x30a> <== ALWAYS TAKEN } if ( !_Heap_Is_prev_used( next_block ) ) { 10bae3: f6 46 04 01 testb $0x1,0x4(%esi) 10bae7: 0f 85 c5 00 00 00 jne 10bbb2 <_Heap_Walk+0x2fd> return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 10baed: 8b 47 08 mov 0x8(%edi),%eax 10baf0: 89 45 c0 mov %eax,-0x40(%ebp) block->size_and_flag = size | flag; } RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block ) { return block->size_and_flag & HEAP_PREV_BLOCK_USED; 10baf3: 8b 53 04 mov 0x4(%ebx),%edx 10baf6: 89 55 c4 mov %edx,-0x3c(%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; 10baf9: 83 e2 fe and $0xfffffffe,%edx 10bafc: 89 55 cc mov %edx,-0x34(%ebp) RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 10baff: 01 da add %ebx,%edx 10bb01: 89 55 c8 mov %edx,-0x38(%ebp) Heap_Block *const last_free_block = _Heap_Free_list_last( heap ); bool const prev_used = _Heap_Is_prev_used( block ); uintptr_t const block_size = _Heap_Block_size( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); (*printer)( 10bb04: 8b 4b 08 mov 0x8(%ebx),%ecx 10bb07: 89 4d b4 mov %ecx,-0x4c(%ebp) return _Heap_Free_list_head(heap)->next; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_last( Heap_Control *heap ) { return _Heap_Free_list_tail(heap)->prev; 10bb0a: ba 01 e8 11 00 mov $0x11e801,%edx 10bb0f: 3b 4f 0c cmp 0xc(%edi),%ecx 10bb12: 74 0e je 10bb22 <_Heap_Walk+0x26d> " (= first)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last)" : (block->next == free_list_tail ? " (= tail)" : "") 10bb14: ba 0b e8 11 00 mov $0x11e80b,%edx 10bb19: 39 f9 cmp %edi,%ecx 10bb1b: 74 05 je 10bb22 <_Heap_Walk+0x26d> 10bb1d: ba 35 e4 11 00 mov $0x11e435,%edx 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)( 10bb22: 8b 43 0c mov 0xc(%ebx),%eax 10bb25: 89 45 d8 mov %eax,-0x28(%ebp) 10bb28: b8 15 e8 11 00 mov $0x11e815,%eax 10bb2d: 8b 4d c0 mov -0x40(%ebp),%ecx 10bb30: 39 4d d8 cmp %ecx,-0x28(%ebp) 10bb33: 74 0f je 10bb44 <_Heap_Walk+0x28f> "block 0x%08x: prev 0x%08x%s, next 0x%08x%s\n", block, block->prev, block->prev == first_free_block ? " (= first)" : (block->prev == free_list_head ? " (= head)" : ""), 10bb35: b8 20 e8 11 00 mov $0x11e820,%eax 10bb3a: 39 7d d8 cmp %edi,-0x28(%ebp) 10bb3d: 74 05 je 10bb44 <_Heap_Walk+0x28f> 10bb3f: b8 35 e4 11 00 mov $0x11e435,%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)( 10bb44: 52 push %edx 10bb45: ff 75 b4 pushl -0x4c(%ebp) 10bb48: 50 push %eax 10bb49: ff 75 d8 pushl -0x28(%ebp) 10bb4c: 53 push %ebx 10bb4d: 68 2a e8 11 00 push $0x11e82a 10bb52: 6a 00 push $0x0 10bb54: ff 75 e0 pushl -0x20(%ebp) 10bb57: ff 55 e4 call *-0x1c(%ebp) block->next == last_free_block ? " (= last)" : (block->next == free_list_tail ? " (= tail)" : "") ); if ( block_size != next_block->prev_size ) { 10bb5a: 8b 55 c8 mov -0x38(%ebp),%edx 10bb5d: 8b 02 mov (%edx),%eax 10bb5f: 83 c4 20 add $0x20,%esp 10bb62: 39 45 cc cmp %eax,-0x34(%ebp) 10bb65: 74 14 je 10bb7b <_Heap_Walk+0x2c6> 10bb67: 8b 75 e0 mov -0x20(%ebp),%esi (*printer)( 10bb6a: 51 push %ecx 10bb6b: 52 push %edx 10bb6c: 50 push %eax 10bb6d: ff 75 cc pushl -0x34(%ebp) 10bb70: 53 push %ebx 10bb71: 68 56 e8 11 00 push $0x11e856 10bb76: e9 58 ff ff ff jmp 10bad3 <_Heap_Walk+0x21e> <== ALWAYS TAKEN ); return false; } if ( !prev_used ) { 10bb7b: f6 45 c4 01 testb $0x1,-0x3c(%ebp) 10bb7f: 75 16 jne 10bb97 <_Heap_Walk+0x2e2> 10bb81: 8b 75 e0 mov -0x20(%ebp),%esi (*printer)( 10bb84: 53 push %ebx 10bb85: 68 8f e8 11 00 push $0x11e88f 10bb8a: 6a 01 push $0x1 10bb8c: 56 push %esi 10bb8d: ff 55 e4 call *-0x1c(%ebp) 10bb90: 31 c0 xor %eax,%eax 10bb92: 83 c4 10 add $0x10,%esp 10bb95: eb 28 jmp 10bbbf <_Heap_Walk+0x30a> <== ALWAYS TAKEN return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 10bb97: 8b 47 08 mov 0x8(%edi),%eax 10bb9a: eb 07 jmp 10bba3 <_Heap_Walk+0x2ee> <== ALWAYS TAKEN { 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 ) { 10bb9c: 39 d8 cmp %ebx,%eax 10bb9e: 74 12 je 10bbb2 <_Heap_Walk+0x2fd> return true; } free_block = free_block->next; 10bba0: 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 ) { 10bba3: 39 f8 cmp %edi,%eax 10bba5: 75 f5 jne 10bb9c <_Heap_Walk+0x2e7> 10bba7: 8b 75 e0 mov -0x20(%ebp),%esi return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( 10bbaa: 53 push %ebx 10bbab: 68 be e8 11 00 push $0x11e8be 10bbb0: eb d8 jmp 10bb8a <_Heap_Walk+0x2d5> <== ALWAYS TAKEN ) { 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 ) { 10bbb2: 89 f3 mov %esi,%ebx if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; } while ( block != last_block ) { 10bbb4: 3b 5d d0 cmp -0x30(%ebp),%ebx 10bbb7: 0f 85 78 fe ff ff jne 10ba35 <_Heap_Walk+0x180> 10bbbd: b0 01 mov $0x1,%al block = next_block; } return true; } 10bbbf: 8d 65 f4 lea -0xc(%ebp),%esp 10bbc2: 5b pop %ebx 10bbc3: 5e pop %esi 10bbc4: 5f pop %edi 10bbc5: c9 leave 10bbc6: c3 ret 0010bbc7 <_Heap_Walk_print>: { /* Do nothing */ } static void _Heap_Walk_print( int source, bool error, const char *fmt, ... ) { 10bbc7: 55 push %ebp 10bbc8: 89 e5 mov %esp,%ebp 10bbca: 83 ec 08 sub $0x8,%esp 10bbcd: 8b 45 08 mov 0x8(%ebp),%eax va_list ap; if ( error ) { 10bbd0: 80 7d 0c 00 cmpb $0x0,0xc(%ebp) 10bbd4: 74 0a je 10bbe0 <_Heap_Walk_print+0x19> printk( "FAIL[%d]: ", source ); 10bbd6: 51 push %ecx 10bbd7: 51 push %ecx 10bbd8: 50 push %eax 10bbd9: 68 e9 e8 11 00 push $0x11e8e9 10bbde: eb 08 jmp 10bbe8 <_Heap_Walk_print+0x21> <== ALWAYS TAKEN } else { printk( "PASS[%d]: ", source ); 10bbe0: 52 push %edx 10bbe1: 52 push %edx 10bbe2: 50 push %eax 10bbe3: 68 f4 e8 11 00 push $0x11e8f4 10bbe8: e8 c7 c8 ff ff call 1084b4 10bbed: 5a pop %edx 10bbee: 59 pop %ecx ) { /* Do nothing */ } static void _Heap_Walk_print( int source, bool error, const char *fmt, ... ) 10bbef: 8d 45 14 lea 0x14(%ebp),%eax } else { printk( "PASS[%d]: ", source ); } va_start( ap, fmt ); vprintk( fmt, ap ); 10bbf2: 50 push %eax 10bbf3: ff 75 10 pushl 0x10(%ebp) 10bbf6: e8 ed e1 ff ff call 109de8 10bbfb: 83 c4 10 add $0x10,%esp va_end( ap ); } 10bbfe: c9 leave 10bbff: c3 ret 0010a4f8 <_IO_Initialize_all_drivers>: * * Output Parameters: NONE */ void _IO_Initialize_all_drivers( void ) { 10a4f8: 55 push %ebp 10a4f9: 89 e5 mov %esp,%ebp 10a4fb: 53 push %ebx 10a4fc: 83 ec 04 sub $0x4,%esp 10a4ff: 31 db xor %ebx,%ebx rtems_device_major_number major; for ( major=0 ; major < _IO_Number_of_drivers ; major ++ ) 10a501: eb 0f jmp 10a512 <_IO_Initialize_all_drivers+0x1a> <== ALWAYS TAKEN (void) rtems_io_initialize( major, 0, NULL ); 10a503: 50 push %eax 10a504: 6a 00 push $0x0 10a506: 6a 00 push $0x0 10a508: 53 push %ebx 10a509: e8 7a 3d 00 00 call 10e288 <== ALWAYS TAKEN void _IO_Initialize_all_drivers( void ) { rtems_device_major_number major; for ( major=0 ; major < _IO_Number_of_drivers ; major ++ ) 10a50e: 43 inc %ebx 10a50f: 83 c4 10 add $0x10,%esp 10a512: 3b 1d 4c 3b 12 00 cmp 0x123b4c,%ebx 10a518: 72 e9 jb 10a503 <_IO_Initialize_all_drivers+0xb> (void) rtems_io_initialize( major, 0, NULL ); } 10a51a: 8b 5d fc mov -0x4(%ebp),%ebx 10a51d: c9 leave 10a51e: c3 ret 0010a51f <_IO_Manager_initialization>: * workspace. * */ void _IO_Manager_initialization(void) { 10a51f: 55 push %ebp 10a520: 89 e5 mov %esp,%ebp 10a522: 57 push %edi 10a523: 56 push %esi 10a524: 53 push %ebx 10a525: 83 ec 1c sub $0x1c,%esp uint32_t index; rtems_driver_address_table *driver_table; uint32_t drivers_in_table; uint32_t number_of_drivers; driver_table = Configuration.Device_driver_table; 10a528: 8b 35 4c f9 11 00 mov 0x11f94c,%esi drivers_in_table = Configuration.number_of_device_drivers; 10a52e: a1 48 f9 11 00 mov 0x11f948,%eax 10a533: 89 45 e4 mov %eax,-0x1c(%ebp) number_of_drivers = Configuration.maximum_drivers; 10a536: 8b 3d 44 f9 11 00 mov 0x11f944,%edi /* * If the user claims there are less drivers than are actually in * the table, then let's just go with the table's count. */ if ( number_of_drivers <= drivers_in_table ) 10a53c: 39 c7 cmp %eax,%edi 10a53e: 76 30 jbe 10a570 <_IO_Manager_initialization+0x51> /* * The application requested extra slots in the driver table, so we * have to allocate a new driver table and copy theirs to it. */ _IO_Driver_address_table = (rtems_driver_address_table *) 10a540: 6b df 18 imul $0x18,%edi,%ebx 10a543: 83 ec 0c sub $0xc,%esp 10a546: 53 push %ebx 10a547: e8 14 25 00 00 call 10ca60 <_Workspace_Allocate_or_fatal_error> 10a54c: 89 c2 mov %eax,%edx 10a54e: a3 50 3b 12 00 mov %eax,0x123b50 _Workspace_Allocate_or_fatal_error( sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); _IO_Number_of_drivers = number_of_drivers; 10a553: 89 3d 4c 3b 12 00 mov %edi,0x123b4c memset( 10a559: 31 c0 xor %eax,%eax 10a55b: 89 d7 mov %edx,%edi 10a55d: 89 d9 mov %ebx,%ecx 10a55f: f3 aa rep stos %al,%es:(%edi) 10a561: 89 f0 mov %esi,%eax 10a563: 8b 15 50 3b 12 00 mov 0x123b50,%edx 10a569: 31 db xor %ebx,%ebx _IO_Driver_address_table, 0, sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ ) 10a56b: 83 c4 10 add $0x10,%esp 10a56e: eb 22 jmp 10a592 <_IO_Manager_initialization+0x73> <== ALWAYS TAKEN * If the maximum number of driver is the same as the number in the * table, then we do not have to copy the driver table. They can't * register any dynamically. */ if ( number_of_drivers == drivers_in_table ) { _IO_Driver_address_table = driver_table; 10a570: 89 35 50 3b 12 00 mov %esi,0x123b50 _IO_Number_of_drivers = number_of_drivers; 10a576: 8b 45 e4 mov -0x1c(%ebp),%eax 10a579: a3 4c 3b 12 00 mov %eax,0x123b4c return; 10a57e: eb 17 jmp 10a597 <_IO_Manager_initialization+0x78> <== ALWAYS TAKEN _IO_Driver_address_table, 0, sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ ) _IO_Driver_address_table[index] = driver_table[index]; 10a580: 89 d7 mov %edx,%edi 10a582: 89 c6 mov %eax,%esi 10a584: b9 06 00 00 00 mov $0x6,%ecx 10a589: f3 a5 rep movsl %ds:(%esi),%es:(%edi) memset( _IO_Driver_address_table, 0, sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ ) 10a58b: 43 inc %ebx 10a58c: 83 c0 18 add $0x18,%eax 10a58f: 83 c2 18 add $0x18,%edx 10a592: 3b 5d e4 cmp -0x1c(%ebp),%ebx 10a595: 72 e9 jb 10a580 <_IO_Manager_initialization+0x61> _IO_Driver_address_table[index] = driver_table[index]; number_of_drivers = drivers_in_table; } 10a597: 8d 65 f4 lea -0xc(%ebp),%esp 10a59a: 5b pop %ebx 10a59b: 5e pop %esi 10a59c: 5f pop %edi 10a59d: c9 leave 10a59e: c3 ret 0010aee4 <_ISR_Handler_initialization>: * * Output parameters: NONE */ void _ISR_Handler_initialization( void ) { 10aee4: 55 push %ebp 10aee5: 89 e5 mov %esp,%ebp 10aee7: 83 ec 08 sub $0x8,%esp _ISR_Signals_to_thread_executing = false; 10aeea: c6 05 c4 39 12 00 00 movb $0x0,0x1239c4 _ISR_Nest_level = 0; 10aef1: c7 05 0c 39 12 00 00 movl $0x0,0x12390c 10aef8: 00 00 00 _CPU_Initialize_vectors(); #if ( CPU_ALLOCATE_INTERRUPT_STACK == TRUE ) if ( !_Stack_Is_enough(Configuration.interrupt_stack_size) ) 10aefb: a1 34 f9 11 00 mov 0x11f934,%eax 10af00: 3b 05 10 f9 11 00 cmp 0x11f910,%eax 10af06: 73 0c jae 10af14 <_ISR_Handler_initialization+0x30> _Internal_error_Occurred( 10af08: 50 push %eax 10af09: 6a 05 push $0x5 10af0b: 6a 01 push $0x1 10af0d: 6a 00 push $0x0 10af0f: e8 90 ff ff ff call 10aea4 <_Internal_error_Occurred> <== ALWAYS TAKEN INTERNAL_ERROR_CORE, true, INTERNAL_ERROR_INTERRUPT_STACK_TOO_SMALL ); _CPU_Interrupt_stack_low = _Workspace_Allocate_or_fatal_error( 10af14: 83 ec 0c sub $0xc,%esp 10af17: 50 push %eax 10af18: e8 43 1b 00 00 call 10ca60 <_Workspace_Allocate_or_fatal_error> 10af1d: a3 84 38 12 00 mov %eax,0x123884 /* Interrupt stack might have to be aligned and/or setup * in a specific way. */ #if defined(_CPU_Interrupt_stack_setup) _CPU_Interrupt_stack_setup(_CPU_Interrupt_stack_low, _CPU_Interrupt_stack_high); 10af22: 8b 15 34 f9 11 00 mov 0x11f934,%edx 10af28: 8d 44 10 fc lea -0x4(%eax,%edx,1),%eax 10af2c: 83 e0 f0 and $0xfffffff0,%eax 10af2f: a3 44 38 12 00 mov %eax,0x123844 10af34: 83 c4 10 add $0x10,%esp #if ( CPU_HAS_HARDWARE_INTERRUPT_STACK == TRUE ) _CPU_Install_interrupt_stack(); #endif } 10af37: c9 leave 10af38: c3 ret 0010aea4 <_Internal_error_Occurred>: void _Internal_error_Occurred( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { 10aea4: 55 push %ebp 10aea5: 89 e5 mov %esp,%ebp 10aea7: 53 push %ebx 10aea8: 83 ec 08 sub $0x8,%esp 10aeab: 8b 45 08 mov 0x8(%ebp),%eax 10aeae: 8b 55 0c mov 0xc(%ebp),%edx 10aeb1: 8b 5d 10 mov 0x10(%ebp),%ebx _Internal_errors_What_happened.the_source = the_source; 10aeb4: a3 18 39 12 00 mov %eax,0x123918 _Internal_errors_What_happened.is_internal = is_internal; 10aeb9: 88 15 1c 39 12 00 mov %dl,0x12391c _Internal_errors_What_happened.the_error = the_error; 10aebf: 89 1d 20 39 12 00 mov %ebx,0x123920 _User_extensions_Fatal( the_source, is_internal, the_error ); 10aec5: 53 push %ebx 10aec6: 0f b6 d2 movzbl %dl,%edx 10aec9: 52 push %edx 10aeca: 50 push %eax 10aecb: e8 8b 18 00 00 call 10c75b <_User_extensions_Fatal> RTEMS_INLINE_ROUTINE void _System_state_Set ( System_state_Codes state ) { _System_state_Current = state; 10aed0: c7 05 0c 3a 12 00 05 movl $0x5,0x123a0c <== NOT EXECUTED 10aed7: 00 00 00 <== NOT EXECUTED _System_state_Set( SYSTEM_STATE_FAILED ); _CPU_Fatal_halt( the_error ); 10aeda: fa cli <== NOT EXECUTED 10aedb: 89 d8 mov %ebx,%eax <== NOT EXECUTED 10aedd: f4 hlt <== NOT EXECUTED 10aede: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10aee1: eb fe jmp 10aee1 <_Internal_error_Occurred+0x3d> <== NOT EXECUTED 0010af3c <_Objects_Allocate>: */ Objects_Control *_Objects_Allocate( Objects_Information *information ) { 10af3c: 55 push %ebp 10af3d: 89 e5 mov %esp,%ebp 10af3f: 56 push %esi 10af40: 53 push %ebx 10af41: 8b 5d 08 mov 0x8(%ebp),%ebx * If the application is using the optional manager stubs and * still attempts to create the object, the information block * should be all zeroed out because it is in the BSS. So let's * check that code for this manager is even present. */ if ( information->size == 0 ) 10af44: 31 c9 xor %ecx,%ecx 10af46: 83 7b 18 00 cmpl $0x0,0x18(%ebx) 10af4a: 74 53 je 10af9f <_Objects_Allocate+0x63> <== ALWAYS 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 ); 10af4c: 8d 73 20 lea 0x20(%ebx),%esi 10af4f: 83 ec 0c sub $0xc,%esp 10af52: 56 push %esi 10af53: e8 0c f8 ff ff call 10a764 <_Chain_Get> <== ALWAYS TAKEN 10af58: 89 c1 mov %eax,%ecx if ( information->auto_extend ) { 10af5a: 83 c4 10 add $0x10,%esp 10af5d: 80 7b 12 00 cmpb $0x0,0x12(%ebx) 10af61: 74 3c je 10af9f <_Objects_Allocate+0x63> /* * If the list is empty then we are out of objects and need to * extend information base. */ if ( !the_object ) { 10af63: 85 c0 test %eax,%eax 10af65: 75 1a jne 10af81 <_Objects_Allocate+0x45> _Objects_Extend_information( information ); 10af67: 83 ec 0c sub $0xc,%esp 10af6a: 53 push %ebx 10af6b: e8 60 00 00 00 call 10afd0 <_Objects_Extend_information> <== ALWAYS TAKEN the_object = (Objects_Control *) _Chain_Get( &information->Inactive ); 10af70: 89 34 24 mov %esi,(%esp) 10af73: e8 ec f7 ff ff call 10a764 <_Chain_Get> <== ALWAYS TAKEN 10af78: 89 c1 mov %eax,%ecx } if ( the_object ) { 10af7a: 83 c4 10 add $0x10,%esp 10af7d: 85 c0 test %eax,%eax 10af7f: 74 1e je 10af9f <_Objects_Allocate+0x63> uint32_t block; block = (uint32_t) _Objects_Get_index( the_object->id ) - 10af81: 0f b7 41 08 movzwl 0x8(%ecx),%eax 10af85: 0f b7 53 08 movzwl 0x8(%ebx),%edx 10af89: 29 d0 sub %edx,%eax _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; 10af8b: 0f b7 73 14 movzwl 0x14(%ebx),%esi 10af8f: 31 d2 xor %edx,%edx 10af91: f7 f6 div %esi 10af93: c1 e0 02 shl $0x2,%eax 10af96: 03 43 30 add 0x30(%ebx),%eax 10af99: ff 08 decl (%eax) information->inactive--; 10af9b: 66 ff 4b 2c decw 0x2c(%ebx) } } return the_object; } 10af9f: 89 c8 mov %ecx,%eax 10afa1: 8d 65 f8 lea -0x8(%ebp),%esp 10afa4: 5b pop %ebx 10afa5: 5e pop %esi 10afa6: c9 leave 10afa7: c3 ret 0010afa8 <_Objects_Close>: void _Objects_Close( Objects_Information *information, Objects_Control *the_object ) { 10afa8: 55 push %ebp 10afa9: 89 e5 mov %esp,%ebp 10afab: 53 push %ebx 10afac: 83 ec 04 sub $0x4,%esp 10afaf: 8b 45 08 mov 0x8(%ebp),%eax 10afb2: 8b 55 0c mov 0xc(%ebp),%edx #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10afb5: 0f b7 5a 08 movzwl 0x8(%edx),%ebx 10afb9: 8b 48 1c mov 0x1c(%eax),%ecx 10afbc: c7 04 99 00 00 00 00 movl $0x0,(%ecx,%ebx,4) _Objects_Invalidate_Id( information, the_object ); _Objects_Namespace_remove( information, the_object ); 10afc3: 89 55 0c mov %edx,0xc(%ebp) } 10afc6: 58 pop %eax 10afc7: 5b pop %ebx 10afc8: c9 leave Objects_Control *the_object ) { _Objects_Invalidate_Id( information, the_object ); _Objects_Namespace_remove( information, the_object ); 10afc9: e9 be 04 00 00 jmp 10b48c <_Objects_Namespace_remove> <== ALWAYS TAKEN 0010afd0 <_Objects_Extend_information>: */ void _Objects_Extend_information( Objects_Information *information ) { 10afd0: 55 push %ebp 10afd1: 89 e5 mov %esp,%ebp 10afd3: 57 push %edi 10afd4: 56 push %esi 10afd5: 53 push %ebx 10afd6: 83 ec 4c sub $0x4c,%esp 10afd9: 8b 5d 08 mov 0x8(%ebp),%ebx /* * Search for a free block of indexes. The block variable ends up set * to block_count + 1 if the table needs to be extended. */ minimum_index = _Objects_Get_index( information->minimum_id ); 10afdc: 0f b7 43 08 movzwl 0x8(%ebx),%eax 10afe0: 89 45 c8 mov %eax,-0x38(%ebp) index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) 10afe3: 8b 4b 34 mov 0x34(%ebx),%ecx 10afe6: 85 c9 test %ecx,%ecx 10afe8: 75 0e jne 10aff8 <_Objects_Extend_information+0x28> 10afea: 89 45 d4 mov %eax,-0x2c(%ebp) 10afed: c7 45 cc 00 00 00 00 movl $0x0,-0x34(%ebp) 10aff4: 31 d2 xor %edx,%edx 10aff6: eb 31 jmp 10b029 <_Objects_Extend_information+0x59> <== ALWAYS TAKEN block_count = 0; else { block_count = information->maximum / information->allocation_size; 10aff8: 0f b7 73 14 movzwl 0x14(%ebx),%esi 10affc: 8b 43 10 mov 0x10(%ebx),%eax 10afff: 31 d2 xor %edx,%edx 10b001: 66 f7 f6 div %si 10b004: 0f b7 d0 movzwl %ax,%edx 10b007: 8b 7d c8 mov -0x38(%ebp),%edi 10b00a: 89 7d d4 mov %edi,-0x2c(%ebp) 10b00d: c7 45 cc 00 00 00 00 movl $0x0,-0x34(%ebp) 10b014: 31 c0 xor %eax,%eax for ( ; block < block_count; block++ ) { 10b016: eb 0a jmp 10b022 <_Objects_Extend_information+0x52> <== ALWAYS TAKEN if ( information->object_blocks[ block ] == NULL ) 10b018: 83 3c 81 00 cmpl $0x0,(%ecx,%eax,4) 10b01c: 74 08 je 10b026 <_Objects_Extend_information+0x56> 10b01e: 01 75 d4 add %esi,-0x2c(%ebp) if ( information->object_blocks == NULL ) block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { 10b021: 40 inc %eax 10b022: 39 d0 cmp %edx,%eax 10b024: 72 f2 jb 10b018 <_Objects_Extend_information+0x48> 10b026: 89 45 cc mov %eax,-0x34(%ebp) else index_base += information->allocation_size; } } maximum = (uint32_t) information->maximum + information->allocation_size; 10b029: 0f b7 43 14 movzwl 0x14(%ebx),%eax 10b02d: 0f b7 4b 10 movzwl 0x10(%ebx),%ecx 10b031: 8d 0c 08 lea (%eax,%ecx,1),%ecx 10b034: 89 4d b8 mov %ecx,-0x48(%ebp) /* * We need to limit the number of objects to the maximum number * representable in the index portion of the object Id. In the * case of 16-bit Ids, this is only 256 object instances. */ if ( maximum > OBJECTS_ID_FINAL_INDEX ) { 10b037: 81 f9 ff ff 00 00 cmp $0xffff,%ecx 10b03d: 0f 87 db 01 00 00 ja 10b21e <_Objects_Extend_information+0x24e> <== ALWAYS TAKEN /* * Allocate the name table, and the objects and if it fails either return or * generate a fatal error depending on auto-extending being active. */ block_size = information->allocation_size * information->size; 10b043: 0f af 43 18 imul 0x18(%ebx),%eax if ( information->auto_extend ) { 10b047: 80 7b 12 00 cmpb $0x0,0x12(%ebx) 10b04b: 74 1e je 10b06b <_Objects_Extend_information+0x9b> new_object_block = _Workspace_Allocate( block_size ); 10b04d: 83 ec 0c sub $0xc,%esp 10b050: 50 push %eax 10b051: 89 55 b4 mov %edx,-0x4c(%ebp) 10b054: e8 33 1a 00 00 call 10ca8c <_Workspace_Allocate> 10b059: 89 45 bc mov %eax,-0x44(%ebp) if ( !new_object_block ) 10b05c: 83 c4 10 add $0x10,%esp 10b05f: 85 c0 test %eax,%eax 10b061: 8b 55 b4 mov -0x4c(%ebp),%edx 10b064: 75 1a jne 10b080 <_Objects_Extend_information+0xb0> 10b066: e9 b3 01 00 00 jmp 10b21e <_Objects_Extend_information+0x24e> <== ALWAYS TAKEN return; } else { new_object_block = _Workspace_Allocate_or_fatal_error( block_size ); 10b06b: 83 ec 0c sub $0xc,%esp 10b06e: 50 push %eax 10b06f: 89 55 b4 mov %edx,-0x4c(%ebp) 10b072: e8 e9 19 00 00 call 10ca60 <_Workspace_Allocate_or_fatal_error> 10b077: 89 45 bc mov %eax,-0x44(%ebp) 10b07a: 83 c4 10 add $0x10,%esp 10b07d: 8b 55 b4 mov -0x4c(%ebp),%edx } /* * If the index_base is the maximum we need to grow the tables. */ if (index_base >= information->maximum ) { 10b080: 0f b7 43 10 movzwl 0x10(%ebx),%eax 10b084: 39 45 d4 cmp %eax,-0x2c(%ebp) 10b087: 0f 82 14 01 00 00 jb 10b1a1 <_Objects_Extend_information+0x1d1> */ /* * Up the block count and maximum */ block_count++; 10b08d: 8d 72 01 lea 0x1(%edx),%esi * Allocate the tables and break it up. */ block_size = block_count * (sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) + ((maximum + minimum_index) * sizeof(Objects_Control *)); object_blocks = (void**) _Workspace_Allocate( block_size ); 10b090: 83 ec 0c sub $0xc,%esp 10b093: 8b 4d b8 mov -0x48(%ebp),%ecx 10b096: 03 4d c8 add -0x38(%ebp),%ecx 10b099: 8d 04 76 lea (%esi,%esi,2),%eax 10b09c: 8d 04 01 lea (%ecx,%eax,1),%eax 10b09f: c1 e0 02 shl $0x2,%eax 10b0a2: 50 push %eax 10b0a3: 89 55 b4 mov %edx,-0x4c(%ebp) 10b0a6: e8 e1 19 00 00 call 10ca8c <_Workspace_Allocate> if ( !object_blocks ) { 10b0ab: 83 c4 10 add $0x10,%esp 10b0ae: 85 c0 test %eax,%eax 10b0b0: 8b 55 b4 mov -0x4c(%ebp),%edx 10b0b3: 75 13 jne 10b0c8 <_Objects_Extend_information+0xf8> _Workspace_Free( new_object_block ); 10b0b5: 83 ec 0c sub $0xc,%esp 10b0b8: ff 75 bc pushl -0x44(%ebp) 10b0bb: e8 e5 19 00 00 call 10caa5 <_Workspace_Free> return; 10b0c0: 83 c4 10 add $0x10,%esp 10b0c3: e9 56 01 00 00 jmp 10b21e <_Objects_Extend_information+0x24e> <== ALWAYS TAKEN RTEMS_INLINE_ROUTINE void *_Addresses_Add_offset ( const void *base, uintptr_t offset ) { return (void *)((uintptr_t)base + offset); 10b0c8: 8d 0c b0 lea (%eax,%esi,4),%ecx 10b0cb: 89 4d c0 mov %ecx,-0x40(%ebp) 10b0ce: 8d 34 f0 lea (%eax,%esi,8),%esi 10b0d1: 89 75 c4 mov %esi,-0x3c(%ebp) * Take the block count down. Saves all the (block_count - 1) * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { 10b0d4: 0f b7 73 10 movzwl 0x10(%ebx),%esi 10b0d8: 31 c9 xor %ecx,%ecx 10b0da: 3b 75 c8 cmp -0x38(%ebp),%esi 10b0dd: 76 3e jbe 10b11d <_Objects_Extend_information+0x14d> /* * Copy each section of the table over. This has to be performed as * separate parts as size of each block has changed. */ memcpy( object_blocks, 10b0df: 8d 34 95 00 00 00 00 lea 0x0(,%edx,4),%esi 10b0e6: 89 75 d0 mov %esi,-0x30(%ebp) 10b0e9: 8b 73 34 mov 0x34(%ebx),%esi 10b0ec: 89 c7 mov %eax,%edi 10b0ee: 8b 4d d0 mov -0x30(%ebp),%ecx 10b0f1: f3 a4 rep movsb %ds:(%esi),%es:(%edi) information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, 10b0f3: 8b 73 30 mov 0x30(%ebx),%esi 10b0f6: 8b 7d c0 mov -0x40(%ebp),%edi 10b0f9: 8b 4d d0 mov -0x30(%ebp),%ecx 10b0fc: f3 a4 rep movsb %ds:(%esi),%es:(%edi) information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, 10b0fe: 0f b7 4b 10 movzwl 0x10(%ebx),%ecx 10b102: 03 4d c8 add -0x38(%ebp),%ecx 10b105: c1 e1 02 shl $0x2,%ecx 10b108: 8b 73 1c mov 0x1c(%ebx),%esi 10b10b: 8b 7d c4 mov -0x3c(%ebp),%edi 10b10e: f3 a4 rep movsb %ds:(%esi),%es:(%edi) 10b110: eb 10 jmp 10b122 <_Objects_Extend_information+0x152> <== ALWAYS TAKEN /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { local_table[ index ] = NULL; 10b112: 8b 7d c4 mov -0x3c(%ebp),%edi 10b115: c7 04 8f 00 00 00 00 movl $0x0,(%edi,%ecx,4) } else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { 10b11c: 41 inc %ecx 10b11d: 3b 4d c8 cmp -0x38(%ebp),%ecx 10b120: 72 f0 jb 10b112 <_Objects_Extend_information+0x142> } /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; 10b122: c7 04 90 00 00 00 00 movl $0x0,(%eax,%edx,4) inactive_per_block[block_count] = 0; 10b129: 8b 4d c0 mov -0x40(%ebp),%ecx 10b12c: c7 04 91 00 00 00 00 movl $0x0,(%ecx,%edx,4) for ( index=index_base ; index < ( information->allocation_size + index_base ); 10b133: 0f b7 53 14 movzwl 0x14(%ebx),%edx 10b137: 8b 75 d4 mov -0x2c(%ebp),%esi 10b13a: 01 d6 add %edx,%esi 10b13c: 8b 7d d4 mov -0x2c(%ebp),%edi 10b13f: 8b 55 c4 mov -0x3c(%ebp),%edx 10b142: 8d 0c ba lea (%edx,%edi,4),%ecx 10b145: 89 fa mov %edi,%edx * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; 10b147: eb 0a jmp 10b153 <_Objects_Extend_information+0x183> <== ALWAYS TAKEN index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL; 10b149: c7 01 00 00 00 00 movl $0x0,(%ecx) object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); index++ ) { 10b14f: 42 inc %edx 10b150: 83 c1 04 add $0x4,%ecx * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; 10b153: 39 f2 cmp %esi,%edx 10b155: 72 f2 jb 10b149 <_Objects_Extend_information+0x179> index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL; } _ISR_Disable( level ); 10b157: 9c pushf 10b158: fa cli 10b159: 5e pop %esi old_tables = information->object_blocks; 10b15a: 8b 53 34 mov 0x34(%ebx),%edx information->object_blocks = object_blocks; 10b15d: 89 43 34 mov %eax,0x34(%ebx) information->inactive_per_block = inactive_per_block; 10b160: 8b 4d c0 mov -0x40(%ebp),%ecx 10b163: 89 4b 30 mov %ecx,0x30(%ebx) information->local_table = local_table; 10b166: 8b 7d c4 mov -0x3c(%ebp),%edi 10b169: 89 7b 1c mov %edi,0x1c(%ebx) information->maximum = (Objects_Maximum) maximum; 10b16c: 8b 45 b8 mov -0x48(%ebp),%eax 10b16f: 66 89 43 10 mov %ax,0x10(%ebx) information->maximum_id = _Objects_Build_id( 10b173: 8b 03 mov (%ebx),%eax 10b175: c1 e0 18 shl $0x18,%eax 10b178: 0d 00 00 01 00 or $0x10000,%eax 10b17d: 0f b7 4b 04 movzwl 0x4(%ebx),%ecx 10b181: c1 e1 1b shl $0x1b,%ecx 10b184: 09 c8 or %ecx,%eax 10b186: 0f b7 4d b8 movzwl -0x48(%ebp),%ecx 10b18a: 09 c8 or %ecx,%eax 10b18c: 89 43 0c mov %eax,0xc(%ebx) information->the_class, _Objects_Local_node, information->maximum ); _ISR_Enable( level ); 10b18f: 56 push %esi 10b190: 9d popf if ( old_tables ) 10b191: 85 d2 test %edx,%edx 10b193: 74 0c je 10b1a1 <_Objects_Extend_information+0x1d1> _Workspace_Free( old_tables ); 10b195: 83 ec 0c sub $0xc,%esp 10b198: 52 push %edx 10b199: e8 07 19 00 00 call 10caa5 <_Workspace_Free> 10b19e: 83 c4 10 add $0x10,%esp } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; 10b1a1: 8b 55 cc mov -0x34(%ebp),%edx 10b1a4: c1 e2 02 shl $0x2,%edx 10b1a7: 89 55 d0 mov %edx,-0x30(%ebp) 10b1aa: 8b 43 34 mov 0x34(%ebx),%eax 10b1ad: 8b 75 bc mov -0x44(%ebp),%esi 10b1b0: 8b 4d cc mov -0x34(%ebp),%ecx 10b1b3: 89 34 88 mov %esi,(%eax,%ecx,4) /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 10b1b6: ff 73 18 pushl 0x18(%ebx) 10b1b9: 0f b7 53 14 movzwl 0x14(%ebx),%edx 10b1bd: 52 push %edx 10b1be: ff 34 88 pushl (%eax,%ecx,4) 10b1c1: 8d 45 dc lea -0x24(%ebp),%eax 10b1c4: 50 push %eax 10b1c5: 89 45 b4 mov %eax,-0x4c(%ebp) 10b1c8: e8 03 31 00 00 call 10e2d0 <_Chain_Initialize> <== ALWAYS TAKEN information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 10b1cd: 8d 7b 20 lea 0x20(%ebx),%edi 10b1d0: 8b 75 d4 mov -0x2c(%ebp),%esi 10b1d3: eb 23 jmp 10b1f8 <_Objects_Extend_information+0x228> <== ALWAYS TAKEN */ index = index_base; while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) { the_object->id = _Objects_Build_id( 10b1d5: 8b 13 mov (%ebx),%edx 10b1d7: c1 e2 18 shl $0x18,%edx 10b1da: 81 ca 00 00 01 00 or $0x10000,%edx 10b1e0: 0f b7 4b 04 movzwl 0x4(%ebx),%ecx 10b1e4: c1 e1 1b shl $0x1b,%ecx 10b1e7: 09 ca or %ecx,%edx 10b1e9: 09 f2 or %esi,%edx 10b1eb: 89 50 08 mov %edx,0x8(%eax) information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 10b1ee: 52 push %edx 10b1ef: 52 push %edx 10b1f0: 50 push %eax 10b1f1: 57 push %edi 10b1f2: e8 49 f5 ff ff call 10a740 <_Chain_Append> <== ALWAYS TAKEN index++; 10b1f7: 46 inc %esi /* * Move from the local chain, initialise, then append to the inactive chain */ index = index_base; while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) { 10b1f8: 8d 45 dc lea -0x24(%ebp),%eax 10b1fb: 89 04 24 mov %eax,(%esp) 10b1fe: e8 61 f5 ff ff call 10a764 <_Chain_Get> <== ALWAYS TAKEN 10b203: 83 c4 10 add $0x10,%esp 10b206: 85 c0 test %eax,%eax 10b208: 75 cb jne 10b1d5 <_Objects_Extend_information+0x205> _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 10b20a: 8b 43 30 mov 0x30(%ebx),%eax 10b20d: 0f b7 53 14 movzwl 0x14(%ebx),%edx 10b211: 8b 4d d0 mov -0x30(%ebp),%ecx 10b214: 89 14 08 mov %edx,(%eax,%ecx,1) information->inactive = 10b217: 8b 43 14 mov 0x14(%ebx),%eax 10b21a: 66 01 43 2c add %ax,0x2c(%ebx) (Objects_Maximum)(information->inactive + information->allocation_size); } 10b21e: 8d 65 f4 lea -0xc(%ebp),%esp 10b221: 5b pop %ebx 10b222: 5e pop %esi 10b223: 5f pop %edi 10b224: c9 leave 10b225: c3 ret 0010b228 <_Objects_Free>: void _Objects_Free( Objects_Information *information, Objects_Control *the_object ) { 10b228: 55 push %ebp 10b229: 89 e5 mov %esp,%ebp 10b22b: 57 push %edi 10b22c: 56 push %esi 10b22d: 53 push %ebx 10b22e: 83 ec 14 sub $0x14,%esp 10b231: 8b 5d 08 mov 0x8(%ebp),%ebx 10b234: 8b 75 0c mov 0xc(%ebp),%esi uint32_t allocation_size = information->allocation_size; 10b237: 8b 7b 14 mov 0x14(%ebx),%edi _Chain_Append( &information->Inactive, &the_object->Node ); 10b23a: 56 push %esi 10b23b: 8d 43 20 lea 0x20(%ebx),%eax 10b23e: 50 push %eax 10b23f: e8 fc f4 ff ff call 10a740 <_Chain_Append> <== ALWAYS TAKEN if ( information->auto_extend ) { 10b244: 83 c4 10 add $0x10,%esp 10b247: 80 7b 12 00 cmpb $0x0,0x12(%ebx) 10b24b: 74 42 je 10b28f <_Objects_Free+0x67> void _Objects_Free( Objects_Information *information, Objects_Control *the_object ) { uint32_t allocation_size = information->allocation_size; 10b24d: 0f b7 cf movzwl %di,%ecx _Chain_Append( &information->Inactive, &the_object->Node ); if ( information->auto_extend ) { uint32_t block; block = (uint32_t) (_Objects_Get_index( the_object->id ) - 10b250: 0f b7 46 08 movzwl 0x8(%esi),%eax 10b254: 0f b7 53 08 movzwl 0x8(%ebx),%edx 10b258: 29 d0 sub %edx,%eax _Objects_Get_index( information->minimum_id )); block /= information->allocation_size; information->inactive_per_block[ block ]++; 10b25a: 0f b7 73 14 movzwl 0x14(%ebx),%esi 10b25e: 31 d2 xor %edx,%edx 10b260: f7 f6 div %esi 10b262: c1 e0 02 shl $0x2,%eax 10b265: 03 43 30 add 0x30(%ebx),%eax 10b268: ff 00 incl (%eax) information->inactive++; 10b26a: 8b 43 2c mov 0x2c(%ebx),%eax 10b26d: 40 inc %eax 10b26e: 66 89 43 2c mov %ax,0x2c(%ebx) /* * Check if the threshold level has been met of * 1.5 x allocation_size are free. */ if ( information->inactive > ( allocation_size + ( allocation_size >> 1 ) ) ) { 10b272: 0f b7 c0 movzwl %ax,%eax 10b275: 89 ca mov %ecx,%edx 10b277: d1 ea shr %edx 10b279: 8d 0c 0a lea (%edx,%ecx,1),%ecx 10b27c: 39 c8 cmp %ecx,%eax 10b27e: 76 0f jbe 10b28f <_Objects_Free+0x67> _Objects_Shrink_information( information ); 10b280: 89 5d 08 mov %ebx,0x8(%ebp) } } } 10b283: 8d 65 f4 lea -0xc(%ebp),%esp 10b286: 5b pop %ebx 10b287: 5e pop %esi 10b288: 5f pop %edi 10b289: c9 leave * Check if the threshold level has been met of * 1.5 x allocation_size are free. */ if ( information->inactive > ( allocation_size + ( allocation_size >> 1 ) ) ) { _Objects_Shrink_information( information ); 10b28a: e9 79 02 00 00 jmp 10b508 <_Objects_Shrink_information> <== ALWAYS TAKEN } } } 10b28f: 8d 65 f4 lea -0xc(%ebp),%esp 10b292: 5b pop %ebx 10b293: 5e pop %esi 10b294: 5f pop %edi 10b295: c9 leave 10b296: c3 ret 0010b350 <_Objects_Get>: Objects_Control *_Objects_Get( Objects_Information *information, Objects_Id id, Objects_Locations *location ) { 10b350: 55 push %ebp 10b351: 89 e5 mov %esp,%ebp 10b353: 56 push %esi 10b354: 53 push %ebx 10b355: 8b 55 08 mov 0x8(%ebp),%edx 10b358: 8b 75 10 mov 0x10(%ebp),%esi * always NULL. * * If the Id is valid but the object has not been created yet, then * the local_table entry will be NULL. */ index = id - information->minimum_id + 1; 10b35b: b8 01 00 00 00 mov $0x1,%eax 10b360: 2b 42 08 sub 0x8(%edx),%eax 10b363: 03 45 0c add 0xc(%ebp),%eax /* * If the index is less than maximum, then it is OK to use it to * index into the local_table array. */ if ( index <= information->maximum ) { 10b366: 0f b7 4a 10 movzwl 0x10(%edx),%ecx 10b36a: 39 c8 cmp %ecx,%eax 10b36c: 77 2c ja 10b39a <_Objects_Get+0x4a> 10b36e: 8b 0d 74 38 12 00 mov 0x123874,%ecx 10b374: 41 inc %ecx 10b375: 89 0d 74 38 12 00 mov %ecx,0x123874 _Thread_Disable_dispatch(); if ( (the_object = information->local_table[ index ]) != NULL ) { 10b37b: 8b 52 1c mov 0x1c(%edx),%edx 10b37e: 8b 1c 82 mov (%edx,%eax,4),%ebx 10b381: 85 db test %ebx,%ebx 10b383: 74 08 je 10b38d <_Objects_Get+0x3d> *location = OBJECTS_LOCAL; 10b385: c7 06 00 00 00 00 movl $0x0,(%esi) return the_object; 10b38b: eb 15 jmp 10b3a2 <_Objects_Get+0x52> <== ALWAYS TAKEN /* * Valid Id for this API, Class and Node but the object has not * been allocated yet. */ _Thread_Enable_dispatch(); 10b38d: e8 83 07 00 00 call 10bb15 <_Thread_Enable_dispatch> <== ALWAYS TAKEN *location = OBJECTS_ERROR; 10b392: c7 06 01 00 00 00 movl $0x1,(%esi) return NULL; 10b398: eb 08 jmp 10b3a2 <_Objects_Get+0x52> <== ALWAYS TAKEN /* * Object Id is not within this API and Class on this node. So * it may be global in a multiprocessing system. But it is clearly * invalid on a single processor system. */ *location = OBJECTS_ERROR; 10b39a: c7 06 01 00 00 00 movl $0x1,(%esi) 10b3a0: 31 db xor %ebx,%ebx _Objects_MP_Is_remote( information, id, location, &the_object ); return the_object; #else return NULL; #endif } 10b3a2: 89 d8 mov %ebx,%eax 10b3a4: 5b pop %ebx 10b3a5: 5e pop %esi 10b3a6: c9 leave 10b3a7: c3 ret 0010b2b8 <_Objects_Get_information>: Objects_Information *_Objects_Get_information( Objects_APIs the_api, uint32_t the_class ) { 10b2b8: 55 push %ebp 10b2b9: 89 e5 mov %esp,%ebp 10b2bb: 56 push %esi 10b2bc: 53 push %ebx 10b2bd: 8b 75 08 mov 0x8(%ebp),%esi 10b2c0: 8b 5d 0c mov 0xc(%ebp),%ebx Objects_Information *info; int the_class_api_maximum; if ( !the_class ) 10b2c3: 85 db test %ebx,%ebx 10b2c5: 74 2d je 10b2f4 <_Objects_Get_information+0x3c> /* * 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 ); 10b2c7: 83 ec 0c sub $0xc,%esp 10b2ca: 56 push %esi 10b2cb: e8 e4 34 00 00 call 10e7b4 <_Objects_API_maximum_class> <== ALWAYS TAKEN if ( the_class_api_maximum == 0 ) 10b2d0: 83 c4 10 add $0x10,%esp 10b2d3: 85 c0 test %eax,%eax 10b2d5: 74 1d je 10b2f4 <_Objects_Get_information+0x3c> return NULL; if ( the_class > (uint32_t) the_class_api_maximum ) 10b2d7: 39 c3 cmp %eax,%ebx 10b2d9: 77 19 ja 10b2f4 <_Objects_Get_information+0x3c> return NULL; if ( !_Objects_Information_table[ the_api ] ) 10b2db: 8b 04 b5 48 38 12 00 mov 0x123848(,%esi,4),%eax 10b2e2: 85 c0 test %eax,%eax 10b2e4: 74 0e je 10b2f4 <_Objects_Get_information+0x3c> <== ALWAYS TAKEN return NULL; info = _Objects_Information_table[ the_api ][ the_class ]; 10b2e6: 8b 04 98 mov (%eax,%ebx,4),%eax if ( !info ) 10b2e9: 85 c0 test %eax,%eax 10b2eb: 74 09 je 10b2f6 <_Objects_Get_information+0x3e> <== ALWAYS TAKEN * In a multprocessing configuration, we may access remote objects. * Thus we may have 0 local instances and still have a valid object * pointer. */ #if !defined(RTEMS_MULTIPROCESSING) if ( info->maximum == 0 ) 10b2ed: 66 83 78 10 00 cmpw $0x0,0x10(%eax) 10b2f2: 75 02 jne 10b2f6 <_Objects_Get_information+0x3e> 10b2f4: 31 c0 xor %eax,%eax return NULL; #endif return info; } 10b2f6: 8d 65 f8 lea -0x8(%ebp),%esp 10b2f9: 5b pop %ebx 10b2fa: 5e pop %esi 10b2fb: c9 leave 10b2fc: c3 ret 0010b298 <_Objects_Get_information_id>: #include Objects_Information *_Objects_Get_information_id( Objects_Id id ) { 10b298: 55 push %ebp 10b299: 89 e5 mov %esp,%ebp 10b29b: 83 ec 10 sub $0x10,%esp 10b29e: 8b 45 08 mov 0x8(%ebp),%eax return _Objects_Get_information( 10b2a1: 89 c2 mov %eax,%edx 10b2a3: c1 ea 1b shr $0x1b,%edx 10b2a6: 52 push %edx 10b2a7: c1 e8 18 shr $0x18,%eax 10b2aa: 83 e0 07 and $0x7,%eax 10b2ad: 50 push %eax 10b2ae: e8 05 00 00 00 call 10b2b8 <_Objects_Get_information> <== ALWAYS TAKEN _Objects_Get_API( id ), _Objects_Get_class( id ) ); } 10b2b3: c9 leave 10b2b4: c3 ret 0010b300 <_Objects_Get_isr_disable>: Objects_Information *information, Objects_Id id, Objects_Locations *location, ISR_Level *level_p ) { 10b300: 55 push %ebp 10b301: 89 e5 mov %esp,%ebp 10b303: 56 push %esi 10b304: 53 push %ebx 10b305: 8b 5d 08 mov 0x8(%ebp),%ebx 10b308: 8b 55 10 mov 0x10(%ebp),%edx Objects_Control *the_object; uint32_t index; ISR_Level level; index = id - information->minimum_id + 1; 10b30b: b8 01 00 00 00 mov $0x1,%eax 10b310: 2b 43 08 sub 0x8(%ebx),%eax 10b313: 03 45 0c add 0xc(%ebp),%eax _ISR_Disable( level ); 10b316: 9c pushf 10b317: fa cli 10b318: 59 pop %ecx if ( information->maximum >= index ) { 10b319: 0f b7 73 10 movzwl 0x10(%ebx),%esi 10b31d: 39 c6 cmp %eax,%esi 10b31f: 72 21 jb 10b342 <_Objects_Get_isr_disable+0x42> if ( (the_object = information->local_table[ index ]) != NULL ) { 10b321: 8b 5b 1c mov 0x1c(%ebx),%ebx 10b324: 8b 04 83 mov (%ebx,%eax,4),%eax 10b327: 85 c0 test %eax,%eax 10b329: 74 0d je 10b338 <_Objects_Get_isr_disable+0x38> *location = OBJECTS_LOCAL; 10b32b: c7 02 00 00 00 00 movl $0x0,(%edx) *level_p = level; 10b331: 8b 55 14 mov 0x14(%ebp),%edx 10b334: 89 0a mov %ecx,(%edx) return the_object; 10b336: eb 14 jmp 10b34c <_Objects_Get_isr_disable+0x4c> <== ALWAYS TAKEN } _ISR_Enable( level ); 10b338: 51 push %ecx 10b339: 9d popf *location = OBJECTS_ERROR; 10b33a: c7 02 01 00 00 00 movl $0x1,(%edx) return NULL; 10b340: eb 0a jmp 10b34c <_Objects_Get_isr_disable+0x4c> <== ALWAYS TAKEN } _ISR_Enable( level ); 10b342: 51 push %ecx 10b343: 9d popf *location = OBJECTS_ERROR; 10b344: c7 02 01 00 00 00 movl $0x1,(%edx) 10b34a: 31 c0 xor %eax,%eax _Objects_MP_Is_remote( information, id, location, &the_object ); return the_object; #else return NULL; #endif } 10b34c: 5b pop %ebx 10b34d: 5e pop %esi 10b34e: c9 leave 10b34f: c3 ret 00114320 <_Objects_Get_name_as_string>: char *_Objects_Get_name_as_string( Objects_Id id, size_t length, char *name ) { 114320: 55 push %ebp 114321: 89 e5 mov %esp,%ebp 114323: 57 push %edi 114324: 56 push %esi 114325: 53 push %ebx 114326: 83 ec 2c sub $0x2c,%esp 114329: 8b 75 0c mov 0xc(%ebp),%esi 11432c: 8b 5d 10 mov 0x10(%ebp),%ebx char lname[5]; Objects_Control *the_object; Objects_Locations location; Objects_Id tmpId; if ( length == 0 ) 11432f: 85 f6 test %esi,%esi 114331: 0f 84 95 00 00 00 je 1143cc <_Objects_Get_name_as_string+0xac> return NULL; if ( name == NULL ) 114337: 85 db test %ebx,%ebx 114339: 0f 84 8f 00 00 00 je 1143ce <_Objects_Get_name_as_string+0xae> return NULL; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 11433f: 8b 7d 08 mov 0x8(%ebp),%edi 114342: 85 ff test %edi,%edi 114344: 75 08 jne 11434e <_Objects_Get_name_as_string+0x2e> 114346: a1 0c eb 12 00 mov 0x12eb0c,%eax 11434b: 8b 78 08 mov 0x8(%eax),%edi information = _Objects_Get_information_id( tmpId ); 11434e: 83 ec 0c sub $0xc,%esp 114351: 57 push %edi 114352: e8 31 a5 ff ff call 10e888 <_Objects_Get_information_id> <== ALWAYS TAKEN if ( !information ) 114357: 83 c4 10 add $0x10,%esp 11435a: 85 c0 test %eax,%eax 11435c: 74 6e je 1143cc <_Objects_Get_name_as_string+0xac> return NULL; the_object = _Objects_Get( information, tmpId, &location ); 11435e: 52 push %edx 11435f: 8d 55 e4 lea -0x1c(%ebp),%edx 114362: 52 push %edx 114363: 57 push %edi 114364: 50 push %eax 114365: e8 d6 a5 ff ff call 10e940 <_Objects_Get> <== ALWAYS TAKEN switch ( location ) { 11436a: 83 c4 10 add $0x10,%esp 11436d: 83 7d e4 00 cmpl $0x0,-0x1c(%ebp) 114371: 75 59 jne 1143cc <_Objects_Get_name_as_string+0xac> if ( information->is_string ) { s = the_object->name.name_p; } else #endif { uint32_t u32_name = (uint32_t) the_object->name.name_u32; 114373: 8b 40 0c mov 0xc(%eax),%eax lname[ 0 ] = (u32_name >> 24) & 0xff; 114376: 89 c2 mov %eax,%edx 114378: c1 ea 18 shr $0x18,%edx 11437b: 88 55 df mov %dl,-0x21(%ebp) lname[ 1 ] = (u32_name >> 16) & 0xff; 11437e: 89 c2 mov %eax,%edx 114380: c1 ea 10 shr $0x10,%edx 114383: 88 55 e0 mov %dl,-0x20(%ebp) lname[ 2 ] = (u32_name >> 8) & 0xff; 114386: 89 c2 mov %eax,%edx 114388: c1 ea 08 shr $0x8,%edx 11438b: 88 55 e1 mov %dl,-0x1f(%ebp) lname[ 3 ] = (u32_name >> 0) & 0xff; 11438e: 88 45 e2 mov %al,-0x1e(%ebp) lname[ 4 ] = '\0'; 114391: c6 45 e3 00 movb $0x0,-0x1d(%ebp) 114395: 89 d8 mov %ebx,%eax 114397: 31 d2 xor %edx,%edx s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { 114399: 4e dec %esi 11439a: 89 75 d4 mov %esi,-0x2c(%ebp) 11439d: eb 16 jmp 1143b5 <_Objects_Get_name_as_string+0x95> <== ALWAYS TAKEN *d = (isprint((unsigned char)*s)) ? *s : '*'; 11439f: 0f b6 f1 movzbl %cl,%esi 1143a2: 8b 3d a4 c1 12 00 mov 0x12c1a4,%edi 1143a8: f6 44 37 01 97 testb $0x97,0x1(%edi,%esi,1) 1143ad: 75 02 jne 1143b1 <_Objects_Get_name_as_string+0x91> 1143af: b1 2a mov $0x2a,%cl 1143b1: 88 08 mov %cl,(%eax) s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { 1143b3: 42 inc %edx 1143b4: 40 inc %eax 1143b5: 3b 55 d4 cmp -0x2c(%ebp),%edx 1143b8: 73 08 jae 1143c2 <_Objects_Get_name_as_string+0xa2> 1143ba: 8a 4c 15 df mov -0x21(%ebp,%edx,1),%cl 1143be: 84 c9 test %cl,%cl 1143c0: 75 dd jne 11439f <_Objects_Get_name_as_string+0x7f> *d = (isprint((unsigned char)*s)) ? *s : '*'; } } *d = '\0'; 1143c2: c6 00 00 movb $0x0,(%eax) _Thread_Enable_dispatch(); 1143c5: e8 a7 ad ff ff call 10f171 <_Thread_Enable_dispatch> return name; 1143ca: eb 02 jmp 1143ce <_Objects_Get_name_as_string+0xae> <== ALWAYS TAKEN 1143cc: 31 db xor %ebx,%ebx } return NULL; /* unreachable path */ } 1143ce: 89 d8 mov %ebx,%eax 1143d0: 8d 65 f4 lea -0xc(%ebp),%esp 1143d3: 5b pop %ebx 1143d4: 5e pop %esi 1143d5: 5f pop %edi 1143d6: c9 leave 1143d7: c3 ret 00116534 <_Objects_Get_next>: Objects_Information *information, Objects_Id id, Objects_Locations *location_p, Objects_Id *next_id_p ) { 116534: 55 push %ebp 116535: 89 e5 mov %esp,%ebp 116537: 57 push %edi 116538: 56 push %esi 116539: 53 push %ebx 11653a: 83 ec 1c sub $0x1c,%esp 11653d: 8b 7d 08 mov 0x8(%ebp),%edi 116540: 8b 75 10 mov 0x10(%ebp),%esi 116543: 8b 55 14 mov 0x14(%ebp),%edx Objects_Control *object; Objects_Id next_id; if ( !information ) 116546: 85 ff test %edi,%edi 116548: 74 43 je 11658d <_Objects_Get_next+0x59> return NULL; if ( !location_p ) 11654a: 85 f6 test %esi,%esi 11654c: 74 3f je 11658d <_Objects_Get_next+0x59> return NULL; if ( !next_id_p ) 11654e: 85 d2 test %edx,%edx 116550: 74 3b je 11658d <_Objects_Get_next+0x59> return NULL; if (_Objects_Get_index(id) == OBJECTS_ID_INITIAL_INDEX) 116552: 8b 5d 0c mov 0xc(%ebp),%ebx 116555: 66 85 db test %bx,%bx 116558: 75 03 jne 11655d <_Objects_Get_next+0x29> next_id = information->minimum_id; 11655a: 8b 5f 08 mov 0x8(%edi),%ebx else next_id = id; do { /* walked off end of list? */ if (_Objects_Get_index(next_id) > information->maximum) 11655d: 66 39 5f 10 cmp %bx,0x10(%edi) 116561: 73 0e jae 116571 <_Objects_Get_next+0x3d> { *location_p = OBJECTS_ERROR; 116563: c7 06 01 00 00 00 movl $0x1,(%esi) *next_id_p = next_id; return object; final: *next_id_p = OBJECTS_ID_FINAL; 116569: c7 02 ff ff ff ff movl $0xffffffff,(%edx) 11656f: eb 1c jmp 11658d <_Objects_Get_next+0x59> <== ALWAYS TAKEN *location_p = OBJECTS_ERROR; goto final; } /* try to grab one */ object = _Objects_Get(information, next_id, location_p); 116571: 50 push %eax 116572: 56 push %esi 116573: 53 push %ebx 116574: 57 push %edi 116575: 89 55 e4 mov %edx,-0x1c(%ebp) 116578: e8 c3 83 ff ff call 10e940 <_Objects_Get> <== ALWAYS TAKEN next_id++; 11657d: 43 inc %ebx } while (*location_p != OBJECTS_LOCAL); 11657e: 83 c4 10 add $0x10,%esp 116581: 83 3e 00 cmpl $0x0,(%esi) 116584: 8b 55 e4 mov -0x1c(%ebp),%edx 116587: 75 d4 jne 11655d <_Objects_Get_next+0x29> *next_id_p = next_id; 116589: 89 1a mov %ebx,(%edx) return object; 11658b: eb 02 jmp 11658f <_Objects_Get_next+0x5b> <== ALWAYS TAKEN final: *next_id_p = OBJECTS_ID_FINAL; return 0; 11658d: 31 c0 xor %eax,%eax } 11658f: 8d 65 f4 lea -0xc(%ebp),%esp 116592: 5b pop %ebx 116593: 5e pop %esi 116594: 5f pop %edi 116595: c9 leave 116596: c3 ret 00118250 <_Objects_Get_no_protection>: Objects_Control *_Objects_Get_no_protection( Objects_Information *information, Objects_Id id, Objects_Locations *location ) { 118250: 55 push %ebp 118251: 89 e5 mov %esp,%ebp 118253: 53 push %ebx 118254: 8b 55 08 mov 0x8(%ebp),%edx 118257: 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; 11825a: b8 01 00 00 00 mov $0x1,%eax 11825f: 2b 42 08 sub 0x8(%edx),%eax 118262: 03 45 0c add 0xc(%ebp),%eax if ( information->maximum >= index ) { 118265: 0f b7 5a 10 movzwl 0x10(%edx),%ebx 118269: 39 c3 cmp %eax,%ebx 11826b: 72 12 jb 11827f <_Objects_Get_no_protection+0x2f> if ( (the_object = information->local_table[ index ]) != NULL ) { 11826d: 8b 52 1c mov 0x1c(%edx),%edx 118270: 8b 04 82 mov (%edx,%eax,4),%eax 118273: 85 c0 test %eax,%eax 118275: 74 08 je 11827f <_Objects_Get_no_protection+0x2f> <== ALWAYS TAKEN *location = OBJECTS_LOCAL; 118277: c7 01 00 00 00 00 movl $0x0,(%ecx) return the_object; 11827d: eb 08 jmp 118287 <_Objects_Get_no_protection+0x37> <== ALWAYS TAKEN /* * This isn't supported or required yet for Global objects so * if it isn't local, we don't find it. */ *location = OBJECTS_ERROR; 11827f: c7 01 01 00 00 00 movl $0x1,(%ecx) 118285: 31 c0 xor %eax,%eax return NULL; } 118287: 5b pop %ebx 118288: c9 leave 118289: c3 ret 0010e998 <_Objects_Id_to_name>: */ Objects_Name_or_id_lookup_errors _Objects_Id_to_name ( Objects_Id id, Objects_Name *name ) { 10e998: 55 push %ebp 10e999: 89 e5 mov %esp,%ebp 10e99b: 83 ec 18 sub $0x18,%esp /* * Caller is trusted for name != NULL. */ tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 10e99e: 8b 45 08 mov 0x8(%ebp),%eax 10e9a1: 85 c0 test %eax,%eax 10e9a3: 75 08 jne 10e9ad <_Objects_Id_to_name+0x15> 10e9a5: a1 0c eb 12 00 mov 0x12eb0c,%eax 10e9aa: 8b 40 08 mov 0x8(%eax),%eax */ RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API( Objects_Id id ) { return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS); 10e9ad: 89 c2 mov %eax,%edx 10e9af: c1 ea 18 shr $0x18,%edx 10e9b2: 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 ) 10e9b5: 8d 4a ff lea -0x1(%edx),%ecx 10e9b8: 83 f9 03 cmp $0x3,%ecx 10e9bb: 77 32 ja 10e9ef <_Objects_Id_to_name+0x57> 10e9bd: eb 37 jmp 10e9f6 <_Objects_Id_to_name+0x5e> <== ALWAYS TAKEN if ( !_Objects_Information_table[ the_api ] ) return OBJECTS_INVALID_ID; the_class = _Objects_Get_class( tmpId ); information = _Objects_Information_table[ the_api ][ the_class ]; 10e9bf: 89 c1 mov %eax,%ecx 10e9c1: c1 e9 1b shr $0x1b,%ecx 10e9c4: 8b 14 8a mov (%edx,%ecx,4),%edx if ( !information ) 10e9c7: 85 d2 test %edx,%edx 10e9c9: 74 24 je 10e9ef <_Objects_Id_to_name+0x57> <== ALWAYS 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 ); 10e9cb: 51 push %ecx 10e9cc: 8d 4d f4 lea -0xc(%ebp),%ecx 10e9cf: 51 push %ecx 10e9d0: 50 push %eax 10e9d1: 52 push %edx 10e9d2: e8 69 ff ff ff call 10e940 <_Objects_Get> <== ALWAYS TAKEN if ( !the_object ) 10e9d7: 83 c4 10 add $0x10,%esp 10e9da: 85 c0 test %eax,%eax 10e9dc: 74 11 je 10e9ef <_Objects_Id_to_name+0x57> return OBJECTS_INVALID_ID; *name = the_object->name; 10e9de: 8b 50 0c mov 0xc(%eax),%edx 10e9e1: 8b 45 0c mov 0xc(%ebp),%eax 10e9e4: 89 10 mov %edx,(%eax) _Thread_Enable_dispatch(); 10e9e6: e8 86 07 00 00 call 10f171 <_Thread_Enable_dispatch> <== ALWAYS TAKEN 10e9eb: 31 c0 xor %eax,%eax return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; 10e9ed: eb 05 jmp 10e9f4 <_Objects_Id_to_name+0x5c> <== ALWAYS TAKEN 10e9ef: b8 03 00 00 00 mov $0x3,%eax } 10e9f4: c9 leave 10e9f5: 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 ] ) 10e9f6: 8b 14 95 24 ea 12 00 mov 0x12ea24(,%edx,4),%edx 10e9fd: 85 d2 test %edx,%edx 10e9ff: 75 be jne 10e9bf <_Objects_Id_to_name+0x27> 10ea01: eb ec jmp 10e9ef <_Objects_Id_to_name+0x57> <== ALWAYS TAKEN 0010b3a8 <_Objects_Initialize_information>: , bool supports_global, Objects_Thread_queue_Extract_callout extract #endif ) { 10b3a8: 55 push %ebp 10b3a9: 89 e5 mov %esp,%ebp 10b3ab: 57 push %edi 10b3ac: 56 push %esi 10b3ad: 53 push %ebx 10b3ae: 83 ec 1c sub $0x1c,%esp 10b3b1: 8b 45 08 mov 0x8(%ebp),%eax 10b3b4: 8b 55 0c mov 0xc(%ebp),%edx 10b3b7: 8b 75 10 mov 0x10(%ebp),%esi 10b3ba: 8b 5d 14 mov 0x14(%ebp),%ebx 10b3bd: 8b 4d 20 mov 0x20(%ebp),%ecx 10b3c0: 89 4d e4 mov %ecx,-0x1c(%ebp) 10b3c3: 0f b7 7d 18 movzwl 0x18(%ebp),%edi uint32_t maximum_per_allocation; #if defined(RTEMS_MULTIPROCESSING) uint32_t index; #endif information->the_api = the_api; 10b3c7: 89 10 mov %edx,(%eax) information->the_class = the_class; 10b3c9: 66 89 70 04 mov %si,0x4(%eax) information->size = size; 10b3cd: 89 78 18 mov %edi,0x18(%eax) information->local_table = 0; 10b3d0: c7 40 1c 00 00 00 00 movl $0x0,0x1c(%eax) information->inactive_per_block = 0; 10b3d7: c7 40 30 00 00 00 00 movl $0x0,0x30(%eax) information->object_blocks = 0; 10b3de: c7 40 34 00 00 00 00 movl $0x0,0x34(%eax) information->inactive = 0; 10b3e5: 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; 10b3eb: 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; 10b3f1: 8b 3c 95 48 38 12 00 mov 0x123848(,%edx,4),%edi 10b3f8: 89 04 b7 mov %eax,(%edi,%esi,4) /* * Are we operating in limited or unlimited (e.g. auto-extend) mode. */ information->auto_extend = (maximum & OBJECTS_UNLIMITED_OBJECTS) ? true : false; 10b3fb: 89 df mov %ebx,%edi 10b3fd: c1 ef 1f shr $0x1f,%edi _Objects_Information_table[ the_api ][ the_class ] = information; /* * Are we operating in limited or unlimited (e.g. auto-extend) mode. */ information->auto_extend = 10b400: 89 f9 mov %edi,%ecx 10b402: 88 48 12 mov %cl,0x12(%eax) (maximum & OBJECTS_UNLIMITED_OBJECTS) ? true : false; maximum_per_allocation = maximum & ~OBJECTS_UNLIMITED_OBJECTS; 10b405: 89 d9 mov %ebx,%ecx 10b407: 81 e1 ff ff ff 7f and $0x7fffffff,%ecx /* * Unlimited and maximum of zero is illogical. */ if ( information->auto_extend && maximum_per_allocation == 0) { 10b40d: 85 ff test %edi,%edi 10b40f: 74 10 je 10b421 <_Objects_Initialize_information+0x79> 10b411: 85 c9 test %ecx,%ecx 10b413: 75 0c jne 10b421 <_Objects_Initialize_information+0x79> _Internal_error_Occurred( 10b415: 50 push %eax 10b416: 6a 14 push $0x14 10b418: 6a 01 push $0x1 10b41a: 6a 00 push $0x0 10b41c: e8 83 fa ff ff call 10aea4 <_Internal_error_Occurred> } /* * The allocation unit is the maximum value */ information->allocation_size = maximum_per_allocation; 10b421: 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; 10b425: c7 40 1c 10 35 12 00 movl $0x123510,0x1c(%eax) /* * Calculate minimum and maximum Id's */ minimum_index = (maximum_per_allocation == 0) ? 0 : 1; information->minimum_id = 10b42c: c1 e2 18 shl $0x18,%edx 10b42f: 81 ca 00 00 01 00 or $0x10000,%edx 10b435: c1 e6 1b shl $0x1b,%esi 10b438: 09 f2 or %esi,%edx 10b43a: 85 c9 test %ecx,%ecx 10b43c: 0f 95 c3 setne %bl 10b43f: 89 de mov %ebx,%esi 10b441: 81 e6 ff 00 00 00 and $0xff,%esi 10b447: 09 f2 or %esi,%edx 10b449: 89 50 08 mov %edx,0x8(%eax) /* * Calculate the maximum name length */ name_length = maximum_name_length; if ( name_length & (OBJECTS_NAME_ALIGNMENT-1) ) 10b44c: 8b 55 e4 mov -0x1c(%ebp),%edx 10b44f: f6 c2 03 test $0x3,%dl 10b452: 74 06 je 10b45a <_Objects_Initialize_information+0xb2> <== NEVER TAKEN name_length = (name_length + OBJECTS_NAME_ALIGNMENT) & 10b454: 83 c2 04 add $0x4,%edx <== NOT EXECUTED 10b457: 83 e2 fc and $0xfffffffc,%edx <== NOT EXECUTED ~(OBJECTS_NAME_ALIGNMENT-1); information->name_length = name_length; 10b45a: 66 89 50 38 mov %dx,0x38(%eax) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 10b45e: 8d 50 24 lea 0x24(%eax),%edx 10b461: 89 50 20 mov %edx,0x20(%eax) the_chain->permanent_null = NULL; 10b464: c7 40 24 00 00 00 00 movl $0x0,0x24(%eax) the_chain->last = _Chain_Head(the_chain); 10b46b: 8d 50 20 lea 0x20(%eax),%edx 10b46e: 89 50 28 mov %edx,0x28(%eax) _Chain_Initialize_empty( &information->Inactive ); /* * Initialize objects .. if there are any */ if ( maximum_per_allocation ) { 10b471: 85 c9 test %ecx,%ecx 10b473: 74 0f je 10b484 <_Objects_Initialize_information+0xdc> /* * 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 ); 10b475: 89 45 08 mov %eax,0x8(%ebp) _Chain_Initialize_empty( &information->global_table[ index ] ); } else information->global_table = NULL; #endif } 10b478: 8d 65 f4 lea -0xc(%ebp),%esp 10b47b: 5b pop %ebx 10b47c: 5e pop %esi 10b47d: 5f pop %edi 10b47e: 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 ); 10b47f: e9 4c fb ff ff jmp 10afd0 <_Objects_Extend_information> <== ALWAYS TAKEN _Chain_Initialize_empty( &information->global_table[ index ] ); } else information->global_table = NULL; #endif } 10b484: 8d 65 f4 lea -0xc(%ebp),%esp 10b487: 5b pop %ebx 10b488: 5e pop %esi 10b489: 5f pop %edi 10b48a: c9 leave 10b48b: c3 ret 0010b49c <_Objects_Name_to_id_u32>: Objects_Information *information, uint32_t name, uint32_t node, Objects_Id *id ) { 10b49c: 55 push %ebp 10b49d: 89 e5 mov %esp,%ebp 10b49f: 57 push %edi 10b4a0: 56 push %esi 10b4a1: 53 push %ebx 10b4a2: 8b 4d 08 mov 0x8(%ebp),%ecx 10b4a5: 8b 5d 0c mov 0xc(%ebp),%ebx 10b4a8: 8b 55 10 mov 0x10(%ebp),%edx 10b4ab: 8b 75 14 mov 0x14(%ebp),%esi Objects_Name name_for_mp; #endif /* ASSERT: information->is_string == false */ if ( !id ) 10b4ae: b8 02 00 00 00 mov $0x2,%eax 10b4b3: 85 f6 test %esi,%esi 10b4b5: 74 49 je 10b500 <_Objects_Name_to_id_u32+0x64> return OBJECTS_INVALID_ADDRESS; if ( name == 0 ) 10b4b7: 85 db test %ebx,%ebx 10b4b9: 74 40 je 10b4fb <_Objects_Name_to_id_u32+0x5f> return OBJECTS_INVALID_NAME; search_local_node = false; if ( information->maximum != 0 && 10b4bb: 8b 79 10 mov 0x10(%ecx),%edi 10b4be: 66 85 ff test %di,%di 10b4c1: 74 38 je 10b4fb <_Objects_Name_to_id_u32+0x5f> 10b4c3: 81 fa ff ff ff 7f cmp $0x7fffffff,%edx 10b4c9: 74 24 je 10b4ef <_Objects_Name_to_id_u32+0x53> 10b4cb: 85 d2 test %edx,%edx 10b4cd: 74 20 je 10b4ef <_Objects_Name_to_id_u32+0x53> 10b4cf: 4a dec %edx 10b4d0: 75 29 jne 10b4fb <_Objects_Name_to_id_u32+0x5f> 10b4d2: eb 1b jmp 10b4ef <_Objects_Name_to_id_u32+0x53> <== ALWAYS TAKEN if ( search_local_node ) { name_length = information->name_length; for ( index = 1; index <= information->maximum; index++ ) { the_object = information->local_table[ index ]; 10b4d4: 8b 51 1c mov 0x1c(%ecx),%edx 10b4d7: 8b 14 82 mov (%edx,%eax,4),%edx if ( !the_object ) 10b4da: 85 d2 test %edx,%edx 10b4dc: 74 0e je 10b4ec <_Objects_Name_to_id_u32+0x50> continue; if ( name == the_object->name.name_u32 ) { 10b4de: 3b 5a 0c cmp 0xc(%edx),%ebx 10b4e1: 75 09 jne 10b4ec <_Objects_Name_to_id_u32+0x50> *id = the_object->id; 10b4e3: 8b 42 08 mov 0x8(%edx),%eax 10b4e6: 89 06 mov %eax,(%esi) 10b4e8: 31 c0 xor %eax,%eax return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; 10b4ea: eb 14 jmp 10b500 <_Objects_Name_to_id_u32+0x64> <== ALWAYS TAKEN search_local_node = true; if ( search_local_node ) { name_length = information->name_length; for ( index = 1; index <= information->maximum; index++ ) { 10b4ec: 40 inc %eax 10b4ed: eb 08 jmp 10b4f7 <_Objects_Name_to_id_u32+0x5b> <== ALWAYS TAKEN 10b4ef: b8 01 00 00 00 mov $0x1,%eax 10b4f4: 0f b7 ff movzwl %di,%edi 10b4f7: 39 f8 cmp %edi,%eax 10b4f9: 76 d9 jbe 10b4d4 <_Objects_Name_to_id_u32+0x38> 10b4fb: b8 01 00 00 00 mov $0x1,%eax name_for_mp.name_u32 = name; return _Objects_MP_Global_name_search( information, name_for_mp, node, id ); #else return OBJECTS_INVALID_NAME; #endif } 10b500: 5b pop %ebx 10b501: 5e pop %esi 10b502: 5f pop %edi 10b503: c9 leave 10b504: c3 ret 0010d170 <_Objects_Set_name>: bool _Objects_Set_name( Objects_Information *information, Objects_Control *the_object, const char *name ) { 10d170: 55 push %ebp 10d171: 89 e5 mov %esp,%ebp 10d173: 57 push %edi 10d174: 56 push %esi 10d175: 53 push %ebx 10d176: 83 ec 14 sub $0x14,%esp 10d179: 8b 5d 10 mov 0x10(%ebp),%ebx size_t length; const char *s; s = name; length = strnlen( name, information->name_length ); 10d17c: 8b 45 08 mov 0x8(%ebp),%eax 10d17f: 0f b7 40 38 movzwl 0x38(%eax),%eax 10d183: 50 push %eax 10d184: 53 push %ebx 10d185: e8 ba 5d 00 00 call 112f44 d[length] = '\0'; the_object->name.name_p = d; } else #endif { the_object->name.name_u32 = _Objects_Build_name( 10d18a: 0f b6 3b movzbl (%ebx),%edi 10d18d: 83 c4 10 add $0x10,%esp 10d190: 83 f8 01 cmp $0x1,%eax 10d193: 76 3c jbe 10d1d1 <_Objects_Set_name+0x61> 10d195: 0f be 4b 01 movsbl 0x1(%ebx),%ecx 10d199: c1 e1 10 shl $0x10,%ecx 10d19c: 83 f8 02 cmp $0x2,%eax 10d19f: 76 35 jbe 10d1d6 <_Objects_Set_name+0x66> 10d1a1: 0f be 53 02 movsbl 0x2(%ebx),%edx 10d1a5: c1 e2 08 shl $0x8,%edx 10d1a8: be 20 00 00 00 mov $0x20,%esi 10d1ad: 83 f8 03 cmp $0x3,%eax 10d1b0: 76 04 jbe 10d1b6 <_Objects_Set_name+0x46> 10d1b2: 0f be 73 03 movsbl 0x3(%ebx),%esi 10d1b6: 89 f8 mov %edi,%eax 10d1b8: c1 e0 18 shl $0x18,%eax 10d1bb: 09 c8 or %ecx,%eax 10d1bd: 09 d0 or %edx,%eax 10d1bf: 09 f0 or %esi,%eax 10d1c1: 8b 55 0c mov 0xc(%ebp),%edx 10d1c4: 89 42 0c mov %eax,0xc(%edx) ); } return true; } 10d1c7: b0 01 mov $0x1,%al 10d1c9: 8d 65 f4 lea -0xc(%ebp),%esp 10d1cc: 5b pop %ebx 10d1cd: 5e pop %esi 10d1ce: 5f pop %edi 10d1cf: c9 leave 10d1d0: c3 ret d[length] = '\0'; the_object->name.name_p = d; } else #endif { the_object->name.name_u32 = _Objects_Build_name( 10d1d1: b9 00 00 20 00 mov $0x200000,%ecx 10d1d6: ba 00 20 00 00 mov $0x2000,%edx 10d1db: be 20 00 00 00 mov $0x20,%esi 10d1e0: eb d4 jmp 10d1b6 <_Objects_Set_name+0x46> <== ALWAYS TAKEN 0010b508 <_Objects_Shrink_information>: */ void _Objects_Shrink_information( Objects_Information *information ) { 10b508: 55 push %ebp 10b509: 89 e5 mov %esp,%ebp 10b50b: 57 push %edi 10b50c: 56 push %esi 10b50d: 53 push %ebx 10b50e: 83 ec 1c sub $0x1c,%esp 10b511: 8b 5d 08 mov 0x8(%ebp),%ebx /* * Search the list to find block or chunk with all objects inactive. */ index_base = _Objects_Get_index( information->minimum_id ); 10b514: 0f b7 73 08 movzwl 0x8(%ebx),%esi block_count = (information->maximum - index_base) / 10b518: 0f b7 4b 14 movzwl 0x14(%ebx),%ecx 10b51c: 0f b7 43 10 movzwl 0x10(%ebx),%eax 10b520: 29 f0 sub %esi,%eax 10b522: 31 d2 xor %edx,%edx 10b524: f7 f1 div %ecx 10b526: 89 45 e4 mov %eax,-0x1c(%ebp) 10b529: 31 c0 xor %eax,%eax information->allocation_size; for ( block = 0; block < block_count; block++ ) { 10b52b: eb 77 jmp 10b5a4 <_Objects_Shrink_information+0x9c> <== ALWAYS TAKEN 10b52d: 8d 3c 85 00 00 00 00 lea 0x0(,%eax,4),%edi if ( information->inactive_per_block[ block ] == 10b534: 8b 53 30 mov 0x30(%ebx),%edx 10b537: 39 0c 82 cmp %ecx,(%edx,%eax,4) 10b53a: 75 65 jne 10b5a1 <_Objects_Shrink_information+0x99> information->allocation_size ) { /* * Assume the Inactive chain is never empty at this point */ the_object = (Objects_Control *) information->Inactive.first; 10b53c: 8b 43 20 mov 0x20(%ebx),%eax do { index = _Objects_Get_index( the_object->id ); 10b53f: 0f b7 50 08 movzwl 0x8(%eax),%edx 10b543: 89 55 e4 mov %edx,-0x1c(%ebp) /* * Get the next node before the node is extracted */ extract_me = the_object; the_object = (Objects_Control *) the_object->Node.next; 10b546: 8b 10 mov (%eax),%edx if ((index >= index_base) && 10b548: 39 75 e4 cmp %esi,-0x1c(%ebp) 10b54b: 72 1e jb 10b56b <_Objects_Shrink_information+0x63> (index < (index_base + information->allocation_size))) { 10b54d: 0f b7 4b 14 movzwl 0x14(%ebx),%ecx 10b551: 8d 0c 0e lea (%esi,%ecx,1),%ecx 10b554: 39 4d e4 cmp %ecx,-0x1c(%ebp) 10b557: 73 12 jae 10b56b <_Objects_Shrink_information+0x63> _Chain_Extract( &extract_me->Node ); 10b559: 83 ec 0c sub $0xc,%esp 10b55c: 50 push %eax 10b55d: 89 55 e0 mov %edx,-0x20(%ebp) 10b560: e8 53 2d 00 00 call 10e2b8 <_Chain_Extract> 10b565: 83 c4 10 add $0x10,%esp 10b568: 8b 55 e0 mov -0x20(%ebp),%edx } } while ( the_object ); 10b56b: 85 d2 test %edx,%edx 10b56d: 74 04 je 10b573 <_Objects_Shrink_information+0x6b> 10b56f: 89 d0 mov %edx,%eax 10b571: eb cc jmp 10b53f <_Objects_Shrink_information+0x37> <== ALWAYS TAKEN /* * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); 10b573: 83 ec 0c sub $0xc,%esp 10b576: 8b 43 34 mov 0x34(%ebx),%eax 10b579: ff 34 38 pushl (%eax,%edi,1) 10b57c: e8 24 15 00 00 call 10caa5 <_Workspace_Free> information->object_blocks[ block ] = NULL; 10b581: 8b 43 34 mov 0x34(%ebx),%eax 10b584: c7 04 38 00 00 00 00 movl $0x0,(%eax,%edi,1) information->inactive_per_block[ block ] = 0; 10b58b: 8b 43 30 mov 0x30(%ebx),%eax 10b58e: c7 04 38 00 00 00 00 movl $0x0,(%eax,%edi,1) information->inactive -= information->allocation_size; 10b595: 8b 43 14 mov 0x14(%ebx),%eax 10b598: 66 29 43 2c sub %ax,0x2c(%ebx) return; 10b59c: 83 c4 10 add $0x10,%esp 10b59f: eb 08 jmp 10b5a9 <_Objects_Shrink_information+0xa1> <== ALWAYS TAKEN } index_base += information->allocation_size; 10b5a1: 01 ce add %ecx,%esi index_base = _Objects_Get_index( information->minimum_id ); block_count = (information->maximum - index_base) / information->allocation_size; for ( block = 0; block < block_count; block++ ) { 10b5a3: 40 inc %eax 10b5a4: 3b 45 e4 cmp -0x1c(%ebp),%eax 10b5a7: 72 84 jb 10b52d <_Objects_Shrink_information+0x25> return; } index_base += information->allocation_size; } } 10b5a9: 8d 65 f4 lea -0xc(%ebp),%esp 10b5ac: 5b pop %ebx 10b5ad: 5e pop %esi 10b5ae: 5f pop %edi 10b5af: c9 leave 10b5b0: c3 ret 0010b5b4 <_Protected_heap_Allocate_aligned_with_boundary>: Heap_Control *heap, uintptr_t size, uintptr_t alignment, uintptr_t boundary ) { 10b5b4: 55 push %ebp 10b5b5: 89 e5 mov %esp,%ebp 10b5b7: 83 ec 24 sub $0x24,%esp void *p; _RTEMS_Lock_allocator(); 10b5ba: ff 35 28 39 12 00 pushl 0x123928 10b5c0: e8 03 f1 ff ff call 10a6c8 <_API_Mutex_Lock> <== ALWAYS TAKEN p = _Heap_Allocate_aligned_with_boundary( 10b5c5: ff 75 14 pushl 0x14(%ebp) 10b5c8: ff 75 10 pushl 0x10(%ebp) 10b5cb: ff 75 0c pushl 0xc(%ebp) 10b5ce: ff 75 08 pushl 0x8(%ebp) 10b5d1: e8 0e 2f 00 00 call 10e4e4 <_Heap_Allocate_aligned_with_boundary> <== ALWAYS TAKEN heap, size, alignment, boundary ); _RTEMS_Unlock_allocator(); 10b5d6: 83 c4 14 add $0x14,%esp 10b5d9: ff 35 28 39 12 00 pushl 0x123928 10b5df: 89 45 f4 mov %eax,-0xc(%ebp) 10b5e2: e8 29 f1 ff ff call 10a710 <_API_Mutex_Unlock> <== ALWAYS TAKEN return p; } 10b5e7: 8b 45 f4 mov -0xc(%ebp),%eax 10b5ea: c9 leave 10b5eb: c3 ret 0010b5ec <_Protected_heap_Free>: bool _Protected_heap_Free( Heap_Control *the_heap, void *start_address ) { 10b5ec: 55 push %ebp 10b5ed: 89 e5 mov %esp,%ebp 10b5ef: 83 ec 24 sub $0x24,%esp bool status; _RTEMS_Lock_allocator(); 10b5f2: ff 35 28 39 12 00 pushl 0x123928 10b5f8: e8 cb f0 ff ff call 10a6c8 <_API_Mutex_Lock> <== ALWAYS TAKEN status = _Heap_Free( the_heap, start_address ); 10b5fd: 59 pop %ecx 10b5fe: 58 pop %eax 10b5ff: ff 75 0c pushl 0xc(%ebp) 10b602: ff 75 08 pushl 0x8(%ebp) 10b605: e8 3a 30 00 00 call 10e644 <_Heap_Free> <== ALWAYS TAKEN _RTEMS_Unlock_allocator(); 10b60a: 5a pop %edx 10b60b: ff 35 28 39 12 00 pushl 0x123928 10b611: 88 45 f4 mov %al,-0xc(%ebp) 10b614: e8 f7 f0 ff ff call 10a710 <_API_Mutex_Unlock> <== ALWAYS TAKEN return status; } 10b619: 8a 45 f4 mov -0xc(%ebp),%al 10b61c: c9 leave 10b61d: c3 ret 00127fc0 <_Protected_heap_Get_information>: bool _Protected_heap_Get_information( Heap_Control *the_heap, Heap_Information_block *the_info ) { 127fc0: 55 push %ebp 127fc1: 89 e5 mov %esp,%ebp 127fc3: 56 push %esi 127fc4: 53 push %ebx 127fc5: 8b 5d 08 mov 0x8(%ebp),%ebx 127fc8: 8b 75 0c mov 0xc(%ebp),%esi if ( !the_heap ) 127fcb: 85 db test %ebx,%ebx 127fcd: 74 2e je 127ffd <_Protected_heap_Get_information+0x3d> return false; if ( !the_info ) 127fcf: 85 f6 test %esi,%esi 127fd1: 74 2a je 127ffd <_Protected_heap_Get_information+0x3d> return false; _RTEMS_Lock_allocator(); 127fd3: 83 ec 0c sub $0xc,%esp 127fd6: ff 35 00 36 16 00 pushl 0x163600 127fdc: e8 5b 7c fe ff call 10fc3c <_API_Mutex_Lock> _Heap_Get_information( the_heap, the_info ); 127fe1: 5a pop %edx 127fe2: 59 pop %ecx 127fe3: 56 push %esi 127fe4: 53 push %ebx 127fe5: e8 1a c4 00 00 call 134404 <_Heap_Get_information> _RTEMS_Unlock_allocator(); 127fea: 58 pop %eax 127feb: ff 35 00 36 16 00 pushl 0x163600 127ff1: e8 8e 7c fe ff call 10fc84 <_API_Mutex_Unlock> 127ff6: b0 01 mov $0x1,%al return true; 127ff8: 83 c4 10 add $0x10,%esp 127ffb: eb 02 jmp 127fff <_Protected_heap_Get_information+0x3f> <== ALWAYS TAKEN 127ffd: 31 c0 xor %eax,%eax } 127fff: 8d 65 f8 lea -0x8(%ebp),%esp 128002: 5b pop %ebx 128003: 5e pop %esi 128004: c9 leave 128005: c3 ret 0010e208 <_RTEMS_Tasks_Invoke_task_variable_dtor>: void _RTEMS_Tasks_Invoke_task_variable_dtor( Thread_Control *the_thread, rtems_task_variable_t *tvp ) { 10e208: 55 push %ebp 10e209: 89 e5 mov %esp,%ebp 10e20b: 56 push %esi 10e20c: 53 push %ebx 10e20d: 8b 5d 0c mov 0xc(%ebp),%ebx void (*dtor)(void *); void *value; dtor = tvp->dtor; 10e210: 8b 43 10 mov 0x10(%ebx),%eax if (_Thread_Is_executing(the_thread)) { 10e213: 8b 55 08 mov 0x8(%ebp),%edx 10e216: 3b 15 30 39 12 00 cmp 0x123930,%edx 10e21c: 75 0c jne 10e22a <_RTEMS_Tasks_Invoke_task_variable_dtor+0x22> value = *tvp->ptr; 10e21e: 8b 4b 04 mov 0x4(%ebx),%ecx 10e221: 8b 11 mov (%ecx),%edx *tvp->ptr = tvp->gval; 10e223: 8b 73 08 mov 0x8(%ebx),%esi 10e226: 89 31 mov %esi,(%ecx) 10e228: eb 03 jmp 10e22d <_RTEMS_Tasks_Invoke_task_variable_dtor+0x25> <== ALWAYS TAKEN } else { value = tvp->tval; 10e22a: 8b 53 0c mov 0xc(%ebx),%edx } if ( dtor ) 10e22d: 85 c0 test %eax,%eax 10e22f: 74 09 je 10e23a <_RTEMS_Tasks_Invoke_task_variable_dtor+0x32> (*dtor)(value); 10e231: 83 ec 0c sub $0xc,%esp 10e234: 52 push %edx 10e235: ff d0 call *%eax 10e237: 83 c4 10 add $0x10,%esp _Workspace_Free(tvp); 10e23a: 89 5d 08 mov %ebx,0x8(%ebp) } 10e23d: 8d 65 f8 lea -0x8(%ebp),%esp 10e240: 5b pop %ebx 10e241: 5e pop %esi 10e242: c9 leave } if ( dtor ) (*dtor)(value); _Workspace_Free(tvp); 10e243: e9 5d e8 ff ff jmp 10caa5 <_Workspace_Free> 0010e0dd <_RTEMS_tasks_Delete_extension>: void _RTEMS_tasks_Delete_extension( Thread_Control *executing, Thread_Control *deleted ) { 10e0dd: 55 push %ebp 10e0de: 89 e5 mov %esp,%ebp 10e0e0: 56 push %esi 10e0e1: 53 push %ebx 10e0e2: 8b 5d 0c mov 0xc(%ebp),%ebx /* * Free per task variable memory */ tvp = deleted->task_variables; 10e0e5: 8b 83 00 01 00 00 mov 0x100(%ebx),%eax deleted->task_variables = NULL; 10e0eb: c7 83 00 01 00 00 00 movl $0x0,0x100(%ebx) 10e0f2: 00 00 00 while (tvp) { 10e0f5: eb 10 jmp 10e107 <_RTEMS_tasks_Delete_extension+0x2a> <== ALWAYS TAKEN next = (rtems_task_variable_t *)tvp->next; 10e0f7: 8b 30 mov (%eax),%esi _RTEMS_Tasks_Invoke_task_variable_dtor( deleted, tvp ); 10e0f9: 52 push %edx 10e0fa: 52 push %edx 10e0fb: 50 push %eax 10e0fc: 53 push %ebx 10e0fd: e8 06 01 00 00 call 10e208 <_RTEMS_Tasks_Invoke_task_variable_dtor> 10e102: 89 f0 mov %esi,%eax 10e104: 83 c4 10 add $0x10,%esp * Free per task variable memory */ tvp = deleted->task_variables; deleted->task_variables = NULL; while (tvp) { 10e107: 85 c0 test %eax,%eax 10e109: 75 ec jne 10e0f7 <_RTEMS_tasks_Delete_extension+0x1a> /* * Free API specific memory */ (void) _Workspace_Free( deleted->API_Extensions[ THREAD_API_RTEMS ] ); 10e10b: 83 ec 0c sub $0xc,%esp 10e10e: ff b3 f0 00 00 00 pushl 0xf0(%ebx) 10e114: e8 8c e9 ff ff call 10caa5 <_Workspace_Free> deleted->API_Extensions[ THREAD_API_RTEMS ] = NULL; 10e119: c7 83 f0 00 00 00 00 movl $0x0,0xf0(%ebx) 10e120: 00 00 00 10e123: 83 c4 10 add $0x10,%esp } 10e126: 8d 65 f8 lea -0x8(%ebp),%esp 10e129: 5b pop %ebx 10e12a: 5e pop %esi 10e12b: c9 leave 10e12c: c3 ret 0010a2a0 <_RTEMS_tasks_Initialize_user_tasks_body>: * * Output parameters: NONE */ void _RTEMS_tasks_Initialize_user_tasks_body( void ) { 10a2a0: 55 push %ebp 10a2a1: 89 e5 mov %esp,%ebp 10a2a3: 57 push %edi 10a2a4: 56 push %esi 10a2a5: 53 push %ebx 10a2a6: 83 ec 2c sub $0x2c,%esp rtems_initialization_tasks_table *user_tasks; /* * Move information into local variables */ user_tasks = Configuration_RTEMS_API.User_initialization_tasks_table; 10a2a9: 8b 1d 0c f9 11 00 mov 0x11f90c,%ebx maximum = Configuration_RTEMS_API.number_of_initialization_tasks; 10a2af: a1 08 f9 11 00 mov 0x11f908,%eax 10a2b4: 89 45 d4 mov %eax,-0x2c(%ebp) /* * Verify that we have a set of user tasks to iterate */ if ( !user_tasks ) 10a2b7: 85 db test %ebx,%ebx 10a2b9: 74 4e je 10a309 <_RTEMS_tasks_Initialize_user_tasks_body+0x69> 10a2bb: 31 f6 xor %esi,%esi /* * Now iterate over the initialization tasks and create/start them. */ for ( index=0 ; index < maximum ; index++ ) { return_value = rtems_task_create( 10a2bd: 8d 7d e4 lea -0x1c(%ebp),%edi 10a2c0: eb 42 jmp 10a304 <_RTEMS_tasks_Initialize_user_tasks_body+0x64> <== ALWAYS TAKEN 10a2c2: 50 push %eax 10a2c3: 50 push %eax 10a2c4: 57 push %edi 10a2c5: ff 73 0c pushl 0xc(%ebx) 10a2c8: ff 73 14 pushl 0x14(%ebx) 10a2cb: ff 73 04 pushl 0x4(%ebx) 10a2ce: ff 73 08 pushl 0x8(%ebx) 10a2d1: ff 33 pushl (%ebx) 10a2d3: e8 d0 fd ff ff call 10a0a8 <== ALWAYS TAKEN user_tasks[ index ].stack_size, user_tasks[ index ].mode_set, user_tasks[ index ].attribute_set, &id ); if ( !rtems_is_status_successful( return_value ) ) 10a2d8: 83 c4 20 add $0x20,%esp 10a2db: 85 c0 test %eax,%eax 10a2dd: 75 19 jne 10a2f8 <_RTEMS_tasks_Initialize_user_tasks_body+0x58> _Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value ); return_value = rtems_task_start( 10a2df: 51 push %ecx 10a2e0: ff 73 18 pushl 0x18(%ebx) 10a2e3: ff 73 10 pushl 0x10(%ebx) 10a2e6: ff 75 e4 pushl -0x1c(%ebp) 10a2e9: e8 26 00 00 00 call 10a314 <== ALWAYS TAKEN 10a2ee: 83 c3 1c add $0x1c,%ebx id, user_tasks[ index ].entry_point, user_tasks[ index ].argument ); if ( !rtems_is_status_successful( return_value ) ) 10a2f1: 83 c4 10 add $0x10,%esp 10a2f4: 85 c0 test %eax,%eax 10a2f6: 74 0b je 10a303 <_RTEMS_tasks_Initialize_user_tasks_body+0x63> _Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value ); 10a2f8: 52 push %edx 10a2f9: 50 push %eax 10a2fa: 6a 01 push $0x1 10a2fc: 6a 01 push $0x1 10a2fe: e8 a1 0b 00 00 call 10aea4 <_Internal_error_Occurred> <== ALWAYS TAKEN return; /* * Now iterate over the initialization tasks and create/start them. */ for ( index=0 ; index < maximum ; index++ ) { 10a303: 46 inc %esi 10a304: 3b 75 d4 cmp -0x2c(%ebp),%esi 10a307: 72 b9 jb 10a2c2 <_RTEMS_tasks_Initialize_user_tasks_body+0x22> user_tasks[ index ].argument ); if ( !rtems_is_status_successful( return_value ) ) _Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value ); } } 10a309: 8d 65 f4 lea -0xc(%ebp),%esp 10a30c: 5b pop %ebx 10a30d: 5e pop %esi 10a30e: 5f pop %edi 10a30f: c9 leave 10a310: c3 ret 0010e039 <_RTEMS_tasks_Manager_initialization>: * * Output parameters: NONE */ void _RTEMS_tasks_Manager_initialization(void) { 10e039: 55 push %ebp 10e03a: 89 e5 mov %esp,%ebp 10e03c: 83 ec 0c sub $0xc,%esp _Objects_Initialize_information( 10e03f: 6a 04 push $0x4 10e041: 6a 00 push $0x0 10e043: 68 04 01 00 00 push $0x104 10e048: ff 35 e0 f8 11 00 pushl 0x11f8e0 10e04e: 6a 01 push $0x1 10e050: 6a 02 push $0x2 10e052: 68 fc 37 12 00 push $0x1237fc 10e057: e8 4c d3 ff ff call 10b3a8 <_Objects_Initialize_information> RTEMS_INLINE_ROUTINE void _User_extensions_Add_API_set( User_extensions_Control *extension ) { _User_extensions_Add_set( extension ); 10e05c: 83 c4 14 add $0x14,%esp 10e05f: 68 94 16 12 00 push $0x121694 10e064: e8 93 0b 00 00 call 10ebfc <_User_extensions_Add_set> <== ALWAYS TAKEN * Add all the extensions for this API */ _User_extensions_Add_API_set( &_RTEMS_tasks_User_extensions ); _API_extensions_Add( &_RTEMS_tasks_API_extensions ); 10e069: c7 04 24 84 16 12 00 movl $0x121684,(%esp) 10e070: e8 e3 c5 ff ff call 10a658 <_API_extensions_Add> 10e075: 83 c4 10 add $0x10,%esp MP_PACKET_TASKS, _RTEMS_tasks_MP_Process_packet ); #endif } 10e078: c9 leave 10e079: c3 ret 0010e07a <_RTEMS_tasks_Post_switch_extension>: */ void _RTEMS_tasks_Post_switch_extension( Thread_Control *executing ) { 10e07a: 55 push %ebp 10e07b: 89 e5 mov %esp,%ebp 10e07d: 57 push %edi 10e07e: 56 push %esi 10e07f: 53 push %ebx 10e080: 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 ]; 10e083: 8b 45 08 mov 0x8(%ebp),%eax 10e086: 8b 98 f0 00 00 00 mov 0xf0(%eax),%ebx if ( !api ) 10e08c: 85 db test %ebx,%ebx 10e08e: 74 45 je 10e0d5 <_RTEMS_tasks_Post_switch_extension+0x5b> <== ALWAYS TAKEN * Signal Processing */ asr = &api->Signal; _ISR_Disable( level ); 10e090: 9c pushf 10e091: fa cli 10e092: 58 pop %eax signal_set = asr->signals_posted; 10e093: 8b 7b 14 mov 0x14(%ebx),%edi asr->signals_posted = 0; 10e096: c7 43 14 00 00 00 00 movl $0x0,0x14(%ebx) _ISR_Enable( level ); 10e09d: 50 push %eax 10e09e: 9d popf if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */ 10e09f: 85 ff test %edi,%edi 10e0a1: 74 32 je 10e0d5 <_RTEMS_tasks_Post_switch_extension+0x5b> <== ALWAYS TAKEN return; asr->nest_level += 1; 10e0a3: ff 43 1c incl 0x1c(%ebx) rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode ); 10e0a6: 50 push %eax 10e0a7: 8d 75 e4 lea -0x1c(%ebp),%esi 10e0aa: 56 push %esi 10e0ab: 68 ff ff 00 00 push $0xffff 10e0b0: ff 73 10 pushl 0x10(%ebx) 10e0b3: e8 4c 19 00 00 call 10fa04 (*asr->handler)( signal_set ); 10e0b8: 89 3c 24 mov %edi,(%esp) 10e0bb: ff 53 0c call *0xc(%ebx) asr->nest_level -= 1; 10e0be: ff 4b 1c decl 0x1c(%ebx) rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode ); 10e0c1: 83 c4 0c add $0xc,%esp 10e0c4: 56 push %esi 10e0c5: 68 ff ff 00 00 push $0xffff 10e0ca: ff 75 e4 pushl -0x1c(%ebp) 10e0cd: e8 32 19 00 00 call 10fa04 10e0d2: 83 c4 10 add $0x10,%esp } 10e0d5: 8d 65 f4 lea -0xc(%ebp),%esp 10e0d8: 5b pop %ebx 10e0d9: 5e pop %esi 10e0da: 5f pop %edi 10e0db: c9 leave 10e0dc: c3 ret 0010dfe4 <_RTEMS_tasks_Switch_extension>: void _RTEMS_tasks_Switch_extension( Thread_Control *executing, Thread_Control *heir ) { 10dfe4: 55 push %ebp 10dfe5: 89 e5 mov %esp,%ebp /* * Per Task Variables */ tvp = executing->task_variables; 10dfe7: 8b 45 08 mov 0x8(%ebp),%eax 10dfea: 8b 80 00 01 00 00 mov 0x100(%eax),%eax while (tvp) { 10dff0: eb 0f jmp 10e001 <_RTEMS_tasks_Switch_extension+0x1d> <== ALWAYS TAKEN tvp->tval = *tvp->ptr; 10dff2: 8b 50 04 mov 0x4(%eax),%edx 10dff5: 8b 0a mov (%edx),%ecx 10dff7: 89 48 0c mov %ecx,0xc(%eax) *tvp->ptr = tvp->gval; 10dffa: 8b 48 08 mov 0x8(%eax),%ecx 10dffd: 89 0a mov %ecx,(%edx) tvp = (rtems_task_variable_t *)tvp->next; 10dfff: 8b 00 mov (%eax),%eax /* * Per Task Variables */ tvp = executing->task_variables; while (tvp) { 10e001: 85 c0 test %eax,%eax 10e003: 75 ed jne 10dff2 <_RTEMS_tasks_Switch_extension+0xe> tvp->tval = *tvp->ptr; *tvp->ptr = tvp->gval; tvp = (rtems_task_variable_t *)tvp->next; } tvp = heir->task_variables; 10e005: 8b 45 0c mov 0xc(%ebp),%eax 10e008: 8b 80 00 01 00 00 mov 0x100(%eax),%eax while (tvp) { 10e00e: eb 0f jmp 10e01f <_RTEMS_tasks_Switch_extension+0x3b> <== ALWAYS TAKEN tvp->gval = *tvp->ptr; 10e010: 8b 50 04 mov 0x4(%eax),%edx 10e013: 8b 0a mov (%edx),%ecx 10e015: 89 48 08 mov %ecx,0x8(%eax) *tvp->ptr = tvp->tval; 10e018: 8b 48 0c mov 0xc(%eax),%ecx 10e01b: 89 0a mov %ecx,(%edx) tvp = (rtems_task_variable_t *)tvp->next; 10e01d: 8b 00 mov (%eax),%eax *tvp->ptr = tvp->gval; tvp = (rtems_task_variable_t *)tvp->next; } tvp = heir->task_variables; while (tvp) { 10e01f: 85 c0 test %eax,%eax 10e021: 75 ed jne 10e010 <_RTEMS_tasks_Switch_extension+0x2c> tvp->gval = *tvp->ptr; *tvp->ptr = tvp->tval; tvp = (rtems_task_variable_t *)tvp->next; } } 10e023: c9 leave 10e024: c3 ret 00134274 <_Rate_monotonic_Timeout>: void _Rate_monotonic_Timeout( Objects_Id id, void *ignored ) { 134274: 55 push %ebp 134275: 89 e5 mov %esp,%ebp 134277: 53 push %ebx 134278: 83 ec 18 sub $0x18,%esp 13427b: 8d 45 f4 lea -0xc(%ebp),%eax 13427e: 50 push %eax 13427f: ff 75 08 pushl 0x8(%ebp) 134282: 68 24 3a 16 00 push $0x163a24 134287: e8 b8 c9 fd ff call 110c44 <_Objects_Get> 13428c: 89 c3 mov %eax,%ebx /* * When we get here, the Timer is already off the chain so we do not * have to worry about that -- hence no _Watchdog_Remove(). */ the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 13428e: 83 c4 10 add $0x10,%esp 134291: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 134295: 75 64 jne 1342fb <_Rate_monotonic_Timeout+0x87> <== ALWAYS TAKEN case OBJECTS_LOCAL: the_thread = the_period->owner; 134297: 8b 40 40 mov 0x40(%eax),%eax if ( _States_Is_waiting_for_period( the_thread->current_state ) && 13429a: f6 40 11 40 testb $0x40,0x11(%eax) 13429e: 74 18 je 1342b8 <_Rate_monotonic_Timeout+0x44> the_thread->Wait.id == the_period->Object.id ) { 1342a0: 8b 50 20 mov 0x20(%eax),%edx 1342a3: 3b 53 08 cmp 0x8(%ebx),%edx 1342a6: 75 10 jne 1342b8 <_Rate_monotonic_Timeout+0x44> RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 1342a8: 52 push %edx 1342a9: 52 push %edx 1342aa: 68 f8 ff 03 10 push $0x1003fff8 1342af: 50 push %eax 1342b0: e8 87 ce fd ff call 11113c <_Thread_Clear_state> _Thread_Unblock( the_thread ); _Rate_monotonic_Initiate_statistics( the_period ); 1342b5: 59 pop %ecx 1342b6: eb 10 jmp 1342c8 <_Rate_monotonic_Timeout+0x54> <== ALWAYS TAKEN _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); } else if ( the_period->state == RATE_MONOTONIC_OWNER_IS_BLOCKING ) { 1342b8: 83 7b 38 01 cmpl $0x1,0x38(%ebx) 1342bc: 75 2b jne 1342e9 <_Rate_monotonic_Timeout+0x75> the_period->state = RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING; 1342be: c7 43 38 03 00 00 00 movl $0x3,0x38(%ebx) _Rate_monotonic_Initiate_statistics( the_period ); 1342c5: 83 ec 0c sub $0xc,%esp 1342c8: 53 push %ebx 1342c9: e8 52 fc ff ff call 133f20 <_Rate_monotonic_Initiate_statistics> <== ALWAYS TAKEN Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 1342ce: 8b 43 3c mov 0x3c(%ebx),%eax 1342d1: 89 43 1c mov %eax,0x1c(%ebx) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 1342d4: 58 pop %eax 1342d5: 5a pop %edx 1342d6: 83 c3 10 add $0x10,%ebx 1342d9: 53 push %ebx 1342da: 68 28 36 16 00 push $0x163628 1342df: e8 38 df fd ff call 11221c <_Watchdog_Insert> 1342e4: 83 c4 10 add $0x10,%esp 1342e7: eb 07 jmp 1342f0 <_Rate_monotonic_Timeout+0x7c> <== ALWAYS TAKEN _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); } else the_period->state = RATE_MONOTONIC_EXPIRED; 1342e9: 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; 1342f0: a1 4c 35 16 00 mov 0x16354c,%eax 1342f5: 48 dec %eax 1342f6: a3 4c 35 16 00 mov %eax,0x16354c case OBJECTS_REMOTE: /* impossible */ #endif case OBJECTS_ERROR: break; } } 1342fb: 8b 5d fc mov -0x4(%ebp),%ebx 1342fe: c9 leave 1342ff: c3 ret 0013401a <_Rate_monotonic_Update_statistics>: } void _Rate_monotonic_Update_statistics( Rate_monotonic_Control *the_period ) { 13401a: 55 push %ebp 13401b: 89 e5 mov %esp,%ebp 13401d: 56 push %esi 13401e: 53 push %ebx 13401f: 83 ec 10 sub $0x10,%esp 134022: 8b 5d 08 mov 0x8(%ebp),%ebx /* * Update the counts. */ stats = &the_period->Statistics; stats->count++; 134025: ff 43 54 incl 0x54(%ebx) if ( the_period->state == RATE_MONOTONIC_EXPIRED ) 134028: 83 7b 38 04 cmpl $0x4,0x38(%ebx) 13402c: 75 03 jne 134031 <_Rate_monotonic_Update_statistics+0x17> stats->missed_count++; 13402e: ff 43 58 incl 0x58(%ebx) /* * Grab status for time statistics. */ valid_status = _Rate_monotonic_Get_status( the_period, &since_last_period, &executed ); 134031: 52 push %edx 134032: 8d 75 f0 lea -0x10(%ebp),%esi 134035: 56 push %esi 134036: 8d 45 e8 lea -0x18(%ebp),%eax 134039: 50 push %eax 13403a: 53 push %ebx 13403b: e8 48 ff ff ff call 133f88 <_Rate_monotonic_Get_status> <== ALWAYS TAKEN if (!valid_status) 134040: 83 c4 10 add $0x10,%esp 134043: 84 c0 test %al,%al 134045: 0f 84 a3 00 00 00 je 1340ee <_Rate_monotonic_Update_statistics+0xd4> /* * Update CPU time */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_Add_to( &stats->total_cpu_time, &executed ); 13404b: 50 push %eax 13404c: 50 push %eax 13404d: 56 push %esi 13404e: 8d 43 6c lea 0x6c(%ebx),%eax 134051: 50 push %eax 134052: e8 31 df fd ff call 111f88 <_Timespec_Add_to> if ( _Timestamp_Less_than( &executed, &stats->min_cpu_time ) ) 134057: 5a pop %edx 134058: 59 pop %ecx 134059: 8d 43 5c lea 0x5c(%ebx),%eax 13405c: 50 push %eax 13405d: 56 push %esi 13405e: e8 41 05 00 00 call 1345a4 <_Timespec_Less_than> 134063: 83 c4 10 add $0x10,%esp 134066: 84 c0 test %al,%al 134068: 74 0c je 134076 <_Rate_monotonic_Update_statistics+0x5c> stats->min_cpu_time = executed; 13406a: 8b 45 f0 mov -0x10(%ebp),%eax 13406d: 8b 55 f4 mov -0xc(%ebp),%edx 134070: 89 43 5c mov %eax,0x5c(%ebx) 134073: 89 53 60 mov %edx,0x60(%ebx) if ( _Timestamp_Greater_than( &executed, &stats->max_cpu_time ) ) 134076: 50 push %eax 134077: 50 push %eax 134078: 8d 43 64 lea 0x64(%ebx),%eax 13407b: 50 push %eax 13407c: 8d 45 f0 lea -0x10(%ebp),%eax 13407f: 50 push %eax 134080: e8 fb 04 00 00 call 134580 <_Timespec_Greater_than> 134085: 83 c4 10 add $0x10,%esp 134088: 84 c0 test %al,%al 13408a: 74 0c je 134098 <_Rate_monotonic_Update_statistics+0x7e> stats->max_cpu_time = executed; 13408c: 8b 45 f0 mov -0x10(%ebp),%eax 13408f: 8b 55 f4 mov -0xc(%ebp),%edx 134092: 89 43 64 mov %eax,0x64(%ebx) 134095: 89 53 68 mov %edx,0x68(%ebx) /* * Update Wall time */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_Add_to( &stats->total_wall_time, &since_last_period ); 134098: 56 push %esi 134099: 56 push %esi 13409a: 8d 75 e8 lea -0x18(%ebp),%esi 13409d: 56 push %esi 13409e: 8d 83 84 00 00 00 lea 0x84(%ebx),%eax 1340a4: 50 push %eax 1340a5: e8 de de fd ff call 111f88 <_Timespec_Add_to> if ( _Timestamp_Less_than( &since_last_period, &stats->min_wall_time ) ) 1340aa: 5a pop %edx 1340ab: 59 pop %ecx 1340ac: 8d 43 74 lea 0x74(%ebx),%eax 1340af: 50 push %eax 1340b0: 56 push %esi 1340b1: e8 ee 04 00 00 call 1345a4 <_Timespec_Less_than> 1340b6: 83 c4 10 add $0x10,%esp 1340b9: 84 c0 test %al,%al 1340bb: 74 0c je 1340c9 <_Rate_monotonic_Update_statistics+0xaf> stats->min_wall_time = since_last_period; 1340bd: 8b 45 e8 mov -0x18(%ebp),%eax 1340c0: 8b 55 ec mov -0x14(%ebp),%edx 1340c3: 89 43 74 mov %eax,0x74(%ebx) 1340c6: 89 53 78 mov %edx,0x78(%ebx) if ( _Timestamp_Greater_than( &since_last_period, &stats->max_wall_time ) ) 1340c9: 50 push %eax 1340ca: 50 push %eax 1340cb: 8d 43 7c lea 0x7c(%ebx),%eax 1340ce: 50 push %eax 1340cf: 8d 45 e8 lea -0x18(%ebp),%eax 1340d2: 50 push %eax 1340d3: e8 a8 04 00 00 call 134580 <_Timespec_Greater_than> 1340d8: 83 c4 10 add $0x10,%esp 1340db: 84 c0 test %al,%al 1340dd: 74 0f je 1340ee <_Rate_monotonic_Update_statistics+0xd4> stats->max_wall_time = since_last_period; 1340df: 8b 45 e8 mov -0x18(%ebp),%eax 1340e2: 8b 55 ec mov -0x14(%ebp),%edx 1340e5: 89 43 7c mov %eax,0x7c(%ebx) 1340e8: 89 93 80 00 00 00 mov %edx,0x80(%ebx) stats->min_wall_time = since_last_period; if ( since_last_period > stats->max_wall_time ) stats->max_wall_time = since_last_period; #endif } 1340ee: 8d 65 f8 lea -0x8(%ebp),%esp 1340f1: 5b pop %ebx 1340f2: 5e pop %esi 1340f3: c9 leave 1340f4: c3 ret 0011b31c <_Region_Process_queue>: */ void _Region_Process_queue( Region_Control *the_region ) { 11b31c: 55 push %ebp 11b31d: 89 e5 mov %esp,%ebp 11b31f: 57 push %edi 11b320: 56 push %esi 11b321: 53 push %ebx 11b322: 83 ec 28 sub $0x28,%esp 11b325: 8b 75 08 mov 0x8(%ebp),%esi 11b328: a1 e8 ca 13 00 mov 0x13cae8,%eax 11b32d: 40 inc %eax 11b32e: a3 e8 ca 13 00 mov %eax,0x13cae8 * NOTE: Be sure to disable dispatching before unlocking the mutex * since we do not want to open a window where a context * switch could occur. */ _Thread_Disable_dispatch(); _RTEMS_Unlock_allocator(); 11b333: ff 35 9c cb 13 00 pushl 0x13cb9c 11b339: e8 82 b9 ff ff call 116cc0 <_API_Mutex_Unlock> /* * NOTE: The following loop is O(n) where n is the number of * threads whose memory request is satisfied. */ for ( ; ; ) { the_thread = _Thread_queue_First( &the_region->Wait_queue ); 11b33e: 8d 7e 10 lea 0x10(%esi),%edi RTEMS_INLINE_ROUTINE void *_Region_Allocate_segment ( Region_Control *the_region, uintptr_t size ) { return _Heap_Allocate( &the_region->Memory, size ); 11b341: 8d 46 68 lea 0x68(%esi),%eax 11b344: 89 45 e4 mov %eax,-0x1c(%ebp) 11b347: 89 3c 24 mov %edi,(%esp) 11b34a: e8 41 06 00 00 call 11b990 <_Thread_queue_First> <== ALWAYS TAKEN 11b34f: 89 c3 mov %eax,%ebx if ( the_thread == NULL ) 11b351: 83 c4 10 add $0x10,%esp 11b354: 85 c0 test %eax,%eax 11b356: 74 30 je 11b388 <_Region_Process_queue+0x6c> 11b358: 6a 00 push $0x0 11b35a: 6a 00 push $0x0 11b35c: ff 70 24 pushl 0x24(%eax) 11b35f: ff 75 e4 pushl -0x1c(%ebp) 11b362: e8 f5 c1 ff ff call 11755c <_Heap_Allocate_aligned_with_boundary> the_segment = (void **) _Region_Allocate_segment( the_region, the_thread->Wait.count ); if ( the_segment == NULL ) 11b367: 83 c4 10 add $0x10,%esp 11b36a: 85 c0 test %eax,%eax 11b36c: 74 1a je 11b388 <_Region_Process_queue+0x6c> break; *(void **)the_thread->Wait.return_argument = the_segment; 11b36e: 8b 53 28 mov 0x28(%ebx),%edx 11b371: 89 02 mov %eax,(%edx) the_region->number_of_used_blocks += 1; 11b373: ff 46 64 incl 0x64(%esi) _Thread_queue_Extract( &the_region->Wait_queue, the_thread ); 11b376: 50 push %eax 11b377: 50 push %eax 11b378: 53 push %ebx 11b379: 57 push %edi 11b37a: e8 29 05 00 00 call 11b8a8 <_Thread_queue_Extract> <== ALWAYS TAKEN the_thread->Wait.return_code = RTEMS_SUCCESSFUL; 11b37f: c7 43 34 00 00 00 00 movl $0x0,0x34(%ebx) 11b386: eb bf jmp 11b347 <_Region_Process_queue+0x2b> <== ALWAYS TAKEN } _Thread_Enable_dispatch(); } 11b388: 8d 65 f4 lea -0xc(%ebp),%esp 11b38b: 5b pop %ebx 11b38c: 5e pop %esi 11b38d: 5f pop %edi 11b38e: c9 leave *(void **)the_thread->Wait.return_argument = the_segment; the_region->number_of_used_blocks += 1; _Thread_queue_Extract( &the_region->Wait_queue, the_thread ); the_thread->Wait.return_code = RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 11b38f: e9 29 d7 ff ff jmp 118abd <_Thread_Enable_dispatch> 0010bf1c <_TOD_Set>: */ void _TOD_Set( const struct timespec *time ) { 10bf1c: 55 push %ebp 10bf1d: 89 e5 mov %esp,%ebp 10bf1f: 53 push %ebx 10bf20: 83 ec 04 sub $0x4,%esp 10bf23: 8b 5d 08 mov 0x8(%ebp),%ebx 10bf26: a1 78 e7 12 00 mov 0x12e778,%eax 10bf2b: 40 inc %eax 10bf2c: a3 78 e7 12 00 mov %eax,0x12e778 long seconds; _Thread_Disable_dispatch(); _TOD_Deactivate(); seconds = _TOD_Seconds_since_epoch(); 10bf31: a1 08 e8 12 00 mov 0x12e808,%eax if ( time->tv_sec < seconds ) 10bf36: 8b 13 mov (%ebx),%edx 10bf38: 39 c2 cmp %eax,%edx 10bf3a: 7d 08 jge 10bf44 <_TOD_Set+0x28> Watchdog_Adjust_directions direction, Watchdog_Interval units ) { _Watchdog_Adjust( &_Watchdog_Seconds_chain, direction, units ); 10bf3c: 51 push %ecx 10bf3d: 29 d0 sub %edx,%eax 10bf3f: 50 push %eax 10bf40: 6a 01 push $0x1 10bf42: eb 06 jmp 10bf4a <_TOD_Set+0x2e> <== ALWAYS TAKEN 10bf44: 51 push %ecx 10bf45: 29 c2 sub %eax,%edx 10bf47: 52 push %edx 10bf48: 6a 00 push $0x0 10bf4a: 68 48 e8 12 00 push $0x12e848 10bf4f: e8 f4 20 00 00 call 10e048 <_Watchdog_Adjust> 10bf54: 83 c4 10 add $0x10,%esp _Watchdog_Adjust_seconds( WATCHDOG_BACKWARD, seconds - time->tv_sec ); else _Watchdog_Adjust_seconds( WATCHDOG_FORWARD, time->tv_sec - seconds ); /* POSIX format TOD (timespec) */ _Timestamp_Set( &_TOD_Now, time->tv_sec, time->tv_nsec ); 10bf57: 8b 03 mov (%ebx),%eax 10bf59: a3 08 e8 12 00 mov %eax,0x12e808 10bf5e: 8b 43 04 mov 0x4(%ebx),%eax 10bf61: a3 0c e8 12 00 mov %eax,0x12e80c _TOD_Is_set = true; 10bf66: c6 05 8c e7 12 00 01 movb $0x1,0x12e78c _TOD_Activate(); _Thread_Enable_dispatch(); } 10bf6d: 8b 5d fc mov -0x4(%ebp),%ebx 10bf70: c9 leave _Timestamp_Set( &_TOD_Now, time->tv_sec, time->tv_nsec ); _TOD_Is_set = true; _TOD_Activate(); _Thread_Enable_dispatch(); 10bf71: e9 e3 10 00 00 jmp 10d059 <_Thread_Enable_dispatch> <== ALWAYS TAKEN 0010ab44 <_TOD_Tickle_ticks>: * * Output parameters: NONE */ void _TOD_Tickle_ticks( void ) { 10ab44: 55 push %ebp 10ab45: 89 e5 mov %esp,%ebp 10ab47: 53 push %ebx 10ab48: 83 ec 1c sub $0x1c,%esp Timestamp_Control tick; uint32_t seconds; /* Convert the tick quantum to a timestamp */ _Timestamp_Set( &tick, 0, rtems_configuration_get_nanoseconds_per_tick() ); 10ab4b: c7 45 f0 00 00 00 00 movl $0x0,-0x10(%ebp) 10ab52: 69 05 24 f9 11 00 e8 imul $0x3e8,0x11f924,%eax 10ab59: 03 00 00 10ab5c: 89 45 f4 mov %eax,-0xc(%ebp) /* Update the counter of ticks since boot */ _Watchdog_Ticks_since_boot += 1; 10ab5f: a1 c0 39 12 00 mov 0x1239c0,%eax 10ab64: 40 inc %eax 10ab65: a3 c0 39 12 00 mov %eax,0x1239c0 /* Update the timespec format uptime */ _Timestamp_Add_to( &_TOD_Uptime, &tick ); 10ab6a: 8d 5d f0 lea -0x10(%ebp),%ebx 10ab6d: 53 push %ebx 10ab6e: 68 f0 38 12 00 push $0x1238f0 10ab73: e8 6c 1a 00 00 call 10c5e4 <_Timespec_Add_to> /* we do not care how much the uptime changed */ /* Update the timespec format TOD */ seconds = _Timestamp_Add_to_at_tick( &_TOD_Now, &tick ); 10ab78: 58 pop %eax 10ab79: 5a pop %edx 10ab7a: 53 push %ebx 10ab7b: 68 04 39 12 00 push $0x123904 10ab80: e8 5f 1a 00 00 call 10c5e4 <_Timespec_Add_to> 10ab85: 89 c3 mov %eax,%ebx 10ab87: eb 0e jmp 10ab97 <_TOD_Tickle_ticks+0x53> <== ALWAYS TAKEN */ RTEMS_INLINE_ROUTINE void _Watchdog_Tickle_seconds( void ) { _Watchdog_Tickle( &_Watchdog_Seconds_chain ); 10ab89: 83 ec 0c sub $0xc,%esp 10ab8c: 68 44 39 12 00 push $0x123944 10ab91: e8 62 1e 00 00 call 10c9f8 <_Watchdog_Tickle> while ( seconds ) { _Watchdog_Tickle_seconds(); seconds--; 10ab96: 4b dec %ebx 10ab97: 83 c4 10 add $0x10,%esp _Timestamp_Add_to( &_TOD_Uptime, &tick ); /* we do not care how much the uptime changed */ /* Update the timespec format TOD */ seconds = _Timestamp_Add_to_at_tick( &_TOD_Now, &tick ); while ( seconds ) { 10ab9a: 85 db test %ebx,%ebx 10ab9c: 75 eb jne 10ab89 <_TOD_Tickle_ticks+0x45> _Watchdog_Tickle_seconds(); seconds--; } } 10ab9e: 8b 5d fc mov -0x4(%ebp),%ebx 10aba1: c9 leave 10aba2: c3 ret 0010a978 <_TOD_To_seconds>: */ uint32_t _TOD_To_seconds( const rtems_time_of_day *the_tod ) { 10a978: 55 push %ebp 10a979: 89 e5 mov %esp,%ebp 10a97b: 56 push %esi 10a97c: 53 push %ebx 10a97d: 8b 45 08 mov 0x8(%ebp),%eax uint32_t time; uint32_t year_mod_4; time = the_tod->day - 1; 10a980: 8b 58 08 mov 0x8(%eax),%ebx 10a983: 4b dec %ebx year_mod_4 = the_tod->year & 3; 10a984: 8b 08 mov (%eax),%ecx if ( year_mod_4 == 0 ) 10a986: 89 ce mov %ecx,%esi 10a988: 83 e6 03 and $0x3,%esi 10a98b: 8b 50 04 mov 0x4(%eax),%edx 10a98e: 75 0a jne 10a99a <_TOD_To_seconds+0x22> time += _TOD_Days_to_date[ 1 ][ the_tod->month ]; 10a990: 0f b7 94 12 ce fc 11 movzwl 0x11fcce(%edx,%edx,1),%edx 10a997: 00 10a998: eb 08 jmp 10a9a2 <_TOD_To_seconds+0x2a> <== ALWAYS TAKEN else time += _TOD_Days_to_date[ 0 ][ the_tod->month ]; 10a99a: 0f b7 94 12 b4 fc 11 movzwl 0x11fcb4(%edx,%edx,1),%edx 10a9a1: 00 10a9a2: 8d 1c 1a lea (%edx,%ebx,1),%ebx time += ( (the_tod->year - TOD_BASE_YEAR) / 4 ) * 10a9a5: 0f b7 94 36 e8 fc 11 movzwl 0x11fce8(%esi,%esi,1),%edx 10a9ac: 00 10a9ad: 81 e9 c4 07 00 00 sub $0x7c4,%ecx 10a9b3: c1 e9 02 shr $0x2,%ecx 10a9b6: 69 c9 b5 05 00 00 imul $0x5b5,%ecx,%ecx 10a9bc: 01 ca add %ecx,%edx ( (TOD_DAYS_PER_YEAR * 4) + 1); time += _TOD_Days_since_last_leap_year[ year_mod_4 ]; 10a9be: 01 da add %ebx,%edx time *= TOD_SECONDS_PER_DAY; 10a9c0: 69 d2 80 51 01 00 imul $0x15180,%edx,%edx time += ((the_tod->hour * TOD_MINUTES_PER_HOUR) + the_tod->minute) * TOD_SECONDS_PER_MINUTE; time += the_tod->second; 10a9c6: 6b 48 0c 3c imul $0x3c,0xc(%eax),%ecx 10a9ca: 03 48 10 add 0x10(%eax),%ecx 10a9cd: 6b c9 3c imul $0x3c,%ecx,%ecx 10a9d0: 03 50 14 add 0x14(%eax),%edx 10a9d3: 8d 84 0a 00 e5 da 21 lea 0x21dae500(%edx,%ecx,1),%eax time += TOD_SECONDS_1970_THROUGH_1988; return( time ); } 10a9da: 5b pop %ebx 10a9db: 5e pop %esi 10a9dc: c9 leave 10a9dd: c3 ret 0010a9e0 <_TOD_Validate>: */ bool _TOD_Validate( const rtems_time_of_day *the_tod ) { 10a9e0: 55 push %ebp 10a9e1: 89 e5 mov %esp,%ebp 10a9e3: 53 push %ebx 10a9e4: 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(); 10a9e7: 8b 1d 24 2a 12 00 mov 0x122a24,%ebx if ((!the_tod) || 10a9ed: 85 c9 test %ecx,%ecx 10a9ef: 74 59 je 10aa4a <_TOD_Validate+0x6a> <== ALWAYS TAKEN (the_tod->ticks >= ticks_per_second) || 10a9f1: b8 40 42 0f 00 mov $0xf4240,%eax 10a9f6: 31 d2 xor %edx,%edx 10a9f8: f7 f3 div %ebx 10a9fa: 39 41 18 cmp %eax,0x18(%ecx) 10a9fd: 73 4b jae 10aa4a <_TOD_Validate+0x6a> (the_tod->second >= TOD_SECONDS_PER_MINUTE) || 10a9ff: 83 79 14 3b cmpl $0x3b,0x14(%ecx) 10aa03: 77 45 ja 10aa4a <_TOD_Validate+0x6a> (the_tod->minute >= TOD_MINUTES_PER_HOUR) || 10aa05: 83 79 10 3b cmpl $0x3b,0x10(%ecx) 10aa09: 77 3f ja 10aa4a <_TOD_Validate+0x6a> (the_tod->hour >= TOD_HOURS_PER_DAY) || 10aa0b: 83 79 0c 17 cmpl $0x17,0xc(%ecx) 10aa0f: 77 39 ja 10aa4a <_TOD_Validate+0x6a> (the_tod->month == 0) || 10aa11: 8b 41 04 mov 0x4(%ecx),%eax uint32_t days_in_month; uint32_t ticks_per_second; ticks_per_second = TOD_MICROSECONDS_PER_SECOND / rtems_configuration_get_microseconds_per_tick(); if ((!the_tod) || 10aa14: 85 c0 test %eax,%eax 10aa16: 74 32 je 10aa4a <_TOD_Validate+0x6a> <== ALWAYS TAKEN 10aa18: 83 f8 0c cmp $0xc,%eax 10aa1b: 77 2d ja 10aa4a <_TOD_Validate+0x6a> (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) || 10aa1d: 8b 19 mov (%ecx),%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) || 10aa1f: 81 fb c3 07 00 00 cmp $0x7c3,%ebx 10aa25: 76 23 jbe 10aa4a <_TOD_Validate+0x6a> (the_tod->minute >= TOD_MINUTES_PER_HOUR) || (the_tod->hour >= TOD_HOURS_PER_DAY) || (the_tod->month == 0) || (the_tod->month > TOD_MONTHS_PER_YEAR) || (the_tod->year < TOD_BASE_YEAR) || (the_tod->day == 0) ) 10aa27: 8b 51 08 mov 0x8(%ecx),%edx uint32_t days_in_month; uint32_t ticks_per_second; ticks_per_second = TOD_MICROSECONDS_PER_SECOND / rtems_configuration_get_microseconds_per_tick(); if ((!the_tod) || 10aa2a: 85 d2 test %edx,%edx 10aa2c: 74 1c je 10aa4a <_TOD_Validate+0x6a> <== ALWAYS TAKEN (the_tod->month > TOD_MONTHS_PER_YEAR) || (the_tod->year < TOD_BASE_YEAR) || (the_tod->day == 0) ) return false; if ( (the_tod->year % 4) == 0 ) 10aa2e: 80 e3 03 and $0x3,%bl 10aa31: 75 09 jne 10aa3c <_TOD_Validate+0x5c> days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ]; 10aa33: 8b 04 85 24 fd 11 00 mov 0x11fd24(,%eax,4),%eax 10aa3a: eb 07 jmp 10aa43 <_TOD_Validate+0x63> <== ALWAYS TAKEN else days_in_month = _TOD_Days_per_month[ 0 ][ the_tod->month ]; 10aa3c: 8b 04 85 f0 fc 11 00 mov 0x11fcf0(,%eax,4),%eax * false - if the the_tod is invalid * * NOTE: This routine only works for leap-years through 2099. */ bool _TOD_Validate( 10aa43: 39 c2 cmp %eax,%edx 10aa45: 0f 96 c0 setbe %al 10aa48: eb 02 jmp 10aa4c <_TOD_Validate+0x6c> <== ALWAYS TAKEN 10aa4a: 31 c0 xor %eax,%eax if ( the_tod->day > days_in_month ) return false; return true; } 10aa4c: 5b pop %ebx 10aa4d: c9 leave 10aa4e: c3 ret 0010b678 <_Thread_Change_priority>: void _Thread_Change_priority( Thread_Control *the_thread, Priority_Control new_priority, bool prepend_it ) { 10b678: 55 push %ebp 10b679: 89 e5 mov %esp,%ebp 10b67b: 57 push %edi 10b67c: 56 push %esi 10b67d: 53 push %ebx 10b67e: 83 ec 28 sub $0x28,%esp 10b681: 8b 5d 08 mov 0x8(%ebp),%ebx 10b684: 8b 7d 0c mov 0xc(%ebp),%edi 10b687: 8a 45 10 mov 0x10(%ebp),%al 10b68a: 88 45 e7 mov %al,-0x19(%ebp) */ /* * Save original state */ original_state = the_thread->current_state; 10b68d: 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 ); 10b690: 53 push %ebx 10b691: e8 12 0d 00 00 call 10c3a8 <_Thread_Set_transient> <== ALWAYS TAKEN /* * Do not bother recomputing all the priority related information if * we are not REALLY changing priority. */ if ( the_thread->current_priority != new_priority ) 10b696: 83 c4 10 add $0x10,%esp 10b699: 39 7b 14 cmp %edi,0x14(%ebx) 10b69c: 74 0c je 10b6aa <_Thread_Change_priority+0x32> _Thread_Set_priority( the_thread, new_priority ); 10b69e: 50 push %eax 10b69f: 50 push %eax 10b6a0: 57 push %edi 10b6a1: 53 push %ebx 10b6a2: e8 c9 0b 00 00 call 10c270 <_Thread_Set_priority> <== ALWAYS TAKEN 10b6a7: 83 c4 10 add $0x10,%esp _ISR_Disable( level ); 10b6aa: 9c pushf 10b6ab: fa cli 10b6ac: 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; 10b6ad: 8b 43 10 mov 0x10(%ebx),%eax if ( state != STATES_TRANSIENT ) { 10b6b0: 83 f8 04 cmp $0x4,%eax 10b6b3: 74 2f je 10b6e4 <_Thread_Change_priority+0x6c> /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) 10b6b5: 83 e6 04 and $0x4,%esi 10b6b8: 75 08 jne 10b6c2 <_Thread_Change_priority+0x4a> <== ALWAYS TAKEN the_thread->current_state = _States_Clear( STATES_TRANSIENT, state ); 10b6ba: 89 c2 mov %eax,%edx 10b6bc: 83 e2 fb and $0xfffffffb,%edx 10b6bf: 89 53 10 mov %edx,0x10(%ebx) _ISR_Enable( level ); 10b6c2: 51 push %ecx 10b6c3: 9d popf if ( _States_Is_waiting_on_thread_queue( state ) ) { 10b6c4: a9 e0 be 03 00 test $0x3bee0,%eax 10b6c9: 0f 84 c0 00 00 00 je 10b78f <_Thread_Change_priority+0x117> _Thread_queue_Requeue( the_thread->Wait.queue, the_thread ); 10b6cf: 89 5d 0c mov %ebx,0xc(%ebp) 10b6d2: 8b 43 44 mov 0x44(%ebx),%eax 10b6d5: 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 ); } 10b6d8: 8d 65 f4 lea -0xc(%ebp),%esp 10b6db: 5b pop %ebx 10b6dc: 5e pop %esi 10b6dd: 5f pop %edi 10b6de: 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 ); 10b6df: e9 04 0b 00 00 jmp 10c1e8 <_Thread_queue_Requeue> <== ALWAYS TAKEN } return; } /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) { 10b6e4: 83 e6 04 and $0x4,%esi 10b6e7: 75 53 jne 10b73c <_Thread_Change_priority+0xc4> <== ALWAYS 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 ); 10b6e9: 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; 10b6f0: 8b 83 90 00 00 00 mov 0x90(%ebx),%eax 10b6f6: 66 8b 93 96 00 00 00 mov 0x96(%ebx),%dx 10b6fd: 66 09 10 or %dx,(%eax) _Priority_Major_bit_map |= the_priority_map->ready_major; 10b700: 66 a1 24 39 12 00 mov 0x123924,%ax 10b706: 0b 83 94 00 00 00 or 0x94(%ebx),%eax 10b70c: 66 a3 24 39 12 00 mov %ax,0x123924 _Priority_Add_to_bit_map( &the_thread->Priority_map ); if ( prepend_it ) 10b712: 80 7d e7 00 cmpb $0x0,-0x19(%ebp) 10b716: 8b 83 8c 00 00 00 mov 0x8c(%ebx),%eax 10b71c: 74 0e je 10b72c <_Thread_Change_priority+0xb4> Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 10b71e: 89 43 04 mov %eax,0x4(%ebx) before_node = after_node->next; 10b721: 8b 10 mov (%eax),%edx after_node->next = the_node; 10b723: 89 18 mov %ebx,(%eax) the_node->next = before_node; 10b725: 89 13 mov %edx,(%ebx) before_node->previous = the_node; 10b727: 89 5a 04 mov %ebx,0x4(%edx) 10b72a: eb 10 jmp 10b73c <_Thread_Change_priority+0xc4> <== ALWAYS TAKEN Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 10b72c: 8d 50 04 lea 0x4(%eax),%edx 10b72f: 89 13 mov %edx,(%ebx) old_last_node = the_chain->last; 10b731: 8b 50 08 mov 0x8(%eax),%edx the_chain->last = the_node; 10b734: 89 58 08 mov %ebx,0x8(%eax) old_last_node->next = the_node; 10b737: 89 1a mov %ebx,(%edx) the_node->previous = old_last_node; 10b739: 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 ); 10b73c: 51 push %ecx 10b73d: 9d popf 10b73e: 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 ); 10b73f: 66 8b 1d 24 39 12 00 mov 0x123924,%bx 10b746: 31 c0 xor %eax,%eax 10b748: 89 c2 mov %eax,%edx 10b74a: 66 0f bc d3 bsf %bx,%dx _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); 10b74e: 0f b7 d2 movzwl %dx,%edx 10b751: 66 8b 9c 12 9c 39 12 mov 0x12399c(%edx,%edx,1),%bx 10b758: 00 10b759: 66 0f bc c3 bsf %bx,%ax * ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) 10b75d: c1 e2 04 shl $0x4,%edx 10b760: 0f b7 c0 movzwl %ax,%eax 10b763: 01 c2 add %eax,%edx 10b765: 6b d2 0c imul $0xc,%edx,%edx 10b768: 8b 1d 3c 38 12 00 mov 0x12383c,%ebx 10b76e: 8b 14 1a mov (%edx,%ebx,1),%edx 10b771: 89 15 00 39 12 00 mov %edx,0x123900 * is also the heir thread, and false otherwise. */ RTEMS_INLINE_ROUTINE bool _Thread_Is_executing_also_the_heir( void ) { return ( _Thread_Executing == _Thread_Heir ); 10b777: a1 30 39 12 00 mov 0x123930,%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() && 10b77c: 39 d0 cmp %edx,%eax 10b77e: 74 0d je 10b78d <_Thread_Change_priority+0x115> _Thread_Executing->is_preemptible ) 10b780: 80 78 75 00 cmpb $0x0,0x75(%eax) 10b784: 74 07 je 10b78d <_Thread_Change_priority+0x115> _Context_Switch_necessary = true; 10b786: c6 05 40 39 12 00 01 movb $0x1,0x123940 _ISR_Enable( level ); 10b78d: 51 push %ecx 10b78e: 9d popf } 10b78f: 8d 65 f4 lea -0xc(%ebp),%esp 10b792: 5b pop %ebx 10b793: 5e pop %esi 10b794: 5f pop %edi 10b795: c9 leave 10b796: c3 ret 0010b798 <_Thread_Clear_state>: void _Thread_Clear_state( Thread_Control *the_thread, States_Control state ) { 10b798: 55 push %ebp 10b799: 89 e5 mov %esp,%ebp 10b79b: 53 push %ebx 10b79c: 8b 45 08 mov 0x8(%ebp),%eax 10b79f: 8b 55 0c mov 0xc(%ebp),%edx ISR_Level level; States_Control current_state; _ISR_Disable( level ); 10b7a2: 9c pushf 10b7a3: fa cli 10b7a4: 59 pop %ecx current_state = the_thread->current_state; 10b7a5: 8b 58 10 mov 0x10(%eax),%ebx if ( current_state & state ) { 10b7a8: 85 da test %ebx,%edx 10b7aa: 74 71 je 10b81d <_Thread_Clear_state+0x85> RTEMS_INLINE_ROUTINE States_Control _States_Clear ( States_Control states_to_clear, States_Control current_state ) { return (current_state & ~states_to_clear); 10b7ac: f7 d2 not %edx 10b7ae: 21 da and %ebx,%edx current_state = 10b7b0: 89 50 10 mov %edx,0x10(%eax) the_thread->current_state = _States_Clear( state, current_state ); if ( _States_Is_ready( current_state ) ) { 10b7b3: 85 d2 test %edx,%edx 10b7b5: 75 66 jne 10b81d <_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; 10b7b7: 8b 90 90 00 00 00 mov 0x90(%eax),%edx 10b7bd: 66 8b 98 96 00 00 00 mov 0x96(%eax),%bx 10b7c4: 66 09 1a or %bx,(%edx) _Priority_Major_bit_map |= the_priority_map->ready_major; 10b7c7: 66 8b 15 24 39 12 00 mov 0x123924,%dx 10b7ce: 0b 90 94 00 00 00 or 0x94(%eax),%edx 10b7d4: 66 89 15 24 39 12 00 mov %dx,0x123924 _Priority_Add_to_bit_map( &the_thread->Priority_map ); _Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node); 10b7db: 8b 90 8c 00 00 00 mov 0x8c(%eax),%edx Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 10b7e1: 8d 5a 04 lea 0x4(%edx),%ebx 10b7e4: 89 18 mov %ebx,(%eax) old_last_node = the_chain->last; 10b7e6: 8b 5a 08 mov 0x8(%edx),%ebx the_chain->last = the_node; 10b7e9: 89 42 08 mov %eax,0x8(%edx) old_last_node->next = the_node; 10b7ec: 89 03 mov %eax,(%ebx) the_node->previous = old_last_node; 10b7ee: 89 58 04 mov %ebx,0x4(%eax) _ISR_Flash( level ); 10b7f1: 51 push %ecx 10b7f2: 9d popf 10b7f3: 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 ) { 10b7f4: 8b 50 14 mov 0x14(%eax),%edx 10b7f7: 8b 1d 00 39 12 00 mov 0x123900,%ebx 10b7fd: 3b 53 14 cmp 0x14(%ebx),%edx 10b800: 73 1b jae 10b81d <_Thread_Clear_state+0x85> _Thread_Heir = the_thread; 10b802: a3 00 39 12 00 mov %eax,0x123900 if ( _Thread_Executing->is_preemptible || 10b807: a1 30 39 12 00 mov 0x123930,%eax 10b80c: 80 78 75 00 cmpb $0x0,0x75(%eax) 10b810: 75 04 jne 10b816 <_Thread_Clear_state+0x7e> 10b812: 85 d2 test %edx,%edx 10b814: 75 07 jne 10b81d <_Thread_Clear_state+0x85> <== NEVER TAKEN the_thread->current_priority == 0 ) _Context_Switch_necessary = true; 10b816: c6 05 40 39 12 00 01 movb $0x1,0x123940 } } } _ISR_Enable( level ); 10b81d: 51 push %ecx 10b81e: 9d popf } 10b81f: 5b pop %ebx 10b820: c9 leave 10b821: c3 ret 0010b824 <_Thread_Close>: void _Thread_Close( Objects_Information *information, Thread_Control *the_thread ) { 10b824: 55 push %ebp 10b825: 89 e5 mov %esp,%ebp 10b827: 56 push %esi 10b828: 53 push %ebx 10b829: 8b 75 08 mov 0x8(%ebp),%esi 10b82c: 8b 5d 0c mov 0xc(%ebp),%ebx 10b82f: 0f b7 53 08 movzwl 0x8(%ebx),%edx 10b833: 8b 46 1c mov 0x1c(%esi),%eax 10b836: c7 04 90 00 00 00 00 movl $0x0,(%eax,%edx,4) */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 10b83d: a1 74 38 12 00 mov 0x123874,%eax 10b842: 48 dec %eax 10b843: a3 74 38 12 00 mov %eax,0x123874 * disappear and set a transient state on it. So we temporarily * unnest dispatching. */ _Thread_Unnest_dispatch(); _User_extensions_Thread_delete( the_thread ); 10b848: 83 ec 0c sub $0xc,%esp 10b84b: 53 push %ebx 10b84c: e8 83 0f 00 00 call 10c7d4 <_User_extensions_Thread_delete> <== ALWAYS TAKEN rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10b851: a1 74 38 12 00 mov 0x123874,%eax 10b856: 40 inc %eax 10b857: a3 74 38 12 00 mov %eax,0x123874 /* * Now we are in a dispatching critical section again and we * can take the thread OUT of the published set. It is invalid * to use this thread's Id OR name after this call. */ _Objects_Close( information, &the_thread->Object ); 10b85c: 59 pop %ecx 10b85d: 58 pop %eax 10b85e: 53 push %ebx 10b85f: 56 push %esi 10b860: e8 43 f7 ff ff call 10afa8 <_Objects_Close> <== ALWAYS TAKEN /* * By setting the dormant state, the thread will not be considered * for scheduling when we remove any blocking states. */ _Thread_Set_state( the_thread, STATES_DORMANT ); 10b865: 58 pop %eax 10b866: 5a pop %edx 10b867: 6a 01 push $0x1 10b869: 53 push %ebx 10b86a: e8 69 0a 00 00 call 10c2d8 <_Thread_Set_state> <== ALWAYS TAKEN if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) { 10b86f: 89 1c 24 mov %ebx,(%esp) 10b872: e8 d1 08 00 00 call 10c148 <_Thread_queue_Extract_with_proxy> <== ALWAYS TAKEN 10b877: 83 c4 10 add $0x10,%esp 10b87a: 84 c0 test %al,%al 10b87c: 75 15 jne 10b893 <_Thread_Close+0x6f> if ( _Watchdog_Is_active( &the_thread->Timer ) ) 10b87e: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 10b882: 75 0f jne 10b893 <_Thread_Close+0x6f> (void) _Watchdog_Remove( &the_thread->Timer ); 10b884: 83 ec 0c sub $0xc,%esp 10b887: 8d 43 48 lea 0x48(%ebx),%eax 10b88a: 50 push %eax 10b88b: e8 00 11 00 00 call 10c990 <_Watchdog_Remove> 10b890: 83 c4 10 add $0x10,%esp /* * The thread might have been FP. So deal with that. */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( _Thread_Is_allocated_fp( the_thread ) ) 10b893: 3b 1d f8 38 12 00 cmp 0x1238f8,%ebx 10b899: 75 0a jne 10b8a5 <_Thread_Close+0x81> */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Deallocate_fp( void ) { _Thread_Allocated_fp = NULL; 10b89b: c7 05 f8 38 12 00 00 movl $0x0,0x1238f8 10b8a2: 00 00 00 _Thread_Deallocate_fp(); #endif the_thread->fp_context = NULL; 10b8a5: c7 83 e8 00 00 00 00 movl $0x0,0xe8(%ebx) 10b8ac: 00 00 00 if ( the_thread->Start.fp_context ) 10b8af: 8b 83 c8 00 00 00 mov 0xc8(%ebx),%eax 10b8b5: 85 c0 test %eax,%eax 10b8b7: 74 0c je 10b8c5 <_Thread_Close+0xa1> (void) _Workspace_Free( the_thread->Start.fp_context ); 10b8b9: 83 ec 0c sub $0xc,%esp 10b8bc: 50 push %eax 10b8bd: e8 e3 11 00 00 call 10caa5 <_Workspace_Free> 10b8c2: 83 c4 10 add $0x10,%esp /* * Free the rest of the memory associated with this task * and set the associated pointers to NULL for safety. */ _Thread_Stack_Free( the_thread ); 10b8c5: 83 ec 0c sub $0xc,%esp 10b8c8: 53 push %ebx 10b8c9: e8 9e 0b 00 00 call 10c46c <_Thread_Stack_Free> <== ALWAYS TAKEN the_thread->Start.stack = NULL; 10b8ce: c7 83 cc 00 00 00 00 movl $0x0,0xcc(%ebx) 10b8d5: 00 00 00 if ( the_thread->extensions ) 10b8d8: 8b 83 fc 00 00 00 mov 0xfc(%ebx),%eax 10b8de: 83 c4 10 add $0x10,%esp 10b8e1: 85 c0 test %eax,%eax 10b8e3: 74 0c je 10b8f1 <_Thread_Close+0xcd> (void) _Workspace_Free( the_thread->extensions ); 10b8e5: 83 ec 0c sub $0xc,%esp 10b8e8: 50 push %eax 10b8e9: e8 b7 11 00 00 call 10caa5 <_Workspace_Free> 10b8ee: 83 c4 10 add $0x10,%esp the_thread->extensions = NULL; 10b8f1: c7 83 fc 00 00 00 00 movl $0x0,0xfc(%ebx) 10b8f8: 00 00 00 } 10b8fb: 8d 65 f8 lea -0x8(%ebp),%esp 10b8fe: 5b pop %ebx 10b8ff: 5e pop %esi 10b900: c9 leave 10b901: c3 ret 0010b904 <_Thread_Create_idle>: * * _Thread_Create_idle */ void _Thread_Create_idle( void ) { 10b904: 55 push %ebp 10b905: 89 e5 mov %esp,%ebp 10b907: 83 ec 14 sub $0x14,%esp * This routine allocates an internal thread. */ RTEMS_INLINE_ROUTINE Thread_Control *_Thread_Internal_allocate( void ) { return (Thread_Control *) _Objects_Allocate( &_Thread_Internal_information ); 10b90a: 68 cc 39 12 00 push $0x1239cc 10b90f: e8 28 f6 ff ff call 10af3c <_Objects_Allocate> <== ALWAYS TAKEN /* * The entire workspace is zeroed during its initialization. Thus, all * fields not explicitly assigned were explicitly zeroed by * _Workspace_Initialization. */ _Thread_Idle = _Thread_Internal_allocate(); 10b914: a3 14 3a 12 00 mov %eax,0x123a14 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10b919: a1 74 38 12 00 mov 0x123874,%eax 10b91e: 40 inc %eax 10b91f: a3 74 38 12 00 mov %eax,0x123874 * that when _Thread_Initialize unnests dispatch that we do not * do anything stupid. */ _Thread_Disable_dispatch(); _Thread_Initialize( 10b924: 8b 15 30 f9 11 00 mov 0x11f930,%edx 10b92a: 83 c4 0c add $0xc,%esp 10b92d: 68 45 4c 44 49 push $0x49444c45 10b932: 6a 00 push $0x0 10b934: 6a 00 push $0x0 10b936: 6a 00 push $0x0 10b938: 6a 01 push $0x1 10b93a: 0f b6 05 14 f9 11 00 movzbl 0x11f914,%eax 10b941: 50 push %eax 10b942: 6a 00 push $0x0 10b944: a1 10 f9 11 00 mov 0x11f910,%eax 10b949: 39 d0 cmp %edx,%eax 10b94b: 73 02 jae 10b94f <_Thread_Create_idle+0x4b> 10b94d: 89 d0 mov %edx,%eax 10b94f: 50 push %eax 10b950: 6a 00 push $0x0 10b952: ff 35 14 3a 12 00 pushl 0x123a14 10b958: 68 cc 39 12 00 push $0x1239cc 10b95d: e8 4a 02 00 00 call 10bbac <_Thread_Initialize> <== ALWAYS TAKEN */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 10b962: a1 74 38 12 00 mov 0x123874,%eax 10b967: 48 dec %eax 10b968: a3 74 38 12 00 mov %eax,0x123874 /* * WARNING!!! This is necessary to "kick" start the system and * MUST be done before _Thread_Start is invoked. */ _Thread_Heir = _Thread_Executing = _Thread_Idle; 10b96d: a1 14 3a 12 00 mov 0x123a14,%eax /* * WARNING!!! This is necessary to "kick" start the system and * MUST be done before _Thread_Start is invoked. */ _Thread_Heir = 10b972: a3 30 39 12 00 mov %eax,0x123930 10b977: a3 00 39 12 00 mov %eax,0x123900 _Thread_Executing = _Thread_Idle; _Thread_Start( 10b97c: 83 c4 24 add $0x24,%esp 10b97f: 6a 00 push $0x0 10b981: 6a 00 push $0x0 10b983: ff 35 2c f9 11 00 pushl 0x11f92c 10b989: 6a 00 push $0x0 10b98b: 50 push %eax 10b98c: e8 5b 0b 00 00 call 10c4ec <_Thread_Start> <== ALWAYS TAKEN 10b991: 83 c4 20 add $0x20,%esp Configuration.idle_task, NULL, 0 ); } 10b994: c9 leave 10b995: c3 ret 0010b998 <_Thread_Delay_ended>: void _Thread_Delay_ended( Objects_Id id, void *ignored __attribute__((unused)) ) { 10b998: 55 push %ebp 10b999: 89 e5 mov %esp,%ebp 10b99b: 83 ec 20 sub $0x20,%esp Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 10b99e: 8d 45 f4 lea -0xc(%ebp),%eax 10b9a1: 50 push %eax 10b9a2: ff 75 08 pushl 0x8(%ebp) 10b9a5: e8 8e 01 00 00 call 10bb38 <_Thread_Get> <== ALWAYS TAKEN switch ( location ) { 10b9aa: 83 c4 10 add $0x10,%esp 10b9ad: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 10b9b1: 75 1b jne 10b9ce <_Thread_Delay_ended+0x36> <== ALWAYS TAKEN #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_Clear_state( 10b9b3: 52 push %edx 10b9b4: 52 push %edx 10b9b5: 68 18 00 00 10 push $0x10000018 10b9ba: 50 push %eax 10b9bb: e8 d8 fd ff ff call 10b798 <_Thread_Clear_state> <== ALWAYS TAKEN 10b9c0: a1 74 38 12 00 mov 0x123874,%eax 10b9c5: 48 dec %eax 10b9c6: a3 74 38 12 00 mov %eax,0x123874 10b9cb: 83 c4 10 add $0x10,%esp | STATES_INTERRUPTIBLE_BY_SIGNAL ); _Thread_Unnest_dispatch(); break; } } 10b9ce: c9 leave 10b9cf: c3 ret 0010b9d0 <_Thread_Dispatch>: * dispatch thread * no dispatch thread */ void _Thread_Dispatch( void ) { 10b9d0: 55 push %ebp 10b9d1: 89 e5 mov %esp,%ebp 10b9d3: 57 push %edi 10b9d4: 56 push %esi 10b9d5: 53 push %ebx 10b9d6: 83 ec 1c sub $0x1c,%esp Thread_Control *executing; Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; 10b9d9: 8b 1d 30 39 12 00 mov 0x123930,%ebx _ISR_Disable( level ); 10b9df: 9c pushf 10b9e0: fa cli 10b9e1: 58 pop %eax #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ { Timestamp_Control uptime, ran; _TOD_Get_uptime( &uptime ); _Timestamp_Subtract( 10b9e2: 8d 7d d8 lea -0x28(%ebp),%edi Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; _ISR_Disable( level ); while ( _Context_Switch_necessary == true ) { 10b9e5: e9 f1 00 00 00 jmp 10badb <_Thread_Dispatch+0x10b> <== ALWAYS TAKEN heir = _Thread_Heir; 10b9ea: 8b 35 00 39 12 00 mov 0x123900,%esi _Thread_Dispatch_disable_level = 1; 10b9f0: c7 05 74 38 12 00 01 movl $0x1,0x123874 10b9f7: 00 00 00 _Context_Switch_necessary = false; 10b9fa: c6 05 40 39 12 00 00 movb $0x0,0x123940 _Thread_Executing = heir; 10ba01: 89 35 30 39 12 00 mov %esi,0x123930 #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 ) 10ba07: 83 7e 7c 01 cmpl $0x1,0x7c(%esi) 10ba0b: 75 09 jne 10ba16 <_Thread_Dispatch+0x46> heir->cpu_time_budget = _Thread_Ticks_per_timeslice; 10ba0d: 8b 15 40 38 12 00 mov 0x123840,%edx 10ba13: 89 56 78 mov %edx,0x78(%esi) _ISR_Enable( level ); 10ba16: 50 push %eax 10ba17: 9d popf #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ { Timestamp_Control uptime, ran; _TOD_Get_uptime( &uptime ); 10ba18: 83 ec 0c sub $0xc,%esp 10ba1b: 8d 45 e0 lea -0x20(%ebp),%eax 10ba1e: 50 push %eax 10ba1f: e8 64 2a 00 00 call 10e488 <_TOD_Get_uptime> _Timestamp_Subtract( 10ba24: 83 c4 0c add $0xc,%esp 10ba27: 57 push %edi 10ba28: 8d 45 e0 lea -0x20(%ebp),%eax 10ba2b: 50 push %eax 10ba2c: 68 38 39 12 00 push $0x123938 10ba31: e8 de 0b 00 00 call 10c614 <_Timespec_Subtract> <== ALWAYS TAKEN &_Thread_Time_of_last_context_switch, &uptime, &ran ); _Timestamp_Add_to( &executing->cpu_time_used, &ran ); 10ba36: 58 pop %eax 10ba37: 5a pop %edx 10ba38: 57 push %edi 10ba39: 8d 83 84 00 00 00 lea 0x84(%ebx),%eax 10ba3f: 50 push %eax 10ba40: e8 9f 0b 00 00 call 10c5e4 <_Timespec_Add_to> <== ALWAYS TAKEN _Thread_Time_of_last_context_switch = uptime; 10ba45: 8b 45 e0 mov -0x20(%ebp),%eax 10ba48: 8b 55 e4 mov -0x1c(%ebp),%edx 10ba4b: a3 38 39 12 00 mov %eax,0x123938 10ba50: 89 15 3c 39 12 00 mov %edx,0x12393c #endif /* * Switch libc's task specific data. */ if ( _Thread_libc_reent ) { 10ba56: a1 fc 38 12 00 mov 0x1238fc,%eax 10ba5b: 83 c4 10 add $0x10,%esp 10ba5e: 85 c0 test %eax,%eax 10ba60: 74 10 je 10ba72 <_Thread_Dispatch+0xa2> <== ALWAYS TAKEN executing->libc_reent = *_Thread_libc_reent; 10ba62: 8b 10 mov (%eax),%edx 10ba64: 89 93 ec 00 00 00 mov %edx,0xec(%ebx) *_Thread_libc_reent = heir->libc_reent; 10ba6a: 8b 96 ec 00 00 00 mov 0xec(%esi),%edx 10ba70: 89 10 mov %edx,(%eax) } _User_extensions_Thread_switch( executing, heir ); 10ba72: 51 push %ecx 10ba73: 51 push %ecx 10ba74: 56 push %esi 10ba75: 53 push %ebx 10ba76: e8 c9 0d 00 00 call 10c844 <_User_extensions_Thread_switch> <== ALWAYS TAKEN if ( executing->fp_context != NULL ) _Context_Save_fp( &executing->fp_context ); #endif #endif _Context_Switch( &executing->Registers, &heir->Registers ); 10ba7b: 58 pop %eax 10ba7c: 5a pop %edx 10ba7d: 81 c6 d0 00 00 00 add $0xd0,%esi 10ba83: 56 push %esi 10ba84: 8d 83 d0 00 00 00 lea 0xd0(%ebx),%eax 10ba8a: 50 push %eax 10ba8b: e8 80 10 00 00 call 10cb10 <_CPU_Context_switch> #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( (executing->fp_context != NULL) && 10ba90: 83 c4 10 add $0x10,%esp 10ba93: 83 bb e8 00 00 00 00 cmpl $0x0,0xe8(%ebx) 10ba9a: 74 36 je 10bad2 <_Thread_Dispatch+0x102> #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 ); 10ba9c: a1 f8 38 12 00 mov 0x1238f8,%eax 10baa1: 39 c3 cmp %eax,%ebx 10baa3: 74 2d je 10bad2 <_Thread_Dispatch+0x102> !_Thread_Is_allocated_fp( executing ) ) { if ( _Thread_Allocated_fp != NULL ) 10baa5: 85 c0 test %eax,%eax 10baa7: 74 11 je 10baba <_Thread_Dispatch+0xea> _Context_Save_fp( &_Thread_Allocated_fp->fp_context ); 10baa9: 83 ec 0c sub $0xc,%esp 10baac: 05 e8 00 00 00 add $0xe8,%eax 10bab1: 50 push %eax 10bab2: e8 8d 10 00 00 call 10cb44 <_CPU_Context_save_fp> 10bab7: 83 c4 10 add $0x10,%esp _Context_Restore_fp( &executing->fp_context ); 10baba: 83 ec 0c sub $0xc,%esp 10babd: 8d 83 e8 00 00 00 lea 0xe8(%ebx),%eax 10bac3: 50 push %eax 10bac4: e8 85 10 00 00 call 10cb4e <_CPU_Context_restore_fp> _Thread_Allocated_fp = executing; 10bac9: 89 1d f8 38 12 00 mov %ebx,0x1238f8 10bacf: 83 c4 10 add $0x10,%esp if ( executing->fp_context != NULL ) _Context_Restore_fp( &executing->fp_context ); #endif #endif executing = _Thread_Executing; 10bad2: 8b 1d 30 39 12 00 mov 0x123930,%ebx _ISR_Disable( level ); 10bad8: 9c pushf 10bad9: fa cli 10bada: 58 pop %eax Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; _ISR_Disable( level ); while ( _Context_Switch_necessary == true ) { 10badb: 8a 15 40 39 12 00 mov 0x123940,%dl 10bae1: 84 d2 test %dl,%dl 10bae3: 0f 85 01 ff ff ff jne 10b9ea <_Thread_Dispatch+0x1a> executing = _Thread_Executing; _ISR_Disable( level ); } _Thread_Dispatch_disable_level = 0; 10bae9: c7 05 74 38 12 00 00 movl $0x0,0x123874 10baf0: 00 00 00 _ISR_Enable( level ); 10baf3: 50 push %eax 10baf4: 9d popf if ( _Thread_Do_post_task_switch_extension || 10baf5: 83 3d 14 39 12 00 00 cmpl $0x0,0x123914 10bafc: 75 06 jne 10bb04 <_Thread_Dispatch+0x134> <== ALWAYS TAKEN executing->do_post_task_switch_extension ) { 10bafe: 80 7b 74 00 cmpb $0x0,0x74(%ebx) 10bb02: 74 09 je 10bb0d <_Thread_Dispatch+0x13d> executing->do_post_task_switch_extension = false; 10bb04: c6 43 74 00 movb $0x0,0x74(%ebx) _API_extensions_Run_postswitch(); 10bb08: e8 1e eb ff ff call 10a62b <_API_extensions_Run_postswitch> } } 10bb0d: 8d 65 f4 lea -0xc(%ebp),%esp 10bb10: 5b pop %ebx 10bb11: 5e pop %esi 10bb12: 5f pop %edi 10bb13: c9 leave 10bb14: c3 ret 0010bb15 <_Thread_Enable_dispatch>: #if ( (defined(CPU_INLINE_ENABLE_DISPATCH) && \ (CPU_INLINE_ENABLE_DISPATCH == FALSE)) || \ (__RTEMS_DO_NOT_INLINE_THREAD_ENABLE_DISPATCH__ == 1) ) void _Thread_Enable_dispatch( void ) { 10bb15: 55 push %ebp 10bb16: 89 e5 mov %esp,%ebp 10bb18: 83 ec 08 sub $0x8,%esp if ( --_Thread_Dispatch_disable_level ) 10bb1b: a1 74 38 12 00 mov 0x123874,%eax 10bb20: 48 dec %eax 10bb21: a3 74 38 12 00 mov %eax,0x123874 10bb26: a1 74 38 12 00 mov 0x123874,%eax 10bb2b: 85 c0 test %eax,%eax 10bb2d: 75 06 jne 10bb35 <_Thread_Enable_dispatch+0x20> return; _Thread_Dispatch(); } 10bb2f: c9 leave (__RTEMS_DO_NOT_INLINE_THREAD_ENABLE_DISPATCH__ == 1) ) void _Thread_Enable_dispatch( void ) { if ( --_Thread_Dispatch_disable_level ) return; _Thread_Dispatch(); 10bb30: e9 9b fe ff ff jmp 10b9d0 <_Thread_Dispatch> <== ALWAYS TAKEN } 10bb35: c9 leave 10bb36: c3 ret 0010fcf4 <_Thread_Evaluate_mode>: * * XXX */ bool _Thread_Evaluate_mode( void ) { 10fcf4: 55 push %ebp 10fcf5: 89 e5 mov %esp,%ebp Thread_Control *executing; executing = _Thread_Executing; 10fcf7: a1 30 39 12 00 mov 0x123930,%eax if ( !_States_Is_ready( executing->current_state ) || 10fcfc: 83 78 10 00 cmpl $0x0,0x10(%eax) 10fd00: 75 0e jne 10fd10 <_Thread_Evaluate_mode+0x1c> <== ALWAYS TAKEN 10fd02: 3b 05 00 39 12 00 cmp 0x123900,%eax 10fd08: 74 11 je 10fd1b <_Thread_Evaluate_mode+0x27> ( !_Thread_Is_heir( executing ) && executing->is_preemptible ) ) { 10fd0a: 80 78 75 00 cmpb $0x0,0x75(%eax) 10fd0e: 74 0b je 10fd1b <_Thread_Evaluate_mode+0x27> <== ALWAYS TAKEN _Context_Switch_necessary = true; 10fd10: c6 05 40 39 12 00 01 movb $0x1,0x123940 10fd17: b0 01 mov $0x1,%al return true; 10fd19: eb 02 jmp 10fd1d <_Thread_Evaluate_mode+0x29> <== ALWAYS TAKEN 10fd1b: 31 c0 xor %eax,%eax } return false; } 10fd1d: c9 leave 10fd1e: c3 ret 0010bb38 <_Thread_Get>: Thread_Control *_Thread_Get ( Objects_Id id, Objects_Locations *location ) { 10bb38: 55 push %ebp 10bb39: 89 e5 mov %esp,%ebp 10bb3b: 53 push %ebx 10bb3c: 83 ec 04 sub $0x4,%esp 10bb3f: 8b 55 08 mov 0x8(%ebp),%edx 10bb42: 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 ) ) { 10bb45: 85 d2 test %edx,%edx 10bb47: 75 1a jne 10bb63 <_Thread_Get+0x2b> rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10bb49: 8b 15 74 38 12 00 mov 0x123874,%edx 10bb4f: 42 inc %edx 10bb50: 89 15 74 38 12 00 mov %edx,0x123874 _Thread_Disable_dispatch(); *location = OBJECTS_LOCAL; 10bb56: c7 00 00 00 00 00 movl $0x0,(%eax) tp = _Thread_Executing; 10bb5c: a1 30 39 12 00 mov 0x123930,%eax goto done; 10bb61: eb 3a jmp 10bb9d <_Thread_Get+0x65> <== ALWAYS TAKEN */ RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API( Objects_Id id ) { return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS); 10bb63: 89 d1 mov %edx,%ecx 10bb65: c1 e9 18 shr $0x18,%ecx 10bb68: 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 ) 10bb6b: 8d 59 ff lea -0x1(%ecx),%ebx 10bb6e: 83 fb 03 cmp $0x3,%ebx 10bb71: 76 2f jbe 10bba2 <_Thread_Get+0x6a> 10bb73: eb 12 jmp 10bb87 <_Thread_Get+0x4f> <== ALWAYS TAKEN if ( the_class != 1 ) { /* threads are always first class :) */ *location = OBJECTS_ERROR; goto done; } api_information = _Objects_Information_table[ the_api ]; 10bb75: 8b 0c 8d 48 38 12 00 mov 0x123848(,%ecx,4),%ecx if ( !api_information ) { 10bb7c: 85 c9 test %ecx,%ecx 10bb7e: 74 07 je 10bb87 <_Thread_Get+0x4f> *location = OBJECTS_ERROR; goto done; } information = api_information[ the_class ]; 10bb80: 8b 49 04 mov 0x4(%ecx),%ecx if ( !information ) { 10bb83: 85 c9 test %ecx,%ecx 10bb85: 75 0a jne 10bb91 <_Thread_Get+0x59> *location = OBJECTS_ERROR; 10bb87: c7 00 01 00 00 00 movl $0x1,(%eax) 10bb8d: 31 c0 xor %eax,%eax goto done; 10bb8f: eb 0c jmp 10bb9d <_Thread_Get+0x65> <== ALWAYS TAKEN } tp = (Thread_Control *) _Objects_Get( information, id, location ); 10bb91: 53 push %ebx 10bb92: 50 push %eax 10bb93: 52 push %edx 10bb94: 51 push %ecx 10bb95: e8 b6 f7 ff ff call 10b350 <_Objects_Get> <== ALWAYS TAKEN 10bb9a: 83 c4 10 add $0x10,%esp done: return tp; } 10bb9d: 8b 5d fc mov -0x4(%ebp),%ebx 10bba0: c9 leave 10bba1: c3 ret *location = OBJECTS_ERROR; goto done; } the_class = _Objects_Get_class( id ); if ( the_class != 1 ) { /* threads are always first class :) */ 10bba2: 89 d3 mov %edx,%ebx 10bba4: c1 eb 1b shr $0x1b,%ebx 10bba7: 4b dec %ebx 10bba8: 74 cb je 10bb75 <_Thread_Get+0x3d> 10bbaa: eb db jmp 10bb87 <_Thread_Get+0x4f> <== ALWAYS TAKEN 0010fd20 <_Thread_Handler>: * * Output parameters: NONE */ void _Thread_Handler( void ) { 10fd20: 55 push %ebp 10fd21: 89 e5 mov %esp,%ebp 10fd23: 53 push %ebx 10fd24: 83 ec 14 sub $0x14,%esp #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) static char doneConstructors; char doneCons; #endif executing = _Thread_Executing; 10fd27: 8b 1d 30 39 12 00 mov 0x123930,%ebx /* * have to put level into a register for those cpu's that use * inline asm here */ level = executing->Start.isr_level; 10fd2d: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax _ISR_Set_level(level); 10fd33: 85 c0 test %eax,%eax 10fd35: 74 03 je 10fd3a <_Thread_Handler+0x1a> 10fd37: fa cli 10fd38: eb 01 jmp 10fd3b <_Thread_Handler+0x1b> <== ALWAYS TAKEN 10fd3a: fb sti #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) doneCons = doneConstructors; 10fd3b: a0 1c 35 12 00 mov 0x12351c,%al 10fd40: 88 45 f7 mov %al,-0x9(%ebp) doneConstructors = 1; 10fd43: c6 05 1c 35 12 00 01 movb $0x1,0x12351c #endif #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( (executing->fp_context != NULL) && 10fd4a: 83 bb e8 00 00 00 00 cmpl $0x0,0xe8(%ebx) 10fd51: 74 24 je 10fd77 <_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 ); 10fd53: a1 f8 38 12 00 mov 0x1238f8,%eax 10fd58: 39 c3 cmp %eax,%ebx 10fd5a: 74 1b je 10fd77 <_Thread_Handler+0x57> !_Thread_Is_allocated_fp( executing ) ) { if ( _Thread_Allocated_fp != NULL ) 10fd5c: 85 c0 test %eax,%eax 10fd5e: 74 11 je 10fd71 <_Thread_Handler+0x51> _Context_Save_fp( &_Thread_Allocated_fp->fp_context ); 10fd60: 83 ec 0c sub $0xc,%esp 10fd63: 05 e8 00 00 00 add $0xe8,%eax 10fd68: 50 push %eax 10fd69: e8 d6 cd ff ff call 10cb44 <_CPU_Context_save_fp> 10fd6e: 83 c4 10 add $0x10,%esp _Thread_Allocated_fp = executing; 10fd71: 89 1d f8 38 12 00 mov %ebx,0x1238f8 /* * 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 ); 10fd77: 83 ec 0c sub $0xc,%esp 10fd7a: 53 push %ebx 10fd7b: e8 78 c9 ff ff call 10c6f8 <_User_extensions_Thread_begin> /* * At this point, the dispatch disable level BETTER be 1. */ _Thread_Enable_dispatch(); 10fd80: e8 90 bd ff ff call 10bb15 <_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) */ { 10fd85: 83 c4 10 add $0x10,%esp 10fd88: 80 7d f7 00 cmpb $0x0,-0x9(%ebp) 10fd8c: 75 05 jne 10fd93 <_Thread_Handler+0x73> INIT_NAME (); 10fd8e: e8 cd bf 00 00 call 11bd60 <__start_set_sysctl_set> } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { 10fd93: 83 bb a0 00 00 00 00 cmpl $0x0,0xa0(%ebx) 10fd9a: 75 15 jne 10fdb1 <_Thread_Handler+0x91> <== ALWAYS TAKEN executing->Wait.return_argument = (*(Thread_Entry_numeric) executing->Start.entry_point)( 10fd9c: 83 ec 0c sub $0xc,%esp 10fd9f: ff b3 a8 00 00 00 pushl 0xa8(%ebx) 10fda5: ff 93 9c 00 00 00 call *0x9c(%ebx) INIT_NAME (); } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { executing->Wait.return_argument = 10fdab: 89 43 28 mov %eax,0x28(%ebx) 10fdae: 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 ); 10fdb1: 83 ec 0c sub $0xc,%esp 10fdb4: 53 push %ebx 10fdb5: e8 6f c9 ff ff call 10c729 <_User_extensions_Thread_exitted> _Internal_error_Occurred( 10fdba: 83 c4 0c add $0xc,%esp 10fdbd: 6a 06 push $0x6 10fdbf: 6a 01 push $0x1 10fdc1: 6a 00 push $0x0 10fdc3: e8 dc b0 ff ff call 10aea4 <_Internal_error_Occurred> 0010bdac <_Thread_Handler_initialization>: * * Output parameters: NONE */ void _Thread_Handler_initialization(void) { 10bdac: 55 push %ebp 10bdad: 89 e5 mov %esp,%ebp 10bdaf: 53 push %ebx 10bdb0: 83 ec 04 sub $0x4,%esp uint32_t maximum_extensions; #if defined(RTEMS_MULTIPROCESSING) uint32_t maximum_proxies; #endif ticks_per_timeslice = Configuration.ticks_per_timeslice; 10bdb3: a1 28 f9 11 00 mov 0x11f928,%eax maximum_extensions = Configuration.maximum_extensions; 10bdb8: 8b 15 20 f9 11 00 mov 0x11f920,%edx #endif /* * BOTH stacks hooks must be set or both must be NULL. * Do not allow mixture. */ if ( !( (!Configuration.stack_allocate_hook) 10bdbe: 83 3d 3c f9 11 00 00 cmpl $0x0,0x11f93c 10bdc5: 0f 94 c3 sete %bl 10bdc8: 83 3d 38 f9 11 00 00 cmpl $0x0,0x11f938 10bdcf: 0f 94 c1 sete %cl 10bdd2: 38 cb cmp %cl,%bl 10bdd4: 74 0c je 10bde2 <_Thread_Handler_initialization+0x36> == (!Configuration.stack_free_hook) ) ) _Internal_error_Occurred( 10bdd6: 52 push %edx 10bdd7: 6a 0f push $0xf 10bdd9: 6a 01 push $0x1 10bddb: 6a 00 push $0x0 10bddd: e8 c2 f0 ff ff call 10aea4 <_Internal_error_Occurred> INTERNAL_ERROR_CORE, true, INTERNAL_ERROR_BAD_STACK_HOOK ); _Context_Switch_necessary = false; 10bde2: c6 05 40 39 12 00 00 movb $0x0,0x123940 _Thread_Executing = NULL; 10bde9: c7 05 30 39 12 00 00 movl $0x0,0x123930 10bdf0: 00 00 00 _Thread_Heir = NULL; 10bdf3: c7 05 00 39 12 00 00 movl $0x0,0x123900 10bdfa: 00 00 00 #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) _Thread_Allocated_fp = NULL; 10bdfd: c7 05 f8 38 12 00 00 movl $0x0,0x1238f8 10be04: 00 00 00 #endif _Thread_Do_post_task_switch_extension = 0; 10be07: c7 05 14 39 12 00 00 movl $0x0,0x123914 10be0e: 00 00 00 _Thread_Maximum_extensions = maximum_extensions; 10be11: 89 15 10 39 12 00 mov %edx,0x123910 _Thread_Ticks_per_timeslice = ticks_per_timeslice; 10be17: a3 40 38 12 00 mov %eax,0x123840 _Thread_Ready_chain = (Chain_Control *) _Workspace_Allocate_or_fatal_error( 10be1c: 83 ec 0c sub $0xc,%esp 10be1f: 0f b6 05 14 f9 11 00 movzbl 0x11f914,%eax 10be26: 40 inc %eax 10be27: 6b c0 0c imul $0xc,%eax,%eax 10be2a: 50 push %eax 10be2b: e8 30 0c 00 00 call 10ca60 <_Workspace_Allocate_or_fatal_error> <== ALWAYS TAKEN 10be30: a3 3c 38 12 00 mov %eax,0x12383c (PRIORITY_MAXIMUM + 1) * sizeof(Chain_Control) ); for ( index=0; index <= PRIORITY_MAXIMUM ; index++ ) 10be35: 0f b6 0d 14 f9 11 00 movzbl 0x11f914,%ecx 10be3c: 31 d2 xor %edx,%edx 10be3e: 83 c4 10 add $0x10,%esp */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 10be41: 8d 58 04 lea 0x4(%eax),%ebx 10be44: 89 18 mov %ebx,(%eax) the_chain->permanent_null = NULL; 10be46: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax) the_chain->last = _Chain_Head(the_chain); 10be4d: 89 40 08 mov %eax,0x8(%eax) 10be50: 42 inc %edx 10be51: 83 c0 0c add $0xc,%eax 10be54: 39 ca cmp %ecx,%edx 10be56: 76 e9 jbe 10be41 <_Thread_Handler_initialization+0x95> /* * Initialize this class of objects. */ _Objects_Initialize_information( 10be58: 50 push %eax 10be59: 6a 08 push $0x8 10be5b: 6a 00 push $0x0 10be5d: 68 04 01 00 00 push $0x104 10be62: 6a 01 push $0x1 10be64: 6a 01 push $0x1 10be66: 6a 01 push $0x1 10be68: 68 cc 39 12 00 push $0x1239cc 10be6d: e8 36 f5 ff ff call 10b3a8 <_Objects_Initialize_information> <== ALWAYS TAKEN 10be72: 83 c4 20 add $0x20,%esp false, /* true if this is a global object class */ NULL /* Proxy extraction support callout */ #endif ); } 10be75: 8b 5d fc mov -0x4(%ebp),%ebx 10be78: c9 leave 10be79: c3 ret 0010bbac <_Thread_Initialize>: Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { 10bbac: 55 push %ebp 10bbad: 89 e5 mov %esp,%ebp 10bbaf: 57 push %edi 10bbb0: 56 push %esi 10bbb1: 53 push %ebx 10bbb2: 83 ec 24 sub $0x24,%esp 10bbb5: 8b 5d 0c mov 0xc(%ebp),%ebx 10bbb8: 8b 75 14 mov 0x14(%ebp),%esi 10bbbb: 8a 55 18 mov 0x18(%ebp),%dl 10bbbe: 8a 45 20 mov 0x20(%ebp),%al 10bbc1: 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; 10bbc4: c7 83 f0 00 00 00 00 movl $0x0,0xf0(%ebx) 10bbcb: 00 00 00 10bbce: c7 83 f4 00 00 00 00 movl $0x0,0xf4(%ebx) 10bbd5: 00 00 00 10bbd8: c7 83 f8 00 00 00 00 movl $0x0,0xf8(%ebx) 10bbdf: 00 00 00 extensions_area = NULL; the_thread->libc_reent = NULL; 10bbe2: c7 83 ec 00 00 00 00 movl $0x0,0xec(%ebx) 10bbe9: 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 ); 10bbec: 56 push %esi 10bbed: 53 push %ebx 10bbee: 88 55 e0 mov %dl,-0x20(%ebp) 10bbf1: e8 26 08 00 00 call 10c41c <_Thread_Stack_Allocate> <== ALWAYS TAKEN if ( !actual_stack_size || actual_stack_size < stack_size ) 10bbf6: 83 c4 10 add $0x10,%esp 10bbf9: 39 f0 cmp %esi,%eax 10bbfb: 8a 55 e0 mov -0x20(%ebp),%dl 10bbfe: 72 04 jb 10bc04 <_Thread_Initialize+0x58> 10bc00: 85 c0 test %eax,%eax 10bc02: 75 07 jne 10bc0b <_Thread_Initialize+0x5f> <== NEVER TAKEN 10bc04: 31 c0 xor %eax,%eax 10bc06: e9 98 01 00 00 jmp 10bda3 <_Thread_Initialize+0x1f7> <== ALWAYS TAKEN Stack_Control *the_stack, void *starting_address, size_t size ) { the_stack->area = starting_address; 10bc0b: 8b 8b cc 00 00 00 mov 0xcc(%ebx),%ecx 10bc11: 89 8b c4 00 00 00 mov %ecx,0xc4(%ebx) the_stack->size = size; 10bc17: 89 83 c0 00 00 00 mov %eax,0xc0(%ebx) /* * Allocate the floating point area for this thread */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( is_fp ) { 10bc1d: 31 ff xor %edi,%edi 10bc1f: 84 d2 test %dl,%dl 10bc21: 74 19 je 10bc3c <_Thread_Initialize+0x90> fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE ); 10bc23: 83 ec 0c sub $0xc,%esp 10bc26: 6a 6c push $0x6c 10bc28: e8 5f 0e 00 00 call 10ca8c <_Workspace_Allocate> <== ALWAYS TAKEN 10bc2d: 89 c7 mov %eax,%edi if ( !fp_area ) 10bc2f: 83 c4 10 add $0x10,%esp 10bc32: 31 f6 xor %esi,%esi 10bc34: 85 c0 test %eax,%eax 10bc36: 0f 84 fe 00 00 00 je 10bd3a <_Thread_Initialize+0x18e> goto failed; fp_area = _Context_Fp_start( fp_area, 0 ); } the_thread->fp_context = fp_area; 10bc3c: 89 bb e8 00 00 00 mov %edi,0xe8(%ebx) the_thread->Start.fp_context = fp_area; 10bc42: 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; 10bc48: c7 43 50 00 00 00 00 movl $0x0,0x50(%ebx) the_watchdog->routine = routine; 10bc4f: c7 43 64 00 00 00 00 movl $0x0,0x64(%ebx) the_watchdog->id = id; 10bc56: c7 43 68 00 00 00 00 movl $0x0,0x68(%ebx) the_watchdog->user_data = user_data; 10bc5d: c7 43 6c 00 00 00 00 movl $0x0,0x6c(%ebx) #endif /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { 10bc64: a1 10 39 12 00 mov 0x123910,%eax 10bc69: 31 f6 xor %esi,%esi 10bc6b: 85 c0 test %eax,%eax 10bc6d: 74 1d je 10bc8c <_Thread_Initialize+0xe0> extensions_area = _Workspace_Allocate( 10bc6f: 83 ec 0c sub $0xc,%esp 10bc72: 8d 04 85 04 00 00 00 lea 0x4(,%eax,4),%eax 10bc79: 50 push %eax 10bc7a: e8 0d 0e 00 00 call 10ca8c <_Workspace_Allocate> <== ALWAYS TAKEN 10bc7f: 89 c6 mov %eax,%esi (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) 10bc81: 83 c4 10 add $0x10,%esp 10bc84: 85 c0 test %eax,%eax 10bc86: 0f 84 ae 00 00 00 je 10bd3a <_Thread_Initialize+0x18e> goto failed; } the_thread->extensions = (void **) extensions_area; 10bc8c: 89 b3 fc 00 00 00 mov %esi,0xfc(%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 ) { 10bc92: 85 f6 test %esi,%esi 10bc94: 74 1c je 10bcb2 <_Thread_Initialize+0x106> for ( i = 0; i <= _Thread_Maximum_extensions ; i++ ) 10bc96: 8b 0d 10 39 12 00 mov 0x123910,%ecx 10bc9c: 31 c0 xor %eax,%eax 10bc9e: eb 0e jmp 10bcae <_Thread_Initialize+0x102> <== ALWAYS TAKEN the_thread->extensions[i] = NULL; 10bca0: 8b 93 fc 00 00 00 mov 0xfc(%ebx),%edx 10bca6: c7 04 82 00 00 00 00 movl $0x0,(%edx,%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++ ) 10bcad: 40 inc %eax 10bcae: 39 c8 cmp %ecx,%eax 10bcb0: 76 ee jbe 10bca0 <_Thread_Initialize+0xf4> /* * General initialization */ the_thread->Start.is_preemptible = is_preemptible; 10bcb2: 8a 45 e7 mov -0x19(%ebp),%al 10bcb5: 88 83 ac 00 00 00 mov %al,0xac(%ebx) the_thread->Start.budget_algorithm = budget_algorithm; 10bcbb: 8b 45 24 mov 0x24(%ebp),%eax 10bcbe: 89 83 b0 00 00 00 mov %eax,0xb0(%ebx) the_thread->Start.budget_callout = budget_callout; 10bcc4: 8b 45 28 mov 0x28(%ebp),%eax 10bcc7: 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; 10bccd: 8b 45 2c mov 0x2c(%ebp),%eax 10bcd0: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) the_thread->current_state = STATES_DORMANT; 10bcd6: c7 43 10 01 00 00 00 movl $0x1,0x10(%ebx) the_thread->Wait.queue = NULL; 10bcdd: c7 43 44 00 00 00 00 movl $0x0,0x44(%ebx) the_thread->resource_count = 0; 10bce4: c7 43 1c 00 00 00 00 movl $0x0,0x1c(%ebx) #if defined(RTEMS_ITRON_API) the_thread->suspend_count = 0; #endif the_thread->real_priority = priority; 10bceb: 8b 45 1c mov 0x1c(%ebp),%eax 10bcee: 89 43 18 mov %eax,0x18(%ebx) the_thread->Start.initial_priority = priority; 10bcf1: 89 83 bc 00 00 00 mov %eax,0xbc(%ebx) _Thread_Set_priority( the_thread, priority ); 10bcf7: 52 push %edx 10bcf8: 52 push %edx 10bcf9: 50 push %eax 10bcfa: 53 push %ebx 10bcfb: e8 70 05 00 00 call 10c270 <_Thread_Set_priority> <== ALWAYS TAKEN /* * Initialize the CPU usage statistics */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_Set_to_zero( &the_thread->cpu_time_used ); 10bd00: c7 83 84 00 00 00 00 movl $0x0,0x84(%ebx) 10bd07: 00 00 00 10bd0a: c7 83 88 00 00 00 00 movl $0x0,0x88(%ebx) 10bd11: 00 00 00 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10bd14: 0f b7 53 08 movzwl 0x8(%ebx),%edx 10bd18: 8b 45 08 mov 0x8(%ebp),%eax 10bd1b: 8b 40 1c mov 0x1c(%eax),%eax 10bd1e: 89 1c 90 mov %ebx,(%eax,%edx,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 10bd21: 8b 45 30 mov 0x30(%ebp),%eax 10bd24: 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 ); 10bd27: 89 1c 24 mov %ebx,(%esp) 10bd2a: e8 69 0a 00 00 call 10c798 <_User_extensions_Thread_create> <== ALWAYS TAKEN 10bd2f: 88 c2 mov %al,%dl if ( extension_status ) 10bd31: 83 c4 10 add $0x10,%esp 10bd34: b0 01 mov $0x1,%al 10bd36: 84 d2 test %dl,%dl 10bd38: 75 69 jne 10bda3 <_Thread_Initialize+0x1f7> return true; failed: if ( the_thread->libc_reent ) 10bd3a: 8b 83 ec 00 00 00 mov 0xec(%ebx),%eax 10bd40: 85 c0 test %eax,%eax 10bd42: 74 0c je 10bd50 <_Thread_Initialize+0x1a4> _Workspace_Free( the_thread->libc_reent ); 10bd44: 83 ec 0c sub $0xc,%esp 10bd47: 50 push %eax 10bd48: e8 58 0d 00 00 call 10caa5 <_Workspace_Free> <== ALWAYS TAKEN 10bd4d: 83 c4 10 add $0x10,%esp 10bd50: 31 d2 xor %edx,%edx for ( i=0 ; i <= THREAD_API_LAST ; i++ ) if ( the_thread->API_Extensions[i] ) 10bd52: 8b 84 93 f0 00 00 00 mov 0xf0(%ebx,%edx,4),%eax 10bd59: 85 c0 test %eax,%eax 10bd5b: 74 12 je 10bd6f <_Thread_Initialize+0x1c3> _Workspace_Free( the_thread->API_Extensions[i] ); 10bd5d: 83 ec 0c sub $0xc,%esp 10bd60: 50 push %eax 10bd61: 89 55 e0 mov %edx,-0x20(%ebp) 10bd64: e8 3c 0d 00 00 call 10caa5 <_Workspace_Free> <== ALWAYS TAKEN 10bd69: 83 c4 10 add $0x10,%esp 10bd6c: 8b 55 e0 mov -0x20(%ebp),%edx failed: if ( the_thread->libc_reent ) _Workspace_Free( the_thread->libc_reent ); for ( i=0 ; i <= THREAD_API_LAST ; i++ ) 10bd6f: 42 inc %edx 10bd70: 83 fa 03 cmp $0x3,%edx 10bd73: 75 dd jne 10bd52 <_Thread_Initialize+0x1a6> if ( the_thread->API_Extensions[i] ) _Workspace_Free( the_thread->API_Extensions[i] ); if ( extensions_area ) 10bd75: 85 f6 test %esi,%esi 10bd77: 74 0c je 10bd85 <_Thread_Initialize+0x1d9> (void) _Workspace_Free( extensions_area ); 10bd79: 83 ec 0c sub $0xc,%esp 10bd7c: 56 push %esi 10bd7d: e8 23 0d 00 00 call 10caa5 <_Workspace_Free> <== ALWAYS TAKEN 10bd82: 83 c4 10 add $0x10,%esp #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( fp_area ) 10bd85: 85 ff test %edi,%edi 10bd87: 74 0c je 10bd95 <_Thread_Initialize+0x1e9> (void) _Workspace_Free( fp_area ); 10bd89: 83 ec 0c sub $0xc,%esp 10bd8c: 57 push %edi 10bd8d: e8 13 0d 00 00 call 10caa5 <_Workspace_Free> <== ALWAYS TAKEN 10bd92: 83 c4 10 add $0x10,%esp #endif _Thread_Stack_Free( the_thread ); 10bd95: 83 ec 0c sub $0xc,%esp 10bd98: 53 push %ebx 10bd99: e8 ce 06 00 00 call 10c46c <_Thread_Stack_Free> <== ALWAYS TAKEN 10bd9e: 31 c0 xor %eax,%eax return false; 10bda0: 83 c4 10 add $0x10,%esp } 10bda3: 8d 65 f4 lea -0xc(%ebp),%esp 10bda6: 5b pop %ebx 10bda7: 5e pop %esi 10bda8: 5f pop %edi 10bda9: c9 leave 10bdaa: c3 ret 0010ead4 <_Thread_Reset_timeslice>: * ready chain * select heir */ void _Thread_Reset_timeslice( void ) { 10ead4: 55 push %ebp 10ead5: 89 e5 mov %esp,%ebp 10ead7: 56 push %esi 10ead8: 53 push %ebx ISR_Level level; Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; 10ead9: a1 30 39 12 00 mov 0x123930,%eax ready = executing->ready; 10eade: 8b 90 8c 00 00 00 mov 0x8c(%eax),%edx _ISR_Disable( level ); 10eae4: 9c pushf 10eae5: fa cli 10eae6: 59 pop %ecx if ( _Chain_Has_only_one_node( ready ) ) { 10eae7: 8b 1a mov (%edx),%ebx 10eae9: 3b 5a 08 cmp 0x8(%edx),%ebx 10eaec: 75 04 jne 10eaf2 <_Thread_Reset_timeslice+0x1e> _ISR_Enable( level ); 10eaee: 51 push %ecx 10eaef: 9d popf return; 10eaf0: eb 35 jmp 10eb27 <_Thread_Reset_timeslice+0x53> <== ALWAYS TAKEN ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 10eaf2: 8b 30 mov (%eax),%esi previous = the_node->previous; 10eaf4: 8b 58 04 mov 0x4(%eax),%ebx next->previous = previous; 10eaf7: 89 5e 04 mov %ebx,0x4(%esi) previous->next = next; 10eafa: 89 33 mov %esi,(%ebx) Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 10eafc: 8d 5a 04 lea 0x4(%edx),%ebx 10eaff: 89 18 mov %ebx,(%eax) old_last_node = the_chain->last; 10eb01: 8b 5a 08 mov 0x8(%edx),%ebx the_chain->last = the_node; 10eb04: 89 42 08 mov %eax,0x8(%edx) old_last_node->next = the_node; 10eb07: 89 03 mov %eax,(%ebx) the_node->previous = old_last_node; 10eb09: 89 58 04 mov %ebx,0x4(%eax) } _Chain_Extract_unprotected( &executing->Object.Node ); _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); 10eb0c: 51 push %ecx 10eb0d: 9d popf 10eb0e: fa cli if ( _Thread_Is_heir( executing ) ) 10eb0f: 3b 05 00 39 12 00 cmp 0x123900,%eax 10eb15: 75 07 jne 10eb1e <_Thread_Reset_timeslice+0x4a> <== ALWAYS TAKEN _Thread_Heir = (Thread_Control *) ready->first; 10eb17: 8b 02 mov (%edx),%eax 10eb19: a3 00 39 12 00 mov %eax,0x123900 _Context_Switch_necessary = true; 10eb1e: c6 05 40 39 12 00 01 movb $0x1,0x123940 _ISR_Enable( level ); 10eb25: 51 push %ecx 10eb26: 9d popf } 10eb27: 5b pop %ebx 10eb28: 5e pop %esi 10eb29: c9 leave 10eb2a: c3 ret 0010cc70 <_Thread_Restart>: bool _Thread_Restart( Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { 10cc70: 55 push %ebp 10cc71: 89 e5 mov %esp,%ebp 10cc73: 53 push %ebx 10cc74: 83 ec 04 sub $0x4,%esp 10cc77: 8b 5d 08 mov 0x8(%ebp),%ebx if ( !_States_Is_dormant( the_thread->current_state ) ) { 10cc7a: 31 c0 xor %eax,%eax 10cc7c: f6 43 10 01 testb $0x1,0x10(%ebx) 10cc80: 75 6b jne 10cced <_Thread_Restart+0x7d> _Thread_Set_transient( the_thread ); 10cc82: 83 ec 0c sub $0xc,%esp 10cc85: 53 push %ebx 10cc86: e8 a1 01 00 00 call 10ce2c <_Thread_Set_transient> <== ALWAYS TAKEN _Thread_Reset( the_thread, pointer_argument, numeric_argument ); 10cc8b: 83 c4 0c add $0xc,%esp 10cc8e: ff 75 10 pushl 0x10(%ebp) 10cc91: ff 75 0c pushl 0xc(%ebp) 10cc94: 53 push %ebx 10cc95: e8 62 29 00 00 call 10f5fc <_Thread_Reset> _Thread_Load_environment( the_thread ); 10cc9a: 89 1c 24 mov %ebx,(%esp) 10cc9d: e8 52 26 00 00 call 10f2f4 <_Thread_Load_environment> _Thread_Ready( the_thread ); 10cca2: 89 1c 24 mov %ebx,(%esp) 10cca5: e8 ae 28 00 00 call 10f558 <_Thread_Ready> _User_extensions_Thread_restart( the_thread ); 10ccaa: 89 1c 24 mov %ebx,(%esp) 10ccad: e8 de 05 00 00 call 10d290 <_User_extensions_Thread_restart> <== ALWAYS TAKEN if ( _Thread_Is_executing ( the_thread ) ) 10ccb2: 83 c4 10 add $0x10,%esp #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( _Thread_Executing->fp_context != NULL ) _Context_Restore_fp( &_Thread_Executing->fp_context ); #endif _CPU_Context_Restart_self( &_Thread_Executing->Registers ); 10ccb5: b0 01 mov $0x1,%al 10ccb7: 3b 1d dc 55 12 00 cmp 0x1255dc,%ebx 10ccbd: 75 2e jne 10cced <_Thread_Restart+0x7d> */ RTEMS_INLINE_ROUTINE void _Thread_Restart_self( void ) { #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( _Thread_Executing->fp_context != NULL ) 10ccbf: 83 bb e8 00 00 00 00 cmpl $0x0,0xe8(%ebx) 10ccc6: 74 12 je 10ccda <_Thread_Restart+0x6a> _Context_Restore_fp( &_Thread_Executing->fp_context ); 10ccc8: 83 ec 0c sub $0xc,%esp 10cccb: 81 c3 e8 00 00 00 add $0xe8,%ebx 10ccd1: 53 push %ebx 10ccd2: e8 27 09 00 00 call 10d5fe <_CPU_Context_restore_fp> 10ccd7: 83 c4 10 add $0x10,%esp #endif _CPU_Context_Restart_self( &_Thread_Executing->Registers ); 10ccda: 83 ec 0c sub $0xc,%esp 10ccdd: a1 dc 55 12 00 mov 0x1255dc,%eax 10cce2: 05 d0 00 00 00 add $0xd0,%eax 10cce7: 50 push %eax 10cce8: e8 00 09 00 00 call 10d5ed <_CPU_Context_restore> return true; } return false; } 10cced: 8b 5d fc mov -0x4(%ebp),%ebx 10ccf0: c9 leave 10ccf1: c3 ret 0010f4f0 <_Thread_Resume>: void _Thread_Resume( Thread_Control *the_thread, bool force ) { 10f4f0: 55 push %ebp 10f4f1: 89 e5 mov %esp,%ebp 10f4f3: 53 push %ebx 10f4f4: 8b 45 08 mov 0x8(%ebp),%eax ISR_Level level; States_Control current_state; _ISR_Disable( level ); 10f4f7: 9c pushf 10f4f8: fa cli 10f4f9: 59 pop %ecx _ISR_Enable( level ); return; } #endif current_state = the_thread->current_state; 10f4fa: 8b 50 10 mov 0x10(%eax),%edx if ( current_state & STATES_SUSPENDED ) { 10f4fd: f6 c2 02 test $0x2,%dl 10f500: 74 70 je 10f572 <_Thread_Resume+0x82> <== ALWAYS TAKEN 10f502: 83 e2 fd and $0xfffffffd,%edx current_state = 10f505: 89 50 10 mov %edx,0x10(%eax) the_thread->current_state = _States_Clear(STATES_SUSPENDED, current_state); if ( _States_Is_ready( current_state ) ) { 10f508: 85 d2 test %edx,%edx 10f50a: 75 66 jne 10f572 <_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; 10f50c: 8b 90 90 00 00 00 mov 0x90(%eax),%edx 10f512: 66 8b 98 96 00 00 00 mov 0x96(%eax),%bx 10f519: 66 09 1a or %bx,(%edx) _Priority_Major_bit_map |= the_priority_map->ready_major; 10f51c: 66 8b 15 d4 72 12 00 mov 0x1272d4,%dx 10f523: 0b 90 94 00 00 00 or 0x94(%eax),%edx 10f529: 66 89 15 d4 72 12 00 mov %dx,0x1272d4 _Priority_Add_to_bit_map( &the_thread->Priority_map ); _Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node); 10f530: 8b 90 8c 00 00 00 mov 0x8c(%eax),%edx Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 10f536: 8d 5a 04 lea 0x4(%edx),%ebx 10f539: 89 18 mov %ebx,(%eax) old_last_node = the_chain->last; 10f53b: 8b 5a 08 mov 0x8(%edx),%ebx the_chain->last = the_node; 10f53e: 89 42 08 mov %eax,0x8(%edx) old_last_node->next = the_node; 10f541: 89 03 mov %eax,(%ebx) the_node->previous = old_last_node; 10f543: 89 58 04 mov %ebx,0x4(%eax) _ISR_Flash( level ); 10f546: 51 push %ecx 10f547: 9d popf 10f548: fa cli if ( the_thread->current_priority < _Thread_Heir->current_priority ) { 10f549: 8b 50 14 mov 0x14(%eax),%edx 10f54c: 8b 1d b0 72 12 00 mov 0x1272b0,%ebx 10f552: 3b 53 14 cmp 0x14(%ebx),%edx 10f555: 73 1b jae 10f572 <_Thread_Resume+0x82> _Thread_Heir = the_thread; 10f557: a3 b0 72 12 00 mov %eax,0x1272b0 if ( _Thread_Executing->is_preemptible || 10f55c: a1 e0 72 12 00 mov 0x1272e0,%eax 10f561: 80 78 75 00 cmpb $0x0,0x75(%eax) 10f565: 75 04 jne 10f56b <_Thread_Resume+0x7b> 10f567: 85 d2 test %edx,%edx 10f569: 75 07 jne 10f572 <_Thread_Resume+0x82> <== NEVER TAKEN the_thread->current_priority == 0 ) _Context_Switch_necessary = true; 10f56b: c6 05 f0 72 12 00 01 movb $0x1,0x1272f0 } } } _ISR_Enable( level ); 10f572: 51 push %ecx 10f573: 9d popf } 10f574: 5b pop %ebx 10f575: c9 leave 10f576: c3 ret 0010c2d8 <_Thread_Set_state>: void _Thread_Set_state( Thread_Control *the_thread, States_Control state ) { 10c2d8: 55 push %ebp 10c2d9: 89 e5 mov %esp,%ebp 10c2db: 56 push %esi 10c2dc: 53 push %ebx 10c2dd: 8b 45 08 mov 0x8(%ebp),%eax 10c2e0: 8b 4d 0c mov 0xc(%ebp),%ecx ISR_Level level; Chain_Control *ready; ready = the_thread->ready; 10c2e3: 8b 90 8c 00 00 00 mov 0x8c(%eax),%edx _ISR_Disable( level ); 10c2e9: 9c pushf 10c2ea: fa cli 10c2eb: 5b pop %ebx if ( !_States_Is_ready( the_thread->current_state ) ) { 10c2ec: 8b 70 10 mov 0x10(%eax),%esi 10c2ef: 85 f6 test %esi,%esi 10c2f1: 74 0c je 10c2ff <_Thread_Set_state+0x27> the_thread->current_state = 10c2f3: 09 f1 or %esi,%ecx 10c2f5: 89 48 10 mov %ecx,0x10(%eax) _States_Set( state, the_thread->current_state ); _ISR_Enable( level ); 10c2f8: 53 push %ebx 10c2f9: 9d popf return; 10c2fa: e9 a3 00 00 00 jmp 10c3a2 <_Thread_Set_state+0xca> <== ALWAYS TAKEN } the_thread->current_state = state; 10c2ff: 89 48 10 mov %ecx,0x10(%eax) if ( _Chain_Has_only_one_node( ready ) ) { 10c302: 8b 0a mov (%edx),%ecx 10c304: 3b 4a 08 cmp 0x8(%edx),%ecx 10c307: 75 3b jne 10c344 <_Thread_Set_state+0x6c> */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 10c309: 8d 4a 04 lea 0x4(%edx),%ecx 10c30c: 89 0a mov %ecx,(%edx) the_chain->permanent_null = NULL; 10c30e: c7 42 04 00 00 00 00 movl $0x0,0x4(%edx) the_chain->last = _Chain_Head(the_chain); 10c315: 89 52 08 mov %edx,0x8(%edx) RTEMS_INLINE_ROUTINE void _Priority_Remove_from_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor &= the_priority_map->block_minor; 10c318: 8b 90 90 00 00 00 mov 0x90(%eax),%edx 10c31e: 66 8b 88 9a 00 00 00 mov 0x9a(%eax),%cx 10c325: 66 21 0a and %cx,(%edx) _Chain_Initialize_empty( ready ); _Priority_Remove_from_bit_map( &the_thread->Priority_map ); 10c328: 66 83 3a 00 cmpw $0x0,(%edx) 10c32c: 75 20 jne 10c34e <_Thread_Set_state+0x76> if ( *the_priority_map->minor == 0 ) _Priority_Major_bit_map &= the_priority_map->block_major; 10c32e: 66 8b 15 24 39 12 00 mov 0x123924,%dx 10c335: 23 90 98 00 00 00 and 0x98(%eax),%edx 10c33b: 66 89 15 24 39 12 00 mov %dx,0x123924 10c342: eb 0a jmp 10c34e <_Thread_Set_state+0x76> <== ALWAYS TAKEN ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 10c344: 8b 08 mov (%eax),%ecx previous = the_node->previous; 10c346: 8b 50 04 mov 0x4(%eax),%edx next->previous = previous; 10c349: 89 51 04 mov %edx,0x4(%ecx) previous->next = next; 10c34c: 89 0a mov %ecx,(%edx) } else _Chain_Extract_unprotected( &the_thread->Object.Node ); _ISR_Flash( level ); 10c34e: 53 push %ebx 10c34f: 9d popf 10c350: fa cli if ( _Thread_Is_heir( the_thread ) ) 10c351: 3b 05 00 39 12 00 cmp 0x123900,%eax 10c357: 75 38 jne 10c391 <_Thread_Set_state+0xb9> 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 ); 10c359: 66 8b 35 24 39 12 00 mov 0x123924,%si 10c360: 31 d2 xor %edx,%edx 10c362: 89 d1 mov %edx,%ecx 10c364: 66 0f bc ce bsf %si,%cx _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); 10c368: 0f b7 c9 movzwl %cx,%ecx 10c36b: 66 8b b4 09 9c 39 12 mov 0x12399c(%ecx,%ecx,1),%si 10c372: 00 10c373: 66 0f bc d6 bsf %si,%dx * ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) 10c377: c1 e1 04 shl $0x4,%ecx 10c37a: 0f b7 d2 movzwl %dx,%edx 10c37d: 01 d1 add %edx,%ecx 10c37f: 6b c9 0c imul $0xc,%ecx,%ecx 10c382: 8b 35 3c 38 12 00 mov 0x12383c,%esi 10c388: 8b 14 31 mov (%ecx,%esi,1),%edx 10c38b: 89 15 00 39 12 00 mov %edx,0x123900 _Thread_Calculate_heir(); if ( _Thread_Is_executing( the_thread ) ) 10c391: 3b 05 30 39 12 00 cmp 0x123930,%eax 10c397: 75 07 jne 10c3a0 <_Thread_Set_state+0xc8> _Context_Switch_necessary = true; 10c399: c6 05 40 39 12 00 01 movb $0x1,0x123940 _ISR_Enable( level ); 10c3a0: 53 push %ebx 10c3a1: 9d popf } 10c3a2: 5b pop %ebx 10c3a3: 5e pop %esi 10c3a4: c9 leave 10c3a5: c3 ret 0010c3a8 <_Thread_Set_transient>: */ void _Thread_Set_transient( Thread_Control *the_thread ) { 10c3a8: 55 push %ebp 10c3a9: 89 e5 mov %esp,%ebp 10c3ab: 56 push %esi 10c3ac: 53 push %ebx 10c3ad: 8b 45 08 mov 0x8(%ebp),%eax ISR_Level level; uint32_t old_state; Chain_Control *ready; ready = the_thread->ready; 10c3b0: 8b 90 8c 00 00 00 mov 0x8c(%eax),%edx _ISR_Disable( level ); 10c3b6: 9c pushf 10c3b7: fa cli 10c3b8: 59 pop %ecx old_state = the_thread->current_state; 10c3b9: 8b 58 10 mov 0x10(%eax),%ebx the_thread->current_state = _States_Set( STATES_TRANSIENT, old_state ); 10c3bc: 89 de mov %ebx,%esi 10c3be: 83 ce 04 or $0x4,%esi 10c3c1: 89 70 10 mov %esi,0x10(%eax) if ( _States_Is_ready( old_state ) ) { 10c3c4: 85 db test %ebx,%ebx 10c3c6: 75 4c jne 10c414 <_Thread_Set_transient+0x6c> if ( _Chain_Has_only_one_node( ready ) ) { 10c3c8: 8b 1a mov (%edx),%ebx 10c3ca: 3b 5a 08 cmp 0x8(%edx),%ebx 10c3cd: 75 3b jne 10c40a <_Thread_Set_transient+0x62> */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 10c3cf: 8d 5a 04 lea 0x4(%edx),%ebx 10c3d2: 89 1a mov %ebx,(%edx) the_chain->permanent_null = NULL; 10c3d4: c7 42 04 00 00 00 00 movl $0x0,0x4(%edx) the_chain->last = _Chain_Head(the_chain); 10c3db: 89 52 08 mov %edx,0x8(%edx) RTEMS_INLINE_ROUTINE void _Priority_Remove_from_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor &= the_priority_map->block_minor; 10c3de: 8b 90 90 00 00 00 mov 0x90(%eax),%edx 10c3e4: 66 8b 98 9a 00 00 00 mov 0x9a(%eax),%bx 10c3eb: 66 21 1a and %bx,(%edx) _Chain_Initialize_empty( ready ); _Priority_Remove_from_bit_map( &the_thread->Priority_map ); 10c3ee: 66 83 3a 00 cmpw $0x0,(%edx) 10c3f2: 75 20 jne 10c414 <_Thread_Set_transient+0x6c> if ( *the_priority_map->minor == 0 ) _Priority_Major_bit_map &= the_priority_map->block_major; 10c3f4: 66 8b 15 24 39 12 00 mov 0x123924,%dx 10c3fb: 23 90 98 00 00 00 and 0x98(%eax),%edx 10c401: 66 89 15 24 39 12 00 mov %dx,0x123924 10c408: eb 0a jmp 10c414 <_Thread_Set_transient+0x6c> <== ALWAYS TAKEN ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 10c40a: 8b 10 mov (%eax),%edx previous = the_node->previous; 10c40c: 8b 40 04 mov 0x4(%eax),%eax next->previous = previous; 10c40f: 89 42 04 mov %eax,0x4(%edx) previous->next = next; 10c412: 89 10 mov %edx,(%eax) } else _Chain_Extract_unprotected( &the_thread->Object.Node ); } _ISR_Enable( level ); 10c414: 51 push %ecx 10c415: 9d popf } 10c416: 5b pop %ebx 10c417: 5e pop %esi 10c418: c9 leave 10c419: c3 ret 0010c41c <_Thread_Stack_Allocate>: size_t _Thread_Stack_Allocate( Thread_Control *the_thread, size_t stack_size ) { 10c41c: 55 push %ebp 10c41d: 89 e5 mov %esp,%ebp 10c41f: 53 push %ebx 10c420: 83 ec 04 sub $0x4,%esp 10c423: a1 10 f9 11 00 mov 0x11f910,%eax 10c428: 8b 5d 0c mov 0xc(%ebp),%ebx 10c42b: 39 c3 cmp %eax,%ebx 10c42d: 73 02 jae 10c431 <_Thread_Stack_Allocate+0x15> 10c42f: 89 c3 mov %eax,%ebx * Call ONLY the CPU table stack allocate hook, _or_ the * the RTEMS workspace allocate. This is so the stack free * routine can call the correct deallocation routine. */ if ( Configuration.stack_allocate_hook ) { 10c431: a1 38 f9 11 00 mov 0x11f938,%eax 10c436: 85 c0 test %eax,%eax 10c438: 74 08 je 10c442 <_Thread_Stack_Allocate+0x26> stack_addr = (*Configuration.stack_allocate_hook)( the_stack_size ); 10c43a: 83 ec 0c sub $0xc,%esp 10c43d: 53 push %ebx 10c43e: ff d0 call *%eax 10c440: eb 0c jmp 10c44e <_Thread_Stack_Allocate+0x32> <== ALWAYS TAKEN RTEMS_INLINE_ROUTINE uint32_t _Stack_Adjust_size ( size_t size ) { return size + CPU_STACK_ALIGNMENT; 10c442: 83 c3 10 add $0x10,%ebx * get and keep the stack adjust factor, the stack alignment, and * the context initialization sequence in sync. */ the_stack_size = _Stack_Adjust_size( the_stack_size ); stack_addr = _Workspace_Allocate( the_stack_size ); 10c445: 83 ec 0c sub $0xc,%esp 10c448: 53 push %ebx 10c449: e8 3e 06 00 00 call 10ca8c <_Workspace_Allocate> <== ALWAYS TAKEN 10c44e: 83 c4 10 add $0x10,%esp } if ( !stack_addr ) 10c451: 31 d2 xor %edx,%edx 10c453: 85 c0 test %eax,%eax 10c455: 0f 95 c2 setne %dl 10c458: f7 da neg %edx 10c45a: 21 d3 and %edx,%ebx the_stack_size = 0; the_thread->Start.stack = stack_addr; 10c45c: 8b 55 08 mov 0x8(%ebp),%edx 10c45f: 89 82 cc 00 00 00 mov %eax,0xcc(%edx) return the_stack_size; } 10c465: 89 d8 mov %ebx,%eax 10c467: 8b 5d fc mov -0x4(%ebp),%ebx 10c46a: c9 leave 10c46b: c3 ret 0010c46c <_Thread_Stack_Free>: */ void _Thread_Stack_Free( Thread_Control *the_thread ) { 10c46c: 55 push %ebp 10c46d: 89 e5 mov %esp,%ebp 10c46f: 83 ec 08 sub $0x8,%esp * Call ONLY the CPU table stack free hook, or the * the RTEMS workspace free. This is so the free * routine properly matches the allocation of the stack. */ if ( Configuration.stack_free_hook ) 10c472: 8b 15 3c f9 11 00 mov 0x11f93c,%edx 10c478: 85 d2 test %edx,%edx 10c47a: 8b 45 08 mov 0x8(%ebp),%eax 10c47d: 8b 80 c4 00 00 00 mov 0xc4(%eax),%eax 10c483: 74 06 je 10c48b <_Thread_Stack_Free+0x1f> (*Configuration.stack_free_hook)( the_thread->Start.Initial_stack.area ); 10c485: 89 45 08 mov %eax,0x8(%ebp) else _Workspace_Free( the_thread->Start.Initial_stack.area ); } 10c488: c9 leave * the RTEMS workspace free. This is so the free * routine properly matches the allocation of the stack. */ if ( Configuration.stack_free_hook ) (*Configuration.stack_free_hook)( the_thread->Start.Initial_stack.area ); 10c489: ff e2 jmp *%edx else _Workspace_Free( the_thread->Start.Initial_stack.area ); 10c48b: 89 45 08 mov %eax,0x8(%ebp) } 10c48e: c9 leave */ if ( Configuration.stack_free_hook ) (*Configuration.stack_free_hook)( the_thread->Start.Initial_stack.area ); else _Workspace_Free( the_thread->Start.Initial_stack.area ); 10c48f: e9 11 06 00 00 jmp 10caa5 <_Workspace_Free> <== ALWAYS TAKEN 0010c4ec <_Thread_Start>: Thread_Start_types the_prototype, void *entry_point, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { 10c4ec: 55 push %ebp 10c4ed: 89 e5 mov %esp,%ebp 10c4ef: 53 push %ebx 10c4f0: 83 ec 04 sub $0x4,%esp 10c4f3: 8b 5d 08 mov 0x8(%ebp),%ebx if ( _States_Is_dormant( the_thread->current_state ) ) { 10c4f6: 31 c0 xor %eax,%eax 10c4f8: f6 43 10 01 testb $0x1,0x10(%ebx) 10c4fc: 74 42 je 10c540 <_Thread_Start+0x54> the_thread->Start.entry_point = (Thread_Entry) entry_point; 10c4fe: 8b 45 10 mov 0x10(%ebp),%eax 10c501: 89 83 9c 00 00 00 mov %eax,0x9c(%ebx) the_thread->Start.prototype = the_prototype; 10c507: 8b 45 0c mov 0xc(%ebp),%eax 10c50a: 89 83 a0 00 00 00 mov %eax,0xa0(%ebx) the_thread->Start.pointer_argument = pointer_argument; 10c510: 8b 45 14 mov 0x14(%ebp),%eax 10c513: 89 83 a4 00 00 00 mov %eax,0xa4(%ebx) the_thread->Start.numeric_argument = numeric_argument; 10c519: 8b 45 18 mov 0x18(%ebp),%eax 10c51c: 89 83 a8 00 00 00 mov %eax,0xa8(%ebx) _Thread_Load_environment( the_thread ); 10c522: 83 ec 0c sub $0xc,%esp 10c525: 53 push %ebx 10c526: e8 a1 22 00 00 call 10e7cc <_Thread_Load_environment> _Thread_Ready( the_thread ); 10c52b: 89 1c 24 mov %ebx,(%esp) 10c52e: e8 fd 24 00 00 call 10ea30 <_Thread_Ready> <== ALWAYS TAKEN _User_extensions_Thread_start( the_thread ); 10c533: 89 1c 24 mov %ebx,(%esp) 10c536: e8 d1 02 00 00 call 10c80c <_User_extensions_Thread_start> <== ALWAYS TAKEN 10c53b: b0 01 mov $0x1,%al return true; 10c53d: 83 c4 10 add $0x10,%esp } return false; } 10c540: 8b 5d fc mov -0x4(%ebp),%ebx 10c543: c9 leave 10c544: c3 ret 0010c494 <_Thread_Start_multitasking>: * ready chain * select heir */ void _Thread_Start_multitasking( void ) { 10c494: 55 push %ebp 10c495: 89 e5 mov %esp,%ebp 10c497: 83 ec 08 sub $0x8,%esp 10c49a: c7 05 0c 3a 12 00 03 movl $0x3,0x123a0c 10c4a1: 00 00 00 * the system is shut down. */ _System_state_Set( SYSTEM_STATE_UP ); _Context_Switch_necessary = false; 10c4a4: c6 05 40 39 12 00 00 movb $0x0,0x123940 _Thread_Executing = _Thread_Heir; 10c4ab: a1 00 39 12 00 mov 0x123900,%eax 10c4b0: a3 30 39 12 00 mov %eax,0x123930 #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) /* * don't need to worry about saving BSP's floating point state */ if ( _Thread_Heir->fp_context != NULL ) 10c4b5: 83 b8 e8 00 00 00 00 cmpl $0x0,0xe8(%eax) 10c4bc: 74 11 je 10c4cf <_Thread_Start_multitasking+0x3b> _Context_Restore_fp( &_Thread_Heir->fp_context ); 10c4be: 83 ec 0c sub $0xc,%esp 10c4c1: 05 e8 00 00 00 add $0xe8,%eax 10c4c6: 50 push %eax 10c4c7: e8 82 06 00 00 call 10cb4e <_CPU_Context_restore_fp> <== ALWAYS TAKEN 10c4cc: 83 c4 10 add $0x10,%esp #endif _Context_Switch( &_Thread_BSP_context, &_Thread_Heir->Registers ); 10c4cf: 50 push %eax 10c4d0: 50 push %eax 10c4d1: a1 00 39 12 00 mov 0x123900,%eax 10c4d6: 05 d0 00 00 00 add $0xd0,%eax 10c4db: 50 push %eax 10c4dc: 68 5c 38 12 00 push $0x12385c 10c4e1: e8 2a 06 00 00 call 10cb10 <_CPU_Context_switch> <== ALWAYS TAKEN 10c4e6: 83 c4 10 add $0x10,%esp } 10c4e9: c9 leave 10c4ea: c3 ret 0010eb2c <_Thread_Suspend>: */ void _Thread_Suspend( Thread_Control *the_thread ) { 10eb2c: 55 push %ebp 10eb2d: 89 e5 mov %esp,%ebp 10eb2f: 56 push %esi 10eb30: 53 push %ebx 10eb31: 8b 45 08 mov 0x8(%ebp),%eax ISR_Level level; Chain_Control *ready; ready = the_thread->ready; 10eb34: 8b 90 8c 00 00 00 mov 0x8c(%eax),%edx _ISR_Disable( level ); 10eb3a: 9c pushf 10eb3b: fa cli 10eb3c: 5b pop %ebx #if defined(RTEMS_ITRON_API) the_thread->suspend_count++; #endif if ( !_States_Is_ready( the_thread->current_state ) ) { 10eb3d: 8b 48 10 mov 0x10(%eax),%ecx 10eb40: 85 c9 test %ecx,%ecx 10eb42: 74 0d je 10eb51 <_Thread_Suspend+0x25> the_thread->current_state = 10eb44: 83 c9 02 or $0x2,%ecx 10eb47: 89 48 10 mov %ecx,0x10(%eax) _States_Set( STATES_SUSPENDED, the_thread->current_state ); _ISR_Enable( level ); 10eb4a: 53 push %ebx 10eb4b: 9d popf return; 10eb4c: e9 a7 00 00 00 jmp 10ebf8 <_Thread_Suspend+0xcc> <== ALWAYS TAKEN } the_thread->current_state = STATES_SUSPENDED; 10eb51: c7 40 10 02 00 00 00 movl $0x2,0x10(%eax) if ( _Chain_Has_only_one_node( ready ) ) { 10eb58: 8b 0a mov (%edx),%ecx 10eb5a: 3b 4a 08 cmp 0x8(%edx),%ecx 10eb5d: 75 3b jne 10eb9a <_Thread_Suspend+0x6e> */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 10eb5f: 8d 4a 04 lea 0x4(%edx),%ecx 10eb62: 89 0a mov %ecx,(%edx) the_chain->permanent_null = NULL; 10eb64: c7 42 04 00 00 00 00 movl $0x0,0x4(%edx) the_chain->last = _Chain_Head(the_chain); 10eb6b: 89 52 08 mov %edx,0x8(%edx) RTEMS_INLINE_ROUTINE void _Priority_Remove_from_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor &= the_priority_map->block_minor; 10eb6e: 8b 90 90 00 00 00 mov 0x90(%eax),%edx 10eb74: 66 8b 88 9a 00 00 00 mov 0x9a(%eax),%cx 10eb7b: 66 21 0a and %cx,(%edx) _Chain_Initialize_empty( ready ); _Priority_Remove_from_bit_map( &the_thread->Priority_map ); 10eb7e: 66 83 3a 00 cmpw $0x0,(%edx) 10eb82: 75 20 jne 10eba4 <_Thread_Suspend+0x78> if ( *the_priority_map->minor == 0 ) _Priority_Major_bit_map &= the_priority_map->block_major; 10eb84: 66 8b 15 24 39 12 00 mov 0x123924,%dx 10eb8b: 23 90 98 00 00 00 and 0x98(%eax),%edx 10eb91: 66 89 15 24 39 12 00 mov %dx,0x123924 10eb98: eb 0a jmp 10eba4 <_Thread_Suspend+0x78> <== ALWAYS TAKEN ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 10eb9a: 8b 08 mov (%eax),%ecx previous = the_node->previous; 10eb9c: 8b 50 04 mov 0x4(%eax),%edx next->previous = previous; 10eb9f: 89 51 04 mov %edx,0x4(%ecx) previous->next = next; 10eba2: 89 0a mov %ecx,(%edx) } else _Chain_Extract_unprotected( &the_thread->Object.Node ); _ISR_Flash( level ); 10eba4: 53 push %ebx 10eba5: 9d popf 10eba6: fa cli if ( _Thread_Is_heir( the_thread ) ) 10eba7: 3b 05 00 39 12 00 cmp 0x123900,%eax 10ebad: 75 38 jne 10ebe7 <_Thread_Suspend+0xbb> 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 ); 10ebaf: 66 8b 35 24 39 12 00 mov 0x123924,%si 10ebb6: 31 d2 xor %edx,%edx 10ebb8: 89 d1 mov %edx,%ecx 10ebba: 66 0f bc ce bsf %si,%cx _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); 10ebbe: 0f b7 c9 movzwl %cx,%ecx 10ebc1: 66 8b b4 09 9c 39 12 mov 0x12399c(%ecx,%ecx,1),%si 10ebc8: 00 10ebc9: 66 0f bc d6 bsf %si,%dx * ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) 10ebcd: c1 e1 04 shl $0x4,%ecx 10ebd0: 0f b7 d2 movzwl %dx,%edx 10ebd3: 01 d1 add %edx,%ecx 10ebd5: 6b c9 0c imul $0xc,%ecx,%ecx 10ebd8: 8b 35 3c 38 12 00 mov 0x12383c,%esi 10ebde: 8b 14 31 mov (%ecx,%esi,1),%edx 10ebe1: 89 15 00 39 12 00 mov %edx,0x123900 _Thread_Calculate_heir(); if ( _Thread_Is_executing( the_thread ) ) 10ebe7: 3b 05 30 39 12 00 cmp 0x123930,%eax 10ebed: 75 07 jne 10ebf6 <_Thread_Suspend+0xca> _Context_Switch_necessary = true; 10ebef: c6 05 40 39 12 00 01 movb $0x1,0x123940 _ISR_Enable( level ); 10ebf6: 53 push %ebx 10ebf7: 9d popf } 10ebf8: 5b pop %ebx 10ebf9: 5e pop %esi 10ebfa: c9 leave 10ebfb: c3 ret 0010c584 <_Thread_Yield_processor>: * ready chain * select heir */ void _Thread_Yield_processor( void ) { 10c584: 55 push %ebp 10c585: 89 e5 mov %esp,%ebp 10c587: 56 push %esi 10c588: 53 push %ebx ISR_Level level; Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; 10c589: a1 30 39 12 00 mov 0x123930,%eax ready = executing->ready; 10c58e: 8b 90 8c 00 00 00 mov 0x8c(%eax),%edx _ISR_Disable( level ); 10c594: 9c pushf 10c595: fa cli 10c596: 59 pop %ecx if ( !_Chain_Has_only_one_node( ready ) ) { 10c597: 8b 1a mov (%edx),%ebx 10c599: 3b 5a 08 cmp 0x8(%edx),%ebx 10c59c: 74 2e je 10c5cc <_Thread_Yield_processor+0x48> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 10c59e: 8b 30 mov (%eax),%esi previous = the_node->previous; 10c5a0: 8b 58 04 mov 0x4(%eax),%ebx next->previous = previous; 10c5a3: 89 5e 04 mov %ebx,0x4(%esi) previous->next = next; 10c5a6: 89 33 mov %esi,(%ebx) Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 10c5a8: 8d 5a 04 lea 0x4(%edx),%ebx 10c5ab: 89 18 mov %ebx,(%eax) old_last_node = the_chain->last; 10c5ad: 8b 5a 08 mov 0x8(%edx),%ebx the_chain->last = the_node; 10c5b0: 89 42 08 mov %eax,0x8(%edx) old_last_node->next = the_node; 10c5b3: 89 03 mov %eax,(%ebx) the_node->previous = old_last_node; 10c5b5: 89 58 04 mov %ebx,0x4(%eax) _Chain_Extract_unprotected( &executing->Object.Node ); _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); 10c5b8: 51 push %ecx 10c5b9: 9d popf 10c5ba: fa cli if ( _Thread_Is_heir( executing ) ) 10c5bb: 3b 05 00 39 12 00 cmp 0x123900,%eax 10c5c1: 75 11 jne 10c5d4 <_Thread_Yield_processor+0x50> <== ALWAYS TAKEN _Thread_Heir = (Thread_Control *) ready->first; 10c5c3: 8b 02 mov (%edx),%eax 10c5c5: a3 00 39 12 00 mov %eax,0x123900 10c5ca: eb 08 jmp 10c5d4 <_Thread_Yield_processor+0x50> <== ALWAYS TAKEN _Context_Switch_necessary = true; } else if ( !_Thread_Is_heir( executing ) ) 10c5cc: 3b 05 00 39 12 00 cmp 0x123900,%eax 10c5d2: 74 07 je 10c5db <_Thread_Yield_processor+0x57> <== NEVER TAKEN _Context_Switch_necessary = true; 10c5d4: c6 05 40 39 12 00 01 movb $0x1,0x123940 _ISR_Enable( level ); 10c5db: 51 push %ecx 10c5dc: 9d popf } 10c5dd: 5b pop %ebx 10c5de: 5e pop %esi 10c5df: c9 leave 10c5e0: c3 ret 0010b62c <_Thread_blocking_operation_Cancel>: Thread_blocking_operation_States sync_state __attribute__((unused)), #endif Thread_Control *the_thread, ISR_Level level ) { 10b62c: 55 push %ebp 10b62d: 89 e5 mov %esp,%ebp 10b62f: 53 push %ebx 10b630: 83 ec 04 sub $0x4,%esp 10b633: 8b 5d 0c mov 0xc(%ebp),%ebx 10b636: 8b 45 10 mov 0x10(%ebp),%eax #endif /* * The thread is not waiting on anything after this completes. */ the_thread->Wait.queue = NULL; 10b639: c7 43 44 00 00 00 00 movl $0x0,0x44(%ebx) /* * If the sync state is timed out, this is very likely not needed. * But better safe than sorry when it comes to critical sections. */ if ( _Watchdog_Is_active( &the_thread->Timer ) ) { 10b640: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 10b644: 75 1a jne 10b660 <_Thread_blocking_operation_Cancel+0x34> RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 10b646: c7 43 50 03 00 00 00 movl $0x3,0x50(%ebx) _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 10b64d: 50 push %eax 10b64e: 9d popf (void) _Watchdog_Remove( &the_thread->Timer ); 10b64f: 83 ec 0c sub $0xc,%esp 10b652: 8d 43 48 lea 0x48(%ebx),%eax 10b655: 50 push %eax 10b656: e8 35 13 00 00 call 10c990 <_Watchdog_Remove> 10b65b: 83 c4 10 add $0x10,%esp 10b65e: eb 02 jmp 10b662 <_Thread_blocking_operation_Cancel+0x36> <== ALWAYS TAKEN } else _ISR_Enable( level ); 10b660: 50 push %eax 10b661: 9d popf RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 10b662: c7 45 0c f8 ff 03 10 movl $0x1003fff8,0xc(%ebp) 10b669: 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 } 10b66c: 8b 5d fc mov -0x4(%ebp),%ebx 10b66f: c9 leave 10b670: e9 23 01 00 00 jmp 10b798 <_Thread_Clear_state> <== ALWAYS TAKEN 0010e85c <_Thread_queue_Dequeue_fifo>: */ Thread_Control *_Thread_queue_Dequeue_fifo( Thread_queue_Control *the_thread_queue ) { 10e85c: 55 push %ebp 10e85d: 89 e5 mov %esp,%ebp 10e85f: 53 push %ebx 10e860: 83 ec 04 sub $0x4,%esp 10e863: 8b 45 08 mov 0x8(%ebp),%eax ISR_Level level; Thread_Control *the_thread; _ISR_Disable( level ); 10e866: 9c pushf 10e867: fa cli 10e868: 5a pop %edx */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 10e869: 8b 18 mov (%eax),%ebx */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10e86b: 8d 48 04 lea 0x4(%eax),%ecx 10e86e: 39 cb cmp %ecx,%ebx 10e870: 74 41 je 10e8b3 <_Thread_queue_Dequeue_fifo+0x57> { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; 10e872: 8b 0b mov (%ebx),%ecx the_chain->first = new_first; 10e874: 89 08 mov %ecx,(%eax) new_first->previous = _Chain_Head(the_chain); 10e876: 89 41 04 mov %eax,0x4(%ecx) if ( !_Chain_Is_empty( &the_thread_queue->Queues.Fifo ) ) { the_thread = (Thread_Control *) _Chain_Get_first_unprotected( &the_thread_queue->Queues.Fifo ); the_thread->Wait.queue = NULL; 10e879: c7 43 44 00 00 00 00 movl $0x0,0x44(%ebx) if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 10e880: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 10e884: 74 06 je 10e88c <_Thread_queue_Dequeue_fifo+0x30> _ISR_Enable( level ); 10e886: 52 push %edx 10e887: 9d popf RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 10e888: 51 push %ecx 10e889: 51 push %ecx 10e88a: eb 17 jmp 10e8a3 <_Thread_queue_Dequeue_fifo+0x47> <== ALWAYS TAKEN RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 10e88c: c7 43 50 03 00 00 00 movl $0x3,0x50(%ebx) _Thread_Unblock( the_thread ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 10e893: 52 push %edx 10e894: 9d popf (void) _Watchdog_Remove( &the_thread->Timer ); 10e895: 83 ec 0c sub $0xc,%esp 10e898: 8d 43 48 lea 0x48(%ebx),%eax 10e89b: 50 push %eax 10e89c: e8 ef e0 ff ff call 10c990 <_Watchdog_Remove> 10e8a1: 58 pop %eax 10e8a2: 5a pop %edx 10e8a3: 68 f8 ff 03 10 push $0x1003fff8 10e8a8: 53 push %ebx 10e8a9: e8 ea ce ff ff call 10b798 <_Thread_Clear_state> 10e8ae: 83 c4 10 add $0x10,%esp 10e8b1: eb 04 jmp 10e8b7 <_Thread_queue_Dequeue_fifo+0x5b> <== ALWAYS TAKEN #endif return the_thread; } _ISR_Enable( level ); 10e8b3: 52 push %edx 10e8b4: 9d popf 10e8b5: 31 db xor %ebx,%ebx return NULL; } 10e8b7: 89 d8 mov %ebx,%eax 10e8b9: 8b 5d fc mov -0x4(%ebp),%ebx 10e8bc: c9 leave 10e8bd: c3 ret 0010bec4 <_Thread_queue_Dequeue_priority>: */ Thread_Control *_Thread_queue_Dequeue_priority( Thread_queue_Control *the_thread_queue ) { 10bec4: 55 push %ebp 10bec5: 89 e5 mov %esp,%ebp 10bec7: 57 push %edi 10bec8: 56 push %esi 10bec9: 53 push %ebx 10beca: 83 ec 1c sub $0x1c,%esp 10becd: 8b 4d 08 mov 0x8(%ebp),%ecx Chain_Node *new_second_node; Chain_Node *last_node; Chain_Node *next_node; Chain_Node *previous_node; _ISR_Disable( level ); 10bed0: 9c pushf 10bed1: fa cli 10bed2: 8f 45 e4 popl -0x1c(%ebp) 10bed5: 89 ca mov %ecx,%edx 10bed7: 31 c0 xor %eax,%eax */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10bed9: 8d 5a 04 lea 0x4(%edx),%ebx 10bedc: 39 1a cmp %ebx,(%edx) 10bede: 74 1e je 10befe <_Thread_queue_Dequeue_priority+0x3a> for( index=0 ; index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ; index++ ) { if ( !_Chain_Is_empty( &the_thread_queue->Queues.Priority[ index ] ) ) { the_thread = (Thread_Control *) 10bee0: 6b c0 0c imul $0xc,%eax,%eax 10bee3: 8b 1c 08 mov (%eax,%ecx,1),%ebx */ _ISR_Enable( level ); return NULL; dequeue: the_thread->Wait.queue = NULL; 10bee6: c7 43 44 00 00 00 00 movl $0x0,0x44(%ebx) new_first_node = the_thread->Wait.Block2n.first; 10beed: 8b 43 38 mov 0x38(%ebx),%eax new_first_thread = (Thread_Control *) new_first_node; next_node = the_thread->Object.Node.next; 10bef0: 8b 13 mov (%ebx),%edx previous_node = the_thread->Object.Node.previous; 10bef2: 8b 4b 04 mov 0x4(%ebx),%ecx 10bef5: 8d 73 3c lea 0x3c(%ebx),%esi 10bef8: 39 f0 cmp %esi,%eax 10befa: 75 13 jne 10bf0f <_Thread_queue_Dequeue_priority+0x4b> 10befc: eb 3b jmp 10bf39 <_Thread_queue_Dequeue_priority+0x75> <== ALWAYS TAKEN Chain_Node *previous_node; _ISR_Disable( level ); for( index=0 ; index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ; index++ ) { 10befe: 40 inc %eax 10beff: 83 c2 0c add $0xc,%edx Chain_Node *last_node; Chain_Node *next_node; Chain_Node *previous_node; _ISR_Disable( level ); for( index=0 ; 10bf02: 83 f8 04 cmp $0x4,%eax 10bf05: 75 d2 jne 10bed9 <_Thread_queue_Dequeue_priority+0x15> } /* * We did not find a thread to unblock. */ _ISR_Enable( level ); 10bf07: ff 75 e4 pushl -0x1c(%ebp) 10bf0a: 9d popf 10bf0b: 31 db xor %ebx,%ebx return NULL; 10bf0d: eb 64 jmp 10bf73 <_Thread_queue_Dequeue_priority+0xaf> <== ALWAYS TAKEN new_first_thread = (Thread_Control *) new_first_node; next_node = the_thread->Object.Node.next; previous_node = the_thread->Object.Node.previous; if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) { last_node = the_thread->Wait.Block2n.last; 10bf0f: 8b 73 40 mov 0x40(%ebx),%esi new_second_node = new_first_node->next; 10bf12: 8b 38 mov (%eax),%edi previous_node->next = new_first_node; 10bf14: 89 01 mov %eax,(%ecx) next_node->previous = new_first_node; 10bf16: 89 42 04 mov %eax,0x4(%edx) new_first_node->next = next_node; 10bf19: 89 10 mov %edx,(%eax) new_first_node->previous = previous_node; 10bf1b: 89 48 04 mov %ecx,0x4(%eax) if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) { 10bf1e: 8b 53 38 mov 0x38(%ebx),%edx 10bf21: 3b 53 40 cmp 0x40(%ebx),%edx 10bf24: 74 18 je 10bf3e <_Thread_queue_Dequeue_priority+0x7a> /* > two threads on 2-n */ new_second_node->previous = 10bf26: 8d 50 38 lea 0x38(%eax),%edx 10bf29: 89 57 04 mov %edx,0x4(%edi) _Chain_Head( &new_first_thread->Wait.Block2n ); new_first_thread->Wait.Block2n.first = new_second_node; 10bf2c: 89 78 38 mov %edi,0x38(%eax) new_first_thread->Wait.Block2n.last = last_node; 10bf2f: 89 70 40 mov %esi,0x40(%eax) last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n ); 10bf32: 83 c0 3c add $0x3c,%eax 10bf35: 89 06 mov %eax,(%esi) 10bf37: eb 05 jmp 10bf3e <_Thread_queue_Dequeue_priority+0x7a> <== ALWAYS TAKEN } } else { previous_node->next = next_node; 10bf39: 89 11 mov %edx,(%ecx) next_node->previous = previous_node; 10bf3b: 89 4a 04 mov %ecx,0x4(%edx) } if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 10bf3e: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 10bf42: 74 08 je 10bf4c <_Thread_queue_Dequeue_priority+0x88> _ISR_Enable( level ); 10bf44: ff 75 e4 pushl -0x1c(%ebp) 10bf47: 9d popf RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 10bf48: 51 push %ecx 10bf49: 51 push %ecx 10bf4a: eb 19 jmp 10bf65 <_Thread_queue_Dequeue_priority+0xa1> <== ALWAYS TAKEN RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 10bf4c: c7 43 50 03 00 00 00 movl $0x3,0x50(%ebx) _Thread_Unblock( the_thread ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 10bf53: ff 75 e4 pushl -0x1c(%ebp) 10bf56: 9d popf (void) _Watchdog_Remove( &the_thread->Timer ); 10bf57: 83 ec 0c sub $0xc,%esp 10bf5a: 8d 43 48 lea 0x48(%ebx),%eax 10bf5d: 50 push %eax 10bf5e: e8 2d 0a 00 00 call 10c990 <_Watchdog_Remove> 10bf63: 58 pop %eax 10bf64: 5a pop %edx 10bf65: 68 f8 ff 03 10 push $0x1003fff8 10bf6a: 53 push %ebx 10bf6b: e8 28 f8 ff ff call 10b798 <_Thread_Clear_state> <== ALWAYS TAKEN 10bf70: 83 c4 10 add $0x10,%esp #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif return( the_thread ); } 10bf73: 89 d8 mov %ebx,%eax 10bf75: 8d 65 f4 lea -0xc(%ebp),%esp 10bf78: 5b pop %ebx 10bf79: 5e pop %esi 10bf7a: 5f pop %edi 10bf7b: c9 leave 10bf7c: c3 ret 0010e8c0 <_Thread_queue_Enqueue_fifo>: Thread_blocking_operation_States _Thread_queue_Enqueue_fifo ( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread, ISR_Level *level_p ) { 10e8c0: 55 push %ebp 10e8c1: 89 e5 mov %esp,%ebp 10e8c3: 56 push %esi 10e8c4: 53 push %ebx 10e8c5: 8b 55 08 mov 0x8(%ebp),%edx 10e8c8: 8b 4d 0c mov 0xc(%ebp),%ecx Thread_blocking_operation_States sync_state; ISR_Level level; _ISR_Disable( level ); 10e8cb: 9c pushf 10e8cc: fa cli 10e8cd: 5b pop %ebx sync_state = the_thread_queue->sync_state; 10e8ce: 8b 42 30 mov 0x30(%edx),%eax the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 10e8d1: c7 42 30 00 00 00 00 movl $0x0,0x30(%edx) if (sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) { 10e8d8: 83 f8 01 cmp $0x1,%eax 10e8db: 75 17 jne 10e8f4 <_Thread_queue_Enqueue_fifo+0x34> Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 10e8dd: 8d 72 04 lea 0x4(%edx),%esi 10e8e0: 89 31 mov %esi,(%ecx) old_last_node = the_chain->last; 10e8e2: 8b 72 08 mov 0x8(%edx),%esi the_chain->last = the_node; 10e8e5: 89 4a 08 mov %ecx,0x8(%edx) old_last_node->next = the_node; 10e8e8: 89 0e mov %ecx,(%esi) the_node->previous = old_last_node; 10e8ea: 89 71 04 mov %esi,0x4(%ecx) _Chain_Append_unprotected( &the_thread_queue->Queues.Fifo, &the_thread->Object.Node ); the_thread->Wait.queue = the_thread_queue; 10e8ed: 89 51 44 mov %edx,0x44(%ecx) the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; _ISR_Enable( level ); 10e8f0: 53 push %ebx 10e8f1: 9d popf return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 10e8f2: eb 05 jmp 10e8f9 <_Thread_queue_Enqueue_fifo+0x39> <== ALWAYS TAKEN * For example, the blocking thread could have been given * the mutex by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ *level_p = level; 10e8f4: 8b 55 10 mov 0x10(%ebp),%edx 10e8f7: 89 1a mov %ebx,(%edx) return sync_state; } 10e8f9: 5b pop %ebx 10e8fa: 5e pop %esi 10e8fb: c9 leave 10e8fc: c3 ret 0010c00c <_Thread_queue_Enqueue_priority>: Thread_blocking_operation_States _Thread_queue_Enqueue_priority ( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread, ISR_Level *level_p ) { 10c00c: 55 push %ebp 10c00d: 89 e5 mov %esp,%ebp 10c00f: 57 push %edi 10c010: 56 push %esi 10c011: 53 push %ebx 10c012: 83 ec 10 sub $0x10,%esp 10c015: 8b 4d 08 mov 0x8(%ebp),%ecx 10c018: 8b 45 0c mov 0xc(%ebp),%eax */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 10c01b: 8d 50 3c lea 0x3c(%eax),%edx 10c01e: 89 50 38 mov %edx,0x38(%eax) the_chain->permanent_null = NULL; 10c021: c7 40 3c 00 00 00 00 movl $0x0,0x3c(%eax) the_chain->last = _Chain_Head(the_chain); 10c028: 8d 50 38 lea 0x38(%eax),%edx 10c02b: 89 50 40 mov %edx,0x40(%eax) Priority_Control priority; States_Control block_state; _Chain_Initialize_empty( &the_thread->Wait.Block2n ); priority = the_thread->current_priority; 10c02e: 8b 58 14 mov 0x14(%eax),%ebx header_index = _Thread_queue_Header_number( priority ); header = &the_thread_queue->Queues.Priority[ header_index ]; 10c031: 89 de mov %ebx,%esi 10c033: c1 ee 06 shr $0x6,%esi 10c036: 6b f6 0c imul $0xc,%esi,%esi 10c039: 8d 34 31 lea (%ecx,%esi,1),%esi block_state = the_thread_queue->state; 10c03c: 8b 79 38 mov 0x38(%ecx),%edi if ( _Thread_queue_Is_reverse_search( priority ) ) 10c03f: f6 c3 20 test $0x20,%bl 10c042: 75 70 jne 10c0b4 <_Thread_queue_Enqueue_priority+0xa8> */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10c044: 8d 56 04 lea 0x4(%esi),%edx 10c047: 89 55 e8 mov %edx,-0x18(%ebp) goto restart_reverse_search; restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); 10c04a: 9c pushf 10c04b: fa cli 10c04c: 8f 45 f0 popl -0x10(%ebp) search_thread = (Thread_Control *) header->first; 10c04f: 8b 16 mov (%esi),%edx 10c051: c7 45 ec ff ff ff ff movl $0xffffffff,-0x14(%ebp) 10c058: 89 75 e4 mov %esi,-0x1c(%ebp) while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 10c05b: eb 1f jmp 10c07c <_Thread_queue_Enqueue_priority+0x70> <== ALWAYS TAKEN search_priority = search_thread->current_priority; 10c05d: 8b 72 14 mov 0x14(%edx),%esi 10c060: 89 75 ec mov %esi,-0x14(%ebp) if ( priority <= search_priority ) 10c063: 39 f3 cmp %esi,%ebx 10c065: 76 1a jbe 10c081 <_Thread_queue_Enqueue_priority+0x75> break; search_priority = search_thread->current_priority; if ( priority <= search_priority ) break; #endif _ISR_Flash( level ); 10c067: ff 75 f0 pushl -0x10(%ebp) 10c06a: 9d popf 10c06b: fa cli if ( !_States_Are_set( search_thread->current_state, block_state) ) { 10c06c: 85 7a 10 test %edi,0x10(%edx) 10c06f: 75 09 jne 10c07a <_Thread_queue_Enqueue_priority+0x6e> <== NEVER TAKEN 10c071: 8b 75 e4 mov -0x1c(%ebp),%esi <== NOT EXECUTED _ISR_Enable( level ); 10c074: ff 75 f0 pushl -0x10(%ebp) <== NOT EXECUTED 10c077: 9d popf <== NOT EXECUTED goto restart_forward_search; 10c078: eb d0 jmp 10c04a <_Thread_queue_Enqueue_priority+0x3e> <== NOT EXECUTED } search_thread = (Thread_Control *)search_thread->Object.Node.next; 10c07a: 8b 12 mov (%edx),%edx restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->first; while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 10c07c: 3b 55 e8 cmp -0x18(%ebp),%edx 10c07f: 75 dc jne 10c05d <_Thread_queue_Enqueue_priority+0x51> 10c081: 8b 75 f0 mov -0x10(%ebp),%esi } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != 10c084: 83 79 30 01 cmpl $0x1,0x30(%ecx) 10c088: 0f 85 a9 00 00 00 jne 10c137 <_Thread_queue_Enqueue_priority+0x12b> THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 10c08e: c7 41 30 00 00 00 00 movl $0x0,0x30(%ecx) if ( priority == search_priority ) 10c095: 3b 5d ec cmp -0x14(%ebp),%ebx 10c098: 0f 84 82 00 00 00 je 10c120 <_Thread_queue_Enqueue_priority+0x114> goto equal_priority; search_node = (Chain_Node *) search_thread; previous_node = search_node->previous; 10c09e: 8b 5a 04 mov 0x4(%edx),%ebx the_node = (Chain_Node *) the_thread; the_node->next = search_node; 10c0a1: 89 10 mov %edx,(%eax) the_node->previous = previous_node; 10c0a3: 89 58 04 mov %ebx,0x4(%eax) previous_node->next = the_node; 10c0a6: 89 03 mov %eax,(%ebx) search_node->previous = the_node; 10c0a8: 89 42 04 mov %eax,0x4(%edx) the_thread->Wait.queue = the_thread_queue; 10c0ab: 89 48 44 mov %ecx,0x44(%eax) _ISR_Enable( level ); 10c0ae: ff 75 f0 pushl -0x10(%ebp) 10c0b1: 9d popf 10c0b2: eb 65 jmp 10c119 <_Thread_queue_Enqueue_priority+0x10d> <== ALWAYS TAKEN return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; 10c0b4: 0f b6 15 14 f9 11 00 movzbl 0x11f914,%edx 10c0bb: 42 inc %edx 10c0bc: 89 55 ec mov %edx,-0x14(%ebp) _ISR_Disable( level ); 10c0bf: 9c pushf 10c0c0: fa cli 10c0c1: 8f 45 f0 popl -0x10(%ebp) search_thread = (Thread_Control *) header->last; 10c0c4: 8b 56 08 mov 0x8(%esi),%edx 10c0c7: 89 75 e8 mov %esi,-0x18(%ebp) while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { 10c0ca: eb 20 jmp 10c0ec <_Thread_queue_Enqueue_priority+0xe0> <== ALWAYS TAKEN search_priority = search_thread->current_priority; 10c0cc: 8b 72 14 mov 0x14(%edx),%esi 10c0cf: 89 75 ec mov %esi,-0x14(%ebp) if ( priority >= search_priority ) 10c0d2: 39 f3 cmp %esi,%ebx 10c0d4: 73 1b jae 10c0f1 <_Thread_queue_Enqueue_priority+0xe5> break; search_priority = search_thread->current_priority; if ( priority >= search_priority ) break; #endif _ISR_Flash( level ); 10c0d6: ff 75 f0 pushl -0x10(%ebp) 10c0d9: 9d popf 10c0da: fa cli if ( !_States_Are_set( search_thread->current_state, block_state) ) { 10c0db: 85 7a 10 test %edi,0x10(%edx) 10c0de: 75 09 jne 10c0e9 <_Thread_queue_Enqueue_priority+0xdd> 10c0e0: 8b 75 e8 mov -0x18(%ebp),%esi _ISR_Enable( level ); 10c0e3: ff 75 f0 pushl -0x10(%ebp) 10c0e6: 9d popf goto restart_reverse_search; 10c0e7: eb cb jmp 10c0b4 <_Thread_queue_Enqueue_priority+0xa8> <== ALWAYS TAKEN } search_thread = (Thread_Control *) 10c0e9: 8b 52 04 mov 0x4(%edx),%edx restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->last; while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { 10c0ec: 3b 55 e8 cmp -0x18(%ebp),%edx 10c0ef: 75 db jne 10c0cc <_Thread_queue_Enqueue_priority+0xc0> 10c0f1: 8b 75 f0 mov -0x10(%ebp),%esi } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != 10c0f4: 83 79 30 01 cmpl $0x1,0x30(%ecx) 10c0f8: 75 3d jne 10c137 <_Thread_queue_Enqueue_priority+0x12b> THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 10c0fa: c7 41 30 00 00 00 00 movl $0x0,0x30(%ecx) if ( priority == search_priority ) 10c101: 3b 5d ec cmp -0x14(%ebp),%ebx 10c104: 74 1a je 10c120 <_Thread_queue_Enqueue_priority+0x114> goto equal_priority; search_node = (Chain_Node *) search_thread; next_node = search_node->next; 10c106: 8b 1a mov (%edx),%ebx the_node = (Chain_Node *) the_thread; the_node->next = next_node; 10c108: 89 18 mov %ebx,(%eax) the_node->previous = search_node; 10c10a: 89 50 04 mov %edx,0x4(%eax) search_node->next = the_node; 10c10d: 89 02 mov %eax,(%edx) next_node->previous = the_node; 10c10f: 89 43 04 mov %eax,0x4(%ebx) the_thread->Wait.queue = the_thread_queue; 10c112: 89 48 44 mov %ecx,0x44(%eax) _ISR_Enable( level ); 10c115: ff 75 f0 pushl -0x10(%ebp) 10c118: 9d popf 10c119: b8 01 00 00 00 mov $0x1,%eax return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 10c11e: eb 1f jmp 10c13f <_Thread_queue_Enqueue_priority+0x133> <== ALWAYS TAKEN 10c120: 83 c2 3c add $0x3c,%edx equal_priority: /* add at end of priority group */ search_node = _Chain_Tail( &search_thread->Wait.Block2n ); previous_node = search_node->previous; 10c123: 8b 5a 04 mov 0x4(%edx),%ebx the_node = (Chain_Node *) the_thread; the_node->next = search_node; 10c126: 89 10 mov %edx,(%eax) the_node->previous = previous_node; 10c128: 89 58 04 mov %ebx,0x4(%eax) previous_node->next = the_node; 10c12b: 89 03 mov %eax,(%ebx) search_node->previous = the_node; 10c12d: 89 42 04 mov %eax,0x4(%edx) the_thread->Wait.queue = the_thread_queue; 10c130: 89 48 44 mov %ecx,0x44(%eax) _ISR_Enable( level ); 10c133: 56 push %esi 10c134: 9d popf 10c135: eb e2 jmp 10c119 <_Thread_queue_Enqueue_priority+0x10d> <== ALWAYS TAKEN * For example, the blocking thread could have been given * the mutex by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ *level_p = level; 10c137: 8b 45 10 mov 0x10(%ebp),%eax 10c13a: 89 30 mov %esi,(%eax) return the_thread_queue->sync_state; 10c13c: 8b 41 30 mov 0x30(%ecx),%eax } 10c13f: 83 c4 10 add $0x10,%esp 10c142: 5b pop %ebx 10c143: 5e pop %esi 10c144: 5f pop %edi 10c145: c9 leave 10c146: c3 ret 0010bf80 <_Thread_queue_Enqueue_with_handler>: void _Thread_queue_Enqueue_with_handler( Thread_queue_Control *the_thread_queue, Watchdog_Interval timeout, Thread_queue_Timeout_callout handler ) { 10bf80: 55 push %ebp 10bf81: 89 e5 mov %esp,%ebp 10bf83: 57 push %edi 10bf84: 56 push %esi 10bf85: 53 push %ebx 10bf86: 83 ec 24 sub $0x24,%esp 10bf89: 8b 75 08 mov 0x8(%ebp),%esi 10bf8c: 8b 7d 0c mov 0xc(%ebp),%edi Thread_queue_Control *, Thread_Control *, ISR_Level * ); the_thread = _Thread_Executing; 10bf8f: 8b 1d 30 39 12 00 mov 0x123930,%ebx else #endif /* * Set the blocking state for this thread queue in the thread. */ _Thread_Set_state( the_thread, the_thread_queue->state ); 10bf95: ff 76 38 pushl 0x38(%esi) 10bf98: 53 push %ebx 10bf99: e8 3a 03 00 00 call 10c2d8 <_Thread_Set_state> <== ALWAYS TAKEN /* * If the thread wants to timeout, then schedule its timer. */ if ( timeout ) { 10bf9e: 83 c4 10 add $0x10,%esp 10bfa1: 85 ff test %edi,%edi 10bfa3: 74 30 je 10bfd5 <_Thread_queue_Enqueue_with_handler+0x55> _Watchdog_Initialize( 10bfa5: 8b 43 08 mov 0x8(%ebx),%eax Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 10bfa8: c7 43 50 00 00 00 00 movl $0x0,0x50(%ebx) the_watchdog->routine = routine; 10bfaf: 8b 55 10 mov 0x10(%ebp),%edx 10bfb2: 89 53 64 mov %edx,0x64(%ebx) the_watchdog->id = id; 10bfb5: 89 43 68 mov %eax,0x68(%ebx) the_watchdog->user_data = user_data; 10bfb8: c7 43 6c 00 00 00 00 movl $0x0,0x6c(%ebx) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 10bfbf: 89 7b 54 mov %edi,0x54(%ebx) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 10bfc2: 57 push %edi 10bfc3: 57 push %edi 10bfc4: 8d 43 48 lea 0x48(%ebx),%eax 10bfc7: 50 push %eax 10bfc8: 68 50 39 12 00 push $0x123950 10bfcd: e8 a6 08 00 00 call 10c878 <_Watchdog_Insert> <== ALWAYS TAKEN 10bfd2: 83 c4 10 add $0x10,%esp } /* * Now enqueue the thread per the discipline for this thread queue. */ if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) 10bfd5: b8 0c c0 10 00 mov $0x10c00c,%eax 10bfda: 83 7e 34 01 cmpl $0x1,0x34(%esi) 10bfde: 74 05 je 10bfe5 <_Thread_queue_Enqueue_with_handler+0x65> 10bfe0: b8 c0 e8 10 00 mov $0x10e8c0,%eax enqueue_p = _Thread_queue_Enqueue_priority; else /* must be THREAD_QUEUE_DISCIPLINE_FIFO */ enqueue_p = _Thread_queue_Enqueue_fifo; sync_state = (*enqueue_p)( the_thread_queue, the_thread, &level ); 10bfe5: 51 push %ecx 10bfe6: 8d 55 e4 lea -0x1c(%ebp),%edx 10bfe9: 52 push %edx 10bfea: 53 push %ebx 10bfeb: 56 push %esi 10bfec: ff d0 call *%eax if ( sync_state != THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) 10bfee: 83 c4 10 add $0x10,%esp 10bff1: 83 f8 01 cmp $0x1,%eax 10bff4: 74 0e je 10c004 <_Thread_queue_Enqueue_with_handler+0x84> _Thread_blocking_operation_Cancel( sync_state, the_thread, level ); 10bff6: 52 push %edx 10bff7: ff 75 e4 pushl -0x1c(%ebp) 10bffa: 53 push %ebx 10bffb: 50 push %eax 10bffc: e8 2b f6 ff ff call 10b62c <_Thread_blocking_operation_Cancel> 10c001: 83 c4 10 add $0x10,%esp } 10c004: 8d 65 f4 lea -0xc(%ebp),%esp 10c007: 5b pop %ebx 10c008: 5e pop %esi 10c009: 5f pop %edi 10c00a: c9 leave 10c00b: c3 ret 0010e900 <_Thread_queue_Extract>: void _Thread_queue_Extract( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { 10e900: 55 push %ebp 10e901: 89 e5 mov %esp,%ebp 10e903: 83 ec 08 sub $0x8,%esp 10e906: 8b 45 08 mov 0x8(%ebp),%eax 10e909: 8b 55 0c mov 0xc(%ebp),%edx /* * Can not use indirect function pointer here since Extract priority * is a macro and the underlying methods do not have the same signature. */ if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) 10e90c: 83 78 34 01 cmpl $0x1,0x34(%eax) 10e910: 75 0f jne 10e921 <_Thread_queue_Extract+0x21> _Thread_queue_Extract_priority( the_thread_queue, the_thread ); 10e912: 51 push %ecx 10e913: 6a 00 push $0x0 10e915: 52 push %edx 10e916: 50 push %eax 10e917: e8 14 00 00 00 call 10e930 <_Thread_queue_Extract_priority_helper> <== ALWAYS TAKEN 10e91c: 83 c4 10 add $0x10,%esp else /* must be THREAD_QUEUE_DISCIPLINE_FIFO */ _Thread_queue_Extract_fifo( the_thread_queue, the_thread ); } 10e91f: c9 leave 10e920: c3 ret * is a macro and the underlying methods do not have the same signature. */ if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) _Thread_queue_Extract_priority( the_thread_queue, the_thread ); else /* must be THREAD_QUEUE_DISCIPLINE_FIFO */ _Thread_queue_Extract_fifo( the_thread_queue, the_thread ); 10e921: 89 55 0c mov %edx,0xc(%ebp) 10e924: 89 45 08 mov %eax,0x8(%ebp) } 10e927: c9 leave * is a macro and the underlying methods do not have the same signature. */ if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) _Thread_queue_Extract_priority( the_thread_queue, the_thread ); else /* must be THREAD_QUEUE_DISCIPLINE_FIFO */ _Thread_queue_Extract_fifo( the_thread_queue, the_thread ); 10e928: e9 9b 14 00 00 jmp 10fdc8 <_Thread_queue_Extract_fifo> 0010fdc8 <_Thread_queue_Extract_fifo>: void _Thread_queue_Extract_fifo( Thread_queue_Control *the_thread_queue __attribute__((unused)), Thread_Control *the_thread ) { 10fdc8: 55 push %ebp 10fdc9: 89 e5 mov %esp,%ebp 10fdcb: 53 push %ebx 10fdcc: 83 ec 04 sub $0x4,%esp 10fdcf: 8b 5d 0c mov 0xc(%ebp),%ebx ISR_Level level; _ISR_Disable( level ); 10fdd2: 9c pushf 10fdd3: fa cli 10fdd4: 58 pop %eax if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 10fdd5: f7 43 10 e0 be 03 00 testl $0x3bee0,0x10(%ebx) 10fddc: 75 07 jne 10fde5 <_Thread_queue_Extract_fifo+0x1d> _ISR_Enable( level ); 10fdde: 50 push %eax 10fddf: 9d popf #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 10fde0: 8b 5d fc mov -0x4(%ebp),%ebx 10fde3: c9 leave 10fde4: c3 ret ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 10fde5: 8b 0b mov (%ebx),%ecx previous = the_node->previous; 10fde7: 8b 53 04 mov 0x4(%ebx),%edx next->previous = previous; 10fdea: 89 51 04 mov %edx,0x4(%ecx) previous->next = next; 10fded: 89 0a mov %ecx,(%edx) return; } _Chain_Extract_unprotected( &the_thread->Object.Node ); the_thread->Wait.queue = NULL; 10fdef: c7 43 44 00 00 00 00 movl $0x0,0x44(%ebx) if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 10fdf6: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 10fdfa: 74 04 je 10fe00 <_Thread_queue_Extract_fifo+0x38> _ISR_Enable( level ); 10fdfc: 50 push %eax 10fdfd: 9d popf 10fdfe: eb 18 jmp 10fe18 <_Thread_queue_Extract_fifo+0x50> <== ALWAYS TAKEN 10fe00: c7 43 50 03 00 00 00 movl $0x3,0x50(%ebx) } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 10fe07: 50 push %eax 10fe08: 9d popf (void) _Watchdog_Remove( &the_thread->Timer ); 10fe09: 83 ec 0c sub $0xc,%esp 10fe0c: 8d 43 48 lea 0x48(%ebx),%eax 10fe0f: 50 push %eax 10fe10: e8 7b cb ff ff call 10c990 <_Watchdog_Remove> 10fe15: 83 c4 10 add $0x10,%esp RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 10fe18: c7 45 0c f8 ff 03 10 movl $0x1003fff8,0xc(%ebp) 10fe1f: 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 } 10fe22: 8b 5d fc mov -0x4(%ebp),%ebx 10fe25: c9 leave 10fe26: e9 6d b9 ff ff jmp 10b798 <_Thread_Clear_state> 0010e930 <_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 ) { 10e930: 55 push %ebp 10e931: 89 e5 mov %esp,%ebp 10e933: 57 push %edi 10e934: 56 push %esi 10e935: 53 push %ebx 10e936: 83 ec 1c sub $0x1c,%esp 10e939: 8b 5d 0c mov 0xc(%ebp),%ebx 10e93c: 8a 45 10 mov 0x10(%ebp),%al 10e93f: 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 ); 10e942: 9c pushf 10e943: fa cli 10e944: 8f 45 e4 popl -0x1c(%ebp) if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 10e947: f7 43 10 e0 be 03 00 testl $0x3bee0,0x10(%ebx) 10e94e: 75 09 jne 10e959 <_Thread_queue_Extract_priority_helper+0x29> _ISR_Enable( level ); 10e950: ff 75 e4 pushl -0x1c(%ebp) 10e953: 9d popf return; 10e954: e9 86 00 00 00 jmp 10e9df <_Thread_queue_Extract_priority_helper+0xaf> <== ALWAYS TAKEN /* * The thread was actually waiting on a thread queue so let's remove it. */ next_node = the_node->next; 10e959: 8b 13 mov (%ebx),%edx previous_node = the_node->previous; 10e95b: 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)); 10e95e: 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; 10e961: 8d 73 3c lea 0x3c(%ebx),%esi 10e964: 39 f0 cmp %esi,%eax 10e966: 74 2a je 10e992 <_Thread_queue_Extract_priority_helper+0x62> if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) { new_first_node = the_thread->Wait.Block2n.first; new_first_thread = (Thread_Control *) new_first_node; last_node = the_thread->Wait.Block2n.last; 10e968: 8b 73 40 mov 0x40(%ebx),%esi new_second_node = new_first_node->next; 10e96b: 8b 38 mov (%eax),%edi previous_node->next = new_first_node; 10e96d: 89 01 mov %eax,(%ecx) next_node->previous = new_first_node; 10e96f: 89 42 04 mov %eax,0x4(%edx) new_first_node->next = next_node; 10e972: 89 10 mov %edx,(%eax) new_first_node->previous = previous_node; 10e974: 89 48 04 mov %ecx,0x4(%eax) if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) { 10e977: 8b 53 38 mov 0x38(%ebx),%edx 10e97a: 3b 53 40 cmp 0x40(%ebx),%edx 10e97d: 74 18 je 10e997 <_Thread_queue_Extract_priority_helper+0x67> /* > two threads on 2-n */ new_second_node->previous = 10e97f: 8d 50 38 lea 0x38(%eax),%edx 10e982: 89 57 04 mov %edx,0x4(%edi) _Chain_Head( &new_first_thread->Wait.Block2n ); new_first_thread->Wait.Block2n.first = new_second_node; 10e985: 89 78 38 mov %edi,0x38(%eax) new_first_thread->Wait.Block2n.last = last_node; 10e988: 89 70 40 mov %esi,0x40(%eax) last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n ); 10e98b: 83 c0 3c add $0x3c,%eax 10e98e: 89 06 mov %eax,(%esi) 10e990: eb 05 jmp 10e997 <_Thread_queue_Extract_priority_helper+0x67> <== ALWAYS TAKEN } } else { previous_node->next = next_node; 10e992: 89 11 mov %edx,(%ecx) next_node->previous = previous_node; 10e994: 89 4a 04 mov %ecx,0x4(%edx) /* * If we are not supposed to touch timers or the thread's state, return. */ if ( requeuing ) { 10e997: 80 7d e3 00 cmpb $0x0,-0x1d(%ebp) 10e99b: 74 06 je 10e9a3 <_Thread_queue_Extract_priority_helper+0x73> _ISR_Enable( level ); 10e99d: ff 75 e4 pushl -0x1c(%ebp) 10e9a0: 9d popf 10e9a1: eb 3c jmp 10e9df <_Thread_queue_Extract_priority_helper+0xaf> <== ALWAYS TAKEN return; } if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 10e9a3: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 10e9a7: 74 06 je 10e9af <_Thread_queue_Extract_priority_helper+0x7f> _ISR_Enable( level ); 10e9a9: ff 75 e4 pushl -0x1c(%ebp) 10e9ac: 9d popf 10e9ad: eb 1a jmp 10e9c9 <_Thread_queue_Extract_priority_helper+0x99> <== ALWAYS TAKEN 10e9af: c7 43 50 03 00 00 00 movl $0x3,0x50(%ebx) } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 10e9b6: ff 75 e4 pushl -0x1c(%ebp) 10e9b9: 9d popf (void) _Watchdog_Remove( &the_thread->Timer ); 10e9ba: 83 ec 0c sub $0xc,%esp 10e9bd: 8d 43 48 lea 0x48(%ebx),%eax 10e9c0: 50 push %eax 10e9c1: e8 ca df ff ff call 10c990 <_Watchdog_Remove> 10e9c6: 83 c4 10 add $0x10,%esp 10e9c9: c7 45 0c f8 ff 03 10 movl $0x1003fff8,0xc(%ebp) 10e9d0: 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 } 10e9d3: 8d 65 f4 lea -0xc(%ebp),%esp 10e9d6: 5b pop %ebx 10e9d7: 5e pop %esi 10e9d8: 5f pop %edi 10e9d9: c9 leave 10e9da: e9 b9 cd ff ff jmp 10b798 <_Thread_Clear_state> 10e9df: 8d 65 f4 lea -0xc(%ebp),%esp 10e9e2: 5b pop %ebx 10e9e3: 5e pop %esi 10e9e4: 5f pop %edi 10e9e5: c9 leave 10e9e6: c3 ret 0011b9b0 <_Thread_queue_First_priority>: */ Thread_Control *_Thread_queue_First_priority ( Thread_queue_Control *the_thread_queue ) { 11b9b0: 55 push %ebp 11b9b1: 89 e5 mov %esp,%ebp 11b9b3: 53 push %ebx 11b9b4: 8b 4d 08 mov 0x8(%ebp),%ecx 11b9b7: 89 ca mov %ecx,%edx 11b9b9: 31 c0 xor %eax,%eax 11b9bb: 8d 5a 04 lea 0x4(%edx),%ebx 11b9be: 39 1a cmp %ebx,(%edx) 11b9c0: 74 08 je 11b9ca <_Thread_queue_First_priority+0x1a> for( index=0 ; index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ; index++ ) { if ( !_Chain_Is_empty( &the_thread_queue->Queues.Priority[ index ] ) ) return (Thread_Control *) 11b9c2: 6b c0 0c imul $0xc,%eax,%eax 11b9c5: 8b 04 08 mov (%eax,%ecx,1),%eax 11b9c8: eb 0b jmp 11b9d5 <_Thread_queue_First_priority+0x25> <== ALWAYS TAKEN { uint32_t index; for( index=0 ; index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ; index++ ) { 11b9ca: 40 inc %eax 11b9cb: 83 c2 0c add $0xc,%edx Thread_queue_Control *the_thread_queue ) { uint32_t index; for( index=0 ; 11b9ce: 83 f8 04 cmp $0x4,%eax 11b9d1: 75 e8 jne 11b9bb <_Thread_queue_First_priority+0xb> 11b9d3: 30 c0 xor %al,%al if ( !_Chain_Is_empty( &the_thread_queue->Queues.Priority[ index ] ) ) return (Thread_Control *) the_thread_queue->Queues.Priority[ index ].first; } return NULL; } 11b9d5: 5b pop %ebx 11b9d6: c9 leave 11b9d7: c3 ret 0010c170 <_Thread_queue_Flush>: #else Thread_queue_Flush_callout remote_extract_callout __attribute__((unused)), #endif uint32_t status ) { 10c170: 55 push %ebp 10c171: 89 e5 mov %esp,%ebp 10c173: 56 push %esi 10c174: 53 push %ebx 10c175: 8b 75 08 mov 0x8(%ebp),%esi 10c178: 8b 5d 10 mov 0x10(%ebp),%ebx Thread_Control *the_thread; while ( (the_thread = _Thread_queue_Dequeue( the_thread_queue )) ) { 10c17b: eb 03 jmp 10c180 <_Thread_queue_Flush+0x10> <== ALWAYS TAKEN #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) ( *remote_extract_callout )( the_thread ); else #endif the_thread->Wait.return_code = status; 10c17d: 89 58 34 mov %ebx,0x34(%eax) uint32_t status ) { Thread_Control *the_thread; while ( (the_thread = _Thread_queue_Dequeue( the_thread_queue )) ) { 10c180: 83 ec 0c sub $0xc,%esp 10c183: 56 push %esi 10c184: e8 f3 fc ff ff call 10be7c <_Thread_queue_Dequeue> <== ALWAYS TAKEN 10c189: 83 c4 10 add $0x10,%esp 10c18c: 85 c0 test %eax,%eax 10c18e: 75 ed jne 10c17d <_Thread_queue_Flush+0xd> ( *remote_extract_callout )( the_thread ); else #endif the_thread->Wait.return_code = status; } } 10c190: 8d 65 f8 lea -0x8(%ebp),%esp 10c193: 5b pop %ebx 10c194: 5e pop %esi 10c195: c9 leave 10c196: c3 ret 0010c198 <_Thread_queue_Initialize>: Thread_queue_Control *the_thread_queue, Thread_queue_Disciplines the_discipline, States_Control state, uint32_t timeout_status ) { 10c198: 55 push %ebp 10c199: 89 e5 mov %esp,%ebp 10c19b: 8b 45 08 mov 0x8(%ebp),%eax 10c19e: 8b 55 0c mov 0xc(%ebp),%edx the_thread_queue->state = state; 10c1a1: 8b 4d 10 mov 0x10(%ebp),%ecx 10c1a4: 89 48 38 mov %ecx,0x38(%eax) the_thread_queue->discipline = the_discipline; 10c1a7: 89 50 34 mov %edx,0x34(%eax) the_thread_queue->timeout_status = timeout_status; 10c1aa: 8b 4d 14 mov 0x14(%ebp),%ecx 10c1ad: 89 48 3c mov %ecx,0x3c(%eax) the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 10c1b0: c7 40 30 00 00 00 00 movl $0x0,0x30(%eax) if ( the_discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) { 10c1b7: 4a dec %edx 10c1b8: 75 1b jne 10c1d5 <_Thread_queue_Initialize+0x3d> * timeout_status - return on a timeout * * Output parameters: NONE */ void _Thread_queue_Initialize( 10c1ba: 8d 50 30 lea 0x30(%eax),%edx */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 10c1bd: 8d 48 04 lea 0x4(%eax),%ecx 10c1c0: 89 08 mov %ecx,(%eax) the_chain->permanent_null = NULL; 10c1c2: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax) the_chain->last = _Chain_Head(the_chain); 10c1c9: 89 40 08 mov %eax,0x8(%eax) 10c1cc: 83 c0 0c add $0xc,%eax the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; if ( the_discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) { uint32_t index; for( index=0 ; 10c1cf: 39 d0 cmp %edx,%eax 10c1d1: 75 ea jne 10c1bd <_Thread_queue_Initialize+0x25> 10c1d3: eb 0f jmp 10c1e4 <_Thread_queue_Initialize+0x4c> <== ALWAYS TAKEN */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 10c1d5: 8d 50 04 lea 0x4(%eax),%edx 10c1d8: 89 10 mov %edx,(%eax) the_chain->permanent_null = NULL; 10c1da: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax) the_chain->last = _Chain_Head(the_chain); 10c1e1: 89 40 08 mov %eax,0x8(%eax) _Chain_Initialize_empty( &the_thread_queue->Queues.Priority[index] ); } else { /* must be THREAD_QUEUE_DISCIPLINE_FIFO */ _Chain_Initialize_empty( &the_thread_queue->Queues.Fifo ); } } 10c1e4: c9 leave 10c1e5: c3 ret 0010e9e8 <_Thread_queue_Process_timeout>: #include void _Thread_queue_Process_timeout( Thread_Control *the_thread ) { 10e9e8: 55 push %ebp 10e9e9: 89 e5 mov %esp,%ebp 10e9eb: 83 ec 08 sub $0x8,%esp 10e9ee: 8b 45 08 mov 0x8(%ebp),%eax Thread_queue_Control *the_thread_queue = the_thread->Wait.queue; 10e9f1: 8b 50 44 mov 0x44(%eax),%edx * If it is not satisfied, then it is "nothing happened" and * this is the "timeout" transition. After a request is satisfied, * a timeout is not allowed to occur. */ if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SYNCHRONIZED && 10e9f4: 8b 4a 30 mov 0x30(%edx),%ecx 10e9f7: 85 c9 test %ecx,%ecx 10e9f9: 74 1c je 10ea17 <_Thread_queue_Process_timeout+0x2f> 10e9fb: 3b 05 30 39 12 00 cmp 0x123930,%eax 10ea01: 75 14 jne 10ea17 <_Thread_queue_Process_timeout+0x2f> _Thread_Is_executing( the_thread ) ) { if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SATISFIED ) { 10ea03: 83 f9 03 cmp $0x3,%ecx 10ea06: 74 23 je 10ea2b <_Thread_queue_Process_timeout+0x43> the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; 10ea08: 8b 4a 3c mov 0x3c(%edx),%ecx 10ea0b: 89 48 34 mov %ecx,0x34(%eax) the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; 10ea0e: c7 42 30 02 00 00 00 movl $0x2,0x30(%edx) 10ea15: eb 14 jmp 10ea2b <_Thread_queue_Process_timeout+0x43> <== ALWAYS TAKEN } } else { the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; 10ea17: 8b 52 3c mov 0x3c(%edx),%edx 10ea1a: 89 50 34 mov %edx,0x34(%eax) _Thread_queue_Extract( the_thread->Wait.queue, the_thread ); 10ea1d: 52 push %edx 10ea1e: 52 push %edx 10ea1f: 50 push %eax 10ea20: ff 70 44 pushl 0x44(%eax) 10ea23: e8 d8 fe ff ff call 10e900 <_Thread_queue_Extract> <== ALWAYS TAKEN 10ea28: 83 c4 10 add $0x10,%esp } } 10ea2b: c9 leave 10ea2c: c3 ret 0010c1e8 <_Thread_queue_Requeue>: void _Thread_queue_Requeue( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { 10c1e8: 55 push %ebp 10c1e9: 89 e5 mov %esp,%ebp 10c1eb: 57 push %edi 10c1ec: 56 push %esi 10c1ed: 53 push %ebx 10c1ee: 83 ec 1c sub $0x1c,%esp 10c1f1: 8b 75 08 mov 0x8(%ebp),%esi 10c1f4: 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 ) 10c1f7: 85 f6 test %esi,%esi 10c1f9: 74 36 je 10c231 <_Thread_queue_Requeue+0x49> <== ALWAYS 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 ) { 10c1fb: 83 7e 34 01 cmpl $0x1,0x34(%esi) 10c1ff: 75 30 jne 10c231 <_Thread_queue_Requeue+0x49> <== ALWAYS TAKEN Thread_queue_Control *tq = the_thread_queue; ISR_Level level; ISR_Level level_ignored; _ISR_Disable( level ); 10c201: 9c pushf 10c202: fa cli 10c203: 5b pop %ebx if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 10c204: f7 47 10 e0 be 03 00 testl $0x3bee0,0x10(%edi) 10c20b: 74 22 je 10c22f <_Thread_queue_Requeue+0x47> <== ALWAYS TAKEN 10c20d: 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 ); 10c214: 50 push %eax 10c215: 6a 01 push $0x1 10c217: 57 push %edi 10c218: 56 push %esi 10c219: e8 12 27 00 00 call 10e930 <_Thread_queue_Extract_priority_helper> (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); 10c21e: 83 c4 0c add $0xc,%esp 10c221: 8d 45 e4 lea -0x1c(%ebp),%eax 10c224: 50 push %eax 10c225: 57 push %edi 10c226: 56 push %esi 10c227: e8 e0 fd ff ff call 10c00c <_Thread_queue_Enqueue_priority> <== ALWAYS TAKEN 10c22c: 83 c4 10 add $0x10,%esp } _ISR_Enable( level ); 10c22f: 53 push %ebx 10c230: 9d popf } } 10c231: 8d 65 f4 lea -0xc(%ebp),%esp 10c234: 5b pop %ebx 10c235: 5e pop %esi 10c236: 5f pop %edi 10c237: c9 leave 10c238: c3 ret 0010c23c <_Thread_queue_Timeout>: void _Thread_queue_Timeout( Objects_Id id, void *ignored __attribute__((unused)) ) { 10c23c: 55 push %ebp 10c23d: 89 e5 mov %esp,%ebp 10c23f: 83 ec 20 sub $0x20,%esp Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 10c242: 8d 45 f4 lea -0xc(%ebp),%eax 10c245: 50 push %eax 10c246: ff 75 08 pushl 0x8(%ebp) 10c249: e8 ea f8 ff ff call 10bb38 <_Thread_Get> <== ALWAYS TAKEN switch ( location ) { 10c24e: 83 c4 10 add $0x10,%esp 10c251: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 10c255: 75 17 jne 10c26e <_Thread_queue_Timeout+0x32> <== ALWAYS TAKEN #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_queue_Process_timeout( the_thread ); 10c257: 83 ec 0c sub $0xc,%esp 10c25a: 50 push %eax 10c25b: e8 88 27 00 00 call 10e9e8 <_Thread_queue_Process_timeout> <== ALWAYS TAKEN */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 10c260: a1 74 38 12 00 mov 0x123874,%eax 10c265: 48 dec %eax 10c266: a3 74 38 12 00 mov %eax,0x123874 10c26b: 83 c4 10 add $0x10,%esp _Thread_Unnest_dispatch(); break; } } 10c26e: c9 leave 10c26f: c3 ret 00116570 <_Timer_server_Body>: * @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) { 116570: 55 push %ebp 116571: 89 e5 mov %esp,%ebp 116573: 57 push %edi 116574: 56 push %esi 116575: 53 push %ebx 116576: 83 ec 4c sub $0x4c,%esp 116579: 8b 5d 08 mov 0x8(%ebp),%ebx 11657c: 8d 45 dc lea -0x24(%ebp),%eax 11657f: 8d 55 e0 lea -0x20(%ebp),%edx 116582: 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); 116585: 89 55 dc mov %edx,-0x24(%ebp) the_chain->permanent_null = NULL; 116588: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) the_chain->last = _Chain_Head(the_chain); 11658f: 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; 116592: 8d 75 d0 lea -0x30(%ebp),%esi 116595: 8d 55 d4 lea -0x2c(%ebp),%edx 116598: 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); 11659b: 89 55 d0 mov %edx,-0x30(%ebp) the_chain->permanent_null = NULL; 11659e: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp) the_chain->last = _Chain_Head(the_chain); 1165a5: 89 75 d8 mov %esi,-0x28(%ebp) */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 1165a8: 8d 53 30 lea 0x30(%ebx),%edx 1165ab: 89 55 c0 mov %edx,-0x40(%ebp) /* * 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 ); 1165ae: 8d 7b 68 lea 0x68(%ebx),%edi static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); 1165b1: 8d 4b 08 lea 0x8(%ebx),%ecx 1165b4: 89 4d b8 mov %ecx,-0x48(%ebp) static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 1165b7: 8d 53 40 lea 0x40(%ebx),%edx 1165ba: 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; 1165bd: 8d 4d dc lea -0x24(%ebp),%ecx 1165c0: 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; 1165c3: a1 34 cc 13 00 mov 0x13cc34,%eax /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; 1165c8: 8b 53 3c mov 0x3c(%ebx),%edx watchdogs->last_snapshot = snapshot; 1165cb: 89 43 3c mov %eax,0x3c(%ebx) _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 1165ce: 51 push %ecx 1165cf: 8d 4d d0 lea -0x30(%ebp),%ecx 1165d2: 51 push %ecx 1165d3: 29 d0 sub %edx,%eax 1165d5: 50 push %eax 1165d6: ff 75 c0 pushl -0x40(%ebp) 1165d9: e8 36 35 00 00 call 119b14 <_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(); 1165de: a1 78 cb 13 00 mov 0x13cb78,%eax 1165e3: 89 45 c4 mov %eax,-0x3c(%ebp) Watchdog_Interval last_snapshot = watchdogs->last_snapshot; 1165e6: 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 ) { 1165e9: 83 c4 10 add $0x10,%esp 1165ec: 39 45 c4 cmp %eax,-0x3c(%ebp) 1165ef: 76 13 jbe 116604 <_Timer_server_Body+0x94> /* * 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 ); 1165f1: 52 push %edx 1165f2: 8d 55 d0 lea -0x30(%ebp),%edx 1165f5: 52 push %edx 1165f6: 8b 4d c4 mov -0x3c(%ebp),%ecx 1165f9: 29 c1 sub %eax,%ecx 1165fb: 51 push %ecx 1165fc: 57 push %edi 1165fd: e8 12 35 00 00 call 119b14 <_Watchdog_Adjust_to_chain> 116602: eb 0f jmp 116613 <_Timer_server_Body+0xa3> <== ALWAYS TAKEN } else if ( snapshot < last_snapshot ) { 116604: 73 10 jae 116616 <_Timer_server_Body+0xa6> /* * 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 ); 116606: 51 push %ecx 116607: 2b 45 c4 sub -0x3c(%ebp),%eax 11660a: 50 push %eax 11660b: 6a 01 push $0x1 11660d: 57 push %edi 11660e: e8 95 34 00 00 call 119aa8 <_Watchdog_Adjust> 116613: 83 c4 10 add $0x10,%esp } watchdogs->last_snapshot = snapshot; 116616: 8b 45 c4 mov -0x3c(%ebp),%eax 116619: 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 ); 11661c: 8b 43 78 mov 0x78(%ebx),%eax 11661f: 83 ec 0c sub $0xc,%esp 116622: 50 push %eax 116623: e8 ec 06 00 00 call 116d14 <_Chain_Get> <== ALWAYS TAKEN if ( timer == NULL ) { 116628: 83 c4 10 add $0x10,%esp 11662b: 85 c0 test %eax,%eax 11662d: 74 29 je 116658 <_Timer_server_Body+0xe8> static void _Timer_server_Insert_timer( Timer_server_Control *ts, Timer_Control *timer ) { if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { 11662f: 8b 50 38 mov 0x38(%eax),%edx 116632: 83 fa 01 cmp $0x1,%edx 116635: 75 0b jne 116642 <_Timer_server_Body+0xd2> _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); 116637: 52 push %edx 116638: 52 push %edx 116639: 83 c0 10 add $0x10,%eax 11663c: 50 push %eax 11663d: ff 75 c0 pushl -0x40(%ebp) 116640: eb 0c jmp 11664e <_Timer_server_Body+0xde> <== ALWAYS TAKEN } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { 116642: 83 fa 03 cmp $0x3,%edx 116645: 75 d5 jne 11661c <_Timer_server_Body+0xac> <== ALWAYS TAKEN _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 116647: 51 push %ecx 116648: 51 push %ecx 116649: 83 c0 10 add $0x10,%eax 11664c: 50 push %eax 11664d: 57 push %edi 11664e: e8 49 35 00 00 call 119b9c <_Watchdog_Insert> 116653: 83 c4 10 add $0x10,%esp 116656: eb c4 jmp 11661c <_Timer_server_Body+0xac> <== ALWAYS TAKEN * of zero it will be processed in the next iteration of the timer server * body loop. */ _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); 116658: 9c pushf 116659: fa cli 11665a: 58 pop %eax if ( _Chain_Is_empty( insert_chain ) ) { 11665b: 8b 55 b4 mov -0x4c(%ebp),%edx 11665e: 39 55 dc cmp %edx,-0x24(%ebp) 116661: 75 13 jne 116676 <_Timer_server_Body+0x106> <== ALWAYS TAKEN ts->insert_chain = NULL; 116663: c7 43 78 00 00 00 00 movl $0x0,0x78(%ebx) _ISR_Enable( level ); 11666a: 50 push %eax 11666b: 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 ) ) { 11666c: 8b 4d b0 mov -0x50(%ebp),%ecx 11666f: 39 4d d0 cmp %ecx,-0x30(%ebp) 116672: 75 09 jne 11667d <_Timer_server_Body+0x10d> 116674: eb 3e jmp 1166b4 <_Timer_server_Body+0x144> <== ALWAYS TAKEN ts->insert_chain = NULL; _ISR_Enable( level ); break; } else { _ISR_Enable( level ); 116676: 50 push %eax <== NOT EXECUTED 116677: 9d popf <== NOT EXECUTED 116678: e9 46 ff ff ff jmp 1165c3 <_Timer_server_Body+0x53> <== 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 ); 11667d: 9c pushf 11667e: fa cli 11667f: 5a pop %edx */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 116680: 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)) 116683: 3b 45 b0 cmp -0x50(%ebp),%eax 116686: 74 25 je 1166ad <_Timer_server_Body+0x13d> { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; 116688: 8b 08 mov (%eax),%ecx the_chain->first = new_first; 11668a: 89 4d d0 mov %ecx,-0x30(%ebp) new_first->previous = _Chain_Head(the_chain); 11668d: 89 71 04 mov %esi,0x4(%ecx) watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain ); if ( watchdog != NULL ) { 116690: 85 c0 test %eax,%eax 116692: 74 19 je 1166ad <_Timer_server_Body+0x13d> <== ALWAYS TAKEN watchdog->state = WATCHDOG_INACTIVE; 116694: c7 40 08 00 00 00 00 movl $0x0,0x8(%eax) _ISR_Enable( level ); 11669b: 52 push %edx 11669c: 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 ); 11669d: 52 push %edx 11669e: 52 push %edx 11669f: ff 70 24 pushl 0x24(%eax) 1166a2: ff 70 20 pushl 0x20(%eax) 1166a5: ff 50 1c call *0x1c(%eax) } 1166a8: 83 c4 10 add $0x10,%esp 1166ab: eb d0 jmp 11667d <_Timer_server_Body+0x10d> <== ALWAYS TAKEN watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain ); if ( watchdog != NULL ) { watchdog->state = WATCHDOG_INACTIVE; _ISR_Enable( level ); } else { _ISR_Enable( level ); 1166ad: 52 push %edx 1166ae: 9d popf 1166af: e9 09 ff ff ff jmp 1165bd <_Timer_server_Body+0x4d> <== ALWAYS TAKEN * the active flag of the timer server is true. */ (*watchdog->routine)( watchdog->id, watchdog->user_data ); } } else { ts->active = false; 1166b4: c6 43 7c 00 movb $0x0,0x7c(%ebx) 1166b8: a1 e8 ca 13 00 mov 0x13cae8,%eax 1166bd: 40 inc %eax 1166be: a3 e8 ca 13 00 mov %eax,0x13cae8 /* * Block until there is something to do. */ _Thread_Disable_dispatch(); _Thread_Set_state( ts->thread, STATES_DELAYING ); 1166c3: 50 push %eax 1166c4: 50 push %eax 1166c5: 6a 08 push $0x8 1166c7: ff 33 pushl (%ebx) 1166c9: e8 ea 2c 00 00 call 1193b8 <_Thread_Set_state> _Timer_server_Reset_interval_system_watchdog( ts ); 1166ce: 89 d8 mov %ebx,%eax 1166d0: e8 0f fe ff ff call 1164e4 <_Timer_server_Reset_interval_system_watchdog> <== ALWAYS TAKEN _Timer_server_Reset_tod_system_watchdog( ts ); 1166d5: 89 d8 mov %ebx,%eax 1166d7: e8 4e fe ff ff call 11652a <_Timer_server_Reset_tod_system_watchdog> <== ALWAYS TAKEN _Thread_Enable_dispatch(); 1166dc: e8 dc 23 00 00 call 118abd <_Thread_Enable_dispatch> ts->active = true; 1166e1: 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 ); 1166e5: 59 pop %ecx 1166e6: ff 75 b8 pushl -0x48(%ebp) 1166e9: e8 c6 35 00 00 call 119cb4 <_Watchdog_Remove> static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 1166ee: 5a pop %edx 1166ef: ff 75 bc pushl -0x44(%ebp) 1166f2: e8 bd 35 00 00 call 119cb4 <_Watchdog_Remove> 1166f7: 83 c4 10 add $0x10,%esp 1166fa: e9 be fe ff ff jmp 1165bd <_Timer_server_Body+0x4d> <== ALWAYS TAKEN 001164e4 <_Timer_server_Reset_interval_system_watchdog>: } static void _Timer_server_Reset_interval_system_watchdog( Timer_server_Control *ts ) { 1164e4: 55 push %ebp 1164e5: 89 e5 mov %esp,%ebp 1164e7: 56 push %esi 1164e8: 53 push %ebx 1164e9: 89 c3 mov %eax,%ebx static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); 1164eb: 8d 70 08 lea 0x8(%eax),%esi 1164ee: 83 ec 0c sub $0xc,%esp 1164f1: 56 push %esi 1164f2: e8 bd 37 00 00 call 119cb4 <_Watchdog_Remove> { ISR_Level level; _Timer_server_Stop_interval_system_watchdog( ts ); _ISR_Disable( level ); 1164f7: 9c pushf 1164f8: fa cli 1164f9: 58 pop %eax */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 1164fa: 8b 53 30 mov 0x30(%ebx),%edx */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 1164fd: 8d 4b 34 lea 0x34(%ebx),%ecx 116500: 83 c4 10 add $0x10,%esp 116503: 39 ca cmp %ecx,%edx 116505: 74 1a je 116521 <_Timer_server_Reset_interval_system_watchdog+0x3d> if ( !_Chain_Is_empty( &ts->Interval_watchdogs.Chain ) ) { Watchdog_Interval delta_interval = _Watchdog_First( &ts->Interval_watchdogs.Chain )->delta_interval; 116507: 8b 52 10 mov 0x10(%edx),%edx _ISR_Enable( level ); 11650a: 50 push %eax 11650b: 9d popf Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 11650c: 89 53 14 mov %edx,0x14(%ebx) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 11650f: 53 push %ebx 116510: 53 push %ebx 116511: 56 push %esi 116512: 68 c4 cb 13 00 push $0x13cbc4 116517: e8 80 36 00 00 call 119b9c <_Watchdog_Insert> 11651c: 83 c4 10 add $0x10,%esp 11651f: eb 02 jmp 116523 <_Timer_server_Reset_interval_system_watchdog+0x3f> <== ALWAYS TAKEN _Watchdog_Insert_ticks( &ts->Interval_watchdogs.System_watchdog, delta_interval ); } else { _ISR_Enable( level ); 116521: 50 push %eax 116522: 9d popf } } 116523: 8d 65 f8 lea -0x8(%ebp),%esp 116526: 5b pop %ebx 116527: 5e pop %esi 116528: c9 leave 116529: c3 ret 0011652a <_Timer_server_Reset_tod_system_watchdog>: } static void _Timer_server_Reset_tod_system_watchdog( Timer_server_Control *ts ) { 11652a: 55 push %ebp 11652b: 89 e5 mov %esp,%ebp 11652d: 56 push %esi 11652e: 53 push %ebx 11652f: 89 c3 mov %eax,%ebx static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 116531: 8d 70 40 lea 0x40(%eax),%esi 116534: 83 ec 0c sub $0xc,%esp 116537: 56 push %esi 116538: e8 77 37 00 00 call 119cb4 <_Watchdog_Remove> { ISR_Level level; _Timer_server_Stop_tod_system_watchdog( ts ); _ISR_Disable( level ); 11653d: 9c pushf 11653e: fa cli 11653f: 58 pop %eax */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 116540: 8b 53 68 mov 0x68(%ebx),%edx */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 116543: 8d 4b 6c lea 0x6c(%ebx),%ecx 116546: 83 c4 10 add $0x10,%esp 116549: 39 ca cmp %ecx,%edx 11654b: 74 1a je 116567 <_Timer_server_Reset_tod_system_watchdog+0x3d> if ( !_Chain_Is_empty( &ts->TOD_watchdogs.Chain ) ) { Watchdog_Interval delta_interval = _Watchdog_First( &ts->TOD_watchdogs.Chain )->delta_interval; 11654d: 8b 52 10 mov 0x10(%edx),%edx _ISR_Enable( level ); 116550: 50 push %eax 116551: 9d popf Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 116552: 89 53 4c mov %edx,0x4c(%ebx) _Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog ); 116555: 50 push %eax 116556: 50 push %eax 116557: 56 push %esi 116558: 68 b8 cb 13 00 push $0x13cbb8 11655d: e8 3a 36 00 00 call 119b9c <_Watchdog_Insert> 116562: 83 c4 10 add $0x10,%esp 116565: eb 02 jmp 116569 <_Timer_server_Reset_tod_system_watchdog+0x3f> <== ALWAYS TAKEN _Watchdog_Insert_seconds( &ts->TOD_watchdogs.System_watchdog, delta_interval ); } else { _ISR_Enable( level ); 116567: 50 push %eax 116568: 9d popf } } 116569: 8d 65 f8 lea -0x8(%ebp),%esp 11656c: 5b pop %ebx 11656d: 5e pop %esi 11656e: c9 leave 11656f: c3 ret 001166ff <_Timer_server_Schedule_operation_method>: static void _Timer_server_Schedule_operation_method( Timer_server_Control *ts, Timer_Control *timer ) { 1166ff: 55 push %ebp 116700: 89 e5 mov %esp,%ebp 116702: 57 push %edi 116703: 56 push %esi 116704: 53 push %ebx 116705: 83 ec 2c sub $0x2c,%esp 116708: 8b 5d 08 mov 0x8(%ebp),%ebx 11670b: 8b 45 0c mov 0xc(%ebp),%eax if ( ts->insert_chain == NULL ) { 11670e: 8b 53 78 mov 0x78(%ebx),%edx 116711: 85 d2 test %edx,%edx 116713: 0f 85 e6 00 00 00 jne 1167ff <_Timer_server_Schedule_operation_method+0x100> 116719: 8b 15 e8 ca 13 00 mov 0x13cae8,%edx 11671f: 42 inc %edx 116720: 89 15 e8 ca 13 00 mov %edx,0x13cae8 * being inserted. This could result in an integer overflow. */ _Thread_Disable_dispatch(); if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { 116726: 8b 50 38 mov 0x38(%eax),%edx 116729: 83 fa 01 cmp $0x1,%edx 11672c: 75 5a jne 116788 <_Timer_server_Schedule_operation_method+0x89> /* * We have to advance the last known ticks value of the server and update * the watchdog chain accordingly. */ _ISR_Disable( level ); 11672e: 9c pushf 11672f: fa cli 116730: 8f 45 e0 popl -0x20(%ebp) snapshot = _Watchdog_Ticks_since_boot; 116733: 8b 0d 34 cc 13 00 mov 0x13cc34,%ecx last_snapshot = ts->Interval_watchdogs.last_snapshot; 116739: 8b 73 3c mov 0x3c(%ebx),%esi */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 11673c: 8b 53 30 mov 0x30(%ebx),%edx */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 11673f: 8d 7b 34 lea 0x34(%ebx),%edi 116742: 39 fa cmp %edi,%edx 116744: 74 19 je 11675f <_Timer_server_Schedule_operation_method+0x60> first_watchdog = _Watchdog_First( &ts->Interval_watchdogs.Chain ); /* * We assume adequate unsigned arithmetic here. */ delta = snapshot - last_snapshot; 116746: 89 cf mov %ecx,%edi 116748: 29 f7 sub %esi,%edi 11674a: 89 7d e4 mov %edi,-0x1c(%ebp) delta_interval = first_watchdog->delta_interval; 11674d: 8b 7a 10 mov 0x10(%edx),%edi if (delta_interval > delta) { 116750: 31 f6 xor %esi,%esi 116752: 3b 7d e4 cmp -0x1c(%ebp),%edi 116755: 76 05 jbe 11675c <_Timer_server_Schedule_operation_method+0x5d> delta_interval -= delta; 116757: 89 fe mov %edi,%esi 116759: 2b 75 e4 sub -0x1c(%ebp),%esi } else { delta_interval = 0; } first_watchdog->delta_interval = delta_interval; 11675c: 89 72 10 mov %esi,0x10(%edx) } ts->Interval_watchdogs.last_snapshot = snapshot; 11675f: 89 4b 3c mov %ecx,0x3c(%ebx) _ISR_Enable( level ); 116762: ff 75 e0 pushl -0x20(%ebp) 116765: 9d popf _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); 116766: 57 push %edi 116767: 57 push %edi 116768: 83 c0 10 add $0x10,%eax 11676b: 50 push %eax 11676c: 8d 43 30 lea 0x30(%ebx),%eax 11676f: 50 push %eax 116770: e8 27 34 00 00 call 119b9c <_Watchdog_Insert> if ( !ts->active ) { 116775: 8a 43 7c mov 0x7c(%ebx),%al 116778: 83 c4 10 add $0x10,%esp 11677b: 84 c0 test %al,%al 11677d: 75 74 jne 1167f3 <_Timer_server_Schedule_operation_method+0xf4> _Timer_server_Reset_interval_system_watchdog( ts ); 11677f: 89 d8 mov %ebx,%eax 116781: e8 5e fd ff ff call 1164e4 <_Timer_server_Reset_interval_system_watchdog> <== ALWAYS TAKEN 116786: eb 6b jmp 1167f3 <_Timer_server_Schedule_operation_method+0xf4> <== ALWAYS TAKEN } } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { 116788: 83 fa 03 cmp $0x3,%edx 11678b: 75 66 jne 1167f3 <_Timer_server_Schedule_operation_method+0xf4> <== ALWAYS TAKEN /* * We have to advance the last known seconds value of the server and update * the watchdog chain accordingly. */ _ISR_Disable( level ); 11678d: 9c pushf 11678e: fa cli 11678f: 8f 45 e0 popl -0x20(%ebp) snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); 116792: 8b 0d 78 cb 13 00 mov 0x13cb78,%ecx last_snapshot = ts->TOD_watchdogs.last_snapshot; 116798: 8b 53 74 mov 0x74(%ebx),%edx */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 11679b: 8b 73 68 mov 0x68(%ebx),%esi */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 11679e: 8d 7b 6c lea 0x6c(%ebx),%edi 1167a1: 39 fe cmp %edi,%esi 1167a3: 74 27 je 1167cc <_Timer_server_Schedule_operation_method+0xcd> if ( !_Chain_Is_empty( &ts->TOD_watchdogs.Chain ) ) { first_watchdog = _Watchdog_First( &ts->TOD_watchdogs.Chain ); delta_interval = first_watchdog->delta_interval; 1167a5: 8b 7e 10 mov 0x10(%esi),%edi 1167a8: 89 7d d4 mov %edi,-0x2c(%ebp) if ( snapshot > last_snapshot ) { 1167ab: 39 d1 cmp %edx,%ecx 1167ad: 76 15 jbe 1167c4 <_Timer_server_Schedule_operation_method+0xc5> /* * We advanced in time. */ delta = snapshot - last_snapshot; 1167af: 89 cf mov %ecx,%edi 1167b1: 29 d7 sub %edx,%edi 1167b3: 89 7d e4 mov %edi,-0x1c(%ebp) if (delta_interval > delta) { 1167b6: 31 d2 xor %edx,%edx 1167b8: 39 7d d4 cmp %edi,-0x2c(%ebp) 1167bb: 76 0c jbe 1167c9 <_Timer_server_Schedule_operation_method+0xca> <== ALWAYS TAKEN delta_interval -= delta; 1167bd: 8b 55 d4 mov -0x2c(%ebp),%edx 1167c0: 29 fa sub %edi,%edx 1167c2: eb 05 jmp 1167c9 <_Timer_server_Schedule_operation_method+0xca> <== ALWAYS TAKEN } } else { /* * Someone put us in the past. */ delta = last_snapshot - snapshot; 1167c4: 03 55 d4 add -0x2c(%ebp),%edx delta_interval += delta; 1167c7: 29 ca sub %ecx,%edx } first_watchdog->delta_interval = delta_interval; 1167c9: 89 56 10 mov %edx,0x10(%esi) } ts->TOD_watchdogs.last_snapshot = snapshot; 1167cc: 89 4b 74 mov %ecx,0x74(%ebx) _ISR_Enable( level ); 1167cf: ff 75 e0 pushl -0x20(%ebp) 1167d2: 9d popf _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 1167d3: 56 push %esi 1167d4: 56 push %esi 1167d5: 83 c0 10 add $0x10,%eax 1167d8: 50 push %eax 1167d9: 8d 43 68 lea 0x68(%ebx),%eax 1167dc: 50 push %eax 1167dd: e8 ba 33 00 00 call 119b9c <_Watchdog_Insert> if ( !ts->active ) { 1167e2: 8a 43 7c mov 0x7c(%ebx),%al 1167e5: 83 c4 10 add $0x10,%esp 1167e8: 84 c0 test %al,%al 1167ea: 75 07 jne 1167f3 <_Timer_server_Schedule_operation_method+0xf4> _Timer_server_Reset_tod_system_watchdog( ts ); 1167ec: 89 d8 mov %ebx,%eax 1167ee: e8 37 fd ff ff call 11652a <_Timer_server_Reset_tod_system_watchdog> <== ALWAYS TAKEN * 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 ); } } 1167f3: 8d 65 f4 lea -0xc(%ebp),%esp 1167f6: 5b pop %ebx 1167f7: 5e pop %esi 1167f8: 5f pop %edi 1167f9: c9 leave if ( !ts->active ) { _Timer_server_Reset_tod_system_watchdog( ts ); } } _Thread_Enable_dispatch(); 1167fa: e9 be 22 00 00 jmp 118abd <_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 ); 1167ff: 8b 53 78 mov 0x78(%ebx),%edx 116802: 89 45 0c mov %eax,0xc(%ebp) 116805: 89 55 08 mov %edx,0x8(%ebp) } } 116808: 8d 65 f4 lea -0xc(%ebp),%esp 11680b: 5b pop %ebx 11680c: 5e pop %esi 11680d: 5f pop %edi 11680e: 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 ); 11680f: e9 dc 04 00 00 jmp 116cf0 <_Chain_Append> <== ALWAYS TAKEN 0010c5e4 <_Timespec_Add_to>: uint32_t _Timespec_Add_to( struct timespec *time, const struct timespec *add ) { 10c5e4: 55 push %ebp 10c5e5: 89 e5 mov %esp,%ebp 10c5e7: 8b 55 08 mov 0x8(%ebp),%edx 10c5ea: 8b 4d 0c mov 0xc(%ebp),%ecx uint32_t seconds = add->tv_sec; 10c5ed: 8b 01 mov (%ecx),%eax /* Add the basics */ time->tv_sec += add->tv_sec; 10c5ef: 01 02 add %eax,(%edx) time->tv_nsec += add->tv_nsec; 10c5f1: 8b 49 04 mov 0x4(%ecx),%ecx 10c5f4: 03 4a 04 add 0x4(%edx),%ecx 10c5f7: 89 4a 04 mov %ecx,0x4(%edx) /* Now adjust it so nanoseconds is in range */ while ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { 10c5fa: eb 09 jmp 10c605 <_Timespec_Add_to+0x21> <== ALWAYS TAKEN time->tv_nsec -= TOD_NANOSECONDS_PER_SECOND; time->tv_sec++; 10c5fc: ff 02 incl (%edx) seconds++; 10c5fe: 40 inc %eax 10c5ff: 81 e9 00 ca 9a 3b sub $0x3b9aca00,%ecx /* Add the basics */ time->tv_sec += add->tv_sec; time->tv_nsec += add->tv_nsec; /* Now adjust it so nanoseconds is in range */ while ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { 10c605: 81 f9 ff c9 9a 3b cmp $0x3b9ac9ff,%ecx 10c60b: 77 ef ja 10c5fc <_Timespec_Add_to+0x18> 10c60d: 89 4a 04 mov %ecx,0x4(%edx) time->tv_sec++; seconds++; } return seconds; } 10c610: c9 leave 10c611: c3 ret 0010dcdc <_Timespec_Divide>: const struct timespec *lhs, const struct timespec *rhs, uint32_t *ival_percentage, uint32_t *fval_percentage ) { 10dcdc: 55 push %ebp 10dcdd: 89 e5 mov %esp,%ebp 10dcdf: 57 push %edi 10dce0: 56 push %esi 10dce1: 53 push %ebx 10dce2: 83 ec 2c sub $0x2c,%esp 10dce5: 8b 45 08 mov 0x8(%ebp),%eax 10dce8: 8b 75 0c mov 0xc(%ebp),%esi /* * For math simplicity just convert the timespec to nanoseconds * in a 64-bit integer. */ left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; 10dceb: 8b 10 mov (%eax),%edx 10dced: 89 55 e0 mov %edx,-0x20(%ebp) left += lhs->tv_nsec; 10dcf0: 8b 58 04 mov 0x4(%eax),%ebx right = rhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; 10dcf3: b9 00 ca 9a 3b mov $0x3b9aca00,%ecx 10dcf8: 8b 06 mov (%esi),%eax 10dcfa: f7 e9 imul %ecx 10dcfc: 89 45 d0 mov %eax,-0x30(%ebp) 10dcff: 89 55 d4 mov %edx,-0x2c(%ebp) right += rhs->tv_nsec; 10dd02: 8b 76 04 mov 0x4(%esi),%esi 10dd05: 89 f7 mov %esi,%edi 10dd07: c1 ff 1f sar $0x1f,%edi 10dd0a: 01 75 d0 add %esi,-0x30(%ebp) 10dd0d: 11 7d d4 adc %edi,-0x2c(%ebp) if ( right == 0 ) { 10dd10: 8b 55 d4 mov -0x2c(%ebp),%edx 10dd13: 0b 55 d0 or -0x30(%ebp),%edx 10dd16: 75 14 jne 10dd2c <_Timespec_Divide+0x50> *ival_percentage = 0; 10dd18: 8b 45 10 mov 0x10(%ebp),%eax 10dd1b: c7 00 00 00 00 00 movl $0x0,(%eax) *fval_percentage = 0; 10dd21: 8b 55 14 mov 0x14(%ebp),%edx 10dd24: c7 02 00 00 00 00 movl $0x0,(%edx) return; 10dd2a: eb 73 jmp 10dd9f <_Timespec_Divide+0xc3> <== ALWAYS TAKEN /* * For math simplicity just convert the timespec to nanoseconds * in a 64-bit integer. */ left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; 10dd2c: 8b 45 e0 mov -0x20(%ebp),%eax 10dd2f: f7 e9 imul %ecx 10dd31: 89 45 e0 mov %eax,-0x20(%ebp) 10dd34: 89 55 e4 mov %edx,-0x1c(%ebp) * Put it back in the timespec result. * * TODO: Rounding on the last digit of the fval. */ answer = (left * 100000) / right; 10dd37: 89 de mov %ebx,%esi 10dd39: c1 fe 1f sar $0x1f,%esi 10dd3c: 01 5d e0 add %ebx,-0x20(%ebp) 10dd3f: 11 75 e4 adc %esi,-0x1c(%ebp) 10dd42: 69 5d e4 a0 86 01 00 imul $0x186a0,-0x1c(%ebp),%ebx 10dd49: b9 a0 86 01 00 mov $0x186a0,%ecx 10dd4e: 8b 45 e0 mov -0x20(%ebp),%eax 10dd51: f7 e1 mul %ecx 10dd53: 89 45 e0 mov %eax,-0x20(%ebp) 10dd56: 01 da add %ebx,%edx 10dd58: 89 55 e4 mov %edx,-0x1c(%ebp) 10dd5b: ff 75 d4 pushl -0x2c(%ebp) 10dd5e: ff 75 d0 pushl -0x30(%ebp) 10dd61: ff 75 e4 pushl -0x1c(%ebp) 10dd64: ff 75 e0 pushl -0x20(%ebp) 10dd67: e8 90 f4 00 00 call 11d1fc <__udivdi3> 10dd6c: 83 c4 10 add $0x10,%esp 10dd6f: 89 c3 mov %eax,%ebx 10dd71: 89 d6 mov %edx,%esi *ival_percentage = answer / 1000; 10dd73: 6a 00 push $0x0 10dd75: 68 e8 03 00 00 push $0x3e8 10dd7a: 52 push %edx 10dd7b: 50 push %eax 10dd7c: e8 7b f4 00 00 call 11d1fc <__udivdi3> 10dd81: 83 c4 10 add $0x10,%esp 10dd84: 8b 55 10 mov 0x10(%ebp),%edx 10dd87: 89 02 mov %eax,(%edx) *fval_percentage = answer % 1000; 10dd89: 6a 00 push $0x0 10dd8b: 68 e8 03 00 00 push $0x3e8 10dd90: 56 push %esi 10dd91: 53 push %ebx 10dd92: e8 75 f5 00 00 call 11d30c <__umoddi3> 10dd97: 83 c4 10 add $0x10,%esp 10dd9a: 8b 55 14 mov 0x14(%ebp),%edx 10dd9d: 89 02 mov %eax,(%edx) } 10dd9f: 8d 65 f4 lea -0xc(%ebp),%esp 10dda2: 5b pop %ebx 10dda3: 5e pop %esi 10dda4: 5f pop %edi 10dda5: c9 leave 10dda6: c3 ret 00134580 <_Timespec_Greater_than>: bool _Timespec_Greater_than( const struct timespec *lhs, const struct timespec *rhs ) { 134580: 55 push %ebp 134581: 89 e5 mov %esp,%ebp 134583: 53 push %ebx 134584: 8b 4d 08 mov 0x8(%ebp),%ecx 134587: 8b 55 0c mov 0xc(%ebp),%edx if ( lhs->tv_sec > rhs->tv_sec ) 13458a: 8b 1a mov (%edx),%ebx 13458c: b0 01 mov $0x1,%al 13458e: 39 19 cmp %ebx,(%ecx) 134590: 7f 0f jg 1345a1 <_Timespec_Greater_than+0x21> return true; if ( lhs->tv_sec < rhs->tv_sec ) 134592: 7d 04 jge 134598 <_Timespec_Greater_than+0x18> <== NEVER TAKEN 134594: 31 c0 xor %eax,%eax <== NOT EXECUTED 134596: eb 09 jmp 1345a1 <_Timespec_Greater_than+0x21> <== NOT EXECUTED #include #include #include bool _Timespec_Greater_than( 134598: 8b 41 04 mov 0x4(%ecx),%eax 13459b: 3b 42 04 cmp 0x4(%edx),%eax 13459e: 0f 9f c0 setg %al /* ASSERT: lhs->tv_sec == rhs->tv_sec */ if ( lhs->tv_nsec > rhs->tv_nsec ) return true; return false; } 1345a1: 5b pop %ebx 1345a2: c9 leave 1345a3: c3 ret 00123ca0 <_Timespec_Is_valid>: #include bool _Timespec_Is_valid( const struct timespec *time ) { 123ca0: 55 push %ebp 123ca1: 89 e5 mov %esp,%ebp 123ca3: 8b 45 08 mov 0x8(%ebp),%eax if ( !time ) 123ca6: 85 c0 test %eax,%eax 123ca8: 74 16 je 123cc0 <_Timespec_Is_valid+0x20> return false; if ( time->tv_sec < 0 ) 123caa: 83 38 00 cmpl $0x0,(%eax) 123cad: 78 11 js 123cc0 <_Timespec_Is_valid+0x20> return false; if ( time->tv_nsec < 0 ) 123caf: 8b 40 04 mov 0x4(%eax),%eax 123cb2: 85 c0 test %eax,%eax 123cb4: 78 0a js 123cc0 <_Timespec_Is_valid+0x20> #include #include #include bool _Timespec_Is_valid( 123cb6: 3d ff c9 9a 3b cmp $0x3b9ac9ff,%eax 123cbb: 0f 96 c0 setbe %al 123cbe: eb 02 jmp 123cc2 <_Timespec_Is_valid+0x22> <== ALWAYS TAKEN 123cc0: 31 c0 xor %eax,%eax if ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) return false; return true; } 123cc2: c9 leave 123cc3: c3 ret 001345a4 <_Timespec_Less_than>: bool _Timespec_Less_than( const struct timespec *lhs, const struct timespec *rhs ) { 1345a4: 55 push %ebp 1345a5: 89 e5 mov %esp,%ebp 1345a7: 53 push %ebx 1345a8: 8b 4d 08 mov 0x8(%ebp),%ecx 1345ab: 8b 55 0c mov 0xc(%ebp),%edx if ( lhs->tv_sec < rhs->tv_sec ) 1345ae: 8b 1a mov (%edx),%ebx 1345b0: b0 01 mov $0x1,%al 1345b2: 39 19 cmp %ebx,(%ecx) 1345b4: 7c 0f jl 1345c5 <_Timespec_Less_than+0x21> return true; if ( lhs->tv_sec > rhs->tv_sec ) 1345b6: 7e 04 jle 1345bc <_Timespec_Less_than+0x18> 1345b8: 31 c0 xor %eax,%eax 1345ba: eb 09 jmp 1345c5 <_Timespec_Less_than+0x21> <== ALWAYS TAKEN #include #include #include bool _Timespec_Less_than( 1345bc: 8b 41 04 mov 0x4(%ecx),%eax 1345bf: 3b 42 04 cmp 0x4(%edx),%eax 1345c2: 0f 9c c0 setl %al /* ASSERT: lhs->tv_sec == rhs->tv_sec */ if ( lhs->tv_nsec < rhs->tv_nsec ) return true; return false; } 1345c5: 5b pop %ebx 1345c6: c9 leave 1345c7: c3 ret 0010c614 <_Timespec_Subtract>: void _Timespec_Subtract( const struct timespec *start, const struct timespec *end, struct timespec *result ) { 10c614: 55 push %ebp 10c615: 89 e5 mov %esp,%ebp 10c617: 53 push %ebx 10c618: 8b 45 08 mov 0x8(%ebp),%eax 10c61b: 8b 5d 0c mov 0xc(%ebp),%ebx 10c61e: 8b 55 10 mov 0x10(%ebp),%edx if (end->tv_nsec < start->tv_nsec) { 10c621: 8b 4b 04 mov 0x4(%ebx),%ecx 10c624: 3b 48 04 cmp 0x4(%eax),%ecx 10c627: 8b 1b mov (%ebx),%ebx 10c629: 7d 0d jge 10c638 <_Timespec_Subtract+0x24> result->tv_sec = end->tv_sec - start->tv_sec - 1; 10c62b: 4b dec %ebx 10c62c: 2b 18 sub (%eax),%ebx 10c62e: 89 1a mov %ebx,(%edx) result->tv_nsec = 10c630: 81 c1 00 ca 9a 3b add $0x3b9aca00,%ecx 10c636: eb 04 jmp 10c63c <_Timespec_Subtract+0x28> <== ALWAYS TAKEN (TOD_NANOSECONDS_PER_SECOND - start->tv_nsec) + end->tv_nsec; } else { result->tv_sec = end->tv_sec - start->tv_sec; 10c638: 2b 18 sub (%eax),%ebx 10c63a: 89 1a mov %ebx,(%edx) result->tv_nsec = end->tv_nsec - start->tv_nsec; 10c63c: 2b 48 04 sub 0x4(%eax),%ecx 10c63f: 89 4a 04 mov %ecx,0x4(%edx) } } 10c642: 5b pop %ebx 10c643: c9 leave 10c644: c3 ret 0010c75b <_User_extensions_Fatal>: void _User_extensions_Fatal ( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { 10c75b: 55 push %ebp 10c75c: 89 e5 mov %esp,%ebp 10c75e: 57 push %edi 10c75f: 56 push %esi 10c760: 53 push %ebx 10c761: 83 ec 0c sub $0xc,%esp 10c764: 8b 7d 10 mov 0x10(%ebp),%edi Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 10c767: 8b 1d 8c 3a 12 00 mov 0x123a8c,%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 ); 10c76d: 0f b6 75 0c movzbl 0xc(%ebp),%esi ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 10c771: eb 15 jmp 10c788 <_User_extensions_Fatal+0x2d> <== ALWAYS TAKEN !_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 ) 10c773: 8b 43 30 mov 0x30(%ebx),%eax 10c776: 85 c0 test %eax,%eax 10c778: 74 0b je 10c785 <_User_extensions_Fatal+0x2a> (*the_extension->Callouts.fatal)( the_source, is_internal, the_error ); 10c77a: 52 push %edx 10c77b: 57 push %edi 10c77c: 56 push %esi 10c77d: ff 75 08 pushl 0x8(%ebp) 10c780: ff d0 call *%eax 10c782: 83 c4 10 add $0x10,%esp Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; !_Chain_Is_head( &_User_extensions_List, the_node ) ; the_node = the_node->previous ) { 10c785: 8b 5b 04 mov 0x4(%ebx),%ebx { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; !_Chain_Is_head( &_User_extensions_List, the_node ) ; 10c788: 81 fb 84 3a 12 00 cmp $0x123a84,%ebx 10c78e: 75 e3 jne 10c773 <_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 ); } } 10c790: 8d 65 f4 lea -0xc(%ebp),%esp 10c793: 5b pop %ebx 10c794: 5e pop %esi 10c795: 5f pop %edi 10c796: c9 leave 10c797: c3 ret 0010c648 <_User_extensions_Handler_initialization>: #include #include #include void _User_extensions_Handler_initialization(void) { 10c648: 55 push %ebp 10c649: 89 e5 mov %esp,%ebp 10c64b: 57 push %edi 10c64c: 56 push %esi 10c64d: 53 push %ebx 10c64e: 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; 10c651: a1 50 f9 11 00 mov 0x11f950,%eax 10c656: 89 45 e4 mov %eax,-0x1c(%ebp) initial_extensions = Configuration.User_extension_table; 10c659: 8b 35 54 f9 11 00 mov 0x11f954,%esi */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 10c65f: c7 05 84 3a 12 00 88 movl $0x123a88,0x123a84 10c666: 3a 12 00 the_chain->permanent_null = NULL; 10c669: c7 05 88 3a 12 00 00 movl $0x0,0x123a88 10c670: 00 00 00 the_chain->last = _Chain_Head(the_chain); 10c673: c7 05 8c 3a 12 00 84 movl $0x123a84,0x123a8c 10c67a: 3a 12 00 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 10c67d: c7 05 78 38 12 00 7c movl $0x12387c,0x123878 10c684: 38 12 00 the_chain->permanent_null = NULL; 10c687: c7 05 7c 38 12 00 00 movl $0x0,0x12387c 10c68e: 00 00 00 the_chain->last = _Chain_Head(the_chain); 10c691: c7 05 80 38 12 00 78 movl $0x123878,0x123880 10c698: 38 12 00 _Chain_Initialize_empty( &_User_extensions_List ); _Chain_Initialize_empty( &_User_extensions_Switches_list ); if ( initial_extensions ) { 10c69b: 85 f6 test %esi,%esi 10c69d: 74 50 je 10c6ef <_User_extensions_Handler_initialization+0xa7> extension = (User_extensions_Control *) 10c69f: 6b c8 34 imul $0x34,%eax,%ecx 10c6a2: 83 ec 0c sub $0xc,%esp 10c6a5: 51 push %ecx 10c6a6: 89 4d e0 mov %ecx,-0x20(%ebp) 10c6a9: e8 b2 03 00 00 call 10ca60 <_Workspace_Allocate_or_fatal_error> <== ALWAYS TAKEN 10c6ae: 89 c3 mov %eax,%ebx _Workspace_Allocate_or_fatal_error( number_of_extensions * sizeof( User_extensions_Control ) ); memset ( 10c6b0: 31 c0 xor %eax,%eax 10c6b2: 8b 4d e0 mov -0x20(%ebp),%ecx 10c6b5: 89 df mov %ebx,%edi 10c6b7: f3 aa rep stos %al,%es:(%edi) 10c6b9: 89 f0 mov %esi,%eax 10c6bb: 31 d2 xor %edx,%edx 10c6bd: eb 28 jmp 10c6e7 <_User_extensions_Handler_initialization+0x9f> <== ALWAYS TAKEN RTEMS_INLINE_ROUTINE void _User_extensions_Add_set_with_table( User_extensions_Control *extension, const User_extensions_Table *extension_table ) { extension->Callouts = *extension_table; 10c6bf: 8d 7b 14 lea 0x14(%ebx),%edi 10c6c2: 89 c6 mov %eax,%esi 10c6c4: b9 08 00 00 00 mov $0x8,%ecx 10c6c9: f3 a5 rep movsl %ds:(%esi),%es:(%edi) _User_extensions_Add_set( extension ); 10c6cb: 83 ec 0c sub $0xc,%esp 10c6ce: 53 push %ebx 10c6cf: 89 45 e0 mov %eax,-0x20(%ebp) 10c6d2: 89 55 dc mov %edx,-0x24(%ebp) 10c6d5: e8 22 25 00 00 call 10ebfc <_User_extensions_Add_set> <== ALWAYS TAKEN number_of_extensions * sizeof( User_extensions_Control ) ); for ( i = 0 ; i < number_of_extensions ; i++ ) { _User_extensions_Add_set_with_table (extension, &initial_extensions[i]); extension++; 10c6da: 83 c3 34 add $0x34,%ebx extension, 0, number_of_extensions * sizeof( User_extensions_Control ) ); for ( i = 0 ; i < number_of_extensions ; i++ ) { 10c6dd: 8b 55 dc mov -0x24(%ebp),%edx 10c6e0: 42 inc %edx 10c6e1: 8b 45 e0 mov -0x20(%ebp),%eax 10c6e4: 83 c0 20 add $0x20,%eax 10c6e7: 83 c4 10 add $0x10,%esp 10c6ea: 3b 55 e4 cmp -0x1c(%ebp),%edx 10c6ed: 72 d0 jb 10c6bf <_User_extensions_Handler_initialization+0x77> _User_extensions_Add_set_with_table (extension, &initial_extensions[i]); extension++; } } } 10c6ef: 8d 65 f4 lea -0xc(%ebp),%esp 10c6f2: 5b pop %ebx 10c6f3: 5e pop %esi 10c6f4: 5f pop %edi 10c6f5: c9 leave 10c6f6: c3 ret 0010c6f8 <_User_extensions_Thread_begin>: #include void _User_extensions_Thread_begin ( Thread_Control *executing ) { 10c6f8: 55 push %ebp 10c6f9: 89 e5 mov %esp,%ebp 10c6fb: 56 push %esi 10c6fc: 53 push %ebx 10c6fd: 8b 75 08 mov 0x8(%ebp),%esi Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 10c700: 8b 1d 84 3a 12 00 mov 0x123a84,%ebx 10c706: eb 12 jmp 10c71a <_User_extensions_Thread_begin+0x22> <== ALWAYS TAKEN !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_begin != NULL ) 10c708: 8b 43 28 mov 0x28(%ebx),%eax 10c70b: 85 c0 test %eax,%eax 10c70d: 74 09 je 10c718 <_User_extensions_Thread_begin+0x20> (*the_extension->Callouts.thread_begin)( executing ); 10c70f: 83 ec 0c sub $0xc,%esp 10c712: 56 push %esi 10c713: ff d0 call *%eax 10c715: 83 c4 10 add $0x10,%esp Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { 10c718: 8b 1b mov (%ebx),%ebx */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10c71a: 81 fb 88 3a 12 00 cmp $0x123a88,%ebx 10c720: 75 e6 jne 10c708 <_User_extensions_Thread_begin+0x10> the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_begin != NULL ) (*the_extension->Callouts.thread_begin)( executing ); } } 10c722: 8d 65 f8 lea -0x8(%ebp),%esp 10c725: 5b pop %ebx 10c726: 5e pop %esi 10c727: c9 leave 10c728: c3 ret 0010c798 <_User_extensions_Thread_create>: #include bool _User_extensions_Thread_create ( Thread_Control *the_thread ) { 10c798: 55 push %ebp 10c799: 89 e5 mov %esp,%ebp 10c79b: 56 push %esi 10c79c: 53 push %ebx 10c79d: 8b 75 08 mov 0x8(%ebp),%esi Chain_Node *the_node; User_extensions_Control *the_extension; bool status; for ( the_node = _User_extensions_List.first ; 10c7a0: 8b 1d 84 3a 12 00 mov 0x123a84,%ebx 10c7a6: eb 1b jmp 10c7c3 <_User_extensions_Thread_create+0x2b> <== ALWAYS TAKEN !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_create != NULL ) { 10c7a8: 8b 43 14 mov 0x14(%ebx),%eax 10c7ab: 85 c0 test %eax,%eax 10c7ad: 74 12 je 10c7c1 <_User_extensions_Thread_create+0x29> status = (*the_extension->Callouts.thread_create)( 10c7af: 52 push %edx 10c7b0: 52 push %edx 10c7b1: 56 push %esi 10c7b2: ff 35 30 39 12 00 pushl 0x123930 10c7b8: ff d0 call *%eax _Thread_Executing, the_thread ); if ( !status ) 10c7ba: 83 c4 10 add $0x10,%esp 10c7bd: 84 c0 test %al,%al 10c7bf: 74 0c je 10c7cd <_User_extensions_Thread_create+0x35> User_extensions_Control *the_extension; bool status; for ( the_node = _User_extensions_List.first ; !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { 10c7c1: 8b 1b mov (%ebx),%ebx 10c7c3: 81 fb 88 3a 12 00 cmp $0x123a88,%ebx 10c7c9: 75 dd jne 10c7a8 <_User_extensions_Thread_create+0x10> 10c7cb: b0 01 mov $0x1,%al return false; } } return true; } 10c7cd: 8d 65 f8 lea -0x8(%ebp),%esp 10c7d0: 5b pop %ebx 10c7d1: 5e pop %esi 10c7d2: c9 leave 10c7d3: c3 ret 0010c7d4 <_User_extensions_Thread_delete>: #include void _User_extensions_Thread_delete ( Thread_Control *the_thread ) { 10c7d4: 55 push %ebp 10c7d5: 89 e5 mov %esp,%ebp 10c7d7: 56 push %esi 10c7d8: 53 push %ebx 10c7d9: 8b 75 08 mov 0x8(%ebp),%esi Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 10c7dc: 8b 1d 8c 3a 12 00 mov 0x123a8c,%ebx 10c7e2: eb 18 jmp 10c7fc <_User_extensions_Thread_delete+0x28> <== ALWAYS TAKEN !_Chain_Is_head( &_User_extensions_List, the_node ) ; the_node = the_node->previous ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_delete != NULL ) 10c7e4: 8b 43 20 mov 0x20(%ebx),%eax 10c7e7: 85 c0 test %eax,%eax 10c7e9: 74 0e je 10c7f9 <_User_extensions_Thread_delete+0x25> (*the_extension->Callouts.thread_delete)( 10c7eb: 52 push %edx 10c7ec: 52 push %edx 10c7ed: 56 push %esi 10c7ee: ff 35 30 39 12 00 pushl 0x123930 10c7f4: ff d0 call *%eax 10c7f6: 83 c4 10 add $0x10,%esp Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; !_Chain_Is_head( &_User_extensions_List, the_node ) ; the_node = the_node->previous ) { 10c7f9: 8b 5b 04 mov 0x4(%ebx),%ebx { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; !_Chain_Is_head( &_User_extensions_List, the_node ) ; 10c7fc: 81 fb 84 3a 12 00 cmp $0x123a84,%ebx 10c802: 75 e0 jne 10c7e4 <_User_extensions_Thread_delete+0x10> (*the_extension->Callouts.thread_delete)( _Thread_Executing, the_thread ); } } 10c804: 8d 65 f8 lea -0x8(%ebp),%esp 10c807: 5b pop %ebx 10c808: 5e pop %esi 10c809: c9 leave 10c80a: c3 ret 0010c729 <_User_extensions_Thread_exitted>: void _User_extensions_Thread_exitted ( Thread_Control *executing ) { 10c729: 55 push %ebp 10c72a: 89 e5 mov %esp,%ebp 10c72c: 56 push %esi 10c72d: 53 push %ebx 10c72e: 8b 75 08 mov 0x8(%ebp),%esi Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 10c731: 8b 1d 8c 3a 12 00 mov 0x123a8c,%ebx 10c737: eb 13 jmp 10c74c <_User_extensions_Thread_exitted+0x23> <== ALWAYS TAKEN !_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 ) 10c739: 8b 43 2c mov 0x2c(%ebx),%eax 10c73c: 85 c0 test %eax,%eax 10c73e: 74 09 je 10c749 <_User_extensions_Thread_exitted+0x20> (*the_extension->Callouts.thread_exitted)( executing ); 10c740: 83 ec 0c sub $0xc,%esp 10c743: 56 push %esi 10c744: ff d0 call *%eax 10c746: 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 ) { 10c749: 8b 5b 04 mov 0x4(%ebx),%ebx { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; !_Chain_Is_head( &_User_extensions_List, the_node ) ; 10c74c: 81 fb 84 3a 12 00 cmp $0x123a84,%ebx 10c752: 75 e5 jne 10c739 <_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 ); } } 10c754: 8d 65 f8 lea -0x8(%ebp),%esp 10c757: 5b pop %ebx 10c758: 5e pop %esi 10c759: c9 leave 10c75a: c3 ret 0010d290 <_User_extensions_Thread_restart>: #include void _User_extensions_Thread_restart ( Thread_Control *the_thread ) { 10d290: 55 push %ebp 10d291: 89 e5 mov %esp,%ebp 10d293: 56 push %esi 10d294: 53 push %ebx 10d295: 8b 75 08 mov 0x8(%ebp),%esi Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 10d298: 8b 1d 30 57 12 00 mov 0x125730,%ebx 10d29e: eb 17 jmp 10d2b7 <_User_extensions_Thread_restart+0x27> <== ALWAYS TAKEN !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_restart != NULL ) 10d2a0: 8b 43 1c mov 0x1c(%ebx),%eax 10d2a3: 85 c0 test %eax,%eax 10d2a5: 74 0e je 10d2b5 <_User_extensions_Thread_restart+0x25> (*the_extension->Callouts.thread_restart)( 10d2a7: 52 push %edx 10d2a8: 52 push %edx 10d2a9: 56 push %esi 10d2aa: ff 35 dc 55 12 00 pushl 0x1255dc 10d2b0: ff d0 call *%eax 10d2b2: 83 c4 10 add $0x10,%esp Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { 10d2b5: 8b 1b mov (%ebx),%ebx 10d2b7: 81 fb 34 57 12 00 cmp $0x125734,%ebx 10d2bd: 75 e1 jne 10d2a0 <_User_extensions_Thread_restart+0x10> (*the_extension->Callouts.thread_restart)( _Thread_Executing, the_thread ); } } 10d2bf: 8d 65 f8 lea -0x8(%ebp),%esp 10d2c2: 5b pop %ebx 10d2c3: 5e pop %esi 10d2c4: c9 leave 10d2c5: c3 ret 0010c80c <_User_extensions_Thread_start>: #include void _User_extensions_Thread_start ( Thread_Control *the_thread ) { 10c80c: 55 push %ebp 10c80d: 89 e5 mov %esp,%ebp 10c80f: 56 push %esi 10c810: 53 push %ebx 10c811: 8b 75 08 mov 0x8(%ebp),%esi Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 10c814: 8b 1d 84 3a 12 00 mov 0x123a84,%ebx 10c81a: eb 17 jmp 10c833 <_User_extensions_Thread_start+0x27> <== ALWAYS TAKEN !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_start != NULL ) 10c81c: 8b 43 18 mov 0x18(%ebx),%eax 10c81f: 85 c0 test %eax,%eax 10c821: 74 0e je 10c831 <_User_extensions_Thread_start+0x25> (*the_extension->Callouts.thread_start)( 10c823: 52 push %edx 10c824: 52 push %edx 10c825: 56 push %esi 10c826: ff 35 30 39 12 00 pushl 0x123930 10c82c: ff d0 call *%eax 10c82e: 83 c4 10 add $0x10,%esp Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { 10c831: 8b 1b mov (%ebx),%ebx 10c833: 81 fb 88 3a 12 00 cmp $0x123a88,%ebx 10c839: 75 e1 jne 10c81c <_User_extensions_Thread_start+0x10> (*the_extension->Callouts.thread_start)( _Thread_Executing, the_thread ); } } 10c83b: 8d 65 f8 lea -0x8(%ebp),%esp 10c83e: 5b pop %ebx 10c83f: 5e pop %esi 10c840: c9 leave 10c841: c3 ret 0010c844 <_User_extensions_Thread_switch>: void _User_extensions_Thread_switch ( Thread_Control *executing, Thread_Control *heir ) { 10c844: 55 push %ebp 10c845: 89 e5 mov %esp,%ebp 10c847: 57 push %edi 10c848: 56 push %esi 10c849: 53 push %ebx 10c84a: 83 ec 0c sub $0xc,%esp 10c84d: 8b 7d 08 mov 0x8(%ebp),%edi 10c850: 8b 75 0c mov 0xc(%ebp),%esi Chain_Node *the_node; User_extensions_Switch_control *the_extension_switch; for ( the_node = _User_extensions_Switches_list.first ; 10c853: 8b 1d 78 38 12 00 mov 0x123878,%ebx 10c859: eb 0c jmp 10c867 <_User_extensions_Thread_switch+0x23> <== ALWAYS TAKEN !_Chain_Is_tail( &_User_extensions_Switches_list, the_node ) ; the_node = the_node->next ) { the_extension_switch = (User_extensions_Switch_control *) the_node; (*the_extension_switch->thread_switch)( executing, heir ); 10c85b: 50 push %eax 10c85c: 50 push %eax 10c85d: 56 push %esi 10c85e: 57 push %edi 10c85f: ff 53 08 call *0x8(%ebx) Chain_Node *the_node; User_extensions_Switch_control *the_extension_switch; for ( the_node = _User_extensions_Switches_list.first ; !_Chain_Is_tail( &_User_extensions_Switches_list, the_node ) ; the_node = the_node->next ) { 10c862: 8b 1b mov (%ebx),%ebx 10c864: 83 c4 10 add $0x10,%esp 10c867: 81 fb 7c 38 12 00 cmp $0x12387c,%ebx 10c86d: 75 ec jne 10c85b <_User_extensions_Thread_switch+0x17> the_extension_switch = (User_extensions_Switch_control *) the_node; (*the_extension_switch->thread_switch)( executing, heir ); } } 10c86f: 8d 65 f4 lea -0xc(%ebp),%esp 10c872: 5b pop %ebx 10c873: 5e pop %esi 10c874: 5f pop %edi 10c875: c9 leave 10c876: c3 ret 0010e048 <_Watchdog_Adjust>: void _Watchdog_Adjust( Chain_Control *header, Watchdog_Adjust_directions direction, Watchdog_Interval units ) { 10e048: 55 push %ebp 10e049: 89 e5 mov %esp,%ebp 10e04b: 57 push %edi 10e04c: 56 push %esi 10e04d: 53 push %ebx 10e04e: 83 ec 1c sub $0x1c,%esp 10e051: 8b 75 08 mov 0x8(%ebp),%esi 10e054: 8b 7d 0c mov 0xc(%ebp),%edi 10e057: 8b 5d 10 mov 0x10(%ebp),%ebx ISR_Level level; _ISR_Disable( level ); 10e05a: 9c pushf 10e05b: fa cli 10e05c: 58 pop %eax */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 10e05d: 8b 16 mov (%esi),%edx */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10e05f: 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 ) ) { 10e062: 39 ca cmp %ecx,%edx 10e064: 74 44 je 10e0aa <_Watchdog_Adjust+0x62> switch ( direction ) { 10e066: 85 ff test %edi,%edi 10e068: 74 3c je 10e0a6 <_Watchdog_Adjust+0x5e> 10e06a: 4f dec %edi 10e06b: 75 3d jne 10e0aa <_Watchdog_Adjust+0x62> <== ALWAYS TAKEN case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; 10e06d: 01 5a 10 add %ebx,0x10(%edx) break; 10e070: eb 38 jmp 10e0aa <_Watchdog_Adjust+0x62> <== ALWAYS TAKEN RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_First( Chain_Control *header ) { return ( (Watchdog_Control *) header->first ); 10e072: 8b 16 mov (%esi),%edx case WATCHDOG_FORWARD: while ( units ) { if ( units < _Watchdog_First( header )->delta_interval ) { 10e074: 8b 7a 10 mov 0x10(%edx),%edi 10e077: 39 fb cmp %edi,%ebx 10e079: 73 07 jae 10e082 <_Watchdog_Adjust+0x3a> _Watchdog_First( header )->delta_interval -= units; 10e07b: 29 df sub %ebx,%edi 10e07d: 89 7a 10 mov %edi,0x10(%edx) break; 10e080: eb 28 jmp 10e0aa <_Watchdog_Adjust+0x62> <== ALWAYS TAKEN } else { units -= _Watchdog_First( header )->delta_interval; _Watchdog_First( header )->delta_interval = 1; 10e082: c7 42 10 01 00 00 00 movl $0x1,0x10(%edx) _ISR_Enable( level ); 10e089: 50 push %eax 10e08a: 9d popf _Watchdog_Tickle( header ); 10e08b: 83 ec 0c sub $0xc,%esp 10e08e: 56 push %esi 10e08f: 89 4d e4 mov %ecx,-0x1c(%ebp) 10e092: e8 9d 01 00 00 call 10e234 <_Watchdog_Tickle> <== ALWAYS TAKEN _ISR_Disable( level ); 10e097: 9c pushf 10e098: fa cli 10e099: 58 pop %eax if ( _Chain_Is_empty( header ) ) 10e09a: 83 c4 10 add $0x10,%esp 10e09d: 8b 4d e4 mov -0x1c(%ebp),%ecx 10e0a0: 39 0e cmp %ecx,(%esi) 10e0a2: 74 06 je 10e0aa <_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; 10e0a4: 29 fb sub %edi,%ebx switch ( direction ) { case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { 10e0a6: 85 db test %ebx,%ebx 10e0a8: 75 c8 jne 10e072 <_Watchdog_Adjust+0x2a> <== NEVER TAKEN } break; } } _ISR_Enable( level ); 10e0aa: 50 push %eax 10e0ab: 9d popf } 10e0ac: 8d 65 f4 lea -0xc(%ebp),%esp 10e0af: 5b pop %ebx 10e0b0: 5e pop %esi 10e0b1: 5f pop %edi 10e0b2: c9 leave 10e0b3: c3 ret 00119b14 <_Watchdog_Adjust_to_chain>: Chain_Control *header, Watchdog_Interval units_arg, Chain_Control *to_fire ) { 119b14: 55 push %ebp 119b15: 89 e5 mov %esp,%ebp 119b17: 57 push %edi 119b18: 56 push %esi 119b19: 53 push %ebx 119b1a: 83 ec 0c sub $0xc,%esp 119b1d: 8b 7d 08 mov 0x8(%ebp),%edi 119b20: 8b 4d 0c mov 0xc(%ebp),%ecx 119b23: 8b 75 10 mov 0x10(%ebp),%esi Watchdog_Interval units = units_arg; ISR_Level level; Watchdog_Control *first; if ( units <= 0 ) { 119b26: 85 c9 test %ecx,%ecx 119b28: 74 69 je 119b93 <_Watchdog_Adjust_to_chain+0x7f> return; } _ISR_Disable( level ); 119b2a: 9c pushf 119b2b: fa cli 119b2c: 8f 45 ec popl -0x14(%ebp) 119b2f: 8d 47 04 lea 0x4(%edi),%eax 119b32: 89 45 f0 mov %eax,-0x10(%ebp) 119b35: 8d 56 04 lea 0x4(%esi),%edx 119b38: 89 55 e8 mov %edx,-0x18(%ebp) 119b3b: eb 04 jmp 119b41 <_Watchdog_Adjust_to_chain+0x2d> <== ALWAYS TAKEN while ( 1 ) { if ( units <= 0 ) { 119b3d: 85 c9 test %ecx,%ecx 119b3f: 74 4e je 119b8f <_Watchdog_Adjust_to_chain+0x7b> */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 119b41: 8b 17 mov (%edi),%edx break; } if ( _Chain_Is_empty( header ) ) { 119b43: 3b 55 f0 cmp -0x10(%ebp),%edx 119b46: 74 47 je 119b8f <_Watchdog_Adjust_to_chain+0x7b> 119b48: 89 d0 mov %edx,%eax /* * If it is longer than "units" until the first element on the chain * fires, then bump it and quit. */ if ( units < first->delta_interval ) { 119b4a: 8b 5a 10 mov 0x10(%edx),%ebx 119b4d: 39 d9 cmp %ebx,%ecx 119b4f: 73 07 jae 119b58 <_Watchdog_Adjust_to_chain+0x44> first->delta_interval -= units; 119b51: 29 cb sub %ecx,%ebx 119b53: 89 5a 10 mov %ebx,0x10(%edx) break; 119b56: eb 37 jmp 119b8f <_Watchdog_Adjust_to_chain+0x7b> <== ALWAYS TAKEN /* * The first set happens in less than units, so take all of them * off the chain and adjust units to reflect this. */ units -= first->delta_interval; 119b58: 29 d9 sub %ebx,%ecx first->delta_interval = 0; 119b5a: c7 42 10 00 00 00 00 movl $0x0,0x10(%edx) ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 119b61: 8b 18 mov (%eax),%ebx previous = the_node->previous; 119b63: 8b 50 04 mov 0x4(%eax),%edx next->previous = previous; 119b66: 89 53 04 mov %edx,0x4(%ebx) previous->next = next; 119b69: 89 1a mov %ebx,(%edx) Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 119b6b: 8b 55 e8 mov -0x18(%ebp),%edx 119b6e: 89 10 mov %edx,(%eax) old_last_node = the_chain->last; 119b70: 8b 56 08 mov 0x8(%esi),%edx the_chain->last = the_node; 119b73: 89 46 08 mov %eax,0x8(%esi) old_last_node->next = the_node; 119b76: 89 02 mov %eax,(%edx) the_node->previous = old_last_node; 119b78: 89 50 04 mov %edx,0x4(%eax) while ( 1 ) { _Chain_Extract_unprotected( &first->Node ); _Chain_Append_unprotected( to_fire, &first->Node ); _ISR_Flash( level ); 119b7b: ff 75 ec pushl -0x14(%ebp) 119b7e: 9d popf 119b7f: fa cli */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 119b80: 8b 07 mov (%edi),%eax if ( _Chain_Is_empty( header ) ) 119b82: 3b 45 f0 cmp -0x10(%ebp),%eax 119b85: 74 b6 je 119b3d <_Watchdog_Adjust_to_chain+0x29> break; first = _Watchdog_First( header ); if ( first->delta_interval != 0 ) 119b87: 83 78 10 00 cmpl $0x0,0x10(%eax) 119b8b: 74 d4 je 119b61 <_Watchdog_Adjust_to_chain+0x4d> 119b8d: eb ae jmp 119b3d <_Watchdog_Adjust_to_chain+0x29> <== ALWAYS TAKEN break; } } _ISR_Enable( level ); 119b8f: ff 75 ec pushl -0x14(%ebp) 119b92: 9d popf } 119b93: 83 c4 0c add $0xc,%esp 119b96: 5b pop %ebx 119b97: 5e pop %esi 119b98: 5f pop %edi 119b99: c9 leave 119b9a: c3 ret 0010c878 <_Watchdog_Insert>: void _Watchdog_Insert( Chain_Control *header, Watchdog_Control *the_watchdog ) { 10c878: 55 push %ebp 10c879: 89 e5 mov %esp,%ebp 10c87b: 57 push %edi 10c87c: 56 push %esi 10c87d: 53 push %ebx 10c87e: 83 ec 08 sub $0x8,%esp 10c881: 8b 45 0c mov 0xc(%ebp),%eax Watchdog_Control *after; uint32_t insert_isr_nest_level; Watchdog_Interval delta_interval; insert_isr_nest_level = _ISR_Nest_level; 10c884: 8b 35 0c 39 12 00 mov 0x12390c,%esi _ISR_Disable( level ); 10c88a: 9c pushf 10c88b: fa cli 10c88c: 5b pop %ebx /* * Check to see if the watchdog has just been inserted by a * higher priority interrupt. If so, abandon this insert. */ if ( the_watchdog->state != WATCHDOG_INACTIVE ) { 10c88d: 83 78 08 00 cmpl $0x0,0x8(%eax) 10c891: 74 07 je 10c89a <_Watchdog_Insert+0x22> _ISR_Enable( level ); 10c893: 53 push %ebx 10c894: 9d popf return; 10c895: e9 8d 00 00 00 jmp 10c927 <_Watchdog_Insert+0xaf> <== ALWAYS TAKEN } the_watchdog->state = WATCHDOG_BEING_INSERTED; 10c89a: c7 40 08 01 00 00 00 movl $0x1,0x8(%eax) _Watchdog_Sync_count++; 10c8a1: 8b 15 bc 39 12 00 mov 0x1239bc,%edx 10c8a7: 42 inc %edx 10c8a8: 89 15 bc 39 12 00 mov %edx,0x1239bc restart: delta_interval = the_watchdog->initial; 10c8ae: 8b 48 0c mov 0xc(%eax),%ecx * cache *header!! * * Till Straumann, 7/2003 (gcc-3.2.2 -O4 on powerpc) * */ for ( after = (Watchdog_Control *) ((volatile Chain_Control *)header)->first ; 10c8b1: 8b 7d 08 mov 0x8(%ebp),%edi 10c8b4: 8b 17 mov (%edi),%edx ; after = _Watchdog_Next( after ) ) { if ( delta_interval == 0 || !_Watchdog_Next( after ) ) 10c8b6: 85 c9 test %ecx,%ecx 10c8b8: 74 38 je 10c8f2 <_Watchdog_Insert+0x7a> 10c8ba: 83 3a 00 cmpl $0x0,(%edx) 10c8bd: 74 33 je 10c8f2 <_Watchdog_Insert+0x7a> break; if ( delta_interval < after->delta_interval ) { 10c8bf: 8b 7a 10 mov 0x10(%edx),%edi 10c8c2: 89 7d ec mov %edi,-0x14(%ebp) 10c8c5: 39 f9 cmp %edi,%ecx 10c8c7: 73 07 jae 10c8d0 <_Watchdog_Insert+0x58> after->delta_interval -= delta_interval; 10c8c9: 29 cf sub %ecx,%edi 10c8cb: 89 7a 10 mov %edi,0x10(%edx) break; 10c8ce: eb 22 jmp 10c8f2 <_Watchdog_Insert+0x7a> <== ALWAYS TAKEN * used around this flash point allowed interrupts to execute * which violated the design assumptions. The critical section * mechanism used here WAS redesigned to address this. */ _ISR_Flash( level ); 10c8d0: 53 push %ebx 10c8d1: 9d popf 10c8d2: fa cli if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { 10c8d3: 83 78 08 01 cmpl $0x1,0x8(%eax) 10c8d7: 75 3b jne 10c914 <_Watchdog_Insert+0x9c> goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) { 10c8d9: 8b 3d 2c 39 12 00 mov 0x12392c,%edi 10c8df: 39 f7 cmp %esi,%edi 10c8e1: 76 08 jbe 10c8eb <_Watchdog_Insert+0x73> _Watchdog_Sync_level = insert_isr_nest_level; 10c8e3: 89 35 2c 39 12 00 mov %esi,0x12392c goto restart; 10c8e9: eb c3 jmp 10c8ae <_Watchdog_Insert+0x36> <== ALWAYS TAKEN if ( delta_interval < after->delta_interval ) { after->delta_interval -= delta_interval; break; } delta_interval -= after->delta_interval; 10c8eb: 2b 4d ec sub -0x14(%ebp),%ecx RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_Next( Watchdog_Control *the_watchdog ) { return ( (Watchdog_Control *) the_watchdog->Node.next ); 10c8ee: 8b 12 mov (%edx),%edx if ( _Watchdog_Sync_level > insert_isr_nest_level ) { _Watchdog_Sync_level = insert_isr_nest_level; goto restart; } } 10c8f0: eb c4 jmp 10c8b6 <_Watchdog_Insert+0x3e> <== ALWAYS TAKEN RTEMS_INLINE_ROUTINE void _Watchdog_Activate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_ACTIVE; 10c8f2: c7 40 08 02 00 00 00 movl $0x2,0x8(%eax) _Watchdog_Activate( the_watchdog ); the_watchdog->delta_interval = delta_interval; 10c8f9: 89 48 10 mov %ecx,0x10(%eax) _Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node ); 10c8fc: 8b 52 04 mov 0x4(%edx),%edx Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 10c8ff: 89 50 04 mov %edx,0x4(%eax) before_node = after_node->next; 10c902: 8b 0a mov (%edx),%ecx after_node->next = the_node; 10c904: 89 02 mov %eax,(%edx) the_node->next = before_node; 10c906: 89 08 mov %ecx,(%eax) before_node->previous = the_node; 10c908: 89 41 04 mov %eax,0x4(%ecx) the_watchdog->start_time = _Watchdog_Ticks_since_boot; 10c90b: 8b 15 c0 39 12 00 mov 0x1239c0,%edx 10c911: 89 50 14 mov %edx,0x14(%eax) exit_insert: _Watchdog_Sync_level = insert_isr_nest_level; 10c914: 89 35 2c 39 12 00 mov %esi,0x12392c _Watchdog_Sync_count--; 10c91a: a1 bc 39 12 00 mov 0x1239bc,%eax 10c91f: 48 dec %eax 10c920: a3 bc 39 12 00 mov %eax,0x1239bc _ISR_Enable( level ); 10c925: 53 push %ebx 10c926: 9d popf } 10c927: 58 pop %eax 10c928: 5a pop %edx 10c929: 5b pop %ebx 10c92a: 5e pop %esi 10c92b: 5f pop %edi 10c92c: c9 leave 10c92d: c3 ret 0010c990 <_Watchdog_Remove>: */ Watchdog_States _Watchdog_Remove( Watchdog_Control *the_watchdog ) { 10c990: 55 push %ebp 10c991: 89 e5 mov %esp,%ebp 10c993: 56 push %esi 10c994: 53 push %ebx 10c995: 8b 55 08 mov 0x8(%ebp),%edx ISR_Level level; Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); 10c998: 9c pushf 10c999: fa cli 10c99a: 5e pop %esi previous_state = the_watchdog->state; 10c99b: 8b 42 08 mov 0x8(%edx),%eax switch ( previous_state ) { 10c99e: 83 f8 01 cmp $0x1,%eax 10c9a1: 74 09 je 10c9ac <_Watchdog_Remove+0x1c> 10c9a3: 72 44 jb 10c9e9 <_Watchdog_Remove+0x59> 10c9a5: 83 f8 03 cmp $0x3,%eax 10c9a8: 77 3f ja 10c9e9 <_Watchdog_Remove+0x59> <== ALWAYS TAKEN 10c9aa: eb 09 jmp 10c9b5 <_Watchdog_Remove+0x25> <== ALWAYS TAKEN /* * 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; 10c9ac: c7 42 08 00 00 00 00 movl $0x0,0x8(%edx) break; 10c9b3: eb 34 jmp 10c9e9 <_Watchdog_Remove+0x59> <== ALWAYS TAKEN case WATCHDOG_ACTIVE: case WATCHDOG_REMOVE_IT: the_watchdog->state = WATCHDOG_INACTIVE; 10c9b5: c7 42 08 00 00 00 00 movl $0x0,0x8(%edx) RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_Next( Watchdog_Control *the_watchdog ) { return ( (Watchdog_Control *) the_watchdog->Node.next ); 10c9bc: 8b 0a mov (%edx),%ecx next_watchdog = _Watchdog_Next( the_watchdog ); if ( _Watchdog_Next(next_watchdog) ) 10c9be: 83 39 00 cmpl $0x0,(%ecx) 10c9c1: 74 06 je 10c9c9 <_Watchdog_Remove+0x39> next_watchdog->delta_interval += the_watchdog->delta_interval; 10c9c3: 8b 5a 10 mov 0x10(%edx),%ebx 10c9c6: 01 59 10 add %ebx,0x10(%ecx) if ( _Watchdog_Sync_count ) 10c9c9: 8b 0d bc 39 12 00 mov 0x1239bc,%ecx 10c9cf: 85 c9 test %ecx,%ecx 10c9d1: 74 0c je 10c9df <_Watchdog_Remove+0x4f> _Watchdog_Sync_level = _ISR_Nest_level; 10c9d3: 8b 0d 0c 39 12 00 mov 0x12390c,%ecx 10c9d9: 89 0d 2c 39 12 00 mov %ecx,0x12392c ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 10c9df: 8b 1a mov (%edx),%ebx previous = the_node->previous; 10c9e1: 8b 4a 04 mov 0x4(%edx),%ecx next->previous = previous; 10c9e4: 89 4b 04 mov %ecx,0x4(%ebx) previous->next = next; 10c9e7: 89 19 mov %ebx,(%ecx) _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; 10c9e9: 8b 0d c0 39 12 00 mov 0x1239c0,%ecx 10c9ef: 89 4a 18 mov %ecx,0x18(%edx) _ISR_Enable( level ); 10c9f2: 56 push %esi 10c9f3: 9d popf return( previous_state ); } 10c9f4: 5b pop %ebx 10c9f5: 5e pop %esi 10c9f6: c9 leave 10c9f7: c3 ret 0010dbf4 <_Watchdog_Report_chain>: void _Watchdog_Report_chain( const char *name, Chain_Control *header ) { 10dbf4: 55 push %ebp 10dbf5: 89 e5 mov %esp,%ebp 10dbf7: 57 push %edi 10dbf8: 56 push %esi 10dbf9: 53 push %ebx 10dbfa: 83 ec 20 sub $0x20,%esp 10dbfd: 8b 7d 08 mov 0x8(%ebp),%edi 10dc00: 8b 75 0c mov 0xc(%ebp),%esi ISR_Level level; Chain_Node *node; _ISR_Disable( level ); 10dc03: 9c pushf 10dc04: fa cli 10dc05: 8f 45 e4 popl -0x1c(%ebp) printk( "Watchdog Chain: %s %p\n", name, header ); 10dc08: 56 push %esi 10dc09: 57 push %edi 10dc0a: 68 c4 f8 11 00 push $0x11f8c4 10dc0f: e8 04 ac ff ff call 108818 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 10dc14: 8b 1e mov (%esi),%ebx */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10dc16: 83 c6 04 add $0x4,%esi if ( !_Chain_Is_empty( header ) ) { 10dc19: 83 c4 10 add $0x10,%esp 10dc1c: 39 f3 cmp %esi,%ebx 10dc1e: 74 1d je 10dc3d <_Watchdog_Report_chain+0x49> node != _Chain_Tail(header) ; node = node->next ) { Watchdog_Control *watch = (Watchdog_Control *) node; _Watchdog_Report( NULL, watch ); 10dc20: 52 push %edx 10dc21: 52 push %edx 10dc22: 53 push %ebx 10dc23: 6a 00 push $0x0 10dc25: e8 32 00 00 00 call 10dc5c <_Watchdog_Report> <== ALWAYS TAKEN _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 ) 10dc2a: 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 ; 10dc2c: 83 c4 10 add $0x10,%esp 10dc2f: 39 f3 cmp %esi,%ebx 10dc31: 75 ed jne 10dc20 <_Watchdog_Report_chain+0x2c> <== ALWAYS TAKEN { Watchdog_Control *watch = (Watchdog_Control *) node; _Watchdog_Report( NULL, watch ); } printk( "== end of %s \n", name ); 10dc33: 50 push %eax 10dc34: 50 push %eax 10dc35: 57 push %edi 10dc36: 68 db f8 11 00 push $0x11f8db 10dc3b: eb 08 jmp 10dc45 <_Watchdog_Report_chain+0x51> <== ALWAYS TAKEN } else { printk( "Chain is empty\n" ); 10dc3d: 83 ec 0c sub $0xc,%esp 10dc40: 68 ea f8 11 00 push $0x11f8ea 10dc45: e8 ce ab ff ff call 108818 10dc4a: 83 c4 10 add $0x10,%esp } _ISR_Enable( level ); 10dc4d: ff 75 e4 pushl -0x1c(%ebp) 10dc50: 9d popf } 10dc51: 8d 65 f4 lea -0xc(%ebp),%esp 10dc54: 5b pop %ebx 10dc55: 5e pop %esi 10dc56: 5f pop %edi 10dc57: c9 leave 10dc58: c3 ret 0010c9f8 <_Watchdog_Tickle>: */ void _Watchdog_Tickle( Chain_Control *header ) { 10c9f8: 55 push %ebp 10c9f9: 89 e5 mov %esp,%ebp 10c9fb: 57 push %edi 10c9fc: 56 push %esi 10c9fd: 53 push %ebx 10c9fe: 83 ec 1c sub $0x1c,%esp 10ca01: 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 ); 10ca04: 9c pushf 10ca05: fa cli 10ca06: 5e pop %esi */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 10ca07: 8b 1f mov (%edi),%ebx */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10ca09: 8d 47 04 lea 0x4(%edi),%eax 10ca0c: 89 45 e4 mov %eax,-0x1c(%ebp) if ( _Chain_Is_empty( header ) ) 10ca0f: 39 c3 cmp %eax,%ebx 10ca11: 74 40 je 10ca53 <_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) { 10ca13: 8b 43 10 mov 0x10(%ebx),%eax 10ca16: 85 c0 test %eax,%eax 10ca18: 74 08 je 10ca22 <_Watchdog_Tickle+0x2a> the_watchdog->delta_interval--; 10ca1a: 48 dec %eax 10ca1b: 89 43 10 mov %eax,0x10(%ebx) if ( the_watchdog->delta_interval != 0 ) 10ca1e: 85 c0 test %eax,%eax 10ca20: 75 31 jne 10ca53 <_Watchdog_Tickle+0x5b> goto leave; } do { watchdog_state = _Watchdog_Remove( the_watchdog ); 10ca22: 83 ec 0c sub $0xc,%esp 10ca25: 53 push %ebx 10ca26: e8 65 ff ff ff call 10c990 <_Watchdog_Remove> <== ALWAYS TAKEN _ISR_Enable( level ); 10ca2b: 56 push %esi 10ca2c: 9d popf switch( watchdog_state ) { 10ca2d: 83 c4 10 add $0x10,%esp 10ca30: 83 f8 02 cmp $0x2,%eax 10ca33: 75 0e jne 10ca43 <_Watchdog_Tickle+0x4b> case WATCHDOG_ACTIVE: (*the_watchdog->routine)( 10ca35: 50 push %eax 10ca36: 50 push %eax 10ca37: ff 73 24 pushl 0x24(%ebx) 10ca3a: ff 73 20 pushl 0x20(%ebx) 10ca3d: ff 53 1c call *0x1c(%ebx) 10ca40: 83 c4 10 add $0x10,%esp case WATCHDOG_REMOVE_IT: break; } _ISR_Disable( level ); 10ca43: 9c pushf 10ca44: fa cli 10ca45: 5e pop %esi RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_First( Chain_Control *header ) { return ( (Watchdog_Control *) header->first ); 10ca46: 8b 1f mov (%edi),%ebx the_watchdog = _Watchdog_First( header ); } while ( !_Chain_Is_empty( header ) && (the_watchdog->delta_interval == 0) ); 10ca48: 3b 5d e4 cmp -0x1c(%ebp),%ebx 10ca4b: 74 06 je 10ca53 <_Watchdog_Tickle+0x5b> 10ca4d: 83 7b 10 00 cmpl $0x0,0x10(%ebx) 10ca51: eb cd jmp 10ca20 <_Watchdog_Tickle+0x28> <== ALWAYS TAKEN leave: _ISR_Enable(level); 10ca53: 56 push %esi 10ca54: 9d popf } 10ca55: 8d 65 f4 lea -0xc(%ebp),%esp 10ca58: 5b pop %ebx 10ca59: 5e pop %esi 10ca5a: 5f pop %edi 10ca5b: c9 leave 10ca5c: c3 ret 0012168e <__kill>: #endif int __kill( pid_t pid, int sig ) { 12168e: 55 push %ebp <== NOT EXECUTED 12168f: 89 e5 mov %esp,%ebp <== NOT EXECUTED return 0; } 121691: 31 c0 xor %eax,%eax <== NOT EXECUTED 121693: c9 leave <== NOT EXECUTED 121694: c3 ret <== NOT EXECUTED 0010db31 <_close_r>: int _close_r( struct _reent *ptr __attribute__((unused)), int fd ) { 10db31: 55 push %ebp 10db32: 89 e5 mov %esp,%ebp 10db34: 83 ec 08 sub $0x8,%esp return close( fd ); 10db37: 8b 45 0c mov 0xc(%ebp),%eax 10db3a: 89 45 08 mov %eax,0x8(%ebp) } 10db3d: c9 leave int _close_r( struct _reent *ptr __attribute__((unused)), int fd ) { return close( fd ); 10db3e: e9 79 ff ff ff jmp 10dabc <== ALWAYS TAKEN 0011b6f0 <_exit>: /* * If the toolset uses init/fini sections, then we need to * run the global destructors now. */ #if defined(__USE_INIT_FINI__) FINI_SYMBOL(); 11b6f0: 55 push %ebp 11b6f1: 89 e5 mov %esp,%ebp 11b6f3: 83 ec 08 sub $0x8,%esp 11b6f6: e8 72 06 00 00 call 11bd6d <_fini> <== ALWAYS TAKEN * 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(); 11b6fb: e8 8c ff ff ff call 11b68c <== ALWAYS TAKEN rtems_shutdown_executive(status); 11b700: 83 ec 0c sub $0xc,%esp 11b703: ff 75 08 pushl 0x8(%ebp) 11b706: e8 e9 00 00 00 call 11b7f4 <== ALWAYS TAKEN 11b70b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 11b70e: eb fe jmp 11b70e <_exit+0x1e> <== NOT EXECUTED 00133d82 <_fcntl_r>: struct _reent *ptr __attribute__((unused)), int fd, int cmd, int arg ) { 133d82: 55 push %ebp <== NOT EXECUTED 133d83: 89 e5 mov %esp,%ebp <== NOT EXECUTED 133d85: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 133d88: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED 133d8b: 8b 55 10 mov 0x10(%ebp),%edx <== NOT EXECUTED return fcntl( fd, cmd, arg ); 133d8e: 8b 4d 14 mov 0x14(%ebp),%ecx <== NOT EXECUTED 133d91: 89 4d 10 mov %ecx,0x10(%ebp) <== NOT EXECUTED 133d94: 89 55 0c mov %edx,0xc(%ebp) <== NOT EXECUTED 133d97: 89 45 08 mov %eax,0x8(%ebp) <== NOT EXECUTED } 133d9a: c9 leave <== NOT EXECUTED int fd, int cmd, int arg ) { return fcntl( fd, cmd, arg ); 133d9b: e9 98 fe ff ff jmp 133c38 <== NOT EXECUTED 0011b560 <_fstat_r>: int _fstat_r( struct _reent *ptr __attribute__((unused)), int fd, struct stat *buf ) { 11b560: 55 push %ebp 11b561: 89 e5 mov %esp,%ebp 11b563: 83 ec 08 sub $0x8,%esp 11b566: 8b 45 0c mov 0xc(%ebp),%eax return fstat( fd, buf ); 11b569: 8b 55 10 mov 0x10(%ebp),%edx 11b56c: 89 55 0c mov %edx,0xc(%ebp) 11b56f: 89 45 08 mov %eax,0x8(%ebp) } 11b572: c9 leave struct _reent *ptr __attribute__((unused)), int fd, struct stat *buf ) { return fstat( fd, buf ); 11b573: e9 68 ff ff ff jmp 11b4e0 <== ALWAYS TAKEN 00121662 <_getpid_r>: #include pid_t _getpid_r( struct _reent *ptr __attribute__((unused)) ) { 121662: 55 push %ebp <== NOT EXECUTED 121663: 89 e5 mov %esp,%ebp <== NOT EXECUTED return getpid(); } 121665: b8 01 00 00 00 mov $0x1,%eax <== NOT EXECUTED 12166a: c9 leave <== NOT EXECUTED 12166b: c3 ret <== NOT EXECUTED 0010dc3f <_gettimeofday>: int _gettimeofday( struct timeval *tp, struct timezone *tzp ) { 10dc3f: 55 push %ebp <== NOT EXECUTED 10dc40: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10dc42: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED return gettimeofday( tp, tzp ); } 10dc45: c9 leave <== NOT EXECUTED int _gettimeofday( struct timeval *tp, struct timezone *tzp ) { return gettimeofday( tp, tzp ); 10dc46: e9 a5 ff ff ff jmp 10dbf0 <== NOT EXECUTED 0010dc4b <_gettimeofday_r>: int _gettimeofday_r( struct _reent *ignored_reentrancy_stuff __attribute__((unused)), struct timeval *tp, struct timezone *tzp ) { 10dc4b: 55 push %ebp 10dc4c: 89 e5 mov %esp,%ebp 10dc4e: 83 ec 08 sub $0x8,%esp 10dc51: 8b 45 0c mov 0xc(%ebp),%eax return gettimeofday( tp, tzp ); 10dc54: 8b 55 10 mov 0x10(%ebp),%edx 10dc57: 89 55 0c mov %edx,0xc(%ebp) 10dc5a: 89 45 08 mov %eax,0x8(%ebp) } 10dc5d: c9 leave struct _reent *ignored_reentrancy_stuff __attribute__((unused)), struct timeval *tp, struct timezone *tzp ) { return gettimeofday( tp, tzp ); 10dc5e: e9 8d ff ff ff jmp 10dbf0 <== ALWAYS TAKEN 0011b578 <_isatty_r>: int _isatty_r( struct _reent *ptr __attribute__((unused)), int fd ) { 11b578: 55 push %ebp 11b579: 89 e5 mov %esp,%ebp 11b57b: 83 ec 08 sub $0x8,%esp return isatty( fd ); 11b57e: 8b 45 0c mov 0xc(%ebp),%eax 11b581: 89 45 08 mov %eax,0x8(%ebp) } 11b584: c9 leave int _isatty_r( struct _reent *ptr __attribute__((unused)), int fd ) { return isatty( fd ); 11b585: e9 ce 05 00 00 jmp 11bb58 <== ALWAYS TAKEN 00121687 <_kill_r>: #if defined(RTEMS_NEWLIB) #include int _kill_r( struct _reent *ptr, pid_t pid, int sig ) { 121687: 55 push %ebp <== NOT EXECUTED 121688: 89 e5 mov %esp,%ebp <== NOT EXECUTED return 0; } 12168a: 31 c0 xor %eax,%eax <== NOT EXECUTED 12168c: c9 leave <== NOT EXECUTED 12168d: c3 ret <== NOT EXECUTED 00126076 <_link_r>: int _link_r( struct _reent *ptr __attribute__((unused)), const char *existing, const char *new ) { 126076: 55 push %ebp <== NOT EXECUTED 126077: 89 e5 mov %esp,%ebp <== NOT EXECUTED 126079: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 12607c: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED return link( existing, new ); 12607f: 8b 55 10 mov 0x10(%ebp),%edx <== NOT EXECUTED 126082: 89 55 0c mov %edx,0xc(%ebp) <== NOT EXECUTED 126085: 89 45 08 mov %eax,0x8(%ebp) <== NOT EXECUTED } 126088: c9 leave <== NOT EXECUTED struct _reent *ptr __attribute__((unused)), const char *existing, const char *new ) { return link( existing, new ); 126089: e9 26 fe ff ff jmp 125eb4 <== NOT EXECUTED 0011b659 <_lseek_r>: struct _reent *ptr __attribute__((unused)), int fd, off_t offset, int whence ) { 11b659: 55 push %ebp 11b65a: 89 e5 mov %esp,%ebp 11b65c: 83 ec 08 sub $0x8,%esp 11b65f: 8b 45 0c mov 0xc(%ebp),%eax 11b662: 8b 55 10 mov 0x10(%ebp),%edx return lseek( fd, offset, whence ); 11b665: 8b 4d 14 mov 0x14(%ebp),%ecx 11b668: 89 4d 10 mov %ecx,0x10(%ebp) 11b66b: 89 55 0c mov %edx,0xc(%ebp) 11b66e: 89 45 08 mov %eax,0x8(%ebp) } 11b671: c9 leave int fd, off_t offset, int whence ) { return lseek( fd, offset, whence ); 11b672: e9 15 ff ff ff jmp 11b58c <== ALWAYS TAKEN 0012622a <_lstat_r>: int _STAT_R_NAME( struct _reent *ptr __attribute__((unused)), const char *path, struct stat *buf ) { 12622a: 55 push %ebp <== NOT EXECUTED 12622b: 89 e5 mov %esp,%ebp <== NOT EXECUTED 12622d: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 126230: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED return _STAT_NAME( path, buf ); 126233: 8b 55 10 mov 0x10(%ebp),%edx <== NOT EXECUTED 126236: 89 55 0c mov %edx,0xc(%ebp) <== NOT EXECUTED 126239: 89 45 08 mov %eax,0x8(%ebp) <== NOT EXECUTED } 12623c: c9 leave <== NOT EXECUTED struct _reent *ptr __attribute__((unused)), const char *path, struct stat *buf ) { return _STAT_NAME( path, buf ); 12623d: e9 3a ff ff ff jmp 12617c <== NOT EXECUTED 00107d14 <_open_r>: struct _reent *ptr __attribute__((unused)), const char *buf, int flags, int mode ) { 107d14: 55 push %ebp 107d15: 89 e5 mov %esp,%ebp 107d17: 83 ec 08 sub $0x8,%esp 107d1a: 8b 45 0c mov 0xc(%ebp),%eax 107d1d: 8b 55 10 mov 0x10(%ebp),%edx return open( buf, flags, mode ); 107d20: 8b 4d 14 mov 0x14(%ebp),%ecx 107d23: 89 4d 10 mov %ecx,0x10(%ebp) 107d26: 89 55 0c mov %edx,0xc(%ebp) 107d29: 89 45 08 mov %eax,0x8(%ebp) } 107d2c: c9 leave const char *buf, int flags, int mode ) { return open( buf, flags, mode ); 107d2d: e9 da fd ff ff jmp 107b0c <== ALWAYS TAKEN 0011b79c <_read_r>: struct _reent *ptr __attribute__((unused)), int fd, void *buf, size_t nbytes ) { 11b79c: 55 push %ebp 11b79d: 89 e5 mov %esp,%ebp 11b79f: 83 ec 08 sub $0x8,%esp 11b7a2: 8b 45 0c mov 0xc(%ebp),%eax 11b7a5: 8b 55 10 mov 0x10(%ebp),%edx return read( fd, buf, nbytes ); 11b7a8: 8b 4d 14 mov 0x14(%ebp),%ecx 11b7ab: 89 4d 10 mov %ecx,0x10(%ebp) 11b7ae: 89 55 0c mov %edx,0xc(%ebp) 11b7b1: 89 45 08 mov %eax,0x8(%ebp) } 11b7b4: c9 leave int fd, void *buf, size_t nbytes ) { return read( fd, buf, nbytes ); 11b7b5: e9 56 ff ff ff jmp 11b710 <== ALWAYS TAKEN 0011b7bc <_realloc_r>: void *_realloc_r( struct _reent *ignored __attribute__((unused)), void *ptr, size_t size ) { 11b7bc: 55 push %ebp <== NOT EXECUTED 11b7bd: 89 e5 mov %esp,%ebp <== NOT EXECUTED 11b7bf: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 11b7c2: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED return realloc( ptr, size ); 11b7c5: 8b 55 10 mov 0x10(%ebp),%edx <== NOT EXECUTED 11b7c8: 89 55 0c mov %edx,0xc(%ebp) <== NOT EXECUTED 11b7cb: 89 45 08 mov %eax,0x8(%ebp) <== NOT EXECUTED } 11b7ce: c9 leave <== NOT EXECUTED struct _reent *ignored __attribute__((unused)), void *ptr, size_t size ) { return realloc( ptr, size ); 11b7cf: e9 48 00 00 00 jmp 11b81c <== NOT EXECUTED 0014e114 <_rename_r>: int _rename_r( struct _reent *ptr __attribute__((unused)), const char *old, const char *new ) { 14e114: 55 push %ebp <== NOT EXECUTED 14e115: 89 e5 mov %esp,%ebp <== NOT EXECUTED 14e117: 57 push %edi <== NOT EXECUTED 14e118: 56 push %esi <== NOT EXECUTED 14e119: 53 push %ebx <== NOT EXECUTED 14e11a: 83 ec 68 sub $0x68,%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 ); 14e11d: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED 14e120: e8 0a d5 fb ff call 10b62f <== NOT EXECUTED 14e125: 89 c2 mov %eax,%edx <== NOT EXECUTED if ( old_parent_pathlen == 0 ) 14e127: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 14e12a: 85 c0 test %eax,%eax <== NOT EXECUTED 14e12c: 75 36 jne 14e164 <_rename_r+0x50> <== NOT EXECUTED rtems_filesystem_get_start_loc( old, &i, &old_parent_loc ); 14e12e: 8b 4d 0c mov 0xc(%ebp),%ecx <== NOT EXECUTED 14e131: 8a 01 mov (%ecx),%al <== NOT EXECUTED 14e133: 3c 5c cmp $0x5c,%al <== NOT EXECUTED 14e135: 74 08 je 14e13f <_rename_r+0x2b> <== NOT EXECUTED 14e137: 3c 2f cmp $0x2f,%al <== NOT EXECUTED 14e139: 74 04 je 14e13f <_rename_r+0x2b> <== NOT EXECUTED 14e13b: 84 c0 test %al,%al <== NOT EXECUTED 14e13d: 75 0e jne 14e14d <_rename_r+0x39> <== NOT EXECUTED 14e13f: 8d 7d bc lea -0x44(%ebp),%edi <== NOT EXECUTED 14e142: 8b 35 78 db 15 00 mov 0x15db78,%esi <== NOT EXECUTED 14e148: 83 c6 18 add $0x18,%esi <== NOT EXECUTED 14e14b: eb 0c jmp 14e159 <_rename_r+0x45> <== NOT EXECUTED 14e14d: 8d 7d bc lea -0x44(%ebp),%edi <== NOT EXECUTED 14e150: 8b 35 78 db 15 00 mov 0x15db78,%esi <== NOT EXECUTED 14e156: 83 c6 04 add $0x4,%esi <== NOT EXECUTED 14e159: b9 05 00 00 00 mov $0x5,%ecx <== NOT EXECUTED 14e15e: f3 a5 rep movsl %ds:(%esi),%es:(%edi) <== NOT EXECUTED 14e160: 31 db xor %ebx,%ebx <== NOT EXECUTED 14e162: eb 2a jmp 14e18e <_rename_r+0x7a> <== NOT EXECUTED else { result = rtems_filesystem_evaluate_path( old, old_parent_pathlen, 14e164: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 14e167: 6a 00 push $0x0 <== NOT EXECUTED 14e169: 8d 45 bc lea -0x44(%ebp),%eax <== NOT EXECUTED 14e16c: 50 push %eax <== NOT EXECUTED 14e16d: 6a 02 push $0x2 <== NOT EXECUTED 14e16f: 52 push %edx <== NOT EXECUTED 14e170: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED 14e173: 89 55 a4 mov %edx,-0x5c(%ebp) <== NOT EXECUTED 14e176: e8 a1 d5 fb ff call 10b71c <== NOT EXECUTED RTEMS_LIBIO_PERMS_WRITE, &old_parent_loc, false ); if ( result != 0 ) 14e17b: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 14e17e: b3 01 mov $0x1,%bl <== NOT EXECUTED 14e180: 83 ce ff or $0xffffffff,%esi <== NOT EXECUTED 14e183: 85 c0 test %eax,%eax <== NOT EXECUTED 14e185: 8b 55 a4 mov -0x5c(%ebp),%edx <== NOT EXECUTED 14e188: 0f 85 6f 02 00 00 jne 14e3fd <_rename_r+0x2e9> <== NOT EXECUTED /* * Start from the parent to find the node that should be under it. */ old_loc = old_parent_loc; 14e18e: 8d 7d d0 lea -0x30(%ebp),%edi <== NOT EXECUTED 14e191: 8d 75 bc lea -0x44(%ebp),%esi <== NOT EXECUTED 14e194: b9 05 00 00 00 mov $0x5,%ecx <== NOT EXECUTED 14e199: f3 a5 rep movsl %ds:(%esi),%es:(%edi) <== NOT EXECUTED name = old + old_parent_pathlen; 14e19b: 8b 75 0c mov 0xc(%ebp),%esi <== NOT EXECUTED 14e19e: 01 d6 add %edx,%esi <== NOT EXECUTED 14e1a0: 89 75 e4 mov %esi,-0x1c(%ebp) <== NOT EXECUTED name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 14e1a3: 83 c9 ff or $0xffffffff,%ecx <== NOT EXECUTED 14e1a6: 89 f7 mov %esi,%edi <== NOT EXECUTED 14e1a8: 31 c0 xor %eax,%eax <== NOT EXECUTED 14e1aa: f2 ae repnz scas %es:(%edi),%al <== NOT EXECUTED 14e1ac: f7 d1 not %ecx <== NOT EXECUTED 14e1ae: 49 dec %ecx <== NOT EXECUTED 14e1af: 57 push %edi <== NOT EXECUTED 14e1b0: 57 push %edi <== NOT EXECUTED 14e1b1: 51 push %ecx <== NOT EXECUTED 14e1b2: 56 push %esi <== NOT EXECUTED 14e1b3: e8 50 d4 fb ff call 10b608 <== NOT EXECUTED 14e1b8: 01 c6 add %eax,%esi <== NOT EXECUTED 14e1ba: 89 75 e4 mov %esi,-0x1c(%ebp) <== NOT EXECUTED result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 14e1bd: 83 c9 ff or $0xffffffff,%ecx <== NOT EXECUTED 14e1c0: 89 f7 mov %esi,%edi <== NOT EXECUTED 14e1c2: 31 c0 xor %eax,%eax <== NOT EXECUTED 14e1c4: f2 ae repnz scas %es:(%edi),%al <== NOT EXECUTED 14e1c6: f7 d1 not %ecx <== NOT EXECUTED 14e1c8: 49 dec %ecx <== NOT EXECUTED 14e1c9: c7 04 24 00 00 00 00 movl $0x0,(%esp) <== NOT EXECUTED 14e1d0: 8d 45 d0 lea -0x30(%ebp),%eax <== NOT EXECUTED 14e1d3: 50 push %eax <== NOT EXECUTED 14e1d4: 6a 00 push $0x0 <== NOT EXECUTED 14e1d6: 51 push %ecx <== NOT EXECUTED 14e1d7: 56 push %esi <== NOT EXECUTED 14e1d8: e8 85 d4 fb ff call 10b662 <== NOT EXECUTED 14e1dd: 89 c6 mov %eax,%esi <== NOT EXECUTED 0, &old_loc, false ); if ( result != 0 ) { 14e1df: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 14e1e2: 85 c0 test %eax,%eax <== NOT EXECUTED 14e1e4: 74 29 je 14e20f <_rename_r+0xfb> <== NOT EXECUTED if ( free_old_parentloc ) 14e1e6: 84 db test %bl,%bl <== NOT EXECUTED 14e1e8: 0f 84 1d 01 00 00 je 14e30b <_rename_r+0x1f7> <== NOT EXECUTED rtems_filesystem_freenode( &old_parent_loc ); 14e1ee: 8b 45 c8 mov -0x38(%ebp),%eax <== NOT EXECUTED 14e1f1: 85 c0 test %eax,%eax <== NOT EXECUTED 14e1f3: 0f 84 12 01 00 00 je 14e30b <_rename_r+0x1f7> <== NOT EXECUTED 14e1f9: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 14e1fc: 85 c0 test %eax,%eax <== NOT EXECUTED 14e1fe: 0f 84 07 01 00 00 je 14e30b <_rename_r+0x1f7> <== NOT EXECUTED 14e204: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 14e207: 8d 55 bc lea -0x44(%ebp),%edx <== NOT EXECUTED 14e20a: e9 f6 00 00 00 jmp 14e305 <_rename_r+0x1f1> <== NOT EXECUTED /* * Get the parent of the new node we are renaming to. */ rtems_filesystem_get_start_loc( new, &i, &new_parent_loc ); 14e20f: 8b 55 10 mov 0x10(%ebp),%edx <== NOT EXECUTED 14e212: 8a 02 mov (%edx),%al <== NOT EXECUTED 14e214: 3c 5c cmp $0x5c,%al <== NOT EXECUTED 14e216: 74 08 je 14e220 <_rename_r+0x10c> <== NOT EXECUTED 14e218: 3c 2f cmp $0x2f,%al <== NOT EXECUTED 14e21a: 74 04 je 14e220 <_rename_r+0x10c> <== NOT EXECUTED 14e21c: 84 c0 test %al,%al <== NOT EXECUTED 14e21e: 75 1a jne 14e23a <_rename_r+0x126> <== NOT EXECUTED 14e220: 8d 7d a8 lea -0x58(%ebp),%edi <== NOT EXECUTED 14e223: 8b 35 78 db 15 00 mov 0x15db78,%esi <== NOT EXECUTED 14e229: 83 c6 18 add $0x18,%esi <== NOT EXECUTED 14e22c: b9 05 00 00 00 mov $0x5,%ecx <== NOT EXECUTED 14e231: f3 a5 rep movsl %ds:(%esi),%es:(%edi) <== NOT EXECUTED 14e233: ba 01 00 00 00 mov $0x1,%edx <== NOT EXECUTED 14e238: eb 15 jmp 14e24f <_rename_r+0x13b> <== NOT EXECUTED 14e23a: 8d 7d a8 lea -0x58(%ebp),%edi <== NOT EXECUTED 14e23d: 8b 35 78 db 15 00 mov 0x15db78,%esi <== NOT EXECUTED 14e243: 83 c6 04 add $0x4,%esi <== NOT EXECUTED 14e246: b9 05 00 00 00 mov $0x5,%ecx <== NOT EXECUTED 14e24b: f3 a5 rep movsl %ds:(%esi),%es:(%edi) <== NOT EXECUTED 14e24d: 31 d2 xor %edx,%edx <== NOT EXECUTED if ( !new_parent_loc.ops->evalformake_h ) { 14e24f: 8b 45 b4 mov -0x4c(%ebp),%eax <== NOT EXECUTED 14e252: 8b 40 04 mov 0x4(%eax),%eax <== NOT EXECUTED 14e255: 85 c0 test %eax,%eax <== NOT EXECUTED 14e257: 75 4b jne 14e2a4 <_rename_r+0x190> <== NOT EXECUTED if ( free_old_parentloc ) 14e259: 84 db test %bl,%bl <== NOT EXECUTED 14e25b: 74 1a je 14e277 <_rename_r+0x163> <== NOT EXECUTED rtems_filesystem_freenode( &old_parent_loc ); 14e25d: 8b 45 c8 mov -0x38(%ebp),%eax <== NOT EXECUTED 14e260: 85 c0 test %eax,%eax <== NOT EXECUTED 14e262: 74 13 je 14e277 <_rename_r+0x163> <== NOT EXECUTED 14e264: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 14e267: 85 c0 test %eax,%eax <== NOT EXECUTED 14e269: 74 0c je 14e277 <_rename_r+0x163> <== NOT EXECUTED 14e26b: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 14e26e: 8d 55 bc lea -0x44(%ebp),%edx <== NOT EXECUTED 14e271: 52 push %edx <== NOT EXECUTED 14e272: ff d0 call *%eax <== NOT EXECUTED 14e274: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_filesystem_freenode( &old_loc ); 14e277: 8b 45 dc mov -0x24(%ebp),%eax <== NOT EXECUTED 14e27a: 85 c0 test %eax,%eax <== NOT EXECUTED 14e27c: 74 13 je 14e291 <_rename_r+0x17d> <== NOT EXECUTED 14e27e: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 14e281: 85 c0 test %eax,%eax <== NOT EXECUTED 14e283: 74 0c je 14e291 <_rename_r+0x17d> <== NOT EXECUTED 14e285: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 14e288: 8d 55 d0 lea -0x30(%ebp),%edx <== NOT EXECUTED 14e28b: 52 push %edx <== NOT EXECUTED 14e28c: ff d0 call *%eax <== NOT EXECUTED 14e28e: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 14e291: e8 3a a1 fe ff call 1383d0 <__errno> <== NOT EXECUTED 14e296: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 14e29c: 83 ce ff or $0xffffffff,%esi <== NOT EXECUTED 14e29f: e9 59 01 00 00 jmp 14e3fd <_rename_r+0x2e9> <== NOT EXECUTED } result = (*new_parent_loc.ops->evalformake_h)( &new[i], &new_parent_loc, &name ); 14e2a4: 51 push %ecx <== NOT EXECUTED 14e2a5: 8d 4d e4 lea -0x1c(%ebp),%ecx <== NOT EXECUTED 14e2a8: 51 push %ecx <== NOT EXECUTED 14e2a9: 8d 7d a8 lea -0x58(%ebp),%edi <== NOT EXECUTED 14e2ac: 57 push %edi <== NOT EXECUTED 14e2ad: 03 55 10 add 0x10(%ebp),%edx <== NOT EXECUTED 14e2b0: 52 push %edx <== NOT EXECUTED 14e2b1: ff d0 call *%eax <== NOT EXECUTED 14e2b3: 89 c6 mov %eax,%esi <== NOT EXECUTED if ( result != 0 ) { 14e2b5: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 14e2b8: 85 c0 test %eax,%eax <== NOT EXECUTED 14e2ba: 74 58 je 14e314 <_rename_r+0x200> <== NOT EXECUTED rtems_filesystem_freenode( &new_parent_loc ); 14e2bc: 8b 45 b4 mov -0x4c(%ebp),%eax <== NOT EXECUTED 14e2bf: 85 c0 test %eax,%eax <== NOT EXECUTED 14e2c1: 74 10 je 14e2d3 <_rename_r+0x1bf> <== NOT EXECUTED 14e2c3: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 14e2c6: 85 c0 test %eax,%eax <== NOT EXECUTED 14e2c8: 74 09 je 14e2d3 <_rename_r+0x1bf> <== NOT EXECUTED 14e2ca: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 14e2cd: 57 push %edi <== NOT EXECUTED 14e2ce: ff d0 call *%eax <== NOT EXECUTED 14e2d0: 83 c4 10 add $0x10,%esp <== NOT EXECUTED if ( free_old_parentloc ) 14e2d3: 84 db test %bl,%bl <== NOT EXECUTED 14e2d5: 74 1a je 14e2f1 <_rename_r+0x1dd> <== NOT EXECUTED rtems_filesystem_freenode( &old_parent_loc ); 14e2d7: 8b 45 c8 mov -0x38(%ebp),%eax <== NOT EXECUTED 14e2da: 85 c0 test %eax,%eax <== NOT EXECUTED 14e2dc: 74 13 je 14e2f1 <_rename_r+0x1dd> <== NOT EXECUTED 14e2de: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 14e2e1: 85 c0 test %eax,%eax <== NOT EXECUTED 14e2e3: 74 0c je 14e2f1 <_rename_r+0x1dd> <== NOT EXECUTED 14e2e5: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 14e2e8: 8d 55 bc lea -0x44(%ebp),%edx <== NOT EXECUTED 14e2eb: 52 push %edx <== NOT EXECUTED 14e2ec: ff d0 call *%eax <== NOT EXECUTED 14e2ee: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_filesystem_freenode( &old_loc ); 14e2f1: 8b 45 dc mov -0x24(%ebp),%eax <== NOT EXECUTED 14e2f4: 85 c0 test %eax,%eax <== NOT EXECUTED 14e2f6: 74 13 je 14e30b <_rename_r+0x1f7> <== NOT EXECUTED 14e2f8: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 14e2fb: 85 c0 test %eax,%eax <== NOT EXECUTED 14e2fd: 74 0c je 14e30b <_rename_r+0x1f7> <== NOT EXECUTED 14e2ff: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 14e302: 8d 55 d0 lea -0x30(%ebp),%edx <== NOT EXECUTED 14e305: 52 push %edx <== NOT EXECUTED 14e306: ff d0 call *%eax <== NOT EXECUTED 14e308: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( result ); 14e30b: e8 c0 a0 fe ff call 1383d0 <__errno> <== NOT EXECUTED 14e310: 89 30 mov %esi,(%eax) <== NOT EXECUTED 14e312: eb 88 jmp 14e29c <_rename_r+0x188> <== 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 ) { 14e314: 8b 45 cc mov -0x34(%ebp),%eax <== NOT EXECUTED 14e317: 3b 45 b8 cmp -0x48(%ebp),%eax <== NOT EXECUTED 14e31a: 8b 45 b4 mov -0x4c(%ebp),%eax <== NOT EXECUTED 14e31d: 74 5c je 14e37b <_rename_r+0x267> <== NOT EXECUTED rtems_filesystem_freenode( &new_parent_loc ); 14e31f: 85 c0 test %eax,%eax <== NOT EXECUTED 14e321: 74 10 je 14e333 <_rename_r+0x21f> <== NOT EXECUTED 14e323: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 14e326: 85 c0 test %eax,%eax <== NOT EXECUTED 14e328: 74 09 je 14e333 <_rename_r+0x21f> <== NOT EXECUTED 14e32a: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 14e32d: 57 push %edi <== NOT EXECUTED 14e32e: ff d0 call *%eax <== NOT EXECUTED 14e330: 83 c4 10 add $0x10,%esp <== NOT EXECUTED if ( free_old_parentloc ) 14e333: 84 db test %bl,%bl <== NOT EXECUTED 14e335: 74 1a je 14e351 <_rename_r+0x23d> <== NOT EXECUTED rtems_filesystem_freenode( &old_parent_loc ); 14e337: 8b 45 c8 mov -0x38(%ebp),%eax <== NOT EXECUTED 14e33a: 85 c0 test %eax,%eax <== NOT EXECUTED 14e33c: 74 13 je 14e351 <_rename_r+0x23d> <== NOT EXECUTED 14e33e: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 14e341: 85 c0 test %eax,%eax <== NOT EXECUTED 14e343: 74 0c je 14e351 <_rename_r+0x23d> <== NOT EXECUTED 14e345: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 14e348: 8d 55 bc lea -0x44(%ebp),%edx <== NOT EXECUTED 14e34b: 52 push %edx <== NOT EXECUTED 14e34c: ff d0 call *%eax <== NOT EXECUTED 14e34e: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_filesystem_freenode( &old_loc ); 14e351: 8b 45 dc mov -0x24(%ebp),%eax <== NOT EXECUTED 14e354: 85 c0 test %eax,%eax <== NOT EXECUTED 14e356: 74 13 je 14e36b <_rename_r+0x257> <== NOT EXECUTED 14e358: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 14e35b: 85 c0 test %eax,%eax <== NOT EXECUTED 14e35d: 74 0c je 14e36b <_rename_r+0x257> <== NOT EXECUTED 14e35f: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 14e362: 8d 55 d0 lea -0x30(%ebp),%edx <== NOT EXECUTED 14e365: 52 push %edx <== NOT EXECUTED 14e366: ff d0 call *%eax <== NOT EXECUTED 14e368: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EXDEV ); 14e36b: e8 60 a0 fe ff call 1383d0 <__errno> <== NOT EXECUTED 14e370: c7 00 12 00 00 00 movl $0x12,(%eax) <== NOT EXECUTED 14e376: e9 21 ff ff ff jmp 14e29c <_rename_r+0x188> <== NOT EXECUTED } if ( !new_parent_loc.ops->rename_h ) { 14e37b: 8b 50 40 mov 0x40(%eax),%edx <== NOT EXECUTED 14e37e: 85 d2 test %edx,%edx <== NOT EXECUTED 14e380: 75 19 jne 14e39b <_rename_r+0x287> <== NOT EXECUTED rtems_filesystem_freenode( &new_parent_loc ); 14e382: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 14e385: 85 c0 test %eax,%eax <== NOT EXECUTED 14e387: 0f 84 cc fe ff ff je 14e259 <_rename_r+0x145> <== NOT EXECUTED 14e38d: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 14e390: 57 push %edi <== NOT EXECUTED 14e391: ff d0 call *%eax <== NOT EXECUTED 14e393: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 14e396: e9 be fe ff ff jmp 14e259 <_rename_r+0x145> <== NOT EXECUTED rtems_filesystem_freenode( &old_parent_loc ); rtems_filesystem_freenode( &old_loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*new_parent_loc.ops->rename_h)( &old_parent_loc, &old_loc, &new_parent_loc, name ); 14e39b: ff 75 e4 pushl -0x1c(%ebp) <== NOT EXECUTED 14e39e: 57 push %edi <== NOT EXECUTED 14e39f: 8d 45 d0 lea -0x30(%ebp),%eax <== NOT EXECUTED 14e3a2: 50 push %eax <== NOT EXECUTED 14e3a3: 8d 45 bc lea -0x44(%ebp),%eax <== NOT EXECUTED 14e3a6: 50 push %eax <== NOT EXECUTED 14e3a7: ff d2 call *%edx <== NOT EXECUTED 14e3a9: 89 c6 mov %eax,%esi <== NOT EXECUTED rtems_filesystem_freenode( &new_parent_loc ); 14e3ab: 8b 45 b4 mov -0x4c(%ebp),%eax <== NOT EXECUTED 14e3ae: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 14e3b1: 85 c0 test %eax,%eax <== NOT EXECUTED 14e3b3: 74 10 je 14e3c5 <_rename_r+0x2b1> <== NOT EXECUTED 14e3b5: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 14e3b8: 85 c0 test %eax,%eax <== NOT EXECUTED 14e3ba: 74 09 je 14e3c5 <_rename_r+0x2b1> <== NOT EXECUTED 14e3bc: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 14e3bf: 57 push %edi <== NOT EXECUTED 14e3c0: ff d0 call *%eax <== NOT EXECUTED 14e3c2: 83 c4 10 add $0x10,%esp <== NOT EXECUTED if ( free_old_parentloc ) 14e3c5: 84 db test %bl,%bl <== NOT EXECUTED 14e3c7: 74 1a je 14e3e3 <_rename_r+0x2cf> <== NOT EXECUTED rtems_filesystem_freenode( &old_parent_loc ); 14e3c9: 8b 45 c8 mov -0x38(%ebp),%eax <== NOT EXECUTED 14e3cc: 85 c0 test %eax,%eax <== NOT EXECUTED 14e3ce: 74 13 je 14e3e3 <_rename_r+0x2cf> <== NOT EXECUTED 14e3d0: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 14e3d3: 85 c0 test %eax,%eax <== NOT EXECUTED 14e3d5: 74 0c je 14e3e3 <_rename_r+0x2cf> <== NOT EXECUTED 14e3d7: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 14e3da: 8d 55 bc lea -0x44(%ebp),%edx <== NOT EXECUTED 14e3dd: 52 push %edx <== NOT EXECUTED 14e3de: ff d0 call *%eax <== NOT EXECUTED 14e3e0: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_filesystem_freenode( &old_loc ); 14e3e3: 8b 45 dc mov -0x24(%ebp),%eax <== NOT EXECUTED 14e3e6: 85 c0 test %eax,%eax <== NOT EXECUTED 14e3e8: 74 13 je 14e3fd <_rename_r+0x2e9> <== NOT EXECUTED 14e3ea: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 14e3ed: 85 c0 test %eax,%eax <== NOT EXECUTED 14e3ef: 74 0c je 14e3fd <_rename_r+0x2e9> <== NOT EXECUTED 14e3f1: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 14e3f4: 8d 55 d0 lea -0x30(%ebp),%edx <== NOT EXECUTED 14e3f7: 52 push %edx <== NOT EXECUTED 14e3f8: ff d0 call *%eax <== NOT EXECUTED 14e3fa: 83 c4 10 add $0x10,%esp <== NOT EXECUTED return result; } 14e3fd: 89 f0 mov %esi,%eax <== NOT EXECUTED 14e3ff: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 14e402: 5b pop %ebx <== NOT EXECUTED 14e403: 5e pop %esi <== NOT EXECUTED 14e404: 5f pop %edi <== NOT EXECUTED 14e405: c9 leave <== NOT EXECUTED 14e406: c3 ret <== NOT EXECUTED 0010cb8a <_stat_r>: int _STAT_R_NAME( struct _reent *ptr __attribute__((unused)), const char *path, struct stat *buf ) { 10cb8a: 55 push %ebp <== NOT EXECUTED 10cb8b: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10cb8d: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 10cb90: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED return _STAT_NAME( path, buf ); 10cb93: 8b 55 10 mov 0x10(%ebp),%edx <== NOT EXECUTED 10cb96: 89 55 0c mov %edx,0xc(%ebp) <== NOT EXECUTED 10cb99: 89 45 08 mov %eax,0x8(%ebp) <== NOT EXECUTED } 10cb9c: c9 leave <== NOT EXECUTED struct _reent *ptr __attribute__((unused)), const char *path, struct stat *buf ) { return _STAT_NAME( path, buf ); 10cb9d: e9 3a ff ff ff jmp 10cadc <== NOT EXECUTED 001101ce <_unlink_r>: int _unlink_r( struct _reent *ptr __attribute__((unused)), const char *path ) { 1101ce: 55 push %ebp <== NOT EXECUTED 1101cf: 89 e5 mov %esp,%ebp <== NOT EXECUTED 1101d1: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED return unlink( path ); 1101d4: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED 1101d7: 89 45 08 mov %eax,0x8(%ebp) <== NOT EXECUTED } 1101da: c9 leave <== NOT EXECUTED int _unlink_r( struct _reent *ptr __attribute__((unused)), const char *path ) { return unlink( path ); 1101db: e9 04 fe ff ff jmp 10ffe4 <== NOT EXECUTED 0011b7d4 <_write_r>: struct _reent *ptr __attribute__((unused)), int fd, const void *buf, size_t nbytes ) { 11b7d4: 55 push %ebp 11b7d5: 89 e5 mov %esp,%ebp 11b7d7: 83 ec 08 sub $0x8,%esp 11b7da: 8b 45 0c mov 0xc(%ebp),%eax 11b7dd: 8b 55 10 mov 0x10(%ebp),%edx return write( fd, buf, nbytes ); 11b7e0: 8b 4d 14 mov 0x14(%ebp),%ecx 11b7e3: 89 4d 10 mov %ecx,0x10(%ebp) 11b7e6: 89 55 0c mov %edx,0xc(%ebp) 11b7e9: 89 45 08 mov %eax,0x8(%ebp) } 11b7ec: c9 leave int fd, const void *buf, size_t nbytes ) { return write( fd, buf, nbytes ); 11b7ed: e9 0a 01 00 00 jmp 11b8fc <== ALWAYS TAKEN 00124ebc : int access( const char *path, int amode ) { 124ebc: 55 push %ebp 124ebd: 89 e5 mov %esp,%ebp 124ebf: 53 push %ebx 124ec0: 83 ec 5c sub $0x5c,%esp 124ec3: 8b 5d 0c mov 0xc(%ebp),%ebx struct stat statbuf; if ( stat(path, &statbuf) ) 124ec6: 8d 45 b4 lea -0x4c(%ebp),%eax 124ec9: 50 push %eax 124eca: ff 75 08 pushl 0x8(%ebp) 124ecd: e8 0a 7c fe ff call 10cadc 124ed2: 83 c4 10 add $0x10,%esp 124ed5: 85 c0 test %eax,%eax 124ed7: 75 21 jne 124efa return -1; if ( amode & R_OK ) { 124ed9: f6 c3 04 test $0x4,%bl 124edc: 74 06 je 124ee4 if (!( statbuf.st_mode & S_IREAD )) 124ede: f6 45 c1 01 testb $0x1,-0x3f(%ebp) 124ee2: 74 16 je 124efa return -1; } if ( amode & W_OK ) { 124ee4: f6 c3 02 test $0x2,%bl 124ee7: 74 06 je 124eef if ( !( statbuf.st_mode & S_IWRITE ) ) 124ee9: 80 7d c0 00 cmpb $0x0,-0x40(%ebp) 124eed: 79 0b jns 124efa return -1; } if ( amode & X_OK ) { 124eef: 80 e3 01 and $0x1,%bl 124ef2: 74 0b je 124eff if ( !( statbuf.st_mode & S_IEXEC ) ) 124ef4: f6 45 c0 40 testb $0x40,-0x40(%ebp) 124ef8: 75 05 jne 124eff 124efa: 83 c8 ff or $0xffffffff,%eax 124efd: eb 02 jmp 124f01 <== ALWAYS TAKEN 124eff: 31 c0 xor %eax,%eax return -1; } return 0; } 124f01: 8b 5d fc mov -0x4(%ebp),%ebx 124f04: c9 leave 124f05: c3 ret 0010da80 : ) { register char *cptr; size_t length; MSBUMP(calloc_calls, 1); 10da80: 55 push %ebp 10da81: 89 e5 mov %esp,%ebp 10da83: 57 push %edi 10da84: 53 push %ebx 10da85: 8b 5d 0c mov 0xc(%ebp),%ebx 10da88: ff 05 44 37 12 00 incl 0x123744 length = nelem * elsize; 10da8e: 0f af 5d 08 imul 0x8(%ebp),%ebx cptr = malloc( length ); 10da92: 83 ec 0c sub $0xc,%esp 10da95: 53 push %ebx 10da96: e8 c1 98 ff ff call 10735c <== ALWAYS TAKEN 10da9b: 89 c2 mov %eax,%edx if ( cptr ) 10da9d: 83 c4 10 add $0x10,%esp 10daa0: 85 c0 test %eax,%eax 10daa2: 74 08 je 10daac <== ALWAYS TAKEN memset( cptr, '\0', length ); 10daa4: 31 c0 xor %eax,%eax 10daa6: 89 d7 mov %edx,%edi 10daa8: 89 d9 mov %ebx,%ecx 10daaa: f3 aa rep stos %al,%es:(%edi) MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */ 10daac: ff 0d 34 37 12 00 decl 0x123734 return cptr; } 10dab2: 89 d0 mov %edx,%eax 10dab4: 8d 65 f8 lea -0x8(%ebp),%esp 10dab7: 5b pop %ebx 10dab8: 5f pop %edi 10dab9: c9 leave 10daba: c3 ret 00124fb0 : #include int chdir( const char *pathname ) { 124fb0: 55 push %ebp 124fb1: 89 e5 mov %esp,%ebp 124fb3: 57 push %edi 124fb4: 56 push %esi 124fb5: 83 ec 2c sub $0x2c,%esp 124fb8: 8b 55 08 mov 0x8(%ebp),%edx /* * Get the node where we wish to go. */ result = rtems_filesystem_evaluate_path( pathname, strlen( pathname ), RTEMS_LIBIO_PERMS_SEARCH, &loc, true ); 124fbb: 31 c0 xor %eax,%eax 124fbd: 83 c9 ff or $0xffffffff,%ecx 124fc0: 89 d7 mov %edx,%edi 124fc2: f2 ae repnz scas %es:(%edi),%al 124fc4: f7 d1 not %ecx 124fc6: 49 dec %ecx /* * Get the node where we wish to go. */ result = rtems_filesystem_evaluate_path( 124fc7: 6a 01 push $0x1 124fc9: 8d 75 e4 lea -0x1c(%ebp),%esi 124fcc: 56 push %esi 124fcd: 6a 01 push $0x1 124fcf: 51 push %ecx 124fd0: 52 push %edx 124fd1: e8 46 67 fe ff call 10b71c <== ALWAYS TAKEN 124fd6: 89 c2 mov %eax,%edx pathname, strlen( pathname ), RTEMS_LIBIO_PERMS_SEARCH, &loc, true ); if ( result != 0 ) 124fd8: 83 c4 20 add $0x20,%esp 124fdb: 83 c8 ff or $0xffffffff,%eax 124fde: 85 d2 test %edx,%edx 124fe0: 0f 85 8f 00 00 00 jne 125075 /* * Verify you can change directory into this node. */ if ( !loc.ops->node_type_h ) { 124fe6: 8b 55 f0 mov -0x10(%ebp),%edx 124fe9: 8b 42 10 mov 0x10(%edx),%eax 124fec: 85 c0 test %eax,%eax 124fee: 75 1d jne 12500d <== NEVER TAKEN rtems_filesystem_freenode( &loc ); 124ff0: 8b 42 1c mov 0x1c(%edx),%eax <== NOT EXECUTED 124ff3: 85 c0 test %eax,%eax <== NOT EXECUTED 124ff5: 74 09 je 125000 <== NOT EXECUTED 124ff7: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 124ffa: 56 push %esi <== NOT EXECUTED 124ffb: ff d0 call *%eax <== NOT EXECUTED 124ffd: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 125000: e8 cb 33 01 00 call 1383d0 <__errno> <== NOT EXECUTED 125005: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 12500b: eb 2e jmp 12503b <== NOT EXECUTED } if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { 12500d: 83 ec 0c sub $0xc,%esp 125010: 56 push %esi 125011: ff d0 call *%eax 125013: 83 c4 10 add $0x10,%esp 125016: 48 dec %eax 125017: 74 27 je 125040 rtems_filesystem_freenode( &loc ); 125019: 8b 45 f0 mov -0x10(%ebp),%eax 12501c: 85 c0 test %eax,%eax 12501e: 74 10 je 125030 <== ALWAYS TAKEN 125020: 8b 40 1c mov 0x1c(%eax),%eax 125023: 85 c0 test %eax,%eax 125025: 74 09 je 125030 <== ALWAYS TAKEN 125027: 83 ec 0c sub $0xc,%esp 12502a: 56 push %esi 12502b: ff d0 call *%eax 12502d: 83 c4 10 add $0x10,%esp rtems_set_errno_and_return_minus_one( ENOTDIR ); 125030: e8 9b 33 01 00 call 1383d0 <__errno> 125035: c7 00 14 00 00 00 movl $0x14,(%eax) 12503b: 83 c8 ff or $0xffffffff,%eax 12503e: eb 35 jmp 125075 <== ALWAYS TAKEN } rtems_filesystem_freenode( &rtems_filesystem_current ); 125040: 8b 15 78 db 15 00 mov 0x15db78,%edx 125046: 8b 42 10 mov 0x10(%edx),%eax 125049: 85 c0 test %eax,%eax 12504b: 74 13 je 125060 <== ALWAYS TAKEN 12504d: 8b 40 1c mov 0x1c(%eax),%eax 125050: 85 c0 test %eax,%eax 125052: 74 0c je 125060 <== ALWAYS TAKEN 125054: 83 ec 0c sub $0xc,%esp 125057: 83 c2 04 add $0x4,%edx 12505a: 52 push %edx 12505b: ff d0 call *%eax 12505d: 83 c4 10 add $0x10,%esp rtems_filesystem_current = loc; 125060: 8b 3d 78 db 15 00 mov 0x15db78,%edi 125066: 83 c7 04 add $0x4,%edi 125069: 8d 75 e4 lea -0x1c(%ebp),%esi 12506c: b9 05 00 00 00 mov $0x5,%ecx 125071: f3 a5 rep movsl %ds:(%esi),%es:(%edi) 125073: 31 c0 xor %eax,%eax return 0; } 125075: 8d 65 f8 lea -0x8(%ebp),%esp 125078: 5e pop %esi 125079: 5f pop %edi 12507a: c9 leave 12507b: c3 ret 0010b4c8 : int chmod( const char *path, mode_t mode ) { 10b4c8: 55 push %ebp 10b4c9: 89 e5 mov %esp,%ebp 10b4cb: 57 push %edi 10b4cc: 56 push %esi 10b4cd: 53 push %ebx 10b4ce: 83 ec 38 sub $0x38,%esp 10b4d1: 8b 55 08 mov 0x8(%ebp),%edx int status; rtems_filesystem_location_info_t loc; int result; status = rtems_filesystem_evaluate_path( path, strlen( path ), 0, &loc, true ); 10b4d4: 31 c0 xor %eax,%eax 10b4d6: 83 c9 ff or $0xffffffff,%ecx 10b4d9: 89 d7 mov %edx,%edi 10b4db: f2 ae repnz scas %es:(%edi),%al 10b4dd: f7 d1 not %ecx 10b4df: 49 dec %ecx 10b4e0: 6a 01 push $0x1 10b4e2: 8d 5d d4 lea -0x2c(%ebp),%ebx 10b4e5: 53 push %ebx 10b4e6: 6a 00 push $0x0 10b4e8: 51 push %ecx 10b4e9: 52 push %edx 10b4ea: e8 2d 02 00 00 call 10b71c <== ALWAYS TAKEN if ( status != 0 ) 10b4ef: 83 c4 20 add $0x20,%esp 10b4f2: 83 ce ff or $0xffffffff,%esi 10b4f5: 85 c0 test %eax,%eax 10b4f7: 75 7d jne 10b576 return -1; if ( !loc.handlers ){ 10b4f9: 8b 45 dc mov -0x24(%ebp),%eax 10b4fc: 85 c0 test %eax,%eax 10b4fe: 75 24 jne 10b524 <== NEVER TAKEN rtems_filesystem_freenode( &loc ); 10b500: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED 10b503: 85 c0 test %eax,%eax <== NOT EXECUTED 10b505: 74 10 je 10b517 <== NOT EXECUTED 10b507: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 10b50a: 85 c0 test %eax,%eax <== NOT EXECUTED 10b50c: 74 09 je 10b517 <== NOT EXECUTED 10b50e: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10b511: 53 push %ebx <== NOT EXECUTED 10b512: ff d0 call *%eax <== NOT EXECUTED 10b514: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EBADF ); 10b517: e8 b4 ce 02 00 call 1383d0 <__errno> <== NOT EXECUTED 10b51c: c7 00 09 00 00 00 movl $0x9,(%eax) <== NOT EXECUTED 10b522: eb 29 jmp 10b54d <== NOT EXECUTED } if ( !loc.handlers->fchmod_h ){ 10b524: 8b 40 1c mov 0x1c(%eax),%eax 10b527: 85 c0 test %eax,%eax 10b529: 75 27 jne 10b552 <== NEVER TAKEN rtems_filesystem_freenode( &loc ); 10b52b: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED 10b52e: 85 c0 test %eax,%eax <== NOT EXECUTED 10b530: 74 10 je 10b542 <== NOT EXECUTED 10b532: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 10b535: 85 c0 test %eax,%eax <== NOT EXECUTED 10b537: 74 09 je 10b542 <== NOT EXECUTED 10b539: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10b53c: 53 push %ebx <== NOT EXECUTED 10b53d: ff d0 call *%eax <== NOT EXECUTED 10b53f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 10b542: e8 89 ce 02 00 call 1383d0 <__errno> <== NOT EXECUTED 10b547: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 10b54d: 83 ce ff or $0xffffffff,%esi <== NOT EXECUTED 10b550: eb 24 jmp 10b576 <== NOT EXECUTED } result = (*loc.handlers->fchmod_h)( &loc, mode ); 10b552: 52 push %edx 10b553: 52 push %edx 10b554: ff 75 0c pushl 0xc(%ebp) 10b557: 53 push %ebx 10b558: ff d0 call *%eax 10b55a: 89 c6 mov %eax,%esi rtems_filesystem_freenode( &loc ); 10b55c: 8b 45 e0 mov -0x20(%ebp),%eax 10b55f: 83 c4 10 add $0x10,%esp 10b562: 85 c0 test %eax,%eax 10b564: 74 10 je 10b576 <== ALWAYS TAKEN 10b566: 8b 40 1c mov 0x1c(%eax),%eax 10b569: 85 c0 test %eax,%eax 10b56b: 74 09 je 10b576 <== ALWAYS TAKEN 10b56d: 83 ec 0c sub $0xc,%esp 10b570: 53 push %ebx 10b571: ff d0 call *%eax 10b573: 83 c4 10 add $0x10,%esp return result; } 10b576: 89 f0 mov %esi,%eax 10b578: 8d 65 f4 lea -0xc(%ebp),%esp 10b57b: 5b pop %ebx 10b57c: 5e pop %esi 10b57d: 5f pop %edi 10b57e: c9 leave 10b57f: c3 ret 0012507c : int chown( const char *path, uid_t owner, gid_t group ) { 12507c: 55 push %ebp 12507d: 89 e5 mov %esp,%ebp 12507f: 57 push %edi 125080: 56 push %esi 125081: 53 push %ebx 125082: 83 ec 48 sub $0x48,%esp 125085: 8b 55 08 mov 0x8(%ebp),%edx 125088: 8b 75 0c mov 0xc(%ebp),%esi 12508b: 8b 5d 10 mov 0x10(%ebp),%ebx rtems_filesystem_location_info_t loc; int result; if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x00, &loc, true ) ) 12508e: 31 c0 xor %eax,%eax 125090: 83 c9 ff or $0xffffffff,%ecx 125093: 89 d7 mov %edx,%edi 125095: f2 ae repnz scas %es:(%edi),%al 125097: f7 d1 not %ecx 125099: 49 dec %ecx 12509a: 6a 01 push $0x1 12509c: 8d 7d d4 lea -0x2c(%ebp),%edi 12509f: 57 push %edi 1250a0: 6a 00 push $0x0 1250a2: 51 push %ecx 1250a3: 52 push %edx 1250a4: e8 73 66 fe ff call 10b71c <== ALWAYS TAKEN 1250a9: 83 c4 20 add $0x20,%esp 1250ac: 83 ca ff or $0xffffffff,%edx 1250af: 85 c0 test %eax,%eax 1250b1: 75 58 jne 12510b return -1; if ( !loc.ops->chown_h ) { 1250b3: 8b 55 e0 mov -0x20(%ebp),%edx 1250b6: 8b 42 18 mov 0x18(%edx),%eax 1250b9: 85 c0 test %eax,%eax 1250bb: 75 20 jne 1250dd <== NEVER TAKEN rtems_filesystem_freenode( &loc ); 1250bd: 8b 42 1c mov 0x1c(%edx),%eax <== NOT EXECUTED 1250c0: 85 c0 test %eax,%eax <== NOT EXECUTED 1250c2: 74 09 je 1250cd <== NOT EXECUTED 1250c4: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1250c7: 57 push %edi <== NOT EXECUTED 1250c8: ff d0 call *%eax <== NOT EXECUTED 1250ca: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 1250cd: e8 fe 32 01 00 call 1383d0 <__errno> <== NOT EXECUTED 1250d2: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 1250d8: 83 ca ff or $0xffffffff,%edx <== NOT EXECUTED 1250db: eb 2e jmp 12510b <== NOT EXECUTED } result = (*loc.ops->chown_h)( &loc, owner, group ); 1250dd: 52 push %edx 1250de: 0f b7 db movzwl %bx,%ebx 1250e1: 53 push %ebx 1250e2: 0f b7 f6 movzwl %si,%esi 1250e5: 56 push %esi 1250e6: 57 push %edi 1250e7: ff d0 call *%eax 1250e9: 89 c2 mov %eax,%edx rtems_filesystem_freenode( &loc ); 1250eb: 8b 45 e0 mov -0x20(%ebp),%eax 1250ee: 83 c4 10 add $0x10,%esp 1250f1: 85 c0 test %eax,%eax 1250f3: 74 16 je 12510b <== ALWAYS TAKEN 1250f5: 8b 40 1c mov 0x1c(%eax),%eax 1250f8: 85 c0 test %eax,%eax 1250fa: 74 0f je 12510b <== ALWAYS TAKEN 1250fc: 83 ec 0c sub $0xc,%esp 1250ff: 57 push %edi 125100: 89 55 c4 mov %edx,-0x3c(%ebp) 125103: ff d0 call *%eax 125105: 83 c4 10 add $0x10,%esp 125108: 8b 55 c4 mov -0x3c(%ebp),%edx return result; } 12510b: 89 d0 mov %edx,%eax 12510d: 8d 65 f4 lea -0xc(%ebp),%esp 125110: 5b pop %ebx 125111: 5e pop %esi 125112: 5f pop %edi 125113: c9 leave 125114: c3 ret 00125118 : #include int chroot( const char *pathname ) { 125118: 55 push %ebp 125119: 89 e5 mov %esp,%ebp 12511b: 57 push %edi 12511c: 56 push %esi 12511d: 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) { 125120: 81 3d 78 db 15 00 4c cmpl $0x16344c,0x15db78 125127: 34 16 00 12512a: 75 1e jne 12514a <== ALWAYS TAKEN rtems_libio_set_private_env(); /* try to set a new private env*/ 12512c: e8 af 13 00 00 call 1264e0 if (rtems_current_user_env == &rtems_global_user_env) /* not ok */ 125131: 81 3d 78 db 15 00 4c cmpl $0x16344c,0x15db78 125138: 34 16 00 12513b: 75 0d jne 12514a <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); 12513d: e8 8e 32 01 00 call 1383d0 <__errno> <== NOT EXECUTED 125142: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 125148: eb 22 jmp 12516c <== NOT EXECUTED } result = chdir(pathname); 12514a: 83 ec 0c sub $0xc,%esp 12514d: ff 75 08 pushl 0x8(%ebp) 125150: e8 5b fe ff ff call 124fb0 if (result) { 125155: 83 c4 10 add $0x10,%esp 125158: 85 c0 test %eax,%eax 12515a: 74 15 je 125171 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( errno ); 12515c: e8 6f 32 01 00 call 1383d0 <__errno> <== NOT EXECUTED 125161: 89 c6 mov %eax,%esi <== NOT EXECUTED 125163: e8 68 32 01 00 call 1383d0 <__errno> <== NOT EXECUTED 125168: 8b 00 mov (%eax),%eax <== NOT EXECUTED 12516a: 89 06 mov %eax,(%esi) <== NOT EXECUTED 12516c: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 12516f: eb 53 jmp 1251c4 <== NOT EXECUTED } /* clone the new root location */ if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) { 125171: 83 ec 0c sub $0xc,%esp 125174: 6a 00 push $0x0 125176: 8d 45 e4 lea -0x1c(%ebp),%eax 125179: 50 push %eax 12517a: 6a 00 push $0x0 12517c: 6a 01 push $0x1 12517e: 68 f6 1f 15 00 push $0x151ff6 125183: e8 94 65 fe ff call 10b71c <== ALWAYS TAKEN 125188: 83 c4 20 add $0x20,%esp 12518b: 85 c0 test %eax,%eax 12518d: 75 cd jne 12515c <== ALWAYS 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); 12518f: 8b 15 78 db 15 00 mov 0x15db78,%edx 125195: 8b 42 24 mov 0x24(%edx),%eax 125198: 85 c0 test %eax,%eax 12519a: 74 13 je 1251af <== ALWAYS TAKEN 12519c: 8b 40 1c mov 0x1c(%eax),%eax 12519f: 85 c0 test %eax,%eax 1251a1: 74 0c je 1251af <== ALWAYS TAKEN 1251a3: 83 ec 0c sub $0xc,%esp 1251a6: 83 c2 18 add $0x18,%edx 1251a9: 52 push %edx 1251aa: ff d0 call *%eax 1251ac: 83 c4 10 add $0x10,%esp rtems_filesystem_root = loc; 1251af: 8b 3d 78 db 15 00 mov 0x15db78,%edi 1251b5: 83 c7 18 add $0x18,%edi 1251b8: 8d 75 e4 lea -0x1c(%ebp),%esi 1251bb: b9 05 00 00 00 mov $0x5,%ecx 1251c0: f3 a5 rep movsl %ds:(%esi),%es:(%edi) 1251c2: 31 c0 xor %eax,%eax return 0; } 1251c4: 8d 65 f8 lea -0x8(%ebp),%esp 1251c7: 5e pop %esi 1251c8: 5f pop %edi 1251c9: c9 leave 1251ca: c3 ret 0010dabc : #include int close( int fd ) { 10dabc: 55 push %ebp 10dabd: 89 e5 mov %esp,%ebp 10dabf: 56 push %esi 10dac0: 53 push %ebx 10dac1: 8b 5d 08 mov 0x8(%ebp),%ebx rtems_libio_t *iop; rtems_status_code rc; rtems_libio_check_fd(fd); 10dac4: 3b 1d 64 f8 11 00 cmp 0x11f864,%ebx 10daca: 73 0f jae 10dadb iop = rtems_libio_iop(fd); 10dacc: c1 e3 06 shl $0x6,%ebx 10dacf: 03 1d 18 37 12 00 add 0x123718,%ebx rtems_libio_check_is_open(iop); 10dad5: f6 43 15 01 testb $0x1,0x15(%ebx) 10dad9: 75 10 jne 10daeb 10dadb: e8 70 27 00 00 call 110250 <__errno> 10dae0: c7 00 09 00 00 00 movl $0x9,(%eax) 10dae6: 83 c8 ff or $0xffffffff,%eax 10dae9: eb 3f jmp 10db2a <== ALWAYS TAKEN rc = RTEMS_SUCCESSFUL; if ( iop->handlers->close_h ) 10daeb: 8b 43 3c mov 0x3c(%ebx),%eax 10daee: 8b 40 04 mov 0x4(%eax),%eax 10daf1: 31 f6 xor %esi,%esi 10daf3: 85 c0 test %eax,%eax 10daf5: 74 0b je 10db02 <== ALWAYS TAKEN rc = (*iop->handlers->close_h)( iop ); 10daf7: 83 ec 0c sub $0xc,%esp 10dafa: 53 push %ebx 10dafb: ff d0 call *%eax 10dafd: 89 c6 mov %eax,%esi 10daff: 83 c4 10 add $0x10,%esp rtems_filesystem_freenode( &iop->pathinfo ); 10db02: 8b 43 24 mov 0x24(%ebx),%eax 10db05: 85 c0 test %eax,%eax 10db07: 74 13 je 10db1c <== ALWAYS TAKEN 10db09: 8b 40 1c mov 0x1c(%eax),%eax 10db0c: 85 c0 test %eax,%eax 10db0e: 74 0c je 10db1c 10db10: 83 ec 0c sub $0xc,%esp 10db13: 8d 53 18 lea 0x18(%ebx),%edx 10db16: 52 push %edx 10db17: ff d0 call *%eax 10db19: 83 c4 10 add $0x10,%esp rtems_libio_free( iop ); 10db1c: 83 ec 0c sub $0xc,%esp 10db1f: 53 push %ebx 10db20: e8 35 02 00 00 call 10dd5a <== ALWAYS TAKEN return rc; 10db25: 89 f0 mov %esi,%eax 10db27: 83 c4 10 add $0x10,%esp } 10db2a: 8d 65 f8 lea -0x8(%ebp),%esp 10db2d: 5b pop %ebx 10db2e: 5e pop %esi 10db2f: c9 leave 10db30: c3 ret 0010d1b0 : #include "devfs.h" int devFS_close( rtems_libio_t *iop ) { 10d1b0: 55 push %ebp 10d1b1: 89 e5 mov %esp,%ebp 10d1b3: 83 ec 1c sub $0x1c,%esp 10d1b6: 8b 55 08 mov 0x8(%ebp),%edx rtems_libio_open_close_args_t args; rtems_status_code status; rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; 10d1b9: 8b 42 38 mov 0x38(%edx),%eax args.iop = iop; 10d1bc: 89 55 ec mov %edx,-0x14(%ebp) args.flags = 0; 10d1bf: c7 45 f0 00 00 00 00 movl $0x0,-0x10(%ebp) args.mode = 0; 10d1c6: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp) status = rtems_io_close( 10d1cd: 8d 55 ec lea -0x14(%ebp),%edx 10d1d0: 52 push %edx 10d1d1: ff 70 0c pushl 0xc(%eax) 10d1d4: ff 70 08 pushl 0x8(%eax) 10d1d7: e8 a0 08 00 00 call 10da7c <== ALWAYS TAKEN 10d1dc: 89 c2 mov %eax,%edx np->major, np->minor, (void *) &args ); if ( status ) { 10d1de: 83 c4 10 add $0x10,%esp 10d1e1: 31 c0 xor %eax,%eax 10d1e3: 85 d2 test %edx,%edx 10d1e5: 74 0c je 10d1f3 <== NEVER TAKEN return rtems_deviceio_errno(status); 10d1e7: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10d1ea: 52 push %edx <== NOT EXECUTED 10d1eb: e8 a8 00 00 00 call 10d298 <== NOT EXECUTED 10d1f0: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } return 0; } 10d1f3: c9 leave 10d1f4: c3 ret 0010d207 : const char *pathname, int pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc ) { 10d207: 55 push %ebp 10d208: 89 e5 mov %esp,%ebp 10d20a: 57 push %edi 10d20b: 56 push %esi 10d20c: 53 push %ebx 10d20d: 83 ec 1c sub $0x1c,%esp 10d210: 8b 4d 0c mov 0xc(%ebp),%ecx 10d213: 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; 10d216: 8b 33 mov (%ebx),%esi if (!device_name_table) 10d218: 85 f6 test %esi,%esi 10d21a: 74 04 je 10d220 <== ALWAYS TAKEN 10d21c: 31 ff xor %edi,%edi 10d21e: eb 5a jmp 10d27a <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EFAULT ); 10d220: e8 33 15 00 00 call 10e758 <__errno> <== NOT EXECUTED 10d225: c7 00 0e 00 00 00 movl $0xe,(%eax) <== NOT EXECUTED 10d22b: eb 60 jmp 10d28d <== NOT EXECUTED for (i = 0; i < rtems_device_table_size; i++) { if (!device_name_table[i].device_name) 10d22d: 8b 16 mov (%esi),%edx 10d22f: 85 d2 test %edx,%edx 10d231: 74 43 je 10d276 continue; if (strncmp(pathname, device_name_table[i].device_name, pathnamelen) != 0) 10d233: 50 push %eax 10d234: 51 push %ecx 10d235: 52 push %edx 10d236: ff 75 08 pushl 0x8(%ebp) 10d239: 89 55 e4 mov %edx,-0x1c(%ebp) 10d23c: 89 4d e0 mov %ecx,-0x20(%ebp) 10d23f: e8 e8 20 00 00 call 10f32c 10d244: 83 c4 10 add $0x10,%esp 10d247: 85 c0 test %eax,%eax 10d249: 8b 55 e4 mov -0x1c(%ebp),%edx 10d24c: 8b 4d e0 mov -0x20(%ebp),%ecx 10d24f: 75 25 jne 10d276 <== ALWAYS TAKEN continue; if (device_name_table[i].device_name[pathnamelen] != '\0') 10d251: 80 3c 0a 00 cmpb $0x0,(%edx,%ecx,1) 10d255: 75 1f jne 10d276 <== ALWAYS TAKEN continue; /* find the device, set proper values */ pathloc->node_access = (void *)&device_name_table[i]; 10d257: 89 33 mov %esi,(%ebx) pathloc->handlers = &devFS_file_handlers; 10d259: c7 43 08 a0 f7 11 00 movl $0x11f7a0,0x8(%ebx) pathloc->ops = &devFS_ops; 10d260: c7 43 0c 58 f7 11 00 movl $0x11f758,0xc(%ebx) pathloc->mt_entry = rtems_filesystem_root.mt_entry; 10d267: a1 ec f7 11 00 mov 0x11f7ec,%eax 10d26c: 8b 40 28 mov 0x28(%eax),%eax 10d26f: 89 43 10 mov %eax,0x10(%ebx) 10d272: 31 c0 xor %eax,%eax return 0; 10d274: eb 1a jmp 10d290 <== ALWAYS TAKEN /* get the device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; if (!device_name_table) rtems_set_errno_and_return_minus_one( EFAULT ); for (i = 0; i < rtems_device_table_size; i++) { 10d276: 47 inc %edi 10d277: 83 c6 14 add $0x14,%esi 10d27a: 3b 3d 88 d9 11 00 cmp 0x11d988,%edi 10d280: 72 ab jb 10d22d pathloc->mt_entry = rtems_filesystem_root.mt_entry; return 0; } /* no such file or directory */ rtems_set_errno_and_return_minus_one( ENOENT ); 10d282: e8 d1 14 00 00 call 10e758 <__errno> 10d287: c7 00 02 00 00 00 movl $0x2,(%eax) 10d28d: 83 c8 ff or $0xffffffff,%eax } 10d290: 8d 65 f4 lea -0xc(%ebp),%esp 10d293: 5b pop %ebx 10d294: 5e pop %esi 10d295: 5f pop %edi 10d296: c9 leave 10d297: c3 ret 00106cb0 : int devFS_initialize( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { 106cb0: 55 push %ebp 106cb1: 89 e5 mov %esp,%ebp 106cb3: 57 push %edi 106cb4: 53 push %ebx 106cb5: 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( 106cb8: 83 ec 0c sub $0xc,%esp 106cbb: 6b 05 88 d9 11 00 14 imul $0x14,0x11d988,%eax 106cc2: 50 push %eax 106cc3: e8 b0 60 00 00 call 10cd78 <_Workspace_Allocate> 106cc8: 89 c2 mov %eax,%edx sizeof( rtems_device_name_t ) * ( rtems_device_table_size ) ); /* no memory for device filesystem */ if (!device_name_table) 106cca: 83 c4 10 add $0x10,%esp 106ccd: 85 c0 test %eax,%eax 106ccf: 75 10 jne 106ce1 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOMEM ); 106cd1: e8 82 7a 00 00 call 10e758 <__errno> <== NOT EXECUTED 106cd6: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED 106cdc: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 106cdf: eb 20 jmp 106d01 <== NOT EXECUTED memset( 106ce1: 6b 0d 88 d9 11 00 14 imul $0x14,0x11d988,%ecx 106ce8: 31 c0 xor %eax,%eax 106cea: 89 d7 mov %edx,%edi 106cec: 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; 106cee: c7 43 24 a0 f7 11 00 movl $0x11f7a0,0x24(%ebx) temp_mt_entry->mt_fs_root.ops = &devFS_ops; 106cf5: c7 43 28 58 f7 11 00 movl $0x11f758,0x28(%ebx) /* Set the node_access to device name table */ temp_mt_entry->mt_fs_root.node_access = (void *)device_name_table; 106cfc: 89 53 1c mov %edx,0x1c(%ebx) 106cff: 31 c0 xor %eax,%eax return 0; } 106d01: 8d 65 f8 lea -0x8(%ebp),%esp 106d04: 5b pop %ebx 106d05: 5f pop %edi 106d06: c9 leave 106d07: c3 ret 00106e14 : int devFS_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) { 106e14: 55 push %ebp 106e15: 89 e5 mov %esp,%ebp 106e17: 83 ec 1c sub $0x1c,%esp 106e1a: 8b 55 08 mov 0x8(%ebp),%edx rtems_libio_ioctl_args_t args; rtems_status_code status; rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; 106e1d: 8b 42 38 mov 0x38(%edx),%eax args.iop = iop; 106e20: 89 55 e8 mov %edx,-0x18(%ebp) args.command = command; 106e23: 8b 55 0c mov 0xc(%ebp),%edx 106e26: 89 55 ec mov %edx,-0x14(%ebp) args.buffer = buffer; 106e29: 8b 55 10 mov 0x10(%ebp),%edx 106e2c: 89 55 f0 mov %edx,-0x10(%ebp) status = rtems_io_control( 106e2f: 8d 55 e8 lea -0x18(%ebp),%edx 106e32: 52 push %edx 106e33: ff 70 0c pushl 0xc(%eax) 106e36: ff 70 08 pushl 0x8(%eax) 106e39: e8 e6 38 00 00 call 10a724 np->major, np->minor, (void *) &args ); if ( status ) 106e3e: 83 c4 10 add $0x10,%esp 106e41: 85 c0 test %eax,%eax 106e43: 74 0e je 106e53 <== NEVER TAKEN return rtems_deviceio_errno(status); 106e45: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 106e48: 50 push %eax <== NOT EXECUTED 106e49: e8 4a 64 00 00 call 10d298 <== NOT EXECUTED 106e4e: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 106e51: eb 03 jmp 106e56 <== NOT EXECUTED return args.ioctl_return; 106e53: 8b 45 f4 mov -0xc(%ebp),%eax } 106e56: c9 leave 106e57: c3 ret 00106d08 : const char *path, mode_t mode, dev_t dev, rtems_filesystem_location_info_t *pathloc ) { 106d08: 55 push %ebp 106d09: 89 e5 mov %esp,%ebp 106d0b: 57 push %edi 106d0c: 56 push %esi 106d0d: 53 push %ebx 106d0e: 83 ec 1c sub $0x1c,%esp 106d11: 8b 7d 08 mov 0x8(%ebp),%edi 106d14: 8b 4d 10 mov 0x10(%ebp),%ecx 106d17: 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') && 106d1a: 80 3f 64 cmpb $0x64,(%edi) 106d1d: 75 18 jne 106d37 <== ALWAYS TAKEN 106d1f: 80 7f 01 65 cmpb $0x65,0x1(%edi) 106d23: 75 12 jne 106d37 <== ALWAYS TAKEN (path[2] == 'v') && (path[3] == '\0')) 106d25: 80 7f 02 76 cmpb $0x76,0x2(%edi) 106d29: 75 0c jne 106d37 <== ALWAYS TAKEN 106d2b: 31 c0 xor %eax,%eax 106d2d: 80 7f 03 00 cmpb $0x0,0x3(%edi) 106d31: 0f 84 c9 00 00 00 je 106e00 return 0; /* must be a character device or a block device */ if (!S_ISBLK(mode) && !S_ISCHR(mode)) 106d37: 8b 45 0c mov 0xc(%ebp),%eax 106d3a: 25 00 f0 00 00 and $0xf000,%eax 106d3f: 3d 00 20 00 00 cmp $0x2000,%eax 106d44: 74 14 je 106d5a <== NEVER TAKEN 106d46: 3d 00 60 00 00 cmp $0x6000,%eax <== NOT EXECUTED 106d4b: 74 0d je 106d5a <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); 106d4d: e8 06 7a 00 00 call 10e758 <__errno> <== NOT EXECUTED 106d52: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 106d58: eb 23 jmp 106d7d <== NOT EXECUTED ) { union __rtems_dev_t temp; temp.device = device; return temp.__overlay.major; 106d5a: 89 4d e0 mov %ecx,-0x20(%ebp) dev_t device ) { union __rtems_dev_t temp; temp.device = device; 106d5d: 89 55 e4 mov %edx,-0x1c(%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; 106d60: 8b 45 18 mov 0x18(%ebp),%eax 106d63: 8b 08 mov (%eax),%ecx if (!device_name_table) 106d65: 85 c9 test %ecx,%ecx 106d67: 74 09 je 106d72 <== ALWAYS TAKEN 106d69: 89 ca mov %ecx,%edx 106d6b: 31 db xor %ebx,%ebx 106d6d: 83 ce ff or $0xffffffff,%esi 106d70: eb 46 jmp 106db8 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EFAULT ); 106d72: e8 e1 79 00 00 call 10e758 <__errno> <== NOT EXECUTED 106d77: c7 00 0e 00 00 00 movl $0xe,(%eax) <== NOT EXECUTED 106d7d: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 106d80: eb 7e jmp 106e00 <== NOT EXECUTED for (slot = -1, i = 0; i < rtems_device_table_size; i++){ if (device_name_table[i].device_name == NULL) 106d82: 8b 02 mov (%edx),%eax 106d84: 85 c0 test %eax,%eax 106d86: 74 2a je 106db2 <== NEVER TAKEN slot = i; else if (strcmp(path, device_name_table[i].device_name) == 0) 106d88: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 106d8b: 50 push %eax <== NOT EXECUTED 106d8c: 57 push %edi <== NOT EXECUTED 106d8d: 89 55 dc mov %edx,-0x24(%ebp) <== NOT EXECUTED 106d90: 89 4d d8 mov %ecx,-0x28(%ebp) <== NOT EXECUTED 106d93: e8 70 84 00 00 call 10f208 <== NOT EXECUTED 106d98: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 106d9b: 85 c0 test %eax,%eax <== NOT EXECUTED 106d9d: 8b 55 dc mov -0x24(%ebp),%edx <== NOT EXECUTED 106da0: 8b 4d d8 mov -0x28(%ebp),%ecx <== NOT EXECUTED 106da3: 75 0f jne 106db4 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EEXIST ); 106da5: e8 ae 79 00 00 call 10e758 <__errno> <== NOT EXECUTED 106daa: c7 00 11 00 00 00 movl $0x11,(%eax) <== NOT EXECUTED 106db0: eb cb jmp 106d7d <== NOT EXECUTED 106db2: 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++){ 106db4: 43 inc %ebx 106db5: 83 c2 14 add $0x14,%edx 106db8: 3b 1d 88 d9 11 00 cmp 0x11d988,%ebx 106dbe: 72 c2 jb 106d82 else if (strcmp(path, device_name_table[i].device_name) == 0) rtems_set_errno_and_return_minus_one( EEXIST ); } if (slot == -1) 106dc0: 83 fe ff cmp $0xffffffff,%esi 106dc3: 75 0d jne 106dd2 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOMEM ); 106dc5: e8 8e 79 00 00 call 10e758 <__errno> <== NOT EXECUTED 106dca: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED 106dd0: eb ab jmp 106d7d <== NOT EXECUTED _ISR_Disable(level); 106dd2: 9c pushf 106dd3: fa cli 106dd4: 5b pop %ebx device_name_table[slot].device_name = (char *)path; 106dd5: 6b d6 14 imul $0x14,%esi,%edx 106dd8: 8d 14 11 lea (%ecx,%edx,1),%edx 106ddb: 89 3a mov %edi,(%edx) device_name_table[slot].device_name_length = strlen(path); 106ddd: 31 c0 xor %eax,%eax 106ddf: 83 c9 ff or $0xffffffff,%ecx 106de2: f2 ae repnz scas %es:(%edi),%al 106de4: f7 d1 not %ecx 106de6: 49 dec %ecx 106de7: 89 4a 04 mov %ecx,0x4(%edx) device_name_table[slot].major = major; 106dea: 8b 45 e0 mov -0x20(%ebp),%eax 106ded: 89 42 08 mov %eax,0x8(%edx) device_name_table[slot].minor = minor; 106df0: 8b 45 e4 mov -0x1c(%ebp),%eax 106df3: 89 42 0c mov %eax,0xc(%edx) device_name_table[slot].mode = mode; 106df6: 8b 45 0c mov 0xc(%ebp),%eax 106df9: 89 42 10 mov %eax,0x10(%edx) _ISR_Enable(level); 106dfc: 53 push %ebx 106dfd: 9d popf 106dfe: 31 c0 xor %eax,%eax return 0; } 106e00: 8d 65 f4 lea -0xc(%ebp),%esp 106e03: 5b pop %ebx 106e04: 5e pop %esi 106e05: 5f pop %edi 106e06: c9 leave 106e07: c3 ret 00106e58 : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 106e58: 55 push %ebp 106e59: 89 e5 mov %esp,%ebp 106e5b: 83 ec 1c sub $0x1c,%esp 106e5e: 8b 45 08 mov 0x8(%ebp),%eax rtems_libio_open_close_args_t args; rtems_status_code status; rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; 106e61: 8b 50 38 mov 0x38(%eax),%edx args.iop = iop; 106e64: 89 45 ec mov %eax,-0x14(%ebp) args.flags = iop->flags; 106e67: 8b 40 14 mov 0x14(%eax),%eax 106e6a: 89 45 f0 mov %eax,-0x10(%ebp) args.mode = mode; 106e6d: 8b 45 14 mov 0x14(%ebp),%eax 106e70: 89 45 f4 mov %eax,-0xc(%ebp) status = rtems_io_open( 106e73: 8d 45 ec lea -0x14(%ebp),%eax 106e76: 50 push %eax 106e77: ff 72 0c pushl 0xc(%edx) 106e7a: ff 72 08 pushl 0x8(%edx) 106e7d: e8 7a 39 00 00 call 10a7fc 106e82: 89 c2 mov %eax,%edx np->major, np->minor, (void *) &args ); if ( status ) 106e84: 83 c4 10 add $0x10,%esp 106e87: 31 c0 xor %eax,%eax 106e89: 85 d2 test %edx,%edx 106e8b: 74 0c je 106e99 <== NEVER TAKEN return rtems_deviceio_errno(status); 106e8d: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 106e90: 52 push %edx <== NOT EXECUTED 106e91: e8 02 64 00 00 call 10d298 <== NOT EXECUTED 106e96: 83 c4 10 add $0x10,%esp <== NOT EXECUTED return 0; } 106e99: c9 leave 106e9a: c3 ret 00106e9c : ssize_t devFS_read( rtems_libio_t *iop, void *buffer, size_t count ) { 106e9c: 55 push %ebp <== NOT EXECUTED 106e9d: 89 e5 mov %esp,%ebp <== NOT EXECUTED 106e9f: 53 push %ebx <== NOT EXECUTED 106ea0: 83 ec 28 sub $0x28,%esp <== NOT EXECUTED 106ea3: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED rtems_libio_rw_args_t args; rtems_status_code status; rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; 106ea6: 8b 50 38 mov 0x38(%eax),%edx <== NOT EXECUTED args.iop = iop; 106ea9: 89 45 dc mov %eax,-0x24(%ebp) <== NOT EXECUTED args.offset = iop->offset; 106eac: 8b 48 0c mov 0xc(%eax),%ecx <== NOT EXECUTED 106eaf: 8b 58 10 mov 0x10(%eax),%ebx <== NOT EXECUTED 106eb2: 89 4d e0 mov %ecx,-0x20(%ebp) <== NOT EXECUTED 106eb5: 89 5d e4 mov %ebx,-0x1c(%ebp) <== NOT EXECUTED args.buffer = buffer; 106eb8: 8b 4d 0c mov 0xc(%ebp),%ecx <== NOT EXECUTED 106ebb: 89 4d e8 mov %ecx,-0x18(%ebp) <== NOT EXECUTED args.count = count; 106ebe: 8b 4d 10 mov 0x10(%ebp),%ecx <== NOT EXECUTED 106ec1: 89 4d ec mov %ecx,-0x14(%ebp) <== NOT EXECUTED args.flags = iop->flags; 106ec4: 8b 40 14 mov 0x14(%eax),%eax <== NOT EXECUTED 106ec7: 89 45 f0 mov %eax,-0x10(%ebp) <== NOT EXECUTED args.bytes_moved = 0; 106eca: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp) <== NOT EXECUTED status = rtems_io_read( 106ed1: 8d 45 dc lea -0x24(%ebp),%eax <== NOT EXECUTED 106ed4: 50 push %eax <== NOT EXECUTED 106ed5: ff 72 0c pushl 0xc(%edx) <== NOT EXECUTED 106ed8: ff 72 08 pushl 0x8(%edx) <== NOT EXECUTED 106edb: e8 4c 39 00 00 call 10a82c <== NOT EXECUTED np->major, np->minor, (void *) &args ); if ( status ) 106ee0: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 106ee3: 85 c0 test %eax,%eax <== NOT EXECUTED 106ee5: 74 0e je 106ef5 <== NOT EXECUTED return rtems_deviceio_errno(status); 106ee7: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 106eea: 50 push %eax <== NOT EXECUTED 106eeb: e8 a8 63 00 00 call 10d298 <== NOT EXECUTED 106ef0: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 106ef3: eb 03 jmp 106ef8 <== NOT EXECUTED return (ssize_t) args.bytes_moved; 106ef5: 8b 45 f4 mov -0xc(%ebp),%eax <== NOT EXECUTED } 106ef8: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 106efb: c9 leave <== NOT EXECUTED 106efc: c3 ret <== NOT EXECUTED 00106f00 : int devFS_stat( rtems_filesystem_location_info_t *loc, struct stat *buf ) { 106f00: 55 push %ebp 106f01: 89 e5 mov %esp,%ebp 106f03: 53 push %ebx 106f04: 83 ec 04 sub $0x4,%esp 106f07: 8b 55 0c mov 0xc(%ebp),%edx rtems_device_name_t *the_dev; the_dev = (rtems_device_name_t *)loc->node_access; 106f0a: 8b 45 08 mov 0x8(%ebp),%eax 106f0d: 8b 00 mov (%eax),%eax if (!the_dev) 106f0f: 85 c0 test %eax,%eax 106f11: 75 10 jne 106f23 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EFAULT ); 106f13: e8 40 78 00 00 call 10e758 <__errno> <== NOT EXECUTED 106f18: c7 00 0e 00 00 00 movl $0xe,(%eax) <== NOT EXECUTED 106f1e: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 106f21: eb 14 jmp 106f37 <== NOT EXECUTED buf->st_rdev = rtems_filesystem_make_dev_t( the_dev->major, the_dev->minor ); 106f23: 8b 48 0c mov 0xc(%eax),%ecx rtems_device_minor_number _minor ) { union __rtems_dev_t temp; temp.__overlay.major = _major; 106f26: 8b 58 08 mov 0x8(%eax),%ebx 106f29: 89 5a 18 mov %ebx,0x18(%edx) 106f2c: 89 4a 1c mov %ecx,0x1c(%edx) buf->st_mode = the_dev->mode; 106f2f: 8b 40 10 mov 0x10(%eax),%eax 106f32: 89 42 0c mov %eax,0xc(%edx) 106f35: 31 c0 xor %eax,%eax return 0; } 106f37: 5a pop %edx 106f38: 5b pop %ebx 106f39: c9 leave 106f3a: c3 ret 00106f3c : ssize_t devFS_write( rtems_libio_t *iop, const void *buffer, size_t count ) { 106f3c: 55 push %ebp 106f3d: 89 e5 mov %esp,%ebp 106f3f: 53 push %ebx 106f40: 83 ec 28 sub $0x28,%esp 106f43: 8b 45 08 mov 0x8(%ebp),%eax rtems_libio_rw_args_t args; rtems_status_code status; rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; 106f46: 8b 50 38 mov 0x38(%eax),%edx args.iop = iop; 106f49: 89 45 dc mov %eax,-0x24(%ebp) args.offset = iop->offset; 106f4c: 8b 48 0c mov 0xc(%eax),%ecx 106f4f: 8b 58 10 mov 0x10(%eax),%ebx 106f52: 89 4d e0 mov %ecx,-0x20(%ebp) 106f55: 89 5d e4 mov %ebx,-0x1c(%ebp) args.buffer = (void *) buffer; 106f58: 8b 4d 0c mov 0xc(%ebp),%ecx 106f5b: 89 4d e8 mov %ecx,-0x18(%ebp) args.count = count; 106f5e: 8b 4d 10 mov 0x10(%ebp),%ecx 106f61: 89 4d ec mov %ecx,-0x14(%ebp) args.flags = iop->flags; 106f64: 8b 40 14 mov 0x14(%eax),%eax 106f67: 89 45 f0 mov %eax,-0x10(%ebp) args.bytes_moved = 0; 106f6a: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp) status = rtems_io_write( 106f71: 8d 45 dc lea -0x24(%ebp),%eax 106f74: 50 push %eax 106f75: ff 72 0c pushl 0xc(%edx) 106f78: ff 72 08 pushl 0x8(%edx) 106f7b: e8 dc 38 00 00 call 10a85c np->major, np->minor, (void *) &args ); if ( status ) 106f80: 83 c4 10 add $0x10,%esp 106f83: 85 c0 test %eax,%eax 106f85: 74 0e je 106f95 <== NEVER TAKEN return rtems_deviceio_errno(status); 106f87: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 106f8a: 50 push %eax <== NOT EXECUTED 106f8b: e8 08 63 00 00 call 10d298 <== NOT EXECUTED 106f90: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 106f93: eb 03 jmp 106f98 <== NOT EXECUTED return (ssize_t) args.bytes_moved; 106f95: 8b 45 f4 mov -0xc(%ebp),%eax } 106f98: 8b 5d fc mov -0x4(%ebp),%ebx 106f9b: c9 leave 106f9c: c3 ret 0010ed50 : */ int device_close( rtems_libio_t *iop ) { 10ed50: 55 push %ebp 10ed51: 89 e5 mov %esp,%ebp 10ed53: 83 ec 1c sub $0x1c,%esp 10ed56: 8b 55 08 mov 0x8(%ebp),%edx rtems_libio_open_close_args_t args; rtems_status_code status; IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 10ed59: 8b 42 38 mov 0x38(%edx),%eax args.iop = iop; 10ed5c: 89 55 ec mov %edx,-0x14(%ebp) args.flags = 0; 10ed5f: c7 45 f0 00 00 00 00 movl $0x0,-0x10(%ebp) args.mode = 0; 10ed66: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp) status = rtems_io_close( 10ed6d: 8d 55 ec lea -0x14(%ebp),%edx 10ed70: 52 push %edx 10ed71: ff 70 54 pushl 0x54(%eax) 10ed74: ff 70 50 pushl 0x50(%eax) 10ed77: e8 a0 0d 00 00 call 10fb1c <== ALWAYS TAKEN 10ed7c: 89 c2 mov %eax,%edx the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) { 10ed7e: 83 c4 10 add $0x10,%esp 10ed81: 31 c0 xor %eax,%eax 10ed83: 85 d2 test %edx,%edx 10ed85: 74 0c je 10ed93 <== NEVER TAKEN return rtems_deviceio_errno(status); 10ed87: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10ed8a: 52 push %edx <== NOT EXECUTED 10ed8b: e8 e8 11 00 00 call 10ff78 <== NOT EXECUTED 10ed90: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } return 0; } 10ed93: c9 leave 10ed94: c3 ret 0010ec4a : int device_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) { 10ec4a: 55 push %ebp 10ec4b: 89 e5 mov %esp,%ebp 10ec4d: 83 ec 1c sub $0x1c,%esp 10ec50: 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; 10ec53: 89 45 e8 mov %eax,-0x18(%ebp) args.command = command; 10ec56: 8b 55 0c mov 0xc(%ebp),%edx 10ec59: 89 55 ec mov %edx,-0x14(%ebp) args.buffer = buffer; 10ec5c: 8b 55 10 mov 0x10(%ebp),%edx 10ec5f: 89 55 f0 mov %edx,-0x10(%ebp) the_jnode = iop->file_info; 10ec62: 8b 40 38 mov 0x38(%eax),%eax status = rtems_io_control( 10ec65: 8d 55 e8 lea -0x18(%ebp),%edx 10ec68: 52 push %edx 10ec69: ff 70 54 pushl 0x54(%eax) 10ec6c: ff 70 50 pushl 0x50(%eax) 10ec6f: e8 d8 0e 00 00 call 10fb4c <== ALWAYS TAKEN the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 10ec74: 83 c4 10 add $0x10,%esp 10ec77: 85 c0 test %eax,%eax 10ec79: 74 0e je 10ec89 <== NEVER TAKEN return rtems_deviceio_errno(status); 10ec7b: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10ec7e: 50 push %eax <== NOT EXECUTED 10ec7f: e8 f4 12 00 00 call 10ff78 <== NOT EXECUTED 10ec84: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10ec87: eb 03 jmp 10ec8c <== NOT EXECUTED return args.ioctl_return; 10ec89: 8b 45 f4 mov -0xc(%ebp),%eax } 10ec8c: c9 leave 10ec8d: c3 ret 0010ed95 : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 10ed95: 55 push %ebp 10ed96: 89 e5 mov %esp,%ebp 10ed98: 83 ec 1c sub $0x1c,%esp 10ed9b: 8b 45 08 mov 0x8(%ebp),%eax rtems_libio_open_close_args_t args; rtems_status_code status; IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 10ed9e: 8b 50 38 mov 0x38(%eax),%edx args.iop = iop; 10eda1: 89 45 ec mov %eax,-0x14(%ebp) args.flags = iop->flags; 10eda4: 8b 40 14 mov 0x14(%eax),%eax 10eda7: 89 45 f0 mov %eax,-0x10(%ebp) args.mode = mode; 10edaa: 8b 45 14 mov 0x14(%ebp),%eax 10edad: 89 45 f4 mov %eax,-0xc(%ebp) status = rtems_io_open( 10edb0: 8d 45 ec lea -0x14(%ebp),%eax 10edb3: 50 push %eax 10edb4: ff 72 54 pushl 0x54(%edx) 10edb7: ff 72 50 pushl 0x50(%edx) 10edba: e8 bd 0d 00 00 call 10fb7c <== ALWAYS TAKEN 10edbf: 89 c2 mov %eax,%edx the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 10edc1: 83 c4 10 add $0x10,%esp 10edc4: 31 c0 xor %eax,%eax 10edc6: 85 d2 test %edx,%edx 10edc8: 74 0c je 10edd6 <== NEVER TAKEN return rtems_deviceio_errno(status); 10edca: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10edcd: 52 push %edx <== NOT EXECUTED 10edce: e8 a5 11 00 00 call 10ff78 <== NOT EXECUTED 10edd3: 83 c4 10 add $0x10,%esp <== NOT EXECUTED return 0; } 10edd6: c9 leave 10edd7: c3 ret 0010ecef : ssize_t device_read( rtems_libio_t *iop, void *buffer, size_t count ) { 10ecef: 55 push %ebp <== NOT EXECUTED 10ecf0: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10ecf2: 53 push %ebx <== NOT EXECUTED 10ecf3: 83 ec 28 sub $0x28,%esp <== NOT EXECUTED 10ecf6: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED rtems_libio_rw_args_t args; rtems_status_code status; IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 10ecf9: 8b 50 38 mov 0x38(%eax),%edx <== NOT EXECUTED args.iop = iop; 10ecfc: 89 45 dc mov %eax,-0x24(%ebp) <== NOT EXECUTED args.offset = iop->offset; 10ecff: 8b 48 0c mov 0xc(%eax),%ecx <== NOT EXECUTED 10ed02: 8b 58 10 mov 0x10(%eax),%ebx <== NOT EXECUTED 10ed05: 89 4d e0 mov %ecx,-0x20(%ebp) <== NOT EXECUTED 10ed08: 89 5d e4 mov %ebx,-0x1c(%ebp) <== NOT EXECUTED args.buffer = buffer; 10ed0b: 8b 4d 0c mov 0xc(%ebp),%ecx <== NOT EXECUTED 10ed0e: 89 4d e8 mov %ecx,-0x18(%ebp) <== NOT EXECUTED args.count = count; 10ed11: 8b 4d 10 mov 0x10(%ebp),%ecx <== NOT EXECUTED 10ed14: 89 4d ec mov %ecx,-0x14(%ebp) <== NOT EXECUTED args.flags = iop->flags; 10ed17: 8b 40 14 mov 0x14(%eax),%eax <== NOT EXECUTED 10ed1a: 89 45 f0 mov %eax,-0x10(%ebp) <== NOT EXECUTED args.bytes_moved = 0; 10ed1d: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp) <== NOT EXECUTED status = rtems_io_read( 10ed24: 8d 45 dc lea -0x24(%ebp),%eax <== NOT EXECUTED 10ed27: 50 push %eax <== NOT EXECUTED 10ed28: ff 72 54 pushl 0x54(%edx) <== NOT EXECUTED 10ed2b: ff 72 50 pushl 0x50(%edx) <== NOT EXECUTED 10ed2e: e8 79 0e 00 00 call 10fbac <== NOT EXECUTED the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 10ed33: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10ed36: 85 c0 test %eax,%eax <== NOT EXECUTED 10ed38: 74 0e je 10ed48 <== NOT EXECUTED return rtems_deviceio_errno(status); 10ed3a: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10ed3d: 50 push %eax <== NOT EXECUTED 10ed3e: e8 35 12 00 00 call 10ff78 <== NOT EXECUTED 10ed43: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10ed46: eb 03 jmp 10ed4b <== NOT EXECUTED return (ssize_t) args.bytes_moved; 10ed48: 8b 45 f4 mov -0xc(%ebp),%eax <== NOT EXECUTED } 10ed4b: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 10ed4e: c9 leave <== NOT EXECUTED 10ed4f: c3 ret <== NOT EXECUTED 0010ec8e : ssize_t device_write( rtems_libio_t *iop, const void *buffer, size_t count ) { 10ec8e: 55 push %ebp 10ec8f: 89 e5 mov %esp,%ebp 10ec91: 53 push %ebx 10ec92: 83 ec 28 sub $0x28,%esp 10ec95: 8b 45 08 mov 0x8(%ebp),%eax rtems_libio_rw_args_t args; rtems_status_code status; IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 10ec98: 8b 50 38 mov 0x38(%eax),%edx args.iop = iop; 10ec9b: 89 45 dc mov %eax,-0x24(%ebp) args.offset = iop->offset; 10ec9e: 8b 48 0c mov 0xc(%eax),%ecx 10eca1: 8b 58 10 mov 0x10(%eax),%ebx 10eca4: 89 4d e0 mov %ecx,-0x20(%ebp) 10eca7: 89 5d e4 mov %ebx,-0x1c(%ebp) args.buffer = (void *) buffer; 10ecaa: 8b 4d 0c mov 0xc(%ebp),%ecx 10ecad: 89 4d e8 mov %ecx,-0x18(%ebp) args.count = count; 10ecb0: 8b 4d 10 mov 0x10(%ebp),%ecx 10ecb3: 89 4d ec mov %ecx,-0x14(%ebp) args.flags = iop->flags; 10ecb6: 8b 40 14 mov 0x14(%eax),%eax 10ecb9: 89 45 f0 mov %eax,-0x10(%ebp) args.bytes_moved = 0; 10ecbc: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp) status = rtems_io_write( 10ecc3: 8d 45 dc lea -0x24(%ebp),%eax 10ecc6: 50 push %eax 10ecc7: ff 72 54 pushl 0x54(%edx) 10ecca: ff 72 50 pushl 0x50(%edx) 10eccd: e8 0a 0f 00 00 call 10fbdc <== ALWAYS TAKEN the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 10ecd2: 83 c4 10 add $0x10,%esp 10ecd5: 85 c0 test %eax,%eax 10ecd7: 74 0e je 10ece7 <== NEVER TAKEN return rtems_deviceio_errno(status); 10ecd9: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10ecdc: 50 push %eax <== NOT EXECUTED 10ecdd: e8 96 12 00 00 call 10ff78 <== NOT EXECUTED 10ece2: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10ece5: eb 03 jmp 10ecea <== NOT EXECUTED return (ssize_t) args.bytes_moved; 10ece7: 8b 45 f4 mov -0xc(%ebp),%eax } 10ecea: 8b 5d fc mov -0x4(%ebp),%ebx 10eced: c9 leave 10ecee: c3 ret 00108982 : /* * Drain output queue */ static void drainOutput (struct rtems_termios_tty *tty) { 108982: 55 push %ebp 108983: 89 e5 mov %esp,%ebp 108985: 53 push %ebx 108986: 83 ec 04 sub $0x4,%esp 108989: 89 c3 mov %eax,%ebx rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) { 10898b: 83 b8 b4 00 00 00 00 cmpl $0x0,0xb4(%eax) 108992: 74 46 je 1089da rtems_interrupt_disable (level); 108994: 9c pushf 108995: fa cli 108996: 58 pop %eax while (tty->rawOutBuf.Tail != tty->rawOutBuf.Head) { 108997: eb 2f jmp 1089c8 <== ALWAYS TAKEN tty->rawOutBufState = rob_wait; 108999: c7 83 94 00 00 00 02 movl $0x2,0x94(%ebx) 1089a0: 00 00 00 rtems_interrupt_enable (level); 1089a3: 50 push %eax 1089a4: 9d popf sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore, 1089a5: 50 push %eax 1089a6: 6a 00 push $0x0 1089a8: 6a 00 push $0x0 1089aa: ff b3 8c 00 00 00 pushl 0x8c(%ebx) 1089b0: e8 77 15 00 00 call 109f2c RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 1089b5: 83 c4 10 add $0x10,%esp 1089b8: 85 c0 test %eax,%eax 1089ba: 74 09 je 1089c5 <== NEVER TAKEN rtems_fatal_error_occurred (sc); 1089bc: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1089bf: 50 push %eax <== NOT EXECUTED 1089c0: e8 1f 1b 00 00 call 10a4e4 <== NOT EXECUTED rtems_interrupt_disable (level); 1089c5: 9c pushf 1089c6: fa cli 1089c7: 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) { 1089c8: 8b 8b 84 00 00 00 mov 0x84(%ebx),%ecx 1089ce: 8b 93 80 00 00 00 mov 0x80(%ebx),%edx 1089d4: 39 d1 cmp %edx,%ecx 1089d6: 75 c1 jne 108999 RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); rtems_interrupt_disable (level); } rtems_interrupt_enable (level); 1089d8: 50 push %eax 1089d9: 9d popf } } 1089da: 8b 5d fc mov -0x4(%ebp),%ebx 1089dd: c9 leave 1089de: c3 ret 00107c80 : #include int dup( int fildes ) { 107c80: 55 push %ebp 107c81: 89 e5 mov %esp,%ebp 107c83: 83 ec 0c sub $0xc,%esp return fcntl( fildes, F_DUPFD, 0 ); 107c86: 6a 00 push $0x0 107c88: 6a 00 push $0x0 107c8a: ff 75 08 pushl 0x8(%ebp) 107c8d: e8 be 01 00 00 call 107e50 <== ALWAYS TAKEN } 107c92: c9 leave 107c93: c3 ret 00107c38 : int dup2( int fildes, int fildes2 ) { 107c38: 55 push %ebp 107c39: 89 e5 mov %esp,%ebp 107c3b: 57 push %edi 107c3c: 56 push %esi 107c3d: 53 push %ebx 107c3e: 83 ec 64 sub $0x64,%esp 107c41: 8b 5d 08 mov 0x8(%ebp),%ebx 107c44: 8b 75 0c mov 0xc(%ebp),%esi /* * If fildes is not valid, then fildes2 should not be closed. */ status = fstat( fildes, &buf ); 107c47: 8d 7d a4 lea -0x5c(%ebp),%edi 107c4a: 57 push %edi 107c4b: 53 push %ebx 107c4c: e8 d7 04 00 00 call 108128 if ( status == -1 ) 107c51: 83 c4 10 add $0x10,%esp 107c54: 40 inc %eax 107c55: 74 1e je 107c75 <== ALWAYS TAKEN /* * If fildes2 is not valid, then we should not do anything either. */ status = fstat( fildes2, &buf ); 107c57: 52 push %edx 107c58: 52 push %edx 107c59: 57 push %edi 107c5a: 56 push %esi 107c5b: e8 c8 04 00 00 call 108128 if ( status == -1 ) 107c60: 83 c4 10 add $0x10,%esp 107c63: 40 inc %eax 107c64: 74 0f je 107c75 <== NEVER TAKEN /* * This fcntl handles everything else. */ return fcntl( fildes, F_DUPFD, fildes2 ); 107c66: 50 push %eax <== NOT EXECUTED 107c67: 56 push %esi <== NOT EXECUTED 107c68: 6a 00 push $0x0 <== NOT EXECUTED 107c6a: 53 push %ebx <== NOT EXECUTED 107c6b: e8 e0 01 00 00 call 107e50 <== NOT EXECUTED 107c70: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 107c73: eb 03 jmp 107c78 <== NOT EXECUTED 107c75: 83 c8 ff or $0xffffffff,%eax } 107c78: 8d 65 f4 lea -0xc(%ebp),%esp 107c7b: 5b pop %ebx 107c7c: 5e pop %esi 107c7d: 5f pop %edi 107c7e: c9 leave 107c7f: c3 ret 0010859f : /* * Echo a typed character */ static void echo (unsigned char c, struct rtems_termios_tty *tty) { 10859f: 55 push %ebp <== NOT EXECUTED 1085a0: 89 e5 mov %esp,%ebp <== NOT EXECUTED 1085a2: 53 push %ebx <== NOT EXECUTED 1085a3: 83 ec 24 sub $0x24,%esp <== NOT EXECUTED if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { 1085a6: f6 42 3d 02 testb $0x2,0x3d(%edx) <== NOT EXECUTED 1085aa: 74 3e je 1085ea <== NOT EXECUTED 1085ac: 0f b6 c8 movzbl %al,%ecx <== NOT EXECUTED 1085af: 8b 1d dc 16 12 00 mov 0x1216dc,%ebx <== NOT EXECUTED 1085b5: f6 44 0b 01 20 testb $0x20,0x1(%ebx,%ecx,1) <== NOT EXECUTED 1085ba: 74 2e je 1085ea <== NOT EXECUTED 1085bc: 3c 09 cmp $0x9,%al <== NOT EXECUTED 1085be: 74 2a je 1085ea <== NOT EXECUTED 1085c0: 3c 0a cmp $0xa,%al <== NOT EXECUTED 1085c2: 74 26 je 1085ea <== NOT EXECUTED char echobuf[2]; echobuf[0] = '^'; 1085c4: c6 45 f6 5e movb $0x5e,-0xa(%ebp) <== NOT EXECUTED echobuf[1] = c ^ 0x40; 1085c8: 83 f0 40 xor $0x40,%eax <== NOT EXECUTED 1085cb: 88 45 f7 mov %al,-0x9(%ebp) <== NOT EXECUTED rtems_termios_puts (echobuf, 2, tty); 1085ce: 50 push %eax <== NOT EXECUTED 1085cf: 52 push %edx <== NOT EXECUTED 1085d0: 6a 02 push $0x2 <== NOT EXECUTED 1085d2: 8d 45 f6 lea -0xa(%ebp),%eax <== NOT EXECUTED 1085d5: 50 push %eax <== NOT EXECUTED 1085d6: 89 55 e4 mov %edx,-0x1c(%ebp) <== NOT EXECUTED 1085d9: e8 83 fd ff ff call 108361 <== NOT EXECUTED tty->column += 2; 1085de: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED 1085e1: 83 42 28 02 addl $0x2,0x28(%edx) <== NOT EXECUTED * Echo a typed character */ static void echo (unsigned char c, struct rtems_termios_tty *tty) { if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { 1085e5: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 1085e8: eb 08 jmp 1085f2 <== NOT EXECUTED echobuf[1] = c ^ 0x40; rtems_termios_puts (echobuf, 2, tty); tty->column += 2; } else { oproc (c, tty); 1085ea: 0f b6 c0 movzbl %al,%eax <== NOT EXECUTED 1085ed: e8 8f fe ff ff call 108481 <== NOT EXECUTED } } 1085f2: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 1085f5: c9 leave <== NOT EXECUTED 1085f6: c3 ret <== NOT EXECUTED 0012565c : fclose(group_fp); group_fp = fopen("/etc/group", "r"); } void endgrent(void) { 12565c: 55 push %ebp <== NOT EXECUTED 12565d: 89 e5 mov %esp,%ebp <== NOT EXECUTED 12565f: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED if (group_fp != NULL) 125662: a1 28 30 16 00 mov 0x163028,%eax <== NOT EXECUTED 125667: 85 c0 test %eax,%eax <== NOT EXECUTED 125669: 74 0c je 125677 <== NOT EXECUTED fclose(group_fp); 12566b: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12566e: 50 push %eax <== NOT EXECUTED 12566f: e8 a8 2e 01 00 call 13851c <== NOT EXECUTED 125674: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } 125677: c9 leave <== NOT EXECUTED 125678: c3 ret <== NOT EXECUTED 00125679 : fclose(passwd_fp); passwd_fp = fopen("/etc/passwd", "r"); } void endpwent(void) { 125679: 55 push %ebp <== NOT EXECUTED 12567a: 89 e5 mov %esp,%ebp <== NOT EXECUTED 12567c: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED if (passwd_fp != NULL) 12567f: a1 40 2f 16 00 mov 0x162f40,%eax <== NOT EXECUTED 125684: 85 c0 test %eax,%eax <== NOT EXECUTED 125686: 74 0c je 125694 <== NOT EXECUTED fclose(passwd_fp); 125688: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12568b: 50 push %eax <== NOT EXECUTED 12568c: e8 8b 2e 01 00 call 13851c <== NOT EXECUTED 125691: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } 125694: c9 leave <== NOT EXECUTED 125695: c3 ret <== NOT EXECUTED 001085f7 : * 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) { 1085f7: 55 push %ebp <== NOT EXECUTED 1085f8: 89 e5 mov %esp,%ebp <== NOT EXECUTED 1085fa: 57 push %edi <== NOT EXECUTED 1085fb: 56 push %esi <== NOT EXECUTED 1085fc: 53 push %ebx <== NOT EXECUTED 1085fd: 83 ec 1c sub $0x1c,%esp <== NOT EXECUTED 108600: 89 c3 mov %eax,%ebx <== NOT EXECUTED 108602: 89 55 e4 mov %edx,-0x1c(%ebp) <== NOT EXECUTED if (tty->ccount == 0) 108605: 83 78 20 00 cmpl $0x0,0x20(%eax) <== NOT EXECUTED 108609: 0f 84 59 01 00 00 je 108768 <== NOT EXECUTED return; if (lineFlag) { 10860f: 85 d2 test %edx,%edx <== NOT EXECUTED 108611: 0f 84 46 01 00 00 je 10875d <== NOT EXECUTED if (!(tty->termios.c_lflag & ECHO)) { 108617: 8b 40 3c mov 0x3c(%eax),%eax <== NOT EXECUTED 10861a: a8 08 test $0x8,%al <== NOT EXECUTED 10861c: 75 0c jne 10862a <== NOT EXECUTED tty->ccount = 0; 10861e: c7 43 20 00 00 00 00 movl $0x0,0x20(%ebx) <== NOT EXECUTED return; 108625: e9 3e 01 00 00 jmp 108768 <== NOT EXECUTED } if (!(tty->termios.c_lflag & ECHOE)) { 10862a: a8 10 test $0x10,%al <== NOT EXECUTED 10862c: 0f 85 2b 01 00 00 jne 10875d <== NOT EXECUTED tty->ccount = 0; 108632: c7 43 20 00 00 00 00 movl $0x0,0x20(%ebx) <== NOT EXECUTED echo (tty->termios.c_cc[VKILL], tty); 108639: 0f b6 43 44 movzbl 0x44(%ebx),%eax <== NOT EXECUTED 10863d: 89 da mov %ebx,%edx <== NOT EXECUTED 10863f: e8 5b ff ff ff call 10859f <== NOT EXECUTED if (tty->termios.c_lflag & ECHOK) 108644: f6 43 3c 20 testb $0x20,0x3c(%ebx) <== NOT EXECUTED 108648: 0f 84 1a 01 00 00 je 108768 <== NOT EXECUTED echo ('\n', tty); 10864e: 89 da mov %ebx,%edx <== NOT EXECUTED 108650: b8 0a 00 00 00 mov $0xa,%eax <== NOT EXECUTED 108655: eb 30 jmp 108687 <== NOT EXECUTED return; } } while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; 108657: 8b 53 1c mov 0x1c(%ebx),%edx <== NOT EXECUTED 10865a: 8d 48 ff lea -0x1(%eax),%ecx <== NOT EXECUTED 10865d: 89 4b 20 mov %ecx,0x20(%ebx) <== NOT EXECUTED 108660: 8a 54 02 ff mov -0x1(%edx,%eax,1),%dl <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) { 108664: 8b 7b 3c mov 0x3c(%ebx),%edi <== NOT EXECUTED 108667: f7 c7 08 00 00 00 test $0x8,%edi <== NOT EXECUTED 10866d: 0f 84 e4 00 00 00 je 108757 <== NOT EXECUTED if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) { 108673: 83 7d e4 00 cmpl $0x0,-0x1c(%ebp) <== NOT EXECUTED 108677: 75 1a jne 108693 <== NOT EXECUTED 108679: f7 c7 10 00 00 00 test $0x10,%edi <== NOT EXECUTED 10867f: 75 12 jne 108693 <== NOT EXECUTED echo (tty->termios.c_cc[VERASE], tty); 108681: 0f b6 43 43 movzbl 0x43(%ebx),%eax <== NOT EXECUTED 108685: 89 da mov %ebx,%edx <== NOT EXECUTED } } if (!lineFlag) break; } } 108687: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 10868a: 5b pop %ebx <== NOT EXECUTED 10868b: 5e pop %esi <== NOT EXECUTED 10868c: 5f pop %edi <== NOT EXECUTED 10868d: 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); 10868e: e9 0c ff ff ff jmp 10859f <== NOT EXECUTED } else if (c == '\t') { 108693: 80 fa 09 cmp $0x9,%dl <== NOT EXECUTED 108696: 8b 0d dc 16 12 00 mov 0x1216dc,%ecx <== NOT EXECUTED 10869c: 75 5d jne 1086fb <== NOT EXECUTED int col = tty->read_start_column; 10869e: 8b 73 2c mov 0x2c(%ebx),%esi <== NOT EXECUTED * Erase a character or line * FIXME: Needs support for WERASE and ECHOPRT. * FIXME: Some of the tests should check for IEXTEN, too. */ static void erase (struct rtems_termios_tty *tty, int lineFlag) 1086a1: ba 01 00 00 00 mov $0x1,%edx <== NOT EXECUTED c = tty->cbuf[i++]; if (c == '\t') { col = (col | 7) + 1; } else if (iscntrl (c)) { if (tty->termios.c_lflag & ECHOCTL) 1086a6: 81 e7 00 02 00 00 and $0x200,%edi <== NOT EXECUTED 1086ac: 89 7d e0 mov %edi,-0x20(%ebp) <== NOT EXECUTED 1086af: 89 c7 mov %eax,%edi <== NOT EXECUTED int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 1086b1: eb 27 jmp 1086da <== NOT EXECUTED c = tty->cbuf[i++]; 1086b3: 8b 43 1c mov 0x1c(%ebx),%eax <== NOT EXECUTED 1086b6: 8a 44 10 ff mov -0x1(%eax,%edx,1),%al <== NOT EXECUTED if (c == '\t') { 1086ba: 3c 09 cmp $0x9,%al <== NOT EXECUTED 1086bc: 75 05 jne 1086c3 <== NOT EXECUTED col = (col | 7) + 1; 1086be: 83 ce 07 or $0x7,%esi <== NOT EXECUTED 1086c1: eb 15 jmp 1086d8 <== NOT EXECUTED } else if (iscntrl (c)) { 1086c3: 0f b6 c0 movzbl %al,%eax <== NOT EXECUTED 1086c6: f6 44 01 01 20 testb $0x20,0x1(%ecx,%eax,1) <== NOT EXECUTED 1086cb: 74 0b je 1086d8 <== NOT EXECUTED if (tty->termios.c_lflag & ECHOCTL) 1086cd: 83 7d e0 00 cmpl $0x0,-0x20(%ebp) <== NOT EXECUTED 1086d1: 74 06 je 1086d9 <== NOT EXECUTED col += 2; 1086d3: 83 c6 02 add $0x2,%esi <== NOT EXECUTED 1086d6: eb 01 jmp 1086d9 <== NOT EXECUTED } else { col++; 1086d8: 46 inc %esi <== NOT EXECUTED 1086d9: 42 inc %edx <== NOT EXECUTED int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 1086da: 39 fa cmp %edi,%edx <== NOT EXECUTED 1086dc: 75 d5 jne 1086b3 <== NOT EXECUTED 1086de: eb 14 jmp 1086f4 <== NOT EXECUTED /* * Back up over the tab */ while (tty->column > col) { rtems_termios_puts ("\b", 1, tty); 1086e0: 57 push %edi <== NOT EXECUTED 1086e1: 53 push %ebx <== NOT EXECUTED 1086e2: 6a 01 push $0x1 <== NOT EXECUTED 1086e4: 68 9c d4 11 00 push $0x11d49c <== NOT EXECUTED 1086e9: e8 73 fc ff ff call 108361 <== NOT EXECUTED tty->column--; 1086ee: ff 4b 28 decl 0x28(%ebx) <== NOT EXECUTED 1086f1: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } /* * Back up over the tab */ while (tty->column > col) { 1086f4: 39 73 28 cmp %esi,0x28(%ebx) <== NOT EXECUTED 1086f7: 7f e7 jg 1086e0 <== NOT EXECUTED 1086f9: eb 5c jmp 108757 <== NOT EXECUTED rtems_termios_puts ("\b", 1, tty); tty->column--; } } else { if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) { 1086fb: 0f b6 f2 movzbl %dl,%esi <== NOT EXECUTED 1086fe: f6 44 31 01 20 testb $0x20,0x1(%ecx,%esi,1) <== NOT EXECUTED 108703: 74 24 je 108729 <== NOT EXECUTED 108705: 81 e7 00 02 00 00 and $0x200,%edi <== NOT EXECUTED 10870b: 74 1c je 108729 <== NOT EXECUTED rtems_termios_puts ("\b \b", 3, tty); 10870d: 51 push %ecx <== NOT EXECUTED 10870e: 53 push %ebx <== NOT EXECUTED 10870f: 6a 03 push $0x3 <== NOT EXECUTED 108711: 68 9a d4 11 00 push $0x11d49a <== NOT EXECUTED 108716: e8 46 fc ff ff call 108361 <== NOT EXECUTED if (tty->column) 10871b: 8b 43 28 mov 0x28(%ebx),%eax <== NOT EXECUTED 10871e: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 108721: 85 c0 test %eax,%eax <== NOT EXECUTED 108723: 74 04 je 108729 <== NOT EXECUTED tty->column--; 108725: 48 dec %eax <== NOT EXECUTED 108726: 89 43 28 mov %eax,0x28(%ebx) <== NOT EXECUTED } if (!iscntrl (c) || (tty->termios.c_lflag & ECHOCTL)) { 108729: a1 dc 16 12 00 mov 0x1216dc,%eax <== NOT EXECUTED 10872e: f6 44 30 01 20 testb $0x20,0x1(%eax,%esi,1) <== NOT EXECUTED 108733: 74 06 je 10873b <== NOT EXECUTED 108735: f6 43 3d 02 testb $0x2,0x3d(%ebx) <== NOT EXECUTED 108739: 74 1c je 108757 <== NOT EXECUTED rtems_termios_puts ("\b \b", 3, tty); 10873b: 52 push %edx <== NOT EXECUTED 10873c: 53 push %ebx <== NOT EXECUTED 10873d: 6a 03 push $0x3 <== NOT EXECUTED 10873f: 68 9a d4 11 00 push $0x11d49a <== NOT EXECUTED 108744: e8 18 fc ff ff call 108361 <== NOT EXECUTED if (tty->column) 108749: 8b 43 28 mov 0x28(%ebx),%eax <== NOT EXECUTED 10874c: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10874f: 85 c0 test %eax,%eax <== NOT EXECUTED 108751: 74 04 je 108757 <== NOT EXECUTED tty->column--; 108753: 48 dec %eax <== NOT EXECUTED 108754: 89 43 28 mov %eax,0x28(%ebx) <== NOT EXECUTED } } } if (!lineFlag) 108757: 83 7d e4 00 cmpl $0x0,-0x1c(%ebp) <== NOT EXECUTED 10875b: 74 0b je 108768 <== NOT EXECUTED if (tty->termios.c_lflag & ECHOK) echo ('\n', tty); return; } } while (tty->ccount) { 10875d: 8b 43 20 mov 0x20(%ebx),%eax <== NOT EXECUTED 108760: 85 c0 test %eax,%eax <== NOT EXECUTED 108762: 0f 85 ef fe ff ff jne 108657 <== NOT EXECUTED } } if (!lineFlag) break; } } 108768: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 10876b: 5b pop %ebx <== NOT EXECUTED 10876c: 5e pop %esi <== NOT EXECUTED 10876d: 5f pop %edi <== NOT EXECUTED 10876e: c9 leave <== NOT EXECUTED 10876f: c3 ret <== NOT EXECUTED 00133b30 : #include int fchdir( int fd ) { 133b30: 55 push %ebp <== NOT EXECUTED 133b31: 89 e5 mov %esp,%ebp <== NOT EXECUTED 133b33: 57 push %edi <== NOT EXECUTED 133b34: 56 push %esi <== NOT EXECUTED 133b35: 53 push %ebx <== NOT EXECUTED 133b36: 83 ec 3c sub $0x3c,%esp <== NOT EXECUTED 133b39: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED rtems_libio_t *iop; rtems_filesystem_location_info_t loc, saved; rtems_libio_check_fd( fd ); 133b3c: 3b 1d 44 bb 15 00 cmp 0x15bb44,%ebx <== NOT EXECUTED 133b42: 73 11 jae 133b55 <== NOT EXECUTED iop = rtems_libio_iop( fd ); 133b44: c1 e3 06 shl $0x6,%ebx <== NOT EXECUTED 133b47: 03 1d f0 33 16 00 add 0x1633f0,%ebx <== NOT EXECUTED rtems_libio_check_is_open(iop); 133b4d: 8b 43 14 mov 0x14(%ebx),%eax <== NOT EXECUTED 133b50: f6 c4 01 test $0x1,%ah <== NOT EXECUTED 133b53: 75 10 jne 133b65 <== NOT EXECUTED 133b55: e8 76 48 00 00 call 1383d0 <__errno> <== NOT EXECUTED 133b5a: c7 00 09 00 00 00 movl $0x9,(%eax) <== NOT EXECUTED 133b60: e9 97 00 00 00 jmp 133bfc <== NOT EXECUTED /* * Now process the fchmod(). */ rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); 133b65: a8 02 test $0x2,%al <== NOT EXECUTED 133b67: 75 10 jne 133b79 <== NOT EXECUTED 133b69: e8 62 48 00 00 call 1383d0 <__errno> <== NOT EXECUTED 133b6e: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 133b74: e9 83 00 00 00 jmp 133bfc <== NOT EXECUTED /* * Verify you can change directory into this node. */ if ( !iop->pathinfo.ops ) { 133b79: 8b 43 24 mov 0x24(%ebx),%eax <== NOT EXECUTED 133b7c: 85 c0 test %eax,%eax <== NOT EXECUTED 133b7e: 74 07 je 133b87 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( !iop->pathinfo.ops->node_type_h ) { 133b80: 8b 40 10 mov 0x10(%eax),%eax <== NOT EXECUTED 133b83: 85 c0 test %eax,%eax <== NOT EXECUTED 133b85: 75 0d jne 133b94 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 133b87: e8 44 48 00 00 call 1383d0 <__errno> <== NOT EXECUTED 133b8c: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 133b92: eb 68 jmp 133bfc <== NOT EXECUTED } if ( (*iop->pathinfo.ops->node_type_h)( &iop->pathinfo ) != 133b94: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 133b97: 83 c3 18 add $0x18,%ebx <== NOT EXECUTED 133b9a: 53 push %ebx <== NOT EXECUTED 133b9b: ff d0 call *%eax <== NOT EXECUTED 133b9d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 133ba0: 48 dec %eax <== NOT EXECUTED 133ba1: 74 0d je 133bb0 <== NOT EXECUTED RTEMS_FILESYSTEM_DIRECTORY ) { rtems_set_errno_and_return_minus_one( ENOTDIR ); 133ba3: e8 28 48 00 00 call 1383d0 <__errno> <== NOT EXECUTED 133ba8: c7 00 14 00 00 00 movl $0x14,(%eax) <== NOT EXECUTED 133bae: eb 4c jmp 133bfc <== NOT EXECUTED * but note the race condition. Threads who * share their rtems_filesystem_current better * be synchronized! */ saved = rtems_filesystem_current; 133bb0: a1 78 db 15 00 mov 0x15db78,%eax <== NOT EXECUTED 133bb5: 8d 7d c0 lea -0x40(%ebp),%edi <== NOT EXECUTED 133bb8: 8d 70 04 lea 0x4(%eax),%esi <== NOT EXECUTED 133bbb: b9 05 00 00 00 mov $0x5,%ecx <== NOT EXECUTED 133bc0: f3 a5 rep movsl %ds:(%esi),%es:(%edi) <== NOT EXECUTED rtems_filesystem_current = iop->pathinfo; 133bc2: 8d 78 04 lea 0x4(%eax),%edi <== NOT EXECUTED 133bc5: b1 05 mov $0x5,%cl <== NOT EXECUTED 133bc7: 89 de mov %ebx,%esi <== NOT EXECUTED 133bc9: f3 a5 rep movsl %ds:(%esi),%es:(%edi) <== NOT EXECUTED /* clone the current node */ if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) { 133bcb: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 133bce: 6a 00 push $0x0 <== NOT EXECUTED 133bd0: 8d 45 d4 lea -0x2c(%ebp),%eax <== NOT EXECUTED 133bd3: 50 push %eax <== NOT EXECUTED 133bd4: 6a 00 push $0x0 <== NOT EXECUTED 133bd6: 6a 01 push $0x1 <== NOT EXECUTED 133bd8: 68 f6 1f 15 00 push $0x151ff6 <== NOT EXECUTED 133bdd: e8 3a 7b fd ff call 10b71c <== NOT EXECUTED 133be2: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 133be5: 85 c0 test %eax,%eax <== NOT EXECUTED 133be7: 74 18 je 133c01 <== NOT EXECUTED /* cloning failed; restore original and bail out */ rtems_filesystem_current = saved; 133be9: 8b 3d 78 db 15 00 mov 0x15db78,%edi <== NOT EXECUTED 133bef: 83 c7 04 add $0x4,%edi <== NOT EXECUTED 133bf2: 8d 75 c0 lea -0x40(%ebp),%esi <== NOT EXECUTED 133bf5: b9 05 00 00 00 mov $0x5,%ecx <== NOT EXECUTED 133bfa: f3 a5 rep movsl %ds:(%esi),%es:(%edi) <== NOT EXECUTED 133bfc: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED return -1; 133bff: eb 2f jmp 133c30 <== NOT EXECUTED } /* release the old one */ rtems_filesystem_freenode( &saved ); 133c01: 8b 45 cc mov -0x34(%ebp),%eax <== NOT EXECUTED 133c04: 85 c0 test %eax,%eax <== NOT EXECUTED 133c06: 74 13 je 133c1b <== NOT EXECUTED 133c08: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 133c0b: 85 c0 test %eax,%eax <== NOT EXECUTED 133c0d: 74 0c je 133c1b <== NOT EXECUTED 133c0f: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 133c12: 8d 55 c0 lea -0x40(%ebp),%edx <== NOT EXECUTED 133c15: 52 push %edx <== NOT EXECUTED 133c16: ff d0 call *%eax <== NOT EXECUTED 133c18: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_filesystem_current = loc; 133c1b: 8b 3d 78 db 15 00 mov 0x15db78,%edi <== NOT EXECUTED 133c21: 83 c7 04 add $0x4,%edi <== NOT EXECUTED 133c24: 8d 75 d4 lea -0x2c(%ebp),%esi <== NOT EXECUTED 133c27: b9 05 00 00 00 mov $0x5,%ecx <== NOT EXECUTED 133c2c: f3 a5 rep movsl %ds:(%esi),%es:(%edi) <== NOT EXECUTED 133c2e: 31 c0 xor %eax,%eax <== NOT EXECUTED return 0; } 133c30: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 133c33: 5b pop %ebx <== NOT EXECUTED 133c34: 5e pop %esi <== NOT EXECUTED 133c35: 5f pop %edi <== NOT EXECUTED 133c36: c9 leave <== NOT EXECUTED 133c37: c3 ret <== NOT EXECUTED 0012537c : int fchmod( int fd, mode_t mode ) { 12537c: 55 push %ebp <== NOT EXECUTED 12537d: 89 e5 mov %esp,%ebp <== NOT EXECUTED 12537f: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 125382: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 125385: 8b 4d 0c mov 0xc(%ebp),%ecx <== NOT EXECUTED rtems_libio_t *iop; rtems_libio_check_fd( fd ); 125388: 3b 05 44 bb 15 00 cmp 0x15bb44,%eax <== NOT EXECUTED 12538e: 73 11 jae 1253a1 <== NOT EXECUTED iop = rtems_libio_iop( fd ); 125390: c1 e0 06 shl $0x6,%eax <== NOT EXECUTED 125393: 03 05 f0 33 16 00 add 0x1633f0,%eax <== NOT EXECUTED rtems_libio_check_is_open(iop); 125399: 8b 50 14 mov 0x14(%eax),%edx <== NOT EXECUTED 12539c: f6 c6 01 test $0x1,%dh <== NOT EXECUTED 12539f: 75 0d jne 1253ae <== NOT EXECUTED 1253a1: e8 2a 30 01 00 call 1383d0 <__errno> <== NOT EXECUTED 1253a6: c7 00 09 00 00 00 movl $0x9,(%eax) <== NOT EXECUTED 1253ac: eb 3a jmp 1253e8 <== NOT EXECUTED /* * Now process the fchmod(). */ rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 1253ae: 80 e2 04 and $0x4,%dl <== NOT EXECUTED 1253b1: 75 0d jne 1253c0 <== NOT EXECUTED 1253b3: e8 18 30 01 00 call 1383d0 <__errno> <== NOT EXECUTED 1253b8: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 1253be: eb 28 jmp 1253e8 <== NOT EXECUTED if ( !iop->handlers->fchmod_h ) 1253c0: 8b 50 3c mov 0x3c(%eax),%edx <== NOT EXECUTED 1253c3: 83 7a 1c 00 cmpl $0x0,0x1c(%edx) <== NOT EXECUTED 1253c7: 75 0d jne 1253d6 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 1253c9: e8 02 30 01 00 call 1383d0 <__errno> <== NOT EXECUTED 1253ce: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 1253d4: eb 12 jmp 1253e8 <== NOT EXECUTED return (*iop->pathinfo.handlers->fchmod_h)( &iop->pathinfo, mode ); 1253d6: 8b 50 20 mov 0x20(%eax),%edx <== NOT EXECUTED 1253d9: 89 4d 0c mov %ecx,0xc(%ebp) <== NOT EXECUTED 1253dc: 83 c0 18 add $0x18,%eax <== NOT EXECUTED 1253df: 89 45 08 mov %eax,0x8(%ebp) <== NOT EXECUTED 1253e2: 8b 42 1c mov 0x1c(%edx),%eax <== NOT EXECUTED } 1253e5: c9 leave <== NOT EXECUTED rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); if ( !iop->handlers->fchmod_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->pathinfo.handlers->fchmod_h)( &iop->pathinfo, mode ); 1253e6: ff e0 jmp *%eax <== NOT EXECUTED } 1253e8: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 1253eb: c9 leave <== NOT EXECUTED 1253ec: c3 ret <== NOT EXECUTED 001253f0 : int fchown( int fd, uid_t owner, gid_t group ) { 1253f0: 55 push %ebp <== NOT EXECUTED 1253f1: 89 e5 mov %esp,%ebp <== NOT EXECUTED 1253f3: 53 push %ebx <== NOT EXECUTED 1253f4: 83 ec 04 sub $0x4,%esp <== NOT EXECUTED 1253f7: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 1253fa: 8b 4d 0c mov 0xc(%ebp),%ecx <== NOT EXECUTED 1253fd: 8b 5d 10 mov 0x10(%ebp),%ebx <== NOT EXECUTED rtems_libio_t *iop; rtems_libio_check_fd( fd ); 125400: 3b 05 44 bb 15 00 cmp 0x15bb44,%eax <== NOT EXECUTED 125406: 73 11 jae 125419 <== NOT EXECUTED iop = rtems_libio_iop( fd ); 125408: c1 e0 06 shl $0x6,%eax <== NOT EXECUTED 12540b: 03 05 f0 33 16 00 add 0x1633f0,%eax <== NOT EXECUTED rtems_libio_check_is_open(iop); 125411: 8b 50 14 mov 0x14(%eax),%edx <== NOT EXECUTED 125414: f6 c6 01 test $0x1,%dh <== NOT EXECUTED 125417: 75 0d jne 125426 <== NOT EXECUTED 125419: e8 b2 2f 01 00 call 1383d0 <__errno> <== NOT EXECUTED 12541e: c7 00 09 00 00 00 movl $0x9,(%eax) <== NOT EXECUTED 125424: eb 40 jmp 125466 <== NOT EXECUTED rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 125426: 80 e2 04 and $0x4,%dl <== NOT EXECUTED 125429: 75 0d jne 125438 <== NOT EXECUTED 12542b: e8 a0 2f 01 00 call 1383d0 <__errno> <== NOT EXECUTED 125430: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 125436: eb 2e jmp 125466 <== NOT EXECUTED if ( !iop->pathinfo.ops->chown_h ) 125438: 8b 50 24 mov 0x24(%eax),%edx <== NOT EXECUTED 12543b: 8b 52 18 mov 0x18(%edx),%edx <== NOT EXECUTED 12543e: 85 d2 test %edx,%edx <== NOT EXECUTED 125440: 75 0d jne 12544f <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 125442: e8 89 2f 01 00 call 1383d0 <__errno> <== NOT EXECUTED 125447: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 12544d: eb 17 jmp 125466 <== NOT EXECUTED return (*iop->pathinfo.ops->chown_h)( &iop->pathinfo, owner, group ); 12544f: 0f b7 db movzwl %bx,%ebx <== NOT EXECUTED 125452: 89 5d 10 mov %ebx,0x10(%ebp) <== NOT EXECUTED 125455: 0f b7 c9 movzwl %cx,%ecx <== NOT EXECUTED 125458: 89 4d 0c mov %ecx,0xc(%ebp) <== NOT EXECUTED 12545b: 83 c0 18 add $0x18,%eax <== NOT EXECUTED 12545e: 89 45 08 mov %eax,0x8(%ebp) <== NOT EXECUTED } 125461: 59 pop %ecx <== NOT EXECUTED 125462: 5b pop %ebx <== NOT EXECUTED 125463: c9 leave <== NOT EXECUTED rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); if ( !iop->pathinfo.ops->chown_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->pathinfo.ops->chown_h)( &iop->pathinfo, owner, group ); 125464: ff e2 jmp *%edx <== NOT EXECUTED } 125466: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 125469: 5a pop %edx <== NOT EXECUTED 12546a: 5b pop %ebx <== NOT EXECUTED 12546b: c9 leave <== NOT EXECUTED 12546c: c3 ret <== NOT EXECUTED 00133c38 : int fcntl( int fd, int cmd, ... ) { 133c38: 55 push %ebp 133c39: 89 e5 mov %esp,%ebp 133c3b: 57 push %edi 133c3c: 56 push %esi 133c3d: 53 push %ebx 133c3e: 83 ec 0c sub $0xc,%esp 133c41: 8b 5d 08 mov 0x8(%ebp),%ebx #include #include /* sigh. for the mode bits for open/creat */ extern int open _PARAMS ((const char *, int, ...)); extern int creat _PARAMS ((const char *, mode_t)); extern int fcntl _PARAMS ((int, int, ...)); 133c44: 8d 55 10 lea 0x10(%ebp),%edx int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); 133c47: 8b 0d 44 bb 15 00 mov 0x15bb44,%ecx 133c4d: 39 cb cmp %ecx,%ebx 133c4f: 73 16 jae 133c67 <== ALWAYS TAKEN iop = rtems_libio_iop( fd ); 133c51: a1 f0 33 16 00 mov 0x1633f0,%eax 133c56: c1 e3 06 shl $0x6,%ebx 133c59: 8d 1c 18 lea (%eax,%ebx,1),%ebx rtems_libio_check_is_open(iop); 133c5c: 8b 73 14 mov 0x14(%ebx),%esi 133c5f: f7 c6 00 01 00 00 test $0x100,%esi 133c65: 75 10 jne 133c77 <== NEVER TAKEN 133c67: e8 64 47 00 00 call 1383d0 <__errno> <== NOT EXECUTED 133c6c: c7 00 09 00 00 00 movl $0x9,(%eax) <== NOT EXECUTED 133c72: e9 fe 00 00 00 jmp 133d75 <== NOT EXECUTED /* * This switch should contain all the cases from POSIX. */ switch ( cmd ) { 133c77: 83 7d 0c 09 cmpl $0x9,0xc(%ebp) 133c7b: 0f 87 c1 00 00 00 ja 133d42 133c81: 8b 7d 0c mov 0xc(%ebp),%edi 133c84: ff 24 bd dc 81 15 00 jmp *0x1581dc(,%edi,4) case F_DUPFD: /* dup */ fd2 = va_arg( ap, int ); 133c8b: 8b 32 mov (%edx),%esi if ( fd2 ) 133c8d: 85 f6 test %esi,%esi 133c8f: 74 10 je 133ca1 <== NEVER TAKEN diop = rtems_libio_iop( fd2 ); 133c91: 31 d2 xor %edx,%edx <== NOT EXECUTED 133c93: 39 ce cmp %ecx,%esi <== NOT EXECUTED 133c95: 73 1c jae 133cb3 <== NOT EXECUTED 133c97: 89 f2 mov %esi,%edx <== NOT EXECUTED 133c99: c1 e2 06 shl $0x6,%edx <== NOT EXECUTED 133c9c: 8d 14 10 lea (%eax,%edx,1),%edx <== NOT EXECUTED 133c9f: eb 12 jmp 133cb3 <== NOT EXECUTED else { /* allocate a file control block */ diop = rtems_libio_allocate(); 133ca1: e8 05 7e fd ff call 10baab 133ca6: 89 c2 mov %eax,%edx if ( diop == 0 ) { 133ca8: 83 ce ff or $0xffffffff,%esi 133cab: 85 c0 test %eax,%eax 133cad: 0f 84 c5 00 00 00 je 133d78 <== ALWAYS TAKEN ret = -1; break; } } diop->handlers = iop->handlers; 133cb3: 8b 43 3c mov 0x3c(%ebx),%eax 133cb6: 89 42 3c mov %eax,0x3c(%edx) diop->file_info = iop->file_info; 133cb9: 8b 43 38 mov 0x38(%ebx),%eax 133cbc: 89 42 38 mov %eax,0x38(%edx) diop->flags = iop->flags; 133cbf: 8b 43 14 mov 0x14(%ebx),%eax 133cc2: 89 42 14 mov %eax,0x14(%edx) diop->pathinfo = iop->pathinfo; 133cc5: 8d 7a 18 lea 0x18(%edx),%edi 133cc8: 8d 73 18 lea 0x18(%ebx),%esi 133ccb: b9 05 00 00 00 mov $0x5,%ecx 133cd0: f3 a5 rep movsl %ds:(%esi),%es:(%edi) ret = (int) (diop - rtems_libio_iops); 133cd2: 89 d6 mov %edx,%esi 133cd4: 2b 35 f0 33 16 00 sub 0x1633f0,%esi 133cda: c1 fe 06 sar $0x6,%esi 133cdd: eb 70 jmp 133d4f <== ALWAYS TAKEN break; case F_GETFD: /* get f_flags */ ret = ((iop->flags & LIBIO_FLAGS_CLOSE_ON_EXEC) != 0); 133cdf: c1 ee 0b shr $0xb,%esi 133ce2: 83 e6 01 and $0x1,%esi 133ce5: eb 6c jmp 133d53 <== ALWAYS TAKEN * 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 ) ) 133ce7: 83 3a 00 cmpl $0x0,(%edx) 133cea: 74 08 je 133cf4 <== ALWAYS TAKEN iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC; 133cec: 81 ce 00 08 00 00 or $0x800,%esi 133cf2: eb 06 jmp 133cfa <== ALWAYS TAKEN else iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC; 133cf4: 81 e6 ff f7 ff ff and $0xfffff7ff,%esi <== NOT EXECUTED 133cfa: 89 73 14 mov %esi,0x14(%ebx) 133cfd: 31 f6 xor %esi,%esi 133cff: eb 52 jmp 133d53 <== ALWAYS TAKEN break; case F_GETFL: /* more flags (cloexec) */ ret = rtems_libio_to_fcntl_flags( iop->flags ); 133d01: 83 ec 0c sub $0xc,%esp 133d04: 56 push %esi 133d05: e8 56 7c fd ff call 10b960 <== ALWAYS TAKEN 133d0a: 89 c6 mov %eax,%esi 133d0c: 83 c4 10 add $0x10,%esp 133d0f: eb 3e jmp 133d4f <== ALWAYS TAKEN break; case F_SETFL: flags = rtems_libio_fcntl_flags( va_arg( ap, int ) ); 133d11: 83 ec 0c sub $0xc,%esp 133d14: ff 32 pushl (%edx) 133d16: e8 1b 7e fd ff call 10bb36 <== ALWAYS TAKEN /* * XXX If we are turning on append, should we seek to the end? */ iop->flags = (iop->flags & ~mask) | (flags & mask); 133d1b: 25 01 02 00 00 and $0x201,%eax 133d20: 8b 53 14 mov 0x14(%ebx),%edx 133d23: 81 e2 fe fd ff ff and $0xfffffdfe,%edx 133d29: 09 d0 or %edx,%eax 133d2b: 89 43 14 mov %eax,0x14(%ebx) 133d2e: 31 f6 xor %esi,%esi 133d30: 83 c4 10 add $0x10,%esp 133d33: eb 1e jmp 133d53 <== ALWAYS TAKEN errno = ENOTSUP; ret = -1; break; case F_GETOWN: /* for sockets. */ errno = ENOTSUP; 133d35: e8 96 46 00 00 call 1383d0 <__errno> 133d3a: c7 00 86 00 00 00 movl $0x86,(%eax) 133d40: eb 33 jmp 133d75 <== ALWAYS TAKEN ret = -1; break; default: errno = EINVAL; 133d42: e8 89 46 00 00 call 1383d0 <__errno> 133d47: c7 00 16 00 00 00 movl $0x16,(%eax) 133d4d: eb 26 jmp 133d75 <== ALWAYS TAKEN /* * If we got this far successfully, then we give the optional * filesystem specific handler a chance to process this. */ if (ret >= 0) { 133d4f: 85 f6 test %esi,%esi 133d51: 78 25 js 133d78 <== ALWAYS TAKEN if (iop->handlers->fcntl_h) { 133d53: 8b 43 3c mov 0x3c(%ebx),%eax 133d56: 8b 40 30 mov 0x30(%eax),%eax 133d59: 85 c0 test %eax,%eax 133d5b: 74 1b je 133d78 <== ALWAYS TAKEN int err = (*iop->handlers->fcntl_h)( cmd, iop ); 133d5d: 52 push %edx 133d5e: 52 push %edx 133d5f: 53 push %ebx 133d60: ff 75 0c pushl 0xc(%ebp) 133d63: ff d0 call *%eax 133d65: 89 c3 mov %eax,%ebx if (err) { 133d67: 83 c4 10 add $0x10,%esp 133d6a: 85 c0 test %eax,%eax 133d6c: 74 0a je 133d78 <== NEVER TAKEN errno = err; 133d6e: e8 5d 46 00 00 call 1383d0 <__errno> <== NOT EXECUTED 133d73: 89 18 mov %ebx,(%eax) <== NOT EXECUTED 133d75: 83 ce ff or $0xffffffff,%esi va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; } 133d78: 89 f0 mov %esi,%eax 133d7a: 8d 65 f4 lea -0xc(%ebp),%esp 133d7d: 5b pop %ebx 133d7e: 5e pop %esi 133d7f: 5f pop %edi 133d80: c9 leave 133d81: c3 ret 00107fb8 : #include int fdatasync( int fd ) { 107fb8: 55 push %ebp 107fb9: 89 e5 mov %esp,%ebp 107fbb: 83 ec 08 sub $0x8,%esp 107fbe: 8b 45 08 mov 0x8(%ebp),%eax rtems_libio_t *iop; rtems_libio_check_fd( fd ); 107fc1: 3b 05 64 26 12 00 cmp 0x122664,%eax 107fc7: 73 11 jae 107fda iop = rtems_libio_iop( fd ); 107fc9: c1 e0 06 shl $0x6,%eax 107fcc: 03 05 18 65 12 00 add 0x126518,%eax rtems_libio_check_is_open(iop); 107fd2: 8b 50 14 mov 0x14(%eax),%edx 107fd5: f6 c6 01 test $0x1,%dh 107fd8: 75 0d jne 107fe7 <== NEVER TAKEN 107fda: e8 25 a3 00 00 call 112304 <__errno> 107fdf: c7 00 09 00 00 00 movl $0x9,(%eax) 107fe5: eb 2f jmp 108016 rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 107fe7: 80 e2 04 and $0x4,%dl 107fea: 75 0d jne 107ff9 107fec: e8 13 a3 00 00 call 112304 <__errno> 107ff1: c7 00 16 00 00 00 movl $0x16,(%eax) 107ff7: eb 1d jmp 108016 /* * Now process the fdatasync(). */ if ( !iop->handlers->fdatasync_h ) 107ff9: 8b 50 3c mov 0x3c(%eax),%edx 107ffc: 8b 52 2c mov 0x2c(%edx),%edx 107fff: 85 d2 test %edx,%edx 108001: 75 0d jne 108010 rtems_set_errno_and_return_minus_one( ENOTSUP ); 108003: e8 fc a2 00 00 call 112304 <__errno> 108008: c7 00 86 00 00 00 movl $0x86,(%eax) 10800e: eb 06 jmp 108016 <== ALWAYS TAKEN return (*iop->handlers->fdatasync_h)( iop ); 108010: 89 45 08 mov %eax,0x8(%ebp) } 108013: c9 leave */ if ( !iop->handlers->fdatasync_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->fdatasync_h)( iop ); 108014: ff e2 jmp *%edx } 108016: 83 c8 ff or $0xffffffff,%eax 108019: c9 leave 10801a: c3 ret 0010f284 : */ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { 10f284: 55 push %ebp 10f285: 89 e5 mov %esp,%ebp 10f287: 57 push %edi 10f288: 56 push %esi 10f289: 53 push %ebx 10f28a: 83 ec 30 sub $0x30,%esp ) { pipe_control_t *pipe; int err = 0; if (rtems_semaphore_obtain(rtems_pipe_semaphore, 10f28d: 6a 00 push $0x0 10f28f: 6a 00 push $0x0 10f291: ff 35 18 35 12 00 pushl 0x123518 10f297: e8 90 ac ff ff call 109f2c 10f29c: 89 c2 mov %eax,%edx 10f29e: 83 c4 10 add $0x10,%esp 10f2a1: bf fc ff ff ff mov $0xfffffffc,%edi 10f2a6: 85 c0 test %eax,%eax 10f2a8: 0f 85 f3 02 00 00 jne 10f5a1 <== NEVER TAKEN RTEMS_WAIT, RTEMS_NO_TIMEOUT) != RTEMS_SUCCESSFUL) return -EINTR; pipe = *pipep; 10f2ae: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 10f2b1: 8b 30 mov (%eax),%esi <== NOT EXECUTED if (pipe == NULL) { 10f2b3: 85 f6 test %esi,%esi <== NOT EXECUTED 10f2b5: 0f 85 13 01 00 00 jne 10f3ce <== NOT EXECUTED { static char c = 'a'; pipe_control_t *pipe; int err = -ENOMEM; pipe = malloc(sizeof(pipe_control_t)); 10f2bb: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10f2be: 6a 34 push $0x34 <== NOT EXECUTED 10f2c0: 89 55 d4 mov %edx,-0x2c(%ebp) <== NOT EXECUTED 10f2c3: e8 94 80 ff ff call 10735c <== NOT EXECUTED 10f2c8: 89 c3 mov %eax,%ebx <== NOT EXECUTED 10f2ca: 89 c6 mov %eax,%esi <== NOT EXECUTED if (pipe == NULL) 10f2cc: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10f2cf: 66 bf f4 ff mov $0xfff4,%di <== NOT EXECUTED 10f2d3: 85 c0 test %eax,%eax <== NOT EXECUTED 10f2d5: 8b 55 d4 mov -0x2c(%ebp),%edx <== NOT EXECUTED 10f2d8: 0f 84 24 01 00 00 je 10f402 <== NOT EXECUTED return err; memset(pipe, 0, sizeof(pipe_control_t)); 10f2de: b9 0d 00 00 00 mov $0xd,%ecx <== NOT EXECUTED 10f2e3: 89 c7 mov %eax,%edi <== NOT EXECUTED 10f2e5: 89 d0 mov %edx,%eax <== NOT EXECUTED 10f2e7: f3 ab rep stos %eax,%es:(%edi) <== NOT EXECUTED pipe->Size = PIPE_BUF; 10f2e9: c7 43 04 00 02 00 00 movl $0x200,0x4(%ebx) <== NOT EXECUTED pipe->Buffer = malloc(pipe->Size); 10f2f0: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10f2f3: 68 00 02 00 00 push $0x200 <== NOT EXECUTED 10f2f8: e8 5f 80 ff ff call 10735c <== NOT EXECUTED 10f2fd: 89 03 mov %eax,(%ebx) <== NOT EXECUTED if (! pipe->Buffer) 10f2ff: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10f302: bf f4 ff ff ff mov $0xfffffff4,%edi <== NOT EXECUTED 10f307: 85 c0 test %eax,%eax <== NOT EXECUTED 10f309: 0f 84 b1 00 00 00 je 10f3c0 <== NOT EXECUTED goto err_buf; err = -EINTR; if (rtems_barrier_create( 10f30f: 8d 43 2c lea 0x2c(%ebx),%eax <== NOT EXECUTED 10f312: 50 push %eax <== NOT EXECUTED 10f313: 6a 00 push $0x0 <== NOT EXECUTED 10f315: 6a 00 push $0x0 <== NOT EXECUTED 10f317: 0f be 05 c8 16 12 00 movsbl 0x1216c8,%eax <== NOT EXECUTED 10f31e: 0d 00 72 49 50 or $0x50497200,%eax <== NOT EXECUTED 10f323: 50 push %eax <== NOT EXECUTED 10f324: e8 0b 05 00 00 call 10f834 <== NOT EXECUTED 10f329: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10f32c: 85 c0 test %eax,%eax <== NOT EXECUTED 10f32e: 75 7e jne 10f3ae <== NOT EXECUTED rtems_build_name ('P', 'I', 'r', c), RTEMS_BARRIER_MANUAL_RELEASE, 0, &pipe->readBarrier) != RTEMS_SUCCESSFUL) goto err_rbar; if (rtems_barrier_create( 10f330: 8d 43 30 lea 0x30(%ebx),%eax <== NOT EXECUTED 10f333: 50 push %eax <== NOT EXECUTED 10f334: 6a 00 push $0x0 <== NOT EXECUTED 10f336: 6a 00 push $0x0 <== NOT EXECUTED 10f338: 0f be 05 c8 16 12 00 movsbl 0x1216c8,%eax <== NOT EXECUTED 10f33f: 0d 00 77 49 50 or $0x50497700,%eax <== NOT EXECUTED 10f344: 50 push %eax <== NOT EXECUTED 10f345: e8 ea 04 00 00 call 10f834 <== NOT EXECUTED 10f34a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10f34d: 85 c0 test %eax,%eax <== NOT EXECUTED 10f34f: 75 4f jne 10f3a0 <== NOT EXECUTED rtems_build_name ('P', 'I', 'w', c), RTEMS_BARRIER_MANUAL_RELEASE, 0, &pipe->writeBarrier) != RTEMS_SUCCESSFUL) goto err_wbar; if (rtems_semaphore_create( 10f351: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10f354: 8d 43 28 lea 0x28(%ebx),%eax <== NOT EXECUTED 10f357: 50 push %eax <== NOT EXECUTED 10f358: 6a 00 push $0x0 <== NOT EXECUTED 10f35a: 6a 10 push $0x10 <== NOT EXECUTED 10f35c: 6a 01 push $0x1 <== NOT EXECUTED 10f35e: 0f be 05 c8 16 12 00 movsbl 0x1216c8,%eax <== NOT EXECUTED 10f365: 0d 00 73 49 50 or $0x50497300,%eax <== NOT EXECUTED 10f36a: 50 push %eax <== NOT EXECUTED 10f36b: e8 90 a9 ff ff call 109d00 <== NOT EXECUTED 10f370: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 10f373: 85 c0 test %eax,%eax <== NOT EXECUTED 10f375: 75 1b jne 10f392 <== NOT EXECUTED #ifdef RTEMS_POSIX_API pipe_interruptible(pipe); #endif *pipep = pipe; if (c ++ == 'z') 10f377: a0 c8 16 12 00 mov 0x1216c8,%al <== NOT EXECUTED 10f37c: 8d 50 01 lea 0x1(%eax),%edx <== NOT EXECUTED 10f37f: 88 15 c8 16 12 00 mov %dl,0x1216c8 <== NOT EXECUTED 10f385: 3c 7a cmp $0x7a,%al <== NOT EXECUTED 10f387: 75 45 jne 10f3ce <== NOT EXECUTED c = 'a'; 10f389: c6 05 c8 16 12 00 61 movb $0x61,0x1216c8 <== NOT EXECUTED 10f390: eb 3c jmp 10f3ce <== NOT EXECUTED return 0; err_sem: rtems_barrier_delete(pipe->writeBarrier); 10f392: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10f395: ff 73 30 pushl 0x30(%ebx) <== NOT EXECUTED 10f398: e8 4f 05 00 00 call 10f8ec <== NOT EXECUTED 10f39d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED err_wbar: rtems_barrier_delete(pipe->readBarrier); 10f3a0: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10f3a3: ff 73 2c pushl 0x2c(%ebx) <== NOT EXECUTED 10f3a6: e8 41 05 00 00 call 10f8ec <== NOT EXECUTED 10f3ab: 83 c4 10 add $0x10,%esp <== NOT EXECUTED err_rbar: free(pipe->Buffer); 10f3ae: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10f3b1: ff 33 pushl (%ebx) <== NOT EXECUTED 10f3b3: e8 78 7d ff ff call 107130 <== NOT EXECUTED 10f3b8: bf fc ff ff ff mov $0xfffffffc,%edi <== NOT EXECUTED 10f3bd: 83 c4 10 add $0x10,%esp <== NOT EXECUTED err_buf: free(pipe); 10f3c0: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10f3c3: 53 push %ebx <== NOT EXECUTED 10f3c4: e8 67 7d ff ff call 107130 <== NOT EXECUTED 10f3c9: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10f3cc: eb 34 jmp 10f402 <== NOT EXECUTED err = pipe_alloc(&pipe); if (err) goto out; } if (! PIPE_LOCK(pipe)) 10f3ce: 57 push %edi <== NOT EXECUTED 10f3cf: 6a 00 push $0x0 <== NOT EXECUTED 10f3d1: 6a 00 push $0x0 <== NOT EXECUTED 10f3d3: ff 76 28 pushl 0x28(%esi) <== NOT EXECUTED 10f3d6: e8 51 ab ff ff call 109f2c <== NOT EXECUTED 10f3db: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10f3de: 83 f8 01 cmp $0x1,%eax <== NOT EXECUTED 10f3e1: 19 ff sbb %edi,%edi <== NOT EXECUTED 10f3e3: f7 d7 not %edi <== NOT EXECUTED 10f3e5: 83 e7 fc and $0xfffffffc,%edi <== NOT EXECUTED err = -EINTR; if (*pipep == NULL) { 10f3e8: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 10f3eb: 83 38 00 cmpl $0x0,(%eax) <== NOT EXECUTED 10f3ee: 75 12 jne 10f402 <== NOT EXECUTED if (err) 10f3f0: 85 ff test %edi,%edi <== NOT EXECUTED 10f3f2: 74 09 je 10f3fd <== NOT EXECUTED pipe_free(pipe); 10f3f4: 89 f0 mov %esi,%eax <== NOT EXECUTED 10f3f6: e8 7e fd ff ff call 10f179 <== NOT EXECUTED 10f3fb: eb 05 jmp 10f402 <== NOT EXECUTED else *pipep = pipe; 10f3fd: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 10f400: 89 30 mov %esi,(%eax) <== NOT EXECUTED } out: rtems_semaphore_release(rtems_pipe_semaphore); 10f402: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10f405: ff 35 18 35 12 00 pushl 0x123518 <== NOT EXECUTED 10f40b: e8 08 ac ff ff call 10a018 <== NOT EXECUTED pipe_control_t *pipe; uint prevCounter; int err; err = pipe_new(pipep); if (err) 10f410: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10f413: 85 ff test %edi,%edi <== NOT EXECUTED 10f415: 0f 85 86 01 00 00 jne 10f5a1 <== NOT EXECUTED return err; pipe = *pipep; 10f41b: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 10f41e: 8b 18 mov (%eax),%ebx <== NOT EXECUTED switch (LIBIO_ACCMODE(iop)) { 10f420: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED 10f423: 8b 50 14 mov 0x14(%eax),%edx <== NOT EXECUTED 10f426: 89 d0 mov %edx,%eax <== NOT EXECUTED 10f428: 83 e0 06 and $0x6,%eax <== NOT EXECUTED 10f42b: 83 f8 04 cmp $0x4,%eax <== NOT EXECUTED 10f42e: 0f 84 91 00 00 00 je 10f4c5 <== NOT EXECUTED 10f434: 83 f8 06 cmp $0x6,%eax <== NOT EXECUTED 10f437: 0f 84 00 01 00 00 je 10f53d <== NOT EXECUTED 10f43d: 83 f8 02 cmp $0x2,%eax <== NOT EXECUTED 10f440: 0f 85 39 01 00 00 jne 10f57f <== NOT EXECUTED case LIBIO_FLAGS_READ: pipe->readerCounter ++; 10f446: ff 43 20 incl 0x20(%ebx) <== NOT EXECUTED if (pipe->Readers ++ == 0) 10f449: 8b 43 10 mov 0x10(%ebx),%eax <== NOT EXECUTED 10f44c: 8d 50 01 lea 0x1(%eax),%edx <== NOT EXECUTED 10f44f: 89 53 10 mov %edx,0x10(%ebx) <== NOT EXECUTED 10f452: 85 c0 test %eax,%eax <== NOT EXECUTED 10f454: 75 11 jne 10f467 <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); 10f456: 56 push %esi <== NOT EXECUTED 10f457: 56 push %esi <== NOT EXECUTED 10f458: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED 10f45b: 50 push %eax <== NOT EXECUTED 10f45c: ff 73 30 pushl 0x30(%ebx) <== NOT EXECUTED 10f45f: e8 e8 04 00 00 call 10f94c <== NOT EXECUTED 10f464: 83 c4 10 add $0x10,%esp <== NOT EXECUTED if (pipe->Writers == 0) { 10f467: 83 7b 14 00 cmpl $0x0,0x14(%ebx) <== NOT EXECUTED 10f46b: 0f 85 0e 01 00 00 jne 10f57f <== NOT EXECUTED /* Not an error */ if (LIBIO_NODELAY(iop)) 10f471: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED 10f474: f6 40 14 01 testb $0x1,0x14(%eax) <== NOT EXECUTED 10f478: 0f 85 01 01 00 00 jne 10f57f <== NOT EXECUTED break; prevCounter = pipe->writerCounter; 10f47e: 8b 73 24 mov 0x24(%ebx),%esi <== NOT EXECUTED err = -EINTR; /* Wait until a writer opens the pipe */ do { PIPE_UNLOCK(pipe); 10f481: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10f484: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED 10f487: e8 8c ab ff ff call 10a018 <== NOT EXECUTED if (! PIPE_READWAIT(pipe)) 10f48c: 5a pop %edx <== NOT EXECUTED 10f48d: 59 pop %ecx <== NOT EXECUTED 10f48e: 6a 00 push $0x0 <== NOT EXECUTED 10f490: ff 73 2c pushl 0x2c(%ebx) <== NOT EXECUTED 10f493: e8 0c 05 00 00 call 10f9a4 <== NOT EXECUTED 10f498: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10f49b: 85 c0 test %eax,%eax <== NOT EXECUTED 10f49d: 0f 85 e9 00 00 00 jne 10f58c <== NOT EXECUTED goto out_error; if (! PIPE_LOCK(pipe)) 10f4a3: 50 push %eax <== NOT EXECUTED 10f4a4: 6a 00 push $0x0 <== NOT EXECUTED 10f4a6: 6a 00 push $0x0 <== NOT EXECUTED 10f4a8: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED 10f4ab: e8 7c aa ff ff call 109f2c <== NOT EXECUTED 10f4b0: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10f4b3: 85 c0 test %eax,%eax <== NOT EXECUTED 10f4b5: 0f 85 d1 00 00 00 jne 10f58c <== NOT EXECUTED goto out_error; } while (prevCounter == pipe->writerCounter); 10f4bb: 3b 73 24 cmp 0x24(%ebx),%esi <== NOT EXECUTED 10f4be: 74 c1 je 10f481 <== NOT EXECUTED 10f4c0: e9 ba 00 00 00 jmp 10f57f <== NOT EXECUTED } break; case LIBIO_FLAGS_WRITE: if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { 10f4c5: 83 7b 10 00 cmpl $0x0,0x10(%ebx) <== NOT EXECUTED 10f4c9: 75 0f jne 10f4da <== NOT EXECUTED 10f4cb: 80 e2 01 and $0x1,%dl <== NOT EXECUTED 10f4ce: 74 0a je 10f4da <== NOT EXECUTED 10f4d0: bf fa ff ff ff mov $0xfffffffa,%edi <== NOT EXECUTED 10f4d5: e9 b7 00 00 00 jmp 10f591 <== NOT EXECUTED err = -ENXIO; goto out_error; } pipe->writerCounter ++; 10f4da: ff 43 24 incl 0x24(%ebx) <== NOT EXECUTED if (pipe->Writers ++ == 0) 10f4dd: 8b 43 14 mov 0x14(%ebx),%eax <== NOT EXECUTED 10f4e0: 8d 50 01 lea 0x1(%eax),%edx <== NOT EXECUTED 10f4e3: 89 53 14 mov %edx,0x14(%ebx) <== NOT EXECUTED 10f4e6: 85 c0 test %eax,%eax <== NOT EXECUTED 10f4e8: 75 11 jne 10f4fb <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); 10f4ea: 56 push %esi <== NOT EXECUTED 10f4eb: 56 push %esi <== NOT EXECUTED 10f4ec: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED 10f4ef: 50 push %eax <== NOT EXECUTED 10f4f0: ff 73 2c pushl 0x2c(%ebx) <== NOT EXECUTED 10f4f3: e8 54 04 00 00 call 10f94c <== NOT EXECUTED 10f4f8: 83 c4 10 add $0x10,%esp <== NOT EXECUTED if (pipe->Readers == 0) { 10f4fb: 83 7b 10 00 cmpl $0x0,0x10(%ebx) <== NOT EXECUTED 10f4ff: 75 7e jne 10f57f <== NOT EXECUTED prevCounter = pipe->readerCounter; 10f501: 8b 73 20 mov 0x20(%ebx),%esi <== NOT EXECUTED err = -EINTR; do { PIPE_UNLOCK(pipe); 10f504: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10f507: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED 10f50a: e8 09 ab ff ff call 10a018 <== NOT EXECUTED if (! PIPE_WRITEWAIT(pipe)) 10f50f: 5a pop %edx <== NOT EXECUTED 10f510: 59 pop %ecx <== NOT EXECUTED 10f511: 6a 00 push $0x0 <== NOT EXECUTED 10f513: ff 73 30 pushl 0x30(%ebx) <== NOT EXECUTED 10f516: e8 89 04 00 00 call 10f9a4 <== NOT EXECUTED 10f51b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10f51e: 85 c0 test %eax,%eax <== NOT EXECUTED 10f520: 75 6a jne 10f58c <== NOT EXECUTED goto out_error; if (! PIPE_LOCK(pipe)) 10f522: 50 push %eax <== NOT EXECUTED 10f523: 6a 00 push $0x0 <== NOT EXECUTED 10f525: 6a 00 push $0x0 <== NOT EXECUTED 10f527: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED 10f52a: e8 fd a9 ff ff call 109f2c <== NOT EXECUTED 10f52f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10f532: 85 c0 test %eax,%eax <== NOT EXECUTED 10f534: 75 56 jne 10f58c <== NOT EXECUTED goto out_error; } while (prevCounter == pipe->readerCounter); 10f536: 3b 73 20 cmp 0x20(%ebx),%esi <== NOT EXECUTED 10f539: 74 c9 je 10f504 <== NOT EXECUTED 10f53b: eb 42 jmp 10f57f <== NOT EXECUTED } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; 10f53d: ff 43 20 incl 0x20(%ebx) <== NOT EXECUTED if (pipe->Readers ++ == 0) 10f540: 8b 43 10 mov 0x10(%ebx),%eax <== NOT EXECUTED 10f543: 8d 50 01 lea 0x1(%eax),%edx <== NOT EXECUTED 10f546: 89 53 10 mov %edx,0x10(%ebx) <== NOT EXECUTED 10f549: 85 c0 test %eax,%eax <== NOT EXECUTED 10f54b: 75 11 jne 10f55e <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); 10f54d: 56 push %esi <== NOT EXECUTED 10f54e: 56 push %esi <== NOT EXECUTED 10f54f: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED 10f552: 50 push %eax <== NOT EXECUTED 10f553: ff 73 30 pushl 0x30(%ebx) <== NOT EXECUTED 10f556: e8 f1 03 00 00 call 10f94c <== NOT EXECUTED 10f55b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED pipe->writerCounter ++; 10f55e: ff 43 24 incl 0x24(%ebx) <== NOT EXECUTED if (pipe->Writers ++ == 0) 10f561: 8b 43 14 mov 0x14(%ebx),%eax <== NOT EXECUTED 10f564: 8d 50 01 lea 0x1(%eax),%edx <== NOT EXECUTED 10f567: 89 53 14 mov %edx,0x14(%ebx) <== NOT EXECUTED 10f56a: 85 c0 test %eax,%eax <== NOT EXECUTED 10f56c: 75 11 jne 10f57f <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); 10f56e: 51 push %ecx <== NOT EXECUTED 10f56f: 51 push %ecx <== NOT EXECUTED 10f570: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED 10f573: 50 push %eax <== NOT EXECUTED 10f574: ff 73 2c pushl 0x2c(%ebx) <== NOT EXECUTED 10f577: e8 d0 03 00 00 call 10f94c <== NOT EXECUTED 10f57c: 83 c4 10 add $0x10,%esp <== NOT EXECUTED break; } PIPE_UNLOCK(pipe); 10f57f: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10f582: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED 10f585: e8 8e aa ff ff call 10a018 <== NOT EXECUTED 10f58a: eb 12 jmp 10f59e <== NOT EXECUTED return 0; 10f58c: bf fc ff ff ff mov $0xfffffffc,%edi <== NOT EXECUTED out_error: pipe_release(pipep, iop); 10f591: 52 push %edx <== NOT EXECUTED 10f592: 52 push %edx <== NOT EXECUTED 10f593: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED 10f596: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED 10f599: e8 16 fc ff ff call 10f1b4 <== NOT EXECUTED return err; 10f59e: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } 10f5a1: 89 f8 mov %edi,%eax 10f5a3: 8d 65 f4 lea -0xc(%ebp),%esp 10f5a6: 5b pop %ebx 10f5a7: 5e pop %esi 10f5a8: 5f pop %edi 10f5a9: c9 leave 10f5aa: c3 ret 0010e6ce : bool file_systems_below_this_mountpoint( const char *path __attribute__((unused)), rtems_filesystem_location_info_t *fs_root_loc, rtems_filesystem_mount_table_entry_t *fs_to_unmount __attribute__((unused)) ) { 10e6ce: 55 push %ebp <== NOT EXECUTED 10e6cf: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10e6d1: 8b 55 0c mov 0xc(%ebp),%edx <== NOT EXECUTED /* * Search the mount table for any mount entries referencing this * mount entry. */ for ( the_node = rtems_filesystem_mount_table_control.first; 10e6d4: a1 34 34 16 00 mov 0x163434,%eax <== NOT EXECUTED 10e6d9: eb 0e jmp 10e6e9 <== NOT EXECUTED !rtems_chain_is_tail( &rtems_filesystem_mount_table_control, the_node ); the_node = the_node->next ) { the_mount_entry = ( rtems_filesystem_mount_table_entry_t * )the_node; if (the_mount_entry->mt_point_node.mt_entry == fs_root_loc->mt_entry ) { 10e6db: 8b 48 18 mov 0x18(%eax),%ecx <== NOT EXECUTED 10e6de: 3b 4a 10 cmp 0x10(%edx),%ecx <== NOT EXECUTED 10e6e1: 75 04 jne 10e6e7 <== NOT EXECUTED 10e6e3: b0 01 mov $0x1,%al <== NOT EXECUTED 10e6e5: eb 0b jmp 10e6f2 <== NOT EXECUTED * mount entry. */ for ( the_node = rtems_filesystem_mount_table_control.first; !rtems_chain_is_tail( &rtems_filesystem_mount_table_control, the_node ); the_node = the_node->next ) { 10e6e7: 8b 00 mov (%eax),%eax <== NOT EXECUTED 10e6e9: 3d 38 34 16 00 cmp $0x163438,%eax <== NOT EXECUTED 10e6ee: 75 eb jne 10e6db <== NOT EXECUTED 10e6f0: 31 c0 xor %eax,%eax <== NOT EXECUTED return true; } } return false; } 10e6f2: c9 leave <== NOT EXECUTED 10e6f3: c3 ret <== NOT EXECUTED 0010801c : long fpathconf( int fd, int name ) { 10801c: 55 push %ebp 10801d: 89 e5 mov %esp,%ebp 10801f: 83 ec 08 sub $0x8,%esp 108022: 8b 45 08 mov 0x8(%ebp),%eax 108025: 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); 108028: 3b 05 64 26 12 00 cmp 0x122664,%eax 10802e: 73 11 jae 108041 iop = rtems_libio_iop(fd); 108030: c1 e0 06 shl $0x6,%eax 108033: 03 05 18 65 12 00 add 0x126518,%eax rtems_libio_check_is_open(iop); 108039: 8b 48 14 mov 0x14(%eax),%ecx 10803c: f6 c5 01 test $0x1,%ch 10803f: 75 0d jne 10804e <== NEVER TAKEN 108041: e8 be a2 00 00 call 112304 <__errno> 108046: c7 00 09 00 00 00 movl $0x9,(%eax) 10804c: eb 5b jmp 1080a9 <== ALWAYS TAKEN rtems_libio_check_permissions(iop, LIBIO_FLAGS_READ); 10804e: 80 e1 02 and $0x2,%cl 108051: 74 4b je 10809e <== ALWAYS TAKEN /* * Now process the information request. */ the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options; 108053: 8b 40 28 mov 0x28(%eax),%eax switch ( name ) { 108056: 83 fa 0b cmp $0xb,%edx 108059: 77 43 ja 10809e 10805b: ff 24 95 3c 00 12 00 jmp *0x12003c(,%edx,4) case _PC_LINK_MAX: return_value = the_limits->link_max; 108062: 8b 40 38 mov 0x38(%eax),%eax break; 108065: eb 45 jmp 1080ac <== ALWAYS TAKEN case _PC_MAX_CANON: return_value = the_limits->max_canon; 108067: 8b 40 3c mov 0x3c(%eax),%eax break; 10806a: eb 40 jmp 1080ac <== ALWAYS TAKEN case _PC_MAX_INPUT: return_value = the_limits->max_input; 10806c: 8b 40 40 mov 0x40(%eax),%eax break; 10806f: eb 3b jmp 1080ac <== ALWAYS TAKEN case _PC_NAME_MAX: return_value = the_limits->name_max; 108071: 8b 40 44 mov 0x44(%eax),%eax break; 108074: eb 36 jmp 1080ac <== ALWAYS TAKEN case _PC_PATH_MAX: return_value = the_limits->path_max; 108076: 8b 40 48 mov 0x48(%eax),%eax break; 108079: eb 31 jmp 1080ac <== ALWAYS TAKEN case _PC_PIPE_BUF: return_value = the_limits->pipe_buf; 10807b: 8b 40 4c mov 0x4c(%eax),%eax break; 10807e: eb 2c jmp 1080ac <== ALWAYS TAKEN case _PC_CHOWN_RESTRICTED: return_value = the_limits->posix_chown_restrictions; 108080: 8b 40 54 mov 0x54(%eax),%eax break; 108083: eb 27 jmp 1080ac <== ALWAYS TAKEN case _PC_NO_TRUNC: return_value = the_limits->posix_no_trunc; 108085: 8b 40 58 mov 0x58(%eax),%eax break; 108088: eb 22 jmp 1080ac <== ALWAYS TAKEN case _PC_VDISABLE: return_value = the_limits->posix_vdisable; 10808a: 8b 40 64 mov 0x64(%eax),%eax break; 10808d: eb 1d jmp 1080ac <== ALWAYS TAKEN case _PC_ASYNC_IO: return_value = the_limits->posix_async_io; 10808f: 8b 40 50 mov 0x50(%eax),%eax break; 108092: eb 18 jmp 1080ac <== ALWAYS TAKEN case _PC_PRIO_IO: return_value = the_limits->posix_prio_io; 108094: 8b 40 5c mov 0x5c(%eax),%eax break; 108097: eb 13 jmp 1080ac <== ALWAYS TAKEN case _PC_SYNC_IO: return_value = the_limits->posix_sync_io; 108099: 8b 40 60 mov 0x60(%eax),%eax break; 10809c: eb 0e jmp 1080ac <== ALWAYS TAKEN default: rtems_set_errno_and_return_minus_one( EINVAL ); 10809e: e8 61 a2 00 00 call 112304 <__errno> 1080a3: c7 00 16 00 00 00 movl $0x16,(%eax) 1080a9: 83 c8 ff or $0xffffffff,%eax break; } return return_value; } 1080ac: c9 leave 1080ad: c3 ret 00107130 : void free( void *ptr ) { MSBUMP(free_calls, 1); 107130: 55 push %ebp 107131: 89 e5 mov %esp,%ebp 107133: 53 push %ebx 107134: 83 ec 04 sub $0x4,%esp 107137: 8b 5d 08 mov 0x8(%ebp),%ebx 10713a: ff 05 3c 37 12 00 incl 0x12373c if ( !ptr ) 107140: 85 db test %ebx,%ebx 107142: 74 5f je 1071a3 /* * Do not attempt to free memory if in a critical section or ISR. */ if ( _System_state_Is_up(_System_state_Get()) && 107144: 83 3d 0c 3a 12 00 03 cmpl $0x3,0x123a0c 10714b: 75 15 jne 107162 <== ALWAYS TAKEN 10714d: e8 e2 00 00 00 call 107234 <== ALWAYS TAKEN 107152: 84 c0 test %al,%al 107154: 75 0c jne 107162 <== NEVER TAKEN !malloc_is_system_state_OK() ) { malloc_deferred_free(ptr); 107156: 89 5d 08 mov %ebx,0x8(%ebp) <== NOT EXECUTED RTEMS_Malloc_Heap->area_begin, RTEMS_Malloc_Heap->area_end ); } } 107159: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 10715c: c9 leave <== NOT EXECUTED * Do not attempt to free memory if in a critical section or ISR. */ if ( _System_state_Is_up(_System_state_Get()) && !malloc_is_system_state_OK() ) { malloc_deferred_free(ptr); 10715d: e9 10 01 00 00 jmp 107272 <== NOT EXECUTED #endif /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) 107162: a1 d0 1b 12 00 mov 0x121bd0,%eax 107167: 85 c0 test %eax,%eax 107169: 74 0a je 107175 <== NEVER TAKEN (*rtems_malloc_statistics_helpers->at_free)(ptr); 10716b: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10716e: 53 push %ebx <== NOT EXECUTED 10716f: ff 50 08 call *0x8(%eax) <== NOT EXECUTED 107172: 83 c4 10 add $0x10,%esp <== NOT EXECUTED if ( !_Protected_heap_Free( RTEMS_Malloc_Heap, ptr ) ) { 107175: 50 push %eax 107176: 50 push %eax 107177: 53 push %ebx 107178: ff 35 70 f8 11 00 pushl 0x11f870 10717e: e8 69 44 00 00 call 10b5ec <_Protected_heap_Free> 107183: 83 c4 10 add $0x10,%esp 107186: 84 c0 test %al,%al 107188: 75 19 jne 1071a3 <== NEVER TAKEN printk( "Program heap: free of bad pointer %p -- range %p - %p \n", ptr, RTEMS_Malloc_Heap->area_begin, RTEMS_Malloc_Heap->area_end 10718a: a1 70 f8 11 00 mov 0x11f870,%eax <== NOT EXECUTED */ if ( rtems_malloc_statistics_helpers ) (*rtems_malloc_statistics_helpers->at_free)(ptr); if ( !_Protected_heap_Free( RTEMS_Malloc_Heap, ptr ) ) { printk( "Program heap: free of bad pointer %p -- range %p - %p \n", 10718f: ff 70 1c pushl 0x1c(%eax) <== NOT EXECUTED 107192: ff 70 18 pushl 0x18(%eax) <== NOT EXECUTED 107195: 53 push %ebx <== NOT EXECUTED 107196: 68 5e d4 11 00 push $0x11d45e <== NOT EXECUTED 10719b: e8 94 0b 00 00 call 107d34 <== NOT EXECUTED 1071a0: 83 c4 10 add $0x10,%esp <== NOT EXECUTED RTEMS_Malloc_Heap->area_begin, RTEMS_Malloc_Heap->area_end ); } } 1071a3: 8b 5d fc mov -0x4(%ebp),%ebx 1071a6: c9 leave 1071a7: c3 ret 001263f4 : * NOTE: this must be called with * thread dispatching disabled! */ static void free_user_env(void *venv) { 1263f4: 55 push %ebp <== NOT EXECUTED 1263f5: 89 e5 mov %esp,%ebp <== NOT EXECUTED 1263f7: 53 push %ebx <== NOT EXECUTED 1263f8: 83 ec 04 sub $0x4,%esp <== NOT EXECUTED 1263fb: 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 1263fe: 81 fb 4c 34 16 00 cmp $0x16344c,%ebx <== NOT EXECUTED 126404: 74 40 je 126446 <== NOT EXECUTED #ifdef HAVE_USERENV_REFCNT && --env->refcnt <= 0 #endif ) { rtems_filesystem_freenode( &env->current_directory); 126406: 8b 43 10 mov 0x10(%ebx),%eax <== NOT EXECUTED 126409: 85 c0 test %eax,%eax <== NOT EXECUTED 12640b: 74 13 je 126420 <== NOT EXECUTED 12640d: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 126410: 85 c0 test %eax,%eax <== NOT EXECUTED 126412: 74 0c je 126420 <== NOT EXECUTED 126414: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 126417: 8d 53 04 lea 0x4(%ebx),%edx <== NOT EXECUTED 12641a: 52 push %edx <== NOT EXECUTED 12641b: ff d0 call *%eax <== NOT EXECUTED 12641d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_filesystem_freenode( &env->root_directory); 126420: 8b 43 24 mov 0x24(%ebx),%eax <== NOT EXECUTED 126423: 85 c0 test %eax,%eax <== NOT EXECUTED 126425: 74 13 je 12643a <== NOT EXECUTED 126427: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 12642a: 85 c0 test %eax,%eax <== NOT EXECUTED 12642c: 74 0c je 12643a <== NOT EXECUTED 12642e: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 126431: 8d 53 18 lea 0x18(%ebx),%edx <== NOT EXECUTED 126434: 52 push %edx <== NOT EXECUTED 126435: ff d0 call *%eax <== NOT EXECUTED 126437: 83 c4 10 add $0x10,%esp <== NOT EXECUTED free(env); 12643a: 89 5d 08 mov %ebx,0x8(%ebp) <== NOT EXECUTED } } 12643d: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 126440: c9 leave <== NOT EXECUTED && --env->refcnt <= 0 #endif ) { rtems_filesystem_freenode( &env->current_directory); rtems_filesystem_freenode( &env->root_directory); free(env); 126441: e9 7e 53 fe ff jmp 10b7c4 <== NOT EXECUTED } } 126446: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 126449: c9 leave <== NOT EXECUTED 12644a: c3 ret <== NOT EXECUTED 0011b4e0 : int fstat( int fd, struct stat *sbuf ) { 11b4e0: 55 push %ebp 11b4e1: 89 e5 mov %esp,%ebp 11b4e3: 57 push %edi 11b4e4: 53 push %ebx 11b4e5: 8b 55 08 mov 0x8(%ebp),%edx 11b4e8: 8b 5d 0c mov 0xc(%ebp),%ebx /* * Check to see if we were passed a valid pointer. */ if ( !sbuf ) 11b4eb: 85 db test %ebx,%ebx 11b4ed: 75 0d jne 11b4fc rtems_set_errno_and_return_minus_one( EFAULT ); 11b4ef: e8 5c 4d ff ff call 110250 <__errno> 11b4f4: c7 00 0e 00 00 00 movl $0xe,(%eax) 11b4fa: eb 5d jmp 11b559 <== ALWAYS TAKEN /* * Now process the stat() request. */ iop = rtems_libio_iop( fd ); 11b4fc: 3b 15 64 f8 11 00 cmp 0x11f864,%edx 11b502: 73 16 jae 11b51a 11b504: c1 e2 06 shl $0x6,%edx 11b507: 03 15 18 37 12 00 add 0x123718,%edx rtems_libio_check_fd( fd ); rtems_libio_check_is_open(iop); 11b50d: f6 42 15 01 testb $0x1,0x15(%edx) 11b511: 74 07 je 11b51a <== ALWAYS TAKEN if ( !iop->handlers ) 11b513: 8b 42 3c mov 0x3c(%edx),%eax 11b516: 85 c0 test %eax,%eax 11b518: 75 0d jne 11b527 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EBADF ); 11b51a: e8 31 4d ff ff call 110250 <__errno> 11b51f: c7 00 09 00 00 00 movl $0x9,(%eax) 11b525: eb 32 jmp 11b559 <== ALWAYS TAKEN if ( !iop->handlers->fstat_h ) 11b527: 83 78 18 00 cmpl $0x0,0x18(%eax) 11b52b: 75 0d jne 11b53a <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); 11b52d: e8 1e 4d ff ff call 110250 <__errno> <== NOT EXECUTED 11b532: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 11b538: eb 1f jmp 11b559 <== NOT EXECUTED /* * Zero out the stat structure so the various support * versions of stat don't have to. */ memset( sbuf, 0, sizeof(struct stat) ); 11b53a: b9 11 00 00 00 mov $0x11,%ecx 11b53f: 31 c0 xor %eax,%eax 11b541: 89 df mov %ebx,%edi 11b543: f3 ab rep stos %eax,%es:(%edi) return (*iop->handlers->fstat_h)( &iop->pathinfo, sbuf ); 11b545: 8b 42 3c mov 0x3c(%edx),%eax 11b548: 89 5d 0c mov %ebx,0xc(%ebp) 11b54b: 83 c2 18 add $0x18,%edx 11b54e: 89 55 08 mov %edx,0x8(%ebp) 11b551: 8b 40 18 mov 0x18(%eax),%eax } 11b554: 5b pop %ebx 11b555: 5f pop %edi 11b556: c9 leave * Zero out the stat structure so the various support * versions of stat don't have to. */ memset( sbuf, 0, sizeof(struct stat) ); return (*iop->handlers->fstat_h)( &iop->pathinfo, sbuf ); 11b557: ff e0 jmp *%eax } 11b559: 83 c8 ff or $0xffffffff,%eax 11b55c: 5b pop %ebx 11b55d: 5f pop %edi 11b55e: c9 leave 11b55f: c3 ret 00125508 : #include int fsync( int fd ) { 125508: 55 push %ebp 125509: 89 e5 mov %esp,%ebp 12550b: 83 ec 08 sub $0x8,%esp 12550e: 8b 45 08 mov 0x8(%ebp),%eax rtems_libio_t *iop; rtems_libio_check_fd( fd ); 125511: 3b 05 44 bb 15 00 cmp 0x15bb44,%eax 125517: 73 2a jae 125543 <== ALWAYS TAKEN iop = rtems_libio_iop( fd ); 125519: c1 e0 06 shl $0x6,%eax 12551c: 03 05 f0 33 16 00 add 0x1633f0,%eax rtems_libio_check_is_open(iop); 125522: 8b 50 14 mov 0x14(%eax),%edx 125525: f6 c6 01 test $0x1,%dh 125528: 74 19 je 125543 <== ALWAYS TAKEN rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 12552a: 80 e2 04 and $0x4,%dl 12552d: 75 0d jne 12553c 12552f: e8 9c 2e 01 00 call 1383d0 <__errno> 125534: c7 00 16 00 00 00 movl $0x16,(%eax) 12553a: eb 2e jmp 12556a <== ALWAYS TAKEN /* * Now process the fsync(). */ if ( !iop->handlers ) 12553c: 8b 50 3c mov 0x3c(%eax),%edx 12553f: 85 d2 test %edx,%edx 125541: 75 0d jne 125550 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EBADF ); 125543: e8 88 2e 01 00 call 1383d0 <__errno> <== NOT EXECUTED 125548: c7 00 09 00 00 00 movl $0x9,(%eax) <== NOT EXECUTED 12554e: eb 1a jmp 12556a <== NOT EXECUTED if ( !iop->handlers->fsync_h ) 125550: 8b 52 28 mov 0x28(%edx),%edx 125553: 85 d2 test %edx,%edx 125555: 75 0d jne 125564 rtems_set_errno_and_return_minus_one( ENOTSUP ); 125557: e8 74 2e 01 00 call 1383d0 <__errno> 12555c: c7 00 86 00 00 00 movl $0x86,(%eax) 125562: eb 06 jmp 12556a <== ALWAYS TAKEN return (*iop->handlers->fsync_h)( iop ); 125564: 89 45 08 mov %eax,0x8(%ebp) } 125567: c9 leave rtems_set_errno_and_return_minus_one( EBADF ); if ( !iop->handlers->fsync_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->fsync_h)( iop ); 125568: ff e2 jmp *%edx } 12556a: 83 c8 ff or $0xffffffff,%eax 12556d: c9 leave 12556e: c3 ret 0010db44 : int ftruncate( int fd, off_t length ) { 10db44: 55 push %ebp 10db45: 89 e5 mov %esp,%ebp 10db47: 57 push %edi 10db48: 56 push %esi 10db49: 53 push %ebx 10db4a: 83 ec 2c sub $0x2c,%esp 10db4d: 8b 5d 08 mov 0x8(%ebp),%ebx rtems_libio_t *iop; rtems_filesystem_location_info_t loc; rtems_libio_check_fd( fd ); 10db50: 3b 1d 64 f8 11 00 cmp 0x11f864,%ebx 10db56: 73 0f jae 10db67 <== ALWAYS TAKEN iop = rtems_libio_iop( fd ); 10db58: c1 e3 06 shl $0x6,%ebx 10db5b: 03 1d 18 37 12 00 add 0x123718,%ebx rtems_libio_check_is_open(iop); 10db61: f6 43 15 01 testb $0x1,0x15(%ebx) 10db65: 75 0d jne 10db74 <== NEVER TAKEN 10db67: e8 e4 26 00 00 call 110250 <__errno> <== NOT EXECUTED 10db6c: c7 00 09 00 00 00 movl $0x9,(%eax) <== NOT EXECUTED 10db72: eb 5b jmp 10dbcf <== NOT EXECUTED /* * Make sure we are not working on a directory */ loc = iop->pathinfo; 10db74: 8d 7d d4 lea -0x2c(%ebp),%edi 10db77: 8d 73 18 lea 0x18(%ebx),%esi 10db7a: b9 05 00 00 00 mov $0x5,%ecx 10db7f: f3 a5 rep movsl %ds:(%esi),%es:(%edi) if ( !loc.ops->node_type_h ) 10db81: 8b 45 e0 mov -0x20(%ebp),%eax 10db84: 8b 40 10 mov 0x10(%eax),%eax 10db87: 85 c0 test %eax,%eax 10db89: 74 39 je 10dbc4 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) 10db8b: 83 ec 0c sub $0xc,%esp 10db8e: 8d 55 d4 lea -0x2c(%ebp),%edx 10db91: 52 push %edx 10db92: ff d0 call *%eax 10db94: 83 c4 10 add $0x10,%esp 10db97: 48 dec %eax 10db98: 75 0d jne 10dba7 rtems_set_errno_and_return_minus_one( EISDIR ); 10db9a: e8 b1 26 00 00 call 110250 <__errno> 10db9f: c7 00 15 00 00 00 movl $0x15,(%eax) 10dba5: eb 28 jmp 10dbcf <== ALWAYS TAKEN rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 10dba7: f6 43 14 04 testb $0x4,0x14(%ebx) 10dbab: 75 0d jne 10dbba <== NEVER TAKEN 10dbad: e8 9e 26 00 00 call 110250 <__errno> <== NOT EXECUTED 10dbb2: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 10dbb8: eb 15 jmp 10dbcf <== NOT EXECUTED if ( !iop->handlers->ftruncate_h ) 10dbba: 8b 43 3c mov 0x3c(%ebx),%eax 10dbbd: 8b 40 20 mov 0x20(%eax),%eax 10dbc0: 85 c0 test %eax,%eax 10dbc2: 75 10 jne 10dbd4 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); 10dbc4: e8 87 26 00 00 call 110250 <__errno> <== NOT EXECUTED 10dbc9: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 10dbcf: 83 c8 ff or $0xffffffff,%eax 10dbd2: eb 11 jmp 10dbe5 <== ALWAYS TAKEN return (*iop->handlers->ftruncate_h)( iop, length ); 10dbd4: 52 push %edx 10dbd5: 8b 55 0c mov 0xc(%ebp),%edx 10dbd8: 89 d1 mov %edx,%ecx 10dbda: c1 f9 1f sar $0x1f,%ecx 10dbdd: 51 push %ecx 10dbde: 52 push %edx 10dbdf: 53 push %ebx 10dbe0: ff d0 call *%eax 10dbe2: 83 c4 10 add $0x10,%esp } 10dbe5: 8d 65 f4 lea -0xc(%ebp),%esp 10dbe8: 5b pop %ebx 10dbe9: 5e pop %esi 10dbea: 5f pop %edi 10dbeb: c9 leave 10dbec: c3 ret 0014e024 : int getdents( int dd_fd, char *dd_buf, int dd_len ) { 14e024: 55 push %ebp 14e025: 89 e5 mov %esp,%ebp 14e027: 57 push %edi 14e028: 56 push %esi 14e029: 53 push %ebx 14e02a: 83 ec 2c sub $0x2c,%esp 14e02d: 8b 45 08 mov 0x8(%ebp),%eax /* * Get the file control block structure associated with the file descriptor */ iop = rtems_libio_iop( dd_fd ); 14e030: 31 db xor %ebx,%ebx 14e032: 3b 05 44 bb 15 00 cmp 0x15bb44,%eax 14e038: 73 0b jae 14e045 <== ALWAYS TAKEN 14e03a: 89 c3 mov %eax,%ebx 14e03c: c1 e3 06 shl $0x6,%ebx 14e03f: 03 1d f0 33 16 00 add 0x1633f0,%ebx /* * Make sure we are working on a directory */ loc = iop->pathinfo; 14e045: 8d 7d d4 lea -0x2c(%ebp),%edi 14e048: 8d 73 18 lea 0x18(%ebx),%esi 14e04b: b9 05 00 00 00 mov $0x5,%ecx 14e050: f3 a5 rep movsl %ds:(%esi),%es:(%edi) if ( !loc.ops->node_type_h ) 14e052: 8b 45 e0 mov -0x20(%ebp),%eax 14e055: 8b 40 10 mov 0x10(%eax),%eax 14e058: 85 c0 test %eax,%eax 14e05a: 74 29 je 14e085 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) 14e05c: 83 ec 0c sub $0xc,%esp 14e05f: 8d 55 d4 lea -0x2c(%ebp),%edx 14e062: 52 push %edx 14e063: ff d0 call *%eax 14e065: 83 c4 10 add $0x10,%esp 14e068: 48 dec %eax 14e069: 74 10 je 14e07b rtems_set_errno_and_return_minus_one( ENOTDIR ); 14e06b: e8 60 a3 fe ff call 1383d0 <__errno> 14e070: c7 00 14 00 00 00 movl $0x14,(%eax) 14e076: 83 c8 ff or $0xffffffff,%eax 14e079: eb 24 jmp 14e09f <== ALWAYS TAKEN /* * Return the number of bytes that were actually transfered as a result * of the read attempt. */ if ( !iop->handlers->read_h ) 14e07b: 8b 43 3c mov 0x3c(%ebx),%eax 14e07e: 8b 40 08 mov 0x8(%eax),%eax 14e081: 85 c0 test %eax,%eax 14e083: 75 0d jne 14e092 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); 14e085: e8 46 a3 fe ff call 1383d0 <__errno> <== NOT EXECUTED 14e08a: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 14e090: eb e4 jmp 14e076 <== NOT EXECUTED return (*iop->handlers->read_h)( iop, dd_buf, dd_len ); 14e092: 52 push %edx 14e093: ff 75 10 pushl 0x10(%ebp) 14e096: ff 75 0c pushl 0xc(%ebp) 14e099: 53 push %ebx 14e09a: ff d0 call *%eax 14e09c: 83 c4 10 add $0x10,%esp } 14e09f: 8d 65 f4 lea -0xc(%ebp),%esp 14e0a2: 5b pop %ebx 14e0a3: 5e pop %esi 14e0a4: 5f pop %edi 14e0a5: c9 leave 14e0a6: c3 ret 0012563c : * 4.2.1 Get Real User, Effective User, Ral Group, and Effective Group IDs, * P1003.1b-1993, p. 84 */ gid_t getgid( void ) { 12563c: 55 push %ebp <== NOT EXECUTED 12563d: 89 e5 mov %esp,%ebp <== NOT EXECUTED 12563f: a1 78 db 15 00 mov 0x15db78,%eax <== NOT EXECUTED 125644: 8b 40 34 mov 0x34(%eax),%eax <== NOT EXECUTED return _POSIX_types_Gid; } 125647: c9 leave <== NOT EXECUTED 125648: c3 ret <== NOT EXECUTED 00125b46 : struct group *grp, char *buffer, size_t bufsize, struct group **result ) { 125b46: 55 push %ebp 125b47: 89 e5 mov %esp,%ebp 125b49: 57 push %edi 125b4a: 56 push %esi 125b4b: 53 push %ebx 125b4c: 83 ec 1c sub $0x1c,%esp 125b4f: 89 c7 mov %eax,%edi 125b51: 89 55 e4 mov %edx,-0x1c(%ebp) 125b54: 89 ce mov %ecx,%esi FILE *fp; int match; init_etc_passwd_group(); 125b56: e8 df fe ff ff call 125a3a <== ALWAYS TAKEN if ((fp = fopen("/etc/group", "r")) == NULL) { 125b5b: 53 push %ebx 125b5c: 53 push %ebx 125b5d: 68 03 16 15 00 push $0x151603 125b62: 68 c5 ec 14 00 push $0x14ecc5 125b67: e8 a0 31 01 00 call 138d0c 125b6c: 89 c3 mov %eax,%ebx 125b6e: 83 c4 10 add $0x10,%esp 125b71: 85 c0 test %eax,%eax 125b73: 75 10 jne 125b85 <== NEVER TAKEN errno = EINVAL; 125b75: e8 56 28 01 00 call 1383d0 <__errno> <== NOT EXECUTED 125b7a: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 125b80: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED return -1; 125b83: eb 6b jmp 125bf0 <== NOT EXECUTED } for(;;) { if (!scangr(fp, grp, buffer, bufsize)) { 125b85: 83 ec 0c sub $0xc,%esp 125b88: ff 75 0c pushl 0xc(%ebp) 125b8b: 8b 4d 08 mov 0x8(%ebp),%ecx 125b8e: 89 f2 mov %esi,%edx 125b90: 89 d8 mov %ebx,%eax 125b92: e8 39 fc ff ff call 1257d0 <== ALWAYS TAKEN 125b97: 83 c4 10 add $0x10,%esp 125b9a: 85 c0 test %eax,%eax 125b9c: 75 19 jne 125bb7 <== NEVER TAKEN errno = EINVAL; 125b9e: e8 2d 28 01 00 call 1383d0 <__errno> <== NOT EXECUTED 125ba3: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED fclose(fp); 125ba9: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 125bac: 53 push %ebx <== NOT EXECUTED 125bad: e8 6a 29 01 00 call 13851c <== NOT EXECUTED 125bb2: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 125bb5: eb 36 jmp 125bed <== NOT EXECUTED return -1; } if (name) { 125bb7: 85 ff test %edi,%edi 125bb9: 74 11 je 125bcc <== ALWAYS TAKEN match = (strcmp(grp->gr_name, name) == 0); 125bbb: 51 push %ecx 125bbc: 51 push %ecx 125bbd: 57 push %edi 125bbe: ff 36 pushl (%esi) 125bc0: e8 c7 7c 01 00 call 13d88c 125bc5: 83 c4 10 add $0x10,%esp 125bc8: 85 c0 test %eax,%eax 125bca: eb 07 jmp 125bd3 <== ALWAYS TAKEN } else { match = (grp->gr_gid == gid); 125bcc: 0f b7 46 08 movzwl 0x8(%esi),%eax <== NOT EXECUTED 125bd0: 3b 45 e4 cmp -0x1c(%ebp),%eax <== NOT EXECUTED 125bd3: 0f 94 c0 sete %al 125bd6: 0f b6 c0 movzbl %al,%eax } if (match) { 125bd9: 85 c0 test %eax,%eax 125bdb: 74 a8 je 125b85 fclose(fp); 125bdd: 83 ec 0c sub $0xc,%esp 125be0: 53 push %ebx 125be1: e8 36 29 01 00 call 13851c *result = grp; 125be6: 8b 45 10 mov 0x10(%ebp),%eax 125be9: 89 30 mov %esi,(%eax) 125beb: 31 c0 xor %eax,%eax return 0; 125bed: 83 c4 10 add $0x10,%esp } } fclose(fp); errno = EINVAL; return -1; } 125bf0: 8d 65 f4 lea -0xc(%ebp),%esp 125bf3: 5b pop %ebx 125bf4: 5e pop %esi 125bf5: 5f pop %edi 125bf6: c9 leave 125bf7: c3 ret 001258cf : return NULL; return p; } struct group *getgrent(void) { 1258cf: 55 push %ebp <== NOT EXECUTED 1258d0: 89 e5 mov %esp,%ebp <== NOT EXECUTED 1258d2: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED if (group_fp == NULL) 1258d5: a1 28 30 16 00 mov 0x163028,%eax <== NOT EXECUTED 1258da: 85 c0 test %eax,%eax <== NOT EXECUTED 1258dc: 74 25 je 125903 <== NOT EXECUTED return NULL; if (!scangr(group_fp, &grent, grbuf, sizeof grbuf)) 1258de: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1258e1: 68 c8 00 00 00 push $0xc8 <== NOT EXECUTED 1258e6: b9 2c 30 16 00 mov $0x16302c,%ecx <== NOT EXECUTED 1258eb: ba f4 30 16 00 mov $0x1630f4,%edx <== NOT EXECUTED 1258f0: e8 db fe ff ff call 1257d0 <== NOT EXECUTED 1258f5: 89 c2 mov %eax,%edx <== NOT EXECUTED 1258f7: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 1258fa: b8 f4 30 16 00 mov $0x1630f4,%eax <== NOT EXECUTED 1258ff: 85 d2 test %edx,%edx <== NOT EXECUTED 125901: 75 02 jne 125905 <== NOT EXECUTED 125903: 31 c0 xor %eax,%eax <== NOT EXECUTED return NULL; return &grent; } 125905: c9 leave <== NOT EXECUTED 125906: c3 ret <== NOT EXECUTED 00125c22 : } struct group *getgrgid( gid_t gid ) { 125c22: 55 push %ebp <== NOT EXECUTED 125c23: 89 e5 mov %esp,%ebp <== NOT EXECUTED 125c25: 83 ec 24 sub $0x24,%esp <== NOT EXECUTED struct group *p; if(getgrgid_r(gid, &grent, grbuf, sizeof grbuf, &p)) 125c28: 8d 45 f4 lea -0xc(%ebp),%eax <== NOT EXECUTED 125c2b: 50 push %eax <== NOT EXECUTED 125c2c: 68 c8 00 00 00 push $0xc8 <== NOT EXECUTED 125c31: 68 2c 30 16 00 push $0x16302c <== NOT EXECUTED 125c36: 68 f4 30 16 00 push $0x1630f4 <== NOT EXECUTED 125c3b: 0f b7 45 08 movzwl 0x8(%ebp),%eax <== NOT EXECUTED 125c3f: 50 push %eax <== NOT EXECUTED 125c40: e8 b3 ff ff ff call 125bf8 <== NOT EXECUTED 125c45: 89 c2 mov %eax,%edx <== NOT EXECUTED 125c47: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 125c4a: 31 c0 xor %eax,%eax <== NOT EXECUTED 125c4c: 85 d2 test %edx,%edx <== NOT EXECUTED 125c4e: 75 03 jne 125c53 <== NOT EXECUTED return NULL; return p; 125c50: 8b 45 f4 mov -0xc(%ebp),%eax <== NOT EXECUTED } 125c53: c9 leave <== NOT EXECUTED 125c54: c3 ret <== NOT EXECUTED 00125bf8 : struct group *grp, char *buffer, size_t bufsize, struct group **result ) { 125bf8: 55 push %ebp <== NOT EXECUTED 125bf9: 89 e5 mov %esp,%ebp <== NOT EXECUTED 125bfb: 53 push %ebx <== NOT EXECUTED 125bfc: 83 ec 04 sub $0x4,%esp <== NOT EXECUTED 125bff: 8b 4d 0c mov 0xc(%ebp),%ecx <== NOT EXECUTED 125c02: 8b 45 10 mov 0x10(%ebp),%eax <== NOT EXECUTED return getgr_r(NULL, gid, grp, buffer, bufsize, result); 125c05: 0f b7 55 08 movzwl 0x8(%ebp),%edx <== NOT EXECUTED 125c09: 8b 5d 18 mov 0x18(%ebp),%ebx <== NOT EXECUTED 125c0c: 89 5d 10 mov %ebx,0x10(%ebp) <== NOT EXECUTED 125c0f: 8b 5d 14 mov 0x14(%ebp),%ebx <== NOT EXECUTED 125c12: 89 5d 0c mov %ebx,0xc(%ebp) <== NOT EXECUTED 125c15: 89 45 08 mov %eax,0x8(%ebp) <== NOT EXECUTED 125c18: 31 c0 xor %eax,%eax <== NOT EXECUTED } 125c1a: 5b pop %ebx <== NOT EXECUTED 125c1b: 5b pop %ebx <== NOT EXECUTED 125c1c: c9 leave <== NOT EXECUTED char *buffer, size_t bufsize, struct group **result ) { return getgr_r(NULL, gid, grp, buffer, bufsize, result); 125c1d: e9 24 ff ff ff jmp 125b46 <== NOT EXECUTED 00125c7e : } struct group *getgrnam( const char *name ) { 125c7e: 55 push %ebp 125c7f: 89 e5 mov %esp,%ebp 125c81: 83 ec 24 sub $0x24,%esp struct group *p; if(getgrnam_r(name, &grent, grbuf, sizeof grbuf, &p)) 125c84: 8d 45 f4 lea -0xc(%ebp),%eax 125c87: 50 push %eax 125c88: 68 c8 00 00 00 push $0xc8 125c8d: 68 2c 30 16 00 push $0x16302c 125c92: 68 f4 30 16 00 push $0x1630f4 125c97: ff 75 08 pushl 0x8(%ebp) 125c9a: e8 b6 ff ff ff call 125c55 <== ALWAYS TAKEN 125c9f: 89 c2 mov %eax,%edx 125ca1: 83 c4 20 add $0x20,%esp 125ca4: 31 c0 xor %eax,%eax 125ca6: 85 d2 test %edx,%edx 125ca8: 75 03 jne 125cad <== ALWAYS TAKEN return NULL; return p; 125caa: 8b 45 f4 mov -0xc(%ebp),%eax } 125cad: c9 leave 125cae: c3 ret 00125c55 : struct group *grp, char *buffer, size_t bufsize, struct group **result ) { 125c55: 55 push %ebp 125c56: 89 e5 mov %esp,%ebp 125c58: 53 push %ebx 125c59: 83 ec 04 sub $0x4,%esp 125c5c: 8b 45 08 mov 0x8(%ebp),%eax 125c5f: 8b 4d 0c mov 0xc(%ebp),%ecx 125c62: 8b 55 10 mov 0x10(%ebp),%edx return getgr_r(name, 0, grp, buffer, bufsize, result); 125c65: 8b 5d 18 mov 0x18(%ebp),%ebx 125c68: 89 5d 10 mov %ebx,0x10(%ebp) 125c6b: 8b 5d 14 mov 0x14(%ebp),%ebx 125c6e: 89 5d 0c mov %ebx,0xc(%ebp) 125c71: 89 55 08 mov %edx,0x8(%ebp) 125c74: 31 d2 xor %edx,%edx } 125c76: 5b pop %ebx 125c77: 5b pop %ebx 125c78: c9 leave char *buffer, size_t bufsize, struct group **result ) { return getgr_r(name, 0, grp, buffer, bufsize, result); 125c79: e9 c8 fe ff ff jmp 125b46 <== ALWAYS TAKEN 00121658 : * * 4.1.1 Get Process and Parent Process IDs, P1003.1b-1993, p. 83 */ pid_t getpid( void ) { 121658: 55 push %ebp <== NOT EXECUTED 121659: 89 e5 mov %esp,%ebp <== NOT EXECUTED return _Objects_Local_node; } 12165b: b8 01 00 00 00 mov $0x1,%eax <== NOT EXECUTED 121660: c9 leave <== NOT EXECUTED 121661: c3 ret <== NOT EXECUTED 00125cea : struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) { 125cea: 55 push %ebp 125ceb: 89 e5 mov %esp,%ebp 125ced: 57 push %edi 125cee: 56 push %esi 125cef: 53 push %ebx 125cf0: 83 ec 1c sub $0x1c,%esp 125cf3: 89 c7 mov %eax,%edi 125cf5: 89 55 e4 mov %edx,-0x1c(%ebp) 125cf8: 89 ce mov %ecx,%esi FILE *fp; int match; init_etc_passwd_group(); 125cfa: e8 3b fd ff ff call 125a3a <== ALWAYS TAKEN if ((fp = fopen("/etc/passwd", "r")) == NULL) { 125cff: 51 push %ecx 125d00: 51 push %ecx 125d01: 68 03 16 15 00 push $0x151603 125d06: 68 80 ec 14 00 push $0x14ec80 125d0b: e8 fc 2f 01 00 call 138d0c 125d10: 89 c3 mov %eax,%ebx 125d12: 83 c4 10 add $0x10,%esp 125d15: 85 c0 test %eax,%eax 125d17: 75 10 jne 125d29 <== NEVER TAKEN errno = EINVAL; 125d19: e8 b2 26 01 00 call 1383d0 <__errno> <== NOT EXECUTED 125d1e: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 125d24: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED return -1; 125d27: eb 6b jmp 125d94 <== NOT EXECUTED } for(;;) { if (!scanpw(fp, pwd, buffer, bufsize)) { 125d29: 83 ec 0c sub $0xc,%esp 125d2c: ff 75 0c pushl 0xc(%ebp) 125d2f: 8b 4d 08 mov 0x8(%ebp),%ecx 125d32: 89 f2 mov %esi,%edx 125d34: 89 d8 mov %ebx,%eax 125d36: e8 cc fb ff ff call 125907 <== ALWAYS TAKEN 125d3b: 83 c4 10 add $0x10,%esp 125d3e: 85 c0 test %eax,%eax 125d40: 75 19 jne 125d5b <== NEVER TAKEN errno = EINVAL; 125d42: e8 89 26 01 00 call 1383d0 <__errno> <== NOT EXECUTED 125d47: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED fclose(fp); 125d4d: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 125d50: 53 push %ebx <== NOT EXECUTED 125d51: e8 c6 27 01 00 call 13851c <== NOT EXECUTED 125d56: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 125d59: eb 36 jmp 125d91 <== NOT EXECUTED return -1; } if (name) { 125d5b: 85 ff test %edi,%edi 125d5d: 74 11 je 125d70 <== ALWAYS TAKEN match = (strcmp(pwd->pw_name, name) == 0); 125d5f: 52 push %edx 125d60: 52 push %edx 125d61: 57 push %edi 125d62: ff 36 pushl (%esi) 125d64: e8 23 7b 01 00 call 13d88c 125d69: 83 c4 10 add $0x10,%esp 125d6c: 85 c0 test %eax,%eax 125d6e: eb 07 jmp 125d77 <== ALWAYS TAKEN } else { match = (pwd->pw_uid == uid); 125d70: 0f b7 46 08 movzwl 0x8(%esi),%eax <== NOT EXECUTED 125d74: 3b 45 e4 cmp -0x1c(%ebp),%eax <== NOT EXECUTED 125d77: 0f 94 c0 sete %al 125d7a: 0f b6 c0 movzbl %al,%eax } if (match) { 125d7d: 85 c0 test %eax,%eax 125d7f: 74 a8 je 125d29 fclose(fp); 125d81: 83 ec 0c sub $0xc,%esp 125d84: 53 push %ebx 125d85: e8 92 27 01 00 call 13851c *result = pwd; 125d8a: 8b 45 10 mov 0x10(%ebp),%eax 125d8d: 89 30 mov %esi,(%eax) 125d8f: 31 c0 xor %eax,%eax return 0; 125d91: 83 c4 10 add $0x10,%esp } } fclose(fp); errno = EINVAL; return -1; } 125d94: 8d 65 f4 lea -0xc(%ebp),%esp 125d97: 5b pop %ebx 125d98: 5e pop %esi 125d99: 5f pop %edi 125d9a: c9 leave 125d9b: c3 ret 00125a02 : return NULL; return p; } struct passwd *getpwent(void) { 125a02: 55 push %ebp <== NOT EXECUTED 125a03: 89 e5 mov %esp,%ebp <== NOT EXECUTED 125a05: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED if (passwd_fp == NULL) 125a08: a1 40 2f 16 00 mov 0x162f40,%eax <== NOT EXECUTED 125a0d: 85 c0 test %eax,%eax <== NOT EXECUTED 125a0f: 74 25 je 125a36 <== NOT EXECUTED return NULL; if (!scanpw(passwd_fp, &pwent, pwbuf, sizeof pwbuf)) 125a11: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 125a14: 68 c8 00 00 00 push $0xc8 <== NOT EXECUTED 125a19: b9 44 2f 16 00 mov $0x162f44,%ecx <== NOT EXECUTED 125a1e: ba 0c 30 16 00 mov $0x16300c,%edx <== NOT EXECUTED 125a23: e8 df fe ff ff call 125907 <== NOT EXECUTED 125a28: 89 c2 mov %eax,%edx <== NOT EXECUTED 125a2a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 125a2d: b8 0c 30 16 00 mov $0x16300c,%eax <== NOT EXECUTED 125a32: 85 d2 test %edx,%edx <== NOT EXECUTED 125a34: 75 02 jne 125a38 <== NOT EXECUTED 125a36: 31 c0 xor %eax,%eax <== NOT EXECUTED return NULL; return &pwent; } 125a38: c9 leave <== NOT EXECUTED 125a39: c3 ret <== NOT EXECUTED 00125e22 : } struct passwd *getpwnam( const char *name ) { 125e22: 55 push %ebp 125e23: 89 e5 mov %esp,%ebp 125e25: 83 ec 24 sub $0x24,%esp struct passwd *p; if(getpwnam_r(name, &pwent, pwbuf, sizeof pwbuf, &p)) 125e28: 8d 45 f4 lea -0xc(%ebp),%eax 125e2b: 50 push %eax 125e2c: 68 c8 00 00 00 push $0xc8 125e31: 68 44 2f 16 00 push $0x162f44 125e36: 68 0c 30 16 00 push $0x16300c 125e3b: ff 75 08 pushl 0x8(%ebp) 125e3e: e8 b6 ff ff ff call 125df9 <== ALWAYS TAKEN 125e43: 89 c2 mov %eax,%edx 125e45: 83 c4 20 add $0x20,%esp 125e48: 31 c0 xor %eax,%eax 125e4a: 85 d2 test %edx,%edx 125e4c: 75 03 jne 125e51 <== ALWAYS TAKEN return NULL; return p; 125e4e: 8b 45 f4 mov -0xc(%ebp),%eax } 125e51: c9 leave 125e52: c3 ret 00125df9 : struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) { 125df9: 55 push %ebp 125dfa: 89 e5 mov %esp,%ebp 125dfc: 53 push %ebx 125dfd: 83 ec 04 sub $0x4,%esp 125e00: 8b 45 08 mov 0x8(%ebp),%eax 125e03: 8b 4d 0c mov 0xc(%ebp),%ecx 125e06: 8b 55 10 mov 0x10(%ebp),%edx return getpw_r(name, 0, pwd, buffer, bufsize, result); 125e09: 8b 5d 18 mov 0x18(%ebp),%ebx 125e0c: 89 5d 10 mov %ebx,0x10(%ebp) 125e0f: 8b 5d 14 mov 0x14(%ebp),%ebx 125e12: 89 5d 0c mov %ebx,0xc(%ebp) 125e15: 89 55 08 mov %edx,0x8(%ebp) 125e18: 31 d2 xor %edx,%edx } 125e1a: 5b pop %ebx 125e1b: 5b pop %ebx 125e1c: c9 leave char *buffer, size_t bufsize, struct passwd **result ) { return getpw_r(name, 0, pwd, buffer, bufsize, result); 125e1d: e9 c8 fe ff ff jmp 125cea <== ALWAYS TAKEN 00125dc6 : } struct passwd *getpwuid( uid_t uid ) { 125dc6: 55 push %ebp <== NOT EXECUTED 125dc7: 89 e5 mov %esp,%ebp <== NOT EXECUTED 125dc9: 83 ec 24 sub $0x24,%esp <== NOT EXECUTED struct passwd *p; if(getpwuid_r(uid, &pwent, pwbuf, sizeof pwbuf, &p)) 125dcc: 8d 45 f4 lea -0xc(%ebp),%eax <== NOT EXECUTED 125dcf: 50 push %eax <== NOT EXECUTED 125dd0: 68 c8 00 00 00 push $0xc8 <== NOT EXECUTED 125dd5: 68 44 2f 16 00 push $0x162f44 <== NOT EXECUTED 125dda: 68 0c 30 16 00 push $0x16300c <== NOT EXECUTED 125ddf: 0f b7 45 08 movzwl 0x8(%ebp),%eax <== NOT EXECUTED 125de3: 50 push %eax <== NOT EXECUTED 125de4: e8 b3 ff ff ff call 125d9c <== NOT EXECUTED 125de9: 89 c2 mov %eax,%edx <== NOT EXECUTED 125deb: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 125dee: 31 c0 xor %eax,%eax <== NOT EXECUTED 125df0: 85 d2 test %edx,%edx <== NOT EXECUTED 125df2: 75 03 jne 125df7 <== NOT EXECUTED return NULL; return p; 125df4: 8b 45 f4 mov -0xc(%ebp),%eax <== NOT EXECUTED } 125df7: c9 leave <== NOT EXECUTED 125df8: c3 ret <== NOT EXECUTED 00125d9c : struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) { 125d9c: 55 push %ebp <== NOT EXECUTED 125d9d: 89 e5 mov %esp,%ebp <== NOT EXECUTED 125d9f: 53 push %ebx <== NOT EXECUTED 125da0: 83 ec 04 sub $0x4,%esp <== NOT EXECUTED 125da3: 8b 4d 0c mov 0xc(%ebp),%ecx <== NOT EXECUTED 125da6: 8b 45 10 mov 0x10(%ebp),%eax <== NOT EXECUTED return getpw_r(NULL, uid, pwd, buffer, bufsize, result); 125da9: 0f b7 55 08 movzwl 0x8(%ebp),%edx <== NOT EXECUTED 125dad: 8b 5d 18 mov 0x18(%ebp),%ebx <== NOT EXECUTED 125db0: 89 5d 10 mov %ebx,0x10(%ebp) <== NOT EXECUTED 125db3: 8b 5d 14 mov 0x14(%ebp),%ebx <== NOT EXECUTED 125db6: 89 5d 0c mov %ebx,0xc(%ebp) <== NOT EXECUTED 125db9: 89 45 08 mov %eax,0x8(%ebp) <== NOT EXECUTED 125dbc: 31 c0 xor %eax,%eax <== NOT EXECUTED } 125dbe: 5b pop %ebx <== NOT EXECUTED 125dbf: 5b pop %ebx <== NOT EXECUTED 125dc0: c9 leave <== NOT EXECUTED char *buffer, size_t bufsize, struct passwd **result ) { return getpw_r(NULL, uid, pwd, buffer, bufsize, result); 125dc1: e9 24 ff ff ff jmp 125cea <== NOT EXECUTED 0010dbf0 : */ int gettimeofday( struct timeval *tp, void * __tz __attribute__((unused)) ) { 10dbf0: 55 push %ebp 10dbf1: 89 e5 mov %esp,%ebp 10dbf3: 56 push %esi 10dbf4: 53 push %ebx 10dbf5: 83 ec 10 sub $0x10,%esp 10dbf8: 8b 5d 08 mov 0x8(%ebp),%ebx /* struct timezone* tzp = (struct timezone*) __tz; */ if ( !tp ) { 10dbfb: 85 db test %ebx,%ebx 10dbfd: 75 10 jne 10dc0f <== NEVER TAKEN errno = EFAULT; 10dbff: e8 4c 26 00 00 call 110250 <__errno> <== NOT EXECUTED 10dc04: c7 00 0e 00 00 00 movl $0xe,(%eax) <== NOT EXECUTED 10dc0a: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED return -1; 10dc0d: eb 29 jmp 10dc38 <== NOT EXECUTED { ISR_Level level; struct timespec now; suseconds_t useconds; _ISR_Disable(level); 10dc0f: 9c pushf 10dc10: fa cli 10dc11: 5e pop %esi _TOD_Get( &now ); 10dc12: 83 ec 0c sub $0xc,%esp 10dc15: 8d 45 f0 lea -0x10(%ebp),%eax 10dc18: 50 push %eax 10dc19: e8 0e 08 00 00 call 10e42c <_TOD_Get> <== ALWAYS TAKEN _ISR_Enable(level); 10dc1e: 56 push %esi 10dc1f: 9d popf useconds = (suseconds_t)now.tv_nsec; 10dc20: 8b 45 f4 mov -0xc(%ebp),%eax useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND; time->tv_sec = now.tv_sec; 10dc23: 8b 55 f0 mov -0x10(%ebp),%edx 10dc26: 89 13 mov %edx,(%ebx) time->tv_usec = useconds; 10dc28: b9 e8 03 00 00 mov $0x3e8,%ecx 10dc2d: 99 cltd 10dc2e: f7 f9 idiv %ecx 10dc30: 89 43 04 mov %eax,0x4(%ebx) 10dc33: 31 c0 xor %eax,%eax * Timezone information ignored by the OS proper. Per email * with Eric Norum, this is how GNU/Linux, Solaris, and MacOS X * do it. This puts us in good company. */ return 0; 10dc35: 83 c4 10 add $0x10,%esp } 10dc38: 8d 65 f8 lea -0x8(%ebp),%esp 10dc3b: 5b pop %ebx 10dc3c: 5e pop %esi 10dc3d: c9 leave 10dc3e: c3 ret 0010b8b0 : * 4.2.1 Get Real User, Effective User, Ral Group, and Effective Group IDs, * P1003.1b-1993, p. 84 */ uid_t getuid( void ) { 10b8b0: 55 push %ebp <== NOT EXECUTED 10b8b1: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10b8b3: a1 78 db 15 00 mov 0x15db78,%eax <== NOT EXECUTED 10b8b8: 66 8b 40 32 mov 0x32(%eax),%ax <== NOT EXECUTED return _POSIX_types_Uid; } 10b8bc: c9 leave <== NOT EXECUTED 10b8bd: c3 ret <== NOT EXECUTED 00114283 : int imfs_dir_fstat( rtems_filesystem_location_info_t *loc, struct stat *buf ) { 114283: 55 push %ebp 114284: 89 e5 mov %esp,%ebp 114286: 8b 45 0c mov 0xc(%ebp),%eax rtems_chain_node *the_node; rtems_chain_control *the_chain; IMFS_jnode_t *the_jnode; the_jnode = (IMFS_jnode_t *) loc->node_access; 114289: 8b 55 08 mov 0x8(%ebp),%edx 11428c: 8b 12 mov (%edx),%edx buf->st_dev = 0ll; 11428e: c7 00 00 00 00 00 movl $0x0,(%eax) 114294: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax) buf->st_ino = the_jnode->st_ino; 11429b: 8b 4a 38 mov 0x38(%edx),%ecx 11429e: 89 48 08 mov %ecx,0x8(%eax) buf->st_mode = the_jnode->st_mode; 1142a1: 8b 4a 30 mov 0x30(%edx),%ecx 1142a4: 89 48 0c mov %ecx,0xc(%eax) buf->st_nlink = the_jnode->st_nlink; 1142a7: 8b 4a 34 mov 0x34(%edx),%ecx 1142aa: 66 89 48 10 mov %cx,0x10(%eax) buf->st_uid = the_jnode->st_uid; 1142ae: 8b 4a 3c mov 0x3c(%edx),%ecx 1142b1: 66 89 48 12 mov %cx,0x12(%eax) buf->st_gid = the_jnode->st_gid; 1142b5: 66 8b 4a 3e mov 0x3e(%edx),%cx 1142b9: 66 89 48 14 mov %cx,0x14(%eax) buf->st_rdev = 0ll; 1142bd: c7 40 18 00 00 00 00 movl $0x0,0x18(%eax) 1142c4: c7 40 1c 00 00 00 00 movl $0x0,0x1c(%eax) buf->st_blksize = 0; 1142cb: c7 40 3c 00 00 00 00 movl $0x0,0x3c(%eax) buf->st_blocks = 0; 1142d2: c7 40 40 00 00 00 00 movl $0x0,0x40(%eax) buf->st_atime = the_jnode->stat_atime; 1142d9: 8b 4a 40 mov 0x40(%edx),%ecx 1142dc: 89 48 24 mov %ecx,0x24(%eax) buf->st_mtime = the_jnode->stat_mtime; 1142df: 8b 4a 44 mov 0x44(%edx),%ecx 1142e2: 89 48 2c mov %ecx,0x2c(%eax) buf->st_ctime = the_jnode->stat_ctime; 1142e5: 8b 4a 48 mov 0x48(%edx),%ecx 1142e8: 89 48 34 mov %ecx,0x34(%eax) buf->st_size = 0; 1142eb: c7 40 20 00 00 00 00 movl $0x0,0x20(%eax) the_chain = &the_jnode->info.directory.Entries; /* Run through the chain and count the number of directory entries */ /* that are subordinate to this directory node */ for ( the_node = the_chain->first ; 1142f2: 8b 4a 50 mov 0x50(%edx),%ecx 1142f5: 83 c2 54 add $0x54,%edx 1142f8: eb 09 jmp 114303 <== ALWAYS TAKEN !rtems_chain_is_tail( the_chain, the_node ) ; the_node = the_node->next ) { buf->st_size = buf->st_size + sizeof( struct dirent ); 1142fa: 81 40 20 0c 01 00 00 addl $0x10c,0x20(%eax) /* Run through the chain and count the number of directory entries */ /* that are subordinate to this directory node */ for ( the_node = the_chain->first ; !rtems_chain_is_tail( the_chain, the_node ) ; the_node = the_node->next ) { 114301: 8b 09 mov (%ecx),%ecx the_chain = &the_jnode->info.directory.Entries; /* Run through the chain and count the number of directory entries */ /* that are subordinate to this directory node */ for ( the_node = the_chain->first ; 114303: 39 d1 cmp %edx,%ecx 114305: 75 f3 jne 1142fa buf->st_size = buf->st_size + sizeof( struct dirent ); } return 0; } 114307: 31 c0 xor %eax,%eax 114309: c9 leave 11430a: c3 ret 0011430b : rtems_off64_t imfs_dir_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { 11430b: 55 push %ebp 11430c: 89 e5 mov %esp,%ebp 11430e: 57 push %edi 11430f: 56 push %esi 114310: 53 push %ebx 114311: 83 ec 1c sub $0x1c,%esp 114314: 8b 5d 08 mov 0x8(%ebp),%ebx switch( whence ) { 114317: 83 7d 14 01 cmpl $0x1,0x14(%ebp) 11431b: 77 3c ja 114359 <== ALWAYS TAKEN case SEEK_SET: /* absolute move from the start of the file */ case SEEK_CUR: /* relative move */ iop->offset = (iop->offset/sizeof(struct dirent)) * 11431d: 6a 00 push $0x0 11431f: 68 0c 01 00 00 push $0x10c 114324: ff 73 10 pushl 0x10(%ebx) 114327: ff 73 0c pushl 0xc(%ebx) 11432a: e8 fd b5 00 00 call 11f92c <__divdi3> 11432f: 83 c4 10 add $0x10,%esp 114332: 69 f2 0c 01 00 00 imul $0x10c,%edx,%esi 114338: b9 0c 01 00 00 mov $0x10c,%ecx 11433d: f7 e1 mul %ecx 11433f: 89 45 e0 mov %eax,-0x20(%ebp) 114342: 01 f2 add %esi,%edx 114344: 89 55 e4 mov %edx,-0x1c(%ebp) 114347: 8b 45 e0 mov -0x20(%ebp),%eax 11434a: 8b 55 e4 mov -0x1c(%ebp),%edx 11434d: 89 43 0c mov %eax,0xc(%ebx) 114350: 89 53 10 mov %edx,0x10(%ebx) 114353: 31 c0 xor %eax,%eax 114355: 31 d2 xor %edx,%edx default: rtems_set_errno_and_return_minus_one( EINVAL ); break; } return 0; 114357: eb 10 jmp 114369 <== ALWAYS TAKEN break; case SEEK_END: /* Movement past the end of the directory via lseek */ /* is not a permitted operation */ default: rtems_set_errno_and_return_minus_one( EINVAL ); 114359: e8 c6 05 00 00 call 114924 <__errno> <== ALWAYS TAKEN 11435e: c7 00 16 00 00 00 movl $0x16,(%eax) 114364: 83 c8 ff or $0xffffffff,%eax 114367: 89 c2 mov %eax,%edx break; } return 0; } 114369: 8d 65 f4 lea -0xc(%ebp),%esp 11436c: 5b pop %ebx 11436d: 5e pop %esi 11436e: 5f pop %edi 11436f: c9 leave 114370: c3 ret 00114258 : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 114258: 55 push %ebp 114259: 89 e5 mov %esp,%ebp 11425b: 8b 55 08 mov 0x8(%ebp),%edx IMFS_jnode_t *the_jnode; /* Is the node a directory ? */ the_jnode = (IMFS_jnode_t *) iop->file_info; 11425e: 8b 4a 38 mov 0x38(%edx),%ecx 114261: 83 c8 ff or $0xffffffff,%eax 114264: 83 79 4c 01 cmpl $0x1,0x4c(%ecx) 114268: 75 10 jne 11427a <== ALWAYS TAKEN if ( the_jnode->type != IMFS_DIRECTORY ) return -1; /* It wasn't a directory --> return error */ iop->offset = 0; 11426a: c7 42 0c 00 00 00 00 movl $0x0,0xc(%edx) 114271: c7 42 10 00 00 00 00 movl $0x0,0x10(%edx) 114278: 31 c0 xor %eax,%eax return 0; } 11427a: c9 leave 11427b: c3 ret 00114423 : ssize_t imfs_dir_read( rtems_libio_t *iop, void *buffer, size_t count ) { 114423: 55 push %ebp 114424: 89 e5 mov %esp,%ebp 114426: 57 push %edi 114427: 56 push %esi 114428: 53 push %ebx 114429: 81 ec 4c 01 00 00 sub $0x14c,%esp 11442f: 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->file_info; 114432: 8b 4d 08 mov 0x8(%ebp),%ecx 114435: 8b 51 38 mov 0x38(%ecx),%edx */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 114438: 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; 11443b: 83 c2 54 add $0x54,%edx 11443e: 89 95 cc fe ff ff mov %edx,-0x134(%ebp) the_chain = &the_jnode->info.directory.Entries; if ( rtems_chain_is_empty( the_chain ) ) 114444: 31 d2 xor %edx,%edx 114446: 3b 9d cc fe ff ff cmp -0x134(%ebp),%ebx 11444c: 0f 84 fb 00 00 00 je 11454d /* Move to the first of the desired directory entries */ the_node = the_chain->first; bytes_transferred = 0; first_entry = iop->offset; 114452: 8b 51 0c mov 0xc(%ecx),%edx 114455: 89 95 c8 fe ff ff mov %edx,-0x138(%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); 11445b: b9 0c 01 00 00 mov $0x10c,%ecx 114460: 31 d2 xor %edx,%edx 114462: f7 f1 div %ecx 114464: 69 c0 0c 01 00 00 imul $0x10c,%eax,%eax 11446a: 03 85 c8 fe ff ff add -0x138(%ebp),%eax 114470: 89 85 c4 fe ff ff mov %eax,-0x13c(%ebp) 114476: c7 85 d4 fe ff ff 00 movl $0x0,-0x12c(%ebp) 11447d: 00 00 00 114480: 31 d2 xor %edx,%edx 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 ); 114482: 8d 8d dc fe ff ff lea -0x124(%ebp),%ecx 114488: 89 8d b4 fe ff ff mov %ecx,-0x14c(%ebp) 11448e: 89 95 d0 fe ff ff mov %edx,-0x130(%ebp) /* protect against using sizes that are not exact multiples of the */ /* -dirent- size. These could result in unexpected results */ last_entry = first_entry + (count/sizeof(struct dirent)) * sizeof(struct dirent); /* The directory was not empty so try to move to the desired entry in chain*/ for ( 114494: e9 9c 00 00 00 jmp 114535 <== ALWAYS TAKEN current_entry = 0; current_entry < last_entry; current_entry = current_entry + sizeof(struct dirent) ){ if ( rtems_chain_is_tail( the_chain, the_node ) ){ 114499: 3b 9d cc fe ff ff cmp -0x134(%ebp),%ebx 11449f: 0f 84 a2 00 00 00 je 114547 /* entry in the read */ return bytes_transferred; /* Indicate that there are no more */ /* entries to return */ } if( current_entry >= first_entry ) { 1144a5: 8b 85 c8 fe ff ff mov -0x138(%ebp),%eax 1144ab: 39 85 d4 fe ff ff cmp %eax,-0x12c(%ebp) 1144b1: 7c 76 jl 114529 /* Move the entry to the return buffer */ tmp_dirent.d_off = current_entry; 1144b3: 8b 95 d4 fe ff ff mov -0x12c(%ebp),%edx 1144b9: 89 95 e0 fe ff ff mov %edx,-0x120(%ebp) tmp_dirent.d_reclen = sizeof( struct dirent ); 1144bf: 66 c7 85 e4 fe ff ff movw $0x10c,-0x11c(%ebp) 1144c6: 0c 01 the_jnode = (IMFS_jnode_t *) the_node; tmp_dirent.d_ino = the_jnode->st_ino; 1144c8: 8b 43 38 mov 0x38(%ebx),%eax 1144cb: 89 85 dc fe ff ff mov %eax,-0x124(%ebp) tmp_dirent.d_namlen = strlen( the_jnode->name ); 1144d1: 8d 53 0c lea 0xc(%ebx),%edx 1144d4: 31 c0 xor %eax,%eax 1144d6: 83 c9 ff or $0xffffffff,%ecx 1144d9: 89 d7 mov %edx,%edi 1144db: f2 ae repnz scas %es:(%edi),%al 1144dd: f7 d1 not %ecx 1144df: 49 dec %ecx 1144e0: 66 89 8d e6 fe ff ff mov %cx,-0x11a(%ebp) strcpy( tmp_dirent.d_name, the_jnode->name ); 1144e7: 51 push %ecx 1144e8: 51 push %ecx 1144e9: 52 push %edx 1144ea: 8d 8d e8 fe ff ff lea -0x118(%ebp),%ecx 1144f0: 51 push %ecx 1144f1: e8 da 0e 00 00 call 1153d0 memcpy( 1144f6: 8b 45 0c mov 0xc(%ebp),%eax 1144f9: 03 85 d0 fe ff ff add -0x130(%ebp),%eax 1144ff: b9 43 00 00 00 mov $0x43,%ecx 114504: 89 c7 mov %eax,%edi 114506: 8b b5 b4 fe ff ff mov -0x14c(%ebp),%esi 11450c: f3 a5 rep movsl %ds:(%esi),%es:(%edi) buffer + bytes_transferred, (void *)&tmp_dirent, sizeof( struct dirent ) ); iop->offset = iop->offset + sizeof(struct dirent); 11450e: 8b 45 08 mov 0x8(%ebp),%eax 114511: 81 40 0c 0c 01 00 00 addl $0x10c,0xc(%eax) 114518: 83 50 10 00 adcl $0x0,0x10(%eax) bytes_transferred = bytes_transferred + sizeof( struct dirent ); 11451c: 81 85 d0 fe ff ff 0c addl $0x10c,-0x130(%ebp) 114523: 01 00 00 114526: 83 c4 10 add $0x10,%esp } the_node = the_node->next; 114529: 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( 11452b: 81 85 d4 fe ff ff 0c addl $0x10c,-0x12c(%ebp) 114532: 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 ( 114535: 8b 95 c4 fe ff ff mov -0x13c(%ebp),%edx 11453b: 39 95 d4 fe ff ff cmp %edx,-0x12c(%ebp) 114541: 0f 8c 52 ff ff ff jl 114499 114547: 8b 95 d0 fe ff ff mov -0x130(%ebp),%edx the_node = the_node->next; } /* Success */ return bytes_transferred; } 11454d: 89 d0 mov %edx,%eax 11454f: 8d 65 f4 lea -0xc(%ebp),%esp 114552: 5b pop %ebx 114553: 5e pop %esi 114554: 5f pop %edi 114555: c9 leave 114556: c3 ret 00114371 : int imfs_dir_rmnod( rtems_filesystem_location_info_t *parent_pathloc, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN */ ) { 114371: 55 push %ebp 114372: 89 e5 mov %esp,%ebp 114374: 56 push %esi 114375: 53 push %ebx 114376: 83 ec 10 sub $0x10,%esp 114379: 8b 75 0c mov 0xc(%ebp),%esi IMFS_jnode_t *the_jnode; the_jnode = (IMFS_jnode_t *) pathloc->node_access; 11437c: 8b 1e mov (%esi),%ebx 11437e: 8d 43 54 lea 0x54(%ebx),%eax 114381: 39 43 50 cmp %eax,0x50(%ebx) 114384: 74 0d je 114393 /* * You cannot remove a node that still has children */ if ( ! rtems_chain_is_empty( &the_jnode->info.directory.Entries ) ) rtems_set_errno_and_return_minus_one( ENOTEMPTY ); 114386: e8 99 05 00 00 call 114924 <__errno> <== ALWAYS TAKEN 11438b: c7 00 5a 00 00 00 movl $0x5a,(%eax) 114391: eb 19 jmp 1143ac <== ALWAYS TAKEN /* * You cannot remove the file system root node. */ if ( pathloc->mt_entry->mt_fs_root.node_access == pathloc->node_access ) 114393: 8b 46 10 mov 0x10(%esi),%eax 114396: 39 58 1c cmp %ebx,0x1c(%eax) 114399: 74 06 je 1143a1 /* * You cannot remove a mountpoint. */ if ( the_jnode->info.directory.mt_fs != NULL ) 11439b: 83 7b 5c 00 cmpl $0x0,0x5c(%ebx) 11439f: 74 10 je 1143b1 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EBUSY ); 1143a1: e8 7e 05 00 00 call 114924 <__errno> <== ALWAYS TAKEN 1143a6: c7 00 10 00 00 00 movl $0x10,(%eax) 1143ac: 83 c8 ff or $0xffffffff,%eax 1143af: eb 6b jmp 11441c <== ALWAYS TAKEN /* * Take the node out of the parent's chain that contains this node */ if ( the_jnode->Parent != NULL ) { 1143b1: 83 7b 08 00 cmpl $0x0,0x8(%ebx) 1143b5: 74 13 je 1143ca 1143b7: 83 ec 0c sub $0xc,%esp 1143ba: 53 push %ebx 1143bb: e8 90 79 ff ff call 10bd50 <_Chain_Extract> rtems_chain_extract( (rtems_chain_node *) the_jnode ); the_jnode->Parent = NULL; 1143c0: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx) 1143c7: 83 c4 10 add $0x10,%esp /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; 1143ca: 66 ff 4b 34 decw 0x34(%ebx) IMFS_update_ctime( the_jnode ); 1143ce: 50 push %eax 1143cf: 50 push %eax 1143d0: 6a 00 push $0x0 1143d2: 8d 45 f0 lea -0x10(%ebp),%eax 1143d5: 50 push %eax 1143d6: e8 39 3f ff ff call 108314 1143db: 8b 45 f0 mov -0x10(%ebp),%eax 1143de: 89 43 48 mov %eax,0x48(%ebx) /* * The file cannot be open and the link must be less than 1 to free. */ if ( !rtems_libio_is_file_open( the_jnode ) && (the_jnode->st_nlink < 1) ) { 1143e1: 89 1c 24 mov %ebx,(%esp) 1143e4: e8 c1 da ff ff call 111eaa 1143e9: 83 c4 10 add $0x10,%esp 1143ec: 85 c0 test %eax,%eax 1143ee: 75 2a jne 11441a 1143f0: 66 83 7b 34 00 cmpw $0x0,0x34(%ebx) 1143f5: 75 23 jne 11441a /* * Is the rtems_filesystem_current is this node? */ if ( rtems_filesystem_current.node_access == pathloc->node_access ) 1143f7: a1 0c 61 12 00 mov 0x12610c,%eax 1143fc: 8b 50 04 mov 0x4(%eax),%edx 1143ff: 3b 16 cmp (%esi),%edx 114401: 75 07 jne 11440a <== NEVER TAKEN rtems_filesystem_current.node_access = NULL; 114403: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax) <== NOT EXECUTED /* * Free memory associated with a memory file. */ free( the_jnode ); 11440a: 83 ec 0c sub $0xc,%esp 11440d: 53 push %ebx 11440e: e8 89 3e ff ff call 10829c 114413: 31 c0 xor %eax,%eax 114415: 83 c4 10 add $0x10,%esp 114418: eb 02 jmp 11441c <== ALWAYS TAKEN 11441a: 31 c0 xor %eax,%eax } return 0; } 11441c: 8d 65 f8 lea -0x8(%ebp),%esp 11441f: 5b pop %ebx 114420: 5e pop %esi 114421: c9 leave 114422: c3 ret 00125a3a : /* * Initialize useable but dummy databases */ void init_etc_passwd_group(void) { 125a3a: 55 push %ebp 125a3b: 89 e5 mov %esp,%ebp 125a3d: 53 push %ebx 125a3e: 83 ec 04 sub $0x4,%esp FILE *fp; static char etc_passwd_initted = 0; if (etc_passwd_initted) 125a41: 80 3d 3c 2f 16 00 00 cmpb $0x0,0x162f3c 125a48: 0f 85 b8 00 00 00 jne 125b06 return; etc_passwd_initted = 1; 125a4e: c6 05 3c 2f 16 00 01 movb $0x1,0x162f3c mkdir("/etc", 0777); 125a55: 50 push %eax 125a56: 50 push %eax 125a57: 68 ff 01 00 00 push $0x1ff 125a5c: 68 66 eb 14 00 push $0x14eb66 125a61: e8 92 63 fe ff call 10bdf8 /* * Initialize /etc/passwd */ if ((fp = fopen("/etc/passwd", "r")) != NULL) { 125a66: 59 pop %ecx 125a67: 5b pop %ebx 125a68: 68 03 16 15 00 push $0x151603 125a6d: 68 80 ec 14 00 push $0x14ec80 125a72: e8 95 32 01 00 call 138d0c 125a77: 83 c4 10 add $0x10,%esp 125a7a: 85 c0 test %eax,%eax 125a7c: 74 06 je 125a84 <== NEVER TAKEN fclose(fp); 125a7e: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 125a81: 50 push %eax <== NOT EXECUTED 125a82: eb 2a jmp 125aae <== NOT EXECUTED } else if ((fp = fopen("/etc/passwd", "w")) != NULL) { 125a84: 52 push %edx 125a85: 52 push %edx 125a86: 68 74 12 15 00 push $0x151274 125a8b: 68 80 ec 14 00 push $0x14ec80 125a90: e8 77 32 01 00 call 138d0c 125a95: 89 c3 mov %eax,%ebx 125a97: 83 c4 10 add $0x10,%esp 125a9a: 85 c0 test %eax,%eax 125a9c: 74 18 je 125ab6 <== ALWAYS TAKEN fprintf(fp, "root:*:0:0:root::/:/bin/sh\n" 125a9e: 50 push %eax 125a9f: 50 push %eax 125aa0: 53 push %ebx 125aa1: 68 dc 4a 15 00 push $0x154adc 125aa6: e8 a5 33 01 00 call 138e50 "rtems:*:1:1:RTEMS Application::/:/bin/sh\n" "tty:!:2:2:tty owner::/:/bin/false\n" ); fclose(fp); 125aab: 89 1c 24 mov %ebx,(%esp) 125aae: e8 69 2a 01 00 call 13851c 125ab3: 83 c4 10 add $0x10,%esp } /* * Initialize /etc/group */ if ((fp = fopen("/etc/group", "r")) != NULL) { 125ab6: 51 push %ecx 125ab7: 51 push %ecx 125ab8: 68 03 16 15 00 push $0x151603 125abd: 68 c5 ec 14 00 push $0x14ecc5 125ac2: e8 45 32 01 00 call 138d0c 125ac7: 83 c4 10 add $0x10,%esp 125aca: 85 c0 test %eax,%eax 125acc: 74 06 je 125ad4 <== NEVER TAKEN fclose(fp); 125ace: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 125ad1: 50 push %eax <== NOT EXECUTED 125ad2: eb 2a jmp 125afe <== NOT EXECUTED } else if ((fp = fopen("/etc/group", "w")) != NULL) { 125ad4: 52 push %edx 125ad5: 52 push %edx 125ad6: 68 74 12 15 00 push $0x151274 125adb: 68 c5 ec 14 00 push $0x14ecc5 125ae0: e8 27 32 01 00 call 138d0c 125ae5: 89 c3 mov %eax,%ebx 125ae7: 83 c4 10 add $0x10,%esp 125aea: 85 c0 test %eax,%eax 125aec: 74 18 je 125b06 <== ALWAYS TAKEN fprintf( fp, "root:x:0:root\n" 125aee: 50 push %eax 125aef: 50 push %eax 125af0: 53 push %ebx 125af1: 68 43 4b 15 00 push $0x154b43 125af6: e8 55 33 01 00 call 138e50 "rtems:x:1:rtems\n" "tty:x:2:tty\n" ); fclose(fp); 125afb: 89 1c 24 mov %ebx,(%esp) 125afe: e8 19 2a 01 00 call 13851c 125b03: 83 c4 10 add $0x10,%esp } } 125b06: 8b 5d fc mov -0x4(%ebp),%ebx 125b09: c9 leave 125b0a: c3 ret 0010a1d4 : int ioctl( int fd, ioctl_command_t command, ... ) { 10a1d4: 55 push %ebp 10a1d5: 89 e5 mov %esp,%ebp 10a1d7: 83 ec 08 sub $0x8,%esp 10a1da: 8b 45 08 mov 0x8(%ebp),%eax va_list ap; rtems_status_code rc; rtems_libio_t *iop; void *buffer; rtems_libio_check_fd( fd ); 10a1dd: 3b 05 64 45 12 00 cmp 0x124564,%eax 10a1e3: 73 19 jae 10a1fe iop = rtems_libio_iop( fd ); 10a1e5: c1 e0 06 shl $0x6,%eax 10a1e8: 03 05 f0 84 12 00 add 0x1284f0,%eax rtems_libio_check_is_open(iop); 10a1ee: f6 40 15 01 testb $0x1,0x15(%eax) 10a1f2: 74 0a je 10a1fe <== ALWAYS TAKEN va_start(ap, command); buffer = va_arg(ap, void *); 10a1f4: 8b 4d 10 mov 0x10(%ebp),%ecx /* * Now process the ioctl(). */ if ( !iop->handlers ) 10a1f7: 8b 50 3c mov 0x3c(%eax),%edx 10a1fa: 85 d2 test %edx,%edx 10a1fc: 75 0d jne 10a20b <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EBADF ); 10a1fe: e8 39 a9 00 00 call 114b3c <__errno> 10a203: c7 00 09 00 00 00 movl $0x9,(%eax) 10a209: eb 12 jmp 10a21d <== ALWAYS TAKEN if ( !iop->handlers->ioctl_h ) 10a20b: 8b 52 10 mov 0x10(%edx),%edx 10a20e: 85 d2 test %edx,%edx 10a210: 75 10 jne 10a222 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); 10a212: e8 25 a9 00 00 call 114b3c <__errno> <== NOT EXECUTED 10a217: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 10a21d: 83 c8 ff or $0xffffffff,%eax 10a220: eb 0d jmp 10a22f <== ALWAYS TAKEN rc = (*iop->handlers->ioctl_h)( iop, command, buffer ); 10a222: 83 ec 04 sub $0x4,%esp 10a225: 51 push %ecx 10a226: ff 75 0c pushl 0xc(%ebp) 10a229: 50 push %eax 10a22a: ff d2 call *%edx return rc; 10a22c: 83 c4 10 add $0x10,%esp } 10a22f: c9 leave 10a230: c3 ret 00108770 : /* * Process a single input character */ static int iproc (unsigned char c, struct rtems_termios_tty *tty) { 108770: 55 push %ebp <== NOT EXECUTED 108771: 89 e5 mov %esp,%ebp <== NOT EXECUTED 108773: 53 push %ebx <== NOT EXECUTED 108774: 83 ec 14 sub $0x14,%esp <== NOT EXECUTED 108777: 89 d3 mov %edx,%ebx <== NOT EXECUTED 108779: 88 c1 mov %al,%cl <== NOT EXECUTED if (tty->termios.c_iflag & ISTRIP) 10877b: 8b 42 30 mov 0x30(%edx),%eax <== NOT EXECUTED 10877e: a8 20 test $0x20,%al <== NOT EXECUTED 108780: 74 03 je 108785 <== NOT EXECUTED c &= 0x7f; 108782: 83 e1 7f and $0x7f,%ecx <== NOT EXECUTED if (tty->termios.c_iflag & IUCLC) 108785: f6 c4 02 test $0x2,%ah <== NOT EXECUTED 108788: 74 17 je 1087a1 <== NOT EXECUTED c = tolower (c); 10878a: 0f b6 c9 movzbl %cl,%ecx <== NOT EXECUTED 10878d: 8b 15 dc 16 12 00 mov 0x1216dc,%edx <== NOT EXECUTED 108793: 0f be 54 0a 01 movsbl 0x1(%edx,%ecx,1),%edx <== NOT EXECUTED 108798: 83 e2 03 and $0x3,%edx <== NOT EXECUTED 10879b: 4a dec %edx <== NOT EXECUTED 10879c: 75 03 jne 1087a1 <== NOT EXECUTED 10879e: 83 c1 20 add $0x20,%ecx <== NOT EXECUTED if (c == '\r') { 1087a1: 80 f9 0d cmp $0xd,%cl <== NOT EXECUTED 1087a4: 75 11 jne 1087b7 <== NOT EXECUTED if (tty->termios.c_iflag & IGNCR) 1087a6: 84 c0 test %al,%al <== NOT EXECUTED 1087a8: 0f 88 d3 00 00 00 js 108881 <== NOT EXECUTED return 0; if (tty->termios.c_iflag & ICRNL) 1087ae: f6 c4 01 test $0x1,%ah <== NOT EXECUTED 1087b1: 74 19 je 1087cc <== NOT EXECUTED 1087b3: b1 0a mov $0xa,%cl <== NOT EXECUTED 1087b5: eb 15 jmp 1087cc <== NOT EXECUTED c = '\n'; } else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) { 1087b7: 80 f9 0a cmp $0xa,%cl <== NOT EXECUTED 1087ba: 75 08 jne 1087c4 <== NOT EXECUTED 1087bc: a8 40 test $0x40,%al <== NOT EXECUTED 1087be: 74 0c je 1087cc <== NOT EXECUTED 1087c0: b1 0d mov $0xd,%cl <== NOT EXECUTED 1087c2: eb 08 jmp 1087cc <== NOT EXECUTED c = '\r'; } if ((c != '\0') && (tty->termios.c_lflag & ICANON)) { 1087c4: 84 c9 test %cl,%cl <== NOT EXECUTED 1087c6: 0f 84 87 00 00 00 je 108853 <== NOT EXECUTED 1087cc: 8b 53 3c mov 0x3c(%ebx),%edx <== NOT EXECUTED 1087cf: f6 c2 02 test $0x2,%dl <== NOT EXECUTED 1087d2: 74 7f je 108853 <== NOT EXECUTED if (c == tty->termios.c_cc[VERASE]) { 1087d4: 3a 4b 43 cmp 0x43(%ebx),%cl <== NOT EXECUTED 1087d7: 75 04 jne 1087dd <== NOT EXECUTED erase (tty, 0); 1087d9: 31 d2 xor %edx,%edx <== NOT EXECUTED 1087db: eb 0a jmp 1087e7 <== NOT EXECUTED return 0; } else if (c == tty->termios.c_cc[VKILL]) { 1087dd: 3a 4b 44 cmp 0x44(%ebx),%cl <== NOT EXECUTED 1087e0: 75 11 jne 1087f3 <== NOT EXECUTED erase (tty, 1); 1087e2: ba 01 00 00 00 mov $0x1,%edx <== NOT EXECUTED 1087e7: 89 d8 mov %ebx,%eax <== NOT EXECUTED 1087e9: e8 09 fe ff ff call 1085f7 <== NOT EXECUTED 1087ee: e9 8e 00 00 00 jmp 108881 <== NOT EXECUTED return 0; } else if (c == tty->termios.c_cc[VEOF]) { 1087f3: b8 01 00 00 00 mov $0x1,%eax <== NOT EXECUTED 1087f8: 3a 4b 45 cmp 0x45(%ebx),%cl <== NOT EXECUTED 1087fb: 0f 84 82 00 00 00 je 108883 <== NOT EXECUTED return 1; } else if (c == '\n') { 108801: 80 f9 0a cmp $0xa,%cl <== NOT EXECUTED 108804: 75 1a jne 108820 <== NOT EXECUTED if (tty->termios.c_lflag & (ECHO | ECHONL)) 108806: 80 e2 48 and $0x48,%dl <== NOT EXECUTED 108809: 74 09 je 108814 <== NOT EXECUTED echo (c, tty); 10880b: 89 da mov %ebx,%edx <== NOT EXECUTED 10880d: b0 0a mov $0xa,%al <== NOT EXECUTED 10880f: e8 8b fd ff ff call 10859f <== NOT EXECUTED tty->cbuf[tty->ccount++] = c; 108814: 8b 43 20 mov 0x20(%ebx),%eax <== NOT EXECUTED 108817: 8b 53 1c mov 0x1c(%ebx),%edx <== NOT EXECUTED 10881a: c6 04 02 0a movb $0xa,(%edx,%eax,1) <== NOT EXECUTED 10881e: eb 28 jmp 108848 <== NOT EXECUTED return 1; } else if ((c == tty->termios.c_cc[VEOL]) 108820: 3a 4b 4c cmp 0x4c(%ebx),%cl <== NOT EXECUTED 108823: 74 05 je 10882a <== NOT EXECUTED || (c == tty->termios.c_cc[VEOL2])) { 108825: 3a 4b 51 cmp 0x51(%ebx),%cl <== NOT EXECUTED 108828: 75 29 jne 108853 <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) 10882a: 80 e2 08 and $0x8,%dl <== NOT EXECUTED 10882d: 74 10 je 10883f <== NOT EXECUTED echo (c, tty); 10882f: 0f b6 c1 movzbl %cl,%eax <== NOT EXECUTED 108832: 89 da mov %ebx,%edx <== NOT EXECUTED 108834: 88 4d f4 mov %cl,-0xc(%ebp) <== NOT EXECUTED 108837: e8 63 fd ff ff call 10859f <== NOT EXECUTED 10883c: 8a 4d f4 mov -0xc(%ebp),%cl <== NOT EXECUTED tty->cbuf[tty->ccount++] = c; 10883f: 8b 43 20 mov 0x20(%ebx),%eax <== NOT EXECUTED 108842: 8b 53 1c mov 0x1c(%ebx),%edx <== NOT EXECUTED 108845: 88 0c 02 mov %cl,(%edx,%eax,1) <== NOT EXECUTED 108848: 40 inc %eax <== NOT EXECUTED 108849: 89 43 20 mov %eax,0x20(%ebx) <== NOT EXECUTED 10884c: b8 01 00 00 00 mov $0x1,%eax <== NOT EXECUTED return 1; 108851: eb 30 jmp 108883 <== NOT EXECUTED } /* * FIXME: Should do IMAXBEL handling somehow */ if (tty->ccount < (CBUFSIZE-1)) { 108853: a1 50 16 12 00 mov 0x121650,%eax <== NOT EXECUTED 108858: 48 dec %eax <== NOT EXECUTED 108859: 39 43 20 cmp %eax,0x20(%ebx) <== NOT EXECUTED 10885c: 7d 23 jge 108881 <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) 10885e: f6 43 3c 08 testb $0x8,0x3c(%ebx) <== NOT EXECUTED 108862: 74 10 je 108874 <== NOT EXECUTED echo (c, tty); 108864: 0f b6 c1 movzbl %cl,%eax <== NOT EXECUTED 108867: 89 da mov %ebx,%edx <== NOT EXECUTED 108869: 88 4d f4 mov %cl,-0xc(%ebp) <== NOT EXECUTED 10886c: e8 2e fd ff ff call 10859f <== NOT EXECUTED 108871: 8a 4d f4 mov -0xc(%ebp),%cl <== NOT EXECUTED tty->cbuf[tty->ccount++] = c; 108874: 8b 43 20 mov 0x20(%ebx),%eax <== NOT EXECUTED 108877: 8b 53 1c mov 0x1c(%ebx),%edx <== NOT EXECUTED 10887a: 88 0c 02 mov %cl,(%edx,%eax,1) <== NOT EXECUTED 10887d: 40 inc %eax <== NOT EXECUTED 10887e: 89 43 20 mov %eax,0x20(%ebx) <== NOT EXECUTED 108881: 31 c0 xor %eax,%eax <== NOT EXECUTED } return 0; } 108883: 83 c4 14 add $0x14,%esp <== NOT EXECUTED 108886: 5b pop %ebx <== NOT EXECUTED 108887: c9 leave <== NOT EXECUTED 108888: c3 ret <== NOT EXECUTED 00121680 : * These are directly supported (and completely correct) in the posix api. */ #if !defined(RTEMS_POSIX_API) int kill( pid_t pid, int sig ) { 121680: 55 push %ebp <== NOT EXECUTED 121681: 89 e5 mov %esp,%ebp <== NOT EXECUTED return 0; } 121683: 31 c0 xor %eax,%eax <== NOT EXECUTED 121685: c9 leave <== NOT EXECUTED 121686: c3 ret <== NOT EXECUTED 0011b68c : extern void _wrapup_reent(struct _reent *); extern void _reclaim_reent(struct _reent *); void libc_wrapup(void) { 11b68c: 55 push %ebp 11b68d: 89 e5 mov %esp,%ebp 11b68f: 53 push %ebx 11b690: 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())) 11b693: 83 3d 0c 3a 12 00 03 cmpl $0x3,0x123a0c 11b69a: 75 4f jne 11b6eb /* * This was already done if the user called exit() directly . _wrapup_reent(0); */ if (_REENT != _global_impure_ptr) { 11b69c: 8b 1d 80 de 11 00 mov 0x11de80,%ebx 11b6a2: 39 1d e0 16 12 00 cmp %ebx,0x1216e0 11b6a8: 74 12 je 11b6bc _wrapup_reent(_global_impure_ptr); 11b6aa: 83 ec 0c sub $0xc,%esp 11b6ad: 53 push %ebx 11b6ae: e8 b1 04 00 00 call 11bb64 <_wrapup_reent> <== ALWAYS TAKEN /* 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; 11b6b3: 89 1d e0 16 12 00 mov %ebx,0x1216e0 11b6b9: 83 c4 10 add $0x10,%esp * * Should this be changed to do *all* file streams? * _fwalk (_REENT, fclose); */ fclose (stdin); 11b6bc: 83 ec 0c sub $0xc,%esp 11b6bf: a1 e0 16 12 00 mov 0x1216e0,%eax 11b6c4: ff 70 04 pushl 0x4(%eax) 11b6c7: e8 d0 4c ff ff call 11039c fclose (stdout); 11b6cc: 5a pop %edx 11b6cd: a1 e0 16 12 00 mov 0x1216e0,%eax 11b6d2: ff 70 08 pushl 0x8(%eax) 11b6d5: e8 c2 4c ff ff call 11039c fclose (stderr); 11b6da: 58 pop %eax 11b6db: a1 e0 16 12 00 mov 0x1216e0,%eax 11b6e0: ff 70 0c pushl 0xc(%eax) 11b6e3: e8 b4 4c ff ff call 11039c 11b6e8: 83 c4 10 add $0x10,%esp } 11b6eb: 8b 5d fc mov -0x4(%ebp),%ebx 11b6ee: c9 leave 11b6ef: c3 ret 00125eb4 : int link( const char *existing, const char *new ) { 125eb4: 55 push %ebp 125eb5: 89 e5 mov %esp,%ebp 125eb7: 57 push %edi 125eb8: 56 push %esi 125eb9: 53 push %ebx 125eba: 83 ec 48 sub $0x48,%esp 125ebd: 8b 55 08 mov 0x8(%ebp),%edx 125ec0: 8b 5d 0c mov 0xc(%ebp),%ebx /* * Get the node we are linking to. */ result = rtems_filesystem_evaluate_path( existing, strlen( existing ), 125ec3: 31 c0 xor %eax,%eax 125ec5: 83 c9 ff or $0xffffffff,%ecx 125ec8: 89 d7 mov %edx,%edi 125eca: f2 ae repnz scas %es:(%edi),%al 125ecc: f7 d1 not %ecx 125ece: 49 dec %ecx 125ecf: 6a 01 push $0x1 125ed1: 8d 45 d0 lea -0x30(%ebp),%eax 125ed4: 50 push %eax 125ed5: 6a 00 push $0x0 125ed7: 51 push %ecx 125ed8: 52 push %edx 125ed9: e8 3e 58 fe ff call 10b71c <== ALWAYS TAKEN 0, &existing_loc, true ); if ( result != 0 ) 125ede: 83 c4 20 add $0x20,%esp 125ee1: 83 ce ff or $0xffffffff,%esi 125ee4: 85 c0 test %eax,%eax 125ee6: 0f 85 80 01 00 00 jne 12606c /* * Get the parent of the node we are creating. */ rtems_filesystem_get_start_loc( new, &i, &parent_loc ); 125eec: 8a 03 mov (%ebx),%al 125eee: 3c 5c cmp $0x5c,%al 125ef0: 74 08 je 125efa <== ALWAYS TAKEN 125ef2: 3c 2f cmp $0x2f,%al 125ef4: 74 04 je 125efa 125ef6: 84 c0 test %al,%al 125ef8: 75 1a jne 125f14 <== NEVER TAKEN 125efa: 8d 7d bc lea -0x44(%ebp),%edi 125efd: 8b 35 78 db 15 00 mov 0x15db78,%esi 125f03: 83 c6 18 add $0x18,%esi 125f06: b9 05 00 00 00 mov $0x5,%ecx 125f0b: f3 a5 rep movsl %ds:(%esi),%es:(%edi) 125f0d: ba 01 00 00 00 mov $0x1,%edx 125f12: eb 15 jmp 125f29 <== ALWAYS TAKEN 125f14: 8d 7d bc lea -0x44(%ebp),%edi 125f17: 8b 35 78 db 15 00 mov 0x15db78,%esi 125f1d: 83 c6 04 add $0x4,%esi 125f20: b9 05 00 00 00 mov $0x5,%ecx 125f25: f3 a5 rep movsl %ds:(%esi),%es:(%edi) 125f27: 31 d2 xor %edx,%edx if ( !parent_loc.ops->evalformake_h ) { 125f29: 8b 45 c8 mov -0x38(%ebp),%eax 125f2c: 8b 40 04 mov 0x4(%eax),%eax 125f2f: 85 c0 test %eax,%eax 125f31: 75 21 jne 125f54 <== NEVER TAKEN rtems_filesystem_freenode( &existing_loc ); 125f33: 8b 45 dc mov -0x24(%ebp),%eax <== NOT EXECUTED 125f36: 85 c0 test %eax,%eax <== NOT EXECUTED 125f38: 0f 84 dd 00 00 00 je 12601b <== NOT EXECUTED 125f3e: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 125f41: 85 c0 test %eax,%eax <== NOT EXECUTED 125f43: 0f 84 d2 00 00 00 je 12601b <== NOT EXECUTED 125f49: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 125f4c: 8d 55 d0 lea -0x30(%ebp),%edx <== NOT EXECUTED 125f4f: e9 c1 00 00 00 jmp 126015 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*parent_loc.ops->evalformake_h)( &new[i], &parent_loc, &name_start ); 125f54: 51 push %ecx 125f55: 8d 4d e4 lea -0x1c(%ebp),%ecx 125f58: 51 push %ecx 125f59: 8d 75 bc lea -0x44(%ebp),%esi 125f5c: 56 push %esi 125f5d: 01 d3 add %edx,%ebx 125f5f: 53 push %ebx 125f60: ff d0 call *%eax 125f62: 89 c3 mov %eax,%ebx if ( result != 0 ) { 125f64: 83 c4 10 add $0x10,%esp 125f67: 85 c0 test %eax,%eax 125f69: 74 29 je 125f94 rtems_filesystem_freenode( &existing_loc ); 125f6b: 8b 45 dc mov -0x24(%ebp),%eax 125f6e: 85 c0 test %eax,%eax 125f70: 74 13 je 125f85 <== ALWAYS TAKEN 125f72: 8b 40 1c mov 0x1c(%eax),%eax 125f75: 85 c0 test %eax,%eax 125f77: 74 0c je 125f85 <== ALWAYS TAKEN 125f79: 83 ec 0c sub $0xc,%esp 125f7c: 8d 55 d0 lea -0x30(%ebp),%edx 125f7f: 52 push %edx 125f80: ff d0 call *%eax 125f82: 83 c4 10 add $0x10,%esp rtems_set_errno_and_return_minus_one( result ); 125f85: e8 46 24 01 00 call 1383d0 <__errno> 125f8a: 89 18 mov %ebx,(%eax) 125f8c: 83 ce ff or $0xffffffff,%esi 125f8f: e9 d8 00 00 00 jmp 12606c <== ALWAYS TAKEN /* * Check to see if the caller is trying to link across file system * boundaries. */ if ( parent_loc.mt_entry != existing_loc.mt_entry ) { 125f94: 8b 45 cc mov -0x34(%ebp),%eax 125f97: 3b 45 e0 cmp -0x20(%ebp),%eax 125f9a: 74 41 je 125fdd rtems_filesystem_freenode( &existing_loc ); 125f9c: 8b 45 dc mov -0x24(%ebp),%eax 125f9f: 85 c0 test %eax,%eax 125fa1: 74 13 je 125fb6 <== ALWAYS TAKEN 125fa3: 8b 40 1c mov 0x1c(%eax),%eax 125fa6: 85 c0 test %eax,%eax 125fa8: 74 0c je 125fb6 <== ALWAYS TAKEN 125faa: 83 ec 0c sub $0xc,%esp 125fad: 8d 55 d0 lea -0x30(%ebp),%edx 125fb0: 52 push %edx 125fb1: ff d0 call *%eax 125fb3: 83 c4 10 add $0x10,%esp rtems_filesystem_freenode( &parent_loc ); 125fb6: 8b 45 c8 mov -0x38(%ebp),%eax 125fb9: 85 c0 test %eax,%eax 125fbb: 74 13 je 125fd0 <== ALWAYS TAKEN 125fbd: 8b 40 1c mov 0x1c(%eax),%eax 125fc0: 85 c0 test %eax,%eax 125fc2: 74 0c je 125fd0 <== ALWAYS TAKEN 125fc4: 83 ec 0c sub $0xc,%esp 125fc7: 8d 55 bc lea -0x44(%ebp),%edx 125fca: 52 push %edx 125fcb: ff d0 call *%eax 125fcd: 83 c4 10 add $0x10,%esp rtems_set_errno_and_return_minus_one( EXDEV ); 125fd0: e8 fb 23 01 00 call 1383d0 <__errno> 125fd5: c7 00 12 00 00 00 movl $0x12,(%eax) 125fdb: eb af jmp 125f8c <== ALWAYS TAKEN } if ( !parent_loc.ops->link_h ) { 125fdd: 8b 45 c8 mov -0x38(%ebp),%eax 125fe0: 8b 40 08 mov 0x8(%eax),%eax 125fe3: 85 c0 test %eax,%eax 125fe5: 75 44 jne 12602b <== NEVER TAKEN rtems_filesystem_freenode( &existing_loc ); 125fe7: 8b 45 dc mov -0x24(%ebp),%eax <== NOT EXECUTED 125fea: 85 c0 test %eax,%eax <== NOT EXECUTED 125fec: 74 13 je 126001 <== NOT EXECUTED 125fee: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 125ff1: 85 c0 test %eax,%eax <== NOT EXECUTED 125ff3: 74 0c je 126001 <== NOT EXECUTED 125ff5: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 125ff8: 8d 55 d0 lea -0x30(%ebp),%edx <== NOT EXECUTED 125ffb: 52 push %edx <== NOT EXECUTED 125ffc: ff d0 call *%eax <== NOT EXECUTED 125ffe: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_filesystem_freenode( &parent_loc ); 126001: 8b 45 c8 mov -0x38(%ebp),%eax <== NOT EXECUTED 126004: 85 c0 test %eax,%eax <== NOT EXECUTED 126006: 74 13 je 12601b <== NOT EXECUTED 126008: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 12600b: 85 c0 test %eax,%eax <== NOT EXECUTED 12600d: 74 0c je 12601b <== NOT EXECUTED 12600f: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 126012: 8d 55 bc lea -0x44(%ebp),%edx <== NOT EXECUTED 126015: 52 push %edx <== NOT EXECUTED 126016: ff d0 call *%eax <== NOT EXECUTED 126018: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 12601b: e8 b0 23 01 00 call 1383d0 <__errno> <== NOT EXECUTED 126020: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 126026: e9 61 ff ff ff jmp 125f8c <== NOT EXECUTED } result = (*parent_loc.ops->link_h)( &existing_loc, &parent_loc, name_start ); 12602b: 52 push %edx 12602c: ff 75 e4 pushl -0x1c(%ebp) 12602f: 56 push %esi 126030: 8d 5d d0 lea -0x30(%ebp),%ebx 126033: 53 push %ebx 126034: ff d0 call *%eax 126036: 89 c6 mov %eax,%esi rtems_filesystem_freenode( &existing_loc ); 126038: 8b 45 dc mov -0x24(%ebp),%eax 12603b: 83 c4 10 add $0x10,%esp 12603e: 85 c0 test %eax,%eax 126040: 74 10 je 126052 <== ALWAYS TAKEN 126042: 8b 40 1c mov 0x1c(%eax),%eax 126045: 85 c0 test %eax,%eax 126047: 74 09 je 126052 <== ALWAYS TAKEN 126049: 83 ec 0c sub $0xc,%esp 12604c: 53 push %ebx 12604d: ff d0 call *%eax 12604f: 83 c4 10 add $0x10,%esp rtems_filesystem_freenode( &parent_loc ); 126052: 8b 45 c8 mov -0x38(%ebp),%eax 126055: 85 c0 test %eax,%eax 126057: 74 13 je 12606c <== ALWAYS TAKEN 126059: 8b 40 1c mov 0x1c(%eax),%eax 12605c: 85 c0 test %eax,%eax 12605e: 74 0c je 12606c <== ALWAYS TAKEN 126060: 83 ec 0c sub $0xc,%esp 126063: 8d 55 bc lea -0x44(%ebp),%edx 126066: 52 push %edx 126067: ff d0 call *%eax 126069: 83 c4 10 add $0x10,%esp return result; } 12606c: 89 f0 mov %esi,%eax 12606e: 8d 65 f4 lea -0xc(%ebp),%esp 126071: 5b pop %ebx 126072: 5e pop %esi 126073: 5f pop %edi 126074: c9 leave 126075: c3 ret 0011b58c : off_t lseek( int fd, off_t offset, int whence ) { 11b58c: 55 push %ebp 11b58d: 89 e5 mov %esp,%ebp 11b58f: 57 push %edi 11b590: 56 push %esi 11b591: 53 push %ebx 11b592: 83 ec 1c sub $0x1c,%esp 11b595: 8b 5d 08 mov 0x8(%ebp),%ebx 11b598: 8b 45 0c mov 0xc(%ebp),%eax 11b59b: 8b 55 10 mov 0x10(%ebp),%edx rtems_libio_t *iop; off_t old_offset; off_t status; rtems_libio_check_fd( fd ); 11b59e: 3b 1d 64 f8 11 00 cmp 0x11f864,%ebx 11b5a4: 73 0f jae 11b5b5 iop = rtems_libio_iop( fd ); 11b5a6: c1 e3 06 shl $0x6,%ebx 11b5a9: 03 1d 18 37 12 00 add 0x123718,%ebx rtems_libio_check_is_open(iop); 11b5af: f6 43 15 01 testb $0x1,0x15(%ebx) 11b5b3: 75 0d jne 11b5c2 <== NEVER TAKEN 11b5b5: e8 96 4c ff ff call 110250 <__errno> 11b5ba: c7 00 09 00 00 00 movl $0x9,(%eax) 11b5c0: eb 7c jmp 11b63e <== ALWAYS TAKEN /* * Check as many errors as possible before touching iop->offset. */ if ( !iop->handlers->lseek_h ) 11b5c2: 8b 4b 3c mov 0x3c(%ebx),%ecx 11b5c5: 83 79 14 00 cmpl $0x0,0x14(%ecx) 11b5c9: 75 0d jne 11b5d8 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); 11b5cb: e8 80 4c ff ff call 110250 <__errno> <== NOT EXECUTED 11b5d0: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 11b5d6: eb 66 jmp 11b63e <== NOT EXECUTED /* * Now process the lseek(). */ old_offset = iop->offset; 11b5d8: 8b 73 0c mov 0xc(%ebx),%esi 11b5db: 8b 7b 10 mov 0x10(%ebx),%edi 11b5de: 89 75 e0 mov %esi,-0x20(%ebp) 11b5e1: 89 7d e4 mov %edi,-0x1c(%ebp) switch ( whence ) { 11b5e4: 83 fa 01 cmp $0x1,%edx 11b5e7: 74 13 je 11b5fc 11b5e9: 83 fa 02 cmp $0x2,%edx 11b5ec: 74 1d je 11b60b 11b5ee: 85 d2 test %edx,%edx 11b5f0: 75 41 jne 11b633 case SEEK_SET: iop->offset = offset; 11b5f2: 89 43 0c mov %eax,0xc(%ebx) 11b5f5: 89 c7 mov %eax,%edi 11b5f7: c1 ff 1f sar $0x1f,%edi 11b5fa: eb 1f jmp 11b61b <== ALWAYS TAKEN break; case SEEK_CUR: iop->offset += offset; 11b5fc: 89 c6 mov %eax,%esi 11b5fe: 89 c7 mov %eax,%edi 11b600: c1 ff 1f sar $0x1f,%edi 11b603: 03 75 e0 add -0x20(%ebp),%esi 11b606: 13 7d e4 adc -0x1c(%ebp),%edi 11b609: eb 0d jmp 11b618 <== ALWAYS TAKEN break; case SEEK_END: iop->offset = iop->size + offset; 11b60b: 89 c6 mov %eax,%esi 11b60d: 89 c7 mov %eax,%edi 11b60f: c1 ff 1f sar $0x1f,%edi 11b612: 03 73 04 add 0x4(%ebx),%esi 11b615: 13 7b 08 adc 0x8(%ebx),%edi 11b618: 89 73 0c mov %esi,0xc(%ebx) 11b61b: 89 7b 10 mov %edi,0x10(%ebx) /* * At this time, handlers assume iop->offset has the desired * new offset. */ status = (*iop->handlers->lseek_h)( iop, offset, whence ); 11b61e: 8b 4b 3c mov 0x3c(%ebx),%ecx 11b621: 52 push %edx 11b622: 99 cltd 11b623: 52 push %edx 11b624: 50 push %eax 11b625: 53 push %ebx 11b626: ff 51 14 call *0x14(%ecx) if ( status == (off_t) -1 ) 11b629: 83 c4 10 add $0x10,%esp 11b62c: 83 f8 ff cmp $0xffffffff,%eax 11b62f: 75 20 jne 11b651 11b631: eb 10 jmp 11b643 <== ALWAYS TAKEN case SEEK_END: iop->offset = iop->size + offset; break; default: rtems_set_errno_and_return_minus_one( EINVAL ); 11b633: e8 18 4c ff ff call 110250 <__errno> 11b638: c7 00 16 00 00 00 movl $0x16,(%eax) 11b63e: 83 c8 ff or $0xffffffff,%eax 11b641: eb 0e jmp 11b651 <== ALWAYS TAKEN * new offset. */ status = (*iop->handlers->lseek_h)( iop, offset, whence ); if ( status == (off_t) -1 ) iop->offset = old_offset; 11b643: 8b 55 e0 mov -0x20(%ebp),%edx 11b646: 89 53 0c mov %edx,0xc(%ebx) 11b649: 89 d1 mov %edx,%ecx 11b64b: c1 f9 1f sar $0x1f,%ecx 11b64e: 89 4b 10 mov %ecx,0x10(%ebx) /* * So if the operation failed, we have to restore iop->offset. */ return status; } 11b651: 8d 65 f4 lea -0xc(%ebp),%esp 11b654: 5b pop %ebx 11b655: 5e pop %esi 11b656: 5f pop %edi 11b657: c9 leave 11b658: c3 ret 0012617c : int _STAT_NAME( const char *path, struct stat *buf ) { 12617c: 55 push %ebp <== NOT EXECUTED 12617d: 89 e5 mov %esp,%ebp <== NOT EXECUTED 12617f: 57 push %edi <== NOT EXECUTED 126180: 56 push %esi <== NOT EXECUTED 126181: 53 push %ebx <== NOT EXECUTED 126182: 83 ec 2c sub $0x2c,%esp <== NOT EXECUTED 126185: 8b 55 08 mov 0x8(%ebp),%edx <== NOT EXECUTED 126188: 8b 75 0c mov 0xc(%ebp),%esi <== NOT EXECUTED /* * Check to see if we were passed a valid pointer. */ if ( !buf ) 12618b: 85 f6 test %esi,%esi <== NOT EXECUTED 12618d: 75 0d jne 12619c <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EFAULT ); 12618f: e8 3c 22 01 00 call 1383d0 <__errno> <== NOT EXECUTED 126194: c7 00 0e 00 00 00 movl $0xe,(%eax) <== NOT EXECUTED 12619a: eb 53 jmp 1261ef <== NOT EXECUTED status = rtems_filesystem_evaluate_path( path, strlen( path ), 12619c: 31 c0 xor %eax,%eax <== NOT EXECUTED 12619e: 83 c9 ff or $0xffffffff,%ecx <== NOT EXECUTED 1261a1: 89 d7 mov %edx,%edi <== NOT EXECUTED 1261a3: f2 ae repnz scas %es:(%edi),%al <== NOT EXECUTED 1261a5: f7 d1 not %ecx <== NOT EXECUTED 1261a7: 49 dec %ecx <== NOT EXECUTED 1261a8: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1261ab: 6a 00 push $0x0 <== NOT EXECUTED 1261ad: 8d 5d d4 lea -0x2c(%ebp),%ebx <== NOT EXECUTED 1261b0: 53 push %ebx <== NOT EXECUTED 1261b1: 6a 00 push $0x0 <== NOT EXECUTED 1261b3: 51 push %ecx <== NOT EXECUTED 1261b4: 52 push %edx <== NOT EXECUTED 1261b5: e8 62 55 fe ff call 10b71c <== NOT EXECUTED 0, &loc, _STAT_FOLLOW_LINKS ); if ( status != 0 ) 1261ba: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 1261bd: 83 cf ff or $0xffffffff,%edi <== NOT EXECUTED 1261c0: 85 c0 test %eax,%eax <== NOT EXECUTED 1261c2: 75 5c jne 126220 <== NOT EXECUTED return -1; if ( !loc.handlers->fstat_h ){ 1261c4: 8b 55 dc mov -0x24(%ebp),%edx <== NOT EXECUTED 1261c7: 83 7a 18 00 cmpl $0x0,0x18(%edx) <== NOT EXECUTED 1261cb: 75 27 jne 1261f4 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 1261cd: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED 1261d0: 85 c0 test %eax,%eax <== NOT EXECUTED 1261d2: 74 10 je 1261e4 <== NOT EXECUTED 1261d4: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 1261d7: 85 c0 test %eax,%eax <== NOT EXECUTED 1261d9: 74 09 je 1261e4 <== NOT EXECUTED 1261db: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1261de: 53 push %ebx <== NOT EXECUTED 1261df: ff d0 call *%eax <== NOT EXECUTED 1261e1: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 1261e4: e8 e7 21 01 00 call 1383d0 <__errno> <== NOT EXECUTED 1261e9: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 1261ef: 83 cf ff or $0xffffffff,%edi <== NOT EXECUTED 1261f2: eb 2c jmp 126220 <== NOT EXECUTED /* * Zero out the stat structure so the various support * versions of stat don't have to. */ memset( buf, 0, sizeof(struct stat) ); 1261f4: b9 11 00 00 00 mov $0x11,%ecx <== NOT EXECUTED 1261f9: 89 f7 mov %esi,%edi <== NOT EXECUTED 1261fb: f3 ab rep stos %eax,%es:(%edi) <== NOT EXECUTED status = (*loc.handlers->fstat_h)( &loc, buf ); 1261fd: 50 push %eax <== NOT EXECUTED 1261fe: 50 push %eax <== NOT EXECUTED 1261ff: 56 push %esi <== NOT EXECUTED 126200: 53 push %ebx <== NOT EXECUTED 126201: ff 52 18 call *0x18(%edx) <== NOT EXECUTED 126204: 89 c7 mov %eax,%edi <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 126206: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED 126209: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 12620c: 85 c0 test %eax,%eax <== NOT EXECUTED 12620e: 74 10 je 126220 <== NOT EXECUTED 126210: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 126213: 85 c0 test %eax,%eax <== NOT EXECUTED 126215: 74 09 je 126220 <== NOT EXECUTED 126217: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12621a: 53 push %ebx <== NOT EXECUTED 12621b: ff d0 call *%eax <== NOT EXECUTED 12621d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED return status; } 126220: 89 f8 mov %edi,%eax <== NOT EXECUTED 126222: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 126225: 5b pop %ebx <== NOT EXECUTED 126226: 5e pop %esi <== NOT EXECUTED 126227: 5f pop %edi <== NOT EXECUTED 126228: c9 leave <== NOT EXECUTED 126229: c3 ret <== NOT EXECUTED 0010735c : size_t size ) { void *return_this; MSBUMP(malloc_calls, 1); 10735c: 55 push %ebp 10735d: 89 e5 mov %esp,%ebp 10735f: 57 push %edi 107360: 56 push %esi 107361: 53 push %ebx 107362: 83 ec 0c sub $0xc,%esp 107365: 8b 75 08 mov 0x8(%ebp),%esi 107368: ff 05 34 37 12 00 incl 0x123734 /* * If some free's have been deferred, then do them now. */ malloc_deferred_frees_process(); 10736e: e8 17 ff ff ff call 10728a <== ALWAYS TAKEN /* * Validate the parameters */ if ( !size ) 107373: 85 f6 test %esi,%esi 107375: 74 7c je 1073f3 <== ALWAYS TAKEN return (void *) 0; /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) && 107377: 83 3d 0c 3a 12 00 03 cmpl $0x3,0x123a0c 10737e: 75 09 jne 107389 107380: e8 af fe ff ff call 107234 <== ALWAYS TAKEN 107385: 84 c0 test %al,%al 107387: 74 6a je 1073f3 <== ALWAYS 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 ); 107389: 6a 00 push $0x0 10738b: 6a 00 push $0x0 10738d: 56 push %esi 10738e: ff 35 70 f8 11 00 pushl 0x11f870 107394: e8 1b 42 00 00 call 10b5b4 <_Protected_heap_Allocate_aligned_with_boundary> 107399: 89 c3 mov %eax,%ebx * If this fails then return a NULL pointer. */ return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size ); if ( !return_this ) { 10739b: 83 c4 10 add $0x10,%esp if (rtems_malloc_sbrk_helpers) return_this = (*rtems_malloc_sbrk_helpers->extend)( size ); if ( !return_this ) { errno = ENOMEM; return (void *) 0; 10739e: 89 c7 mov %eax,%edi * If this fails then return a NULL pointer. */ return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size ); if ( !return_this ) { 1073a0: 85 c0 test %eax,%eax 1073a2: 75 26 jne 1073ca if (rtems_malloc_sbrk_helpers) 1073a4: a1 d4 1b 12 00 mov 0x121bd4,%eax 1073a9: 85 c0 test %eax,%eax 1073ab: 74 10 je 1073bd <== NEVER TAKEN return_this = (*rtems_malloc_sbrk_helpers->extend)( size ); 1073ad: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1073b0: 56 push %esi <== NOT EXECUTED 1073b1: ff 50 04 call *0x4(%eax) <== NOT EXECUTED 1073b4: 89 c7 mov %eax,%edi <== NOT EXECUTED if ( !return_this ) { 1073b6: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 1073b9: 85 c0 test %eax,%eax <== NOT EXECUTED 1073bb: 75 0d jne 1073ca <== NOT EXECUTED errno = ENOMEM; 1073bd: e8 8e 8e 00 00 call 110250 <__errno> 1073c2: c7 00 0c 00 00 00 movl $0xc,(%eax) return (void *) 0; 1073c8: eb 2b jmp 1073f5 <== ALWAYS TAKEN } /* * If the user wants us to dirty the allocated memory, then do it. */ if ( rtems_malloc_dirty_helper ) 1073ca: a1 d8 1b 12 00 mov 0x121bd8,%eax 1073cf: 85 c0 test %eax,%eax 1073d1: 74 09 je 1073dc <== NEVER TAKEN (*rtems_malloc_dirty_helper)( return_this, size ); 1073d3: 52 push %edx <== NOT EXECUTED 1073d4: 52 push %edx <== NOT EXECUTED 1073d5: 56 push %esi <== NOT EXECUTED 1073d6: 57 push %edi <== NOT EXECUTED 1073d7: ff 10 call *(%eax) <== NOT EXECUTED 1073d9: 83 c4 10 add $0x10,%esp <== NOT EXECUTED /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) 1073dc: a1 d0 1b 12 00 mov 0x121bd0,%eax 1073e1: 89 fb mov %edi,%ebx 1073e3: 85 c0 test %eax,%eax 1073e5: 74 0e je 1073f5 <== NEVER TAKEN (*rtems_malloc_statistics_helpers->at_malloc)(return_this); 1073e7: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1073ea: 57 push %edi <== NOT EXECUTED 1073eb: ff 50 04 call *0x4(%eax) <== NOT EXECUTED 1073ee: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 1073f1: eb 02 jmp 1073f5 <== NOT EXECUTED 1073f3: 31 db xor %ebx,%ebx <== NOT EXECUTED if (rtems_malloc_boundary_helpers) (*rtems_malloc_boundary_helpers->at_malloc)(return_this, size); #endif return return_this; } 1073f5: 89 d8 mov %ebx,%eax 1073f7: 8d 65 f4 lea -0xc(%ebp),%esp 1073fa: 5b pop %ebx 1073fb: 5e pop %esi 1073fc: 5f pop %edi 1073fd: c9 leave 1073fe: c3 ret 00107272 : } void malloc_deferred_free( void *pointer ) { 107272: 55 push %ebp <== NOT EXECUTED 107273: 89 e5 mov %esp,%ebp <== NOT EXECUTED 107275: 83 ec 10 sub $0x10,%esp <== NOT EXECUTED RTEMS_INLINE_ROUTINE void rtems_chain_append( rtems_chain_control *the_chain, rtems_chain_node *the_node ) { _Chain_Append( the_chain, the_node ); 107278: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED 10727b: 68 24 37 12 00 push $0x123724 <== NOT EXECUTED 107280: e8 bb 34 00 00 call 10a740 <_Chain_Append> <== NOT EXECUTED 107285: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_chain_append(&RTEMS_Malloc_GC_list, (rtems_chain_node *)pointer); } 107288: c9 leave <== NOT EXECUTED 107289: c3 ret <== NOT EXECUTED 0010728a : { rtems_chain_initialize_empty(&RTEMS_Malloc_GC_list); } void malloc_deferred_frees_process(void) { 10728a: 55 push %ebp 10728b: 89 e5 mov %esp,%ebp 10728d: 83 ec 08 sub $0x8,%esp rtems_chain_node *to_be_freed; /* * If some free's have been deferred, then do them now. */ while ((to_be_freed = rtems_chain_get(&RTEMS_Malloc_GC_list)) != NULL) 107290: eb 0c jmp 10729e <== ALWAYS TAKEN free(to_be_freed); 107292: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 107295: 50 push %eax <== NOT EXECUTED 107296: e8 95 fe ff ff call 107130 <== NOT EXECUTED 10729b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE rtems_chain_node *rtems_chain_get( rtems_chain_control *the_chain ) { return _Chain_Get( the_chain ); 10729e: 83 ec 0c sub $0xc,%esp 1072a1: 68 24 37 12 00 push $0x123724 1072a6: e8 b9 34 00 00 call 10a764 <_Chain_Get> rtems_chain_node *to_be_freed; /* * If some free's have been deferred, then do them now. */ while ((to_be_freed = rtems_chain_get(&RTEMS_Malloc_GC_list)) != NULL) 1072ab: 83 c4 10 add $0x10,%esp 1072ae: 85 c0 test %eax,%eax 1072b0: 75 e0 jne 107292 <== ALWAYS TAKEN free(to_be_freed); } 1072b2: c9 leave 1072b3: c3 ret 00107234 : #include "malloc_p.h" rtems_chain_control RTEMS_Malloc_GC_list; bool malloc_is_system_state_OK(void) { 107234: 55 push %ebp 107235: 89 e5 mov %esp,%ebp if ( _Thread_Dispatch_disable_level > 0 ) 107237: 8b 15 74 38 12 00 mov 0x123874,%edx 10723d: 31 c0 xor %eax,%eax 10723f: 85 d2 test %edx,%edx 107241: 75 0a jne 10724d <== ALWAYS TAKEN return false; if ( _ISR_Nest_level > 0 ) 107243: a1 0c 39 12 00 mov 0x12390c,%eax #include "malloc_p.h" rtems_chain_control RTEMS_Malloc_GC_list; bool malloc_is_system_state_OK(void) 107248: 85 c0 test %eax,%eax 10724a: 0f 94 c0 sete %al if ( _ISR_Nest_level > 0 ) return false; return true; } 10724d: c9 leave 10724e: c3 ret 00109854 : #ifdef RTEMS_NEWLIB #include "malloc_p.h" void malloc_report_statistics(void) { 109854: 55 push %ebp 109855: 89 e5 mov %esp,%ebp 109857: 83 ec 10 sub $0x10,%esp malloc_report_statistics_with_plugin( NULL, printk_plugin ); 10985a: 68 84 a3 10 00 push $0x10a384 10985f: 6a 00 push $0x0 109861: e8 06 00 00 00 call 10986c <== ALWAYS TAKEN 109866: 83 c4 10 add $0x10,%esp } 109869: c9 leave 10986a: c3 ret 0011342c : */ int memfile_blocks_allocated = 0; void *memfile_alloc_block(void) { 11342c: 55 push %ebp 11342d: 89 e5 mov %esp,%ebp 11342f: 83 ec 10 sub $0x10,%esp void *memory; memory = (void *)calloc(1, IMFS_MEMFILE_BYTES_PER_BLOCK); 113432: ff 35 fc 7e 12 00 pushl 0x127efc 113438: 6a 01 push $0x1 11343a: e8 65 4c ff ff call 1080a4 if ( memory ) 11343f: 83 c4 10 add $0x10,%esp 113442: 85 c0 test %eax,%eax 113444: 74 06 je 11344c <== ALWAYS TAKEN memfile_blocks_allocated++; 113446: ff 05 98 80 12 00 incl 0x128098 return memory; } 11344c: c9 leave 11344d: c3 ret 001137b4 : return memfile_check_rmnod( the_jnode ); } int memfile_check_rmnod( IMFS_jnode_t *the_jnode ){ 1137b4: 55 push %ebp 1137b5: 89 e5 mov %esp,%ebp 1137b7: 53 push %ebx 1137b8: 83 ec 10 sub $0x10,%esp 1137bb: 8b 5d 08 mov 0x8(%ebp),%ebx /* * The file cannot be open and the link must be less than 1 to free. */ if ( !rtems_libio_is_file_open( the_jnode ) && (the_jnode->st_nlink < 1) ) { 1137be: 53 push %ebx 1137bf: e8 e6 e6 ff ff call 111eaa 1137c4: 83 c4 10 add $0x10,%esp 1137c7: 85 c0 test %eax,%eax 1137c9: 75 36 jne 113801 1137cb: 66 83 7b 34 00 cmpw $0x0,0x34(%ebx) 1137d0: 75 2f jne 113801 <== ALWAYS TAKEN /* * Is the rtems_filesystem_current is this node? */ if ( rtems_filesystem_current.node_access == the_jnode ) 1137d2: a1 0c 61 12 00 mov 0x12610c,%eax 1137d7: 39 58 04 cmp %ebx,0x4(%eax) 1137da: 75 07 jne 1137e3 <== NEVER TAKEN rtems_filesystem_current.node_access = NULL; 1137dc: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax) <== NOT EXECUTED /* * Free memory associated with a memory file. */ if (the_jnode->type != IMFS_LINEAR_FILE) 1137e3: 83 7b 4c 06 cmpl $0x6,0x4c(%ebx) 1137e7: 74 0c je 1137f5 <== ALWAYS TAKEN IMFS_memfile_remove( the_jnode ); 1137e9: 83 ec 0c sub $0xc,%esp 1137ec: 53 push %ebx 1137ed: e8 98 fe ff ff call 11368a <== ALWAYS TAKEN 1137f2: 83 c4 10 add $0x10,%esp free( the_jnode ); 1137f5: 83 ec 0c sub $0xc,%esp 1137f8: 53 push %ebx 1137f9: e8 9e 4a ff ff call 10829c 1137fe: 83 c4 10 add $0x10,%esp } return 0; } 113801: 31 c0 xor %eax,%eax 113803: 8b 5d fc mov -0x4(%ebp),%ebx 113806: c9 leave 113807: c3 ret 00113851 : */ int memfile_close( rtems_libio_t *iop ) { 113851: 55 push %ebp 113852: 89 e5 mov %esp,%ebp 113854: 53 push %ebx 113855: 83 ec 04 sub $0x4,%esp 113858: 8b 45 08 mov 0x8(%ebp),%eax IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 11385b: 8b 50 38 mov 0x38(%eax),%edx if (iop->flags & LIBIO_FLAGS_APPEND) 11385e: f6 40 15 02 testb $0x2,0x15(%eax) 113862: 74 0c je 113870 iop->offset = the_jnode->info.file.size; 113864: 8b 4a 50 mov 0x50(%edx),%ecx 113867: 8b 5a 54 mov 0x54(%edx),%ebx 11386a: 89 48 0c mov %ecx,0xc(%eax) 11386d: 89 58 10 mov %ebx,0x10(%eax) memfile_check_rmnod( the_jnode ); 113870: 83 ec 0c sub $0xc,%esp 113873: 52 push %edx 113874: e8 3b ff ff ff call 1137b4 <== ALWAYS TAKEN return 0; } 113879: 31 c0 xor %eax,%eax 11387b: 8b 5d fc mov -0x4(%ebp),%ebx 11387e: c9 leave 11387f: c3 ret 001135d5 : void memfile_free_blocks_in_table( block_p **block_table, int entries ) { 1135d5: 55 push %ebp 1135d6: 89 e5 mov %esp,%ebp 1135d8: 57 push %edi 1135d9: 56 push %esi 1135da: 53 push %ebx 1135db: 83 ec 0c sub $0xc,%esp 1135de: 8b 75 08 mov 0x8(%ebp),%esi /* * Perform internal consistency checks */ assert( block_table ); 1135e1: 85 f6 test %esi,%esi 1135e3: 75 19 jne 1135fe <== NEVER TAKEN 1135e5: 68 e0 23 12 00 push $0x1223e0 <== NOT EXECUTED 1135ea: 68 d4 24 12 00 push $0x1224d4 <== NOT EXECUTED 1135ef: 68 b3 01 00 00 push $0x1b3 <== NOT EXECUTED 1135f4: 68 76 23 12 00 push $0x122376 <== NOT EXECUTED 1135f9: e8 72 49 ff ff call 107f70 <__assert_func> <== NOT EXECUTED /* * Now go through all the slots in the table and free the memory. */ b = *block_table; 1135fe: 8b 3e mov (%esi),%edi 113600: 31 db xor %ebx,%ebx for ( i=0 ; i <== ALWAYS TAKEN if ( b[i] ) { 113604: 8b 04 9f mov (%edi,%ebx,4),%eax 113607: 85 c0 test %eax,%eax 113609: 74 13 je 11361e memfile_free_block( b[i] ); 11360b: 83 ec 0c sub $0xc,%esp 11360e: 50 push %eax 11360f: e8 ff fd ff ff call 113413 b[i] = 0; 113614: c7 04 9f 00 00 00 00 movl $0x0,(%edi,%ebx,4) 11361b: 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 ); 113624: 83 ec 0c sub $0xc,%esp 113627: ff 36 pushl (%esi) 113629: e8 e5 fd ff ff call 113413 *block_table = 0; 11362e: c7 06 00 00 00 00 movl $0x0,(%esi) 113634: 83 c4 10 add $0x10,%esp } 113637: 8d 65 f4 lea -0xc(%ebp),%esp 11363a: 5b pop %ebx 11363b: 5e pop %esi 11363c: 5f pop %edi 11363d: c9 leave 11363e: c3 ret 001139e1 : int memfile_ftruncate( rtems_libio_t *iop, rtems_off64_t length ) { 1139e1: 55 push %ebp 1139e2: 89 e5 mov %esp,%ebp 1139e4: 53 push %ebx 1139e5: 83 ec 14 sub $0x14,%esp 1139e8: 8b 55 08 mov 0x8(%ebp),%edx 1139eb: 8b 45 0c mov 0xc(%ebp),%eax 1139ee: 8b 4d 10 mov 0x10(%ebp),%ecx IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 1139f1: 8b 5a 38 mov 0x38(%edx),%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 ) 1139f4: 3b 4b 54 cmp 0x54(%ebx),%ecx 1139f7: 7c 12 jl 113a0b <== ALWAYS TAKEN 1139f9: 7f 05 jg 113a00 <== ALWAYS TAKEN 1139fb: 3b 43 50 cmp 0x50(%ebx),%eax 1139fe: 76 0b jbe 113a0b <== NEVER TAKEN return IMFS_memfile_extend( the_jnode, length ); 113a00: 51 push %ecx <== NOT EXECUTED 113a01: 51 push %ecx <== NOT EXECUTED 113a02: 50 push %eax <== NOT EXECUTED 113a03: 53 push %ebx <== NOT EXECUTED 113a04: e8 e6 fe ff ff call 1138ef <== NOT EXECUTED 113a09: eb 21 jmp 113a2c <== 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; 113a0b: 89 43 50 mov %eax,0x50(%ebx) 113a0e: 89 4b 54 mov %ecx,0x54(%ebx) iop->size = the_jnode->info.file.size; 113a11: 89 42 04 mov %eax,0x4(%edx) 113a14: 89 4a 08 mov %ecx,0x8(%edx) IMFS_update_atime( the_jnode ); 113a17: 52 push %edx 113a18: 52 push %edx 113a19: 6a 00 push $0x0 113a1b: 8d 45 f0 lea -0x10(%ebp),%eax 113a1e: 50 push %eax 113a1f: e8 f0 48 ff ff call 108314 113a24: 8b 45 f0 mov -0x10(%ebp),%eax 113a27: 89 43 40 mov %eax,0x40(%ebx) 113a2a: 31 c0 xor %eax,%eax return 0; 113a2c: 83 c4 10 add $0x10,%esp } 113a2f: 8b 5d fc mov -0x4(%ebp),%ebx 113a32: c9 leave 113a33: c3 ret 00113a34 : rtems_off64_t memfile_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { 113a34: 55 push %ebp 113a35: 89 e5 mov %esp,%ebp 113a37: 56 push %esi 113a38: 53 push %ebx 113a39: 8b 5d 08 mov 0x8(%ebp),%ebx IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 113a3c: 8b 73 38 mov 0x38(%ebx),%esi if (the_jnode->type == IMFS_LINEAR_FILE) { 113a3f: 83 7e 4c 06 cmpl $0x6,0x4c(%esi) 113a43: 75 1a jne 113a5f <== NEVER TAKEN if (iop->offset > the_jnode->info.linearfile.size) 113a45: 8b 56 50 mov 0x50(%esi),%edx <== NOT EXECUTED 113a48: 8b 46 54 mov 0x54(%esi),%eax <== NOT EXECUTED 113a4b: 39 43 10 cmp %eax,0x10(%ebx) <== NOT EXECUTED 113a4e: 7c 3f jl 113a8f <== NOT EXECUTED 113a50: 7f 05 jg 113a57 <== NOT EXECUTED 113a52: 39 53 0c cmp %edx,0xc(%ebx) <== NOT EXECUTED 113a55: 76 38 jbe 113a8f <== NOT EXECUTED iop->offset = the_jnode->info.linearfile.size; 113a57: 89 53 0c mov %edx,0xc(%ebx) <== NOT EXECUTED 113a5a: 89 43 10 mov %eax,0x10(%ebx) <== NOT EXECUTED 113a5d: eb 30 jmp 113a8f <== NOT EXECUTED } else { /* Must be a block file (IMFS_MEMORY_FILE). */ if (IMFS_memfile_extend( the_jnode, iop->offset )) 113a5f: 50 push %eax 113a60: 50 push %eax 113a61: ff 73 0c pushl 0xc(%ebx) 113a64: 56 push %esi 113a65: e8 85 fe ff ff call 1138ef <== ALWAYS TAKEN 113a6a: 83 c4 10 add $0x10,%esp 113a6d: 85 c0 test %eax,%eax 113a6f: 74 12 je 113a83 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOSPC ); 113a71: e8 ae 0e 00 00 call 114924 <__errno> <== NOT EXECUTED 113a76: c7 00 1c 00 00 00 movl $0x1c,(%eax) <== NOT EXECUTED 113a7c: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 113a7f: 89 c2 mov %eax,%edx <== NOT EXECUTED 113a81: eb 12 jmp 113a95 <== NOT EXECUTED iop->size = the_jnode->info.file.size; 113a83: 8b 46 50 mov 0x50(%esi),%eax 113a86: 8b 56 54 mov 0x54(%esi),%edx 113a89: 89 43 04 mov %eax,0x4(%ebx) 113a8c: 89 53 08 mov %edx,0x8(%ebx) } return iop->offset; 113a8f: 8b 43 0c mov 0xc(%ebx),%eax 113a92: 8b 53 10 mov 0x10(%ebx),%edx } 113a95: 8d 65 f8 lea -0x8(%ebp),%esp 113a98: 5b pop %ebx 113a99: 5e pop %esi 113a9a: c9 leave 113a9b: c3 ret 00113c9f : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 113c9f: 55 push %ebp 113ca0: 89 e5 mov %esp,%ebp 113ca2: 56 push %esi 113ca3: 53 push %ebx 113ca4: 8b 75 08 mov 0x8(%ebp),%esi IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 113ca7: 8b 5e 38 mov 0x38(%esi),%ebx /* * Perform 'copy on write' for linear files */ if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) 113caa: f7 46 14 04 02 00 00 testl $0x204,0x14(%esi) 113cb1: 74 4f je 113d02 && (the_jnode->type == IMFS_LINEAR_FILE)) { 113cb3: 83 7b 4c 06 cmpl $0x6,0x4c(%ebx) 113cb7: 75 49 jne 113d02 <== NEVER TAKEN uint32_t count = the_jnode->info.linearfile.size; 113cb9: 8b 43 50 mov 0x50(%ebx),%eax <== NOT EXECUTED const unsigned char *buffer = the_jnode->info.linearfile.direct; 113cbc: 8b 53 58 mov 0x58(%ebx),%edx <== NOT EXECUTED the_jnode->type = IMFS_MEMORY_FILE; 113cbf: c7 43 4c 05 00 00 00 movl $0x5,0x4c(%ebx) <== NOT EXECUTED the_jnode->info.file.size = 0; 113cc6: c7 43 50 00 00 00 00 movl $0x0,0x50(%ebx) <== NOT EXECUTED 113ccd: c7 43 54 00 00 00 00 movl $0x0,0x54(%ebx) <== NOT EXECUTED the_jnode->info.file.indirect = 0; 113cd4: c7 43 58 00 00 00 00 movl $0x0,0x58(%ebx) <== NOT EXECUTED the_jnode->info.file.doubly_indirect = 0; 113cdb: c7 43 5c 00 00 00 00 movl $0x0,0x5c(%ebx) <== NOT EXECUTED the_jnode->info.file.triply_indirect = 0; 113ce2: c7 43 60 00 00 00 00 movl $0x0,0x60(%ebx) <== NOT EXECUTED if ((count != 0) 113ce9: 85 c0 test %eax,%eax <== NOT EXECUTED 113ceb: 74 15 je 113d02 <== NOT EXECUTED && (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) 113ced: 50 push %eax <== NOT EXECUTED 113cee: 52 push %edx <== NOT EXECUTED 113cef: 6a 00 push $0x0 <== NOT EXECUTED 113cf1: 53 push %ebx <== NOT EXECUTED 113cf2: e8 a5 fd ff ff call 113a9c <== NOT EXECUTED 113cf7: 89 c2 mov %eax,%edx <== NOT EXECUTED the_jnode->type = IMFS_MEMORY_FILE; the_jnode->info.file.size = 0; the_jnode->info.file.indirect = 0; the_jnode->info.file.doubly_indirect = 0; the_jnode->info.file.triply_indirect = 0; if ((count != 0) 113cf9: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 113cfc: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 113cff: 42 inc %edx <== NOT EXECUTED 113d00: 74 20 je 113d22 <== NOT EXECUTED && (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) return -1; } if (iop->flags & LIBIO_FLAGS_APPEND) 113d02: f6 46 15 02 testb $0x2,0x15(%esi) 113d06: 74 0c je 113d14 iop->offset = the_jnode->info.file.size; 113d08: 8b 43 50 mov 0x50(%ebx),%eax 113d0b: 8b 53 54 mov 0x54(%ebx),%edx 113d0e: 89 46 0c mov %eax,0xc(%esi) 113d11: 89 56 10 mov %edx,0x10(%esi) iop->size = the_jnode->info.file.size; 113d14: 8b 43 50 mov 0x50(%ebx),%eax 113d17: 8b 53 54 mov 0x54(%ebx),%edx 113d1a: 89 46 04 mov %eax,0x4(%esi) 113d1d: 89 56 08 mov %edx,0x8(%esi) 113d20: 31 c0 xor %eax,%eax return 0; } 113d22: 8d 65 f8 lea -0x8(%ebp),%esp 113d25: 5b pop %ebx 113d26: 5e pop %esi 113d27: c9 leave 113d28: c3 ret 00113f4d : ssize_t memfile_read( rtems_libio_t *iop, void *buffer, size_t count ) { 113f4d: 55 push %ebp 113f4e: 89 e5 mov %esp,%ebp 113f50: 83 ec 08 sub $0x8,%esp 113f53: 8b 45 08 mov 0x8(%ebp),%eax IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; return IMFS_memfile_read( the_jnode, iop->offset, buffer, count ); 113f56: ff 75 10 pushl 0x10(%ebp) 113f59: ff 75 0c pushl 0xc(%ebp) 113f5c: ff 70 0c pushl 0xc(%eax) 113f5f: ff 70 38 pushl 0x38(%eax) 113f62: e8 c2 fd ff ff call 113d29 <== ALWAYS TAKEN } 113f67: c9 leave 113f68: c3 ret 00113808 : int memfile_rmnod( rtems_filesystem_location_info_t *parent_pathloc, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN */ ) { 113808: 55 push %ebp 113809: 89 e5 mov %esp,%ebp 11380b: 53 push %ebx 11380c: 83 ec 14 sub $0x14,%esp IMFS_jnode_t *the_jnode; the_jnode = (IMFS_jnode_t *) pathloc->node_access; 11380f: 8b 45 0c mov 0xc(%ebp),%eax 113812: 8b 18 mov (%eax),%ebx /* * Take the node out of the parent's chain that contains this node */ if ( the_jnode->Parent != NULL ) { 113814: 83 7b 08 00 cmpl $0x0,0x8(%ebx) 113818: 74 13 je 11382d <== ALWAYS TAKEN 11381a: 83 ec 0c sub $0xc,%esp 11381d: 53 push %ebx 11381e: e8 2d 85 ff ff call 10bd50 <_Chain_Extract> rtems_chain_extract( (rtems_chain_node *) the_jnode ); the_jnode->Parent = NULL; 113823: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx) 11382a: 83 c4 10 add $0x10,%esp /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; 11382d: 66 ff 4b 34 decw 0x34(%ebx) IMFS_update_ctime( the_jnode ); 113831: 50 push %eax 113832: 50 push %eax 113833: 6a 00 push $0x0 113835: 8d 45 f0 lea -0x10(%ebp),%eax 113838: 50 push %eax 113839: e8 d6 4a ff ff call 108314 11383e: 8b 45 f0 mov -0x10(%ebp),%eax 113841: 89 43 48 mov %eax,0x48(%ebx) return memfile_check_rmnod( the_jnode ); 113844: 89 1c 24 mov %ebx,(%esp) 113847: e8 68 ff ff ff call 1137b4 <== ALWAYS TAKEN } 11384c: 8b 5d fc mov -0x4(%ebp),%ebx 11384f: c9 leave 113850: c3 ret 00113c72 : ssize_t memfile_write( rtems_libio_t *iop, const void *buffer, size_t count ) { 113c72: 55 push %ebp 113c73: 89 e5 mov %esp,%ebp 113c75: 56 push %esi 113c76: 53 push %ebx 113c77: 8b 5d 08 mov 0x8(%ebp),%ebx IMFS_jnode_t *the_jnode; ssize_t status; the_jnode = iop->file_info; 113c7a: 8b 73 38 mov 0x38(%ebx),%esi status = IMFS_memfile_write( the_jnode, iop->offset, buffer, count ); 113c7d: ff 75 10 pushl 0x10(%ebp) 113c80: ff 75 0c pushl 0xc(%ebp) 113c83: ff 73 0c pushl 0xc(%ebx) 113c86: 56 push %esi 113c87: e8 10 fe ff ff call 113a9c <== ALWAYS TAKEN iop->size = the_jnode->info.file.size; 113c8c: 8b 56 50 mov 0x50(%esi),%edx 113c8f: 8b 4e 54 mov 0x54(%esi),%ecx 113c92: 89 53 04 mov %edx,0x4(%ebx) 113c95: 89 4b 08 mov %ecx,0x8(%ebx) return status; } 113c98: 8d 65 f8 lea -0x8(%ebp),%esp 113c9b: 5b pop %ebx 113c9c: 5e pop %esi 113c9d: c9 leave 113c9e: c3 ret 0010ced0 : */ int miniIMFS_initialize( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { 10ced0: 55 push %ebp 10ced1: 89 e5 mov %esp,%ebp 10ced3: 83 ec 08 sub $0x8,%esp return IMFS_initialize_support( 10ced6: 68 54 d9 11 00 push $0x11d954 10cedb: 68 54 d9 11 00 push $0x11d954 10cee0: 68 b4 d7 11 00 push $0x11d7b4 10cee5: ff 75 08 pushl 0x8(%ebp) 10cee8: e8 f7 08 00 00 call 10d7e4 <== ALWAYS TAKEN temp_mt_entry, &miniIMFS_ops, &rtems_filesystem_null_handlers, /* for memfiles */ &rtems_filesystem_null_handlers /* for directories */ ); } 10ceed: c9 leave 10ceee: c3 ret 00107400 : int mkdir( const char *pathname, mode_t mode ) { 107400: 55 push %ebp 107401: 89 e5 mov %esp,%ebp 107403: 83 ec 08 sub $0x8,%esp 107406: 8b 45 0c mov 0xc(%ebp),%eax return mknod( pathname, mode | S_IFDIR, 0LL); 107409: 6a 00 push $0x0 10740b: 6a 00 push $0x0 10740d: 80 cc 40 or $0x40,%ah 107410: 50 push %eax 107411: ff 75 08 pushl 0x8(%ebp) 107414: e8 03 00 00 00 call 10741c <== ALWAYS TAKEN } 107419: c9 leave 10741a: c3 ret 0010ffc8 : int mkfifo( const char *path, mode_t mode ) { 10ffc8: 55 push %ebp 10ffc9: 89 e5 mov %esp,%ebp 10ffcb: 83 ec 08 sub $0x8,%esp 10ffce: 8b 45 0c mov 0xc(%ebp),%eax return mknod( path, mode | S_IFIFO, 0LL ); 10ffd1: 6a 00 push $0x0 10ffd3: 6a 00 push $0x0 10ffd5: 80 cc 10 or $0x10,%ah 10ffd8: 50 push %eax 10ffd9: ff 75 08 pushl 0x8(%ebp) 10ffdc: e8 3b 74 ff ff call 10741c <== ALWAYS TAKEN } 10ffe1: c9 leave 10ffe2: c3 ret 0010741c : int mknod( const char *pathname, mode_t mode, dev_t dev ) { 10741c: 55 push %ebp 10741d: 89 e5 mov %esp,%ebp 10741f: 57 push %edi 107420: 56 push %esi 107421: 53 push %ebx 107422: 83 ec 3c sub $0x3c,%esp 107425: 8b 45 08 mov 0x8(%ebp),%eax 107428: 8b 5d 0c mov 0xc(%ebp),%ebx 10742b: 8b 55 10 mov 0x10(%ebp),%edx 10742e: 8b 4d 14 mov 0x14(%ebp),%ecx 107431: 89 55 c0 mov %edx,-0x40(%ebp) 107434: 89 4d c4 mov %ecx,-0x3c(%ebp) 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) ) ) 107437: 66 f7 c3 00 f0 test $0xf000,%bx 10743c: 75 0d jne 10744b <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); 10743e: e8 0d 8e 00 00 call 110250 <__errno> <== NOT EXECUTED 107443: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 107449: eb 4f jmp 10749a <== NOT EXECUTED rtems_filesystem_get_start_loc( pathname, &i, &temp_loc ); 10744b: 8a 10 mov (%eax),%dl 10744d: 80 fa 5c cmp $0x5c,%dl 107450: 74 09 je 10745b <== ALWAYS TAKEN 107452: 80 fa 2f cmp $0x2f,%dl 107455: 74 04 je 10745b 107457: 84 d2 test %dl,%dl 107459: 75 17 jne 107472 <== NEVER TAKEN 10745b: 8d 7d d0 lea -0x30(%ebp),%edi 10745e: 8b 35 60 16 12 00 mov 0x121660,%esi 107464: 83 c6 18 add $0x18,%esi 107467: b9 05 00 00 00 mov $0x5,%ecx 10746c: f3 a5 rep movsl %ds:(%esi),%es:(%edi) 10746e: b1 01 mov $0x1,%cl 107470: eb 13 jmp 107485 <== ALWAYS TAKEN 107472: 8d 7d d0 lea -0x30(%ebp),%edi 107475: 8b 35 60 16 12 00 mov 0x121660,%esi 10747b: 83 c6 04 add $0x4,%esi 10747e: b9 05 00 00 00 mov $0x5,%ecx 107483: f3 a5 rep movsl %ds:(%esi),%es:(%edi) if ( !temp_loc.ops->evalformake_h ) { 107485: 8b 55 dc mov -0x24(%ebp),%edx 107488: 8b 52 04 mov 0x4(%edx),%edx 10748b: 85 d2 test %edx,%edx 10748d: 75 10 jne 10749f <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); 10748f: e8 bc 8d 00 00 call 110250 <__errno> <== NOT EXECUTED 107494: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 10749a: 83 cf ff or $0xffffffff,%edi <== NOT EXECUTED 10749d: eb 60 jmp 1074ff <== NOT EXECUTED } result = (*temp_loc.ops->evalformake_h)( 10749f: 56 push %esi 1074a0: 8d 75 e4 lea -0x1c(%ebp),%esi 1074a3: 56 push %esi 1074a4: 8d 75 d0 lea -0x30(%ebp),%esi 1074a7: 56 push %esi 1074a8: 01 c8 add %ecx,%eax 1074aa: 50 push %eax 1074ab: ff d2 call *%edx &pathname[i], &temp_loc, &name_start ); if ( result != 0 ) 1074ad: 83 c4 10 add $0x10,%esp 1074b0: 83 cf ff or $0xffffffff,%edi 1074b3: 85 c0 test %eax,%eax 1074b5: 75 48 jne 1074ff return -1; if ( !temp_loc.ops->mknod_h ) { 1074b7: 8b 55 dc mov -0x24(%ebp),%edx 1074ba: 8b 42 14 mov 0x14(%edx),%eax 1074bd: 85 c0 test %eax,%eax 1074bf: 75 12 jne 1074d3 <== NEVER TAKEN rtems_filesystem_freenode( &temp_loc ); 1074c1: 8b 42 1c mov 0x1c(%edx),%eax <== NOT EXECUTED 1074c4: 85 c0 test %eax,%eax <== NOT EXECUTED 1074c6: 74 c7 je 10748f <== NOT EXECUTED 1074c8: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1074cb: 56 push %esi <== NOT EXECUTED 1074cc: ff d0 call *%eax <== NOT EXECUTED 1074ce: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 1074d1: eb bc jmp 10748f <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*temp_loc.ops->mknod_h)( name_start, mode, dev, &temp_loc ); 1074d3: 83 ec 0c sub $0xc,%esp 1074d6: 56 push %esi 1074d7: ff 75 c4 pushl -0x3c(%ebp) 1074da: ff 75 c0 pushl -0x40(%ebp) 1074dd: 53 push %ebx 1074de: ff 75 e4 pushl -0x1c(%ebp) 1074e1: ff d0 call *%eax 1074e3: 89 c7 mov %eax,%edi rtems_filesystem_freenode( &temp_loc ); 1074e5: 8b 45 dc mov -0x24(%ebp),%eax 1074e8: 83 c4 20 add $0x20,%esp 1074eb: 85 c0 test %eax,%eax 1074ed: 74 10 je 1074ff <== ALWAYS TAKEN 1074ef: 8b 40 1c mov 0x1c(%eax),%eax 1074f2: 85 c0 test %eax,%eax 1074f4: 74 09 je 1074ff 1074f6: 83 ec 0c sub $0xc,%esp 1074f9: 56 push %esi 1074fa: ff d0 call *%eax 1074fc: 83 c4 10 add $0x10,%esp return result; } 1074ff: 89 f8 mov %edi,%eax 107501: 8d 65 f4 lea -0xc(%ebp),%esp 107504: 5b pop %ebx 107505: 5e pop %esi 107506: 5f pop %edi 107507: c9 leave 107508: c3 ret 00107531 : const rtems_filesystem_operations_table *fs_ops, rtems_filesystem_options_t options, const char *device, const char *mount_point ) { 107531: 55 push %ebp 107532: 89 e5 mov %esp,%ebp 107534: 57 push %edi 107535: 56 push %esi 107536: 53 push %ebx 107537: 83 ec 3c sub $0x3c,%esp 10753a: 8b 75 14 mov 0x14(%ebp),%esi /* * Is there a file system operations table? */ if ( fs_ops == NULL ) { 10753d: 83 7d 0c 00 cmpl $0x0,0xc(%ebp) 107541: 74 06 je 107549 /* * Are the file system options valid? */ if ( options != RTEMS_FILESYSTEM_READ_ONLY && 107543: 83 7d 10 01 cmpl $0x1,0x10(%ebp) 107547: 76 10 jbe 107559 options != RTEMS_FILESYSTEM_READ_WRITE ) { errno = EINVAL; 107549: e8 02 8d 00 00 call 110250 <__errno> 10754e: c7 00 16 00 00 00 movl $0x16,(%eax) 107554: e9 ea 01 00 00 jmp 107743 <== ALWAYS TAKEN return -1; } /* Do they support being mounted at all ? */ if ( !fs_ops->fsmount_me_h ) { 107559: 8b 45 0c mov 0xc(%ebp),%eax 10755c: 83 78 24 00 cmpl $0x0,0x24(%eax) 107560: 75 19 jne 10757b <== NEVER TAKEN errno = ENOTSUP; 107562: e8 e9 8c 00 00 call 110250 <__errno> <== NOT EXECUTED 107567: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 10756d: 31 f6 xor %esi,%esi <== NOT EXECUTED 10756f: c7 45 c4 00 00 00 00 movl $0x0,-0x3c(%ebp) <== NOT EXECUTED goto cleanup_and_bail; 107576: e9 9a 01 00 00 jmp 107715 <== NOT EXECUTED /* * Allocate a mount table entry */ size = sizeof(rtems_filesystem_mount_table_entry_t); if ( device ) 10757b: b9 6c 00 00 00 mov $0x6c,%ecx 107580: 85 f6 test %esi,%esi 107582: 74 0e je 107592 <== NEVER TAKEN size += strlen( device ) + 1; 107584: 31 c0 xor %eax,%eax <== NOT EXECUTED 107586: 83 c9 ff or $0xffffffff,%ecx <== NOT EXECUTED 107589: 89 f7 mov %esi,%edi <== NOT EXECUTED 10758b: f2 ae repnz scas %es:(%edi),%al <== NOT EXECUTED 10758d: f7 d1 not %ecx <== NOT EXECUTED 10758f: 83 c1 6c add $0x6c,%ecx <== NOT EXECUTED temp_mt_entry = malloc( size ); 107592: 83 ec 0c sub $0xc,%esp 107595: 51 push %ecx 107596: e8 c1 fd ff ff call 10735c <== ALWAYS TAKEN 10759b: 89 c3 mov %eax,%ebx 10759d: 89 45 c4 mov %eax,-0x3c(%ebp) if ( !temp_mt_entry ) { 1075a0: 83 c4 10 add $0x10,%esp 1075a3: 85 c0 test %eax,%eax 1075a5: 75 10 jne 1075b7 <== NEVER TAKEN errno = ENOMEM; 1075a7: e8 a4 8c 00 00 call 110250 <__errno> <== NOT EXECUTED 1075ac: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED 1075b2: e9 8c 01 00 00 jmp 107743 <== NOT EXECUTED return -1; } temp_mt_entry->mt_fs_root.mt_entry = temp_mt_entry; 1075b7: 89 43 2c mov %eax,0x2c(%ebx) temp_mt_entry->options = options; 1075ba: 8b 55 10 mov 0x10(%ebp),%edx 1075bd: 89 50 30 mov %edx,0x30(%eax) if ( device ) { 1075c0: 85 f6 test %esi,%esi 1075c2: 74 14 je 1075d8 <== NEVER TAKEN temp_mt_entry->dev = (char *)temp_mt_entry + sizeof( rtems_filesystem_mount_table_entry_t ); 1075c4: 8d 40 6c lea 0x6c(%eax),%eax <== NOT EXECUTED } temp_mt_entry->mt_fs_root.mt_entry = temp_mt_entry; temp_mt_entry->options = options; if ( device ) { temp_mt_entry->dev = 1075c7: 89 43 68 mov %eax,0x68(%ebx) <== NOT EXECUTED (char *)temp_mt_entry + sizeof( rtems_filesystem_mount_table_entry_t ); strcpy( temp_mt_entry->dev, device ); 1075ca: 52 push %edx <== NOT EXECUTED 1075cb: 52 push %edx <== NOT EXECUTED 1075cc: 56 push %esi <== NOT EXECUTED 1075cd: 50 push %eax <== NOT EXECUTED 1075ce: e8 c1 97 00 00 call 110d94 <== NOT EXECUTED 1075d3: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 1075d6: eb 07 jmp 1075df <== NOT EXECUTED } else temp_mt_entry->dev = 0; 1075d8: c7 40 68 00 00 00 00 movl $0x0,0x68(%eax) /* * The mount_point should be a directory with read/write/execute * permissions in the existing tree. */ if ( mount_point ) { 1075df: 83 7d 18 00 cmpl $0x0,0x18(%ebp) 1075e3: 0f 84 b0 00 00 00 je 107699 if ( rtems_filesystem_evaluate_path( mount_point, strlen( mount_point ), RTEMS_LIBIO_PERMS_RWX, &loc, true ) == -1 ) 1075e9: 31 c0 xor %eax,%eax 1075eb: 83 c9 ff or $0xffffffff,%ecx 1075ee: 8b 7d 18 mov 0x18(%ebp),%edi 1075f1: f2 ae repnz scas %es:(%edi),%al 1075f3: f7 d1 not %ecx 1075f5: 49 dec %ecx * permissions in the existing tree. */ if ( mount_point ) { if ( rtems_filesystem_evaluate_path( 1075f6: 83 ec 0c sub $0xc,%esp 1075f9: 6a 01 push $0x1 1075fb: 8d 75 d4 lea -0x2c(%ebp),%esi 1075fe: 56 push %esi 1075ff: 6a 07 push $0x7 107601: 51 push %ecx 107602: ff 75 18 pushl 0x18(%ebp) 107605: e8 7e fa ff ff call 107088 <== ALWAYS TAKEN 10760a: 83 c4 20 add $0x20,%esp 10760d: 40 inc %eax 10760e: 0f 84 ff 00 00 00 je 107713 <== ALWAYS TAKEN /* * Test for node_type_h */ if (!loc.ops->node_type_h) { 107614: 8b 45 e0 mov -0x20(%ebp),%eax 107617: 8b 40 10 mov 0x10(%eax),%eax 10761a: 85 c0 test %eax,%eax 10761c: 75 10 jne 10762e <== NEVER TAKEN errno = ENOTSUP; 10761e: e8 2d 8c 00 00 call 110250 <__errno> <== NOT EXECUTED 107623: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED goto cleanup_and_bail; 107629: e9 e7 00 00 00 jmp 107715 <== NOT EXECUTED /* * Test to see if it is a directory */ if ( loc.ops->node_type_h( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { 10762e: 83 ec 0c sub $0xc,%esp 107631: 56 push %esi 107632: ff d0 call *%eax 107634: 83 c4 10 add $0x10,%esp 107637: 48 dec %eax 107638: 74 10 je 10764a errno = ENOTDIR; 10763a: e8 11 8c 00 00 call 110250 <__errno> 10763f: c7 00 14 00 00 00 movl $0x14,(%eax) goto cleanup_and_bail; 107645: e9 cb 00 00 00 jmp 107715 <== ALWAYS TAKEN /* * For each mount table entry */ for ( the_node = rtems_filesystem_mount_table_control.first; 10764a: a1 5c 37 12 00 mov 0x12375c,%eax !rtems_chain_is_tail( &rtems_filesystem_mount_table_control, the_node ); the_node = the_node->next ) { the_mount_entry = (rtems_filesystem_mount_table_entry_t *) the_node; if ( the_mount_entry->mt_fs_root.node_access == loc->node_access ) 10764f: 8b 55 d4 mov -0x2c(%ebp),%edx 107652: eb 07 jmp 10765b <== ALWAYS TAKEN 107654: 39 50 1c cmp %edx,0x1c(%eax) 107657: 74 0e je 107667 * For each mount table entry */ for ( the_node = rtems_filesystem_mount_table_control.first; !rtems_chain_is_tail( &rtems_filesystem_mount_table_control, the_node ); the_node = the_node->next ) { 107659: 8b 00 mov (%eax),%eax */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10765b: 3d 60 37 12 00 cmp $0x123760,%eax 107660: 75 f2 jne 107654 107662: e9 e7 00 00 00 jmp 10774e <== ALWAYS TAKEN /* * You can only mount one file system onto a single mount point. */ if ( Is_node_fs_root( &loc ) ){ errno = EBUSY; 107667: e8 e4 8b 00 00 call 110250 <__errno> 10766c: c7 00 10 00 00 00 movl $0x10,(%eax) 107672: eb 0b jmp 10767f <== ALWAYS TAKEN * This link to the parent is only done when we are dealing with system * below the base file system */ if ( !loc.ops->mount_h ){ errno = ENOTSUP; 107674: e8 d7 8b 00 00 call 110250 <__errno> <== NOT EXECUTED 107679: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 10767f: 8d 75 d4 lea -0x2c(%ebp),%esi goto cleanup_and_bail; 107682: e9 8e 00 00 00 jmp 107715 <== ALWAYS TAKEN } if ( loc.ops->mount_h( temp_mt_entry ) ) { 107687: 83 ec 0c sub $0xc,%esp 10768a: 53 push %ebx 10768b: ff d0 call *%eax 10768d: 83 c4 10 add $0x10,%esp 107690: 85 c0 test %eax,%eax 107692: 8d 75 d4 lea -0x2c(%ebp),%esi 107695: 74 35 je 1076cc <== NEVER TAKEN 107697: eb 7c jmp 107715 <== NOT EXECUTED * This is a mount of the base file system --> The * mt_point_node.node_access will be set to null to indicate that this * is the root of the entire file system. */ temp_mt_entry->mt_fs_root.node_access = NULL; 107699: c7 43 1c 00 00 00 00 movl $0x0,0x1c(%ebx) temp_mt_entry->mt_fs_root.handlers = NULL; 1076a0: c7 43 24 00 00 00 00 movl $0x0,0x24(%ebx) temp_mt_entry->mt_fs_root.ops = NULL; 1076a7: c7 43 28 00 00 00 00 movl $0x0,0x28(%ebx) temp_mt_entry->mt_point_node.node_access = NULL; 1076ae: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx) temp_mt_entry->mt_point_node.handlers = NULL; 1076b5: c7 43 10 00 00 00 00 movl $0x0,0x10(%ebx) temp_mt_entry->mt_point_node.ops = NULL; 1076bc: c7 43 14 00 00 00 00 movl $0x0,0x14(%ebx) temp_mt_entry->mt_point_node.mt_entry = NULL; 1076c3: c7 43 18 00 00 00 00 movl $0x0,0x18(%ebx) 1076ca: 31 f6 xor %esi,%esi } if ( fs_ops->fsmount_me_h( temp_mt_entry ) ) { 1076cc: 83 ec 0c sub $0xc,%esp 1076cf: 53 push %ebx 1076d0: 8b 55 0c mov 0xc(%ebp),%edx 1076d3: ff 52 24 call *0x24(%edx) 1076d6: 83 c4 10 add $0x10,%esp 1076d9: 85 c0 test %eax,%eax 1076db: 74 15 je 1076f2 <== NEVER TAKEN /* try to undo the mount operation */ if ( loc.ops->unmount_h ) { 1076dd: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED 1076e0: 8b 40 28 mov 0x28(%eax),%eax <== NOT EXECUTED 1076e3: 85 c0 test %eax,%eax <== NOT EXECUTED 1076e5: 74 2e je 107715 <== NOT EXECUTED loc.ops->unmount_h( temp_mt_entry ); 1076e7: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1076ea: 53 push %ebx <== NOT EXECUTED 1076eb: ff d0 call *%eax <== NOT EXECUTED 1076ed: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 1076f0: eb 23 jmp 107715 <== 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 ); 1076f2: 50 push %eax 1076f3: 50 push %eax 1076f4: 53 push %ebx 1076f5: 68 5c 37 12 00 push $0x12375c 1076fa: e8 41 30 00 00 call 10a740 <_Chain_Append> */ rtems_chain_append( &rtems_filesystem_mount_table_control, &temp_mt_entry->Node ); if ( mt_entry ) 1076ff: 83 c4 10 add $0x10,%esp 107702: 31 c0 xor %eax,%eax 107704: 83 7d 08 00 cmpl $0x0,0x8(%ebp) 107708: 74 3c je 107746 <== ALWAYS TAKEN *mt_entry = temp_mt_entry; 10770a: 8b 45 08 mov 0x8(%ebp),%eax 10770d: 89 18 mov %ebx,(%eax) 10770f: 31 c0 xor %eax,%eax 107711: eb 33 jmp 107746 <== ALWAYS TAKEN 107713: 31 f6 xor %esi,%esi <== NOT EXECUTED return 0; cleanup_and_bail: free( temp_mt_entry ); 107715: 83 ec 0c sub $0xc,%esp 107718: ff 75 c4 pushl -0x3c(%ebp) 10771b: e8 10 fa ff ff call 107130 <== ALWAYS TAKEN if ( loc_to_free ) 107720: 83 c4 10 add $0x10,%esp 107723: 85 f6 test %esi,%esi 107725: 74 1c je 107743 <== ALWAYS TAKEN rtems_filesystem_freenode( loc_to_free ); 107727: 8b 46 0c mov 0xc(%esi),%eax 10772a: 85 c0 test %eax,%eax 10772c: 74 15 je 107743 <== ALWAYS TAKEN 10772e: 8b 40 1c mov 0x1c(%eax),%eax 107731: 85 c0 test %eax,%eax 107733: 74 0e je 107743 <== ALWAYS TAKEN 107735: 83 ec 0c sub $0xc,%esp 107738: 56 push %esi 107739: ff d0 call *%eax 10773b: 83 c8 ff or $0xffffffff,%eax 10773e: 83 c4 10 add $0x10,%esp 107741: eb 03 jmp 107746 <== ALWAYS TAKEN 107743: 83 c8 ff or $0xffffffff,%eax return -1; } 107746: 8d 65 f4 lea -0xc(%ebp),%esp 107749: 5b pop %ebx 10774a: 5e pop %esi 10774b: 5f pop %edi 10774c: c9 leave 10774d: c3 ret * 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. */ temp_mt_entry->mt_point_node.node_access = loc.node_access; 10774e: 89 53 08 mov %edx,0x8(%ebx) temp_mt_entry->mt_point_node.handlers = loc.handlers; 107751: 8b 45 dc mov -0x24(%ebp),%eax 107754: 89 43 10 mov %eax,0x10(%ebx) temp_mt_entry->mt_point_node.ops = loc.ops; 107757: 8b 45 e0 mov -0x20(%ebp),%eax 10775a: 89 43 14 mov %eax,0x14(%ebx) temp_mt_entry->mt_point_node.mt_entry = loc.mt_entry; 10775d: 8b 55 e4 mov -0x1c(%ebp),%edx 107760: 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 ){ 107763: 8b 40 20 mov 0x20(%eax),%eax 107766: 85 c0 test %eax,%eax 107768: 0f 85 19 ff ff ff jne 107687 <== NEVER TAKEN 10776e: e9 01 ff ff ff jmp 107674 <== NOT EXECUTED 0010777c : void newlib_delete_hook( rtems_tcb *current_task, rtems_tcb *deleted_task ) { 10777c: 55 push %ebp 10777d: 89 e5 mov %esp,%ebp 10777f: 57 push %edi 107780: 56 push %esi 107781: 53 push %ebx 107782: 83 ec 0c sub $0xc,%esp 107785: 8b 7d 08 mov 0x8(%ebp),%edi 107788: 8b 75 0c mov 0xc(%ebp),%esi /* * The reentrancy structure was allocated by newlib using malloc() */ if (current_task == deleted_task) { 10778b: 39 f7 cmp %esi,%edi 10778d: 75 08 jne 107797 ptr = _REENT; 10778f: 8b 1d e0 16 12 00 mov 0x1216e0,%ebx 107795: eb 06 jmp 10779d <== ALWAYS TAKEN } else { ptr = deleted_task->libc_reent; 107797: 8b 9e ec 00 00 00 mov 0xec(%esi),%ebx } if (ptr && ptr != _global_impure_ptr) { 10779d: 85 db test %ebx,%ebx 10779f: 74 20 je 1077c1 <== ALWAYS TAKEN 1077a1: 3b 1d 80 de 11 00 cmp 0x11de80,%ebx 1077a7: 74 18 je 1077c1 _reclaim_reent(ptr); */ /* * Just in case there are some buffers lying around. */ _fwalk(ptr, newlib_free_buffers); 1077a9: 50 push %eax 1077aa: 50 push %eax 1077ab: 68 e1 77 10 00 push $0x1077e1 1077b0: 53 push %ebx 1077b1: e8 22 92 00 00 call 1109d8 <_fwalk> #if REENT_MALLOCED free(ptr); #else _Workspace_Free(ptr); 1077b6: 89 1c 24 mov %ebx,(%esp) 1077b9: e8 e7 52 00 00 call 10caa5 <_Workspace_Free> 1077be: 83 c4 10 add $0x10,%esp #endif } deleted_task->libc_reent = NULL; 1077c1: c7 86 ec 00 00 00 00 movl $0x0,0xec(%esi) 1077c8: 00 00 00 /* * Require the switch back to another task to install its own */ if ( current_task == deleted_task ) { 1077cb: 39 f7 cmp %esi,%edi 1077cd: 75 0a jne 1077d9 _REENT = 0; 1077cf: c7 05 e0 16 12 00 00 movl $0x0,0x1216e0 1077d6: 00 00 00 } } 1077d9: 8d 65 f4 lea -0xc(%ebp),%esp 1077dc: 5b pop %ebx 1077dd: 5e pop %esi 1077de: 5f pop %edi 1077df: c9 leave 1077e0: c3 ret 001077e1 : */ int newlib_free_buffers( FILE *fp ) { 1077e1: 55 push %ebp 1077e2: 89 e5 mov %esp,%ebp 1077e4: 53 push %ebx 1077e5: 83 ec 10 sub $0x10,%esp 1077e8: 8b 5d 08 mov 0x8(%ebp),%ebx switch ( fileno(fp) ) { 1077eb: 53 push %ebx 1077ec: e8 ef 8d 00 00 call 1105e0 1077f1: 83 c4 10 add $0x10,%esp 1077f4: 83 f8 02 cmp $0x2,%eax 1077f7: 77 26 ja 10781f <== ALWAYS TAKEN case 0: case 1: case 2: if (fp->_flags & __SMBF) { 1077f9: 80 7b 0c 00 cmpb $0x0,0xc(%ebx) 1077fd: 79 2c jns 10782b <== NEVER TAKEN free( fp->_bf._base ); 1077ff: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 107802: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED 107805: e8 26 f9 ff ff call 107130 <== NOT EXECUTED fp->_flags &= ~__SMBF; 10780a: 66 81 63 0c 7f ff andw $0xff7f,0xc(%ebx) <== NOT EXECUTED fp->_bf._base = fp->_p = (unsigned char *) NULL; 107810: c7 03 00 00 00 00 movl $0x0,(%ebx) <== NOT EXECUTED 107816: c7 43 10 00 00 00 00 movl $0x0,0x10(%ebx) <== NOT EXECUTED 10781d: eb 09 jmp 107828 <== NOT EXECUTED } break; default: fclose(fp); 10781f: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 107822: 53 push %ebx <== NOT EXECUTED 107823: e8 74 8b 00 00 call 11039c <== NOT EXECUTED 107828: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } return 0; } 10782b: 31 c0 xor %eax,%eax 10782d: 8b 5d fc mov -0x4(%ebp),%ebx 107830: c9 leave 107831: c3 ret 001077a0 : rtems_device_driver null_initialize( rtems_device_major_number major, rtems_device_minor_number minor __attribute__((unused)), void *pargp __attribute__((unused)) ) { 1077a0: 55 push %ebp 1077a1: 89 e5 mov %esp,%ebp 1077a3: 53 push %ebx 1077a4: 83 ec 04 sub $0x4,%esp 1077a7: 8b 5d 08 mov 0x8(%ebp),%ebx rtems_device_driver status; if ( !initialized ) { 1077aa: 80 3d 84 4d 12 00 00 cmpb $0x0,0x124d84 1077b1: 75 2b jne 1077de initialized = 1; 1077b3: c6 05 84 4d 12 00 01 movb $0x1,0x124d84 status = rtems_io_register_name( 1077ba: 50 push %eax 1077bb: 6a 00 push $0x0 1077bd: 53 push %ebx 1077be: 68 3c eb 11 00 push $0x11eb3c 1077c3: e8 05 01 00 00 call 1078cd <== ALWAYS TAKEN "/dev/null", major, (rtems_device_minor_number) 0 ); if (status != RTEMS_SUCCESSFUL) 1077c8: 83 c4 10 add $0x10,%esp 1077cb: 85 c0 test %eax,%eax 1077cd: 74 09 je 1077d8 <== NEVER TAKEN rtems_fatal_error_occurred(status); 1077cf: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1077d2: 50 push %eax <== NOT EXECUTED 1077d3: e8 dc 39 00 00 call 10b1b4 <== NOT EXECUTED NULL_major = major; 1077d8: 89 1d b0 50 12 00 mov %ebx,0x1250b0 } return RTEMS_SUCCESSFUL; } 1077de: 31 c0 xor %eax,%eax 1077e0: 8b 5d fc mov -0x4(%ebp),%ebx 1077e3: c9 leave 1077e4: c3 ret 00107785 : rtems_device_driver null_write( rtems_device_major_number major __attribute__((unused)), rtems_device_minor_number minor __attribute__((unused)), void *pargp ) { 107785: 55 push %ebp 107786: 89 e5 mov %esp,%ebp 107788: 8b 45 10 mov 0x10(%ebp),%eax rtems_libio_rw_args_t *rw_args = (rtems_libio_rw_args_t *) pargp; if ( rw_args ) 10778b: 85 c0 test %eax,%eax 10778d: 74 06 je 107795 <== NEVER TAKEN rw_args->bytes_moved = rw_args->count; 10778f: 8b 50 10 mov 0x10(%eax),%edx <== NOT EXECUTED 107792: 89 50 18 mov %edx,0x18(%eax) <== NOT EXECUTED return NULL_SUCCESSFUL; } 107795: 31 c0 xor %eax,%eax 107797: c9 leave 107798: c3 ret 00107b0c : int open( const char *pathname, int flags, ... ) { 107b0c: 55 push %ebp 107b0d: 89 e5 mov %esp,%ebp 107b0f: 57 push %edi 107b10: 56 push %esi 107b11: 53 push %ebx 107b12: 83 ec 3c sub $0x3c,%esp /* * Set the Evaluation flags */ eval_flags = 0; status = flags + 1; 107b15: 8b 45 0c mov 0xc(%ebp),%eax 107b18: 40 inc %eax if ( ( status & _FREAD ) == _FREAD ) 107b19: 89 c6 mov %eax,%esi 107b1b: 83 e6 01 and $0x1,%esi 107b1e: f7 de neg %esi 107b20: 83 e6 04 and $0x4,%esi eval_flags |= RTEMS_LIBIO_PERMS_READ; if ( ( status & _FWRITE ) == _FWRITE ) 107b23: a8 02 test $0x2,%al 107b25: 74 03 je 107b2a eval_flags |= RTEMS_LIBIO_PERMS_WRITE; 107b27: 83 ce 02 or $0x2,%esi va_start(ap, flags); mode = va_arg( ap, int ); 107b2a: 8b 45 10 mov 0x10(%ebp),%eax 107b2d: 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(); 107b30: e8 7a 62 00 00 call 10ddaf <== ALWAYS TAKEN 107b35: 89 c3 mov %eax,%ebx if ( iop == 0 ) { 107b37: bf 17 00 00 00 mov $0x17,%edi 107b3c: 85 c0 test %eax,%eax 107b3e: 0f 84 a7 01 00 00 je 107ceb <== ALWAYS TAKEN /* * See if the file exists. */ status = rtems_filesystem_evaluate_path( pathname, strlen( pathname ), eval_flags, &loc, true ); 107b44: 83 c9 ff or $0xffffffff,%ecx 107b47: 8b 7d 08 mov 0x8(%ebp),%edi 107b4a: 31 c0 xor %eax,%eax 107b4c: f2 ae repnz scas %es:(%edi),%al 107b4e: f7 d1 not %ecx 107b50: 49 dec %ecx /* * See if the file exists. */ status = rtems_filesystem_evaluate_path( 107b51: 83 ec 0c sub $0xc,%esp 107b54: 6a 01 push $0x1 107b56: 8d 45 d4 lea -0x2c(%ebp),%eax 107b59: 50 push %eax 107b5a: 56 push %esi 107b5b: 51 push %ecx 107b5c: ff 75 08 pushl 0x8(%ebp) 107b5f: e8 24 f5 ff ff call 107088 <== ALWAYS TAKEN 107b64: 89 c6 mov %eax,%esi pathname, strlen( pathname ), eval_flags, &loc, true ); if ( status == -1 ) { 107b66: 83 c4 20 add $0x20,%esp 107b69: 83 f8 ff cmp $0xffffffff,%eax 107b6c: 75 7a jne 107be8 if ( errno != ENOENT ) { 107b6e: e8 dd 86 00 00 call 110250 <__errno> 107b73: 83 38 02 cmpl $0x2,(%eax) 107b76: 75 2f jne 107ba7 rc = errno; goto done; } /* If the file does not exist and we are not trying to create it--> error */ if ( !(flags & O_CREAT) ) { 107b78: f7 45 0c 00 02 00 00 testl $0x200,0xc(%ebp) 107b7f: 75 0c jne 107b8d 107b81: 31 f6 xor %esi,%esi 107b83: bf 02 00 00 00 mov $0x2,%edi 107b88: e9 33 01 00 00 jmp 107cc0 <== ALWAYS TAKEN rc = ENOENT; goto done; } /* Create the node for the new regular file */ rc = mknod( pathname, S_IFREG | mode, 0LL ); 107b8d: 6a 00 push $0x0 107b8f: 6a 00 push $0x0 107b91: 8b 45 c4 mov -0x3c(%ebp),%eax 107b94: 80 cc 80 or $0x80,%ah 107b97: 50 push %eax 107b98: ff 75 08 pushl 0x8(%ebp) 107b9b: e8 7c f8 ff ff call 10741c <== ALWAYS TAKEN if ( rc ) { 107ba0: 83 c4 10 add $0x10,%esp 107ba3: 85 c0 test %eax,%eax 107ba5: 74 0e je 107bb5 <== NEVER TAKEN rc = errno; 107ba7: e8 a4 86 00 00 call 110250 <__errno> 107bac: 8b 38 mov (%eax),%edi 107bae: 31 f6 xor %esi,%esi goto done; 107bb0: e9 07 01 00 00 jmp 107cbc <== ALWAYS TAKEN } /* Sanity check to see if the file name exists after the mknod() */ status = rtems_filesystem_evaluate_path( pathname, strlen( pathname ), 0x0, &loc, true ); 107bb5: 89 f1 mov %esi,%ecx 107bb7: 8b 7d 08 mov 0x8(%ebp),%edi 107bba: 31 c0 xor %eax,%eax 107bbc: f2 ae repnz scas %es:(%edi),%al 107bbe: f7 d1 not %ecx 107bc0: 49 dec %ecx 107bc1: 83 ec 0c sub $0xc,%esp 107bc4: 6a 01 push $0x1 107bc6: 8d 45 d4 lea -0x2c(%ebp),%eax 107bc9: 50 push %eax 107bca: 6a 00 push $0x0 107bcc: 51 push %ecx 107bcd: ff 75 08 pushl 0x8(%ebp) 107bd0: e8 b3 f4 ff ff call 107088 if ( status != 0 ) { /* The file did not exist */ 107bd5: 83 c4 20 add $0x20,%esp 107bd8: 85 c0 test %eax,%eax 107bda: 74 28 je 107c04 <== NEVER TAKEN 107bdc: 31 f6 xor %esi,%esi <== NOT EXECUTED 107bde: bf 0d 00 00 00 mov $0xd,%edi <== NOT EXECUTED 107be3: e9 d8 00 00 00 jmp 107cc0 <== NOT EXECUTED rc = EACCES; goto done; } } else if ((flags & (O_EXCL|O_CREAT)) == (O_EXCL|O_CREAT)) { 107be8: 8b 45 0c mov 0xc(%ebp),%eax 107beb: 25 00 0a 00 00 and $0xa00,%eax 107bf0: 3d 00 0a 00 00 cmp $0xa00,%eax 107bf5: 75 0d jne 107c04 107bf7: 8d 75 d4 lea -0x2c(%ebp),%esi 107bfa: bf 11 00 00 00 mov $0x11,%edi 107bff: e9 bc 00 00 00 jmp 107cc0 <== ALWAYS TAKEN /* * Fill in the file control block based on the loc structure * returned by successful path evaluation. */ iop->handlers = loc.handlers; 107c04: 8b 45 dc mov -0x24(%ebp),%eax 107c07: 89 43 3c mov %eax,0x3c(%ebx) iop->file_info = loc.node_access; 107c0a: 8b 45 d4 mov -0x2c(%ebp),%eax 107c0d: 89 43 38 mov %eax,0x38(%ebx) iop->flags |= rtems_libio_fcntl_flags( flags ); 107c10: 8b 73 14 mov 0x14(%ebx),%esi 107c13: 83 ec 0c sub $0xc,%esp 107c16: ff 75 0c pushl 0xc(%ebp) 107c19: e8 1c 62 00 00 call 10de3a <== ALWAYS TAKEN 107c1e: 09 f0 or %esi,%eax 107c20: 89 43 14 mov %eax,0x14(%ebx) iop->pathinfo = loc; 107c23: 8d 7b 18 lea 0x18(%ebx),%edi 107c26: 8d 75 d4 lea -0x2c(%ebp),%esi 107c29: b9 05 00 00 00 mov $0x5,%ecx 107c2e: f3 a5 rep movsl %ds:(%esi),%es:(%edi) if ( !iop->handlers || !iop->handlers->open_h ) { 107c30: 8b 43 3c mov 0x3c(%ebx),%eax 107c33: 83 c4 10 add $0x10,%esp 107c36: 85 c0 test %eax,%eax 107c38: 0f 84 cc 00 00 00 je 107d0a <== ALWAYS TAKEN 107c3e: 8b 00 mov (%eax),%eax 107c40: 85 c0 test %eax,%eax 107c42: 0f 84 c2 00 00 00 je 107d0a <== ALWAYS TAKEN rc = ENOTSUP; goto done; } rc = (*iop->handlers->open_h)( iop, pathname, flags, mode ); 107c48: ff 75 c4 pushl -0x3c(%ebp) 107c4b: ff 75 0c pushl 0xc(%ebp) 107c4e: ff 75 08 pushl 0x8(%ebp) 107c51: 53 push %ebx 107c52: ff d0 call *%eax if ( rc ) { 107c54: 83 c4 10 add $0x10,%esp 107c57: 85 c0 test %eax,%eax 107c59: 74 0c je 107c67 rc = errno; 107c5b: e8 f0 85 00 00 call 110250 <__errno> 107c60: 8b 38 mov (%eax),%edi 107c62: 8d 75 d4 lea -0x2c(%ebp),%esi goto done; 107c65: eb 55 jmp 107cbc <== ALWAYS TAKEN /* * Optionally truncate the file. */ if ( (flags & O_TRUNC) == O_TRUNC ) { 107c67: f7 45 0c 00 04 00 00 testl $0x400,0xc(%ebp) 107c6e: 0f 84 83 00 00 00 je 107cf7 rc = ftruncate( iop - rtems_libio_iops, 0 ); 107c74: 50 push %eax 107c75: 50 push %eax 107c76: 6a 00 push $0x0 107c78: 89 d8 mov %ebx,%eax 107c7a: 2b 05 18 37 12 00 sub 0x123718,%eax 107c80: c1 f8 06 sar $0x6,%eax 107c83: 50 push %eax 107c84: e8 bb 5e 00 00 call 10db44 107c89: 89 c7 mov %eax,%edi if ( rc ) { 107c8b: 83 c4 10 add $0x10,%esp 107c8e: 85 c0 test %eax,%eax 107c90: 74 65 je 107cf7 <== NEVER TAKEN if(errno) rc = errno; 107c92: e8 b9 85 00 00 call 110250 <__errno> <== NOT EXECUTED 107c97: 83 38 00 cmpl $0x0,(%eax) <== NOT EXECUTED 107c9a: 74 07 je 107ca3 <== NOT EXECUTED 107c9c: e8 af 85 00 00 call 110250 <__errno> <== NOT EXECUTED 107ca1: 8b 38 mov (%eax),%edi <== NOT EXECUTED close( iop - rtems_libio_iops ); 107ca3: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 107ca6: 2b 1d 18 37 12 00 sub 0x123718,%ebx <== NOT EXECUTED 107cac: c1 fb 06 sar $0x6,%ebx <== NOT EXECUTED 107caf: 53 push %ebx <== NOT EXECUTED 107cb0: e8 07 5e 00 00 call 10dabc <== NOT EXECUTED 107cb5: 31 f6 xor %esi,%esi <== NOT EXECUTED 107cb7: 31 db xor %ebx,%ebx <== NOT EXECUTED 107cb9: 83 c4 10 add $0x10,%esp <== NOT EXECUTED */ done: va_end(ap); if ( rc ) { 107cbc: 85 ff test %edi,%edi 107cbe: 74 37 je 107cf7 <== ALWAYS TAKEN if ( iop ) 107cc0: 85 db test %ebx,%ebx 107cc2: 74 0c je 107cd0 <== ALWAYS TAKEN rtems_libio_free( iop ); 107cc4: 83 ec 0c sub $0xc,%esp 107cc7: 53 push %ebx 107cc8: e8 8d 60 00 00 call 10dd5a <== ALWAYS TAKEN 107ccd: 83 c4 10 add $0x10,%esp if ( loc_to_free ) 107cd0: 85 f6 test %esi,%esi 107cd2: 74 17 je 107ceb rtems_filesystem_freenode( loc_to_free ); 107cd4: 8b 46 0c mov 0xc(%esi),%eax 107cd7: 85 c0 test %eax,%eax 107cd9: 74 10 je 107ceb <== ALWAYS TAKEN 107cdb: 8b 40 1c mov 0x1c(%eax),%eax 107cde: 85 c0 test %eax,%eax 107ce0: 74 09 je 107ceb <== ALWAYS TAKEN 107ce2: 83 ec 0c sub $0xc,%esp 107ce5: 56 push %esi 107ce6: ff d0 call *%eax 107ce8: 83 c4 10 add $0x10,%esp rtems_set_errno_and_return_minus_one( rc ); 107ceb: e8 60 85 00 00 call 110250 <__errno> 107cf0: 89 38 mov %edi,(%eax) 107cf2: 83 c8 ff or $0xffffffff,%eax 107cf5: eb 0b jmp 107d02 <== ALWAYS TAKEN } return iop - rtems_libio_iops; 107cf7: 89 d8 mov %ebx,%eax 107cf9: 2b 05 18 37 12 00 sub 0x123718,%eax 107cff: c1 f8 06 sar $0x6,%eax } 107d02: 8d 65 f4 lea -0xc(%ebp),%esp 107d05: 5b pop %ebx 107d06: 5e pop %esi 107d07: 5f pop %edi 107d08: c9 leave 107d09: c3 ret if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); rtems_set_errno_and_return_minus_one( rc ); } return iop - rtems_libio_iops; 107d0a: 8d 75 d4 lea -0x2c(%ebp),%esi <== NOT EXECUTED 107d0d: bf 86 00 00 00 mov $0x86,%edi <== NOT EXECUTED 107d12: eb ac jmp 107cc0 <== NOT EXECUTED 00107aac : /* * This is a replaceable stub which opens the console, if present. */ void open_dev_console(void) { 107aac: 55 push %ebp 107aad: 89 e5 mov %esp,%ebp 107aaf: 83 ec 0c sub $0xc,%esp int stderr_fd; /* * Attempt to open /dev/console. */ if ((stdin_fd = open("/dev/console", O_RDONLY, 0)) == -1) { 107ab2: 6a 00 push $0x0 107ab4: 6a 00 push $0x0 107ab6: 68 52 bf 11 00 push $0x11bf52 107abb: e8 4c 00 00 00 call 107b0c <== ALWAYS TAKEN 107ac0: 83 c4 10 add $0x10,%esp 107ac3: 40 inc %eax 107ac4: 74 41 je 107b07 /* * But if we find /dev/console once, we better find it twice more * or something is REALLY wrong. */ if ((stdout_fd = open("/dev/console", O_WRONLY, 0)) == -1) 107ac6: 52 push %edx 107ac7: 6a 00 push $0x0 107ac9: 6a 01 push $0x1 107acb: 68 52 bf 11 00 push $0x11bf52 107ad0: e8 37 00 00 00 call 107b0c <== ALWAYS TAKEN 107ad5: 83 c4 10 add $0x10,%esp 107ad8: 40 inc %eax 107ad9: 75 0a jne 107ae5 <== NEVER TAKEN rtems_fatal_error_occurred( 0x55544431 ); /* error STD1 */ 107adb: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 107ade: 68 31 44 54 55 push $0x55544431 <== NOT EXECUTED 107ae3: eb 1d jmp 107b02 <== NOT EXECUTED if ((stderr_fd = open("/dev/console", O_WRONLY, 0)) == -1) 107ae5: 50 push %eax 107ae6: 6a 00 push $0x0 107ae8: 6a 01 push $0x1 107aea: 68 52 bf 11 00 push $0x11bf52 107aef: e8 18 00 00 00 call 107b0c <== ALWAYS TAKEN 107af4: 83 c4 10 add $0x10,%esp 107af7: 40 inc %eax 107af8: 75 0d jne 107b07 <== NEVER TAKEN rtems_fatal_error_occurred( 0x55544432 ); /* error STD2 */ 107afa: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 107afd: 68 32 44 54 55 push $0x55544432 <== NOT EXECUTED 107b02: e8 dd 29 00 00 call 10a4e4 <== NOT EXECUTED } 107b07: c9 leave 107b08: c3 ret 00108481 : /* * Handle output processing */ static void oproc (unsigned char c, struct rtems_termios_tty *tty) { 108481: 55 push %ebp 108482: 89 e5 mov %esp,%ebp 108484: 56 push %esi 108485: 53 push %ebx 108486: 83 ec 10 sub $0x10,%esp 108489: 89 d3 mov %edx,%ebx 10848b: 88 45 f4 mov %al,-0xc(%ebp) int i; if (tty->termios.c_oflag & OPOST) { 10848e: 8b 52 34 mov 0x34(%edx),%edx 108491: f6 c2 01 test $0x1,%dl 108494: 0f 84 ee 00 00 00 je 108588 <== ALWAYS TAKEN switch (c) { 10849a: 3c 09 cmp $0x9,%al 10849c: 74 76 je 108514 10849e: 77 0d ja 1084ad <== NEVER TAKEN 1084a0: 3c 08 cmp $0x8,%al <== NOT EXECUTED 1084a2: 0f 85 ab 00 00 00 jne 108553 <== NOT EXECUTED 1084a8: e9 99 00 00 00 jmp 108546 <== NOT EXECUTED 1084ad: 3c 0a cmp $0xa,%al 1084af: 74 0a je 1084bb 1084b1: 3c 0d cmp $0xd,%al 1084b3: 0f 85 9a 00 00 00 jne 108553 <== NEVER TAKEN 1084b9: eb 33 jmp 1084ee <== NOT EXECUTED case '\n': if (tty->termios.c_oflag & ONLRET) 1084bb: 80 e2 20 and $0x20,%dl 1084be: 74 07 je 1084c7 <== NEVER TAKEN tty->column = 0; 1084c0: c7 43 28 00 00 00 00 movl $0x0,0x28(%ebx) <== NOT EXECUTED if (tty->termios.c_oflag & ONLCR) { 1084c7: f6 43 34 04 testb $0x4,0x34(%ebx) 1084cb: 0f 84 b7 00 00 00 je 108588 <== ALWAYS TAKEN rtems_termios_puts ("\r", 1, tty); 1084d1: 56 push %esi 1084d2: 53 push %ebx 1084d3: 6a 01 push $0x1 1084d5: 68 98 d4 11 00 push $0x11d498 1084da: e8 82 fe ff ff call 108361 <== ALWAYS TAKEN tty->column = 0; 1084df: c7 43 28 00 00 00 00 movl $0x0,0x28(%ebx) 1084e6: 83 c4 10 add $0x10,%esp 1084e9: e9 9a 00 00 00 jmp 108588 <== ALWAYS TAKEN } break; case '\r': if ((tty->termios.c_oflag & ONOCR) && (tty->column == 0)) 1084ee: f6 c2 10 test $0x10,%dl <== NOT EXECUTED 1084f1: 74 0a je 1084fd <== NOT EXECUTED 1084f3: 83 7b 28 00 cmpl $0x0,0x28(%ebx) <== NOT EXECUTED 1084f7: 0f 84 9b 00 00 00 je 108598 <== NOT EXECUTED return; if (tty->termios.c_oflag & OCRNL) { 1084fd: f6 c2 08 test $0x8,%dl <== NOT EXECUTED 108500: 74 09 je 10850b <== NOT EXECUTED c = '\n'; 108502: c6 45 f4 0a movb $0xa,-0xc(%ebp) <== NOT EXECUTED if (tty->termios.c_oflag & ONLRET) 108506: 80 e2 20 and $0x20,%dl <== NOT EXECUTED 108509: 74 7d je 108588 <== NOT EXECUTED tty->column = 0; break; } tty->column = 0; 10850b: c7 43 28 00 00 00 00 movl $0x0,0x28(%ebx) <== NOT EXECUTED break; 108512: eb 74 jmp 108588 <== NOT EXECUTED case '\t': i = 8 - (tty->column & 7); 108514: 8b 4b 28 mov 0x28(%ebx),%ecx 108517: 89 ce mov %ecx,%esi 108519: 83 e6 07 and $0x7,%esi 10851c: b8 08 00 00 00 mov $0x8,%eax 108521: 29 f0 sub %esi,%eax if ((tty->termios.c_oflag & TABDLY) == XTABS) { 108523: 81 e2 00 18 00 00 and $0x1800,%edx 108529: 81 fa 00 18 00 00 cmp $0x1800,%edx 10852f: 8d 14 08 lea (%eax,%ecx,1),%edx 108532: 75 0d jne 108541 <== ALWAYS TAKEN tty->column += i; 108534: 89 53 28 mov %edx,0x28(%ebx) rtems_termios_puts ( " ", i, tty); 108537: 51 push %ecx 108538: 53 push %ebx 108539: 50 push %eax 10853a: 68 ac d1 11 00 push $0x11d1ac 10853f: eb 4f jmp 108590 <== ALWAYS TAKEN return; } tty->column += i; 108541: 89 53 28 mov %edx,0x28(%ebx) <== NOT EXECUTED break; 108544: eb 42 jmp 108588 <== NOT EXECUTED case '\b': if (tty->column > 0) 108546: 8b 43 28 mov 0x28(%ebx),%eax <== NOT EXECUTED 108549: 85 c0 test %eax,%eax <== NOT EXECUTED 10854b: 7e 3b jle 108588 <== NOT EXECUTED tty->column--; 10854d: 48 dec %eax <== NOT EXECUTED 10854e: 89 43 28 mov %eax,0x28(%ebx) <== NOT EXECUTED 108551: eb 35 jmp 108588 <== NOT EXECUTED break; default: if (tty->termios.c_oflag & OLCUC) 108553: 80 e2 02 and $0x2,%dl 108556: 74 1c je 108574 <== NEVER TAKEN c = toupper(c); 108558: 0f b6 c0 movzbl %al,%eax <== NOT EXECUTED 10855b: 8b 15 dc 16 12 00 mov 0x1216dc,%edx <== NOT EXECUTED 108561: 0f be 54 02 01 movsbl 0x1(%edx,%eax,1),%edx <== NOT EXECUTED 108566: 83 e2 03 and $0x3,%edx <== NOT EXECUTED 108569: 83 fa 02 cmp $0x2,%edx <== NOT EXECUTED 10856c: 75 03 jne 108571 <== NOT EXECUTED 10856e: 83 e8 20 sub $0x20,%eax <== NOT EXECUTED 108571: 88 45 f4 mov %al,-0xc(%ebp) <== NOT EXECUTED if (!iscntrl(c)) 108574: 0f b6 45 f4 movzbl -0xc(%ebp),%eax 108578: 8b 15 dc 16 12 00 mov 0x1216dc,%edx 10857e: f6 44 02 01 20 testb $0x20,0x1(%edx,%eax,1) 108583: 75 03 jne 108588 <== ALWAYS TAKEN tty->column++; 108585: ff 43 28 incl 0x28(%ebx) break; } } rtems_termios_puts (&c, 1, tty); 108588: 52 push %edx 108589: 53 push %ebx 10858a: 6a 01 push $0x1 10858c: 8d 45 f4 lea -0xc(%ebp),%eax 10858f: 50 push %eax 108590: e8 cc fd ff ff call 108361 <== ALWAYS TAKEN 108595: 83 c4 10 add $0x10,%esp } 108598: 8d 65 f8 lea -0x8(%ebp),%esp 10859b: 5b pop %ebx 10859c: 5e pop %esi 10859d: c9 leave 10859e: c3 ret 0010fe2c : * Called by pipe() to create an anonymous pipe. */ int pipe_create( int filsdes[2] ) { 10fe2c: 55 push %ebp 10fe2d: 89 e5 mov %esp,%ebp 10fe2f: 57 push %edi 10fe30: 56 push %esi 10fe31: 53 push %ebx 10fe32: 83 ec 48 sub $0x48,%esp rtems_filesystem_location_info_t loc; rtems_libio_t *iop; int err = 0; /* Create /tmp if not exists */ if (rtems_filesystem_evaluate_path("/tmp", 3, RTEMS_LIBIO_PERMS_RWX, &loc, TRUE) 10fe35: 6a 01 push $0x1 10fe37: 8d 5d c4 lea -0x3c(%ebp),%ebx 10fe3a: 53 push %ebx 10fe3b: 6a 07 push $0x7 10fe3d: 6a 03 push $0x3 10fe3f: 68 d7 da 11 00 push $0x11dad7 10fe44: e8 3f 72 ff ff call 107088 10fe49: 83 c4 20 add $0x20,%esp 10fe4c: 85 c0 test %eax,%eax 10fe4e: 74 2b je 10fe7b <== ALWAYS TAKEN != 0) { if (errno != ENOENT) 10fe50: e8 fb 03 00 00 call 110250 <__errno> 10fe55: 83 38 02 cmpl $0x2,(%eax) 10fe58: 0f 85 0c 01 00 00 jne 10ff6a <== ALWAYS TAKEN return -1; if (mkdir("/tmp", S_IRWXU|S_IRWXG|S_IRWXO|S_ISVTX) != 0) 10fe5e: 50 push %eax 10fe5f: 50 push %eax 10fe60: 68 ff 03 00 00 push $0x3ff 10fe65: 68 d7 da 11 00 push $0x11dad7 10fe6a: e8 91 75 ff ff call 107400 10fe6f: 83 c4 10 add $0x10,%esp 10fe72: 85 c0 test %eax,%eax 10fe74: 74 1c je 10fe92 <== NEVER TAKEN 10fe76: e9 ef 00 00 00 jmp 10ff6a <== NOT EXECUTED return -1; } else rtems_filesystem_freenode(&loc); 10fe7b: 8b 45 d0 mov -0x30(%ebp),%eax <== NOT EXECUTED 10fe7e: 85 c0 test %eax,%eax <== NOT EXECUTED 10fe80: 74 10 je 10fe92 <== NOT EXECUTED 10fe82: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 10fe85: 85 c0 test %eax,%eax <== NOT EXECUTED 10fe87: 74 09 je 10fe92 <== NOT EXECUTED 10fe89: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10fe8c: 53 push %ebx <== NOT EXECUTED 10fe8d: ff d0 call *%eax <== NOT EXECUTED 10fe8f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED /* /tmp/.fifoXXXX */ char fifopath[15]; memcpy(fifopath, "/tmp/.fifo", 10); 10fe92: 8d 5d d9 lea -0x27(%ebp),%ebx 10fe95: be dc da 11 00 mov $0x11dadc,%esi 10fe9a: b9 0a 00 00 00 mov $0xa,%ecx 10fe9f: 89 df mov %ebx,%edi 10fea1: f3 a4 rep movsb %ds:(%esi),%es:(%edi) sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); 10fea3: 0f b7 05 20 35 12 00 movzwl 0x123520,%eax 10feaa: 8d 50 01 lea 0x1(%eax),%edx 10fead: 66 89 15 20 35 12 00 mov %dx,0x123520 10feb4: 57 push %edi 10feb5: 50 push %eax 10feb6: 68 e7 da 11 00 push $0x11dae7 10febb: 8d 45 e3 lea -0x1d(%ebp),%eax 10febe: 50 push %eax 10febf: e8 f8 0c 00 00 call 110bbc /* Try creating FIFO file until find an available file name */ while (mkfifo(fifopath, S_IRUSR|S_IWUSR) != 0) { 10fec4: 59 pop %ecx 10fec5: 5e pop %esi 10fec6: 68 80 01 00 00 push $0x180 10fecb: 53 push %ebx 10fecc: e8 f7 00 00 00 call 10ffc8 10fed1: 83 c4 10 add $0x10,%esp 10fed4: 85 c0 test %eax,%eax 10fed6: 74 0a je 10fee2 <== NEVER TAKEN if (errno != EEXIST){ 10fed8: e8 73 03 00 00 call 110250 <__errno> <== NOT EXECUTED 10fedd: e9 88 00 00 00 jmp 10ff6a <== NOT EXECUTED 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); 10fee2: 52 push %edx 10fee3: 52 push %edx 10fee4: 68 00 40 00 00 push $0x4000 10fee9: 53 push %ebx 10feea: e8 1d 7c ff ff call 107b0c 10feef: 8b 55 08 mov 0x8(%ebp),%edx 10fef2: 89 02 mov %eax,(%edx) if (filsdes[0] < 0) { 10fef4: 83 c4 10 add $0x10,%esp 10fef7: 85 c0 test %eax,%eax 10fef9: 79 0d jns 10ff08 <== ALWAYS TAKEN err = errno; 10fefb: e8 50 03 00 00 call 110250 <__errno> 10ff00: 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); 10ff02: 83 ec 0c sub $0xc,%esp 10ff05: 53 push %ebx 10ff06: eb 53 jmp 10ff5b <== ALWAYS TAKEN } else { /* Reset open file to blocking mode */ iop = rtems_libio_iop(filsdes[0]); 10ff08: 31 d2 xor %edx,%edx <== NOT EXECUTED 10ff0a: 3b 05 64 f8 11 00 cmp 0x11f864,%eax <== NOT EXECUTED 10ff10: 73 0b jae 10ff1d <== NOT EXECUTED 10ff12: 89 c2 mov %eax,%edx <== NOT EXECUTED 10ff14: c1 e2 06 shl $0x6,%edx <== NOT EXECUTED 10ff17: 03 15 18 37 12 00 add 0x123718,%edx <== NOT EXECUTED iop->flags &= ~LIBIO_FLAGS_NO_DELAY; 10ff1d: 83 62 14 fe andl $0xfffffffe,0x14(%edx) <== NOT EXECUTED filsdes[1] = open(fifopath, O_WRONLY); 10ff21: 50 push %eax <== NOT EXECUTED 10ff22: 50 push %eax <== NOT EXECUTED 10ff23: 6a 01 push $0x1 <== NOT EXECUTED 10ff25: 8d 45 d9 lea -0x27(%ebp),%eax <== NOT EXECUTED 10ff28: 50 push %eax <== NOT EXECUTED 10ff29: e8 de 7b ff ff call 107b0c <== NOT EXECUTED 10ff2e: 8b 55 08 mov 0x8(%ebp),%edx <== NOT EXECUTED 10ff31: 89 42 04 mov %eax,0x4(%edx) <== NOT EXECUTED if (filsdes[1] < 0) { 10ff34: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10ff37: 31 f6 xor %esi,%esi <== NOT EXECUTED 10ff39: 85 c0 test %eax,%eax <== NOT EXECUTED 10ff3b: 79 17 jns 10ff54 <== NOT EXECUTED err = errno; 10ff3d: e8 0e 03 00 00 call 110250 <__errno> <== NOT EXECUTED 10ff42: 8b 30 mov (%eax),%esi <== NOT EXECUTED close(filsdes[0]); 10ff44: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10ff47: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 10ff4a: ff 30 pushl (%eax) <== NOT EXECUTED 10ff4c: e8 6b db ff ff call 10dabc <== NOT EXECUTED 10ff51: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } unlink(fifopath); 10ff54: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10ff57: 8d 45 d9 lea -0x27(%ebp),%eax <== NOT EXECUTED 10ff5a: 50 push %eax <== NOT EXECUTED 10ff5b: e8 84 00 00 00 call 10ffe4 10ff60: 83 c4 10 add $0x10,%esp } rtems_set_errno_and_return_minus_one(err); 10ff63: e8 e8 02 00 00 call 110250 <__errno> 10ff68: 89 30 mov %esi,(%eax) } 10ff6a: 83 c8 ff or $0xffffffff,%eax 10ff6d: 8d 65 f4 lea -0xc(%ebp),%esp 10ff70: 5b pop %ebx 10ff71: 5e pop %esi 10ff72: 5f pop %edi 10ff73: c9 leave 10ff74: c3 ret 0010f179 : /* Called with rtems_pipe_semaphore held. */ static inline void pipe_free( pipe_control_t *pipe ) { 10f179: 55 push %ebp <== NOT EXECUTED 10f17a: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10f17c: 53 push %ebx <== NOT EXECUTED 10f17d: 83 ec 10 sub $0x10,%esp <== NOT EXECUTED 10f180: 89 c3 mov %eax,%ebx <== NOT EXECUTED rtems_barrier_delete(pipe->readBarrier); 10f182: ff 70 2c pushl 0x2c(%eax) <== NOT EXECUTED 10f185: e8 62 07 00 00 call 10f8ec <== NOT EXECUTED rtems_barrier_delete(pipe->writeBarrier); 10f18a: 59 pop %ecx <== NOT EXECUTED 10f18b: ff 73 30 pushl 0x30(%ebx) <== NOT EXECUTED 10f18e: e8 59 07 00 00 call 10f8ec <== NOT EXECUTED rtems_semaphore_delete(pipe->Semaphore); 10f193: 5a pop %edx <== NOT EXECUTED 10f194: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED 10f197: e8 00 ad ff ff call 109e9c <== NOT EXECUTED free(pipe->Buffer); 10f19c: 58 pop %eax <== NOT EXECUTED 10f19d: ff 33 pushl (%ebx) <== NOT EXECUTED 10f19f: e8 8c 7f ff ff call 107130 <== NOT EXECUTED free(pipe); 10f1a4: 89 1c 24 mov %ebx,(%esp) <== NOT EXECUTED 10f1a7: e8 84 7f ff ff call 107130 <== NOT EXECUTED 10f1ac: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } 10f1af: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 10f1b2: c9 leave <== NOT EXECUTED 10f1b3: c3 ret <== NOT EXECUTED 0010ee2f : pipe_control_t *pipe, uint32_t cmd, void *buffer, rtems_libio_t *iop ) { 10ee2f: 55 push %ebp <== NOT EXECUTED 10ee30: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10ee32: 56 push %esi <== NOT EXECUTED 10ee33: 53 push %ebx <== NOT EXECUTED 10ee34: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED 10ee37: 8b 75 10 mov 0x10(%ebp),%esi <== NOT EXECUTED if (cmd == FIONREAD) { 10ee3a: b8 ea ff ff ff mov $0xffffffea,%eax <== NOT EXECUTED 10ee3f: 81 7d 0c 7f 66 04 40 cmpl $0x4004667f,0xc(%ebp) <== NOT EXECUTED 10ee46: 75 36 jne 10ee7e <== NOT EXECUTED if (buffer == NULL) 10ee48: b0 f2 mov $0xf2,%al <== NOT EXECUTED 10ee4a: 85 f6 test %esi,%esi <== NOT EXECUTED 10ee4c: 74 30 je 10ee7e <== NOT EXECUTED return -EFAULT; if (! PIPE_LOCK(pipe)) 10ee4e: 50 push %eax <== NOT EXECUTED 10ee4f: 6a 00 push $0x0 <== NOT EXECUTED 10ee51: 6a 00 push $0x0 <== NOT EXECUTED 10ee53: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED 10ee56: e8 d1 b0 ff ff call 109f2c <== NOT EXECUTED 10ee5b: 89 c2 mov %eax,%edx <== NOT EXECUTED 10ee5d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10ee60: b8 fc ff ff ff mov $0xfffffffc,%eax <== NOT EXECUTED 10ee65: 85 d2 test %edx,%edx <== NOT EXECUTED 10ee67: 75 15 jne 10ee7e <== NOT EXECUTED return -EINTR; /* Return length of pipe */ *(uint *)buffer = pipe->Length; 10ee69: 8b 43 0c mov 0xc(%ebx),%eax <== NOT EXECUTED 10ee6c: 89 06 mov %eax,(%esi) <== NOT EXECUTED PIPE_UNLOCK(pipe); 10ee6e: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10ee71: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED 10ee74: e8 9f b1 ff ff call 10a018 <== NOT EXECUTED 10ee79: 31 c0 xor %eax,%eax <== NOT EXECUTED return 0; 10ee7b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } return -EINVAL; } 10ee7e: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED 10ee81: 5b pop %ebx <== NOT EXECUTED 10ee82: 5e pop %esi <== NOT EXECUTED 10ee83: c9 leave <== NOT EXECUTED 10ee84: c3 ret <== NOT EXECUTED 0010edd8 : pipe_control_t *pipe, off_t offset, int whence, rtems_libio_t *iop ) { 10edd8: 55 push %ebp <== NOT EXECUTED 10edd9: 89 e5 mov %esp,%ebp <== NOT EXECUTED /* Seek on pipe is not supported */ return -ESPIPE; } 10eddb: b8 e3 ff ff ff mov $0xffffffe3,%eax <== NOT EXECUTED 10ede0: c9 leave <== NOT EXECUTED 10ede1: c3 ret <== NOT EXECUTED 0010f017 : pipe_control_t *pipe, void *buffer, size_t count, rtems_libio_t *iop ) { 10f017: 55 push %ebp <== NOT EXECUTED 10f018: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10f01a: 57 push %edi <== NOT EXECUTED 10f01b: 56 push %esi <== NOT EXECUTED 10f01c: 53 push %ebx <== NOT EXECUTED 10f01d: 83 ec 30 sub $0x30,%esp <== NOT EXECUTED 10f020: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) 10f023: 6a 00 push $0x0 <== NOT EXECUTED 10f025: 6a 00 push $0x0 <== NOT EXECUTED 10f027: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED 10f02a: e8 fd ae ff ff call 109f2c <== NOT EXECUTED 10f02f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10f032: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp) <== NOT EXECUTED 10f039: 85 c0 test %eax,%eax <== NOT EXECUTED 10f03b: 0f 84 08 01 00 00 je 10f149 <== NOT EXECUTED 10f041: c7 45 d4 fc ff ff ff movl $0xfffffffc,-0x2c(%ebp) <== NOT EXECUTED 10f048: e9 21 01 00 00 jmp 10f16e <== NOT EXECUTED return -EINTR; while (read < count) { while (PIPE_EMPTY(pipe)) { /* Not an error */ if (pipe->Writers == 0) 10f04d: 83 7b 14 00 cmpl $0x0,0x14(%ebx) <== NOT EXECUTED 10f051: 0f 84 fe 00 00 00 je 10f155 <== NOT EXECUTED goto out_locked; if (LIBIO_NODELAY(iop)) { 10f057: 8b 45 14 mov 0x14(%ebp),%eax <== NOT EXECUTED 10f05a: f6 40 14 01 testb $0x1,0x14(%eax) <== NOT EXECUTED 10f05e: 74 0a je 10f06a <== NOT EXECUTED 10f060: be f5 ff ff ff mov $0xfffffff5,%esi <== NOT EXECUTED 10f065: e9 ed 00 00 00 jmp 10f157 <== NOT EXECUTED ret = -EAGAIN; goto out_locked; } /* Wait until pipe is no more empty or no writer exists */ pipe->waitingReaders ++; 10f06a: ff 43 18 incl 0x18(%ebx) <== NOT EXECUTED PIPE_UNLOCK(pipe); 10f06d: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10f070: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED 10f073: e8 a0 af ff ff call 10a018 <== NOT EXECUTED if (! PIPE_READWAIT(pipe)) 10f078: 5a pop %edx <== NOT EXECUTED 10f079: 59 pop %ecx <== NOT EXECUTED 10f07a: 6a 00 push $0x0 <== NOT EXECUTED 10f07c: ff 73 2c pushl 0x2c(%ebx) <== NOT EXECUTED 10f07f: e8 20 09 00 00 call 10f9a4 <== NOT EXECUTED 10f084: 83 c4 0c add $0xc,%esp <== NOT EXECUTED 10f087: 83 f8 01 cmp $0x1,%eax <== NOT EXECUTED 10f08a: 19 f6 sbb %esi,%esi <== NOT EXECUTED 10f08c: f7 d6 not %esi <== NOT EXECUTED 10f08e: 83 e6 fc and $0xfffffffc,%esi <== NOT EXECUTED ret = -EINTR; if (! PIPE_LOCK(pipe)) { 10f091: 6a 00 push $0x0 <== NOT EXECUTED 10f093: 6a 00 push $0x0 <== NOT EXECUTED 10f095: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED 10f098: e8 8f ae ff ff call 109f2c <== NOT EXECUTED 10f09d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10f0a0: 85 c0 test %eax,%eax <== NOT EXECUTED 10f0a2: 74 0a je 10f0ae <== NOT EXECUTED 10f0a4: be fc ff ff ff mov $0xfffffffc,%esi <== NOT EXECUTED 10f0a9: e9 b7 00 00 00 jmp 10f165 <== NOT EXECUTED /* WARN waitingReaders not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingReaders --; 10f0ae: ff 4b 18 decl 0x18(%ebx) <== NOT EXECUTED if (ret != 0) 10f0b1: 85 f6 test %esi,%esi <== NOT EXECUTED 10f0b3: 0f 85 9e 00 00 00 jne 10f157 <== NOT EXECUTED if (! PIPE_LOCK(pipe)) return -EINTR; while (read < count) { while (PIPE_EMPTY(pipe)) { 10f0b9: 8b 53 0c mov 0xc(%ebx),%edx <== NOT EXECUTED 10f0bc: 85 d2 test %edx,%edx <== NOT EXECUTED 10f0be: 74 8d je 10f04d <== NOT EXECUTED if (ret != 0) goto out_locked; } /* Read chunk bytes */ chunk = MIN(count - read, pipe->Length); 10f0c0: 8b 45 10 mov 0x10(%ebp),%eax <== NOT EXECUTED 10f0c3: 2b 45 d4 sub -0x2c(%ebp),%eax <== NOT EXECUTED 10f0c6: 89 55 d0 mov %edx,-0x30(%ebp) <== NOT EXECUTED 10f0c9: 39 c2 cmp %eax,%edx <== NOT EXECUTED 10f0cb: 76 03 jbe 10f0d0 <== NOT EXECUTED 10f0cd: 89 45 d0 mov %eax,-0x30(%ebp) <== NOT EXECUTED chunk1 = pipe->Size - pipe->Start; 10f0d0: 8b 73 08 mov 0x8(%ebx),%esi <== NOT EXECUTED 10f0d3: 8b 43 04 mov 0x4(%ebx),%eax <== NOT EXECUTED 10f0d6: 29 f0 sub %esi,%eax <== NOT EXECUTED if (chunk > chunk1) { 10f0d8: 39 45 d0 cmp %eax,-0x30(%ebp) <== NOT EXECUTED 10f0db: 8b 7d 0c mov 0xc(%ebp),%edi <== NOT EXECUTED 10f0de: 8b 4d d4 mov -0x2c(%ebp),%ecx <== NOT EXECUTED 10f0e1: 8d 14 0f lea (%edi,%ecx,1),%edx <== NOT EXECUTED 10f0e4: 7e 1b jle 10f101 <== NOT EXECUTED memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk1); 10f0e6: 03 33 add (%ebx),%esi <== NOT EXECUTED 10f0e8: 89 d7 mov %edx,%edi <== NOT EXECUTED 10f0ea: 89 c1 mov %eax,%ecx <== NOT EXECUTED 10f0ec: f3 a4 rep movsb %ds:(%esi),%es:(%edi) <== NOT EXECUTED memcpy(buffer + read + chunk1, pipe->Buffer, chunk - chunk1); 10f0ee: 8b 55 d4 mov -0x2c(%ebp),%edx <== NOT EXECUTED 10f0f1: 01 c2 add %eax,%edx <== NOT EXECUTED 10f0f3: 03 55 0c add 0xc(%ebp),%edx <== NOT EXECUTED 10f0f6: 8b 4d d0 mov -0x30(%ebp),%ecx <== NOT EXECUTED 10f0f9: 29 c1 sub %eax,%ecx <== NOT EXECUTED 10f0fb: 8b 33 mov (%ebx),%esi <== NOT EXECUTED 10f0fd: 89 d7 mov %edx,%edi <== NOT EXECUTED 10f0ff: eb 07 jmp 10f108 <== NOT EXECUTED } else memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk); 10f101: 03 33 add (%ebx),%esi <== NOT EXECUTED 10f103: 89 d7 mov %edx,%edi <== NOT EXECUTED 10f105: 8b 4d d0 mov -0x30(%ebp),%ecx <== NOT EXECUTED 10f108: f3 a4 rep movsb %ds:(%esi),%es:(%edi) <== NOT EXECUTED pipe->Start += chunk; 10f10a: 8b 45 d0 mov -0x30(%ebp),%eax <== NOT EXECUTED 10f10d: 03 43 08 add 0x8(%ebx),%eax <== NOT EXECUTED pipe->Start %= pipe->Size; 10f110: 31 d2 xor %edx,%edx <== NOT EXECUTED 10f112: f7 73 04 divl 0x4(%ebx) <== NOT EXECUTED 10f115: 89 53 08 mov %edx,0x8(%ebx) <== NOT EXECUTED pipe->Length -= chunk; 10f118: 8b 43 0c mov 0xc(%ebx),%eax <== NOT EXECUTED 10f11b: 2b 45 d0 sub -0x30(%ebp),%eax <== NOT EXECUTED 10f11e: 89 43 0c mov %eax,0xc(%ebx) <== NOT EXECUTED /* For buffering optimization */ if (PIPE_EMPTY(pipe)) 10f121: 85 c0 test %eax,%eax <== NOT EXECUTED 10f123: 75 07 jne 10f12c <== NOT EXECUTED pipe->Start = 0; 10f125: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx) <== NOT EXECUTED if (pipe->waitingWriters > 0) 10f12c: 83 7b 1c 00 cmpl $0x0,0x1c(%ebx) <== NOT EXECUTED 10f130: 74 11 je 10f143 <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); 10f132: 50 push %eax <== NOT EXECUTED 10f133: 50 push %eax <== NOT EXECUTED 10f134: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED 10f137: 50 push %eax <== NOT EXECUTED 10f138: ff 73 30 pushl 0x30(%ebx) <== NOT EXECUTED 10f13b: e8 0c 08 00 00 call 10f94c <== NOT EXECUTED 10f140: 83 c4 10 add $0x10,%esp <== NOT EXECUTED read += chunk; 10f143: 8b 4d d0 mov -0x30(%ebp),%ecx <== NOT EXECUTED 10f146: 01 4d d4 add %ecx,-0x2c(%ebp) <== NOT EXECUTED int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) return -EINTR; while (read < count) { 10f149: 8b 7d 10 mov 0x10(%ebp),%edi <== NOT EXECUTED 10f14c: 39 7d d4 cmp %edi,-0x2c(%ebp) <== NOT EXECUTED 10f14f: 0f 82 64 ff ff ff jb 10f0b9 <== NOT EXECUTED 10f155: 31 f6 xor %esi,%esi <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); read += chunk; } out_locked: PIPE_UNLOCK(pipe); 10f157: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10f15a: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED 10f15d: e8 b6 ae ff ff call 10a018 <== NOT EXECUTED 10f162: 83 c4 10 add $0x10,%esp <== NOT EXECUTED out_nolock: if (read > 0) 10f165: 83 7d d4 00 cmpl $0x0,-0x2c(%ebp) <== NOT EXECUTED 10f169: 7f 03 jg 10f16e <== NOT EXECUTED 10f16b: 89 75 d4 mov %esi,-0x2c(%ebp) <== NOT EXECUTED return read; return ret; } 10f16e: 8b 45 d4 mov -0x2c(%ebp),%eax <== NOT EXECUTED 10f171: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 10f174: 5b pop %ebx <== NOT EXECUTED 10f175: 5e pop %esi <== NOT EXECUTED 10f176: 5f pop %edi <== NOT EXECUTED 10f177: c9 leave <== NOT EXECUTED 10f178: c3 ret <== NOT EXECUTED 0010f1b4 : */ int pipe_release( pipe_control_t **pipep, rtems_libio_t *iop ) { 10f1b4: 55 push %ebp <== NOT EXECUTED 10f1b5: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10f1b7: 57 push %edi <== NOT EXECUTED 10f1b8: 56 push %esi <== NOT EXECUTED 10f1b9: 53 push %ebx <== NOT EXECUTED 10f1ba: 83 ec 20 sub $0x20,%esp <== NOT EXECUTED 10f1bd: 8b 7d 08 mov 0x8(%ebp),%edi <== NOT EXECUTED pipe_control_t *pipe = *pipep; 10f1c0: 8b 1f mov (%edi),%ebx <== NOT EXECUTED uint32_t mode; rtems_status_code sc; sc = rtems_semaphore_obtain(pipe->Semaphore, 10f1c2: 6a 00 push $0x0 <== NOT EXECUTED 10f1c4: 6a 00 push $0x0 <== NOT EXECUTED 10f1c6: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED 10f1c9: e8 5e ad ff ff call 109f2c <== NOT EXECUTED RTEMS_WAIT, RTEMS_NO_TIMEOUT); /* WARN pipe not released! */ if(sc != RTEMS_SUCCESSFUL) 10f1ce: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10f1d1: 85 c0 test %eax,%eax <== NOT EXECUTED 10f1d3: 75 34 jne 10f209 <== NOT EXECUTED rtems_fatal_error_occurred(sc); mode = LIBIO_ACCMODE(iop); 10f1d5: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED 10f1d8: 8b 40 14 mov 0x14(%eax),%eax <== NOT EXECUTED 10f1db: 89 c6 mov %eax,%esi <== NOT EXECUTED 10f1dd: 83 e6 06 and $0x6,%esi <== NOT EXECUTED if (mode & LIBIO_FLAGS_READ) 10f1e0: a8 02 test $0x2,%al <== NOT EXECUTED 10f1e2: 74 03 je 10f1e7 <== NOT EXECUTED pipe->Readers --; 10f1e4: ff 4b 10 decl 0x10(%ebx) <== NOT EXECUTED if (mode & LIBIO_FLAGS_WRITE) 10f1e7: f7 c6 04 00 00 00 test $0x4,%esi <== NOT EXECUTED 10f1ed: 74 03 je 10f1f2 <== NOT EXECUTED pipe->Writers --; 10f1ef: ff 4b 14 decl 0x14(%ebx) <== NOT EXECUTED sc = rtems_semaphore_obtain(rtems_pipe_semaphore, 10f1f2: 50 push %eax <== NOT EXECUTED 10f1f3: 6a 00 push $0x0 <== NOT EXECUTED 10f1f5: 6a 00 push $0x0 <== NOT EXECUTED 10f1f7: ff 35 18 35 12 00 pushl 0x123518 <== NOT EXECUTED 10f1fd: e8 2a ad ff ff call 109f2c <== NOT EXECUTED RTEMS_WAIT, RTEMS_NO_TIMEOUT); /* WARN pipe not freed and pipep not set to NULL! */ if(sc != RTEMS_SUCCESSFUL) 10f202: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10f205: 85 c0 test %eax,%eax <== NOT EXECUTED 10f207: 74 09 je 10f212 <== NOT EXECUTED rtems_fatal_error_occurred(sc); 10f209: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10f20c: 50 push %eax <== NOT EXECUTED 10f20d: e8 d2 b2 ff ff call 10a4e4 <== NOT EXECUTED PIPE_UNLOCK(pipe); 10f212: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10f215: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED 10f218: e8 fb ad ff ff call 10a018 <== NOT EXECUTED if (pipe->Readers == 0 && pipe->Writers == 0) { 10f21d: 8b 43 10 mov 0x10(%ebx),%eax <== NOT EXECUTED 10f220: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10f223: 85 c0 test %eax,%eax <== NOT EXECUTED 10f225: 75 15 jne 10f23c <== NOT EXECUTED 10f227: 83 7b 14 00 cmpl $0x0,0x14(%ebx) <== NOT EXECUTED 10f22b: 75 0f jne 10f23c <== NOT EXECUTED #if 0 /* To delete an anonymous pipe file when all users closed it */ if (pipe->Anonymous) delfile = TRUE; #endif pipe_free(pipe); 10f22d: 89 d8 mov %ebx,%eax <== NOT EXECUTED 10f22f: e8 45 ff ff ff call 10f179 <== NOT EXECUTED *pipep = NULL; 10f234: c7 07 00 00 00 00 movl $0x0,(%edi) <== NOT EXECUTED if(sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred(sc); PIPE_UNLOCK(pipe); if (pipe->Readers == 0 && pipe->Writers == 0) { 10f23a: eb 30 jmp 10f26c <== NOT EXECUTED delfile = TRUE; #endif pipe_free(pipe); *pipep = NULL; } else if (pipe->Readers == 0 && mode != LIBIO_FLAGS_WRITE) 10f23c: 83 fe 04 cmp $0x4,%esi <== NOT EXECUTED 10f23f: 74 0f je 10f250 <== NOT EXECUTED 10f241: 85 c0 test %eax,%eax <== NOT EXECUTED 10f243: 75 0b jne 10f250 <== NOT EXECUTED /* Notify waiting Writers that all their partners left */ PIPE_WAKEUPWRITERS(pipe); 10f245: 57 push %edi <== NOT EXECUTED 10f246: 57 push %edi <== NOT EXECUTED 10f247: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED 10f24a: 50 push %eax <== NOT EXECUTED 10f24b: ff 73 30 pushl 0x30(%ebx) <== NOT EXECUTED 10f24e: eb 14 jmp 10f264 <== NOT EXECUTED else if (pipe->Writers == 0 && mode != LIBIO_FLAGS_READ) 10f250: 83 fe 02 cmp $0x2,%esi <== NOT EXECUTED 10f253: 74 17 je 10f26c <== NOT EXECUTED 10f255: 83 7b 14 00 cmpl $0x0,0x14(%ebx) <== NOT EXECUTED 10f259: 75 11 jne 10f26c <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); 10f25b: 56 push %esi <== NOT EXECUTED 10f25c: 56 push %esi <== NOT EXECUTED 10f25d: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED 10f260: 50 push %eax <== NOT EXECUTED 10f261: ff 73 2c pushl 0x2c(%ebx) <== NOT EXECUTED 10f264: e8 e3 06 00 00 call 10f94c <== NOT EXECUTED 10f269: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_semaphore_release(rtems_pipe_semaphore); 10f26c: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10f26f: ff 35 18 35 12 00 pushl 0x123518 <== NOT EXECUTED 10f275: e8 9e ad ff ff call 10a018 <== NOT EXECUTED if(iop->pathinfo.ops->unlink_h(&iop->pathinfo)) return -errno; #endif return 0; } 10f27a: 31 c0 xor %eax,%eax <== NOT EXECUTED 10f27c: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 10f27f: 5b pop %ebx <== NOT EXECUTED 10f280: 5e pop %esi <== NOT EXECUTED 10f281: 5f pop %edi <== NOT EXECUTED 10f282: c9 leave <== NOT EXECUTED 10f283: c3 ret <== NOT EXECUTED 0010ee85 : pipe_control_t *pipe, const void *buffer, size_t count, rtems_libio_t *iop ) { 10ee85: 55 push %ebp <== NOT EXECUTED 10ee86: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10ee88: 57 push %edi <== NOT EXECUTED 10ee89: 56 push %esi <== NOT EXECUTED 10ee8a: 53 push %ebx <== NOT EXECUTED 10ee8b: 83 ec 2c sub $0x2c,%esp <== NOT EXECUTED 10ee8e: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED int chunk, chunk1, written = 0, ret = 0; /* Write nothing */ if (count == 0) 10ee91: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp) <== NOT EXECUTED 10ee98: 83 7d 10 00 cmpl $0x0,0x10(%ebp) <== NOT EXECUTED 10ee9c: 0f 84 6a 01 00 00 je 10f00c <== NOT EXECUTED return 0; if (! PIPE_LOCK(pipe)) 10eea2: 57 push %edi <== NOT EXECUTED 10eea3: 6a 00 push $0x0 <== NOT EXECUTED 10eea5: 6a 00 push $0x0 <== NOT EXECUTED 10eea7: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED 10eeaa: e8 7d b0 ff ff call 109f2c <== NOT EXECUTED 10eeaf: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10eeb2: c7 45 d4 fc ff ff ff movl $0xfffffffc,-0x2c(%ebp) <== NOT EXECUTED 10eeb9: 85 c0 test %eax,%eax <== NOT EXECUTED 10eebb: 0f 85 4b 01 00 00 jne 10f00c <== NOT EXECUTED return -EINTR; if (pipe->Readers == 0) { 10eec1: 83 7b 10 00 cmpl $0x0,0x10(%ebx) <== NOT EXECUTED 10eec5: 75 11 jne 10eed8 <== NOT EXECUTED 10eec7: be e0 ff ff ff mov $0xffffffe0,%esi <== NOT EXECUTED 10eecc: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp) <== NOT EXECUTED 10eed3: e9 1d 01 00 00 jmp 10eff5 <== NOT EXECUTED ret = -EPIPE; goto out_locked; } /* Write of PIPE_BUF bytes or less shall not be interleaved */ chunk = count <= pipe->Size ? count : 1; 10eed8: 8b 7d 10 mov 0x10(%ebp),%edi <== NOT EXECUTED 10eedb: 3b 7b 04 cmp 0x4(%ebx),%edi <== NOT EXECUTED 10eede: 76 05 jbe 10eee5 <== NOT EXECUTED 10eee0: bf 01 00 00 00 mov $0x1,%edi <== NOT EXECUTED 10eee5: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp) <== NOT EXECUTED 10eeec: e9 f6 00 00 00 jmp 10efe7 <== NOT EXECUTED while (written < count) { while (PIPE_SPACE(pipe) < chunk) { if (LIBIO_NODELAY(iop)) { 10eef1: 8b 45 14 mov 0x14(%ebp),%eax <== NOT EXECUTED 10eef4: f6 40 14 01 testb $0x1,0x14(%eax) <== NOT EXECUTED 10eef8: 74 0a je 10ef04 <== NOT EXECUTED 10eefa: be f5 ff ff ff mov $0xfffffff5,%esi <== NOT EXECUTED 10eeff: e9 f1 00 00 00 jmp 10eff5 <== NOT EXECUTED ret = -EAGAIN; goto out_locked; } /* Wait until there is chunk bytes space or no reader exists */ pipe->waitingWriters ++; 10ef04: ff 43 1c incl 0x1c(%ebx) <== NOT EXECUTED PIPE_UNLOCK(pipe); 10ef07: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10ef0a: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED 10ef0d: e8 06 b1 ff ff call 10a018 <== NOT EXECUTED if (! PIPE_WRITEWAIT(pipe)) 10ef12: 59 pop %ecx <== NOT EXECUTED 10ef13: 5e pop %esi <== NOT EXECUTED 10ef14: 6a 00 push $0x0 <== NOT EXECUTED 10ef16: ff 73 30 pushl 0x30(%ebx) <== NOT EXECUTED 10ef19: e8 86 0a 00 00 call 10f9a4 <== NOT EXECUTED 10ef1e: 83 c4 0c add $0xc,%esp <== NOT EXECUTED 10ef21: 83 f8 01 cmp $0x1,%eax <== NOT EXECUTED 10ef24: 19 f6 sbb %esi,%esi <== NOT EXECUTED 10ef26: f7 d6 not %esi <== NOT EXECUTED 10ef28: 83 e6 fc and $0xfffffffc,%esi <== NOT EXECUTED ret = -EINTR; if (! PIPE_LOCK(pipe)) { 10ef2b: 6a 00 push $0x0 <== NOT EXECUTED 10ef2d: 6a 00 push $0x0 <== NOT EXECUTED 10ef2f: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED 10ef32: e8 f5 af ff ff call 109f2c <== NOT EXECUTED 10ef37: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10ef3a: 85 c0 test %eax,%eax <== NOT EXECUTED 10ef3c: 74 0a je 10ef48 <== NOT EXECUTED 10ef3e: be fc ff ff ff mov $0xfffffffc,%esi <== NOT EXECUTED 10ef43: e9 bb 00 00 00 jmp 10f003 <== NOT EXECUTED /* WARN waitingWriters not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingWriters --; 10ef48: ff 4b 1c decl 0x1c(%ebx) <== NOT EXECUTED if (ret != 0) 10ef4b: 85 f6 test %esi,%esi <== NOT EXECUTED 10ef4d: 0f 85 a2 00 00 00 jne 10eff5 <== NOT EXECUTED goto out_locked; if (pipe->Readers == 0) { 10ef53: 83 7b 10 00 cmpl $0x0,0x10(%ebx) <== NOT EXECUTED 10ef57: 75 0a jne 10ef63 <== NOT EXECUTED 10ef59: be e0 ff ff ff mov $0xffffffe0,%esi <== NOT EXECUTED 10ef5e: e9 92 00 00 00 jmp 10eff5 <== NOT EXECUTED /* 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) { 10ef63: 8b 73 04 mov 0x4(%ebx),%esi <== NOT EXECUTED 10ef66: 8b 43 0c mov 0xc(%ebx),%eax <== NOT EXECUTED 10ef69: 89 f1 mov %esi,%ecx <== NOT EXECUTED 10ef6b: 29 c1 sub %eax,%ecx <== NOT EXECUTED 10ef6d: 39 f9 cmp %edi,%ecx <== NOT EXECUTED 10ef6f: 72 80 jb 10eef1 <== NOT EXECUTED ret = -EPIPE; goto out_locked; } } chunk = MIN(count - written, PIPE_SPACE(pipe)); 10ef71: 8b 55 10 mov 0x10(%ebp),%edx <== NOT EXECUTED 10ef74: 2b 55 d4 sub -0x2c(%ebp),%edx <== NOT EXECUTED 10ef77: 89 4d d0 mov %ecx,-0x30(%ebp) <== NOT EXECUTED 10ef7a: 39 d1 cmp %edx,%ecx <== NOT EXECUTED 10ef7c: 76 03 jbe 10ef81 <== NOT EXECUTED 10ef7e: 89 55 d0 mov %edx,-0x30(%ebp) <== NOT EXECUTED chunk1 = pipe->Size - PIPE_WSTART(pipe); 10ef81: 03 43 08 add 0x8(%ebx),%eax <== NOT EXECUTED 10ef84: 31 d2 xor %edx,%edx <== NOT EXECUTED 10ef86: f7 f6 div %esi <== NOT EXECUTED 10ef88: 89 f0 mov %esi,%eax <== NOT EXECUTED 10ef8a: 29 d0 sub %edx,%eax <== NOT EXECUTED if (chunk > chunk1) { 10ef8c: 39 45 d0 cmp %eax,-0x30(%ebp) <== NOT EXECUTED 10ef8f: 8b 7d 0c mov 0xc(%ebp),%edi <== NOT EXECUTED 10ef92: 8b 4d d4 mov -0x2c(%ebp),%ecx <== NOT EXECUTED 10ef95: 8d 34 0f lea (%edi,%ecx,1),%esi <== NOT EXECUTED 10ef98: 7e 1c jle 10efb6 <== NOT EXECUTED memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk1); 10ef9a: 03 13 add (%ebx),%edx <== NOT EXECUTED 10ef9c: 89 d7 mov %edx,%edi <== NOT EXECUTED 10ef9e: 89 c1 mov %eax,%ecx <== NOT EXECUTED 10efa0: f3 a4 rep movsb %ds:(%esi),%es:(%edi) <== NOT EXECUTED memcpy(pipe->Buffer, buffer + written + chunk1, chunk - chunk1); 10efa2: 8b 13 mov (%ebx),%edx <== NOT EXECUTED 10efa4: 8b 4d d0 mov -0x30(%ebp),%ecx <== NOT EXECUTED 10efa7: 29 c1 sub %eax,%ecx <== NOT EXECUTED 10efa9: 8b 7d d4 mov -0x2c(%ebp),%edi <== NOT EXECUTED 10efac: 8d 34 38 lea (%eax,%edi,1),%esi <== NOT EXECUTED 10efaf: 03 75 0c add 0xc(%ebp),%esi <== NOT EXECUTED 10efb2: 89 d7 mov %edx,%edi <== NOT EXECUTED 10efb4: eb 07 jmp 10efbd <== NOT EXECUTED } else memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk); 10efb6: 03 13 add (%ebx),%edx <== NOT EXECUTED 10efb8: 89 d7 mov %edx,%edi <== NOT EXECUTED 10efba: 8b 4d d0 mov -0x30(%ebp),%ecx <== NOT EXECUTED 10efbd: f3 a4 rep movsb %ds:(%esi),%es:(%edi) <== NOT EXECUTED pipe->Length += chunk; 10efbf: 8b 45 d0 mov -0x30(%ebp),%eax <== NOT EXECUTED 10efc2: 01 43 0c add %eax,0xc(%ebx) <== NOT EXECUTED if (pipe->waitingReaders > 0) 10efc5: 83 7b 18 00 cmpl $0x0,0x18(%ebx) <== NOT EXECUTED 10efc9: 74 11 je 10efdc <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); 10efcb: 52 push %edx <== NOT EXECUTED 10efcc: 52 push %edx <== NOT EXECUTED 10efcd: 8d 4d e4 lea -0x1c(%ebp),%ecx <== NOT EXECUTED 10efd0: 51 push %ecx <== NOT EXECUTED 10efd1: ff 73 2c pushl 0x2c(%ebx) <== NOT EXECUTED 10efd4: e8 73 09 00 00 call 10f94c <== NOT EXECUTED 10efd9: 83 c4 10 add $0x10,%esp <== NOT EXECUTED written += chunk; 10efdc: 8b 7d d0 mov -0x30(%ebp),%edi <== NOT EXECUTED 10efdf: 01 7d d4 add %edi,-0x2c(%ebp) <== NOT EXECUTED 10efe2: bf 01 00 00 00 mov $0x1,%edi <== NOT EXECUTED } /* Write of PIPE_BUF bytes or less shall not be interleaved */ chunk = count <= pipe->Size ? count : 1; while (written < count) { 10efe7: 8b 45 10 mov 0x10(%ebp),%eax <== NOT EXECUTED 10efea: 39 45 d4 cmp %eax,-0x2c(%ebp) <== NOT EXECUTED 10efed: 0f 82 70 ff ff ff jb 10ef63 <== NOT EXECUTED 10eff3: 31 f6 xor %esi,%esi <== NOT EXECUTED /* Write of more than PIPE_BUF bytes can be interleaved */ chunk = 1; } out_locked: PIPE_UNLOCK(pipe); 10eff5: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10eff8: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED 10effb: e8 18 b0 ff ff call 10a018 <== NOT EXECUTED 10f000: 83 c4 10 add $0x10,%esp <== NOT EXECUTED /* Signal SIGPIPE */ if (ret == -EPIPE) kill(getpid(), SIGPIPE); #endif if (written > 0) 10f003: 83 7d d4 00 cmpl $0x0,-0x2c(%ebp) <== NOT EXECUTED 10f007: 7f 03 jg 10f00c <== NOT EXECUTED 10f009: 89 75 d4 mov %esi,-0x2c(%ebp) <== NOT EXECUTED return written; return ret; } 10f00c: 8b 45 d4 mov -0x2c(%ebp),%eax <== NOT EXECUTED 10f00f: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 10f012: 5b pop %ebx <== NOT EXECUTED 10f013: 5e pop %esi <== NOT EXECUTED 10f014: 5f pop %edi <== NOT EXECUTED 10f015: c9 leave <== NOT EXECUTED 10f016: c3 ret <== NOT EXECUTED 0010a330 : int posix_memalign( void **pointer, size_t alignment, size_t size ) { 10a330: 55 push %ebp 10a331: 89 e5 mov %esp,%ebp 10a333: 53 push %ebx 10a334: 83 ec 04 sub $0x4,%esp 10a337: 8b 55 08 mov 0x8(%ebp),%edx 10a33a: 8b 45 0c mov 0xc(%ebp),%eax 10a33d: 8b 4d 10 mov 0x10(%ebp),%ecx /* * Update call statistics */ MSBUMP(memalign_calls, 1); 10a340: ff 05 2c 99 12 00 incl 0x12992c if (((alignment - 1) & alignment) != 0 || (alignment < sizeof(void *))) 10a346: 8d 58 ff lea -0x1(%eax),%ebx 10a349: 85 c3 test %eax,%ebx 10a34b: 75 05 jne 10a352 <== ALWAYS TAKEN 10a34d: 83 f8 03 cmp $0x3,%eax 10a350: 77 09 ja 10a35b /* * rtems_memalign does all of the error checking work EXCEPT * for adding restrictionso on the alignment. */ return rtems_memalign( pointer, alignment, size ); } 10a352: b8 16 00 00 00 mov $0x16,%eax 10a357: 5a pop %edx 10a358: 5b pop %ebx 10a359: c9 leave 10a35a: c3 ret /* * rtems_memalign does all of the error checking work EXCEPT * for adding restrictionso on the alignment. */ return rtems_memalign( pointer, alignment, size ); 10a35b: 89 4d 10 mov %ecx,0x10(%ebp) 10a35e: 89 45 0c mov %eax,0xc(%ebp) 10a361: 89 55 08 mov %edx,0x8(%ebp) } 10a364: 58 pop %eax 10a365: 5b pop %ebx 10a366: c9 leave /* * rtems_memalign does all of the error checking work EXCEPT * for adding restrictionso on the alignment. */ return rtems_memalign( pointer, alignment, size ); 10a367: e9 10 01 00 00 jmp 10a47c <== ALWAYS TAKEN 00107e3c : * putk * * Kernel putk (e.g. puts) function requiring minimal infrastrure. */ void putk(const char *s) { 107e3c: 55 push %ebp 107e3d: 89 e5 mov %esp,%ebp 107e3f: 53 push %ebx 107e40: 83 ec 04 sub $0x4,%esp 107e43: 8b 5d 08 mov 0x8(%ebp),%ebx const char *p = s; for (p=s ; *p ; p++ ) 107e46: eb 0d jmp 107e55 <== ALWAYS TAKEN BSP_output_char(*p); 107e48: 83 ec 0c sub $0xc,%esp 107e4b: 0f be d2 movsbl %dl,%edx 107e4e: 52 push %edx 107e4f: ff d0 call *%eax */ void putk(const char *s) { const char *p = s; for (p=s ; *p ; p++ ) 107e51: 43 inc %ebx 107e52: 83 c4 10 add $0x10,%esp 107e55: 8a 13 mov (%ebx),%dl 107e57: 84 d2 test %dl,%dl 107e59: a1 10 fb 11 00 mov 0x11fb10,%eax 107e5e: 75 e8 jne 107e48 BSP_output_char(*p); BSP_output_char('\n'); 107e60: c7 45 08 0a 00 00 00 movl $0xa,0x8(%ebp) } 107e67: 8b 5d fc mov -0x4(%ebp),%ebx 107e6a: c9 leave { const char *p = s; for (p=s ; *p ; p++ ) BSP_output_char(*p); BSP_output_char('\n'); 107e6b: ff e0 jmp *%eax 0011b710 : ssize_t read( int fd, void *buffer, size_t count ) { 11b710: 55 push %ebp 11b711: 89 e5 mov %esp,%ebp 11b713: 56 push %esi 11b714: 53 push %ebx 11b715: 8b 5d 08 mov 0x8(%ebp),%ebx 11b718: 8b 55 0c mov 0xc(%ebp),%edx 11b71b: 8b 4d 10 mov 0x10(%ebp),%ecx ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 11b71e: 3b 1d 64 f8 11 00 cmp 0x11f864,%ebx 11b724: 73 14 jae 11b73a <== ALWAYS TAKEN iop = rtems_libio_iop( fd ); 11b726: c1 e3 06 shl $0x6,%ebx 11b729: 03 1d 18 37 12 00 add 0x123718,%ebx rtems_libio_check_is_open( iop ); 11b72f: 8b 73 14 mov 0x14(%ebx),%esi 11b732: f7 c6 00 01 00 00 test $0x100,%esi 11b738: 75 0d jne 11b747 11b73a: e8 11 4b ff ff call 110250 <__errno> 11b73f: c7 00 09 00 00 00 movl $0x9,(%eax) 11b745: eb 31 jmp 11b778 <== ALWAYS TAKEN rtems_libio_check_buffer( buffer ); 11b747: 85 d2 test %edx,%edx 11b749: 74 0b je 11b756 <== ALWAYS TAKEN rtems_libio_check_count( count ); 11b74b: 31 c0 xor %eax,%eax 11b74d: 85 c9 test %ecx,%ecx 11b74f: 74 44 je 11b795 <== ALWAYS TAKEN rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); 11b751: 83 e6 02 and $0x2,%esi 11b754: 75 0d jne 11b763 <== NEVER TAKEN 11b756: e8 f5 4a ff ff call 110250 <__errno> <== NOT EXECUTED 11b75b: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 11b761: eb 15 jmp 11b778 <== NOT EXECUTED /* * Now process the read(). */ if ( !iop->handlers->read_h ) 11b763: 8b 43 3c mov 0x3c(%ebx),%eax 11b766: 8b 40 08 mov 0x8(%eax),%eax 11b769: 85 c0 test %eax,%eax 11b76b: 75 10 jne 11b77d <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); 11b76d: e8 de 4a ff ff call 110250 <__errno> <== NOT EXECUTED 11b772: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 11b778: 83 c8 ff or $0xffffffff,%eax 11b77b: eb 18 jmp 11b795 <== ALWAYS TAKEN rc = (*iop->handlers->read_h)( iop, buffer, count ); 11b77d: 56 push %esi 11b77e: 51 push %ecx 11b77f: 52 push %edx 11b780: 53 push %ebx 11b781: ff d0 call *%eax if ( rc > 0 ) 11b783: 83 c4 10 add $0x10,%esp 11b786: 85 c0 test %eax,%eax 11b788: 7e 0b jle 11b795 iop->offset += rc; 11b78a: 89 c1 mov %eax,%ecx 11b78c: c1 f9 1f sar $0x1f,%ecx 11b78f: 01 43 0c add %eax,0xc(%ebx) 11b792: 11 4b 10 adc %ecx,0x10(%ebx) return rc; } 11b795: 8d 65 f8 lea -0x8(%ebp),%esp 11b798: 5b pop %ebx 11b799: 5e pop %esi 11b79a: c9 leave 11b79b: c3 ret 001265ec : ssize_t readlink( const char *pathname, char *buf, size_t bufsize ) { 1265ec: 55 push %ebp 1265ed: 89 e5 mov %esp,%ebp 1265ef: 57 push %edi 1265f0: 56 push %esi 1265f1: 53 push %ebx 1265f2: 83 ec 2c sub $0x2c,%esp 1265f5: 8b 55 08 mov 0x8(%ebp),%edx 1265f8: 8b 5d 0c mov 0xc(%ebp),%ebx rtems_filesystem_location_info_t loc; int result; if (!buf) 1265fb: 85 db test %ebx,%ebx 1265fd: 75 0d jne 12660c <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EFAULT ); 1265ff: e8 cc 1d 01 00 call 1383d0 <__errno> <== NOT EXECUTED 126604: c7 00 0e 00 00 00 movl $0xe,(%eax) <== NOT EXECUTED 12660a: eb 51 jmp 12665d <== NOT EXECUTED result = rtems_filesystem_evaluate_path( pathname, strlen( pathname ), 12660c: 31 c0 xor %eax,%eax 12660e: 83 c9 ff or $0xffffffff,%ecx 126611: 89 d7 mov %edx,%edi 126613: f2 ae repnz scas %es:(%edi),%al 126615: f7 d1 not %ecx 126617: 49 dec %ecx 126618: 83 ec 0c sub $0xc,%esp 12661b: 6a 00 push $0x0 12661d: 8d 75 d4 lea -0x2c(%ebp),%esi 126620: 56 push %esi 126621: 6a 00 push $0x0 126623: 51 push %ecx 126624: 52 push %edx 126625: e8 f2 50 fe ff call 10b71c 0, &loc, false ); if ( result != 0 ) 12662a: 83 c4 20 add $0x20,%esp 12662d: 83 cf ff or $0xffffffff,%edi 126630: 85 c0 test %eax,%eax 126632: 0f 85 8c 00 00 00 jne 1266c4 <== ALWAYS TAKEN return -1; if ( !loc.ops->node_type_h ){ 126638: 8b 55 e0 mov -0x20(%ebp),%edx 12663b: 8b 42 10 mov 0x10(%edx),%eax 12663e: 85 c0 test %eax,%eax 126640: 75 20 jne 126662 <== NEVER TAKEN rtems_filesystem_freenode( &loc ); 126642: 8b 42 1c mov 0x1c(%edx),%eax <== NOT EXECUTED 126645: 85 c0 test %eax,%eax <== NOT EXECUTED 126647: 74 09 je 126652 <== NOT EXECUTED 126649: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12664c: 56 push %esi <== NOT EXECUTED 12664d: ff d0 call *%eax <== NOT EXECUTED 12664f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 126652: e8 79 1d 01 00 call 1383d0 <__errno> <== NOT EXECUTED 126657: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 12665d: 83 cf ff or $0xffffffff,%edi 126660: eb 62 jmp 1266c4 } if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_SYM_LINK ){ 126662: 83 ec 0c sub $0xc,%esp 126665: 56 push %esi 126666: ff d0 call *%eax 126668: 83 c4 10 add $0x10,%esp 12666b: 83 f8 04 cmp $0x4,%eax 12666e: 8b 45 e0 mov -0x20(%ebp),%eax 126671: 74 21 je 126694 rtems_filesystem_freenode( &loc ); 126673: 85 c0 test %eax,%eax 126675: 74 10 je 126687 <== ALWAYS TAKEN 126677: 8b 40 1c mov 0x1c(%eax),%eax 12667a: 85 c0 test %eax,%eax 12667c: 74 09 je 126687 <== ALWAYS TAKEN 12667e: 83 ec 0c sub $0xc,%esp 126681: 56 push %esi 126682: ff d0 call *%eax 126684: 83 c4 10 add $0x10,%esp rtems_set_errno_and_return_minus_one( EINVAL ); 126687: e8 44 1d 01 00 call 1383d0 <__errno> 12668c: c7 00 16 00 00 00 movl $0x16,(%eax) 126692: eb c9 jmp 12665d <== ALWAYS TAKEN } if ( !loc.ops->readlink_h ){ 126694: 8b 50 3c mov 0x3c(%eax),%edx 126697: 85 d2 test %edx,%edx 126699: 75 05 jne 1266a0 rtems_filesystem_freenode( &loc ); 12669b: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 12669e: eb a5 jmp 126645 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.ops->readlink_h)( &loc, buf, bufsize ); 1266a0: 50 push %eax 1266a1: ff 75 10 pushl 0x10(%ebp) 1266a4: 53 push %ebx 1266a5: 56 push %esi 1266a6: ff d2 call *%edx 1266a8: 89 c7 mov %eax,%edi rtems_filesystem_freenode( &loc ); 1266aa: 8b 45 e0 mov -0x20(%ebp),%eax 1266ad: 83 c4 10 add $0x10,%esp 1266b0: 85 c0 test %eax,%eax 1266b2: 74 10 je 1266c4 <== ALWAYS TAKEN 1266b4: 8b 40 1c mov 0x1c(%eax),%eax 1266b7: 85 c0 test %eax,%eax 1266b9: 74 09 je 1266c4 <== ALWAYS TAKEN 1266bb: 83 ec 0c sub $0xc,%esp 1266be: 56 push %esi 1266bf: ff d0 call *%eax 1266c1: 83 c4 10 add $0x10,%esp return result; } 1266c4: 89 f8 mov %edi,%eax 1266c6: 8d 65 f4 lea -0xc(%ebp),%esp 1266c9: 5b pop %ebx 1266ca: 5e pop %esi 1266cb: 5f pop %edi 1266cc: c9 leave 1266cd: c3 ret 00108c68 : ssize_t readv( int fd, const struct iovec *iov, int iovcnt ) { 108c68: 55 push %ebp 108c69: 89 e5 mov %esp,%ebp 108c6b: 57 push %edi 108c6c: 56 push %esi 108c6d: 53 push %ebx 108c6e: 83 ec 1c sub $0x1c,%esp 108c71: 8b 75 08 mov 0x8(%ebp),%esi 108c74: 8b 7d 0c mov 0xc(%ebp),%edi int v; int bytes; rtems_libio_t *iop; bool all_zeros; rtems_libio_check_fd( fd ); 108c77: 3b 35 44 21 12 00 cmp 0x122144,%esi 108c7d: 73 11 jae 108c90 <== ALWAYS TAKEN iop = rtems_libio_iop( fd ); 108c7f: c1 e6 06 shl $0x6,%esi 108c82: 03 35 c8 67 12 00 add 0x1267c8,%esi rtems_libio_check_is_open( iop ); 108c88: 8b 46 14 mov 0x14(%esi),%eax 108c8b: f6 c4 01 test $0x1,%ah 108c8e: 75 10 jne 108ca0 <== NEVER TAKEN 108c90: e8 67 93 00 00 call 111ffc <__errno> <== NOT EXECUTED 108c95: c7 00 09 00 00 00 movl $0x9,(%eax) <== NOT EXECUTED 108c9b: e9 80 00 00 00 jmp 108d20 <== NOT EXECUTED rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); 108ca0: a8 02 test $0x2,%al 108ca2: 74 42 je 108ce6 <== ALWAYS TAKEN /* * Argument validation on IO vector */ if ( !iov ) 108ca4: 85 ff test %edi,%edi 108ca6: 74 3e je 108ce6 rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt <= 0 ) 108ca8: 83 7d 10 00 cmpl $0x0,0x10(%ebp) 108cac: 7e 38 jle 108ce6 rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt > IOV_MAX ) 108cae: 81 7d 10 00 04 00 00 cmpl $0x400,0x10(%ebp) 108cb5: 7f 2f jg 108ce6 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); if ( !iop->handlers->read_h ) 108cb7: 8b 46 3c mov 0x3c(%esi),%eax 108cba: 83 78 08 00 cmpl $0x0,0x8(%eax) 108cbe: 75 0d jne 108ccd <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); 108cc0: e8 37 93 00 00 call 111ffc <__errno> <== NOT EXECUTED 108cc5: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 108ccb: eb 53 jmp 108d20 <== NOT EXECUTED 108ccd: 31 c0 xor %eax,%eax 108ccf: 31 d2 xor %edx,%edx all_zeros = true; for ( total=0, v=0 ; v < iovcnt ; v++ ) { ssize_t old; if ( !iov[v].iov_base ) 108cd1: 83 3c c7 00 cmpl $0x0,(%edi,%eax,8) 108cd5: 74 0f je 108ce6 rtems_set_errno_and_return_minus_one( EINVAL ); if ( iov[v].iov_len <= 0 ) 108cd7: 8b 4c c7 04 mov 0x4(%edi,%eax,8),%ecx 108cdb: 85 c9 test %ecx,%ecx 108cdd: 74 07 je 108ce6 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); /* check for wrap */ old = total; total += iov[v].iov_len; 108cdf: 8d 0c 0a lea (%edx,%ecx,1),%ecx if ( total < old ) 108ce2: 39 d1 cmp %edx,%ecx 108ce4: 7d 0d jge 108cf3 rtems_set_errno_and_return_minus_one( EINVAL ); 108ce6: e8 11 93 00 00 call 111ffc <__errno> 108ceb: c7 00 16 00 00 00 movl $0x16,(%eax) 108cf1: eb 2d jmp 108d20 <== ALWAYS TAKEN * 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++ ) { 108cf3: 40 inc %eax 108cf4: 3b 45 10 cmp 0x10(%ebp),%eax 108cf7: 7d 04 jge 108cfd 108cf9: 89 ca mov %ecx,%edx 108cfb: eb d4 jmp 108cd1 <== ALWAYS TAKEN 108cfd: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) 108d04: 31 db xor %ebx,%ebx /* * Now process the readv(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { bytes = (*iop->handlers->read_h)( iop, iov[v].iov_base, iov[v].iov_len ); 108d06: 50 push %eax 108d07: 8b 46 3c mov 0x3c(%esi),%eax 108d0a: 8b 55 e4 mov -0x1c(%ebp),%edx 108d0d: ff 74 d7 04 pushl 0x4(%edi,%edx,8) 108d11: ff 34 d7 pushl (%edi,%edx,8) 108d14: 56 push %esi 108d15: ff 50 08 call *0x8(%eax) if ( bytes < 0 ) 108d18: 83 c4 10 add $0x10,%esp 108d1b: 83 f8 00 cmp $0x0,%eax 108d1e: 7d 05 jge 108d25 <== NEVER TAKEN 108d20: 83 cb ff or $0xffffffff,%ebx 108d23: eb 23 jmp 108d48 <== ALWAYS TAKEN return -1; if ( bytes > 0 ) { 108d25: 74 0d je 108d34 <== NEVER TAKEN iop->offset += bytes; 108d27: 89 c1 mov %eax,%ecx <== NOT EXECUTED 108d29: c1 f9 1f sar $0x1f,%ecx <== NOT EXECUTED 108d2c: 01 46 0c add %eax,0xc(%esi) <== NOT EXECUTED 108d2f: 11 4e 10 adc %ecx,0x10(%esi) <== NOT EXECUTED total += bytes; 108d32: 01 c3 add %eax,%ebx <== NOT EXECUTED } if (bytes != iov[ v ].iov_len) 108d34: 8b 55 e4 mov -0x1c(%ebp),%edx 108d37: 3b 44 d7 04 cmp 0x4(%edi,%edx,8),%eax 108d3b: 75 0b jne 108d48 <== NEVER TAKEN } /* * Now process the readv(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { 108d3d: 42 inc %edx <== NOT EXECUTED 108d3e: 89 55 e4 mov %edx,-0x1c(%ebp) <== NOT EXECUTED 108d41: 8b 45 10 mov 0x10(%ebp),%eax <== NOT EXECUTED 108d44: 39 c2 cmp %eax,%edx <== NOT EXECUTED 108d46: 7c be jl 108d06 <== NOT EXECUTED if (bytes != iov[ v ].iov_len) break; } return total; } 108d48: 89 d8 mov %ebx,%eax 108d4a: 8d 65 f4 lea -0xc(%ebp),%esp 108d4d: 5b pop %ebx 108d4e: 5e pop %esi 108d4f: 5f pop %edi 108d50: c9 leave 108d51: c3 ret 0011b81c : { uintptr_t old_size; char *new_area; uintptr_t resize; MSBUMP(realloc_calls, 1); 11b81c: 55 push %ebp 11b81d: 89 e5 mov %esp,%ebp 11b81f: 57 push %edi 11b820: 56 push %esi 11b821: 53 push %ebx 11b822: 83 ec 2c sub $0x2c,%esp 11b825: 8b 5d 08 mov 0x8(%ebp),%ebx 11b828: 8b 75 0c mov 0xc(%ebp),%esi 11b82b: ff 05 40 37 12 00 incl 0x123740 /* * Do not attempt to allocate memory if in a critical section or ISR. */ if (_System_state_Is_up(_System_state_Get())) { 11b831: 83 3d 0c 3a 12 00 03 cmpl $0x3,0x123a0c 11b838: 75 1a jne 11b854 <== ALWAYS TAKEN if (_Thread_Dispatch_disable_level > 0) 11b83a: a1 74 38 12 00 mov 0x123874,%eax 11b83f: 85 c0 test %eax,%eax 11b841: 0f 85 a7 00 00 00 jne 11b8ee <== ALWAYS TAKEN return (void *) 0; if (_ISR_Nest_level > 0) 11b847: a1 0c 39 12 00 mov 0x12390c,%eax 11b84c: 85 c0 test %eax,%eax 11b84e: 0f 85 9a 00 00 00 jne 11b8ee <== ALWAYS TAKEN } /* * Continue with realloc(). */ if ( !ptr ) 11b854: 85 db test %ebx,%ebx 11b856: 75 0e jne 11b866 return malloc( size ); 11b858: 83 ec 0c sub $0xc,%esp 11b85b: 56 push %esi 11b85c: e8 fb ba fe ff call 10735c <== ALWAYS TAKEN 11b861: e9 81 00 00 00 jmp 11b8e7 <== ALWAYS TAKEN if ( !size ) { 11b866: 85 f6 test %esi,%esi 11b868: 75 0d jne 11b877 <== NEVER TAKEN free( ptr ); 11b86a: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 11b86d: 53 push %ebx <== NOT EXECUTED 11b86e: e8 bd b8 fe ff call 107130 <== NOT EXECUTED 11b873: 31 db xor %ebx,%ebx <== NOT EXECUTED 11b875: eb 72 jmp 11b8e9 <== NOT EXECUTED return (void *) 0; } if ( !_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, ptr, &old_size) ) { 11b877: 52 push %edx 11b878: 8d 45 e4 lea -0x1c(%ebp),%eax 11b87b: 50 push %eax 11b87c: 53 push %ebx 11b87d: ff 35 70 f8 11 00 pushl 0x11f870 11b883: e8 00 01 00 00 call 11b988 <_Protected_heap_Get_block_size> 11b888: 83 c4 10 add $0x10,%esp 11b88b: 84 c0 test %al,%al 11b88d: 75 0d jne 11b89c errno = EINVAL; 11b88f: e8 bc 49 ff ff call 110250 <__errno> 11b894: c7 00 16 00 00 00 movl $0x16,(%eax) 11b89a: eb 52 jmp 11b8ee <== ALWAYS TAKEN #if defined(RTEMS_MALLOC_BOUNDARY_HELPERS) if (rtems_malloc_boundary_helpers) resize += (*rtems_malloc_boundary_helpers->overhead)(); #endif if ( _Protected_heap_Resize_block( RTEMS_Malloc_Heap, ptr, resize ) ) { 11b89c: 50 push %eax 11b89d: 56 push %esi 11b89e: 53 push %ebx 11b89f: ff 35 70 f8 11 00 pushl 0x11f870 11b8a5: e8 16 01 00 00 call 11b9c0 <_Protected_heap_Resize_block> 11b8aa: 83 c4 10 add $0x10,%esp 11b8ad: 84 c0 test %al,%al 11b8af: 75 3f jne 11b8f0 * 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 ); 11b8b1: 83 ec 0c sub $0xc,%esp 11b8b4: 56 push %esi 11b8b5: e8 a2 ba fe ff call 10735c <== ALWAYS TAKEN MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */ 11b8ba: ff 0d 34 37 12 00 decl 0x123734 if ( !new_area ) { 11b8c0: 83 c4 10 add $0x10,%esp 11b8c3: 85 c0 test %eax,%eax 11b8c5: 74 27 je 11b8ee return (void *) 0; } memcpy( new_area, ptr, (size < old_size) ? size : old_size ); 11b8c7: 8b 55 e4 mov -0x1c(%ebp),%edx 11b8ca: 89 f1 mov %esi,%ecx 11b8cc: 39 d6 cmp %edx,%esi 11b8ce: 76 02 jbe 11b8d2 <== ALWAYS TAKEN 11b8d0: 89 d1 mov %edx,%ecx 11b8d2: 89 c7 mov %eax,%edi 11b8d4: 89 de mov %ebx,%esi 11b8d6: f3 a4 rep movsb %ds:(%esi),%es:(%edi) free( ptr ); 11b8d8: 83 ec 0c sub $0xc,%esp 11b8db: 53 push %ebx 11b8dc: 89 45 d4 mov %eax,-0x2c(%ebp) 11b8df: e8 4c b8 fe ff call 107130 11b8e4: 8b 45 d4 mov -0x2c(%ebp),%eax 11b8e7: 89 c3 mov %eax,%ebx return new_area; 11b8e9: 83 c4 10 add $0x10,%esp 11b8ec: eb 02 jmp 11b8f0 <== ALWAYS TAKEN 11b8ee: 31 db xor %ebx,%ebx } 11b8f0: 89 d8 mov %ebx,%eax 11b8f2: 8d 65 f4 lea -0xc(%ebp),%esp 11b8f5: 5b pop %ebx 11b8f6: 5e pop %esi 11b8f7: 5f pop %edi 11b8f8: c9 leave 11b8f9: c3 ret 0010c8e8 : #include int rmdir( const char *pathname ) { 10c8e8: 55 push %ebp 10c8e9: 89 e5 mov %esp,%ebp 10c8eb: 57 push %edi 10c8ec: 56 push %esi 10c8ed: 53 push %ebx 10c8ee: 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 ); 10c8f1: ff 75 08 pushl 0x8(%ebp) 10c8f4: e8 36 ed ff ff call 10b62f 10c8f9: 89 c2 mov %eax,%edx if ( parentpathlen == 0 ) 10c8fb: 83 c4 10 add $0x10,%esp 10c8fe: 85 c0 test %eax,%eax 10c900: 75 36 jne 10c938 rtems_filesystem_get_start_loc( pathname, &i, &parentloc ); 10c902: 8b 4d 08 mov 0x8(%ebp),%ecx 10c905: 8a 01 mov (%ecx),%al 10c907: 3c 5c cmp $0x5c,%al 10c909: 74 08 je 10c913 <== ALWAYS TAKEN 10c90b: 3c 2f cmp $0x2f,%al 10c90d: 74 04 je 10c913 <== NEVER TAKEN 10c90f: 84 c0 test %al,%al <== NOT EXECUTED 10c911: 75 0e jne 10c921 <== NOT EXECUTED 10c913: 8d 7d d4 lea -0x2c(%ebp),%edi 10c916: 8b 35 78 db 15 00 mov 0x15db78,%esi 10c91c: 83 c6 18 add $0x18,%esi 10c91f: eb 0c jmp 10c92d <== ALWAYS TAKEN 10c921: 8d 7d d4 lea -0x2c(%ebp),%edi <== NOT EXECUTED 10c924: 8b 35 78 db 15 00 mov 0x15db78,%esi <== NOT EXECUTED 10c92a: 83 c6 04 add $0x4,%esi <== NOT EXECUTED 10c92d: b9 05 00 00 00 mov $0x5,%ecx 10c932: f3 a5 rep movsl %ds:(%esi),%es:(%edi) 10c934: 31 db xor %ebx,%ebx 10c936: eb 27 jmp 10c95f <== ALWAYS TAKEN else { result = rtems_filesystem_evaluate_path(pathname, parentpathlen, 10c938: 83 ec 0c sub $0xc,%esp 10c93b: 6a 00 push $0x0 10c93d: 8d 45 d4 lea -0x2c(%ebp),%eax 10c940: 50 push %eax 10c941: 6a 02 push $0x2 10c943: 52 push %edx 10c944: ff 75 08 pushl 0x8(%ebp) 10c947: 89 55 b4 mov %edx,-0x4c(%ebp) 10c94a: e8 cd ed ff ff call 10b71c RTEMS_LIBIO_PERMS_WRITE, &parentloc, false ); if ( result != 0 ) 10c94f: 83 c4 20 add $0x20,%esp 10c952: 85 c0 test %eax,%eax 10c954: 8b 55 b4 mov -0x4c(%ebp),%edx 10c957: 0f 85 72 01 00 00 jne 10cacf <== ALWAYS TAKEN 10c95d: b3 01 mov $0x1,%bl /* * Start from the parent to find the node that should be under it. */ loc = parentloc; 10c95f: 8d 7d c0 lea -0x40(%ebp),%edi 10c962: 8d 75 d4 lea -0x2c(%ebp),%esi 10c965: b9 05 00 00 00 mov $0x5,%ecx 10c96a: f3 a5 rep movsl %ds:(%esi),%es:(%edi) name = pathname + parentpathlen; 10c96c: 8b 75 08 mov 0x8(%ebp),%esi 10c96f: 01 d6 add %edx,%esi name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 10c971: 83 c9 ff or $0xffffffff,%ecx 10c974: 89 f7 mov %esi,%edi 10c976: 31 c0 xor %eax,%eax 10c978: f2 ae repnz scas %es:(%edi),%al 10c97a: f7 d1 not %ecx 10c97c: 49 dec %ecx 10c97d: 57 push %edi 10c97e: 57 push %edi 10c97f: 51 push %ecx 10c980: 56 push %esi 10c981: e8 82 ec ff ff call 10b608 10c986: 01 c6 add %eax,%esi result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 10c988: 83 c9 ff or $0xffffffff,%ecx 10c98b: 89 f7 mov %esi,%edi 10c98d: 31 c0 xor %eax,%eax 10c98f: f2 ae repnz scas %es:(%edi),%al 10c991: f7 d1 not %ecx 10c993: 49 dec %ecx 10c994: c7 04 24 00 00 00 00 movl $0x0,(%esp) 10c99b: 8d 7d c0 lea -0x40(%ebp),%edi 10c99e: 57 push %edi 10c99f: 6a 00 push $0x0 10c9a1: 51 push %ecx 10c9a2: 56 push %esi 10c9a3: e8 ba ec ff ff call 10b662 0, &loc, false ); if ( result != 0 ) { 10c9a8: 83 c4 20 add $0x20,%esp 10c9ab: 85 c0 test %eax,%eax 10c9ad: 74 2f je 10c9de if ( free_parentloc ) 10c9af: 84 db test %bl,%bl 10c9b1: 0f 84 18 01 00 00 je 10cacf <== NEVER TAKEN rtems_filesystem_freenode( &parentloc ); 10c9b7: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED 10c9ba: 85 c0 test %eax,%eax <== NOT EXECUTED 10c9bc: 0f 84 0d 01 00 00 je 10cacf <== NOT EXECUTED 10c9c2: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 10c9c5: 85 c0 test %eax,%eax <== NOT EXECUTED 10c9c7: 0f 84 02 01 00 00 je 10cacf <== NOT EXECUTED 10c9cd: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10c9d0: 8d 55 d4 lea -0x2c(%ebp),%edx <== NOT EXECUTED 10c9d3: 52 push %edx <== NOT EXECUTED 10c9d4: ff d0 call *%eax <== NOT EXECUTED 10c9d6: 83 ce ff or $0xffffffff,%esi <== NOT EXECUTED 10c9d9: e9 ec 00 00 00 jmp 10caca <== NOT EXECUTED /* * Verify you can remove this node as a directory. */ if ( !loc.ops->node_type_h ){ 10c9de: 8b 55 cc mov -0x34(%ebp),%edx 10c9e1: 8b 42 10 mov 0x10(%edx),%eax 10c9e4: 85 c0 test %eax,%eax 10c9e6: 75 05 jne 10c9ed <== NEVER TAKEN rtems_filesystem_freenode( &loc ); 10c9e8: 8b 42 1c mov 0x1c(%edx),%eax <== NOT EXECUTED 10c9eb: eb 65 jmp 10ca52 <== NOT EXECUTED if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ){ 10c9ed: 83 ec 0c sub $0xc,%esp 10c9f0: 57 push %edi 10c9f1: ff d0 call *%eax 10c9f3: 83 c4 10 add $0x10,%esp 10c9f6: 48 dec %eax 10c9f7: 74 45 je 10ca3e rtems_filesystem_freenode( &loc ); 10c9f9: 8b 45 cc mov -0x34(%ebp),%eax 10c9fc: 85 c0 test %eax,%eax 10c9fe: 74 10 je 10ca10 <== ALWAYS TAKEN 10ca00: 8b 40 1c mov 0x1c(%eax),%eax 10ca03: 85 c0 test %eax,%eax 10ca05: 74 09 je 10ca10 <== ALWAYS TAKEN 10ca07: 83 ec 0c sub $0xc,%esp 10ca0a: 57 push %edi 10ca0b: ff d0 call *%eax 10ca0d: 83 c4 10 add $0x10,%esp if ( free_parentloc ) 10ca10: 84 db test %bl,%bl 10ca12: 74 1a je 10ca2e <== ALWAYS TAKEN rtems_filesystem_freenode( &parentloc ); 10ca14: 8b 45 e0 mov -0x20(%ebp),%eax 10ca17: 85 c0 test %eax,%eax 10ca19: 74 13 je 10ca2e <== ALWAYS TAKEN 10ca1b: 8b 40 1c mov 0x1c(%eax),%eax 10ca1e: 85 c0 test %eax,%eax 10ca20: 74 0c je 10ca2e <== ALWAYS TAKEN 10ca22: 83 ec 0c sub $0xc,%esp 10ca25: 8d 55 d4 lea -0x2c(%ebp),%edx 10ca28: 52 push %edx 10ca29: ff d0 call *%eax 10ca2b: 83 c4 10 add $0x10,%esp rtems_set_errno_and_return_minus_one( ENOTDIR ); 10ca2e: e8 9d b9 02 00 call 1383d0 <__errno> 10ca33: c7 00 14 00 00 00 movl $0x14,(%eax) 10ca39: e9 91 00 00 00 jmp 10cacf <== ALWAYS TAKEN /* * Use the filesystems rmnod to remove the node. */ if ( !loc.handlers->rmnod_h ){ 10ca3e: 8b 45 c8 mov -0x38(%ebp),%eax 10ca41: 8b 40 34 mov 0x34(%eax),%eax 10ca44: 85 c0 test %eax,%eax 10ca46: 75 42 jne 10ca8a <== NEVER TAKEN rtems_filesystem_freenode( &loc ); 10ca48: 8b 45 cc mov -0x34(%ebp),%eax <== NOT EXECUTED 10ca4b: 85 c0 test %eax,%eax <== NOT EXECUTED 10ca4d: 74 10 je 10ca5f <== NOT EXECUTED 10ca4f: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 10ca52: 85 c0 test %eax,%eax <== NOT EXECUTED 10ca54: 74 09 je 10ca5f <== NOT EXECUTED 10ca56: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10ca59: 57 push %edi <== NOT EXECUTED 10ca5a: ff d0 call *%eax <== NOT EXECUTED 10ca5c: 83 c4 10 add $0x10,%esp <== NOT EXECUTED if ( free_parentloc ) 10ca5f: 84 db test %bl,%bl <== NOT EXECUTED 10ca61: 74 1a je 10ca7d <== NOT EXECUTED rtems_filesystem_freenode( &parentloc ); 10ca63: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED 10ca66: 85 c0 test %eax,%eax <== NOT EXECUTED 10ca68: 74 13 je 10ca7d <== NOT EXECUTED 10ca6a: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 10ca6d: 85 c0 test %eax,%eax <== NOT EXECUTED 10ca6f: 74 0c je 10ca7d <== NOT EXECUTED 10ca71: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10ca74: 8d 55 d4 lea -0x2c(%ebp),%edx <== NOT EXECUTED 10ca77: 52 push %edx <== NOT EXECUTED 10ca78: ff d0 call *%eax <== NOT EXECUTED 10ca7a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 10ca7d: e8 4e b9 02 00 call 1383d0 <__errno> <== NOT EXECUTED 10ca82: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 10ca88: eb 45 jmp 10cacf <== NOT EXECUTED } result = (*loc.handlers->rmnod_h)( &parentloc, &loc ); 10ca8a: 52 push %edx 10ca8b: 52 push %edx 10ca8c: 57 push %edi 10ca8d: 8d 55 d4 lea -0x2c(%ebp),%edx 10ca90: 52 push %edx 10ca91: ff d0 call *%eax 10ca93: 89 c6 mov %eax,%esi rtems_filesystem_freenode( &loc ); 10ca95: 8b 45 cc mov -0x34(%ebp),%eax 10ca98: 83 c4 10 add $0x10,%esp 10ca9b: 85 c0 test %eax,%eax 10ca9d: 74 10 je 10caaf <== ALWAYS TAKEN 10ca9f: 8b 40 1c mov 0x1c(%eax),%eax 10caa2: 85 c0 test %eax,%eax 10caa4: 74 09 je 10caaf <== ALWAYS TAKEN 10caa6: 83 ec 0c sub $0xc,%esp 10caa9: 57 push %edi 10caaa: ff d0 call *%eax 10caac: 83 c4 10 add $0x10,%esp if ( free_parentloc ) 10caaf: 84 db test %bl,%bl 10cab1: 74 1f je 10cad2 rtems_filesystem_freenode( &parentloc ); 10cab3: 8b 45 e0 mov -0x20(%ebp),%eax 10cab6: 85 c0 test %eax,%eax 10cab8: 74 18 je 10cad2 <== ALWAYS TAKEN 10caba: 8b 40 1c mov 0x1c(%eax),%eax 10cabd: 85 c0 test %eax,%eax 10cabf: 74 11 je 10cad2 <== ALWAYS TAKEN 10cac1: 83 ec 0c sub $0xc,%esp 10cac4: 8d 55 d4 lea -0x2c(%ebp),%edx 10cac7: 52 push %edx 10cac8: ff d0 call *%eax 10caca: 83 c4 10 add $0x10,%esp 10cacd: eb 03 jmp 10cad2 <== ALWAYS TAKEN 10cacf: 83 ce ff or $0xffffffff,%esi return result; } 10cad2: 89 f0 mov %esi,%eax 10cad4: 8d 65 f4 lea -0xc(%ebp),%esp 10cad7: 5b pop %ebx 10cad8: 5e pop %esi 10cad9: 5f pop %edi 10cada: c9 leave 10cadb: c3 ret 0010f7c8 : uint32_t rtems_assoc_local_by_remote( const rtems_assoc_t *ap, uint32_t remote_value ) { 10f7c8: 55 push %ebp 10f7c9: 89 e5 mov %esp,%ebp 10f7cb: 83 ec 10 sub $0x10,%esp const rtems_assoc_t *nap; nap = rtems_assoc_ptr_by_remote(ap, remote_value); 10f7ce: ff 75 0c pushl 0xc(%ebp) 10f7d1: ff 75 08 pushl 0x8(%ebp) 10f7d4: e8 13 00 00 00 call 10f7ec <== ALWAYS TAKEN 10f7d9: 89 c2 mov %eax,%edx if (nap) 10f7db: 83 c4 10 add $0x10,%esp 10f7de: 31 c0 xor %eax,%eax 10f7e0: 85 d2 test %edx,%edx 10f7e2: 74 03 je 10f7e7 return nap->local_value; 10f7e4: 8b 42 04 mov 0x4(%edx),%eax return 0; } 10f7e7: c9 leave 10f7e8: c3 ret 0010f78c : uint32_t rtems_assoc_local_by_remote_bitfield( const rtems_assoc_t *ap, uint32_t remote_value ) { 10f78c: 55 push %ebp 10f78d: 89 e5 mov %esp,%ebp 10f78f: 57 push %edi 10f790: 56 push %esi 10f791: 53 push %ebx 10f792: 83 ec 0c sub $0xc,%esp 10f795: 31 ff xor %edi,%edi 10f797: 31 f6 xor %esi,%esi 10f799: bb 01 00 00 00 mov $0x1,%ebx uint32_t b; uint32_t local_value = 0; for (b = 1; b; b <<= 1) { if (b & remote_value) 10f79e: 85 5d 0c test %ebx,0xc(%ebp) 10f7a1: 74 10 je 10f7b3 local_value |= rtems_assoc_local_by_remote(ap, b); 10f7a3: 50 push %eax 10f7a4: 50 push %eax 10f7a5: 53 push %ebx 10f7a6: ff 75 08 pushl 0x8(%ebp) 10f7a9: e8 1a 00 00 00 call 10f7c8 <== ALWAYS TAKEN 10f7ae: 09 c6 or %eax,%esi 10f7b0: 83 c4 10 add $0x10,%esp ) { uint32_t b; uint32_t local_value = 0; for (b = 1; b; b <<= 1) { 10f7b3: d1 e3 shl %ebx 10f7b5: 47 inc %edi 10f7b6: 83 ff 20 cmp $0x20,%edi 10f7b9: 75 e3 jne 10f79e if (b & remote_value) local_value |= rtems_assoc_local_by_remote(ap, b); } return local_value; } 10f7bb: 89 f0 mov %esi,%eax 10f7bd: 8d 65 f4 lea -0xc(%ebp),%esp 10f7c0: 5b pop %ebx 10f7c1: 5e pop %esi 10f7c2: 5f pop %edi 10f7c3: c9 leave 10f7c4: c3 ret 00115850 : uint32_t bad_value #else uint32_t bad_value __attribute((unused)) #endif ) { 115850: 55 push %ebp <== NOT EXECUTED 115851: 89 e5 mov %esp,%ebp <== NOT EXECUTED sprintf(bad_buffer, "< %" PRId32 "[0x%" PRIx32 " ] >", bad_value, bad_value); #else static char bad_buffer[40] = ""; #endif return bad_buffer; } 115853: b8 00 80 12 00 mov $0x128000,%eax <== NOT EXECUTED 115858: c9 leave <== NOT EXECUTED 115859: c3 ret <== NOT EXECUTED 00113144 : const char *rtems_assoc_name_by_local( const rtems_assoc_t *ap, uint32_t local_value ) { 113144: 55 push %ebp 113145: 89 e5 mov %esp,%ebp 113147: 53 push %ebx 113148: 83 ec 0c sub $0xc,%esp 11314b: 8b 5d 0c mov 0xc(%ebp),%ebx const rtems_assoc_t *nap; nap = rtems_assoc_ptr_by_local(ap, local_value); 11314e: 53 push %ebx 11314f: ff 75 08 pushl 0x8(%ebp) 113152: e8 1d 00 00 00 call 113174 <== ALWAYS TAKEN if (nap) 113157: 83 c4 10 add $0x10,%esp 11315a: 85 c0 test %eax,%eax 11315c: 74 07 je 113165 <== ALWAYS TAKEN return nap->name; 11315e: 8b 00 mov (%eax),%eax return rtems_assoc_name_bad(local_value); } 113160: 8b 5d fc mov -0x4(%ebp),%ebx 113163: c9 leave 113164: c3 ret nap = rtems_assoc_ptr_by_local(ap, local_value); if (nap) return nap->name; return rtems_assoc_name_bad(local_value); 113165: 89 5d 08 mov %ebx,0x8(%ebp) <== NOT EXECUTED } 113168: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 11316b: c9 leave <== NOT EXECUTED nap = rtems_assoc_ptr_by_local(ap, local_value); if (nap) return nap->name; return rtems_assoc_name_bad(local_value); 11316c: e9 df 26 00 00 jmp 115850 <== NOT EXECUTED 001101f0 : const rtems_assoc_t *rtems_assoc_ptr_by_local( const rtems_assoc_t *ap, uint32_t local_value ) { 1101f0: 55 push %ebp 1101f1: 89 e5 mov %esp,%ebp 1101f3: 56 push %esi 1101f4: 53 push %ebx 1101f5: 8b 5d 08 mov 0x8(%ebp),%ebx 1101f8: 8b 75 0c mov 0xc(%ebp),%esi const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) 1101fb: 8b 03 mov (%ebx),%eax 1101fd: 85 c0 test %eax,%eax 1101ff: 74 1b je 11021c <== ALWAYS TAKEN 110201: 52 push %edx 110202: 52 push %edx 110203: 68 cd da 11 00 push $0x11dacd 110208: 50 push %eax 110209: e8 2e 0b 00 00 call 110d3c 11020e: 83 c4 10 add $0x10,%esp 110211: 85 c0 test %eax,%eax 110213: 75 07 jne 11021c <== NEVER TAKEN default_ap = ap++; 110215: 89 d8 mov %ebx,%eax <== NOT EXECUTED 110217: 83 c3 0c add $0xc,%ebx <== NOT EXECUTED 11021a: eb 0c jmp 110228 <== NOT EXECUTED 11021c: 31 c0 xor %eax,%eax 11021e: eb 08 jmp 110228 <== ALWAYS TAKEN for ( ; ap->name; ap++) if (ap->local_value == local_value) 110220: 39 73 04 cmp %esi,0x4(%ebx) 110223: 74 0a je 11022f const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) default_ap = ap++; for ( ; ap->name; ap++) 110225: 83 c3 0c add $0xc,%ebx 110228: 83 3b 00 cmpl $0x0,(%ebx) 11022b: 75 f3 jne 110220 11022d: 89 c3 mov %eax,%ebx if (ap->local_value == local_value) return ap; return default_ap; } 11022f: 89 d8 mov %ebx,%eax 110231: 8d 65 f8 lea -0x8(%ebp),%esp 110234: 5b pop %ebx 110235: 5e pop %esi 110236: c9 leave 110237: c3 ret 0010f7ec : const rtems_assoc_t *rtems_assoc_ptr_by_remote( const rtems_assoc_t *ap, uint32_t remote_value ) { 10f7ec: 55 push %ebp 10f7ed: 89 e5 mov %esp,%ebp 10f7ef: 56 push %esi 10f7f0: 53 push %ebx 10f7f1: 8b 5d 08 mov 0x8(%ebp),%ebx 10f7f4: 8b 75 0c mov 0xc(%ebp),%esi const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) 10f7f7: 8b 03 mov (%ebx),%eax 10f7f9: 85 c0 test %eax,%eax 10f7fb: 74 1b je 10f818 <== ALWAYS TAKEN 10f7fd: 52 push %edx 10f7fe: 52 push %edx 10f7ff: 68 cd da 11 00 push $0x11dacd 10f804: 50 push %eax 10f805: e8 32 15 00 00 call 110d3c <== ALWAYS TAKEN 10f80a: 83 c4 10 add $0x10,%esp 10f80d: 85 c0 test %eax,%eax 10f80f: 75 07 jne 10f818 <== NEVER TAKEN default_ap = ap++; 10f811: 89 d8 mov %ebx,%eax <== NOT EXECUTED 10f813: 83 c3 0c add $0xc,%ebx <== NOT EXECUTED 10f816: eb 0c jmp 10f824 <== NOT EXECUTED 10f818: 31 c0 xor %eax,%eax 10f81a: eb 08 jmp 10f824 <== ALWAYS TAKEN for ( ; ap->name; ap++) if (ap->remote_value == remote_value) 10f81c: 39 73 08 cmp %esi,0x8(%ebx) 10f81f: 74 0a je 10f82b const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) default_ap = ap++; for ( ; ap->name; ap++) 10f821: 83 c3 0c add $0xc,%ebx 10f824: 83 3b 00 cmpl $0x0,(%ebx) 10f827: 75 f3 jne 10f81c 10f829: 89 c3 mov %eax,%ebx if (ap->remote_value == remote_value) return ap; return default_ap; } 10f82b: 89 d8 mov %ebx,%eax 10f82d: 8d 65 f8 lea -0x8(%ebp),%esp 10f830: 5b pop %ebx 10f831: 5e pop %esi 10f832: c9 leave 10f833: c3 ret 0010ffa4 : uint32_t rtems_assoc_remote_by_local( const rtems_assoc_t *ap, uint32_t local_value ) { 10ffa4: 55 push %ebp <== NOT EXECUTED 10ffa5: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10ffa7: 83 ec 10 sub $0x10,%esp <== NOT EXECUTED const rtems_assoc_t *nap; nap = rtems_assoc_ptr_by_local(ap, local_value); 10ffaa: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED 10ffad: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED 10ffb0: e8 3b 02 00 00 call 1101f0 <== NOT EXECUTED 10ffb5: 89 c2 mov %eax,%edx <== NOT EXECUTED if (nap) 10ffb7: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10ffba: 31 c0 xor %eax,%eax <== NOT EXECUTED 10ffbc: 85 d2 test %edx,%edx <== NOT EXECUTED 10ffbe: 74 03 je 10ffc3 <== NOT EXECUTED return nap->remote_value; 10ffc0: 8b 42 08 mov 0x8(%edx),%eax <== NOT EXECUTED return 0; } 10ffc3: c9 leave <== NOT EXECUTED 10ffc4: c3 ret <== NOT EXECUTED 0010f834 : rtems_name name, rtems_attribute attribute_set, uint32_t maximum_waiters, rtems_id *id ) { 10f834: 55 push %ebp 10f835: 89 e5 mov %esp,%ebp 10f837: 57 push %edi 10f838: 56 push %esi 10f839: 53 push %ebx 10f83a: 83 ec 2c sub $0x2c,%esp 10f83d: 8b 75 08 mov 0x8(%ebp),%esi 10f840: 8b 7d 0c mov 0xc(%ebp),%edi 10f843: 8b 55 10 mov 0x10(%ebp),%edx 10f846: 8b 5d 14 mov 0x14(%ebp),%ebx Barrier_Control *the_barrier; CORE_barrier_Attributes the_attributes; if ( !rtems_is_name_valid( name ) ) 10f849: b8 03 00 00 00 mov $0x3,%eax 10f84e: 85 f6 test %esi,%esi 10f850: 0f 84 8c 00 00 00 je 10f8e2 return RTEMS_INVALID_NAME; if ( !id ) 10f856: b0 09 mov $0x9,%al 10f858: 85 db test %ebx,%ebx 10f85a: 0f 84 82 00 00 00 je 10f8e2 return RTEMS_INVALID_ADDRESS; /* Initialize core barrier attributes */ if ( _Attributes_Is_barrier_automatic( attribute_set ) ) { 10f860: f7 c7 10 00 00 00 test $0x10,%edi 10f866: 74 0f je 10f877 the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE; if ( maximum_waiters == 0 ) 10f868: b0 0a mov $0xa,%al 10f86a: 85 d2 test %edx,%edx 10f86c: 74 74 je 10f8e2 if ( !id ) return RTEMS_INVALID_ADDRESS; /* Initialize core barrier attributes */ if ( _Attributes_Is_barrier_automatic( attribute_set ) ) { the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE; 10f86e: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) 10f875: eb 07 jmp 10f87e <== ALWAYS TAKEN if ( maximum_waiters == 0 ) return RTEMS_INVALID_NUMBER; } else the_attributes.discipline = CORE_BARRIER_MANUAL_RELEASE; 10f877: c7 45 e0 01 00 00 00 movl $0x1,-0x20(%ebp) the_attributes.maximum_count = maximum_waiters; 10f87e: 89 55 e4 mov %edx,-0x1c(%ebp) 10f881: a1 74 38 12 00 mov 0x123874,%eax 10f886: 40 inc %eax 10f887: a3 74 38 12 00 mov %eax,0x123874 * This function allocates a barrier control block from * the inactive chain of free barrier control blocks. */ RTEMS_INLINE_ROUTINE Barrier_Control *_Barrier_Allocate( void ) { return (Barrier_Control *) _Objects_Allocate( &_Barrier_Information ); 10f88c: 83 ec 0c sub $0xc,%esp 10f88f: 68 54 3b 12 00 push $0x123b54 10f894: e8 a3 b6 ff ff call 10af3c <_Objects_Allocate> _Thread_Disable_dispatch(); /* prevents deletion */ the_barrier = _Barrier_Allocate(); if ( !the_barrier ) { 10f899: 83 c4 10 add $0x10,%esp 10f89c: 85 c0 test %eax,%eax 10f89e: 75 0c jne 10f8ac _Thread_Enable_dispatch(); 10f8a0: e8 70 c2 ff ff call 10bb15 <_Thread_Enable_dispatch> 10f8a5: b8 05 00 00 00 mov $0x5,%eax return RTEMS_TOO_MANY; 10f8aa: eb 36 jmp 10f8e2 <== ALWAYS TAKEN } the_barrier->attribute_set = attribute_set; 10f8ac: 89 78 10 mov %edi,0x10(%eax) _CORE_barrier_Initialize( &the_barrier->Barrier, &the_attributes ); 10f8af: 52 push %edx 10f8b0: 52 push %edx 10f8b1: 8d 55 e0 lea -0x20(%ebp),%edx 10f8b4: 52 push %edx 10f8b5: 8d 50 14 lea 0x14(%eax),%edx 10f8b8: 52 push %edx 10f8b9: 89 45 d4 mov %eax,-0x2c(%ebp) 10f8bc: e8 4b 03 00 00 call 10fc0c <_CORE_barrier_Initialize> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10f8c1: 8b 45 d4 mov -0x2c(%ebp),%eax 10f8c4: 8b 50 08 mov 0x8(%eax),%edx 10f8c7: 0f b7 fa movzwl %dx,%edi 10f8ca: 8b 0d 70 3b 12 00 mov 0x123b70,%ecx 10f8d0: 89 04 b9 mov %eax,(%ecx,%edi,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 10f8d3: 89 70 0c mov %esi,0xc(%eax) &_Barrier_Information, &the_barrier->Object, (Objects_Name) name ); *id = the_barrier->Object.id; 10f8d6: 89 13 mov %edx,(%ebx) _Thread_Enable_dispatch(); 10f8d8: e8 38 c2 ff ff call 10bb15 <_Thread_Enable_dispatch> 10f8dd: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 10f8df: 83 c4 10 add $0x10,%esp } 10f8e2: 8d 65 f4 lea -0xc(%ebp),%esp 10f8e5: 5b pop %ebx 10f8e6: 5e pop %esi 10f8e7: 5f pop %edi 10f8e8: c9 leave 10f8e9: c3 ret 0010712c : const char *rtems_bsp_cmdline_get_param( const char *name, char *value, size_t length ) { 10712c: 55 push %ebp 10712d: 89 e5 mov %esp,%ebp 10712f: 57 push %edi 107130: 56 push %esi 107131: 53 push %ebx 107132: 83 ec 0c sub $0xc,%esp 107135: 8b 45 08 mov 0x8(%ebp),%eax 107138: 8b 5d 0c mov 0xc(%ebp),%ebx 10713b: 8b 75 10 mov 0x10(%ebp),%esi const char *p; if ( !name ) 10713e: 85 c0 test %eax,%eax 107140: 74 4c je 10718e return NULL; if ( !value ) 107142: 85 db test %ebx,%ebx 107144: 74 4a je 107190 return NULL; if ( !length ) 107146: 85 f6 test %esi,%esi 107148: 74 44 je 10718e return NULL; value[0] = '\0'; 10714a: c6 03 00 movb $0x0,(%ebx) p = rtems_bsp_cmdline_get_param_raw( name ); 10714d: 83 ec 0c sub $0xc,%esp 107150: 50 push %eax 107151: e8 46 00 00 00 call 10719c <== ALWAYS TAKEN if ( !p ) 107156: 83 c4 10 add $0x10,%esp 107159: 85 c0 test %eax,%eax 10715b: 74 31 je 10718e 10715d: 31 ff xor %edi,%edi 10715f: 31 d2 xor %edx,%edx int i; int quotes; const char *p = start; quotes=0; for (i=0 ; *p && i <== ALWAYS TAKEN if ( *p == '\"' ) { 107164: 80 f9 22 cmp $0x22,%cl 107167: 75 03 jne 10716c <== NEVER TAKEN quotes++; 107169: 47 inc %edi <== NOT EXECUTED 10716a: eb 0d jmp 107179 <== NOT EXECUTED } else if ( ((quotes % 2) == 0) && *p == ' ' ) 10716c: f7 c7 01 00 00 00 test $0x1,%edi 107172: 75 05 jne 107179 <== ALWAYS TAKEN 107174: 80 f9 20 cmp $0x20,%cl 107177: 74 17 je 107190 <== ALWAYS TAKEN break; value[i++] = *p++; 107179: 88 0c 13 mov %cl,(%ebx,%edx,1) 10717c: 42 inc %edx value[i] = '\0'; 10717d: c6 04 13 00 movb $0x0,(%ebx,%edx,1) int i; int quotes; const char *p = start; quotes=0; for (i=0 ; *p && i 107188: 39 f2 cmp %esi,%edx 10718a: 72 d8 jb 107164 <== NEVER TAKEN 10718c: eb 02 jmp 107190 <== NOT EXECUTED 10718e: 31 db xor %ebx,%ebx return NULL; copy_string( p, value, length ); return value; } 107190: 89 d8 mov %ebx,%eax 107192: 8d 65 f4 lea -0xc(%ebp),%esp 107195: 5b pop %ebx 107196: 5e pop %esi 107197: 5f pop %edi 107198: c9 leave 107199: c3 ret 0010719c : extern const char *bsp_boot_cmdline; const char *rtems_bsp_cmdline_get_param_raw( const char *name ) { 10719c: 55 push %ebp 10719d: 89 e5 mov %esp,%ebp 10719f: 83 ec 08 sub $0x8,%esp 1071a2: 8b 55 08 mov 0x8(%ebp),%edx const char *p; if ( !name ) 1071a5: 85 d2 test %edx,%edx 1071a7: 74 17 je 1071c0 return NULL; if ( !bsp_boot_cmdline ) 1071a9: a1 68 2e 12 00 mov 0x122e68,%eax 1071ae: 85 c0 test %eax,%eax 1071b0: 74 0e je 1071c0 return NULL; p = strstr(bsp_boot_cmdline, name); 1071b2: 51 push %ecx 1071b3: 51 push %ecx 1071b4: 52 push %edx 1071b5: 50 push %eax 1071b6: e8 a5 a6 00 00 call 111860 1071bb: 83 c4 10 add $0x10,%esp /* printf( "raw: %p (%s)\n", p, p ); */ return p; 1071be: eb 02 jmp 1071c2 <== ALWAYS TAKEN 1071c0: 31 c0 xor %eax,%eax } 1071c2: c9 leave 1071c3: c3 ret 001071c4 : const char *rtems_bsp_cmdline_get_param_rhs( const char *name, char *value, size_t length ) { 1071c4: 55 push %ebp <== NOT EXECUTED 1071c5: 89 e5 mov %esp,%ebp <== NOT EXECUTED 1071c7: 57 push %edi <== NOT EXECUTED 1071c8: 53 push %ebx <== NOT EXECUTED 1071c9: 8b 7d 08 mov 0x8(%ebp),%edi <== NOT EXECUTED 1071cc: 8b 5d 0c mov 0xc(%ebp),%ebx <== NOT EXECUTED const char *p; const char *rhs; char *d; p = rtems_bsp_cmdline_get_param( name, value, length ); 1071cf: 50 push %eax <== NOT EXECUTED 1071d0: ff 75 10 pushl 0x10(%ebp) <== NOT EXECUTED 1071d3: 53 push %ebx <== NOT EXECUTED 1071d4: 57 push %edi <== NOT EXECUTED 1071d5: e8 52 ff ff ff call 10712c <== NOT EXECUTED 1071da: 89 c2 mov %eax,%edx <== NOT EXECUTED if ( !p ) 1071dc: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 1071df: 85 c0 test %eax,%eax <== NOT EXECUTED 1071e1: 74 3c je 10721f <== NOT EXECUTED return NULL; rhs = &p[strlen(name)]; 1071e3: 31 c0 xor %eax,%eax <== NOT EXECUTED 1071e5: 83 c9 ff or $0xffffffff,%ecx <== NOT EXECUTED 1071e8: f2 ae repnz scas %es:(%edi),%al <== NOT EXECUTED 1071ea: f7 d1 not %ecx <== NOT EXECUTED 1071ec: 8d 44 0a ff lea -0x1(%edx,%ecx,1),%eax <== NOT EXECUTED if ( *rhs != '=' ) 1071f0: 80 38 3d cmpb $0x3d,(%eax) <== NOT EXECUTED 1071f3: 75 2a jne 10721f <== NOT EXECUTED return NULL; rhs++; 1071f5: 8d 50 01 lea 0x1(%eax),%edx <== NOT EXECUTED if ( *rhs == '\"' ) 1071f8: 80 78 01 22 cmpb $0x22,0x1(%eax) <== NOT EXECUTED 1071fc: 75 03 jne 107201 <== NOT EXECUTED rhs++; 1071fe: 8d 50 02 lea 0x2(%eax),%edx <== NOT EXECUTED 107201: 89 d8 mov %ebx,%eax <== NOT EXECUTED 107203: eb 04 jmp 107209 <== NOT EXECUTED for ( d=value ; *rhs ; ) *d++ = *rhs++; 107205: 88 08 mov %cl,(%eax) <== NOT EXECUTED 107207: 40 inc %eax <== NOT EXECUTED 107208: 42 inc %edx <== NOT EXECUTED return NULL; rhs++; if ( *rhs == '\"' ) rhs++; for ( d=value ; *rhs ; ) 107209: 8a 0a mov (%edx),%cl <== NOT EXECUTED 10720b: 84 c9 test %cl,%cl <== NOT EXECUTED 10720d: 75 f6 jne 107205 <== NOT EXECUTED *d++ = *rhs++; if ( *(d-1) == '\"' ) 10720f: 8d 50 ff lea -0x1(%eax),%edx <== NOT EXECUTED 107212: 80 78 ff 22 cmpb $0x22,-0x1(%eax) <== NOT EXECUTED 107216: 75 02 jne 10721a <== NOT EXECUTED 107218: 89 d0 mov %edx,%eax <== NOT EXECUTED d--; *d = '\0'; 10721a: c6 00 00 movb $0x0,(%eax) <== NOT EXECUTED return value; 10721d: eb 02 jmp 107221 <== NOT EXECUTED 10721f: 31 db xor %ebx,%ebx <== NOT EXECUTED } 107221: 89 d8 mov %ebx,%eax <== NOT EXECUTED 107223: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED 107226: 5b pop %ebx <== NOT EXECUTED 107227: 5f pop %edi <== NOT EXECUTED 107228: c9 leave <== NOT EXECUTED 107229: c3 ret <== NOT EXECUTED 0010eb64 : rtems_status_code rtems_clock_get( rtems_clock_get_options option, void *time_buffer ) { 10eb64: 55 push %ebp 10eb65: 89 e5 mov %esp,%ebp 10eb67: 53 push %ebx 10eb68: 83 ec 04 sub $0x4,%esp 10eb6b: 8b 55 08 mov 0x8(%ebp),%edx 10eb6e: 8b 5d 0c mov 0xc(%ebp),%ebx if ( !time_buffer ) 10eb71: b8 09 00 00 00 mov $0x9,%eax 10eb76: 85 db test %ebx,%ebx 10eb78: 74 50 je 10ebca return RTEMS_INVALID_ADDRESS; if ( option == RTEMS_CLOCK_GET_TOD ) 10eb7a: 85 d2 test %edx,%edx 10eb7c: 75 0b jne 10eb89 return rtems_clock_get_tod( (rtems_time_of_day *)time_buffer ); 10eb7e: 89 5d 08 mov %ebx,0x8(%ebp) if ( option == RTEMS_CLOCK_GET_TIME_VALUE ) return rtems_clock_get_tod_timeval( (struct timeval *)time_buffer ); return RTEMS_INVALID_NUMBER; } 10eb81: 58 pop %eax 10eb82: 5b pop %ebx 10eb83: c9 leave { if ( !time_buffer ) return RTEMS_INVALID_ADDRESS; if ( option == RTEMS_CLOCK_GET_TOD ) return rtems_clock_get_tod( (rtems_time_of_day *)time_buffer ); 10eb84: e9 8f 00 00 00 jmp 10ec18 <== ALWAYS TAKEN if ( option == RTEMS_CLOCK_GET_SECONDS_SINCE_EPOCH ) 10eb89: 83 fa 01 cmp $0x1,%edx 10eb8c: 75 0b jne 10eb99 return rtems_clock_get_seconds_since_epoch((rtems_interval *)time_buffer); 10eb8e: 89 5d 08 mov %ebx,0x8(%ebp) if ( option == RTEMS_CLOCK_GET_TIME_VALUE ) return rtems_clock_get_tod_timeval( (struct timeval *)time_buffer ); return RTEMS_INVALID_NUMBER; } 10eb91: 5b pop %ebx 10eb92: 5b pop %ebx 10eb93: c9 leave if ( option == RTEMS_CLOCK_GET_TOD ) return rtems_clock_get_tod( (rtems_time_of_day *)time_buffer ); if ( option == RTEMS_CLOCK_GET_SECONDS_SINCE_EPOCH ) return rtems_clock_get_seconds_since_epoch((rtems_interval *)time_buffer); 10eb94: e9 37 00 00 00 jmp 10ebd0 <== ALWAYS TAKEN if ( option == RTEMS_CLOCK_GET_TICKS_SINCE_BOOT ) { 10eb99: 83 fa 02 cmp $0x2,%edx 10eb9c: 75 07 jne 10eba5 rtems_interval *interval = (rtems_interval *)time_buffer; *interval = rtems_clock_get_ticks_since_boot(); 10eb9e: e8 69 00 00 00 call 10ec0c <== ALWAYS TAKEN 10eba3: eb 0a jmp 10ebaf <== ALWAYS TAKEN return RTEMS_SUCCESSFUL; } if ( option == RTEMS_CLOCK_GET_TICKS_PER_SECOND ) { 10eba5: 83 fa 03 cmp $0x3,%edx 10eba8: 75 0b jne 10ebb5 rtems_interval *interval = (rtems_interval *)time_buffer; *interval = rtems_clock_get_ticks_per_second(); 10ebaa: e8 49 00 00 00 call 10ebf8 <== ALWAYS TAKEN 10ebaf: 89 03 mov %eax,(%ebx) 10ebb1: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 10ebb3: eb 15 jmp 10ebca <== ALWAYS TAKEN } if ( option == RTEMS_CLOCK_GET_TIME_VALUE ) 10ebb5: b8 0a 00 00 00 mov $0xa,%eax 10ebba: 83 fa 04 cmp $0x4,%edx 10ebbd: 75 0b jne 10ebca return rtems_clock_get_tod_timeval( (struct timeval *)time_buffer ); 10ebbf: 89 5d 08 mov %ebx,0x8(%ebp) return RTEMS_INVALID_NUMBER; } 10ebc2: 59 pop %ecx 10ebc3: 5b pop %ebx 10ebc4: c9 leave *interval = rtems_clock_get_ticks_per_second(); return RTEMS_SUCCESSFUL; } if ( option == RTEMS_CLOCK_GET_TIME_VALUE ) return rtems_clock_get_tod_timeval( (struct timeval *)time_buffer ); 10ebc5: e9 e6 00 00 00 jmp 10ecb0 <== ALWAYS TAKEN return RTEMS_INVALID_NUMBER; } 10ebca: 5a pop %edx 10ebcb: 5b pop %ebx 10ebcc: c9 leave 10ebcd: c3 ret 0010a8cc : */ rtems_status_code rtems_clock_set( rtems_time_of_day *time_buffer ) { 10a8cc: 55 push %ebp 10a8cd: 89 e5 mov %esp,%ebp 10a8cf: 53 push %ebx 10a8d0: 83 ec 14 sub $0x14,%esp 10a8d3: 8b 5d 08 mov 0x8(%ebp),%ebx struct timespec newtime; if ( !time_buffer ) 10a8d6: b8 09 00 00 00 mov $0x9,%eax 10a8db: 85 db test %ebx,%ebx 10a8dd: 74 56 je 10a935 return RTEMS_INVALID_ADDRESS; if ( _TOD_Validate( time_buffer ) ) { 10a8df: 83 ec 0c sub $0xc,%esp 10a8e2: 53 push %ebx 10a8e3: e8 f8 00 00 00 call 10a9e0 <_TOD_Validate> <== ALWAYS TAKEN 10a8e8: 88 c2 mov %al,%dl 10a8ea: 83 c4 10 add $0x10,%esp 10a8ed: b8 14 00 00 00 mov $0x14,%eax 10a8f2: 84 d2 test %dl,%dl 10a8f4: 74 3f je 10a935 newtime.tv_sec = _TOD_To_seconds( time_buffer ); 10a8f6: 83 ec 0c sub $0xc,%esp 10a8f9: 53 push %ebx 10a8fa: e8 79 00 00 00 call 10a978 <_TOD_To_seconds> <== ALWAYS TAKEN 10a8ff: 89 45 f0 mov %eax,-0x10(%ebp) newtime.tv_nsec = time_buffer->ticks * 10a902: 8b 43 18 mov 0x18(%ebx),%eax 10a905: 0f af 05 24 2a 12 00 imul 0x122a24,%eax 10a90c: 69 c0 e8 03 00 00 imul $0x3e8,%eax,%eax 10a912: 89 45 f4 mov %eax,-0xc(%ebp) rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10a915: a1 78 e7 12 00 mov 0x12e778,%eax 10a91a: 40 inc %eax 10a91b: a3 78 e7 12 00 mov %eax,0x12e778 rtems_configuration_get_nanoseconds_per_tick(); _Thread_Disable_dispatch(); _TOD_Set( &newtime ); 10a920: 8d 45 f0 lea -0x10(%ebp),%eax 10a923: 89 04 24 mov %eax,(%esp) 10a926: e8 f1 15 00 00 call 10bf1c <_TOD_Set> _Thread_Enable_dispatch(); 10a92b: e8 29 27 00 00 call 10d059 <_Thread_Enable_dispatch> 10a930: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 10a932: 83 c4 10 add $0x10,%esp } return RTEMS_INVALID_CLOCK; } 10a935: 8b 5d fc mov -0x4(%ebp),%ebx 10a938: c9 leave 10a939: c3 ret 00107961 : void rtems_cpu_usage_report( void ) { 107961: 55 push %ebp 107962: 89 e5 mov %esp,%ebp 107964: 83 ec 10 sub $0x10,%esp rtems_cpu_usage_report_with_plugin( NULL, printk_plugin ); 107967: 68 1c 8c 10 00 push $0x108c1c 10796c: 6a 00 push $0x0 10796e: e8 7d fe ff ff call 1077f0 <== ALWAYS TAKEN 107973: 83 c4 10 add $0x10,%esp } 107976: c9 leave 107977: c3 ret 001077f0 : void rtems_cpu_usage_report_with_plugin( void *context, rtems_printk_plugin_t print ) { 1077f0: 55 push %ebp 1077f1: 89 e5 mov %esp,%ebp 1077f3: 57 push %edi 1077f4: 56 push %esi 1077f5: 53 push %ebx 1077f6: 83 ec 6c sub $0x6c,%esp 1077f9: 8b 5d 08 mov 0x8(%ebp),%ebx Timestamp_Control uptime, total, ran; #else uint32_t total_units = 0; #endif if ( !print ) 1077fc: 83 7d 0c 00 cmpl $0x0,0xc(%ebp) 107800: 0f 84 53 01 00 00 je 107959 <== ALWAYS 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 ); 107806: 83 ec 0c sub $0xc,%esp 107809: 8d 75 d8 lea -0x28(%ebp),%esi 10780c: 56 push %esi 10780d: e8 7a 46 00 00 call 10be8c <_TOD_Get_uptime> _Timestamp_Subtract( &CPU_usage_Uptime_at_last_reset, &uptime, &total ); 107812: 83 c4 0c add $0xc,%esp 107815: 8d 45 d0 lea -0x30(%ebp),%eax 107818: 50 push %eax 107819: 56 push %esi 10781a: 68 0c ea 12 00 push $0x12ea0c 10781f: e8 84 65 00 00 call 10dda8 <_Timespec_Subtract> } } } #endif (*print)( 107824: 5e pop %esi 107825: 5f pop %edi 107826: 68 1d f5 11 00 push $0x11f51d 10782b: 53 push %ebx 10782c: ff 55 0c call *0xc(%ebp) 10782f: c7 45 a4 01 00 00 00 movl $0x1,-0x5c(%ebp) 107836: 83 c4 10 add $0x10,%esp ); for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { if ( !_Objects_Information_table[ api_index ] ) 107839: 8b 55 a4 mov -0x5c(%ebp),%edx 10783c: 8b 04 95 4c e7 12 00 mov 0x12e74c(,%edx,4),%eax 107843: 85 c0 test %eax,%eax 107845: 0f 84 e5 00 00 00 je 107930 continue; information = _Objects_Information_table[ api_index ][ 1 ]; 10784b: 8b 70 04 mov 0x4(%eax),%esi if ( information ) { 10784e: 85 f6 test %esi,%esi 107850: 0f 84 da 00 00 00 je 107930 <== ALWAYS TAKEN 107856: bf 01 00 00 00 mov $0x1,%edi 10785b: 89 5d 94 mov %ebx,-0x6c(%ebp) 10785e: e9 be 00 00 00 jmp 107921 <== ALWAYS TAKEN for ( i=1 ; i <= information->maximum ; i++ ) { the_thread = (Thread_Control *)information->local_table[ i ]; 107863: 8b 46 1c mov 0x1c(%esi),%eax 107866: 8b 14 b8 mov (%eax,%edi,4),%edx if ( !the_thread ) 107869: 85 d2 test %edx,%edx 10786b: 0f 84 af 00 00 00 je 107920 <== ALWAYS TAKEN continue; rtems_object_get_name( the_thread->Object.id, sizeof(name), name ); 107871: 51 push %ecx 107872: 8d 4d b3 lea -0x4d(%ebp),%ecx 107875: 51 push %ecx 107876: 6a 0d push $0xd 107878: ff 72 08 pushl 0x8(%edx) 10787b: 89 55 a0 mov %edx,-0x60(%ebp) 10787e: e8 6d 35 00 00 call 10adf0 (*print)( 107883: 8d 5d b3 lea -0x4d(%ebp),%ebx 107886: 53 push %ebx 107887: 8b 55 a0 mov -0x60(%ebp),%edx 10788a: ff 72 08 pushl 0x8(%edx) 10788d: 68 8f f6 11 00 push $0x11f68f 107892: ff 75 94 pushl -0x6c(%ebp) 107895: 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; 107898: 8b 55 a0 mov -0x60(%ebp),%edx 10789b: 8b 8a 84 00 00 00 mov 0x84(%edx),%ecx 1078a1: 8b 9a 88 00 00 00 mov 0x88(%edx),%ebx 1078a7: 89 4d c8 mov %ecx,-0x38(%ebp) 1078aa: 89 5d cc mov %ebx,-0x34(%ebp) if ( _Thread_Executing->Object.id == the_thread->Object.id ) { 1078ad: 83 c4 20 add $0x20,%esp 1078b0: a1 34 e8 12 00 mov 0x12e834,%eax 1078b5: 8b 40 08 mov 0x8(%eax),%eax 1078b8: 3b 42 08 cmp 0x8(%edx),%eax 1078bb: 75 28 jne 1078e5 Timestamp_Control used; _Timestamp_Subtract( 1078bd: 50 push %eax 1078be: 8d 45 c0 lea -0x40(%ebp),%eax 1078c1: 50 push %eax 1078c2: 8d 55 d8 lea -0x28(%ebp),%edx 1078c5: 52 push %edx 1078c6: 68 3c e8 12 00 push $0x12e83c 1078cb: 89 45 a0 mov %eax,-0x60(%ebp) 1078ce: e8 d5 64 00 00 call 10dda8 <_Timespec_Subtract> &_Thread_Time_of_last_context_switch, &uptime, &used ); _Timestamp_Add_to( &ran, &used ); 1078d3: 59 pop %ecx 1078d4: 5b pop %ebx 1078d5: 8b 45 a0 mov -0x60(%ebp),%eax 1078d8: 50 push %eax 1078d9: 8d 5d c8 lea -0x38(%ebp),%ebx 1078dc: 53 push %ebx 1078dd: e8 ca 63 00 00 call 10dcac <_Timespec_Add_to> 1078e2: 83 c4 10 add $0x10,%esp }; _Timestamp_Divide( &ran, &total, &ival, &fval ); 1078e5: 8d 45 e0 lea -0x20(%ebp),%eax 1078e8: 50 push %eax 1078e9: 8d 55 e4 lea -0x1c(%ebp),%edx 1078ec: 52 push %edx 1078ed: 8d 4d d0 lea -0x30(%ebp),%ecx 1078f0: 51 push %ecx 1078f1: 8d 5d c8 lea -0x38(%ebp),%ebx 1078f4: 53 push %ebx 1078f5: e8 e2 63 00 00 call 10dcdc <_Timespec_Divide> /* * Print the information */ (*print)( context, 1078fa: 58 pop %eax 1078fb: 5a pop %edx 1078fc: ff 75 e0 pushl -0x20(%ebp) 1078ff: ff 75 e4 pushl -0x1c(%ebp) 107902: 8b 45 cc mov -0x34(%ebp),%eax 107905: b9 e8 03 00 00 mov $0x3e8,%ecx 10790a: 31 d2 xor %edx,%edx 10790c: f7 f1 div %ecx 10790e: 50 push %eax 10790f: ff 75 c8 pushl -0x38(%ebp) 107912: 68 a2 f6 11 00 push $0x11f6a2 107917: ff 75 94 pushl -0x6c(%ebp) 10791a: ff 55 0c call *0xc(%ebp) 10791d: 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++ ) { 107920: 47 inc %edi 107921: 0f b7 46 10 movzwl 0x10(%esi),%eax 107925: 39 c7 cmp %eax,%edi 107927: 0f 86 36 ff ff ff jbe 107863 10792d: 8b 5d 94 mov -0x6c(%ebp),%ebx "------------+----------------------------------------+---------------+---------\n" ); for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { 107930: ff 45 a4 incl -0x5c(%ebp) " ID | NAME | TICKS | PERCENT\n" #endif "------------+----------------------------------------+---------------+---------\n" ); for ( api_index = 1 ; 107933: 83 7d a4 05 cmpl $0x5,-0x5c(%ebp) 107937: 0f 85 fc fe ff ff jne 107839 } } } #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ (*print)( 10793d: 8b 45 d4 mov -0x2c(%ebp),%eax 107940: b9 e8 03 00 00 mov $0x3e8,%ecx 107945: 31 d2 xor %edx,%edx 107947: f7 f1 div %ecx 107949: 50 push %eax 10794a: ff 75 d0 pushl -0x30(%ebp) 10794d: 68 ba f6 11 00 push $0x11f6ba 107952: 53 push %ebx 107953: ff 55 0c call *0xc(%ebp) 107956: 83 c4 10 add $0x10,%esp "-------------------------------------------------------------------------------\n", _Watchdog_Ticks_since_boot - CPU_usage_Ticks_at_last_reset, total_units ); #endif } 107959: 8d 65 f4 lea -0xc(%ebp),%esp 10795c: 5b pop %ebx 10795d: 5e pop %esi 10795e: 5f pop %edi 10795f: c9 leave 107960: c3 ret 0010ff78 : { 0, 0, 0 }, }; int rtems_deviceio_errno(rtems_status_code code) { 10ff78: 55 push %ebp <== NOT EXECUTED 10ff79: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10ff7b: 53 push %ebx <== NOT EXECUTED 10ff7c: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED int rc; if ((rc = rtems_assoc_remote_by_local(errno_assoc, (uint32_t ) code))) 10ff7f: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED 10ff82: 68 58 db 11 00 push $0x11db58 <== NOT EXECUTED 10ff87: e8 18 00 00 00 call 10ffa4 <== NOT EXECUTED 10ff8c: 89 c3 mov %eax,%ebx <== NOT EXECUTED 10ff8e: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10ff91: 85 c0 test %eax,%eax <== NOT EXECUTED 10ff93: 74 07 je 10ff9c <== NOT EXECUTED { errno = rc; 10ff95: e8 b6 02 00 00 call 110250 <__errno> <== NOT EXECUTED 10ff9a: 89 18 mov %ebx,(%eax) <== NOT EXECUTED return -1; } return -1; } 10ff9c: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 10ff9f: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 10ffa2: c9 leave <== NOT EXECUTED 10ffa3: c3 ret <== NOT EXECUTED 0010b50b : int rtems_error( rtems_error_code_t error_flag, const char *printf_format, ... ) { 10b50b: 55 push %ebp <== NOT EXECUTED 10b50c: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10b50e: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED * printf(3) format string, with its concommitant arguments. * * Returns the number of characters written. */ int rtems_error( 10b511: 8d 4d 10 lea 0x10(%ebp),%ecx <== NOT EXECUTED { va_list arglist; int chars_written; va_start(arglist, printf_format); chars_written = rtems_verror(error_flag, printf_format, arglist); 10b514: 8b 55 0c mov 0xc(%ebp),%edx <== NOT EXECUTED 10b517: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 10b51a: e8 6a fe ff ff call 10b389 <== NOT EXECUTED va_end(arglist); return chars_written; } 10b51f: c9 leave <== NOT EXECUTED 10b520: c3 ret <== NOT EXECUTED 00109960 : rtems_event_set event_in, rtems_option option_set, rtems_interval ticks, rtems_event_set *event_out ) { 109960: 55 push %ebp 109961: 89 e5 mov %esp,%ebp 109963: 83 ec 08 sub $0x8,%esp 109966: 8b 4d 08 mov 0x8(%ebp),%ecx 109969: 8b 55 14 mov 0x14(%ebp),%edx RTEMS_API_Control *api; if ( !event_out ) 10996c: b8 09 00 00 00 mov $0x9,%eax 109971: 85 d2 test %edx,%edx 109973: 74 3f je 1099b4 return RTEMS_INVALID_ADDRESS; api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ]; 109975: a1 30 39 12 00 mov 0x123930,%eax 10997a: 8b 80 f0 00 00 00 mov 0xf0(%eax),%eax if ( _Event_sets_Is_empty( event_in ) ) { 109980: 85 c9 test %ecx,%ecx 109982: 75 08 jne 10998c *event_out = api->pending_events; 109984: 8b 00 mov (%eax),%eax 109986: 89 02 mov %eax,(%edx) 109988: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 10998a: eb 28 jmp 1099b4 <== ALWAYS TAKEN rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10998c: a1 74 38 12 00 mov 0x123874,%eax 109991: 40 inc %eax 109992: a3 74 38 12 00 mov %eax,0x123874 } _Thread_Disable_dispatch(); _Event_Seize( event_in, option_set, ticks, event_out ); 109997: 52 push %edx 109998: ff 75 10 pushl 0x10(%ebp) 10999b: ff 75 0c pushl 0xc(%ebp) 10999e: 51 push %ecx 10999f: e8 14 00 00 00 call 1099b8 <_Event_Seize> <== ALWAYS TAKEN _Thread_Enable_dispatch(); 1099a4: e8 6c 21 00 00 call 10bb15 <_Thread_Enable_dispatch> return( _Thread_Executing->Wait.return_code ); 1099a9: a1 30 39 12 00 mov 0x123930,%eax 1099ae: 8b 40 34 mov 0x34(%eax),%eax 1099b1: 83 c4 10 add $0x10,%esp } 1099b4: c9 leave 1099b5: c3 ret 00109ac0 : rtems_status_code rtems_event_send( rtems_id id, rtems_event_set event_in ) { 109ac0: 55 push %ebp 109ac1: 89 e5 mov %esp,%ebp 109ac3: 53 push %ebx 109ac4: 83 ec 1c sub $0x1c,%esp register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; the_thread = _Thread_Get( id, &location ); 109ac7: 8d 45 f4 lea -0xc(%ebp),%eax 109aca: 50 push %eax 109acb: ff 75 08 pushl 0x8(%ebp) 109ace: e8 65 20 00 00 call 10bb38 <_Thread_Get> 109ad3: 89 c2 mov %eax,%edx switch ( location ) { 109ad5: 83 c4 10 add $0x10,%esp 109ad8: b8 04 00 00 00 mov $0x4,%eax 109add: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 109ae1: 75 23 jne 109b06 case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; 109ae3: 8b 82 f0 00 00 00 mov 0xf0(%edx),%eax rtems_event_set *the_event_set ) { ISR_Level level; _ISR_Disable( level ); 109ae9: 9c pushf 109aea: fa cli 109aeb: 59 pop %ecx *the_event_set |= the_new_events; 109aec: 8b 5d 0c mov 0xc(%ebp),%ebx 109aef: 09 18 or %ebx,(%eax) _ISR_Enable( level ); 109af1: 51 push %ecx 109af2: 9d popf _Event_sets_Post( event_in, &api->pending_events ); _Event_Surrender( the_thread ); 109af3: 83 ec 0c sub $0xc,%esp 109af6: 52 push %edx 109af7: e8 10 00 00 00 call 109b0c <_Event_Surrender> <== ALWAYS TAKEN _Thread_Enable_dispatch(); 109afc: e8 14 20 00 00 call 10bb15 <_Thread_Enable_dispatch> 109b01: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 109b03: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 109b06: 8b 5d fc mov -0x4(%ebp),%ebx 109b09: c9 leave 109b0a: c3 ret 0010d9bc : rtems_status_code rtems_extension_create( rtems_name name, const rtems_extensions_table *extension_table, rtems_id *id ) { 10d9bc: 55 push %ebp 10d9bd: 89 e5 mov %esp,%ebp 10d9bf: 57 push %edi 10d9c0: 56 push %esi 10d9c1: 53 push %ebx 10d9c2: 83 ec 0c sub $0xc,%esp 10d9c5: 8b 75 0c mov 0xc(%ebp),%esi Extension_Control *the_extension; if ( !id ) 10d9c8: b8 09 00 00 00 mov $0x9,%eax 10d9cd: 83 7d 10 00 cmpl $0x0,0x10(%ebp) 10d9d1: 74 6f je 10da42 return RTEMS_INVALID_ADDRESS; if ( !rtems_is_name_valid( name ) ) 10d9d3: b0 03 mov $0x3,%al 10d9d5: 83 7d 08 00 cmpl $0x0,0x8(%ebp) 10d9d9: 74 67 je 10da42 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10d9db: a1 50 ea 12 00 mov 0x12ea50,%eax 10d9e0: 40 inc %eax 10d9e1: a3 50 ea 12 00 mov %eax,0x12ea50 #ifndef __EXTENSION_MANAGER_inl #define __EXTENSION_MANAGER_inl RTEMS_INLINE_ROUTINE Extension_Control *_Extension_Allocate( void ) { return (Extension_Control *) _Objects_Allocate( &_Extension_Information ); 10d9e6: 83 ec 0c sub $0xc,%esp 10d9e9: 68 78 ec 12 00 push $0x12ec78 10d9ee: e8 39 0b 00 00 call 10e52c <_Objects_Allocate> 10d9f3: 89 c3 mov %eax,%ebx _Thread_Disable_dispatch(); /* to prevent deletion */ the_extension = _Extension_Allocate(); if ( !the_extension ) { 10d9f5: 83 c4 10 add $0x10,%esp 10d9f8: 85 c0 test %eax,%eax 10d9fa: 75 0c jne 10da08 _Thread_Enable_dispatch(); 10d9fc: e8 70 17 00 00 call 10f171 <_Thread_Enable_dispatch> 10da01: b8 05 00 00 00 mov $0x5,%eax return RTEMS_TOO_MANY; 10da06: eb 3a jmp 10da42 <== ALWAYS TAKEN RTEMS_INLINE_ROUTINE void _User_extensions_Add_set_with_table( User_extensions_Control *extension, const User_extensions_Table *extension_table ) { extension->Callouts = *extension_table; 10da08: 8d 78 24 lea 0x24(%eax),%edi 10da0b: b9 08 00 00 00 mov $0x8,%ecx 10da10: f3 a5 rep movsl %ds:(%esi),%es:(%edi) _User_extensions_Add_set( extension ); 10da12: 83 ec 0c sub $0xc,%esp 10da15: 8d 40 10 lea 0x10(%eax),%eax 10da18: 50 push %eax 10da19: e8 b2 22 00 00 call 10fcd0 <_User_extensions_Add_set> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10da1e: 8b 43 08 mov 0x8(%ebx),%eax 10da21: 0f b7 c8 movzwl %ax,%ecx 10da24: 8b 15 94 ec 12 00 mov 0x12ec94,%edx 10da2a: 89 1c 8a mov %ebx,(%edx,%ecx,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 10da2d: 8b 55 08 mov 0x8(%ebp),%edx 10da30: 89 53 0c mov %edx,0xc(%ebx) &_Extension_Information, &the_extension->Object, (Objects_Name) name ); *id = the_extension->Object.id; 10da33: 8b 55 10 mov 0x10(%ebp),%edx 10da36: 89 02 mov %eax,(%edx) _Thread_Enable_dispatch(); 10da38: e8 34 17 00 00 call 10f171 <_Thread_Enable_dispatch> 10da3d: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 10da3f: 83 c4 10 add $0x10,%esp } 10da42: 8d 65 f4 lea -0xc(%ebp),%esp 10da45: 5b pop %ebx 10da46: 5e pop %esi 10da47: 5f pop %edi 10da48: c9 leave 10da49: c3 ret 0010a4e4 : */ void rtems_fatal_error_occurred( uint32_t the_error ) { 10a4e4: 55 push %ebp 10a4e5: 89 e5 mov %esp,%ebp 10a4e7: 83 ec 0c sub $0xc,%esp _Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, FALSE, the_error ); 10a4ea: ff 75 08 pushl 0x8(%ebp) 10a4ed: 6a 00 push $0x0 10a4ef: 6a 01 push $0x1 10a4f1: e8 ae 09 00 00 call 10aea4 <_Internal_error_Occurred> <== ALWAYS TAKEN 00106f9b : } int rtems_filesystem_dirname( const char *pathname ) { 106f9b: 55 push %ebp 106f9c: 89 e5 mov %esp,%ebp 106f9e: 57 push %edi 106f9f: 8b 55 08 mov 0x8(%ebp),%edx int len = strlen( pathname ); 106fa2: 31 c0 xor %eax,%eax 106fa4: 83 c9 ff or $0xffffffff,%ecx 106fa7: 89 d7 mov %edx,%edi 106fa9: f2 ae repnz scas %es:(%edi),%al 106fab: f7 d1 not %ecx 106fad: 8d 41 ff lea -0x1(%ecx),%eax 106fb0: 01 c2 add %eax,%edx while ( len ) { 106fb2: eb 13 jmp 106fc7 <== ALWAYS TAKEN len--; 106fb4: 48 dec %eax if ( rtems_filesystem_is_separator( pathname[len] ) ) 106fb5: 8a 4a ff mov -0x1(%edx),%cl 106fb8: 80 f9 5c cmp $0x5c,%cl 106fbb: 74 0e je 106fcb <== ALWAYS TAKEN 106fbd: 80 f9 2f cmp $0x2f,%cl 106fc0: 74 09 je 106fcb 106fc2: 4a dec %edx 106fc3: 84 c9 test %cl,%cl 106fc5: 74 04 je 106fcb <== ALWAYS TAKEN const char *pathname ) { int len = strlen( pathname ); while ( len ) { 106fc7: 85 c0 test %eax,%eax 106fc9: 75 e9 jne 106fb4 <== NEVER TAKEN if ( rtems_filesystem_is_separator( pathname[len] ) ) break; } return len; } 106fcb: 5f pop %edi 106fcc: c9 leave 106fcd: c3 ret 00107088 : int pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc, int follow_link ) { 107088: 55 push %ebp 107089: 89 e5 mov %esp,%ebp 10708b: 57 push %edi 10708c: 56 push %esi 10708d: 53 push %ebx 10708e: 83 ec 1c sub $0x1c,%esp 107091: 8b 55 08 mov 0x8(%ebp),%edx 107094: 8b 45 0c mov 0xc(%ebp),%eax 107097: 89 45 e4 mov %eax,-0x1c(%ebp) 10709a: 8b 45 10 mov 0x10(%ebp),%eax 10709d: 89 45 e0 mov %eax,-0x20(%ebp) 1070a0: 8b 45 14 mov 0x14(%ebp),%eax 1070a3: 8b 5d 18 mov 0x18(%ebp),%ebx /* * Verify Input parameters. */ if ( !pathname ) 1070a6: 85 d2 test %edx,%edx 1070a8: 75 0d jne 1070b7 rtems_set_errno_and_return_minus_one( EFAULT ); 1070aa: e8 a1 91 00 00 call 110250 <__errno> 1070af: c7 00 0e 00 00 00 movl $0xe,(%eax) 1070b5: eb 6e jmp 107125 if ( !pathloc ) 1070b7: 85 c0 test %eax,%eax 1070b9: 75 0d jne 1070c8 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */ 1070bb: e8 90 91 00 00 call 110250 <__errno> <== NOT EXECUTED 1070c0: c7 00 05 00 00 00 movl $0x5,(%eax) <== NOT EXECUTED 1070c6: eb 5d jmp 107125 <== NOT EXECUTED /* * Evaluate the path using the optable evalpath. */ rtems_filesystem_get_start_loc( pathname, &i, pathloc ); 1070c8: 8a 0a mov (%edx),%cl 1070ca: 80 f9 5c cmp $0x5c,%cl 1070cd: 74 09 je 1070d8 <== ALWAYS TAKEN 1070cf: 80 f9 2f cmp $0x2f,%cl 1070d2: 74 04 je 1070d8 1070d4: 84 c9 test %cl,%cl 1070d6: 75 16 jne 1070ee <== NEVER TAKEN 1070d8: 8b 35 60 16 12 00 mov 0x121660,%esi 1070de: 83 c6 18 add $0x18,%esi 1070e1: b9 05 00 00 00 mov $0x5,%ecx 1070e6: 89 c7 mov %eax,%edi 1070e8: f3 a5 rep movsl %ds:(%esi),%es:(%edi) 1070ea: b1 01 mov $0x1,%cl 1070ec: eb 12 jmp 107100 <== ALWAYS TAKEN 1070ee: 8b 35 60 16 12 00 mov 0x121660,%esi 1070f4: 83 c6 04 add $0x4,%esi 1070f7: b9 05 00 00 00 mov $0x5,%ecx 1070fc: 89 c7 mov %eax,%edi 1070fe: f3 a5 rep movsl %ds:(%esi),%es:(%edi) /* * We evaluation the path relative to the start location we get got. */ return rtems_filesystem_evaluate_relative_path( &pathname[i], 107100: 89 5d 18 mov %ebx,0x18(%ebp) 107103: 89 45 14 mov %eax,0x14(%ebp) 107106: 8b 45 e0 mov -0x20(%ebp),%eax 107109: 89 45 10 mov %eax,0x10(%ebp) 10710c: 8b 45 e4 mov -0x1c(%ebp),%eax 10710f: 29 c8 sub %ecx,%eax 107111: 89 45 0c mov %eax,0xc(%ebp) 107114: 01 ca add %ecx,%edx 107116: 89 55 08 mov %edx,0x8(%ebp) pathnamelen - i, flags, pathloc, follow_link ); } 107119: 83 c4 1c add $0x1c,%esp 10711c: 5b pop %ebx 10711d: 5e pop %esi 10711e: 5f pop %edi 10711f: c9 leave rtems_filesystem_get_start_loc( pathname, &i, pathloc ); /* * We evaluation the path relative to the start location we get got. */ return rtems_filesystem_evaluate_relative_path( &pathname[i], 107120: e9 a9 fe ff ff jmp 106fce <== ALWAYS TAKEN pathnamelen - i, flags, pathloc, follow_link ); } 107125: 83 c8 ff or $0xffffffff,%eax 107128: 83 c4 1c add $0x1c,%esp 10712b: 5b pop %ebx 10712c: 5e pop %esi 10712d: 5f pop %edi 10712e: c9 leave 10712f: c3 ret 00106fce : int pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc, int follow_link ) { 106fce: 55 push %ebp 106fcf: 89 e5 mov %esp,%ebp 106fd1: 57 push %edi 106fd2: 56 push %esi 106fd3: 53 push %ebx 106fd4: 83 ec 1c sub $0x1c,%esp 106fd7: 8b 4d 08 mov 0x8(%ebp),%ecx 106fda: 8b 75 0c mov 0xc(%ebp),%esi 106fdd: 8b 7d 10 mov 0x10(%ebp),%edi 106fe0: 8b 5d 14 mov 0x14(%ebp),%ebx 106fe3: 8b 55 18 mov 0x18(%ebp),%edx /* * Verify Input parameters. */ if ( !pathname ) 106fe6: 85 c9 test %ecx,%ecx 106fe8: 75 0d jne 106ff7 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EFAULT ); 106fea: e8 61 92 00 00 call 110250 <__errno> <== NOT EXECUTED 106fef: c7 00 0e 00 00 00 movl $0xe,(%eax) <== NOT EXECUTED 106ff5: eb 0f jmp 107006 <== NOT EXECUTED if ( !pathloc ) 106ff7: 85 db test %ebx,%ebx 106ff9: 75 10 jne 10700b <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */ 106ffb: e8 50 92 00 00 call 110250 <__errno> <== NOT EXECUTED 107000: c7 00 05 00 00 00 movl $0x5,(%eax) <== NOT EXECUTED 107006: 83 ce ff or $0xffffffff,%esi <== NOT EXECUTED 107009: eb 73 jmp 10707e <== NOT EXECUTED if ( !pathloc->ops->evalpath_h ) 10700b: 8b 43 0c mov 0xc(%ebx),%eax 10700e: 8b 00 mov (%eax),%eax 107010: 85 c0 test %eax,%eax 107012: 74 4e je 107062 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); result = (*pathloc->ops->evalpath_h)( pathname, pathnamelen, flags, pathloc ); 107014: 53 push %ebx 107015: 57 push %edi 107016: 56 push %esi 107017: 51 push %ecx 107018: 89 55 e4 mov %edx,-0x1c(%ebp) 10701b: ff d0 call *%eax 10701d: 89 c6 mov %eax,%esi /* * Get the Node type and determine if you need to follow the link or * not. */ if ( (result == 0) && follow_link ) { 10701f: 83 c4 10 add $0x10,%esp 107022: 85 c0 test %eax,%eax 107024: 8b 55 e4 mov -0x1c(%ebp),%edx 107027: 75 55 jne 10707e 107029: 85 d2 test %edx,%edx 10702b: 74 51 je 10707e if ( !pathloc->ops->node_type_h ){ 10702d: 8b 53 0c mov 0xc(%ebx),%edx 107030: 8b 42 10 mov 0x10(%edx),%eax 107033: 85 c0 test %eax,%eax 107035: 74 1b je 107052 <== ALWAYS TAKEN rtems_filesystem_freenode( pathloc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } type = (*pathloc->ops->node_type_h)( pathloc ); 107037: 83 ec 0c sub $0xc,%esp 10703a: 53 push %ebx 10703b: ff d0 call *%eax if ( ( type == RTEMS_FILESYSTEM_HARD_LINK ) || 10703d: 83 e8 03 sub $0x3,%eax 107040: 83 c4 10 add $0x10,%esp 107043: 83 f8 01 cmp $0x1,%eax 107046: 77 36 ja 10707e ( type == RTEMS_FILESYSTEM_SYM_LINK ) ) { if ( !pathloc->ops->eval_link_h ){ 107048: 8b 53 0c mov 0xc(%ebx),%edx 10704b: 8b 42 34 mov 0x34(%edx),%eax 10704e: 85 c0 test %eax,%eax 107050: 75 1d jne 10706f <== NEVER TAKEN rtems_filesystem_freenode( pathloc ); 107052: 8b 42 1c mov 0x1c(%edx),%eax <== NOT EXECUTED 107055: 85 c0 test %eax,%eax <== NOT EXECUTED 107057: 74 09 je 107062 <== NOT EXECUTED 107059: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10705c: 53 push %ebx <== NOT EXECUTED 10705d: ff d0 call *%eax <== NOT EXECUTED 10705f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 107062: e8 e9 91 00 00 call 110250 <__errno> <== NOT EXECUTED 107067: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 10706d: eb 97 jmp 107006 <== NOT EXECUTED * 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 ); 10706f: 89 7d 0c mov %edi,0xc(%ebp) 107072: 89 5d 08 mov %ebx,0x8(%ebp) } } return result; } 107075: 8d 65 f4 lea -0xc(%ebp),%esp 107078: 5b pop %ebx 107079: 5e pop %esi 10707a: 5f pop %edi 10707b: 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 ); 10707c: ff e0 jmp *%eax } } return result; } 10707e: 89 f0 mov %esi,%eax 107080: 8d 65 f4 lea -0xc(%ebp),%esp 107083: 5b pop %ebx 107084: 5e pop %esi 107085: 5f pop %edi 107086: c9 leave 107087: c3 ret 00106e7c : * configuration is a single instantiation of the IMFS or miniIMFS with * a single "/dev" directory in it. */ void rtems_filesystem_initialize( void ) { 106e7c: 55 push %ebp 106e7d: 89 e5 mov %esp,%ebp 106e7f: 57 push %edi 106e80: 56 push %esi 106e81: 53 push %ebx 106e82: 83 ec 2c sub $0x2c,%esp /* * Set the default umask to "022". */ rtems_filesystem_umask = 022; 106e85: a1 60 16 12 00 mov 0x121660,%eax 106e8a: c7 40 2c 12 00 00 00 movl $0x12,0x2c(%eax) init_fs_mount_table(); 106e91: e8 76 06 00 00 call 10750c <== ALWAYS TAKEN /* * mount the first filesystem. */ if ( rtems_filesystem_mount_table_size == 0 ) 106e96: 83 3d e8 bd 11 00 00 cmpl $0x0,0x11bde8 106e9d: 75 0a jne 106ea9 <== NEVER TAKEN rtems_fatal_error_occurred( 0xABCD0001 ); 106e9f: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 106ea2: 68 01 00 cd ab push $0xabcd0001 <== NOT EXECUTED 106ea7: eb 2a jmp 106ed3 <== NOT EXECUTED mt = &rtems_filesystem_mount_table[0]; 106ea9: a1 6c f8 11 00 mov 0x11f86c,%eax status = mount( 106eae: 83 ec 0c sub $0xc,%esp 106eb1: ff 70 0c pushl 0xc(%eax) 106eb4: ff 70 08 pushl 0x8(%eax) 106eb7: ff 70 04 pushl 0x4(%eax) 106eba: ff 30 pushl (%eax) 106ebc: 8d 45 e4 lea -0x1c(%ebp),%eax 106ebf: 50 push %eax 106ec0: e8 6c 06 00 00 call 107531 <== ALWAYS TAKEN &entry, mt->fs_ops, mt->fsoptions, mt->device, mt->mount_point ); if ( status == -1 ) 106ec5: 83 c4 20 add $0x20,%esp 106ec8: 40 inc %eax 106ec9: 75 0d jne 106ed8 <== NEVER TAKEN rtems_fatal_error_occurred( 0xABCD0002 ); 106ecb: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 106ece: 68 02 00 cd ab push $0xabcd0002 <== NOT EXECUTED 106ed3: e8 0c 36 00 00 call 10a4e4 <== NOT EXECUTED rtems_filesystem_link_counts = 0; 106ed8: 8b 3d 60 16 12 00 mov 0x121660,%edi 106ede: 66 c7 47 30 00 00 movw $0x0,0x30(%edi) * set_private_env() - but then: that's * gonna hit performance. * * Till Straumann, 10/25/2002 */ rtems_filesystem_root = entry->mt_fs_root; 106ee4: 83 c7 18 add $0x18,%edi 106ee7: 8b 75 e4 mov -0x1c(%ebp),%esi 106eea: 83 c6 1c add $0x1c,%esi 106eed: b9 05 00 00 00 mov $0x5,%ecx 106ef2: f3 a5 rep movsl %ds:(%esi),%es:(%edi) /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 106ef4: 83 ec 0c sub $0xc,%esp 106ef7: 6a 00 push $0x0 106ef9: 8d 5d d0 lea -0x30(%ebp),%ebx 106efc: 53 push %ebx 106efd: 6a 00 push $0x0 106eff: 6a 01 push $0x1 106f01: 68 57 d4 11 00 push $0x11d457 106f06: e8 7d 01 00 00 call 107088 <== ALWAYS TAKEN rtems_filesystem_root = loc; 106f0b: 8b 3d 60 16 12 00 mov 0x121660,%edi 106f11: 83 c7 18 add $0x18,%edi 106f14: b9 05 00 00 00 mov $0x5,%ecx 106f19: 89 de mov %ebx,%esi 106f1b: f3 a5 rep movsl %ds:(%esi),%es:(%edi) /* One more clone for the current node */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 106f1d: 83 c4 14 add $0x14,%esp 106f20: 6a 00 push $0x0 106f22: 53 push %ebx 106f23: 6a 00 push $0x0 106f25: 6a 01 push $0x1 106f27: 68 57 d4 11 00 push $0x11d457 106f2c: e8 57 01 00 00 call 107088 <== ALWAYS TAKEN rtems_filesystem_current = loc; 106f31: 8b 3d 60 16 12 00 mov 0x121660,%edi 106f37: 83 c7 04 add $0x4,%edi 106f3a: b9 05 00 00 00 mov $0x5,%ecx 106f3f: 89 de mov %ebx,%esi 106f41: 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); 106f43: 83 c4 18 add $0x18,%esp 106f46: 68 ff 01 00 00 push $0x1ff 106f4b: 68 59 d4 11 00 push $0x11d459 106f50: e8 ab 04 00 00 call 107400 <== ALWAYS TAKEN if ( status != 0 ) 106f55: 83 c4 10 add $0x10,%esp 106f58: 85 c0 test %eax,%eax 106f5a: 74 0d je 106f69 <== NEVER TAKEN rtems_fatal_error_occurred( 0xABCD0003 ); 106f5c: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 106f5f: 68 03 00 cd ab push $0xabcd0003 <== NOT EXECUTED 106f64: e9 6a ff ff ff jmp 106ed3 <== 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. */ } 106f69: 8d 65 f4 lea -0xc(%ebp),%esp 106f6c: 5b pop %ebx 106f6d: 5e pop %esi 106f6e: 5f pop %edi 106f6f: c9 leave 106f70: c3 ret 0010e6bc : ); bool rtems_filesystem_nodes_equal( const rtems_filesystem_location_info_t *loc1, const rtems_filesystem_location_info_t *loc2 ){ 10e6bc: 55 push %ebp <== NOT EXECUTED 10e6bd: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10e6bf: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 10e6c2: 8b 10 mov (%eax),%edx <== NOT EXECUTED 10e6c4: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED 10e6c7: 3b 10 cmp (%eax),%edx <== NOT EXECUTED 10e6c9: 0f 94 c0 sete %al <== NOT EXECUTED return ( loc1->node_access == loc2->node_access ); } 10e6cc: c9 leave <== NOT EXECUTED 10e6cd: c3 ret <== NOT EXECUTED 00106f74 : int rtems_filesystem_prefix_separators( const char *pathname, int pathnamelen ) { 106f74: 55 push %ebp 106f75: 89 e5 mov %esp,%ebp 106f77: 53 push %ebx 106f78: 8b 5d 08 mov 0x8(%ebp),%ebx 106f7b: 8b 4d 0c mov 0xc(%ebp),%ecx 106f7e: 31 c0 xor %eax,%eax /* * Eat any separators at start of the path. */ int stripped = 0; while ( *pathname && pathnamelen && rtems_filesystem_is_separator( *pathname ) ) 106f80: eb 01 jmp 106f83 <== ALWAYS TAKEN { pathname++; pathnamelen--; stripped++; 106f82: 40 inc %eax { /* * Eat any separators at start of the path. */ int stripped = 0; while ( *pathname && pathnamelen && rtems_filesystem_is_separator( *pathname ) ) 106f83: 8a 14 03 mov (%ebx,%eax,1),%dl 106f86: 39 c1 cmp %eax,%ecx 106f88: 74 0e je 106f98 <== ALWAYS TAKEN 106f8a: 84 d2 test %dl,%dl 106f8c: 74 0a je 106f98 <== ALWAYS TAKEN 106f8e: 80 fa 5c cmp $0x5c,%dl 106f91: 74 ef je 106f82 <== ALWAYS TAKEN 106f93: 80 fa 2f cmp $0x2f,%dl 106f96: 74 ea je 106f82 pathname++; pathnamelen--; stripped++; } return stripped; } 106f98: 5b pop %ebx 106f99: c9 leave 106f9a: c3 ret 0010a418 : #endif Objects_Information *_Internal_Objects[ OBJECTS_INTERNAL_CLASSES_LAST + 1 ]; void rtems_initialize_data_structures(void) { 10a418: 55 push %ebp 10a419: 89 e5 mov %esp,%ebp 10a41b: 83 ec 08 sub $0x8,%esp 10a41e: c7 05 0c 3a 12 00 00 movl $0x0,0x123a0c 10a425: 00 00 00 #endif /* * Initialize any target architecture specific support as early as possible */ _CPU_Initialize(); 10a428: e8 b3 28 00 00 call 10cce0 <_CPU_Initialize> /* * Do this as early as possible to ensure no debugging output * is even attempted to be printed. */ _Debug_Manager_initialization(); 10a42d: e8 16 3e 00 00 call 10e248 <_Debug_Manager_initialization> <== ALWAYS TAKEN _API_extensions_Initialization(); 10a432: e8 b1 01 00 00 call 10a5e8 <_API_extensions_Initialization> <== ALWAYS TAKEN * This routine initializes the thread dispatching subsystem. */ RTEMS_INLINE_ROUTINE void _Thread_Dispatch_initialization( void ) { _Thread_Dispatch_disable_level = 1; 10a437: c7 05 74 38 12 00 01 movl $0x1,0x123874 10a43e: 00 00 00 /* * Before this is called, we are not allowed to allocate memory * from the Workspace because it is not initialized. */ _Workspace_Handler_initialization(); 10a441: e8 74 26 00 00 call 10caba <_Workspace_Handler_initialization> _User_extensions_Handler_initialization(); 10a446: e8 fd 21 00 00 call 10c648 <_User_extensions_Handler_initialization> _ISR_Handler_initialization(); 10a44b: e8 94 0a 00 00 call 10aee4 <_ISR_Handler_initialization> <== ALWAYS TAKEN /* * Initialize the internal support API and allocator Mutex */ _Objects_Information_table[OBJECTS_INTERNAL_API] = _Internal_Objects; 10a450: c7 05 4c 38 12 00 8c movl $0x12388c,0x12384c 10a457: 38 12 00 _API_Mutex_Initialization( 1 ); 10a45a: 83 ec 0c sub $0xc,%esp 10a45d: 6a 01 push $0x1 10a45f: e8 88 02 00 00 call 10a6ec <_API_Mutex_Initialization> <== ALWAYS TAKEN _API_Mutex_Allocate( &_RTEMS_Allocator_Mutex ); 10a464: c7 04 24 28 39 12 00 movl $0x123928,(%esp) 10a46b: e8 00 02 00 00 call 10a670 <_API_Mutex_Allocate> <== ALWAYS TAKEN RTEMS_INLINE_ROUTINE void _Priority_Handler_initialization( void ) { int index; _Priority_Major_bit_map = 0; 10a470: 66 c7 05 24 39 12 00 movw $0x0,0x123924 10a477: 00 00 10a479: 31 c0 xor %eax,%eax 10a47b: 83 c4 10 add $0x10,%esp for ( index=0 ; index <16 ; index++ ) _Priority_Bit_map[ index ] = 0; 10a47e: 66 c7 84 00 9c 39 12 movw $0x0,0x12399c(%eax,%eax,1) 10a485: 00 00 00 RTEMS_INLINE_ROUTINE void _Priority_Handler_initialization( void ) { int index; _Priority_Major_bit_map = 0; for ( index=0 ; index <16 ; index++ ) 10a488: 40 inc %eax 10a489: 83 f8 10 cmp $0x10,%eax 10a48c: 75 f0 jne 10a47e _Priority_Handler_initialization(); _Watchdog_Handler_initialization(); 10a48e: e8 9d 24 00 00 call 10c930 <_Watchdog_Handler_initialization> _TOD_Handler_initialization(); 10a493: e8 78 06 00 00 call 10ab10 <_TOD_Handler_initialization> <== ALWAYS TAKEN _Thread_Handler_initialization(); 10a498: e8 0f 19 00 00 call 10bdac <_Thread_Handler_initialization> _MPCI_Handler_initialization( RTEMS_TIMEOUT ); #endif /* MANAGERS */ _RTEMS_API_Initialize(); 10a49d: e8 fe 00 00 00 call 10a5a0 <_RTEMS_API_Initialize> <== ALWAYS TAKEN _Extension_Manager_initialization(); 10a4a2: e8 15 00 00 00 call 10a4bc <_Extension_Manager_initialization> <== ALWAYS TAKEN _IO_Manager_initialization(); 10a4a7: e8 73 00 00 00 call 10a51f <_IO_Manager_initialization> <== ALWAYS TAKEN 10a4ac: c7 05 0c 3a 12 00 01 movl $0x1,0x123a0c 10a4b3: 00 00 00 _Thread_Create_idle(); /* * Scheduling can properly occur now as long as we avoid dispatching. */ } 10a4b6: c9 leave * _Thread_Executing and _Thread_Heir are not set. * * At this point all API extensions are in place. After the call to * _Thread_Create_idle() _Thread_Executing and _Thread_Heir will be set. */ _Thread_Create_idle(); 10a4b7: e9 48 14 00 00 jmp 10b904 <_Thread_Create_idle> 0010a407 : _API_extensions_Run_predriver(); #endif } void rtems_initialize_device_drivers(void) { 10a407: 55 push %ebp 10a408: 89 e5 mov %esp,%ebp 10a40a: 83 ec 08 sub $0x8,%esp * Initialize all the device drivers and initialize the MPCI layer. * * NOTE: The MPCI may be build upon a device driver. */ _IO_Initialize_all_drivers(); 10a40d: e8 e6 00 00 00 call 10a4f8 <_IO_Initialize_all_drivers> <== ALWAYS TAKEN * Run the APIs and BSPs postdriver hooks. * * The API extensions are supposed to create user initialization tasks. */ _API_extensions_Run_postdriver(); } 10a412: c9 leave /* * Run the APIs and BSPs postdriver hooks. * * The API extensions are supposed to create user initialization tasks. */ _API_extensions_Run_postdriver(); 10a413: e9 f3 01 00 00 jmp 10a60b <_API_extensions_Run_postdriver> <== ALWAYS TAKEN 00106d30 : rtems_status_code rtems_io_lookup_name( const char *name, rtems_driver_name_t *device_info ) { 106d30: 55 push %ebp <== NOT EXECUTED 106d31: 89 e5 mov %esp,%ebp <== NOT EXECUTED 106d33: 57 push %edi <== NOT EXECUTED 106d34: 56 push %esi <== NOT EXECUTED 106d35: 53 push %ebx <== NOT EXECUTED 106d36: 83 ec 48 sub $0x48,%esp <== NOT EXECUTED 106d39: 8b 55 0c mov 0xc(%ebp),%edx <== NOT EXECUTED 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( name, strlen( name ), 0x00, &loc, true ); 106d3c: 83 c9 ff or $0xffffffff,%ecx <== NOT EXECUTED 106d3f: 8b 7d 08 mov 0x8(%ebp),%edi <== NOT EXECUTED 106d42: 31 c0 xor %eax,%eax <== NOT EXECUTED 106d44: f2 ae repnz scas %es:(%edi),%al <== NOT EXECUTED 106d46: f7 d1 not %ecx <== NOT EXECUTED 106d48: 49 dec %ecx <== NOT EXECUTED 106d49: 6a 01 push $0x1 <== NOT EXECUTED 106d4b: 8d 75 d4 lea -0x2c(%ebp),%esi <== NOT EXECUTED 106d4e: 56 push %esi <== NOT EXECUTED 106d4f: 6a 00 push $0x0 <== NOT EXECUTED 106d51: 51 push %ecx <== NOT EXECUTED 106d52: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED 106d55: 89 55 c4 mov %edx,-0x3c(%ebp) <== NOT EXECUTED 106d58: e8 2b 03 00 00 call 107088 <== NOT EXECUTED 106d5d: 89 c7 mov %eax,%edi <== NOT EXECUTED the_jnode = loc.node_access; 106d5f: 8b 5d d4 mov -0x2c(%ebp),%ebx <== NOT EXECUTED if ( !loc.ops->node_type_h ) { 106d62: 8b 4d e0 mov -0x20(%ebp),%ecx <== NOT EXECUTED 106d65: 8b 41 10 mov 0x10(%ecx),%eax <== NOT EXECUTED 106d68: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 106d6b: 85 c0 test %eax,%eax <== NOT EXECUTED 106d6d: 8b 55 c4 mov -0x3c(%ebp),%edx <== NOT EXECUTED 106d70: 75 20 jne 106d92 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 106d72: 8b 41 1c mov 0x1c(%ecx),%eax <== NOT EXECUTED 106d75: 85 c0 test %eax,%eax <== NOT EXECUTED 106d77: 74 09 je 106d82 <== NOT EXECUTED 106d79: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 106d7c: 56 push %esi <== NOT EXECUTED 106d7d: ff d0 call *%eax <== NOT EXECUTED 106d7f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 106d82: e8 c9 94 00 00 call 110250 <__errno> <== NOT EXECUTED 106d87: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 106d8d: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 106d90: eb 7b jmp 106e0d <== NOT EXECUTED } node_type = (*loc.ops->node_type_h)( &loc ); 106d92: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 106d95: 56 push %esi <== NOT EXECUTED 106d96: 89 55 c4 mov %edx,-0x3c(%ebp) <== NOT EXECUTED 106d99: ff d0 call *%eax <== NOT EXECUTED if ( (result != 0) || node_type != RTEMS_FILESYSTEM_DEVICE ) { 106d9b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 106d9e: 83 f8 02 cmp $0x2,%eax <== NOT EXECUTED 106da1: 8b 55 c4 mov -0x3c(%ebp),%edx <== NOT EXECUTED 106da4: 75 04 jne 106daa <== NOT EXECUTED 106da6: 85 ff test %edi,%edi <== NOT EXECUTED 106da8: 74 1e je 106dc8 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 106daa: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED 106dad: 85 c0 test %eax,%eax <== NOT EXECUTED 106daf: 74 53 je 106e04 <== NOT EXECUTED 106db1: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 106db4: 85 c0 test %eax,%eax <== NOT EXECUTED 106db6: 74 4c je 106e04 <== NOT EXECUTED 106db8: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 106dbb: 8d 55 d4 lea -0x2c(%ebp),%edx <== NOT EXECUTED 106dbe: 52 push %edx <== NOT EXECUTED 106dbf: ff d0 call *%eax <== NOT EXECUTED 106dc1: b8 0d 00 00 00 mov $0xd,%eax <== NOT EXECUTED 106dc6: eb 37 jmp 106dff <== NOT EXECUTED return RTEMS_UNSATISFIED; } device_info->device_name = (char *) name; 106dc8: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 106dcb: 89 02 mov %eax,(%edx) <== NOT EXECUTED device_info->device_name_length = strlen( name ); 106dcd: 83 c9 ff or $0xffffffff,%ecx <== NOT EXECUTED 106dd0: 8b 7d 08 mov 0x8(%ebp),%edi <== NOT EXECUTED 106dd3: 31 c0 xor %eax,%eax <== NOT EXECUTED 106dd5: f2 ae repnz scas %es:(%edi),%al <== NOT EXECUTED 106dd7: f7 d1 not %ecx <== NOT EXECUTED 106dd9: 49 dec %ecx <== NOT EXECUTED 106dda: 89 4a 04 mov %ecx,0x4(%edx) <== NOT EXECUTED device_info->major = the_jnode->info.device.major; 106ddd: 8b 43 50 mov 0x50(%ebx),%eax <== NOT EXECUTED 106de0: 89 42 08 mov %eax,0x8(%edx) <== NOT EXECUTED device_info->minor = the_jnode->info.device.minor; 106de3: 8b 43 54 mov 0x54(%ebx),%eax <== NOT EXECUTED 106de6: 89 42 0c mov %eax,0xc(%edx) <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 106de9: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED 106dec: 85 c0 test %eax,%eax <== NOT EXECUTED 106dee: 74 1b je 106e0b <== NOT EXECUTED 106df0: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 106df3: 85 c0 test %eax,%eax <== NOT EXECUTED 106df5: 74 14 je 106e0b <== NOT EXECUTED 106df7: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 106dfa: 56 push %esi <== NOT EXECUTED 106dfb: ff d0 call *%eax <== NOT EXECUTED 106dfd: 31 c0 xor %eax,%eax <== NOT EXECUTED 106dff: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 106e02: eb 09 jmp 106e0d <== NOT EXECUTED 106e04: b8 0d 00 00 00 mov $0xd,%eax <== NOT EXECUTED 106e09: eb 02 jmp 106e0d <== NOT EXECUTED 106e0b: 31 c0 xor %eax,%eax <== NOT EXECUTED return RTEMS_SUCCESSFUL; } 106e0d: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 106e10: 5b pop %ebx <== NOT EXECUTED 106e11: 5e pop %esi <== NOT EXECUTED 106e12: 5f pop %edi <== NOT EXECUTED 106e13: c9 leave <== NOT EXECUTED 106e14: c3 ret <== NOT EXECUTED 0010ba18 : rtems_status_code rtems_io_register_driver( rtems_device_major_number major, const rtems_driver_address_table *driver_table, rtems_device_major_number *registered_major ) { 10ba18: 55 push %ebp 10ba19: 89 e5 mov %esp,%ebp 10ba1b: 57 push %edi 10ba1c: 56 push %esi 10ba1d: 53 push %ebx 10ba1e: 83 ec 0c sub $0xc,%esp 10ba21: 8b 5d 08 mov 0x8(%ebp),%ebx 10ba24: 8b 75 0c mov 0xc(%ebp),%esi 10ba27: 8b 55 10 mov 0x10(%ebp),%edx rtems_device_major_number major_limit = _IO_Number_of_drivers; 10ba2a: 8b 0d 0c 87 12 00 mov 0x12870c,%ecx if ( rtems_interrupt_is_in_progress() ) 10ba30: 8b 3d 8c 84 12 00 mov 0x12848c,%edi 10ba36: b8 12 00 00 00 mov $0x12,%eax 10ba3b: 85 ff test %edi,%edi 10ba3d: 0f 85 cc 00 00 00 jne 10bb0f return RTEMS_CALLED_FROM_ISR; if ( registered_major == NULL ) 10ba43: 85 d2 test %edx,%edx 10ba45: 0f 84 bf 00 00 00 je 10bb0a return RTEMS_INVALID_ADDRESS; /* Set it to an invalid value */ *registered_major = major_limit; 10ba4b: 89 0a mov %ecx,(%edx) if ( driver_table == NULL ) 10ba4d: 85 f6 test %esi,%esi 10ba4f: 0f 84 b5 00 00 00 je 10bb0a static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 10ba55: 83 3e 00 cmpl $0x0,(%esi) 10ba58: 0f 85 b9 00 00 00 jne 10bb17 10ba5e: 83 7e 04 00 cmpl $0x0,0x4(%esi) 10ba62: 0f 85 af 00 00 00 jne 10bb17 10ba68: e9 9d 00 00 00 jmp 10bb0a <== ALWAYS TAKEN rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10ba6d: a1 f4 83 12 00 mov 0x1283f4,%eax 10ba72: 40 inc %eax 10ba73: a3 f4 83 12 00 mov %eax,0x1283f4 if ( major >= major_limit ) return RTEMS_INVALID_NUMBER; _Thread_Disable_dispatch(); if ( major == 0 ) { 10ba78: 85 db test %ebx,%ebx 10ba7a: 75 31 jne 10baad static rtems_status_code rtems_io_obtain_major_number( rtems_device_major_number *major ) { rtems_device_major_number n = _IO_Number_of_drivers; 10ba7c: 8b 0d 0c 87 12 00 mov 0x12870c,%ecx 10ba82: a1 10 87 12 00 mov 0x128710,%eax 10ba87: eb 15 jmp 10ba9e <== ALWAYS TAKEN static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 10ba89: 83 38 00 cmpl $0x0,(%eax) 10ba8c: 0f 85 94 00 00 00 jne 10bb26 10ba92: 83 78 04 00 cmpl $0x0,0x4(%eax) 10ba96: 0f 85 8a 00 00 00 jne 10bb26 10ba9c: eb 04 jmp 10baa2 <== ALWAYS TAKEN rtems_device_major_number n = _IO_Number_of_drivers; rtems_device_major_number m = 0; /* major is error checked by caller */ for ( m = 0; m < n; ++m ) { 10ba9e: 39 cb cmp %ecx,%ebx 10baa0: 72 e7 jb 10ba89 if ( rtems_io_is_empty_table( table ) ) break; } /* Assigns invalid value in case of failure */ *major = m; 10baa2: 89 1a mov %ebx,(%edx) if ( m != n ) 10baa4: 39 cb cmp %ecx,%ebx 10baa6: 75 30 jne 10bad8 10baa8: e9 82 00 00 00 jmp 10bb2f <== ALWAYS TAKEN _Thread_Enable_dispatch(); return sc; } major = *registered_major; } else { rtems_driver_address_table *const table = _IO_Driver_address_table + major; 10baad: 6b c3 18 imul $0x18,%ebx,%eax 10bab0: 03 05 10 87 12 00 add 0x128710,%eax static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 10bab6: 31 c9 xor %ecx,%ecx 10bab8: 83 38 00 cmpl $0x0,(%eax) 10babb: 75 09 jne 10bac6 10babd: 31 c9 xor %ecx,%ecx 10babf: 83 78 04 00 cmpl $0x0,0x4(%eax) 10bac3: 0f 94 c1 sete %cl } major = *registered_major; } else { rtems_driver_address_table *const table = _IO_Driver_address_table + major; if ( !rtems_io_is_empty_table( table ) ) { 10bac6: 85 c9 test %ecx,%ecx 10bac8: 75 0c jne 10bad6 _Thread_Enable_dispatch(); 10baca: e8 26 17 00 00 call 10d1f5 <_Thread_Enable_dispatch> 10bacf: b8 0c 00 00 00 mov $0xc,%eax return RTEMS_RESOURCE_IN_USE; 10bad4: eb 39 jmp 10bb0f <== ALWAYS TAKEN } *registered_major = major; 10bad6: 89 1a mov %ebx,(%edx) } _IO_Driver_address_table [major] = *driver_table; 10bad8: 6b fb 18 imul $0x18,%ebx,%edi 10badb: 03 3d 10 87 12 00 add 0x128710,%edi 10bae1: b9 06 00 00 00 mov $0x6,%ecx 10bae6: f3 a5 rep movsl %ds:(%esi),%es:(%edi) _Thread_Enable_dispatch(); 10bae8: e8 08 17 00 00 call 10d1f5 <_Thread_Enable_dispatch> return rtems_io_initialize( major, 0, NULL ); 10baed: c7 45 10 00 00 00 00 movl $0x0,0x10(%ebp) 10baf4: c7 45 0c 00 00 00 00 movl $0x0,0xc(%ebp) 10bafb: 89 5d 08 mov %ebx,0x8(%ebp) } 10bafe: 83 c4 0c add $0xc,%esp 10bb01: 5b pop %ebx 10bb02: 5e pop %esi 10bb03: 5f pop %edi 10bb04: c9 leave _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); 10bb05: e9 42 6d 00 00 jmp 11284c <== ALWAYS TAKEN 10bb0a: b8 09 00 00 00 mov $0x9,%eax } 10bb0f: 83 c4 0c add $0xc,%esp 10bb12: 5b pop %ebx 10bb13: 5e pop %esi 10bb14: 5f pop %edi 10bb15: c9 leave 10bb16: c3 ret return RTEMS_INVALID_ADDRESS; if ( rtems_io_is_empty_table( driver_table ) ) return RTEMS_INVALID_ADDRESS; if ( major >= major_limit ) 10bb17: b8 0a 00 00 00 mov $0xa,%eax 10bb1c: 39 cb cmp %ecx,%ebx 10bb1e: 0f 82 49 ff ff ff jb 10ba6d 10bb24: eb e9 jmp 10bb0f <== ALWAYS TAKEN rtems_device_major_number n = _IO_Number_of_drivers; rtems_device_major_number m = 0; /* major is error checked by caller */ for ( m = 0; m < n; ++m ) { 10bb26: 43 inc %ebx 10bb27: 83 c0 18 add $0x18,%eax 10bb2a: e9 6f ff ff ff jmp 10ba9e <== ALWAYS TAKEN if ( major == 0 ) { rtems_status_code sc = rtems_io_obtain_major_number( registered_major ); if ( sc != RTEMS_SUCCESSFUL ) { _Thread_Enable_dispatch(); 10bb2f: e8 c1 16 00 00 call 10d1f5 <_Thread_Enable_dispatch> 10bb34: b8 05 00 00 00 mov $0x5,%eax return sc; 10bb39: eb d4 jmp 10bb0f <== ALWAYS TAKEN 00106e15 : rtems_status_code rtems_io_register_name( const char *device_name, rtems_device_major_number major, rtems_device_minor_number minor ) { 106e15: 55 push %ebp 106e16: 89 e5 mov %esp,%ebp 106e18: 83 ec 08 sub $0x8,%esp rtems_device_minor_number _minor ) { union __rtems_dev_t temp; temp.__overlay.major = _major; 106e1b: 8b 45 0c mov 0xc(%ebp),%eax temp.__overlay.minor = _minor; 106e1e: 8b 55 10 mov 0x10(%ebp),%edx int status; dev_t dev; dev = rtems_filesystem_make_dev_t( major, minor ); status = mknod( device_name, 0777 | S_IFCHR, dev ); 106e21: 52 push %edx 106e22: 50 push %eax 106e23: 68 ff 21 00 00 push $0x21ff 106e28: ff 75 08 pushl 0x8(%ebp) 106e2b: e8 ec 05 00 00 call 10741c <== ALWAYS TAKEN /* this is the only error returned by the old version */ if ( status ) 106e30: 83 c4 10 add $0x10,%esp 106e33: 83 f8 01 cmp $0x1,%eax 106e36: 19 c0 sbb %eax,%eax 106e38: f7 d0 not %eax 106e3a: 83 e0 05 and $0x5,%eax return RTEMS_TOO_MANY; return RTEMS_SUCCESSFUL; } 106e3d: c9 leave 106e3e: c3 ret 0010c370 : #include #include void rtems_iterate_over_all_threads(rtems_per_thread_routine routine) { 10c370: 55 push %ebp 10c371: 89 e5 mov %esp,%ebp 10c373: 57 push %edi 10c374: 56 push %esi 10c375: 53 push %ebx 10c376: 83 ec 0c sub $0xc,%esp uint32_t i; uint32_t api_index; Thread_Control *the_thread; Objects_Information *information; if ( !routine ) 10c379: 83 7d 08 00 cmpl $0x0,0x8(%ebp) 10c37d: 74 41 je 10c3c0 <== ALWAYS TAKEN 10c37f: 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 ] ) 10c384: 8b 04 9d 4c e7 12 00 mov 0x12e74c(,%ebx,4),%eax 10c38b: 85 c0 test %eax,%eax 10c38d: 74 2b je 10c3ba continue; information = _Objects_Information_table[ api_index ][ 1 ]; 10c38f: 8b 78 04 mov 0x4(%eax),%edi if ( !information ) 10c392: be 01 00 00 00 mov $0x1,%esi 10c397: 85 ff test %edi,%edi 10c399: 75 17 jne 10c3b2 10c39b: eb 1d jmp 10c3ba <== ALWAYS TAKEN continue; for ( i=1 ; i <= information->maximum ; i++ ) { the_thread = (Thread_Control *)information->local_table[ i ]; 10c39d: 8b 47 1c mov 0x1c(%edi),%eax 10c3a0: 8b 04 b0 mov (%eax,%esi,4),%eax if ( !the_thread ) 10c3a3: 85 c0 test %eax,%eax 10c3a5: 74 0a je 10c3b1 <== ALWAYS TAKEN continue; (*routine)(the_thread); 10c3a7: 83 ec 0c sub $0xc,%esp 10c3aa: 50 push %eax 10c3ab: ff 55 08 call *0x8(%ebp) 10c3ae: 83 c4 10 add $0x10,%esp information = _Objects_Information_table[ api_index ][ 1 ]; if ( !information ) continue; for ( i=1 ; i <= information->maximum ; i++ ) { 10c3b1: 46 inc %esi 10c3b2: 0f b7 47 10 movzwl 0x10(%edi),%eax 10c3b6: 39 c6 cmp %eax,%esi 10c3b8: 76 e3 jbe 10c39d Objects_Information *information; if ( !routine ) return; for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { 10c3ba: 43 inc %ebx 10c3bb: 83 fb 05 cmp $0x5,%ebx 10c3be: 75 c4 jne 10c384 (*routine)(the_thread); } } } 10c3c0: 8d 65 f4 lea -0xc(%ebp),%esp 10c3c3: 5b pop %ebx 10c3c4: 5e pop %esi 10c3c5: 5f pop %edi 10c3c6: c9 leave 10c3c7: c3 ret 0010ddaf : * This routine searches the IOP Table for an unused entry. If it * finds one, it returns it. Otherwise, it returns NULL. */ rtems_libio_t *rtems_libio_allocate( void ) { 10ddaf: 55 push %ebp 10ddb0: 89 e5 mov %esp,%ebp 10ddb2: 57 push %edi 10ddb3: 53 push %ebx 10ddb4: 83 ec 14 sub $0x14,%esp rtems_libio_t *iop, *next; rtems_status_code rc; rtems_id sema; rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT ); 10ddb7: 6a 00 push $0x0 10ddb9: 6a 00 push $0x0 10ddbb: ff 35 20 37 12 00 pushl 0x123720 10ddc1: e8 66 c1 ff ff call 109f2c if (rtems_libio_iop_freelist) { 10ddc6: a1 1c 37 12 00 mov 0x12371c,%eax 10ddcb: 83 c4 10 add $0x10,%esp 10ddce: 85 c0 test %eax,%eax 10ddd0: 74 4f je 10de21 rc = rtems_semaphore_create( 10ddd2: 83 ec 0c sub $0xc,%esp 10ddd5: 8d 55 f4 lea -0xc(%ebp),%edx 10ddd8: 52 push %edx 10ddd9: 6a 00 push $0x0 10dddb: 6a 54 push $0x54 10dddd: 6a 01 push $0x1 10dddf: 2b 05 18 37 12 00 sub 0x123718,%eax 10dde5: c1 f8 06 sar $0x6,%eax 10dde8: 0d 00 49 42 4c or $0x4c424900,%eax 10dded: 50 push %eax 10ddee: e8 0d bf ff ff call 109d00 1, RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &sema ); if (rc != RTEMS_SUCCESSFUL) 10ddf3: 83 c4 20 add $0x20,%esp 10ddf6: 85 c0 test %eax,%eax 10ddf8: 75 27 jne 10de21 <== ALWAYS TAKEN goto failed; iop = rtems_libio_iop_freelist; 10ddfa: 8b 1d 1c 37 12 00 mov 0x12371c,%ebx next = iop->data1; 10de00: 8b 53 34 mov 0x34(%ebx),%edx (void) memset( iop, 0, sizeof(rtems_libio_t) ); 10de03: b9 10 00 00 00 mov $0x10,%ecx 10de08: 89 df mov %ebx,%edi 10de0a: f3 ab rep stos %eax,%es:(%edi) iop->flags = LIBIO_FLAGS_OPEN; 10de0c: c7 43 14 00 01 00 00 movl $0x100,0x14(%ebx) iop->sem = sema; 10de13: 8b 45 f4 mov -0xc(%ebp),%eax 10de16: 89 43 2c mov %eax,0x2c(%ebx) rtems_libio_iop_freelist = next; 10de19: 89 15 1c 37 12 00 mov %edx,0x12371c goto done; 10de1f: eb 02 jmp 10de23 <== ALWAYS TAKEN 10de21: 31 db xor %ebx,%ebx failed: iop = 0; done: rtems_semaphore_release( rtems_libio_semaphore ); 10de23: 83 ec 0c sub $0xc,%esp 10de26: ff 35 20 37 12 00 pushl 0x123720 10de2c: e8 e7 c1 ff ff call 10a018 return iop; } 10de31: 89 d8 mov %ebx,%eax 10de33: 8d 65 f8 lea -0x8(%ebp),%esp 10de36: 5b pop %ebx 10de37: 5f pop %edi 10de38: c9 leave 10de39: c3 ret 0010dd5a : */ void rtems_libio_free( rtems_libio_t *iop ) { 10dd5a: 55 push %ebp 10dd5b: 89 e5 mov %esp,%ebp 10dd5d: 53 push %ebx 10dd5e: 83 ec 08 sub $0x8,%esp 10dd61: 8b 5d 08 mov 0x8(%ebp),%ebx rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT ); 10dd64: 6a 00 push $0x0 10dd66: 6a 00 push $0x0 10dd68: ff 35 20 37 12 00 pushl 0x123720 10dd6e: e8 b9 c1 ff ff call 109f2c if (iop->sem) 10dd73: 8b 43 2c mov 0x2c(%ebx),%eax 10dd76: 83 c4 10 add $0x10,%esp 10dd79: 85 c0 test %eax,%eax 10dd7b: 74 0c je 10dd89 <== ALWAYS TAKEN rtems_semaphore_delete(iop->sem); 10dd7d: 83 ec 0c sub $0xc,%esp 10dd80: 50 push %eax 10dd81: e8 16 c1 ff ff call 109e9c 10dd86: 83 c4 10 add $0x10,%esp iop->flags &= ~LIBIO_FLAGS_OPEN; 10dd89: 81 63 14 ff fe ff ff andl $0xfffffeff,0x14(%ebx) iop->data1 = rtems_libio_iop_freelist; 10dd90: a1 1c 37 12 00 mov 0x12371c,%eax 10dd95: 89 43 34 mov %eax,0x34(%ebx) rtems_libio_iop_freelist = iop; 10dd98: 89 1d 1c 37 12 00 mov %ebx,0x12371c rtems_semaphore_release(rtems_libio_semaphore); 10dd9e: a1 20 37 12 00 mov 0x123720,%eax 10dda3: 89 45 08 mov %eax,0x8(%ebp) } 10dda6: 8b 5d fc mov -0x4(%ebp),%ebx 10dda9: c9 leave iop->flags &= ~LIBIO_FLAGS_OPEN; iop->data1 = rtems_libio_iop_freelist; rtems_libio_iop_freelist = iop; rtems_semaphore_release(rtems_libio_semaphore); 10ddaa: e9 69 c2 ff ff jmp 10a018 001071a8 : * * Called by BSP startup code to initialize the libio subsystem. */ void rtems_libio_init( void ) { 1071a8: 55 push %ebp 1071a9: 89 e5 mov %esp,%ebp 1071ab: 53 push %ebx 1071ac: 83 ec 04 sub $0x4,%esp rtems_status_code rc; uint32_t i; rtems_libio_t *iop; if (rtems_libio_number_iops > 0) 1071af: a1 64 f8 11 00 mov 0x11f864,%eax 1071b4: 85 c0 test %eax,%eax 1071b6: 74 40 je 1071f8 <== ALWAYS TAKEN { rtems_libio_iops = (rtems_libio_t *) calloc(rtems_libio_number_iops, 1071b8: 52 push %edx 1071b9: 52 push %edx 1071ba: 6a 40 push $0x40 1071bc: 50 push %eax 1071bd: e8 be 68 00 00 call 10da80 <== ALWAYS TAKEN 1071c2: a3 18 37 12 00 mov %eax,0x123718 sizeof(rtems_libio_t)); if (rtems_libio_iops == NULL) 1071c7: 83 c4 10 add $0x10,%esp 1071ca: 85 c0 test %eax,%eax 1071cc: 75 07 jne 1071d5 <== NEVER TAKEN rtems_fatal_error_occurred(RTEMS_NO_MEMORY); 1071ce: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1071d1: 6a 1a push $0x1a <== NOT EXECUTED 1071d3: eb 46 jmp 10721b <== NOT EXECUTED iop = rtems_libio_iop_freelist = rtems_libio_iops; 1071d5: a3 1c 37 12 00 mov %eax,0x12371c for (i = 0 ; (i + 1) < rtems_libio_number_iops ; i++, iop++) 1071da: 8b 1d 64 f8 11 00 mov 0x11f864,%ebx 1071e0: 31 d2 xor %edx,%edx 1071e2: eb 03 jmp 1071e7 <== ALWAYS TAKEN iop->data1 = iop + 1; 1071e4: 89 40 f4 mov %eax,-0xc(%eax) 1071e7: 89 c1 mov %eax,%ecx 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++) 1071e9: 42 inc %edx 1071ea: 83 c0 40 add $0x40,%eax 1071ed: 39 da cmp %ebx,%edx 1071ef: 72 f3 jb 1071e4 iop->data1 = iop + 1; iop->data1 = NULL; 1071f1: c7 41 34 00 00 00 00 movl $0x0,0x34(%ecx) /* * Create the binary semaphore used to provide mutual exclusion * on the IOP Table. */ rc = rtems_semaphore_create( 1071f8: 83 ec 0c sub $0xc,%esp 1071fb: 68 20 37 12 00 push $0x123720 107200: 6a 00 push $0x0 107202: 6a 54 push $0x54 107204: 6a 01 push $0x1 107206: 68 4f 49 42 4c push $0x4c42494f 10720b: e8 f0 2a 00 00 call 109d00 1, RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &rtems_libio_semaphore ); if ( rc != RTEMS_SUCCESSFUL ) 107210: 83 c4 20 add $0x20,%esp 107213: 85 c0 test %eax,%eax 107215: 74 09 je 107220 <== NEVER TAKEN rtems_fatal_error_occurred( rc ); 107217: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10721a: 50 push %eax <== NOT EXECUTED 10721b: e8 c4 32 00 00 call 10a4e4 <== NOT EXECUTED /* * Initialize the base file system infrastructure. */ if (rtems_fs_init_helper) 107220: a1 60 f8 11 00 mov 0x11f860,%eax 107225: 85 c0 test %eax,%eax 107227: 74 06 je 10722f <== ALWAYS TAKEN (* rtems_fs_init_helper)(); } 107229: 8b 5d fc mov -0x4(%ebp),%ebx 10722c: c9 leave /* * Initialize the base file system infrastructure. */ if (rtems_fs_init_helper) (* rtems_fs_init_helper)(); 10722d: ff e0 jmp *%eax } 10722f: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 107232: c9 leave <== NOT EXECUTED 107233: c3 ret <== NOT EXECUTED 0010dca2 : */ int rtems_libio_is_file_open( void *node_access ) { 10dca2: 55 push %ebp 10dca3: 89 e5 mov %esp,%ebp 10dca5: 53 push %ebx 10dca6: 83 ec 08 sub $0x8,%esp 10dca9: 8b 5d 08 mov 0x8(%ebp),%ebx rtems_libio_t *iop; int result=0; uint32_t i; rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT ); 10dcac: 6a 00 push $0x0 10dcae: 6a 00 push $0x0 10dcb0: ff 35 20 37 12 00 pushl 0x123720 10dcb6: e8 71 c2 ff ff call 109f2c /* * Look for any active file descriptor entry. */ for (iop=rtems_libio_iops,i=0; i < rtems_libio_number_iops; iop++, i++){ 10dcbb: a1 18 37 12 00 mov 0x123718,%eax 10dcc0: 8b 0d 64 f8 11 00 mov 0x11f864,%ecx 10dcc6: 31 d2 xor %edx,%edx 10dcc8: 83 c4 10 add $0x10,%esp 10dccb: eb 16 jmp 10dce3 <== ALWAYS TAKEN if ((iop->flags & LIBIO_FLAGS_OPEN) != 0) { 10dccd: f6 40 15 01 testb $0x1,0x15(%eax) 10dcd1: 74 0c je 10dcdf /* * Check if this node is under the file system that we * are trying to dismount. */ if ( iop->pathinfo.node_access == node_access ) { 10dcd3: 39 58 18 cmp %ebx,0x18(%eax) 10dcd6: 75 07 jne 10dcdf 10dcd8: bb 01 00 00 00 mov $0x1,%ebx 10dcdd: eb 0a jmp 10dce9 <== ALWAYS TAKEN /* * Look for any active file descriptor entry. */ for (iop=rtems_libio_iops,i=0; i < rtems_libio_number_iops; iop++, i++){ 10dcdf: 83 c0 40 add $0x40,%eax 10dce2: 42 inc %edx 10dce3: 39 ca cmp %ecx,%edx 10dce5: 72 e6 jb 10dccd 10dce7: 31 db xor %ebx,%ebx break; } } } rtems_semaphore_release( rtems_libio_semaphore ); 10dce9: 83 ec 0c sub $0xc,%esp 10dcec: ff 35 20 37 12 00 pushl 0x123720 10dcf2: e8 21 c3 ff ff call 10a018 return result; } 10dcf7: 89 d8 mov %ebx,%eax 10dcf9: 8b 5d fc mov -0x4(%ebp),%ebx 10dcfc: c9 leave 10dcfd: c3 ret 0010dcfe : */ int rtems_libio_is_open_files_in_fs( rtems_filesystem_mount_table_entry_t * fs_mt_entry ) { 10dcfe: 55 push %ebp 10dcff: 89 e5 mov %esp,%ebp 10dd01: 53 push %ebx 10dd02: 83 ec 08 sub $0x8,%esp 10dd05: 8b 5d 08 mov 0x8(%ebp),%ebx rtems_libio_t *iop; int result = 0; uint32_t i; rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT ); 10dd08: 6a 00 push $0x0 10dd0a: 6a 00 push $0x0 10dd0c: ff 35 20 37 12 00 pushl 0x123720 10dd12: e8 15 c2 ff ff call 109f2c /* * Look for any active file descriptor entry. */ for (iop=rtems_libio_iops,i=0; i < rtems_libio_number_iops; iop++, i++){ 10dd17: a1 18 37 12 00 mov 0x123718,%eax 10dd1c: 8b 0d 64 f8 11 00 mov 0x11f864,%ecx 10dd22: 31 d2 xor %edx,%edx 10dd24: 83 c4 10 add $0x10,%esp 10dd27: eb 16 jmp 10dd3f <== ALWAYS TAKEN if ((iop->flags & LIBIO_FLAGS_OPEN) != 0) { 10dd29: f6 40 15 01 testb $0x1,0x15(%eax) 10dd2d: 74 0c je 10dd3b /* * Check if this node is under the file system that we * are trying to dismount. */ if ( iop->pathinfo.mt_entry == fs_mt_entry ) { 10dd2f: 39 58 28 cmp %ebx,0x28(%eax) 10dd32: 75 07 jne 10dd3b 10dd34: bb 01 00 00 00 mov $0x1,%ebx 10dd39: eb 0a jmp 10dd45 <== ALWAYS TAKEN /* * Look for any active file descriptor entry. */ for (iop=rtems_libio_iops,i=0; i < rtems_libio_number_iops; iop++, i++){ 10dd3b: 83 c0 40 add $0x40,%eax 10dd3e: 42 inc %edx 10dd3f: 39 ca cmp %ecx,%edx 10dd41: 72 e6 jb 10dd29 10dd43: 31 db xor %ebx,%ebx break; } } } rtems_semaphore_release( rtems_libio_semaphore ); 10dd45: 83 ec 0c sub $0xc,%esp 10dd48: ff 35 20 37 12 00 pushl 0x123720 10dd4e: e8 c5 c2 ff ff call 10a018 return result; } 10dd53: 89 d8 mov %ebx,%eax 10dd55: 8b 5d fc mov -0x4(%ebp),%ebx 10dd58: c9 leave 10dd59: c3 ret 001264e0 : rtems_filesystem_freenode( &env->root_directory); free(env); } } rtems_status_code rtems_libio_set_private_env(void) { 1264e0: 55 push %ebp 1264e1: 89 e5 mov %esp,%ebp 1264e3: 57 push %edi 1264e4: 56 push %esi 1264e5: 53 push %ebx 1264e6: 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); 1264e9: 8d 45 e4 lea -0x1c(%ebp),%eax 1264ec: 50 push %eax 1264ed: 6a 00 push $0x0 1264ef: 6a 00 push $0x0 1264f1: e8 1e 0d 00 00 call 127214 1264f6: 89 45 c4 mov %eax,-0x3c(%ebp) if (sc != RTEMS_SUCCESSFUL) return sc; 1264f9: 83 c4 10 add $0x10,%esp 1264fc: 85 c0 test %eax,%eax 1264fe: 0f 85 da 00 00 00 jne 1265de <== ALWAYS TAKEN /* Only for the first time a malloc is necesary */ if (rtems_current_user_env==&rtems_global_user_env) { 126504: 81 3d 78 db 15 00 4c cmpl $0x16344c,0x15db78 12650b: 34 16 00 12650e: 75 54 jne 126564 rtems_user_env_t *tmp = malloc(sizeof(rtems_user_env_t)); 126510: 83 ec 0c sub $0xc,%esp 126513: 6a 48 push $0x48 126515: e8 96 57 fe ff call 10bcb0 12651a: 89 c3 mov %eax,%ebx if (!tmp) 12651c: 83 c4 10 add $0x10,%esp 12651f: 85 c0 test %eax,%eax 126521: 75 0c jne 12652f <== NEVER TAKEN 126523: c7 45 c4 1a 00 00 00 movl $0x1a,-0x3c(%ebp) <== NOT EXECUTED 12652a: e9 af 00 00 00 jmp 1265de <== NOT EXECUTED #ifdef HAVE_USERENV_REFCNT tmp->refcnt = 1; #endif sc = rtems_task_variable_add(RTEMS_SELF,(void*)&rtems_current_user_env,(void(*)(void *))free_user_env); 12652f: 56 push %esi 126530: 68 f4 63 12 00 push $0x1263f4 126535: 68 78 db 15 00 push $0x15db78 12653a: 6a 00 push $0x0 12653c: e8 77 10 00 00 call 1275b8 126541: 89 c6 mov %eax,%esi if (sc != RTEMS_SUCCESSFUL) { 126543: 83 c4 10 add $0x10,%esp 126546: 85 c0 test %eax,%eax 126548: 74 14 je 12655e <== NEVER TAKEN /* don't use free_user_env because the pathlocs are * not initialized yet */ free(tmp); 12654a: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12654d: 53 push %ebx <== NOT EXECUTED 12654e: e8 71 52 fe ff call 10b7c4 <== NOT EXECUTED 126553: 89 75 c4 mov %esi,-0x3c(%ebp) <== NOT EXECUTED return sc; 126556: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 126559: e9 80 00 00 00 jmp 1265de <== NOT EXECUTED } rtems_current_user_env = tmp; 12655e: 89 1d 78 db 15 00 mov %ebx,0x15db78 }; *rtems_current_user_env = rtems_global_user_env; /* get the global values*/ 126564: a1 78 db 15 00 mov 0x15db78,%eax 126569: be 4c 34 16 00 mov $0x16344c,%esi 12656e: b9 12 00 00 00 mov $0x12,%ecx 126573: 89 c7 mov %eax,%edi 126575: f3 a5 rep movsl %ds:(%esi),%es:(%edi) rtems_current_user_env->task_id=task_id; /* mark the local values*/ 126577: 8b 55 e4 mov -0x1c(%ebp),%edx 12657a: 89 10 mov %edx,(%eax) /* get a clean root */ rtems_filesystem_root = THE_ROOT_FS_LOC; 12657c: 8d 78 18 lea 0x18(%eax),%edi 12657f: 8b 35 34 34 16 00 mov 0x163434,%esi 126585: 83 c6 1c add $0x1c,%esi 126588: b1 05 mov $0x5,%cl 12658a: f3 a5 rep movsl %ds:(%esi),%es:(%edi) * code we must _not_ free the original locs because * what we are trying to do here is forking off * clones. */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 12658c: 83 ec 0c sub $0xc,%esp 12658f: 6a 00 push $0x0 126591: 8d 5d d0 lea -0x30(%ebp),%ebx 126594: 53 push %ebx 126595: 6a 00 push $0x0 126597: 6a 01 push $0x1 126599: 68 a6 9d 15 00 push $0x159da6 12659e: e8 79 51 fe ff call 10b71c rtems_filesystem_root = loc; 1265a3: 8b 3d 78 db 15 00 mov 0x15db78,%edi 1265a9: 83 c7 18 add $0x18,%edi 1265ac: b9 05 00 00 00 mov $0x5,%ecx 1265b1: 89 de mov %ebx,%esi 1265b3: f3 a5 rep movsl %ds:(%esi),%es:(%edi) rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 1265b5: 83 c4 14 add $0x14,%esp 1265b8: 6a 00 push $0x0 1265ba: 53 push %ebx 1265bb: 6a 00 push $0x0 1265bd: 6a 01 push $0x1 1265bf: 68 a6 9d 15 00 push $0x159da6 1265c4: e8 53 51 fe ff call 10b71c rtems_filesystem_current = loc; 1265c9: 8b 3d 78 db 15 00 mov 0x15db78,%edi 1265cf: 83 c7 04 add $0x4,%edi 1265d2: b9 05 00 00 00 mov $0x5,%ecx 1265d7: 89 de mov %ebx,%esi 1265d9: f3 a5 rep movsl %ds:(%esi),%es:(%edi) return RTEMS_SUCCESSFUL; 1265db: 83 c4 20 add $0x20,%esp } 1265de: 8b 45 c4 mov -0x3c(%ebp),%eax 1265e1: 8d 65 f4 lea -0xc(%ebp),%esp 1265e4: 5b pop %ebx 1265e5: 5e pop %esi 1265e6: 5f pop %edi 1265e7: c9 leave 1265e8: c3 ret 0012644b : * b) mutex access to rtems_filesystem_current, rtems_filesytem_root * while changing any of those (chdir(), chroot()). */ #ifndef HAVE_USERENV_REFCNT rtems_status_code rtems_libio_share_private_env(rtems_id task_id) { 12644b: 55 push %ebp <== NOT EXECUTED 12644c: 89 e5 mov %esp,%ebp <== NOT EXECUTED 12644e: 53 push %ebx <== NOT EXECUTED 12644f: 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); 126452: 8d 45 f0 lea -0x10(%ebp),%eax <== NOT EXECUTED 126455: 50 push %eax <== NOT EXECUTED 126456: 6a 00 push $0x0 <== NOT EXECUTED 126458: 6a 00 push $0x0 <== NOT EXECUTED 12645a: e8 b5 0d 00 00 call 127214 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) return sc; 12645f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 126462: 85 c0 test %eax,%eax <== NOT EXECUTED 126464: 75 75 jne 1264db <== NOT EXECUTED if (rtems_current_user_env->task_id==current_task_id) { 126466: 8b 1d 78 db 15 00 mov 0x15db78,%ebx <== NOT EXECUTED 12646c: 8b 03 mov (%ebx),%eax <== NOT EXECUTED 12646e: 3b 45 f0 cmp -0x10(%ebp),%eax <== NOT EXECUTED 126471: 75 21 jne 126494 <== 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); 126473: 51 push %ecx <== NOT EXECUTED 126474: 51 push %ecx <== NOT EXECUTED 126475: 68 78 db 15 00 push $0x15db78 <== NOT EXECUTED 12647a: 6a 00 push $0x0 <== NOT EXECUTED 12647c: e8 cb 11 00 00 call 12764c <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) return sc; 126481: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 126484: 85 c0 test %eax,%eax <== NOT EXECUTED 126486: 75 53 jne 1264db <== NOT EXECUTED free_user_env(tmp); 126488: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12648b: 53 push %ebx <== NOT EXECUTED 12648c: e8 63 ff ff ff call 1263f4 <== NOT EXECUTED 126491: 83 c4 10 add $0x10,%esp <== NOT EXECUTED }; /* AT THIS POINT, rtems_current_user_env is DANGLING */ sc = rtems_task_variable_get(task_id,(void*)&rtems_current_user_env, 126494: 52 push %edx <== NOT EXECUTED 126495: 8d 45 f4 lea -0xc(%ebp),%eax <== NOT EXECUTED 126498: 50 push %eax <== NOT EXECUTED 126499: 68 78 db 15 00 push $0x15db78 <== NOT EXECUTED 12649e: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED 1264a1: e8 22 12 00 00 call 1276c8 <== NOT EXECUTED (void*)&shared_user_env ); if (sc != RTEMS_SUCCESSFUL) 1264a6: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 1264a9: 85 c0 test %eax,%eax <== NOT EXECUTED 1264ab: 75 24 jne 1264d1 <== NOT EXECUTED goto bailout; sc = rtems_task_variable_add(RTEMS_SELF,(void*)&rtems_current_user_env,free_user_env); 1264ad: 50 push %eax <== NOT EXECUTED 1264ae: 68 f4 63 12 00 push $0x1263f4 <== NOT EXECUTED 1264b3: 68 78 db 15 00 push $0x15db78 <== NOT EXECUTED 1264b8: 6a 00 push $0x0 <== NOT EXECUTED 1264ba: e8 f9 10 00 00 call 1275b8 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 1264bf: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 1264c2: 85 c0 test %eax,%eax <== NOT EXECUTED 1264c4: 75 0b jne 1264d1 <== NOT EXECUTED goto bailout; /* the current_user_env is the same pointer that remote env */ rtems_current_user_env = shared_user_env; 1264c6: 8b 55 f4 mov -0xc(%ebp),%edx <== NOT EXECUTED 1264c9: 89 15 78 db 15 00 mov %edx,0x15db78 <== NOT EXECUTED /* increase the reference count */ #ifdef HAVE_USERENV_REFCNT rtems_current_user_env->refcnt++; #endif return RTEMS_SUCCESSFUL; 1264cf: eb 0a jmp 1264db <== NOT EXECUTED bailout: /* fallback to the global env */ rtems_current_user_env = &rtems_global_user_env; 1264d1: c7 05 78 db 15 00 4c movl $0x16344c,0x15db78 <== NOT EXECUTED 1264d8: 34 16 00 <== NOT EXECUTED return sc; } 1264db: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 1264de: c9 leave <== NOT EXECUTED 1264df: c3 ret <== NOT EXECUTED 0010dc64 : */ uint32_t rtems_libio_to_fcntl_flags( uint32_t flags ) { 10dc64: 55 push %ebp 10dc65: 89 e5 mov %esp,%ebp 10dc67: 8b 55 08 mov 0x8(%ebp),%edx uint32_t fcntl_flags = 0; if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) { 10dc6a: 89 d1 mov %edx,%ecx 10dc6c: 83 e1 06 and $0x6,%ecx 10dc6f: b8 02 00 00 00 mov $0x2,%eax 10dc74: 83 f9 06 cmp $0x6,%ecx 10dc77: 74 0f je 10dc88 <== ALWAYS TAKEN fcntl_flags |= O_RDWR; } else if ( (flags & LIBIO_FLAGS_READ) == LIBIO_FLAGS_READ) { 10dc79: 30 c0 xor %al,%al 10dc7b: f6 c2 02 test $0x2,%dl 10dc7e: 75 08 jne 10dc88 <== NEVER TAKEN 10dc80: 89 d0 mov %edx,%eax <== NOT EXECUTED 10dc82: c1 e8 02 shr $0x2,%eax <== NOT EXECUTED 10dc85: 83 e0 01 and $0x1,%eax <== 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 ) { 10dc88: f6 c2 01 test $0x1,%dl 10dc8b: 74 03 je 10dc90 fcntl_flags |= O_NONBLOCK; 10dc8d: 80 cc 40 or $0x40,%ah } if ( (flags & LIBIO_FLAGS_APPEND) == LIBIO_FLAGS_APPEND ) { 10dc90: f6 c6 02 test $0x2,%dh 10dc93: 74 03 je 10dc98 fcntl_flags |= O_APPEND; 10dc95: 83 c8 08 or $0x8,%eax } if ( (flags & LIBIO_FLAGS_CREATE) == LIBIO_FLAGS_CREATE ) { 10dc98: 80 e6 04 and $0x4,%dh 10dc9b: 74 03 je 10dca0 fcntl_flags |= O_CREAT; 10dc9d: 80 cc 02 or $0x2,%ah } return fcntl_flags; } 10dca0: c9 leave 10dca1: c3 ret 0010bd54 : * size and thus we skip updating the statistics. */ static void rtems_malloc_statistics_at_free( void *pointer ) { 10bd54: 55 push %ebp <== NOT EXECUTED 10bd55: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10bd57: 83 ec 1c sub $0x1c,%esp <== NOT EXECUTED uintptr_t size; if (_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &size) ) { 10bd5a: 8d 45 f4 lea -0xc(%ebp),%eax <== NOT EXECUTED 10bd5d: 50 push %eax <== NOT EXECUTED 10bd5e: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED 10bd61: ff 35 50 bb 15 00 pushl 0x15bb50 <== NOT EXECUTED 10bd67: e8 a8 51 00 00 call 110f14 <_Protected_heap_Get_block_size> <== NOT EXECUTED 10bd6c: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10bd6f: 84 c0 test %al,%al <== NOT EXECUTED 10bd71: 74 11 je 10bd84 <== NOT EXECUTED MSBUMP(lifetime_freed, size); 10bd73: 8b 45 f4 mov -0xc(%ebp),%eax <== NOT EXECUTED 10bd76: 31 d2 xor %edx,%edx <== NOT EXECUTED 10bd78: 01 05 2c 34 16 00 add %eax,0x16342c <== NOT EXECUTED 10bd7e: 11 15 30 34 16 00 adc %edx,0x163430 <== NOT EXECUTED } } 10bd84: c9 leave <== NOT EXECUTED 10bd85: c3 ret <== NOT EXECUTED 0010bd86 : } static void rtems_malloc_statistics_at_malloc( void *pointer ) { 10bd86: 55 push %ebp <== NOT EXECUTED 10bd87: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10bd89: 83 ec 18 sub $0x18,%esp <== NOT EXECUTED 10bd8c: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED uintptr_t actual_size = 0; uint32_t current_depth; rtems_malloc_statistics_t *s = &rtems_malloc_statistics; if ( !pointer ) 10bd8f: 85 c0 test %eax,%eax <== NOT EXECUTED 10bd91: 74 4a je 10bddd <== NOT EXECUTED static void rtems_malloc_statistics_at_malloc( void *pointer ) { uintptr_t actual_size = 0; 10bd93: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp) <== NOT EXECUTED rtems_malloc_statistics_t *s = &rtems_malloc_statistics; if ( !pointer ) return; _Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &actual_size); 10bd9a: 52 push %edx <== NOT EXECUTED 10bd9b: 8d 55 f4 lea -0xc(%ebp),%edx <== NOT EXECUTED 10bd9e: 52 push %edx <== NOT EXECUTED 10bd9f: 50 push %eax <== NOT EXECUTED 10bda0: ff 35 50 bb 15 00 pushl 0x15bb50 <== NOT EXECUTED 10bda6: e8 69 51 00 00 call 110f14 <_Protected_heap_Get_block_size> <== NOT EXECUTED MSBUMP(lifetime_allocated, actual_size); 10bdab: 8b 45 f4 mov -0xc(%ebp),%eax <== NOT EXECUTED 10bdae: 31 d2 xor %edx,%edx <== NOT EXECUTED 10bdb0: 03 05 24 34 16 00 add 0x163424,%eax <== NOT EXECUTED 10bdb6: 13 15 28 34 16 00 adc 0x163428,%edx <== NOT EXECUTED 10bdbc: a3 24 34 16 00 mov %eax,0x163424 <== NOT EXECUTED 10bdc1: 89 15 28 34 16 00 mov %edx,0x163428 <== NOT EXECUTED current_depth = (uint32_t) (s->lifetime_allocated - s->lifetime_freed); 10bdc7: 2b 05 2c 34 16 00 sub 0x16342c,%eax <== NOT EXECUTED if (current_depth > s->max_depth) 10bdcd: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10bdd0: 3b 05 20 34 16 00 cmp 0x163420,%eax <== NOT EXECUTED 10bdd6: 76 05 jbe 10bddd <== NOT EXECUTED s->max_depth = current_depth; 10bdd8: a3 20 34 16 00 mov %eax,0x163420 <== NOT EXECUTED } 10bddd: c9 leave <== NOT EXECUTED 10bdde: c3 ret <== NOT EXECUTED 0010bddf : #include #include static void rtems_malloc_statistics_initialize( void ) { 10bddf: 55 push %ebp <== NOT EXECUTED 10bde0: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10bde2: 57 push %edi <== NOT EXECUTED /* * Zero all the statistics */ (void) memset(&rtems_malloc_statistics, 0, sizeof(rtems_malloc_statistics)); 10bde3: ba 08 34 16 00 mov $0x163408,%edx <== NOT EXECUTED 10bde8: b9 0b 00 00 00 mov $0xb,%ecx <== NOT EXECUTED 10bded: 31 c0 xor %eax,%eax <== NOT EXECUTED 10bdef: 89 d7 mov %edx,%edi <== NOT EXECUTED 10bdf1: f3 ab rep stos %eax,%es:(%edi) <== NOT EXECUTED } 10bdf3: 5f pop %edi <== NOT EXECUTED 10bdf4: c9 leave <== NOT EXECUTED 10bdf5: c3 ret <== NOT EXECUTED 00112078 : int rtems_memalign( void **pointer, size_t alignment, size_t size ) { 112078: 55 push %ebp 112079: 89 e5 mov %esp,%ebp 11207b: 56 push %esi 11207c: 53 push %ebx 11207d: 8b 5d 08 mov 0x8(%ebp),%ebx void *return_this; /* * Parameter error checks */ if ( !pointer ) 112080: 85 db test %ebx,%ebx 112082: 74 57 je 1120db return EINVAL; *pointer = NULL; 112084: 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()) && 11208a: 83 3d 8c 85 12 00 03 cmpl $0x3,0x12858c 112091: 75 09 jne 11209c <== ALWAYS TAKEN 112093: e8 7c 63 ff ff call 108414 <== ALWAYS TAKEN 112098: 84 c0 test %al,%al 11209a: 74 3f je 1120db <== ALWAYS TAKEN /* * * If some free's have been deferred, then do them now. */ malloc_deferred_frees_process(); 11209c: e8 c9 63 ff ff call 10846a <== ALWAYS TAKEN uintptr_t size, uintptr_t alignment ) { return _Protected_heap_Allocate_aligned_with_boundary( heap, size, alignment, 0 ); 1120a1: 6a 00 push $0x0 1120a3: ff 75 0c pushl 0xc(%ebp) 1120a6: ff 75 10 pushl 0x10(%ebp) 1120a9: ff 35 30 43 12 00 pushl 0x124330 1120af: e8 60 ab ff ff call 10cc14 <_Protected_heap_Allocate_aligned_with_boundary> 1120b4: 89 c6 mov %eax,%esi return_this = _Protected_heap_Allocate_aligned( RTEMS_Malloc_Heap, size, alignment ); if ( !return_this ) 1120b6: 83 c4 10 add $0x10,%esp 1120b9: b8 0c 00 00 00 mov $0xc,%eax 1120be: 85 f6 test %esi,%esi 1120c0: 74 1e je 1120e0 return ENOMEM; /* * If configured, update the more involved statistics */ if ( rtems_malloc_statistics_helpers ) 1120c2: a1 b0 66 12 00 mov 0x1266b0,%eax 1120c7: 85 c0 test %eax,%eax 1120c9: 74 0a je 1120d5 <== NEVER TAKEN (*rtems_malloc_statistics_helpers->at_malloc)(pointer); 1120cb: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1120ce: 53 push %ebx <== NOT EXECUTED 1120cf: ff 50 04 call *0x4(%eax) <== NOT EXECUTED 1120d2: 83 c4 10 add $0x10,%esp <== NOT EXECUTED */ if (rtems_malloc_boundary_helpers) (*rtems_malloc_boundary_helpers->at_malloc)(return_this, size); #endif *pointer = return_this; 1120d5: 89 33 mov %esi,(%ebx) 1120d7: 31 c0 xor %eax,%eax return 0; 1120d9: eb 05 jmp 1120e0 <== ALWAYS TAKEN 1120db: b8 16 00 00 00 mov $0x16,%eax } 1120e0: 8d 65 f8 lea -0x8(%ebp),%esp 1120e3: 5b pop %ebx 1120e4: 5e pop %esi 1120e5: c9 leave 1120e6: c3 ret 00113e58 : rtems_id id, const void *buffer, size_t size, uint32_t *count ) { 113e58: 55 push %ebp 113e59: 89 e5 mov %esp,%ebp 113e5b: 57 push %edi 113e5c: 56 push %esi 113e5d: 53 push %ebx 113e5e: 83 ec 1c sub $0x1c,%esp 113e61: 8b 75 08 mov 0x8(%ebp),%esi 113e64: 8b 5d 0c mov 0xc(%ebp),%ebx 113e67: 8b 7d 14 mov 0x14(%ebp),%edi register Message_queue_Control *the_message_queue; Objects_Locations location; CORE_message_queue_Status core_status; if ( !buffer ) 113e6a: 85 db test %ebx,%ebx 113e6c: 74 4f je 113ebd return RTEMS_INVALID_ADDRESS; if ( !count ) 113e6e: 85 ff test %edi,%edi 113e70: 74 4b je 113ebd RTEMS_INLINE_ROUTINE Message_queue_Control *_Message_queue_Get ( Objects_Id id, Objects_Locations *location ) { return (Message_queue_Control *) 113e72: 52 push %edx 113e73: 8d 45 e4 lea -0x1c(%ebp),%eax 113e76: 50 push %eax 113e77: 56 push %esi 113e78: 68 48 cd 13 00 push $0x13cd48 113e7d: e8 0a 44 00 00 call 11828c <_Objects_Get> 113e82: 89 c2 mov %eax,%edx return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { 113e84: 83 c4 10 add $0x10,%esp 113e87: b8 04 00 00 00 mov $0x4,%eax 113e8c: 83 7d e4 00 cmpl $0x0,-0x1c(%ebp) 113e90: 75 30 jne 113ec2 case OBJECTS_LOCAL: core_status = _CORE_message_queue_Broadcast( 113e92: 50 push %eax 113e93: 50 push %eax 113e94: 57 push %edi 113e95: 6a 00 push $0x0 113e97: 56 push %esi 113e98: ff 75 10 pushl 0x10(%ebp) 113e9b: 53 push %ebx 113e9c: 8d 42 14 lea 0x14(%edx),%eax 113e9f: 50 push %eax 113ea0: e8 cb 2e 00 00 call 116d70 <_CORE_message_queue_Broadcast> <== ALWAYS TAKEN 113ea5: 89 c3 mov %eax,%ebx NULL, #endif count ); _Thread_Enable_dispatch(); 113ea7: 83 c4 20 add $0x20,%esp 113eaa: e8 0e 4c 00 00 call 118abd <_Thread_Enable_dispatch> return _Message_queue_Translate_core_message_queue_return_code( core_status ); 113eaf: 83 ec 0c sub $0xc,%esp 113eb2: 53 push %ebx 113eb3: e8 f8 02 00 00 call 1141b0 <_Message_queue_Translate_core_message_queue_return_code> <== ALWAYS TAKEN #endif count ); _Thread_Enable_dispatch(); return 113eb8: 83 c4 10 add $0x10,%esp 113ebb: eb 05 jmp 113ec2 <== ALWAYS TAKEN 113ebd: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 113ec2: 8d 65 f4 lea -0xc(%ebp),%esp 113ec5: 5b pop %ebx 113ec6: 5e pop %esi 113ec7: 5f pop %edi 113ec8: c9 leave 113ec9: c3 ret 00111228 : uint32_t count, size_t max_message_size, rtems_attribute attribute_set, rtems_id *id ) { 111228: 55 push %ebp 111229: 89 e5 mov %esp,%ebp 11122b: 57 push %edi 11122c: 56 push %esi 11122d: 53 push %ebx 11122e: 83 ec 2c sub $0x2c,%esp 111231: 8b 75 08 mov 0x8(%ebp),%esi 111234: 8b 7d 0c mov 0xc(%ebp),%edi 111237: 8b 55 10 mov 0x10(%ebp),%edx CORE_message_queue_Attributes the_msgq_attributes; #if defined(RTEMS_MULTIPROCESSING) bool is_global; #endif if ( !rtems_is_name_valid( name ) ) 11123a: b8 03 00 00 00 mov $0x3,%eax 11123f: 85 f6 test %esi,%esi 111241: 0f 84 a9 00 00 00 je 1112f0 return RTEMS_INVALID_NAME; if ( !id ) 111247: b0 09 mov $0x9,%al 111249: 83 7d 18 00 cmpl $0x0,0x18(%ebp) 11124d: 0f 84 9d 00 00 00 je 1112f0 if ( (is_global = _Attributes_Is_global( attribute_set ) ) && !_System_state_Is_multiprocessing ) return RTEMS_MP_NOT_CONFIGURED; #endif if ( count == 0 ) 111253: b0 0a mov $0xa,%al 111255: 85 ff test %edi,%edi 111257: 0f 84 93 00 00 00 je 1112f0 return RTEMS_INVALID_NUMBER; if ( max_message_size == 0 ) 11125d: b0 08 mov $0x8,%al 11125f: 85 d2 test %edx,%edx 111261: 0f 84 89 00 00 00 je 1112f0 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 111267: a1 bc b2 12 00 mov 0x12b2bc,%eax 11126c: 40 inc %eax 11126d: a3 bc b2 12 00 mov %eax,0x12b2bc #endif #endif _Thread_Disable_dispatch(); /* protects object pointer */ the_message_queue = _Message_queue_Allocate(); 111272: 89 55 d4 mov %edx,-0x2c(%ebp) 111275: e8 92 48 00 00 call 115b0c <_Message_queue_Allocate> 11127a: 89 c3 mov %eax,%ebx if ( !the_message_queue ) { 11127c: 85 c0 test %eax,%eax 11127e: 8b 55 d4 mov -0x2c(%ebp),%edx 111281: 75 0c jne 11128f _Thread_Enable_dispatch(); 111283: e8 b1 24 00 00 call 113739 <_Thread_Enable_dispatch> 111288: b8 05 00 00 00 mov $0x5,%eax return RTEMS_TOO_MANY; 11128d: eb 61 jmp 1112f0 <== ALWAYS TAKEN _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } #endif the_message_queue->attribute_set = attribute_set; 11128f: 8b 45 14 mov 0x14(%ebp),%eax 111292: 89 43 10 mov %eax,0x10(%ebx) if (_Attributes_Is_priority( attribute_set ) ) the_msgq_attributes.discipline = CORE_MESSAGE_QUEUE_DISCIPLINES_PRIORITY; 111295: a8 04 test $0x4,%al 111297: 0f 95 c0 setne %al 11129a: 0f b6 c0 movzbl %al,%eax 11129d: 89 45 e4 mov %eax,-0x1c(%ebp) else the_msgq_attributes.discipline = CORE_MESSAGE_QUEUE_DISCIPLINES_FIFO; if ( ! _CORE_message_queue_Initialize( 1112a0: 52 push %edx 1112a1: 57 push %edi 1112a2: 8d 45 e4 lea -0x1c(%ebp),%eax 1112a5: 50 push %eax 1112a6: 8d 43 14 lea 0x14(%ebx),%eax 1112a9: 50 push %eax 1112aa: e8 05 0f 00 00 call 1121b4 <_CORE_message_queue_Initialize> <== ALWAYS TAKEN 1112af: 83 c4 10 add $0x10,%esp 1112b2: 84 c0 test %al,%al 1112b4: 75 1c jne 1112d2 */ RTEMS_INLINE_ROUTINE void _Message_queue_Free ( Message_queue_Control *the_message_queue ) { _Objects_Free( &_Message_queue_Information, &the_message_queue->Object ); 1112b6: 50 push %eax 1112b7: 50 push %eax 1112b8: 53 push %ebx 1112b9: 68 14 b5 12 00 push $0x12b514 1112be: e8 09 1b 00 00 call 112dcc <_Objects_Free> _Objects_MP_Close( &_Message_queue_Information, the_message_queue->Object.id); #endif _Message_queue_Free( the_message_queue ); _Thread_Enable_dispatch(); 1112c3: e8 71 24 00 00 call 113739 <_Thread_Enable_dispatch> 1112c8: b8 0d 00 00 00 mov $0xd,%eax return RTEMS_UNSATISFIED; 1112cd: 83 c4 10 add $0x10,%esp 1112d0: eb 1e jmp 1112f0 <== ALWAYS TAKEN #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 1112d2: 8b 43 08 mov 0x8(%ebx),%eax 1112d5: 0f b7 c8 movzwl %ax,%ecx 1112d8: 8b 15 30 b5 12 00 mov 0x12b530,%edx 1112de: 89 1c 8a mov %ebx,(%edx,%ecx,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 1112e1: 89 73 0c mov %esi,0xc(%ebx) &_Message_queue_Information, &the_message_queue->Object, (Objects_Name) name ); *id = the_message_queue->Object.id; 1112e4: 8b 55 18 mov 0x18(%ebp),%edx 1112e7: 89 02 mov %eax,(%edx) name, 0 ); #endif _Thread_Enable_dispatch(); 1112e9: e8 4b 24 00 00 call 113739 <_Thread_Enable_dispatch> 1112ee: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; } 1112f0: 8d 65 f4 lea -0xc(%ebp),%esp 1112f3: 5b pop %ebx 1112f4: 5e pop %esi 1112f5: 5f pop %edi 1112f6: c9 leave 1112f7: c3 ret 001137fc : */ rtems_status_code rtems_message_queue_delete( rtems_id id ) { 1137fc: 55 push %ebp 1137fd: 89 e5 mov %esp,%ebp 1137ff: 53 push %ebx 113800: 83 ec 18 sub $0x18,%esp 113803: 8d 45 f4 lea -0xc(%ebp),%eax 113806: 50 push %eax 113807: ff 75 08 pushl 0x8(%ebp) 11380a: 68 08 ed 12 00 push $0x12ed08 11380f: e8 2c b1 ff ff call 10e940 <_Objects_Get> 113814: 89 c3 mov %eax,%ebx register Message_queue_Control *the_message_queue; Objects_Locations location; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { 113816: 83 c4 10 add $0x10,%esp 113819: b8 04 00 00 00 mov $0x4,%eax 11381e: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 113822: 75 34 jne 113858 case OBJECTS_LOCAL: _Objects_Close( &_Message_queue_Information, 113824: 51 push %ecx 113825: 51 push %ecx 113826: 53 push %ebx 113827: 68 08 ed 12 00 push $0x12ed08 11382c: e8 67 ad ff ff call 10e598 <_Objects_Close> &the_message_queue->Object ); _CORE_message_queue_Close( 113831: 83 c4 0c add $0xc,%esp 113834: 6a 05 push $0x5 113836: 6a 00 push $0x0 113838: 8d 43 14 lea 0x14(%ebx),%eax 11383b: 50 push %eax 11383c: e8 bb 04 00 00 call 113cfc <_CORE_message_queue_Close> <== ALWAYS TAKEN */ RTEMS_INLINE_ROUTINE void _Message_queue_Free ( Message_queue_Control *the_message_queue ) { _Objects_Free( &_Message_queue_Information, &the_message_queue->Object ); 113841: 58 pop %eax 113842: 5a pop %edx 113843: 53 push %ebx 113844: 68 08 ed 12 00 push $0x12ed08 113849: e8 ca af ff ff call 10e818 <_Objects_Free> 0, /* Not used */ 0 ); } #endif _Thread_Enable_dispatch(); 11384e: e8 1e b9 ff ff call 10f171 <_Thread_Enable_dispatch> 113853: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 113855: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 113858: 8b 5d fc mov -0x4(%ebp),%ebx 11385b: c9 leave 11385c: c3 ret 00114000 : rtems_status_code rtems_message_queue_flush( rtems_id id, uint32_t *count ) { 114000: 55 push %ebp 114001: 89 e5 mov %esp,%ebp 114003: 53 push %ebx 114004: 83 ec 14 sub $0x14,%esp 114007: 8b 5d 0c mov 0xc(%ebp),%ebx register Message_queue_Control *the_message_queue; Objects_Locations location; if ( !count ) 11400a: b8 09 00 00 00 mov $0x9,%eax 11400f: 85 db test %ebx,%ebx 114011: 74 3a je 11404d RTEMS_INLINE_ROUTINE Message_queue_Control *_Message_queue_Get ( Objects_Id id, Objects_Locations *location ) { return (Message_queue_Control *) 114013: 50 push %eax 114014: 8d 45 f4 lea -0xc(%ebp),%eax 114017: 50 push %eax 114018: ff 75 08 pushl 0x8(%ebp) 11401b: 68 48 cd 13 00 push $0x13cd48 114020: e8 67 42 00 00 call 11828c <_Objects_Get> 114025: 89 c2 mov %eax,%edx return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { 114027: 83 c4 10 add $0x10,%esp 11402a: b8 04 00 00 00 mov $0x4,%eax 11402f: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 114033: 75 18 jne 11404d case OBJECTS_LOCAL: *count = _CORE_message_queue_Flush( &the_message_queue->message_queue ); 114035: 83 ec 0c sub $0xc,%esp 114038: 8d 42 14 lea 0x14(%edx),%eax 11403b: 50 push %eax 11403c: e8 db 2d 00 00 call 116e1c <_CORE_message_queue_Flush> <== ALWAYS TAKEN 114041: 89 03 mov %eax,(%ebx) _Thread_Enable_dispatch(); 114043: e8 75 4a 00 00 call 118abd <_Thread_Enable_dispatch> 114048: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 11404a: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11404d: 8b 5d fc mov -0x4(%ebp),%ebx 114050: c9 leave 114051: c3 ret 0011131c : void *buffer, size_t *size, rtems_option option_set, rtems_interval timeout ) { 11131c: 55 push %ebp 11131d: 89 e5 mov %esp,%ebp 11131f: 56 push %esi 111320: 53 push %ebx 111321: 83 ec 10 sub $0x10,%esp 111324: 8b 5d 0c mov 0xc(%ebp),%ebx 111327: 8b 75 10 mov 0x10(%ebp),%esi register Message_queue_Control *the_message_queue; Objects_Locations location; bool wait; if ( !buffer ) 11132a: 85 db test %ebx,%ebx 11132c: 74 60 je 11138e return RTEMS_INVALID_ADDRESS; if ( !size ) 11132e: 85 f6 test %esi,%esi 111330: 74 5c je 11138e RTEMS_INLINE_ROUTINE Message_queue_Control *_Message_queue_Get ( Objects_Id id, Objects_Locations *location ) { return (Message_queue_Control *) 111332: 52 push %edx 111333: 8d 45 f4 lea -0xc(%ebp),%eax 111336: 50 push %eax 111337: ff 75 08 pushl 0x8(%ebp) 11133a: 68 14 b5 12 00 push $0x12b514 11133f: e8 b0 1b 00 00 call 112ef4 <_Objects_Get> 111344: 89 c1 mov %eax,%ecx return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { 111346: 83 c4 10 add $0x10,%esp 111349: b8 04 00 00 00 mov $0x4,%eax 11134e: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 111352: 75 3f jne 111393 if ( _Options_Is_no_wait( option_set ) ) wait = false; else wait = true; _CORE_message_queue_Seize( 111354: 50 push %eax 111355: 50 push %eax 111356: ff 75 18 pushl 0x18(%ebp) 111359: 8b 55 14 mov 0x14(%ebp),%edx 11135c: 83 e2 01 and $0x1,%edx 11135f: 83 f2 01 xor $0x1,%edx 111362: 52 push %edx 111363: 56 push %esi 111364: 53 push %ebx 111365: ff 71 08 pushl 0x8(%ecx) 111368: 83 c1 14 add $0x14,%ecx 11136b: 51 push %ecx 11136c: e8 df 0e 00 00 call 112250 <_CORE_message_queue_Seize> <== ALWAYS TAKEN buffer, size, wait, timeout ); _Thread_Enable_dispatch(); 111371: 83 c4 20 add $0x20,%esp 111374: e8 c0 23 00 00 call 113739 <_Thread_Enable_dispatch> return _Message_queue_Translate_core_message_queue_return_code( 111379: 83 ec 0c sub $0xc,%esp 11137c: a1 78 b3 12 00 mov 0x12b378,%eax 111381: ff 70 34 pushl 0x34(%eax) 111384: e8 83 00 00 00 call 11140c <_Message_queue_Translate_core_message_queue_return_code> <== ALWAYS TAKEN 111389: 83 c4 10 add $0x10,%esp 11138c: eb 05 jmp 111393 <== ALWAYS TAKEN 11138e: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 111393: 8d 65 f8 lea -0x8(%ebp),%esp 111396: 5b pop %ebx 111397: 5e pop %esi 111398: c9 leave 111399: c3 ret 00109c80 : rtems_status_code rtems_message_queue_send( rtems_id id, const void *buffer, size_t size ) { 109c80: 55 push %ebp 109c81: 89 e5 mov %esp,%ebp 109c83: 56 push %esi 109c84: 53 push %ebx 109c85: 83 ec 10 sub $0x10,%esp 109c88: 8b 75 08 mov 0x8(%ebp),%esi 109c8b: 8b 5d 0c mov 0xc(%ebp),%ebx register Message_queue_Control *the_message_queue; Objects_Locations location; CORE_message_queue_Status status; if ( !buffer ) 109c8e: b8 09 00 00 00 mov $0x9,%eax 109c93: 85 db test %ebx,%ebx 109c95: 74 4f je 109ce6 RTEMS_INLINE_ROUTINE Message_queue_Control *_Message_queue_Get ( Objects_Id id, Objects_Locations *location ) { return (Message_queue_Control *) 109c97: 50 push %eax 109c98: 8d 45 f4 lea -0xc(%ebp),%eax 109c9b: 50 push %eax 109c9c: 56 push %esi 109c9d: 68 cc 3a 12 00 push $0x123acc 109ca2: e8 a9 16 00 00 call 10b350 <_Objects_Get> 109ca7: 89 c2 mov %eax,%edx return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { 109ca9: 83 c4 10 add $0x10,%esp 109cac: b8 04 00 00 00 mov $0x4,%eax 109cb1: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 109cb5: 75 2f jne 109ce6 CORE_message_queue_API_mp_support_callout api_message_queue_mp_support, bool wait, Watchdog_Interval timeout ) { return _CORE_message_queue_Submit( 109cb7: 6a 00 push $0x0 109cb9: 6a 00 push $0x0 109cbb: 68 ff ff ff 7f push $0x7fffffff 109cc0: 6a 00 push $0x0 109cc2: 56 push %esi 109cc3: ff 75 10 pushl 0x10(%ebp) 109cc6: 53 push %ebx 109cc7: 8d 42 14 lea 0x14(%edx),%eax 109cca: 50 push %eax 109ccb: e8 b8 0a 00 00 call 10a788 <_CORE_message_queue_Submit> <== ALWAYS TAKEN 109cd0: 89 c3 mov %eax,%ebx MESSAGE_QUEUE_MP_HANDLER, false, /* sender does not block */ 0 /* no timeout */ ); _Thread_Enable_dispatch(); 109cd2: 83 c4 20 add $0x20,%esp 109cd5: e8 3b 1e 00 00 call 10bb15 <_Thread_Enable_dispatch> /* * Since this API does not allow for blocking sends, we can directly * return the returned status. */ return _Message_queue_Translate_core_message_queue_return_code(status); 109cda: 83 ec 0c sub $0xc,%esp 109cdd: 53 push %ebx 109cde: e8 0d 00 00 00 call 109cf0 <_Message_queue_Translate_core_message_queue_return_code> <== ALWAYS TAKEN 109ce3: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 109ce6: 8d 65 f8 lea -0x8(%ebp),%esp 109ce9: 5b pop %ebx 109cea: 5e pop %esi 109ceb: c9 leave 109cec: c3 ret 001141c0 : rtems_status_code rtems_message_queue_urgent( rtems_id id, const void *buffer, size_t size ) { 1141c0: 55 push %ebp 1141c1: 89 e5 mov %esp,%ebp 1141c3: 56 push %esi 1141c4: 53 push %ebx 1141c5: 83 ec 10 sub $0x10,%esp 1141c8: 8b 75 08 mov 0x8(%ebp),%esi 1141cb: 8b 5d 0c mov 0xc(%ebp),%ebx register Message_queue_Control *the_message_queue; Objects_Locations location; CORE_message_queue_Status status; if ( !buffer ) 1141ce: b8 09 00 00 00 mov $0x9,%eax 1141d3: 85 db test %ebx,%ebx 1141d5: 74 4f je 114226 1141d7: 50 push %eax 1141d8: 8d 45 f4 lea -0xc(%ebp),%eax 1141db: 50 push %eax 1141dc: 56 push %esi 1141dd: 68 48 cd 13 00 push $0x13cd48 1141e2: e8 a5 40 00 00 call 11828c <_Objects_Get> 1141e7: 89 c2 mov %eax,%edx return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { 1141e9: 83 c4 10 add $0x10,%esp 1141ec: b8 04 00 00 00 mov $0x4,%eax 1141f1: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 1141f5: 75 2f jne 114226 CORE_message_queue_API_mp_support_callout api_message_queue_mp_support, bool wait, Watchdog_Interval timeout ) { return _CORE_message_queue_Submit( 1141f7: 6a 00 push $0x0 1141f9: 6a 00 push $0x0 1141fb: 68 00 00 00 80 push $0x80000000 114200: 6a 00 push $0x0 114202: 56 push %esi 114203: ff 75 10 pushl 0x10(%ebp) 114206: 53 push %ebx 114207: 8d 42 14 lea 0x14(%edx),%eax 11420a: 50 push %eax 11420b: e8 e8 2d 00 00 call 116ff8 <_CORE_message_queue_Submit> <== ALWAYS TAKEN 114210: 89 c3 mov %eax,%ebx id, MESSAGE_QUEUE_MP_HANDLER, false, /* sender does not block */ 0 /* no timeout */ ); _Thread_Enable_dispatch(); 114212: 83 c4 20 add $0x20,%esp 114215: e8 a3 48 00 00 call 118abd <_Thread_Enable_dispatch> /* * Since this API does not allow for blocking sends, we can directly * return the returned status. */ return _Message_queue_Translate_core_message_queue_return_code(status); 11421a: 83 ec 0c sub $0xc,%esp 11421d: 53 push %ebx 11421e: e8 8d ff ff ff call 1141b0 <_Message_queue_Translate_core_message_queue_return_code> <== ALWAYS TAKEN 114223: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 114226: 8d 65 f8 lea -0x8(%ebp),%esp 114229: 5b pop %ebx 11422a: 5e pop %esi 11422b: c9 leave 11422c: c3 ret 0010b678 : rtems_status_code rtems_object_get_class_information( int the_api, int the_class, rtems_object_api_class_information *info ) { 10b678: 55 push %ebp 10b679: 89 e5 mov %esp,%ebp 10b67b: 57 push %edi 10b67c: 56 push %esi 10b67d: 53 push %ebx 10b67e: 83 ec 0c sub $0xc,%esp 10b681: 8b 5d 10 mov 0x10(%ebp),%ebx int i; /* * Validate parameters and look up information structure. */ if ( !info ) 10b684: ba 09 00 00 00 mov $0x9,%edx 10b689: 85 db test %ebx,%ebx 10b68b: 74 4e je 10b6db return RTEMS_INVALID_ADDRESS; obj_info = _Objects_Get_information( the_api, the_class ); 10b68d: 50 push %eax 10b68e: 50 push %eax 10b68f: ff 75 0c pushl 0xc(%ebp) 10b692: ff 75 08 pushl 0x8(%ebp) 10b695: e8 62 17 00 00 call 10cdfc <_Objects_Get_information> if ( !obj_info ) 10b69a: 83 c4 10 add $0x10,%esp 10b69d: ba 0a 00 00 00 mov $0xa,%edx 10b6a2: 85 c0 test %eax,%eax 10b6a4: 74 35 je 10b6db return RTEMS_INVALID_NUMBER; /* * Return information about this object class to the user. */ info->minimum_id = obj_info->minimum_id; 10b6a6: 8b 50 08 mov 0x8(%eax),%edx 10b6a9: 89 13 mov %edx,(%ebx) info->maximum_id = obj_info->maximum_id; 10b6ab: 8b 50 0c mov 0xc(%eax),%edx 10b6ae: 89 53 04 mov %edx,0x4(%ebx) info->auto_extend = obj_info->auto_extend; 10b6b1: 8a 50 12 mov 0x12(%eax),%dl 10b6b4: 88 53 0c mov %dl,0xc(%ebx) info->maximum = obj_info->maximum; 10b6b7: 0f b7 70 10 movzwl 0x10(%eax),%esi 10b6bb: 89 73 08 mov %esi,0x8(%ebx) 10b6be: ba 01 00 00 00 mov $0x1,%edx 10b6c3: 31 c9 xor %ecx,%ecx for ( unallocated=0, i=1 ; i <= info->maximum ; i++ ) 10b6c5: eb 0b jmp 10b6d2 <== ALWAYS TAKEN if ( !obj_info->local_table[i] ) 10b6c7: 8b 78 1c mov 0x1c(%eax),%edi unallocated++; 10b6ca: 83 3c 97 01 cmpl $0x1,(%edi,%edx,4) 10b6ce: 83 d1 00 adc $0x0,%ecx info->minimum_id = obj_info->minimum_id; info->maximum_id = obj_info->maximum_id; info->auto_extend = obj_info->auto_extend; info->maximum = obj_info->maximum; for ( unallocated=0, i=1 ; i <= info->maximum ; i++ ) 10b6d1: 42 inc %edx 10b6d2: 39 f2 cmp %esi,%edx 10b6d4: 76 f1 jbe 10b6c7 if ( !obj_info->local_table[i] ) unallocated++; info->unallocated = unallocated; 10b6d6: 89 4b 10 mov %ecx,0x10(%ebx) 10b6d9: 31 d2 xor %edx,%edx return RTEMS_SUCCESSFUL; } 10b6db: 89 d0 mov %edx,%eax 10b6dd: 8d 65 f4 lea -0xc(%ebp),%esp 10b6e0: 5b pop %ebx 10b6e1: 5e pop %esi 10b6e2: 5f pop %edi 10b6e3: c9 leave 10b6e4: c3 ret 0010b740 : */ rtems_status_code rtems_object_set_name( rtems_id id, const char *name ) { 10b740: 55 push %ebp 10b741: 89 e5 mov %esp,%ebp 10b743: 57 push %edi 10b744: 56 push %esi 10b745: 53 push %ebx 10b746: 83 ec 1c sub $0x1c,%esp 10b749: 8b 7d 0c mov 0xc(%ebp),%edi Objects_Information *information; Objects_Locations location; Objects_Control *the_object; Objects_Id tmpId; if ( !name ) 10b74c: b8 09 00 00 00 mov $0x9,%eax 10b751: 85 ff test %edi,%edi 10b753: 74 50 je 10b7a5 return RTEMS_INVALID_ADDRESS; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 10b755: 8b 5d 08 mov 0x8(%ebp),%ebx 10b758: 85 db test %ebx,%ebx 10b75a: 75 08 jne 10b764 10b75c: a1 fc 74 12 00 mov 0x1274fc,%eax 10b761: 8b 58 08 mov 0x8(%eax),%ebx information = _Objects_Get_information_id( tmpId ); 10b764: 83 ec 0c sub $0xc,%esp 10b767: 53 push %ebx 10b768: e8 6f 16 00 00 call 10cddc <_Objects_Get_information_id> 10b76d: 89 c6 mov %eax,%esi if ( !information ) 10b76f: 83 c4 10 add $0x10,%esp 10b772: 85 c0 test %eax,%eax 10b774: 74 2a je 10b7a0 return RTEMS_INVALID_ID; the_object = _Objects_Get( information, tmpId, &location ); 10b776: 51 push %ecx 10b777: 8d 45 e4 lea -0x1c(%ebp),%eax 10b77a: 50 push %eax 10b77b: 53 push %ebx 10b77c: 56 push %esi 10b77d: e8 ca 17 00 00 call 10cf4c <_Objects_Get> switch ( location ) { 10b782: 83 c4 10 add $0x10,%esp 10b785: 83 7d e4 00 cmpl $0x0,-0x1c(%ebp) 10b789: 75 15 jne 10b7a0 case OBJECTS_LOCAL: _Objects_Set_name( information, the_object, name ); 10b78b: 52 push %edx 10b78c: 57 push %edi 10b78d: 50 push %eax 10b78e: 56 push %esi 10b78f: e8 dc 19 00 00 call 10d170 <_Objects_Set_name> _Thread_Enable_dispatch(); 10b794: e8 58 20 00 00 call 10d7f1 <_Thread_Enable_dispatch> 10b799: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 10b79b: 83 c4 10 add $0x10,%esp 10b79e: eb 05 jmp 10b7a5 <== ALWAYS TAKEN 10b7a0: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10b7a5: 8d 65 f4 lea -0xc(%ebp),%esp 10b7a8: 5b pop %ebx 10b7a9: 5e pop %esi 10b7aa: 5f pop %edi 10b7ab: c9 leave 10b7ac: c3 ret 0010b4f3 : void rtems_panic( const char *printf_format, ... ) { 10b4f3: 55 push %ebp <== NOT EXECUTED 10b4f4: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10b4f6: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED /* * rtems_panic is shorthand for rtems_error(RTEMS_ERROR_PANIC, ...) */ void rtems_panic( 10b4f9: 8d 4d 0c lea 0xc(%ebp),%ecx <== NOT EXECUTED ) { va_list arglist; va_start(arglist, printf_format); (void) rtems_verror(RTEMS_ERROR_PANIC, printf_format, arglist); 10b4fc: 8b 55 08 mov 0x8(%ebp),%edx <== NOT EXECUTED 10b4ff: b8 00 00 00 20 mov $0x20000000,%eax <== NOT EXECUTED 10b504: e8 80 fe ff ff call 10b389 <== NOT EXECUTED va_end(arglist); } 10b509: c9 leave <== NOT EXECUTED 10b50a: c3 ret <== NOT EXECUTED 00114230 : uint32_t length, uint32_t buffer_size, rtems_attribute attribute_set, rtems_id *id ) { 114230: 55 push %ebp 114231: 89 e5 mov %esp,%ebp 114233: 57 push %edi 114234: 56 push %esi 114235: 53 push %ebx 114236: 83 ec 1c sub $0x1c,%esp 114239: 8b 75 0c mov 0xc(%ebp),%esi 11423c: 8b 55 10 mov 0x10(%ebp),%edx 11423f: 8b 7d 14 mov 0x14(%ebp),%edi register Partition_Control *the_partition; if ( !rtems_is_name_valid( name ) ) 114242: b8 03 00 00 00 mov $0x3,%eax 114247: 83 7d 08 00 cmpl $0x0,0x8(%ebp) 11424b: 0f 84 cf 00 00 00 je 114320 return RTEMS_INVALID_NAME; if ( !starting_address ) 114251: 85 f6 test %esi,%esi 114253: 0f 84 bb 00 00 00 je 114314 return RTEMS_INVALID_ADDRESS; if ( !id ) 114259: 83 7d 1c 00 cmpl $0x0,0x1c(%ebp) 11425d: 0f 84 b1 00 00 00 je 114314 <== ALWAYS TAKEN return RTEMS_INVALID_ADDRESS; if ( length == 0 || buffer_size == 0 || length < buffer_size || 114263: 85 ff test %edi,%edi 114265: 0f 84 b0 00 00 00 je 11431b 11426b: 85 d2 test %edx,%edx 11426d: 0f 84 a8 00 00 00 je 11431b 114273: 39 fa cmp %edi,%edx 114275: 0f 82 a0 00 00 00 jb 11431b 11427b: f7 c7 03 00 00 00 test $0x3,%edi 114281: 0f 85 94 00 00 00 jne 11431b !_Partition_Is_buffer_size_aligned( buffer_size ) ) return RTEMS_INVALID_SIZE; if ( !_Addresses_Is_aligned( starting_address ) ) 114287: f7 c6 03 00 00 00 test $0x3,%esi 11428d: 0f 85 81 00 00 00 jne 114314 114293: a1 e8 ca 13 00 mov 0x13cae8,%eax 114298: 40 inc %eax 114299: a3 e8 ca 13 00 mov %eax,0x13cae8 * 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 ); 11429e: 83 ec 0c sub $0xc,%esp 1142a1: 68 70 c9 13 00 push $0x13c970 1142a6: 89 55 e4 mov %edx,-0x1c(%ebp) 1142a9: e8 8e 3b 00 00 call 117e3c <_Objects_Allocate> 1142ae: 89 c3 mov %eax,%ebx _Thread_Disable_dispatch(); /* prevents deletion */ the_partition = _Partition_Allocate(); if ( !the_partition ) { 1142b0: 83 c4 10 add $0x10,%esp 1142b3: 85 c0 test %eax,%eax 1142b5: 8b 55 e4 mov -0x1c(%ebp),%edx 1142b8: 75 0c jne 1142c6 _Thread_Enable_dispatch(); 1142ba: e8 fe 47 00 00 call 118abd <_Thread_Enable_dispatch> 1142bf: b8 05 00 00 00 mov $0x5,%eax return RTEMS_TOO_MANY; 1142c4: eb 5a jmp 114320 <== ALWAYS TAKEN _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } #endif the_partition->starting_address = starting_address; 1142c6: 89 70 10 mov %esi,0x10(%eax) the_partition->length = length; 1142c9: 89 50 14 mov %edx,0x14(%eax) the_partition->buffer_size = buffer_size; 1142cc: 89 78 18 mov %edi,0x18(%eax) the_partition->attribute_set = attribute_set; 1142cf: 8b 45 18 mov 0x18(%ebp),%eax 1142d2: 89 43 1c mov %eax,0x1c(%ebx) the_partition->number_of_used_blocks = 0; 1142d5: c7 43 20 00 00 00 00 movl $0x0,0x20(%ebx) _Chain_Initialize( &the_partition->Memory, starting_address, 1142dc: 57 push %edi 1142dd: 89 d0 mov %edx,%eax 1142df: 31 d2 xor %edx,%edx 1142e1: f7 f7 div %edi 1142e3: 50 push %eax 1142e4: 56 push %esi 1142e5: 8d 43 24 lea 0x24(%ebx),%eax 1142e8: 50 push %eax 1142e9: e8 4a 2a 00 00 call 116d38 <_Chain_Initialize> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 1142ee: 8b 43 08 mov 0x8(%ebx),%eax 1142f1: 0f b7 c8 movzwl %ax,%ecx 1142f4: 8b 15 8c c9 13 00 mov 0x13c98c,%edx 1142fa: 89 1c 8a mov %ebx,(%edx,%ecx,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 1142fd: 8b 55 08 mov 0x8(%ebp),%edx 114300: 89 53 0c mov %edx,0xc(%ebx) &_Partition_Information, &the_partition->Object, (Objects_Name) name ); *id = the_partition->Object.id; 114303: 8b 55 1c mov 0x1c(%ebp),%edx 114306: 89 02 mov %eax,(%edx) name, 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); 114308: e8 b0 47 00 00 call 118abd <_Thread_Enable_dispatch> 11430d: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 11430f: 83 c4 10 add $0x10,%esp 114312: eb 0c jmp 114320 <== ALWAYS TAKEN 114314: b8 09 00 00 00 mov $0x9,%eax 114319: eb 05 jmp 114320 <== ALWAYS TAKEN 11431b: b8 08 00 00 00 mov $0x8,%eax } 114320: 8d 65 f4 lea -0xc(%ebp),%esp 114323: 5b pop %ebx 114324: 5e pop %esi 114325: 5f pop %edi 114326: c9 leave 114327: c3 ret 00114328 : */ rtems_status_code rtems_partition_delete( rtems_id id ) { 114328: 55 push %ebp 114329: 89 e5 mov %esp,%ebp 11432b: 53 push %ebx 11432c: 83 ec 18 sub $0x18,%esp RTEMS_INLINE_ROUTINE Partition_Control *_Partition_Get ( Objects_Id id, Objects_Locations *location ) { return (Partition_Control *) 11432f: 8d 45 f4 lea -0xc(%ebp),%eax 114332: 50 push %eax 114333: ff 75 08 pushl 0x8(%ebp) 114336: 68 70 c9 13 00 push $0x13c970 11433b: e8 4c 3f 00 00 call 11828c <_Objects_Get> 114340: 89 c3 mov %eax,%ebx register Partition_Control *the_partition; Objects_Locations location; the_partition = _Partition_Get( id, &location ); switch ( location ) { 114342: 83 c4 10 add $0x10,%esp 114345: b8 04 00 00 00 mov $0x4,%eax 11434a: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 11434e: 75 36 jne 114386 case OBJECTS_LOCAL: if ( the_partition->number_of_used_blocks == 0 ) { 114350: 83 7b 20 00 cmpl $0x0,0x20(%ebx) 114354: 75 26 jne 11437c _Objects_Close( &_Partition_Information, &the_partition->Object ); 114356: 51 push %ecx 114357: 51 push %ecx 114358: 53 push %ebx 114359: 68 70 c9 13 00 push $0x13c970 11435e: e8 45 3b 00 00 call 117ea8 <_Objects_Close> */ RTEMS_INLINE_ROUTINE void _Partition_Free ( Partition_Control *the_partition ) { _Objects_Free( &_Partition_Information, &the_partition->Object ); 114363: 58 pop %eax 114364: 5a pop %edx 114365: 53 push %ebx 114366: 68 70 c9 13 00 push $0x13c970 11436b: e8 b8 3d 00 00 call 118128 <_Objects_Free> 0 /* Not used */ ); } #endif _Thread_Enable_dispatch(); 114370: e8 48 47 00 00 call 118abd <_Thread_Enable_dispatch> 114375: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 114377: 83 c4 10 add $0x10,%esp 11437a: eb 0a jmp 114386 <== ALWAYS TAKEN } _Thread_Enable_dispatch(); 11437c: e8 3c 47 00 00 call 118abd <_Thread_Enable_dispatch> 114381: b8 0c 00 00 00 mov $0xc,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 114386: 8b 5d fc mov -0x4(%ebp),%ebx 114389: c9 leave 11438a: c3 ret 0011438c : rtems_status_code rtems_partition_get_buffer( rtems_id id, void **buffer ) { 11438c: 55 push %ebp 11438d: 89 e5 mov %esp,%ebp 11438f: 57 push %edi 114390: 56 push %esi 114391: 53 push %ebx 114392: 83 ec 1c sub $0x1c,%esp 114395: 8b 75 0c mov 0xc(%ebp),%esi register Partition_Control *the_partition; Objects_Locations location; void *the_buffer; if ( !buffer ) 114398: b8 09 00 00 00 mov $0x9,%eax 11439d: 85 f6 test %esi,%esi 11439f: 74 4f je 1143f0 RTEMS_INLINE_ROUTINE Partition_Control *_Partition_Get ( Objects_Id id, Objects_Locations *location ) { return (Partition_Control *) 1143a1: 50 push %eax 1143a2: 8d 45 e4 lea -0x1c(%ebp),%eax 1143a5: 50 push %eax 1143a6: ff 75 08 pushl 0x8(%ebp) 1143a9: 68 70 c9 13 00 push $0x13c970 1143ae: e8 d9 3e 00 00 call 11828c <_Objects_Get> 1143b3: 89 c3 mov %eax,%ebx return RTEMS_INVALID_ADDRESS; the_partition = _Partition_Get( id, &location ); switch ( location ) { 1143b5: 83 c4 10 add $0x10,%esp 1143b8: b8 04 00 00 00 mov $0x4,%eax 1143bd: 83 7d e4 00 cmpl $0x0,-0x1c(%ebp) 1143c1: 75 2d jne 1143f0 */ RTEMS_INLINE_ROUTINE void *_Partition_Allocate_buffer ( Partition_Control *the_partition ) { return _Chain_Get( &the_partition->Memory ); 1143c3: 83 ec 0c sub $0xc,%esp 1143c6: 8d 43 24 lea 0x24(%ebx),%eax 1143c9: 50 push %eax 1143ca: e8 45 29 00 00 call 116d14 <_Chain_Get> 1143cf: 89 c7 mov %eax,%edi case OBJECTS_LOCAL: the_buffer = _Partition_Allocate_buffer( the_partition ); if ( the_buffer ) { 1143d1: 83 c4 10 add $0x10,%esp 1143d4: 85 c0 test %eax,%eax 1143d6: 74 0e je 1143e6 the_partition->number_of_used_blocks += 1; 1143d8: ff 43 20 incl 0x20(%ebx) _Thread_Enable_dispatch(); 1143db: e8 dd 46 00 00 call 118abd <_Thread_Enable_dispatch> *buffer = the_buffer; 1143e0: 89 3e mov %edi,(%esi) 1143e2: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 1143e4: eb 0a jmp 1143f0 <== ALWAYS TAKEN } _Thread_Enable_dispatch(); 1143e6: e8 d2 46 00 00 call 118abd <_Thread_Enable_dispatch> 1143eb: b8 0d 00 00 00 mov $0xd,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1143f0: 8d 65 f4 lea -0xc(%ebp),%esp 1143f3: 5b pop %ebx 1143f4: 5e pop %esi 1143f5: 5f pop %edi 1143f6: c9 leave 1143f7: c3 ret 0011441c : rtems_status_code rtems_partition_return_buffer( rtems_id id, void *buffer ) { 11441c: 55 push %ebp 11441d: 89 e5 mov %esp,%ebp 11441f: 56 push %esi 114420: 53 push %ebx 114421: 83 ec 14 sub $0x14,%esp 114424: 8b 75 0c mov 0xc(%ebp),%esi RTEMS_INLINE_ROUTINE Partition_Control *_Partition_Get ( Objects_Id id, Objects_Locations *location ) { return (Partition_Control *) 114427: 8d 45 f4 lea -0xc(%ebp),%eax 11442a: 50 push %eax 11442b: ff 75 08 pushl 0x8(%ebp) 11442e: 68 70 c9 13 00 push $0x13c970 114433: e8 54 3e 00 00 call 11828c <_Objects_Get> 114438: 89 c3 mov %eax,%ebx register Partition_Control *the_partition; Objects_Locations location; the_partition = _Partition_Get( id, &location ); switch ( location ) { 11443a: 83 c4 10 add $0x10,%esp 11443d: b8 04 00 00 00 mov $0x4,%eax 114442: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 114446: 75 40 jne 114488 ) { void *starting; void *ending; starting = the_partition->starting_address; 114448: 8b 43 10 mov 0x10(%ebx),%eax ending = _Addresses_Add_offset( starting, the_partition->length ); 11444b: 8b 53 14 mov 0x14(%ebx),%edx 11444e: 01 c2 add %eax,%edx 114450: 39 d6 cmp %edx,%esi 114452: 0f 96 c2 setbe %dl 114455: 31 c9 xor %ecx,%ecx 114457: 39 c6 cmp %eax,%esi 114459: 0f 93 c1 setae %cl 11445c: 85 d1 test %edx,%ecx 11445e: 74 2f je 11448f return ( 114460: 89 f2 mov %esi,%edx 114462: 29 c2 sub %eax,%edx 114464: 89 d0 mov %edx,%eax 114466: 31 d2 xor %edx,%edx 114468: f7 73 18 divl 0x18(%ebx) 11446b: 85 d2 test %edx,%edx 11446d: 75 20 jne 11448f RTEMS_INLINE_ROUTINE void _Partition_Free_buffer ( Partition_Control *the_partition, Chain_Node *the_buffer ) { _Chain_Append( &the_partition->Memory, the_buffer ); 11446f: 50 push %eax 114470: 50 push %eax 114471: 56 push %esi 114472: 8d 43 24 lea 0x24(%ebx),%eax 114475: 50 push %eax 114476: e8 75 28 00 00 call 116cf0 <_Chain_Append> case OBJECTS_LOCAL: if ( _Partition_Is_buffer_valid( buffer, the_partition ) ) { _Partition_Free_buffer( the_partition, buffer ); the_partition->number_of_used_blocks -= 1; 11447b: ff 4b 20 decl 0x20(%ebx) _Thread_Enable_dispatch(); 11447e: e8 3a 46 00 00 call 118abd <_Thread_Enable_dispatch> 114483: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 114485: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 114488: 8d 65 f8 lea -0x8(%ebp),%esp 11448b: 5b pop %ebx 11448c: 5e pop %esi 11448d: c9 leave 11448e: c3 ret _Partition_Free_buffer( the_partition, buffer ); the_partition->number_of_used_blocks -= 1; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 11448f: e8 29 46 00 00 call 118abd <_Thread_Enable_dispatch> 114494: b8 09 00 00 00 mov $0x9,%eax return RTEMS_INVALID_ADDRESS; 114499: eb ed jmp 114488 <== ALWAYS TAKEN 0010ede2 : /* * Initialization of FIFO/pipe module. */ void rtems_pipe_initialize (void) { 10ede2: 55 push %ebp 10ede3: 89 e5 mov %esp,%ebp 10ede5: 83 ec 08 sub $0x8,%esp if (!rtems_pipe_configured) 10ede8: 80 3d cc 1b 12 00 00 cmpb $0x0,0x121bcc 10edef: 74 3c je 10ee2d <== NEVER TAKEN return; if (rtems_pipe_semaphore) 10edf1: 83 3d 18 35 12 00 00 cmpl $0x0,0x123518 <== NOT EXECUTED 10edf8: 75 33 jne 10ee2d <== NOT EXECUTED return; rtems_status_code sc; sc = rtems_semaphore_create( 10edfa: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10edfd: 68 18 35 12 00 push $0x123518 <== NOT EXECUTED 10ee02: 6a 00 push $0x0 <== NOT EXECUTED 10ee04: 6a 54 push $0x54 <== NOT EXECUTED 10ee06: 6a 01 push $0x1 <== NOT EXECUTED 10ee08: 68 45 50 49 50 push $0x50495045 <== NOT EXECUTED 10ee0d: e8 ee ae ff ff call 109d00 <== NOT EXECUTED rtems_build_name ('P', 'I', 'P', 'E'), 1, RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &rtems_pipe_semaphore); if (sc != RTEMS_SUCCESSFUL) 10ee12: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 10ee15: 85 c0 test %eax,%eax <== NOT EXECUTED 10ee17: 74 09 je 10ee22 <== NOT EXECUTED rtems_fatal_error_occurred (sc); 10ee19: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10ee1c: 50 push %eax <== NOT EXECUTED 10ee1d: e8 c2 b6 ff ff call 10a4e4 <== NOT EXECUTED rtems_interval now; now = rtems_clock_get_ticks_since_boot(); 10ee22: e8 d5 aa ff ff call 1098fc <== NOT EXECUTED rtems_pipe_no = now; 10ee27: 66 a3 20 35 12 00 mov %ax,0x123520 <== NOT EXECUTED } 10ee2d: c9 leave 10ee2e: c3 ret 0011399c : void *internal_start, void *external_start, uint32_t length, rtems_id *id ) { 11399c: 55 push %ebp 11399d: 89 e5 mov %esp,%ebp 11399f: 57 push %edi 1139a0: 56 push %esi 1139a1: 53 push %ebx 1139a2: 83 ec 0c sub $0xc,%esp 1139a5: 8b 75 08 mov 0x8(%ebp),%esi 1139a8: 8b 7d 10 mov 0x10(%ebp),%edi 1139ab: 8b 5d 18 mov 0x18(%ebp),%ebx register Dual_ported_memory_Control *the_port; if ( !rtems_is_name_valid( name ) ) 1139ae: b8 03 00 00 00 mov $0x3,%eax 1139b3: 85 f6 test %esi,%esi 1139b5: 74 6a je 113a21 return RTEMS_INVALID_NAME; if ( !id ) 1139b7: 85 db test %ebx,%ebx 1139b9: 74 61 je 113a1c return RTEMS_INVALID_ADDRESS; if ( !_Addresses_Is_aligned( internal_start ) || 1139bb: 8b 45 0c mov 0xc(%ebp),%eax 1139be: 09 f8 or %edi,%eax 1139c0: a8 03 test $0x3,%al 1139c2: 75 58 jne 113a1c rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 1139c4: a1 e8 ca 13 00 mov 0x13cae8,%eax 1139c9: 40 inc %eax 1139ca: a3 e8 ca 13 00 mov %eax,0x13cae8 * of free port control blocks. */ RTEMS_INLINE_ROUTINE Dual_ported_memory_Control *_Dual_ported_memory_Allocate ( void ) { return (Dual_ported_memory_Control *) 1139cf: 83 ec 0c sub $0xc,%esp 1139d2: 68 30 c9 13 00 push $0x13c930 1139d7: e8 60 44 00 00 call 117e3c <_Objects_Allocate> _Thread_Disable_dispatch(); /* to prevent deletion */ the_port = _Dual_ported_memory_Allocate(); if ( !the_port ) { 1139dc: 83 c4 10 add $0x10,%esp 1139df: 85 c0 test %eax,%eax 1139e1: 75 0c jne 1139ef _Thread_Enable_dispatch(); 1139e3: e8 d5 50 00 00 call 118abd <_Thread_Enable_dispatch> 1139e8: b8 05 00 00 00 mov $0x5,%eax return RTEMS_TOO_MANY; 1139ed: eb 32 jmp 113a21 <== ALWAYS TAKEN } the_port->internal_base = internal_start; 1139ef: 8b 55 0c mov 0xc(%ebp),%edx 1139f2: 89 50 10 mov %edx,0x10(%eax) the_port->external_base = external_start; 1139f5: 89 78 14 mov %edi,0x14(%eax) the_port->length = length - 1; 1139f8: 8b 55 14 mov 0x14(%ebp),%edx 1139fb: 4a dec %edx 1139fc: 89 50 18 mov %edx,0x18(%eax) #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 1139ff: 8b 50 08 mov 0x8(%eax),%edx 113a02: 0f b7 fa movzwl %dx,%edi 113a05: 8b 0d 4c c9 13 00 mov 0x13c94c,%ecx 113a0b: 89 04 b9 mov %eax,(%ecx,%edi,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 113a0e: 89 70 0c mov %esi,0xc(%eax) &_Dual_ported_memory_Information, &the_port->Object, (Objects_Name) name ); *id = the_port->Object.id; 113a11: 89 13 mov %edx,(%ebx) _Thread_Enable_dispatch(); 113a13: e8 a5 50 00 00 call 118abd <_Thread_Enable_dispatch> 113a18: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 113a1a: eb 05 jmp 113a21 <== ALWAYS TAKEN 113a1c: b8 09 00 00 00 mov $0x9,%eax } 113a21: 8d 65 f4 lea -0xc(%ebp),%esp 113a24: 5b pop %ebx 113a25: 5e pop %esi 113a26: 5f pop %edi 113a27: c9 leave 113a28: c3 ret 00113a80 : rtems_status_code rtems_port_external_to_internal( rtems_id id, void *external, void **internal ) { 113a80: 55 push %ebp 113a81: 89 e5 mov %esp,%ebp 113a83: 56 push %esi 113a84: 53 push %ebx 113a85: 83 ec 10 sub $0x10,%esp 113a88: 8b 75 0c mov 0xc(%ebp),%esi 113a8b: 8b 5d 10 mov 0x10(%ebp),%ebx register Dual_ported_memory_Control *the_port; Objects_Locations location; uint32_t ending; if ( !internal ) 113a8e: b8 09 00 00 00 mov $0x9,%eax 113a93: 85 db test %ebx,%ebx 113a95: 74 3c je 113ad3 RTEMS_INLINE_ROUTINE Dual_ported_memory_Control *_Dual_ported_memory_Get ( Objects_Id id, Objects_Locations *location ) { return (Dual_ported_memory_Control *) 113a97: 50 push %eax 113a98: 8d 45 f4 lea -0xc(%ebp),%eax 113a9b: 50 push %eax 113a9c: ff 75 08 pushl 0x8(%ebp) 113a9f: 68 30 c9 13 00 push $0x13c930 113aa4: e8 e3 47 00 00 call 11828c <_Objects_Get> 113aa9: 89 c2 mov %eax,%edx return RTEMS_INVALID_ADDRESS; the_port = _Dual_ported_memory_Get( id, &location ); switch ( location ) { 113aab: 83 c4 10 add $0x10,%esp 113aae: b8 04 00 00 00 mov $0x4,%eax 113ab3: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 113ab7: 75 1a jne 113ad3 case OBJECTS_LOCAL: ending = _Addresses_Subtract( external, the_port->external_base ); 113ab9: 89 f0 mov %esi,%eax 113abb: 2b 42 14 sub 0x14(%edx),%eax if ( ending > the_port->length ) 113abe: 3b 42 18 cmp 0x18(%edx),%eax 113ac1: 76 04 jbe 113ac7 *internal = external; 113ac3: 89 33 mov %esi,(%ebx) 113ac5: eb 05 jmp 113acc <== ALWAYS TAKEN else *internal = _Addresses_Add_offset( the_port->internal_base, 113ac7: 03 42 10 add 0x10(%edx),%eax 113aca: 89 03 mov %eax,(%ebx) ending ); _Thread_Enable_dispatch(); 113acc: e8 ec 4f 00 00 call 118abd <_Thread_Enable_dispatch> 113ad1: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 113ad3: 8d 65 f8 lea -0x8(%ebp),%esp 113ad6: 5b pop %ebx 113ad7: 5e pop %esi 113ad8: c9 leave 113ad9: c3 ret 00113b00 : rtems_status_code rtems_port_internal_to_external( rtems_id id, void *internal, void **external ) { 113b00: 55 push %ebp 113b01: 89 e5 mov %esp,%ebp 113b03: 56 push %esi 113b04: 53 push %ebx 113b05: 83 ec 10 sub $0x10,%esp 113b08: 8b 75 0c mov 0xc(%ebp),%esi 113b0b: 8b 5d 10 mov 0x10(%ebp),%ebx register Dual_ported_memory_Control *the_port; Objects_Locations location; uint32_t ending; if ( !external ) 113b0e: b8 09 00 00 00 mov $0x9,%eax 113b13: 85 db test %ebx,%ebx 113b15: 74 3c je 113b53 113b17: 50 push %eax 113b18: 8d 45 f4 lea -0xc(%ebp),%eax 113b1b: 50 push %eax 113b1c: ff 75 08 pushl 0x8(%ebp) 113b1f: 68 30 c9 13 00 push $0x13c930 113b24: e8 63 47 00 00 call 11828c <_Objects_Get> 113b29: 89 c2 mov %eax,%edx return RTEMS_INVALID_ADDRESS; the_port = _Dual_ported_memory_Get( id, &location ); switch ( location ) { 113b2b: 83 c4 10 add $0x10,%esp 113b2e: b8 04 00 00 00 mov $0x4,%eax 113b33: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 113b37: 75 1a jne 113b53 case OBJECTS_LOCAL: ending = _Addresses_Subtract( internal, the_port->internal_base ); 113b39: 89 f0 mov %esi,%eax 113b3b: 2b 42 10 sub 0x10(%edx),%eax if ( ending > the_port->length ) 113b3e: 3b 42 18 cmp 0x18(%edx),%eax 113b41: 76 04 jbe 113b47 *external = internal; 113b43: 89 33 mov %esi,(%ebx) 113b45: eb 05 jmp 113b4c <== ALWAYS TAKEN else *external = _Addresses_Add_offset( the_port->external_base, 113b47: 03 42 14 add 0x14(%edx),%eax 113b4a: 89 03 mov %eax,(%ebx) ending ); _Thread_Enable_dispatch(); 113b4c: e8 6c 4f 00 00 call 118abd <_Thread_Enable_dispatch> 113b51: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 113b53: 8d 65 f8 lea -0x8(%ebp),%esp 113b56: 5b pop %ebx 113b57: 5e pop %esi 113b58: c9 leave 113b59: c3 ret 0011449c : */ rtems_status_code rtems_rate_monotonic_cancel( rtems_id id ) { 11449c: 55 push %ebp 11449d: 89 e5 mov %esp,%ebp 11449f: 53 push %ebx 1144a0: 83 ec 18 sub $0x18,%esp RTEMS_INLINE_ROUTINE Rate_monotonic_Control *_Rate_monotonic_Get ( Objects_Id id, Objects_Locations *location ) { return (Rate_monotonic_Control *) 1144a3: 8d 45 f4 lea -0xc(%ebp),%eax 1144a6: 50 push %eax 1144a7: ff 75 08 pushl 0x8(%ebp) 1144aa: 68 b0 c9 13 00 push $0x13c9b0 1144af: e8 d8 3d 00 00 call 11828c <_Objects_Get> 1144b4: 89 c3 mov %eax,%ebx Rate_monotonic_Control *the_period; Objects_Locations location; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 1144b6: 83 c4 10 add $0x10,%esp 1144b9: b8 04 00 00 00 mov $0x4,%eax 1144be: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 1144c2: 75 34 jne 1144f8 case OBJECTS_LOCAL: if ( !_Thread_Is_executing( the_period->owner ) ) { 1144c4: 8b 43 40 mov 0x40(%ebx),%eax 1144c7: 3b 05 a4 cb 13 00 cmp 0x13cba4,%eax 1144cd: 74 0c je 1144db _Thread_Enable_dispatch(); 1144cf: e8 e9 45 00 00 call 118abd <_Thread_Enable_dispatch> 1144d4: b8 17 00 00 00 mov $0x17,%eax return RTEMS_NOT_OWNER_OF_RESOURCE; 1144d9: eb 1d jmp 1144f8 <== ALWAYS TAKEN } (void) _Watchdog_Remove( &the_period->Timer ); 1144db: 83 ec 0c sub $0xc,%esp 1144de: 8d 43 10 lea 0x10(%ebx),%eax 1144e1: 50 push %eax 1144e2: e8 cd 57 00 00 call 119cb4 <_Watchdog_Remove> the_period->state = RATE_MONOTONIC_INACTIVE; 1144e7: c7 43 38 00 00 00 00 movl $0x0,0x38(%ebx) _Thread_Enable_dispatch(); 1144ee: e8 ca 45 00 00 call 118abd <_Thread_Enable_dispatch> 1144f3: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 1144f5: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1144f8: 8b 5d fc mov -0x4(%ebp),%ebx 1144fb: c9 leave 1144fc: c3 ret 0010aaa4 : rtems_status_code rtems_rate_monotonic_create( rtems_name name, rtems_id *id ) { 10aaa4: 55 push %ebp 10aaa5: 89 e5 mov %esp,%ebp 10aaa7: 57 push %edi 10aaa8: 56 push %esi 10aaa9: 53 push %ebx 10aaaa: 83 ec 0c sub $0xc,%esp 10aaad: 8b 75 08 mov 0x8(%ebp),%esi Rate_monotonic_Control *the_period; if ( !rtems_is_name_valid( name ) ) 10aab0: b8 03 00 00 00 mov $0x3,%eax 10aab5: 85 f6 test %esi,%esi 10aab7: 0f 84 ac 00 00 00 je 10ab69 return RTEMS_INVALID_NAME; if ( !id ) 10aabd: b0 09 mov $0x9,%al 10aabf: 83 7d 0c 00 cmpl $0x0,0xc(%ebp) 10aac3: 0f 84 a0 00 00 00 je 10ab69 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10aac9: a1 18 64 12 00 mov 0x126418,%eax 10aace: 40 inc %eax 10aacf: a3 18 64 12 00 mov %eax,0x126418 * This function allocates a period control block from * the inactive chain of free period control blocks. */ RTEMS_INLINE_ROUTINE Rate_monotonic_Control *_Rate_monotonic_Allocate( void ) { return (Rate_monotonic_Control *) 10aad4: 83 ec 0c sub $0xc,%esp 10aad7: 68 20 63 12 00 push $0x126320 10aadc: e8 7f 1a 00 00 call 10c560 <_Objects_Allocate> 10aae1: 89 c2 mov %eax,%edx _Thread_Disable_dispatch(); /* to prevent deletion */ the_period = _Rate_monotonic_Allocate(); if ( !the_period ) { 10aae3: 83 c4 10 add $0x10,%esp 10aae6: 85 c0 test %eax,%eax 10aae8: 75 0c jne 10aaf6 _Thread_Enable_dispatch(); 10aaea: e8 02 27 00 00 call 10d1f1 <_Thread_Enable_dispatch> 10aaef: b8 05 00 00 00 mov $0x5,%eax return RTEMS_TOO_MANY; 10aaf4: eb 73 jmp 10ab69 <== ALWAYS TAKEN } the_period->owner = _Thread_Executing; 10aaf6: a1 d4 64 12 00 mov 0x1264d4,%eax 10aafb: 89 42 40 mov %eax,0x40(%edx) the_period->state = RATE_MONOTONIC_INACTIVE; 10aafe: c7 42 38 00 00 00 00 movl $0x0,0x38(%edx) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 10ab05: c7 42 18 00 00 00 00 movl $0x0,0x18(%edx) the_watchdog->routine = routine; 10ab0c: c7 42 2c 00 00 00 00 movl $0x0,0x2c(%edx) the_watchdog->id = id; 10ab13: c7 42 30 00 00 00 00 movl $0x0,0x30(%edx) the_watchdog->user_data = user_data; 10ab1a: c7 42 34 00 00 00 00 movl $0x0,0x34(%edx) _Watchdog_Initialize( &the_period->Timer, NULL, 0, NULL ); _Rate_monotonic_Reset_statistics( the_period ); 10ab21: 8d 5a 54 lea 0x54(%edx),%ebx 10ab24: b9 0e 00 00 00 mov $0xe,%ecx 10ab29: 31 c0 xor %eax,%eax 10ab2b: 89 df mov %ebx,%edi 10ab2d: f3 ab rep stos %eax,%es:(%edi) 10ab2f: c7 42 5c ff ff ff 7f movl $0x7fffffff,0x5c(%edx) 10ab36: c7 42 60 ff ff ff 7f movl $0x7fffffff,0x60(%edx) 10ab3d: c7 42 74 ff ff ff 7f movl $0x7fffffff,0x74(%edx) 10ab44: c7 42 78 ff ff ff 7f movl $0x7fffffff,0x78(%edx) #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10ab4b: 8b 42 08 mov 0x8(%edx),%eax 10ab4e: 0f b7 d8 movzwl %ax,%ebx 10ab51: 8b 0d 3c 63 12 00 mov 0x12633c,%ecx 10ab57: 89 14 99 mov %edx,(%ecx,%ebx,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 10ab5a: 89 72 0c mov %esi,0xc(%edx) &_Rate_monotonic_Information, &the_period->Object, (Objects_Name) name ); *id = the_period->Object.id; 10ab5d: 8b 55 0c mov 0xc(%ebp),%edx 10ab60: 89 02 mov %eax,(%edx) _Thread_Enable_dispatch(); 10ab62: e8 8a 26 00 00 call 10d1f1 <_Thread_Enable_dispatch> 10ab67: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; } 10ab69: 8d 65 f4 lea -0xc(%ebp),%esp 10ab6c: 5b pop %ebx 10ab6d: 5e pop %esi 10ab6e: 5f pop %edi 10ab6f: c9 leave 10ab70: c3 ret 00133e70 : rtems_status_code rtems_rate_monotonic_get_status( rtems_id id, rtems_rate_monotonic_period_status *status ) { 133e70: 55 push %ebp 133e71: 89 e5 mov %esp,%ebp 133e73: 53 push %ebx 133e74: 83 ec 24 sub $0x24,%esp 133e77: 8b 5d 0c mov 0xc(%ebp),%ebx Objects_Locations location; Rate_monotonic_Period_time_t since_last_period; Rate_monotonic_Control *the_period; bool valid_status; if ( !status ) 133e7a: b8 09 00 00 00 mov $0x9,%eax 133e7f: 85 db test %ebx,%ebx 133e81: 0f 84 93 00 00 00 je 133f1a 133e87: 52 push %edx 133e88: 8d 45 f4 lea -0xc(%ebp),%eax 133e8b: 50 push %eax 133e8c: ff 75 08 pushl 0x8(%ebp) 133e8f: 68 24 3a 16 00 push $0x163a24 133e94: e8 ab cd fd ff call 110c44 <_Objects_Get> 133e99: 89 c2 mov %eax,%edx return RTEMS_INVALID_ADDRESS; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 133e9b: 83 c4 10 add $0x10,%esp 133e9e: b8 04 00 00 00 mov $0x4,%eax 133ea3: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 133ea7: 75 71 jne 133f1a case OBJECTS_LOCAL: status->owner = the_period->owner->Object.id; 133ea9: 8b 42 40 mov 0x40(%edx),%eax 133eac: 8b 40 08 mov 0x8(%eax),%eax 133eaf: 89 03 mov %eax,(%ebx) status->state = the_period->state; 133eb1: 8b 42 38 mov 0x38(%edx),%eax 133eb4: 89 43 04 mov %eax,0x4(%ebx) /* * If the period is inactive, there is no information. */ if ( status->state == RATE_MONOTONIC_INACTIVE ) { 133eb7: 85 c0 test %eax,%eax 133eb9: 75 1e jne 133ed9 #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timespec_Set_to_zero( &status->since_last_period ); 133ebb: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx) 133ec2: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx) _Timespec_Set_to_zero( &status->executed_since_last_period ); 133ec9: c7 43 10 00 00 00 00 movl $0x0,0x10(%ebx) 133ed0: c7 43 14 00 00 00 00 movl $0x0,0x14(%ebx) 133ed7: eb 3a jmp 133f13 <== ALWAYS TAKEN /* * Grab the current status. */ valid_status = _Rate_monotonic_Get_status( 133ed9: 50 push %eax 133eda: 8d 45 ec lea -0x14(%ebp),%eax 133edd: 50 push %eax 133ede: 8d 45 e4 lea -0x1c(%ebp),%eax 133ee1: 50 push %eax 133ee2: 52 push %edx 133ee3: e8 a0 00 00 00 call 133f88 <_Rate_monotonic_Get_status> <== ALWAYS TAKEN the_period, &since_last_period, &executed ); if (!valid_status) { 133ee8: 83 c4 10 add $0x10,%esp 133eeb: 84 c0 test %al,%al 133eed: 75 0c jne 133efb _Thread_Enable_dispatch(); 133eef: e8 c5 d5 fd ff call 1114b9 <_Thread_Enable_dispatch> 133ef4: b8 0b 00 00 00 mov $0xb,%eax return RTEMS_NOT_DEFINED; 133ef9: eb 1f jmp 133f1a <== ALWAYS TAKEN } #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_To_timespec( 133efb: 8b 45 e4 mov -0x1c(%ebp),%eax 133efe: 8b 55 e8 mov -0x18(%ebp),%edx 133f01: 89 43 08 mov %eax,0x8(%ebx) 133f04: 89 53 0c mov %edx,0xc(%ebx) &since_last_period, &status->since_last_period ); _Timestamp_To_timespec( 133f07: 8b 45 ec mov -0x14(%ebp),%eax 133f0a: 8b 55 f0 mov -0x10(%ebp),%edx 133f0d: 89 43 10 mov %eax,0x10(%ebx) 133f10: 89 53 14 mov %edx,0x14(%ebx) status->since_last_period = since_last_period; status->executed_since_last_period = executed; #endif } _Thread_Enable_dispatch(); 133f13: e8 a1 d5 fd ff call 1114b9 <_Thread_Enable_dispatch> 133f18: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 133f1a: 8b 5d fc mov -0x4(%ebp),%ebx 133f1d: c9 leave 133f1e: c3 ret 001340f5 : rtems_status_code rtems_rate_monotonic_period( rtems_id id, rtems_interval length ) { 1340f5: 55 push %ebp 1340f6: 89 e5 mov %esp,%ebp 1340f8: 57 push %edi 1340f9: 56 push %esi 1340fa: 53 push %ebx 1340fb: 83 ec 30 sub $0x30,%esp 1340fe: 8b 75 08 mov 0x8(%ebp),%esi 134101: 8b 5d 0c mov 0xc(%ebp),%ebx 134104: 8d 45 e4 lea -0x1c(%ebp),%eax 134107: 50 push %eax 134108: 56 push %esi 134109: 68 24 3a 16 00 push $0x163a24 13410e: e8 31 cb fd ff call 110c44 <_Objects_Get> 134113: 89 c7 mov %eax,%edi rtems_rate_monotonic_period_states local_state; ISR_Level level; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 134115: 83 c4 10 add $0x10,%esp 134118: 83 7d e4 00 cmpl $0x0,-0x1c(%ebp) 13411c: 0f 85 40 01 00 00 jne 134262 case OBJECTS_LOCAL: if ( !_Thread_Is_executing( the_period->owner ) ) { 134122: 8b 40 40 mov 0x40(%eax),%eax 134125: 3b 05 08 36 16 00 cmp 0x163608,%eax 13412b: 74 0f je 13413c _Thread_Enable_dispatch(); 13412d: e8 87 d3 fd ff call 1114b9 <_Thread_Enable_dispatch> 134132: bb 17 00 00 00 mov $0x17,%ebx return RTEMS_NOT_OWNER_OF_RESOURCE; 134137: e9 2b 01 00 00 jmp 134267 <== ALWAYS TAKEN } if ( length == RTEMS_PERIOD_STATUS ) { 13413c: 85 db test %ebx,%ebx 13413e: 75 19 jne 134159 switch ( the_period->state ) { 134140: 8b 47 38 mov 0x38(%edi),%eax 134143: 83 f8 04 cmp $0x4,%eax 134146: 77 07 ja 13414f <== ALWAYS TAKEN 134148: 8b 1c 85 04 82 15 00 mov 0x158204(,%eax,4),%ebx case RATE_MONOTONIC_ACTIVE: default: /* unreached -- only to remove warnings */ return_value = RTEMS_SUCCESSFUL; break; } _Thread_Enable_dispatch(); 13414f: e8 65 d3 fd ff call 1114b9 <_Thread_Enable_dispatch> return( return_value ); 134154: e9 0e 01 00 00 jmp 134267 <== ALWAYS TAKEN } _ISR_Disable( level ); 134159: 9c pushf 13415a: fa cli 13415b: 8f 45 d4 popl -0x2c(%ebp) switch ( the_period->state ) { 13415e: 8b 47 38 mov 0x38(%edi),%eax 134161: 83 f8 02 cmp $0x2,%eax 134164: 74 5f je 1341c5 134166: 83 f8 04 cmp $0x4,%eax 134169: 0f 84 ba 00 00 00 je 134229 13416f: 85 c0 test %eax,%eax 134171: 0f 85 eb 00 00 00 jne 134262 <== ALWAYS TAKEN case RATE_MONOTONIC_INACTIVE: { _ISR_Enable( level ); 134177: ff 75 d4 pushl -0x2c(%ebp) 13417a: 9d popf /* * Baseline statistics information for the beginning of a period. */ _Rate_monotonic_Initiate_statistics( the_period ); 13417b: 83 ec 0c sub $0xc,%esp 13417e: 57 push %edi 13417f: e8 9c fd ff ff call 133f20 <_Rate_monotonic_Initiate_statistics> <== ALWAYS TAKEN the_period->state = RATE_MONOTONIC_ACTIVE; 134184: 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; 13418b: c7 47 18 00 00 00 00 movl $0x0,0x18(%edi) the_watchdog->routine = routine; 134192: c7 47 2c 74 42 13 00 movl $0x134274,0x2c(%edi) the_watchdog->id = id; 134199: 89 77 30 mov %esi,0x30(%edi) the_watchdog->user_data = user_data; 13419c: c7 47 34 00 00 00 00 movl $0x0,0x34(%edi) _Rate_monotonic_Timeout, id, NULL ); the_period->next_length = length; 1341a3: 89 5f 3c mov %ebx,0x3c(%edi) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 1341a6: 89 5f 1c mov %ebx,0x1c(%edi) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 1341a9: 5b pop %ebx 1341aa: 5e pop %esi 1341ab: 83 c7 10 add $0x10,%edi 1341ae: 57 push %edi 1341af: 68 28 36 16 00 push $0x163628 1341b4: e8 63 e0 fd ff call 11221c <_Watchdog_Insert> _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); 1341b9: e8 fb d2 fd ff call 1114b9 <_Thread_Enable_dispatch> 1341be: 31 db xor %ebx,%ebx 1341c0: e9 98 00 00 00 jmp 13425d <== ALWAYS TAKEN case RATE_MONOTONIC_ACTIVE: /* * Update statistics from the concluding period. */ _Rate_monotonic_Update_statistics( the_period ); 1341c5: 83 ec 0c sub $0xc,%esp 1341c8: 57 push %edi 1341c9: e8 4c fe ff ff call 13401a <_Rate_monotonic_Update_statistics> <== ALWAYS TAKEN /* * 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; 1341ce: c7 47 38 01 00 00 00 movl $0x1,0x38(%edi) the_period->next_length = length; 1341d5: 89 5f 3c mov %ebx,0x3c(%edi) _ISR_Enable( level ); 1341d8: ff 75 d4 pushl -0x2c(%ebp) 1341db: 9d popf _Thread_Executing->Wait.id = the_period->Object.id; 1341dc: a1 08 36 16 00 mov 0x163608,%eax 1341e1: 8b 57 08 mov 0x8(%edi),%edx 1341e4: 89 50 20 mov %edx,0x20(%eax) _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); 1341e7: 5a pop %edx 1341e8: 59 pop %ecx 1341e9: 68 00 40 00 00 push $0x4000 1341ee: 50 push %eax 1341ef: e8 88 da fd ff call 111c7c <_Thread_Set_state> /* * Did the watchdog timer expire while we were actually blocking * on it? */ _ISR_Disable( level ); 1341f4: 9c pushf 1341f5: fa cli 1341f6: 5a pop %edx local_state = the_period->state; 1341f7: 8b 47 38 mov 0x38(%edi),%eax the_period->state = RATE_MONOTONIC_ACTIVE; 1341fa: c7 47 38 02 00 00 00 movl $0x2,0x38(%edi) _ISR_Enable( level ); 134201: 52 push %edx 134202: 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 ) 134203: 83 c4 10 add $0x10,%esp 134206: 83 f8 03 cmp $0x3,%eax 134209: 75 15 jne 134220 _Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); 13420b: 56 push %esi 13420c: 56 push %esi 13420d: 68 00 40 00 00 push $0x4000 134212: ff 35 08 36 16 00 pushl 0x163608 134218: e8 1f cf fd ff call 11113c <_Thread_Clear_state> 13421d: 83 c4 10 add $0x10,%esp _Thread_Enable_dispatch(); 134220: e8 94 d2 fd ff call 1114b9 <_Thread_Enable_dispatch> 134225: 31 db xor %ebx,%ebx return RTEMS_SUCCESSFUL; 134227: eb 3e jmp 134267 <== ALWAYS TAKEN case RATE_MONOTONIC_EXPIRED: /* * Update statistics from the concluding period */ _Rate_monotonic_Update_statistics( the_period ); 134229: 83 ec 0c sub $0xc,%esp 13422c: 57 push %edi 13422d: e8 e8 fd ff ff call 13401a <_Rate_monotonic_Update_statistics> <== ALWAYS TAKEN _ISR_Enable( level ); 134232: ff 75 d4 pushl -0x2c(%ebp) 134235: 9d popf the_period->state = RATE_MONOTONIC_ACTIVE; 134236: c7 47 38 02 00 00 00 movl $0x2,0x38(%edi) the_period->next_length = length; 13423d: 89 5f 3c mov %ebx,0x3c(%edi) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 134240: 89 5f 1c mov %ebx,0x1c(%edi) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 134243: 59 pop %ecx 134244: 5b pop %ebx 134245: 83 c7 10 add $0x10,%edi 134248: 57 push %edi 134249: 68 28 36 16 00 push $0x163628 13424e: e8 c9 df fd ff call 11221c <_Watchdog_Insert> _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); 134253: e8 61 d2 fd ff call 1114b9 <_Thread_Enable_dispatch> 134258: bb 06 00 00 00 mov $0x6,%ebx return RTEMS_TIMEOUT; 13425d: 83 c4 10 add $0x10,%esp 134260: eb 05 jmp 134267 <== ALWAYS TAKEN 134262: bb 04 00 00 00 mov $0x4,%ebx case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 134267: 89 d8 mov %ebx,%eax 134269: 8d 65 f4 lea -0xc(%ebp),%esp 13426c: 5b pop %ebx 13426d: 5e pop %esi 13426e: 5f pop %edi 13426f: c9 leave 134270: c3 ret 00126f3c : */ void rtems_rate_monotonic_report_statistics_with_plugin( void *context, rtems_printk_plugin_t print ) { 126f3c: 55 push %ebp 126f3d: 89 e5 mov %esp,%ebp 126f3f: 57 push %edi 126f40: 56 push %esi 126f41: 53 push %ebx 126f42: 83 ec 7c sub $0x7c,%esp 126f45: 8b 5d 08 mov 0x8(%ebp),%ebx 126f48: 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 ) 126f4b: 85 ff test %edi,%edi 126f4d: 0f 84 2b 01 00 00 je 12707e <== ALWAYS TAKEN return; (*print)( context, "Period information by period\n" ); 126f53: 52 push %edx 126f54: 52 push %edx 126f55: 68 c8 4c 15 00 push $0x154cc8 126f5a: 53 push %ebx 126f5b: ff d7 call *%edi #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ (*print)( context, "--- CPU times are in seconds ---\n" ); 126f5d: 5e pop %esi 126f5e: 58 pop %eax 126f5f: 68 e6 4c 15 00 push $0x154ce6 126f64: 53 push %ebx 126f65: ff d7 call *%edi (*print)( context, "--- Wall times are in seconds ---\n" ); 126f67: 5a pop %edx 126f68: 59 pop %ecx 126f69: 68 08 4d 15 00 push $0x154d08 126f6e: 53 push %ebx 126f6f: ff d7 call *%edi Be sure to test the various cases. (*print)( context,"\ 1234567890123456789012345678901234567890123456789012345678901234567890123456789\ \n"); */ (*print)( context, " ID OWNER COUNT MISSED " 126f71: 5e pop %esi 126f72: 58 pop %eax 126f73: 68 2b 4d 15 00 push $0x154d2b 126f78: 53 push %ebx 126f79: ff d7 call *%edi #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ " " #endif " WALL TIME\n" ); (*print)( context, " " 126f7b: 5a pop %edx 126f7c: 59 pop %ecx 126f7d: 68 76 4d 15 00 push $0x154d76 126f82: 53 push %ebx 126f83: 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 ; 126f85: 8b 35 2c 3a 16 00 mov 0x163a2c,%esi 126f8b: 83 c4 10 add $0x10,%esp 126f8e: e9 df 00 00 00 jmp 127072 id <= _Rate_monotonic_Information.maximum_id ; id++ ) { status = rtems_rate_monotonic_get_statistics( id, &the_stats ); 126f93: 50 push %eax 126f94: 50 push %eax 126f95: 8d 45 88 lea -0x78(%ebp),%eax 126f98: 50 push %eax 126f99: 56 push %esi 126f9a: e8 2d ce 00 00 call 133dcc if ( status != RTEMS_SUCCESSFUL ) 126f9f: 83 c4 10 add $0x10,%esp 126fa2: 85 c0 test %eax,%eax 126fa4: 0f 85 c7 00 00 00 jne 127071 <== ALWAYS TAKEN continue; /* If the above passed, so should this but check it anyway */ status = rtems_rate_monotonic_get_status( id, &the_status ); 126faa: 51 push %ecx 126fab: 51 push %ecx 126fac: 8d 55 c0 lea -0x40(%ebp),%edx 126faf: 52 push %edx 126fb0: 56 push %esi 126fb1: e8 ba ce 00 00 call 133e70 #if defined(RTEMS_DEBUG) if ( status != RTEMS_SUCCESSFUL ) continue; #endif rtems_object_get_name( the_status.owner, sizeof(name), name ); 126fb6: 83 c4 0c add $0xc,%esp 126fb9: 8d 45 e3 lea -0x1d(%ebp),%eax 126fbc: 50 push %eax 126fbd: 6a 05 push $0x5 126fbf: ff 75 c0 pushl -0x40(%ebp) 126fc2: e8 e5 82 fe ff call 10f2ac /* * Print part of report line that is not dependent on granularity */ (*print)( context, 126fc7: 58 pop %eax 126fc8: 5a pop %edx 126fc9: ff 75 8c pushl -0x74(%ebp) 126fcc: ff 75 88 pushl -0x78(%ebp) 126fcf: 8d 55 e3 lea -0x1d(%ebp),%edx 126fd2: 52 push %edx 126fd3: 56 push %esi 126fd4: 68 c2 4d 15 00 push $0x154dc2 126fd9: 53 push %ebx 126fda: ff d7 call *%edi ); /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { 126fdc: 8b 45 88 mov -0x78(%ebp),%eax 126fdf: 83 c4 20 add $0x20,%esp 126fe2: 85 c0 test %eax,%eax 126fe4: 75 0f jne 126ff5 (*print)( context, "\n" ); 126fe6: 51 push %ecx 126fe7: 51 push %ecx 126fe8: 68 7d 67 15 00 push $0x15677d 126fed: 53 push %ebx 126fee: ff d7 call *%edi continue; 126ff0: 83 c4 10 add $0x10,%esp 126ff3: eb 7c jmp 127071 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 ); 126ff5: 52 push %edx 126ff6: 8d 55 d8 lea -0x28(%ebp),%edx 126ff9: 52 push %edx 126ffa: 50 push %eax 126ffb: 8d 45 a0 lea -0x60(%ebp),%eax 126ffe: 50 push %eax 126fff: e8 60 14 00 00 call 128464 <_Timespec_Divide_by_integer> (*print)( context, 127004: 8b 45 dc mov -0x24(%ebp),%eax 127007: b9 e8 03 00 00 mov $0x3e8,%ecx 12700c: 99 cltd 12700d: f7 f9 idiv %ecx 12700f: 50 push %eax 127010: ff 75 d8 pushl -0x28(%ebp) 127013: 8b 45 9c mov -0x64(%ebp),%eax 127016: 99 cltd 127017: f7 f9 idiv %ecx 127019: 50 push %eax 12701a: ff 75 98 pushl -0x68(%ebp) 12701d: 8b 45 94 mov -0x6c(%ebp),%eax 127020: 99 cltd 127021: f7 f9 idiv %ecx 127023: 50 push %eax 127024: ff 75 90 pushl -0x70(%ebp) 127027: 68 d9 4d 15 00 push $0x154dd9 12702c: 53 push %ebx 12702d: 89 4d 84 mov %ecx,-0x7c(%ebp) 127030: 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); 127032: 83 c4 2c add $0x2c,%esp 127035: 8d 55 d8 lea -0x28(%ebp),%edx 127038: 52 push %edx 127039: ff 75 88 pushl -0x78(%ebp) 12703c: 8d 45 b8 lea -0x48(%ebp),%eax 12703f: 50 push %eax 127040: e8 1f 14 00 00 call 128464 <_Timespec_Divide_by_integer> (*print)( context, 127045: 8b 45 dc mov -0x24(%ebp),%eax 127048: 8b 4d 84 mov -0x7c(%ebp),%ecx 12704b: 99 cltd 12704c: f7 f9 idiv %ecx 12704e: 50 push %eax 12704f: ff 75 d8 pushl -0x28(%ebp) 127052: 8b 45 b4 mov -0x4c(%ebp),%eax 127055: 99 cltd 127056: f7 f9 idiv %ecx 127058: 50 push %eax 127059: ff 75 b0 pushl -0x50(%ebp) 12705c: 8b 45 ac mov -0x54(%ebp),%eax 12705f: 99 cltd 127060: f7 f9 idiv %ecx 127062: 50 push %eax 127063: ff 75 a8 pushl -0x58(%ebp) 127066: 68 f8 4d 15 00 push $0x154df8 12706b: 53 push %ebx 12706c: ff d7 call *%edi 12706e: 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++ ) { 127071: 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 ; 127072: 3b 35 30 3a 16 00 cmp 0x163a30,%esi 127078: 0f 86 15 ff ff ff jbe 126f93 <== ALWAYS TAKEN the_stats.min_wall_time, the_stats.max_wall_time, ival_wall, fval_wall ); #endif } } } 12707e: 8d 65 f4 lea -0xc(%ebp),%esp 127081: 5b pop %ebx 127082: 5e pop %esi 127083: 5f pop %edi 127084: c9 leave 127085: c3 ret 001270a0 : /* * rtems_rate_monotonic_reset_all_statistics */ void rtems_rate_monotonic_reset_all_statistics( void ) { 1270a0: 55 push %ebp 1270a1: 89 e5 mov %esp,%ebp 1270a3: 53 push %ebx 1270a4: 83 ec 04 sub $0x4,%esp 1270a7: a1 4c 35 16 00 mov 0x16354c,%eax 1270ac: 40 inc %eax 1270ad: a3 4c 35 16 00 mov %eax,0x16354c /* * Cycle through all possible ids and try to reset each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; 1270b2: 8b 1d 2c 3a 16 00 mov 0x163a2c,%ebx 1270b8: eb 0d jmp 1270c7 <== ALWAYS TAKEN id <= _Rate_monotonic_Information.maximum_id ; id++ ) { status = rtems_rate_monotonic_reset_statistics( id ); 1270ba: 83 ec 0c sub $0xc,%esp 1270bd: 53 push %ebx 1270be: e8 15 00 00 00 call 1270d8 <== ALWAYS TAKEN * Cycle through all possible ids and try to reset each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; id <= _Rate_monotonic_Information.maximum_id ; id++ ) { 1270c3: 43 inc %ebx 1270c4: 83 c4 10 add $0x10,%esp /* * Cycle through all possible ids and try to reset each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; 1270c7: 3b 1d 30 3a 16 00 cmp 0x163a30,%ebx 1270cd: 76 eb jbe 1270ba /* * Done so exit thread dispatching disabled critical section. */ _Thread_Enable_dispatch(); } 1270cf: 8b 5d fc mov -0x4(%ebp),%ebx 1270d2: c9 leave } /* * Done so exit thread dispatching disabled critical section. */ _Thread_Enable_dispatch(); 1270d3: e9 e1 a3 fe ff jmp 1114b9 <_Thread_Enable_dispatch> 00114b8c : uintptr_t length, uintptr_t page_size, rtems_attribute attribute_set, rtems_id *id ) { 114b8c: 55 push %ebp 114b8d: 89 e5 mov %esp,%ebp 114b8f: 57 push %edi 114b90: 56 push %esi 114b91: 53 push %ebx 114b92: 83 ec 1c sub $0x1c,%esp 114b95: 8b 75 0c mov 0xc(%ebp),%esi 114b98: 8b 7d 14 mov 0x14(%ebp),%edi rtems_status_code return_status; Region_Control *the_region; if ( !rtems_is_name_valid( name ) ) 114b9b: b8 03 00 00 00 mov $0x3,%eax 114ba0: 83 7d 08 00 cmpl $0x0,0x8(%ebp) 114ba4: 0f 84 de 00 00 00 je 114c88 return RTEMS_INVALID_NAME; if ( !starting_address ) 114baa: 85 f6 test %esi,%esi 114bac: 0f 84 d1 00 00 00 je 114c83 return RTEMS_INVALID_ADDRESS; if ( !id ) 114bb2: 83 7d 1c 00 cmpl $0x0,0x1c(%ebp) 114bb6: 0f 84 c7 00 00 00 je 114c83 return RTEMS_INVALID_ADDRESS; if ( !_Addresses_Is_aligned( starting_address ) ) 114bbc: f7 c6 03 00 00 00 test $0x3,%esi 114bc2: 0f 85 bb 00 00 00 jne 114c83 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); /* to prevent deletion */ 114bc8: 83 ec 0c sub $0xc,%esp 114bcb: ff 35 9c cb 13 00 pushl 0x13cb9c 114bd1: e8 a2 20 00 00 call 116c78 <_API_Mutex_Lock> <== ALWAYS TAKEN * This function allocates a region control block from * the inactive chain of free region control blocks. */ RTEMS_INLINE_ROUTINE Region_Control *_Region_Allocate( void ) { return (Region_Control *) _Objects_Allocate( &_Region_Information ); 114bd6: c7 04 24 f0 c9 13 00 movl $0x13c9f0,(%esp) 114bdd: e8 5a 32 00 00 call 117e3c <_Objects_Allocate> 114be2: 89 c3 mov %eax,%ebx the_region = _Region_Allocate(); if ( !the_region ) 114be4: 83 c4 10 add $0x10,%esp 114be7: b8 05 00 00 00 mov $0x5,%eax 114bec: 85 db test %ebx,%ebx 114bee: 74 7a je 114c6a return_status = RTEMS_TOO_MANY; else { the_region->maximum_segment_size = _Heap_Initialize( 114bf0: 57 push %edi 114bf1: ff 75 10 pushl 0x10(%ebp) 114bf4: 56 push %esi 114bf5: 8d 43 68 lea 0x68(%ebx),%eax 114bf8: 50 push %eax 114bf9: e8 66 2d 00 00 call 117964 <_Heap_Initialize> 114bfe: 89 43 5c mov %eax,0x5c(%ebx) &the_region->Memory, starting_address, length, page_size ); if ( !the_region->maximum_segment_size ) { 114c01: 83 c4 10 add $0x10,%esp 114c04: 85 c0 test %eax,%eax 114c06: 75 14 jne 114c1c */ RTEMS_INLINE_ROUTINE void _Region_Free ( Region_Control *the_region ) { _Objects_Free( &_Region_Information, &the_region->Object ); 114c08: 50 push %eax 114c09: 50 push %eax 114c0a: 53 push %ebx 114c0b: 68 f0 c9 13 00 push $0x13c9f0 114c10: e8 13 35 00 00 call 118128 <_Objects_Free> 114c15: b8 08 00 00 00 mov $0x8,%eax 114c1a: eb 4b jmp 114c67 <== ALWAYS TAKEN return_status = RTEMS_INVALID_SIZE; } else { the_region->starting_address = starting_address; 114c1c: 89 73 50 mov %esi,0x50(%ebx) the_region->length = length; 114c1f: 8b 45 10 mov 0x10(%ebp),%eax 114c22: 89 43 54 mov %eax,0x54(%ebx) the_region->page_size = page_size; 114c25: 89 7b 58 mov %edi,0x58(%ebx) the_region->attribute_set = attribute_set; 114c28: 8b 55 18 mov 0x18(%ebp),%edx 114c2b: 89 53 60 mov %edx,0x60(%ebx) the_region->number_of_used_blocks = 0; 114c2e: c7 43 64 00 00 00 00 movl $0x0,0x64(%ebx) _Thread_queue_Initialize( 114c35: 6a 06 push $0x6 114c37: 6a 40 push $0x40 114c39: 89 d0 mov %edx,%eax 114c3b: c1 e8 02 shr $0x2,%eax 114c3e: 83 e0 01 and $0x1,%eax 114c41: 50 push %eax 114c42: 8d 43 10 lea 0x10(%ebx),%eax 114c45: 50 push %eax 114c46: e8 21 45 00 00 call 11916c <_Thread_queue_Initialize> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 114c4b: 8b 43 08 mov 0x8(%ebx),%eax 114c4e: 0f b7 c8 movzwl %ax,%ecx 114c51: 8b 15 0c ca 13 00 mov 0x13ca0c,%edx 114c57: 89 1c 8a mov %ebx,(%edx,%ecx,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 114c5a: 8b 55 08 mov 0x8(%ebp),%edx 114c5d: 89 53 0c mov %edx,0xc(%ebx) &_Region_Information, &the_region->Object, (Objects_Name) name ); *id = the_region->Object.id; 114c60: 8b 55 1c mov 0x1c(%ebp),%edx 114c63: 89 02 mov %eax,(%edx) 114c65: 31 c0 xor %eax,%eax 114c67: 83 c4 10 add $0x10,%esp return_status = RTEMS_SUCCESSFUL; } } _RTEMS_Unlock_allocator(); 114c6a: 83 ec 0c sub $0xc,%esp 114c6d: ff 35 9c cb 13 00 pushl 0x13cb9c 114c73: 89 45 e4 mov %eax,-0x1c(%ebp) 114c76: e8 45 20 00 00 call 116cc0 <_API_Mutex_Unlock> <== ALWAYS TAKEN return return_status; 114c7b: 83 c4 10 add $0x10,%esp 114c7e: 8b 45 e4 mov -0x1c(%ebp),%eax 114c81: eb 05 jmp 114c88 <== ALWAYS TAKEN 114c83: b8 09 00 00 00 mov $0x9,%eax } 114c88: 8d 65 f4 lea -0xc(%ebp),%esp 114c8b: 5b pop %ebx 114c8c: 5e pop %esi 114c8d: 5f pop %edi 114c8e: c9 leave 114c8f: c3 ret 00114c90 : */ rtems_status_code rtems_region_delete( rtems_id id ) { 114c90: 55 push %ebp 114c91: 89 e5 mov %esp,%ebp 114c93: 56 push %esi 114c94: 53 push %ebx 114c95: 83 ec 1c sub $0x1c,%esp Objects_Locations location; rtems_status_code return_status; Region_Control *the_region; _RTEMS_Lock_allocator(); 114c98: ff 35 9c cb 13 00 pushl 0x13cb9c 114c9e: e8 d5 1f 00 00 call 116c78 <_API_Mutex_Lock> <== ALWAYS TAKEN RTEMS_INLINE_ROUTINE Region_Control *_Region_Get ( Objects_Id id, Objects_Locations *location ) { return (Region_Control *) 114ca3: 83 c4 0c add $0xc,%esp 114ca6: 8d 45 f4 lea -0xc(%ebp),%eax 114ca9: 50 push %eax 114caa: ff 75 08 pushl 0x8(%ebp) 114cad: 68 f0 c9 13 00 push $0x13c9f0 114cb2: e8 99 35 00 00 call 118250 <_Objects_Get_no_protection> 114cb7: 89 c6 mov %eax,%esi the_region = _Region_Get( id, &location ); switch ( location ) { 114cb9: 83 c4 10 add $0x10,%esp 114cbc: bb 04 00 00 00 mov $0x4,%ebx 114cc1: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 114cc5: 75 27 jne 114cee case OBJECTS_LOCAL: _Region_Debug_Walk( the_region, 5 ); if ( the_region->number_of_used_blocks != 0 ) 114cc7: b3 0c mov $0xc,%bl 114cc9: 83 78 64 00 cmpl $0x0,0x64(%eax) 114ccd: 75 1f jne 114cee return_status = RTEMS_RESOURCE_IN_USE; else { _Objects_Close( &_Region_Information, &the_region->Object ); 114ccf: 51 push %ecx 114cd0: 51 push %ecx 114cd1: 50 push %eax 114cd2: 68 f0 c9 13 00 push $0x13c9f0 114cd7: e8 cc 31 00 00 call 117ea8 <_Objects_Close> */ RTEMS_INLINE_ROUTINE void _Region_Free ( Region_Control *the_region ) { _Objects_Free( &_Region_Information, &the_region->Object ); 114cdc: 58 pop %eax 114cdd: 5a pop %edx 114cde: 56 push %esi 114cdf: 68 f0 c9 13 00 push $0x13c9f0 114ce4: e8 3f 34 00 00 call 118128 <_Objects_Free> 114ce9: 30 db xor %bl,%bl 114ceb: 83 c4 10 add $0x10,%esp default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 114cee: 83 ec 0c sub $0xc,%esp 114cf1: ff 35 9c cb 13 00 pushl 0x13cb9c 114cf7: e8 c4 1f 00 00 call 116cc0 <_API_Mutex_Unlock> <== ALWAYS TAKEN return return_status; } 114cfc: 89 d8 mov %ebx,%eax 114cfe: 8d 65 f8 lea -0x8(%ebp),%esp 114d01: 5b pop %ebx 114d02: 5e pop %esi 114d03: c9 leave 114d04: c3 ret 00114d08 : rtems_status_code rtems_region_extend( rtems_id id, void *starting_address, uintptr_t length ) { 114d08: 55 push %ebp 114d09: 89 e5 mov %esp,%ebp 114d0b: 57 push %edi 114d0c: 56 push %esi 114d0d: 53 push %ebx 114d0e: 83 ec 1c sub $0x1c,%esp 114d11: 8b 75 0c mov 0xc(%ebp),%esi Heap_Extend_status heap_status; Objects_Locations location; rtems_status_code return_status; Region_Control *the_region; if ( !starting_address ) 114d14: bf 09 00 00 00 mov $0x9,%edi 114d19: 85 f6 test %esi,%esi 114d1b: 74 76 je 114d93 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); /* to prevent deletion */ 114d1d: 83 ec 0c sub $0xc,%esp 114d20: ff 35 9c cb 13 00 pushl 0x13cb9c 114d26: e8 4d 1f 00 00 call 116c78 <_API_Mutex_Lock> RTEMS_INLINE_ROUTINE Region_Control *_Region_Get ( Objects_Id id, Objects_Locations *location ) { return (Region_Control *) 114d2b: 83 c4 0c add $0xc,%esp 114d2e: 8d 45 e0 lea -0x20(%ebp),%eax 114d31: 50 push %eax 114d32: ff 75 08 pushl 0x8(%ebp) 114d35: 68 f0 c9 13 00 push $0x13c9f0 114d3a: e8 11 35 00 00 call 118250 <_Objects_Get_no_protection> 114d3f: 89 c3 mov %eax,%ebx the_region = _Region_Get( id, &location ); switch ( location ) { 114d41: 83 c4 10 add $0x10,%esp 114d44: 66 bf 04 00 mov $0x4,%di 114d48: 83 7d e0 00 cmpl $0x0,-0x20(%ebp) 114d4c: 75 34 jne 114d82 case OBJECTS_LOCAL: heap_status = _Heap_Extend( 114d4e: 8d 45 e4 lea -0x1c(%ebp),%eax 114d51: 50 push %eax 114d52: ff 75 10 pushl 0x10(%ebp) 114d55: 56 push %esi 114d56: 8d 43 68 lea 0x68(%ebx),%eax 114d59: 50 push %eax 114d5a: e8 5d 29 00 00 call 1176bc <_Heap_Extend> starting_address, length, &amount_extended ); if ( heap_status == HEAP_EXTEND_SUCCESSFUL ) { 114d5f: 83 c4 10 add $0x10,%esp 114d62: 85 c0 test %eax,%eax 114d64: 75 0e jne 114d74 the_region->length += amount_extended; 114d66: 8b 45 e4 mov -0x1c(%ebp),%eax 114d69: 01 43 54 add %eax,0x54(%ebx) the_region->maximum_segment_size += amount_extended; 114d6c: 01 43 5c add %eax,0x5c(%ebx) 114d6f: 66 31 ff xor %di,%di 114d72: eb 0e jmp 114d82 <== ALWAYS TAKEN return_status = RTEMS_SUCCESSFUL; } else if ( heap_status == HEAP_EXTEND_ERROR ) { 114d74: 48 dec %eax 114d75: 0f 95 c0 setne %al 114d78: 0f b6 f8 movzbl %al,%edi 114d7b: 4f dec %edi 114d7c: 83 e7 f1 and $0xfffffff1,%edi 114d7f: 83 c7 18 add $0x18,%edi default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 114d82: 83 ec 0c sub $0xc,%esp 114d85: ff 35 9c cb 13 00 pushl 0x13cb9c 114d8b: e8 30 1f 00 00 call 116cc0 <_API_Mutex_Unlock> return return_status; 114d90: 83 c4 10 add $0x10,%esp } 114d93: 89 f8 mov %edi,%eax 114d95: 8d 65 f4 lea -0xc(%ebp),%esp 114d98: 5b pop %ebx 114d99: 5e pop %esi 114d9a: 5f pop %edi 114d9b: c9 leave 114d9c: c3 ret 00114e94 : uintptr_t size, rtems_option option_set, rtems_interval timeout, void **segment ) { 114e94: 55 push %ebp 114e95: 89 e5 mov %esp,%ebp 114e97: 57 push %edi 114e98: 56 push %esi 114e99: 53 push %ebx 114e9a: 83 ec 2c sub $0x2c,%esp 114e9d: 8b 7d 18 mov 0x18(%ebp),%edi Objects_Locations location; rtems_status_code return_status; Region_Control *the_region; void *the_segment; if ( !segment ) 114ea0: b8 09 00 00 00 mov $0x9,%eax 114ea5: 85 ff test %edi,%edi 114ea7: 0f 84 eb 00 00 00 je 114f98 return RTEMS_INVALID_ADDRESS; *segment = NULL; 114ead: c7 07 00 00 00 00 movl $0x0,(%edi) if ( size == 0 ) 114eb3: b0 08 mov $0x8,%al 114eb5: 83 7d 0c 00 cmpl $0x0,0xc(%ebp) 114eb9: 0f 84 d9 00 00 00 je 114f98 return RTEMS_INVALID_SIZE; _RTEMS_Lock_allocator(); 114ebf: 83 ec 0c sub $0xc,%esp 114ec2: ff 35 9c cb 13 00 pushl 0x13cb9c 114ec8: e8 ab 1d 00 00 call 116c78 <_API_Mutex_Lock> <== ALWAYS TAKEN executing = _Thread_Executing; 114ecd: 8b 35 a4 cb 13 00 mov 0x13cba4,%esi 114ed3: 83 c4 0c add $0xc,%esp 114ed6: 8d 45 e4 lea -0x1c(%ebp),%eax 114ed9: 50 push %eax 114eda: ff 75 08 pushl 0x8(%ebp) 114edd: 68 f0 c9 13 00 push $0x13c9f0 114ee2: e8 69 33 00 00 call 118250 <_Objects_Get_no_protection> 114ee7: 89 c3 mov %eax,%ebx the_region = _Region_Get( id, &location ); switch ( location ) { 114ee9: 83 c4 10 add $0x10,%esp _Thread_queue_Enqueue( &the_region->Wait_queue, timeout ); _Thread_Enable_dispatch(); return (rtems_status_code) executing->Wait.return_code; 114eec: b8 04 00 00 00 mov $0x4,%eax _RTEMS_Lock_allocator(); executing = _Thread_Executing; the_region = _Region_Get( id, &location ); switch ( location ) { 114ef1: 83 7d e4 00 cmpl $0x0,-0x1c(%ebp) 114ef5: 0f 85 86 00 00 00 jne 114f81 case OBJECTS_LOCAL: if ( size > the_region->maximum_segment_size ) 114efb: b0 08 mov $0x8,%al 114efd: 8b 55 0c mov 0xc(%ebp),%edx 114f00: 3b 53 5c cmp 0x5c(%ebx),%edx 114f03: 77 7c ja 114f81 * @brief See _Heap_Allocate_aligned_with_boundary() with alignment and * boundary equals zero. */ RTEMS_INLINE_ROUTINE void *_Heap_Allocate( Heap_Control *heap, uintptr_t size ) { return _Heap_Allocate_aligned_with_boundary( heap, size, 0, 0 ); 114f05: 6a 00 push $0x0 114f07: 6a 00 push $0x0 114f09: 52 push %edx 114f0a: 8d 43 68 lea 0x68(%ebx),%eax 114f0d: 50 push %eax 114f0e: e8 49 26 00 00 call 11755c <_Heap_Allocate_aligned_with_boundary> the_segment = _Region_Allocate_segment( the_region, size ); _Region_Debug_Walk( the_region, 2 ); if ( the_segment ) { 114f13: 83 c4 10 add $0x10,%esp 114f16: 85 c0 test %eax,%eax 114f18: 74 09 je 114f23 the_region->number_of_used_blocks += 1; 114f1a: ff 43 64 incl 0x64(%ebx) *segment = the_segment; 114f1d: 89 07 mov %eax,(%edi) 114f1f: 31 c0 xor %eax,%eax 114f21: eb 5e jmp 114f81 <== ALWAYS TAKEN return_status = RTEMS_SUCCESSFUL; } else if ( _Options_Is_no_wait( option_set ) ) { 114f23: b8 0d 00 00 00 mov $0xd,%eax 114f28: f6 45 10 01 testb $0x1,0x10(%ebp) 114f2c: 75 53 jne 114f81 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 114f2e: a1 e8 ca 13 00 mov 0x13cae8,%eax 114f33: 40 inc %eax 114f34: a3 e8 ca 13 00 mov %eax,0x13cae8 * Switch from using the memory allocation mutex to using a * dispatching disabled critical section. We have to do this * because this thread is going to block. */ _Thread_Disable_dispatch(); _RTEMS_Unlock_allocator(); 114f39: 83 ec 0c sub $0xc,%esp 114f3c: ff 35 9c cb 13 00 pushl 0x13cb9c 114f42: e8 79 1d 00 00 call 116cc0 <_API_Mutex_Unlock> <== ALWAYS TAKEN executing->Wait.queue = &the_region->Wait_queue; 114f47: 8d 43 10 lea 0x10(%ebx),%eax 114f4a: 89 46 44 mov %eax,0x44(%esi) executing->Wait.id = id; 114f4d: 8b 55 08 mov 0x8(%ebp),%edx 114f50: 89 56 20 mov %edx,0x20(%esi) executing->Wait.count = size; 114f53: 8b 55 0c mov 0xc(%ebp),%edx 114f56: 89 56 24 mov %edx,0x24(%esi) executing->Wait.return_argument = segment; 114f59: 89 7e 28 mov %edi,0x28(%esi) RTEMS_INLINE_ROUTINE void _Thread_queue_Enter_critical_section ( Thread_queue_Control *the_thread_queue ) { the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 114f5c: c7 43 40 01 00 00 00 movl $0x1,0x40(%ebx) _Thread_queue_Enter_critical_section( &the_region->Wait_queue ); _Thread_queue_Enqueue( &the_region->Wait_queue, timeout ); 114f63: 83 c4 0c add $0xc,%esp 114f66: 68 10 92 11 00 push $0x119210 114f6b: ff 75 14 pushl 0x14(%ebp) 114f6e: 50 push %eax 114f6f: e8 e0 3f 00 00 call 118f54 <_Thread_queue_Enqueue_with_handler> _Thread_Enable_dispatch(); 114f74: e8 44 3b 00 00 call 118abd <_Thread_Enable_dispatch> return (rtems_status_code) executing->Wait.return_code; 114f79: 8b 46 34 mov 0x34(%esi),%eax 114f7c: 83 c4 10 add $0x10,%esp 114f7f: eb 17 jmp 114f98 <== ALWAYS TAKEN default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 114f81: 83 ec 0c sub $0xc,%esp 114f84: ff 35 9c cb 13 00 pushl 0x13cb9c 114f8a: 89 45 d4 mov %eax,-0x2c(%ebp) 114f8d: e8 2e 1d 00 00 call 116cc0 <_API_Mutex_Unlock> <== ALWAYS TAKEN return return_status; 114f92: 83 c4 10 add $0x10,%esp 114f95: 8b 45 d4 mov -0x2c(%ebp),%eax } 114f98: 8d 65 f4 lea -0xc(%ebp),%esp 114f9b: 5b pop %ebx 114f9c: 5e pop %esi 114f9d: 5f pop %edi 114f9e: c9 leave 114f9f: c3 ret 00114fa0 : rtems_status_code rtems_region_get_segment_size( rtems_id id, void *segment, uintptr_t *size ) { 114fa0: 55 push %ebp 114fa1: 89 e5 mov %esp,%ebp 114fa3: 56 push %esi 114fa4: 53 push %ebx 114fa5: 83 ec 10 sub $0x10,%esp 114fa8: 8b 5d 0c mov 0xc(%ebp),%ebx 114fab: 8b 75 10 mov 0x10(%ebp),%esi Objects_Locations location; rtems_status_code return_status = RTEMS_SUCCESSFUL; register Region_Control *the_region; if ( !segment ) 114fae: 85 db test %ebx,%ebx 114fb0: 74 65 je 115017 <== ALWAYS TAKEN return RTEMS_INVALID_ADDRESS; if ( !size ) 114fb2: 85 f6 test %esi,%esi 114fb4: 74 61 je 115017 <== ALWAYS TAKEN return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); 114fb6: 83 ec 0c sub $0xc,%esp 114fb9: ff 35 9c cb 13 00 pushl 0x13cb9c 114fbf: e8 b4 1c 00 00 call 116c78 <_API_Mutex_Lock> <== ALWAYS TAKEN 114fc4: 83 c4 0c add $0xc,%esp 114fc7: 8d 45 f4 lea -0xc(%ebp),%eax 114fca: 50 push %eax 114fcb: ff 75 08 pushl 0x8(%ebp) 114fce: 68 f0 c9 13 00 push $0x13c9f0 114fd3: e8 78 32 00 00 call 118250 <_Objects_Get_no_protection> the_region = _Region_Get( id, &location ); switch ( location ) { 114fd8: 83 c4 10 add $0x10,%esp 114fdb: 8b 55 f4 mov -0xc(%ebp),%edx 114fde: 85 d2 test %edx,%edx 114fe0: 74 08 je 114fea 114fe2: bb 04 00 00 00 mov $0x4,%ebx 114fe7: 4a dec %edx 114fe8: eb 16 jmp 115000 case OBJECTS_LOCAL: if ( !_Heap_Size_of_alloc_area( &the_region->Memory, segment, size ) ) 114fea: 52 push %edx 114feb: 56 push %esi 114fec: 53 push %ebx 114fed: 83 c0 68 add $0x68,%eax 114ff0: 50 push %eax 114ff1: e8 4e 2d 00 00 call 117d44 <_Heap_Size_of_alloc_area> 114ff6: 83 c4 10 add $0x10,%esp 114ff9: bb 09 00 00 00 mov $0x9,%ebx 114ffe: 84 c0 test %al,%al 115000: 74 02 je 115004 115002: 31 db xor %ebx,%ebx case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 115004: 83 ec 0c sub $0xc,%esp 115007: ff 35 9c cb 13 00 pushl 0x13cb9c 11500d: e8 ae 1c 00 00 call 116cc0 <_API_Mutex_Unlock> <== ALWAYS TAKEN return return_status; 115012: 83 c4 10 add $0x10,%esp 115015: eb 05 jmp 11501c <== ALWAYS TAKEN 115017: bb 09 00 00 00 mov $0x9,%ebx } 11501c: 89 d8 mov %ebx,%eax 11501e: 8d 65 f8 lea -0x8(%ebp),%esp 115021: 5b pop %ebx 115022: 5e pop %esi 115023: c9 leave 115024: c3 ret 0011504c : rtems_id id, void *segment, uintptr_t size, uintptr_t *old_size ) { 11504c: 55 push %ebp 11504d: 89 e5 mov %esp,%ebp 11504f: 57 push %edi 115050: 56 push %esi 115051: 53 push %ebx 115052: 83 ec 1c sub $0x1c,%esp 115055: 8b 75 14 mov 0x14(%ebp),%esi uintptr_t osize; rtems_status_code return_status; Heap_Resize_status status; register Region_Control *the_region; if ( !old_size ) 115058: 85 f6 test %esi,%esi 11505a: 0f 84 95 00 00 00 je 1150f5 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); 115060: 83 ec 0c sub $0xc,%esp 115063: ff 35 9c cb 13 00 pushl 0x13cb9c 115069: e8 0a 1c 00 00 call 116c78 <_API_Mutex_Lock> 11506e: 83 c4 0c add $0xc,%esp 115071: 8d 45 e0 lea -0x20(%ebp),%eax 115074: 50 push %eax 115075: ff 75 08 pushl 0x8(%ebp) 115078: 68 f0 c9 13 00 push $0x13c9f0 11507d: e8 ce 31 00 00 call 118250 <_Objects_Get_no_protection> 115082: 89 c3 mov %eax,%ebx the_region = _Region_Get( id, &location ); switch ( location ) { 115084: 83 c4 10 add $0x10,%esp 115087: 83 7d e0 00 cmpl $0x0,-0x20(%ebp) 11508b: 75 50 jne 1150dd case OBJECTS_LOCAL: _Region_Debug_Walk( the_region, 7 ); status = _Heap_Resize_block( 11508d: 83 ec 0c sub $0xc,%esp 115090: 8d 45 e4 lea -0x1c(%ebp),%eax 115093: 50 push %eax 115094: 8d 45 dc lea -0x24(%ebp),%eax 115097: 50 push %eax 115098: ff 75 10 pushl 0x10(%ebp) 11509b: ff 75 0c pushl 0xc(%ebp) 11509e: 8d 43 68 lea 0x68(%ebx),%eax 1150a1: 50 push %eax 1150a2: e8 ad 2b 00 00 call 117c54 <_Heap_Resize_block> 1150a7: 89 c7 mov %eax,%edi segment, (uint32_t) size, &osize, &avail_size ); *old_size = (uint32_t) osize; 1150a9: 8b 45 dc mov -0x24(%ebp),%eax 1150ac: 89 06 mov %eax,(%esi) _Region_Debug_Walk( the_region, 8 ); if ( status == HEAP_RESIZE_SUCCESSFUL ) 1150ae: 83 c4 20 add $0x20,%esp 1150b1: 85 ff test %edi,%edi 1150b3: 75 0d jne 1150c2 _Region_Process_queue( the_region ); /* unlocks allocator */ 1150b5: 83 ec 0c sub $0xc,%esp 1150b8: 53 push %ebx 1150b9: e8 5e 62 00 00 call 11b31c <_Region_Process_queue> 1150be: 31 c0 xor %eax,%eax 1150c0: eb 2e jmp 1150f0 <== ALWAYS TAKEN else _RTEMS_Unlock_allocator(); 1150c2: 83 ec 0c sub $0xc,%esp 1150c5: ff 35 9c cb 13 00 pushl 0x13cb9c 1150cb: e8 f0 1b 00 00 call 116cc0 <_API_Mutex_Unlock> if (status == HEAP_RESIZE_SUCCESSFUL) return RTEMS_SUCCESSFUL; if (status == HEAP_RESIZE_UNSATISFIED) 1150d0: 83 c4 10 add $0x10,%esp 1150d3: b8 0d 00 00 00 mov $0xd,%eax 1150d8: 4f dec %edi 1150d9: 75 1a jne 1150f5 1150db: eb 1d jmp 1150fa <== ALWAYS TAKEN default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 1150dd: 83 ec 0c sub $0xc,%esp 1150e0: ff 35 9c cb 13 00 pushl 0x13cb9c 1150e6: e8 d5 1b 00 00 call 116cc0 <_API_Mutex_Unlock> 1150eb: b8 04 00 00 00 mov $0x4,%eax return return_status; 1150f0: 83 c4 10 add $0x10,%esp 1150f3: eb 05 jmp 1150fa <== ALWAYS TAKEN 1150f5: b8 09 00 00 00 mov $0x9,%eax } 1150fa: 8d 65 f4 lea -0xc(%ebp),%esp 1150fd: 5b pop %ebx 1150fe: 5e pop %esi 1150ff: 5f pop %edi 115100: c9 leave 115101: c3 ret 00115104 : rtems_status_code rtems_region_return_segment( rtems_id id, void *segment ) { 115104: 55 push %ebp 115105: 89 e5 mov %esp,%ebp 115107: 56 push %esi 115108: 53 push %ebx 115109: 83 ec 1c sub $0x1c,%esp uint32_t size; #endif int status; register Region_Control *the_region; _RTEMS_Lock_allocator(); 11510c: ff 35 9c cb 13 00 pushl 0x13cb9c 115112: e8 61 1b 00 00 call 116c78 <_API_Mutex_Lock> <== ALWAYS TAKEN 115117: 83 c4 0c add $0xc,%esp 11511a: 8d 45 f4 lea -0xc(%ebp),%eax 11511d: 50 push %eax 11511e: ff 75 08 pushl 0x8(%ebp) 115121: 68 f0 c9 13 00 push $0x13c9f0 115126: e8 25 31 00 00 call 118250 <_Objects_Get_no_protection> 11512b: 89 c3 mov %eax,%ebx the_region = _Region_Get( id, &location ); switch ( location ) { 11512d: 83 c4 10 add $0x10,%esp 115130: be 04 00 00 00 mov $0x4,%esi 115135: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 115139: 75 2a jne 115165 RTEMS_INLINE_ROUTINE bool _Region_Free_segment ( Region_Control *the_region, void *the_segment ) { return _Heap_Free( &the_region->Memory, the_segment ); 11513b: 50 push %eax 11513c: 50 push %eax 11513d: ff 75 0c pushl 0xc(%ebp) 115140: 8d 43 68 lea 0x68(%ebx),%eax 115143: 50 push %eax 115144: e8 fb 25 00 00 call 117744 <_Heap_Free> #endif status = _Region_Free_segment( the_region, segment ); _Region_Debug_Walk( the_region, 4 ); if ( !status ) 115149: 83 c4 10 add $0x10,%esp else { the_region->number_of_used_blocks -= 1; _Region_Process_queue(the_region); /* unlocks allocator */ return RTEMS_SUCCESSFUL; 11514c: 66 be 09 00 mov $0x9,%si #endif status = _Region_Free_segment( the_region, segment ); _Region_Debug_Walk( the_region, 4 ); if ( !status ) 115150: 84 c0 test %al,%al 115152: 74 11 je 115165 return_status = RTEMS_INVALID_ADDRESS; else { the_region->number_of_used_blocks -= 1; 115154: ff 4b 64 decl 0x64(%ebx) _Region_Process_queue(the_region); /* unlocks allocator */ 115157: 83 ec 0c sub $0xc,%esp 11515a: 53 push %ebx 11515b: e8 bc 61 00 00 call 11b31c <_Region_Process_queue> 115160: 66 31 f6 xor %si,%si 115163: eb 0e jmp 115173 <== ALWAYS TAKEN default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 115165: 83 ec 0c sub $0xc,%esp 115168: ff 35 9c cb 13 00 pushl 0x13cb9c 11516e: e8 4d 1b 00 00 call 116cc0 <_API_Mutex_Unlock> return return_status; 115173: 83 c4 10 add $0x10,%esp } 115176: 89 f0 mov %esi,%eax 115178: 8d 65 f8 lea -0x8(%ebp),%esp 11517b: 5b pop %ebx 11517c: 5e pop %esi 11517d: c9 leave 11517e: c3 ret 00109d00 : uint32_t count, rtems_attribute attribute_set, rtems_task_priority priority_ceiling, rtems_id *id ) { 109d00: 55 push %ebp 109d01: 89 e5 mov %esp,%ebp 109d03: 57 push %edi 109d04: 56 push %esi 109d05: 53 push %ebx 109d06: 83 ec 3c sub $0x3c,%esp 109d09: 8b 7d 0c mov 0xc(%ebp),%edi 109d0c: 8b 5d 10 mov 0x10(%ebp),%ebx register Semaphore_Control *the_semaphore; CORE_mutex_Attributes the_mutex_attr; CORE_semaphore_Attributes the_semaphore_attr; CORE_mutex_Status mutex_status; if ( !rtems_is_name_valid( name ) ) 109d0f: b8 03 00 00 00 mov $0x3,%eax 109d14: 83 7d 08 00 cmpl $0x0,0x8(%ebp) 109d18: 0f 84 74 01 00 00 je 109e92 return RTEMS_INVALID_NAME; if ( !id ) 109d1e: b0 09 mov $0x9,%al 109d20: 83 7d 18 00 cmpl $0x0,0x18(%ebp) 109d24: 0f 84 68 01 00 00 je 109e92 return RTEMS_NOT_DEFINED; } else #endif if ( _Attributes_Is_inherit_priority( attribute_set ) || 109d2a: 89 d8 mov %ebx,%eax 109d2c: 25 c0 00 00 00 and $0xc0,%eax 109d31: 74 22 je 109d55 _Attributes_Is_priority_ceiling( attribute_set ) ) { if ( ! (_Attributes_Is_binary_semaphore( attribute_set ) && 109d33: 89 da mov %ebx,%edx 109d35: 83 e2 30 and $0x30,%edx 109d38: 83 fa 10 cmp $0x10,%edx 109d3b: 0f 85 4c 01 00 00 jne 109e8d 109d41: f6 c3 04 test $0x4,%bl 109d44: 0f 84 43 01 00 00 je 109e8d _Attributes_Is_priority( attribute_set ) ) ) return RTEMS_NOT_DEFINED; } if ( _Attributes_Is_inherit_priority( attribute_set ) && 109d4a: 3d c0 00 00 00 cmp $0xc0,%eax 109d4f: 0f 84 38 01 00 00 je 109e8d _Attributes_Is_priority_ceiling( attribute_set ) ) return RTEMS_NOT_DEFINED; if ( !_Attributes_Is_counting_semaphore( attribute_set ) && ( count > 1 ) ) 109d55: 89 da mov %ebx,%edx 109d57: 83 e2 30 and $0x30,%edx 109d5a: 74 0e je 109d6a 109d5c: b8 0a 00 00 00 mov $0xa,%eax 109d61: 83 ff 01 cmp $0x1,%edi 109d64: 0f 87 28 01 00 00 ja 109e92 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 109d6a: a1 74 38 12 00 mov 0x123874,%eax 109d6f: 40 inc %eax 109d70: a3 74 38 12 00 mov %eax,0x123874 * This function allocates a semaphore control block from * the inactive chain of free semaphore control blocks. */ RTEMS_INLINE_ROUTINE Semaphore_Control *_Semaphore_Allocate( void ) { return (Semaphore_Control *) _Objects_Allocate( &_Semaphore_Information ); 109d75: 83 ec 0c sub $0xc,%esp 109d78: 68 bc 37 12 00 push $0x1237bc 109d7d: 89 55 c4 mov %edx,-0x3c(%ebp) 109d80: e8 b7 11 00 00 call 10af3c <_Objects_Allocate> 109d85: 89 c6 mov %eax,%esi _Thread_Disable_dispatch(); /* prevents deletion */ the_semaphore = _Semaphore_Allocate(); if ( !the_semaphore ) { 109d87: 83 c4 10 add $0x10,%esp 109d8a: 85 c0 test %eax,%eax 109d8c: 8b 55 c4 mov -0x3c(%ebp),%edx 109d8f: 75 0f jne 109da0 _Thread_Enable_dispatch(); 109d91: e8 7f 1d 00 00 call 10bb15 <_Thread_Enable_dispatch> 109d96: b8 05 00 00 00 mov $0x5,%eax return RTEMS_TOO_MANY; 109d9b: e9 f2 00 00 00 jmp 109e92 <== ALWAYS TAKEN _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } #endif the_semaphore->attribute_set = attribute_set; 109da0: 89 58 10 mov %ebx,0x10(%eax) /* * Initialize it as a counting semaphore. */ if ( _Attributes_Is_counting_semaphore( attribute_set ) ) { 109da3: 85 d2 test %edx,%edx 109da5: 75 37 jne 109dde /* * This effectively disables limit checking. */ the_semaphore_attr.maximum_count = 0xFFFFFFFF; 109da7: c7 45 e0 ff ff ff ff movl $0xffffffff,-0x20(%ebp) if ( _Attributes_Is_priority( attribute_set ) ) the_semaphore_attr.discipline = CORE_SEMAPHORE_DISCIPLINES_PRIORITY; 109dae: 31 c0 xor %eax,%eax 109db0: f6 c3 04 test $0x4,%bl 109db3: 0f 95 c0 setne %al 109db6: 89 45 e4 mov %eax,-0x1c(%ebp) the_semaphore_attr.discipline = CORE_SEMAPHORE_DISCIPLINES_FIFO; /* * The following are just to make Purify happy. */ the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; 109db9: c7 45 d0 00 00 00 00 movl $0x0,-0x30(%ebp) the_mutex_attr.priority_ceiling = PRIORITY_MINIMUM; 109dc0: c7 45 dc 00 00 00 00 movl $0x0,-0x24(%ebp) _CORE_semaphore_Initialize( 109dc7: 51 push %ecx 109dc8: 57 push %edi 109dc9: 8d 45 e0 lea -0x20(%ebp),%eax 109dcc: 50 push %eax 109dcd: 8d 46 14 lea 0x14(%esi),%eax 109dd0: 50 push %eax 109dd1: e8 c2 0c 00 00 call 10aa98 <_CORE_semaphore_Initialize> <== ALWAYS TAKEN 109dd6: 83 c4 10 add $0x10,%esp 109dd9: e9 8c 00 00 00 jmp 109e6a <== ALWAYS TAKEN /* * It is either simple binary semaphore or a more powerful mutex * style binary semaphore. This is the mutex style. */ if ( _Attributes_Is_priority( attribute_set ) ) the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY; 109dde: 31 c0 xor %eax,%eax 109de0: f6 c3 04 test $0x4,%bl 109de3: 0f 95 c0 setne %al 109de6: 89 45 d8 mov %eax,-0x28(%ebp) else the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_FIFO; if ( _Attributes_Is_binary_semaphore( attribute_set ) ) { 109de9: 83 fa 10 cmp $0x10,%edx 109dec: 75 36 jne 109e24 the_mutex_attr.priority_ceiling = priority_ceiling; 109dee: 8b 45 14 mov 0x14(%ebp),%eax 109df1: 89 45 dc mov %eax,-0x24(%ebp) the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; 109df4: c7 45 d0 00 00 00 00 movl $0x0,-0x30(%ebp) the_mutex_attr.only_owner_release = false; 109dfb: c6 45 d4 00 movb $0x0,-0x2c(%ebp) if ( the_mutex_attr.discipline == CORE_MUTEX_DISCIPLINES_PRIORITY ) { 109dff: 83 7d d8 01 cmpl $0x1,-0x28(%ebp) 109e03: 75 2a jne 109e2f if ( _Attributes_Is_inherit_priority( attribute_set ) ) { 109e05: f6 c3 40 test $0x40,%bl 109e08: 74 09 je 109e13 the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; 109e0a: c7 45 d8 02 00 00 00 movl $0x2,-0x28(%ebp) 109e11: eb 0b jmp 109e1e <== ALWAYS TAKEN the_mutex_attr.only_owner_release = true; } else if ( _Attributes_Is_priority_ceiling( attribute_set ) ) { 109e13: 84 db test %bl,%bl 109e15: 79 18 jns 109e2f the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING; 109e17: c7 45 d8 03 00 00 00 movl $0x3,-0x28(%ebp) the_mutex_attr.only_owner_release = true; 109e1e: c6 45 d4 01 movb $0x1,-0x2c(%ebp) 109e22: eb 0b jmp 109e2f <== ALWAYS TAKEN } } } else /* must be simple binary semaphore */ { the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_BLOCKS; 109e24: c7 45 d0 02 00 00 00 movl $0x2,-0x30(%ebp) the_mutex_attr.only_owner_release = false; 109e2b: c6 45 d4 00 movb $0x0,-0x2c(%ebp) } mutex_status = _CORE_mutex_Initialize( 109e2f: 52 push %edx 109e30: 31 c0 xor %eax,%eax 109e32: 83 ff 01 cmp $0x1,%edi 109e35: 0f 94 c0 sete %al 109e38: 50 push %eax 109e39: 8d 45 d0 lea -0x30(%ebp),%eax 109e3c: 50 push %eax 109e3d: 8d 46 14 lea 0x14(%esi),%eax 109e40: 50 push %eax 109e41: e8 e6 09 00 00 call 10a82c <_CORE_mutex_Initialize> <== ALWAYS TAKEN &the_semaphore->Core_control.mutex, &the_mutex_attr, (count == 1) ? CORE_MUTEX_UNLOCKED : CORE_MUTEX_LOCKED ); if ( mutex_status == CORE_MUTEX_STATUS_CEILING_VIOLATED ) { 109e46: 83 c4 10 add $0x10,%esp 109e49: 83 f8 06 cmp $0x6,%eax 109e4c: 75 1c jne 109e6a */ RTEMS_INLINE_ROUTINE void _Semaphore_Free ( Semaphore_Control *the_semaphore ) { _Objects_Free( &_Semaphore_Information, &the_semaphore->Object ); 109e4e: 50 push %eax 109e4f: 50 push %eax 109e50: 56 push %esi 109e51: 68 bc 37 12 00 push $0x1237bc 109e56: e8 cd 13 00 00 call 10b228 <_Objects_Free> _Semaphore_Free( the_semaphore ); _Thread_Enable_dispatch(); 109e5b: e8 b5 1c 00 00 call 10bb15 <_Thread_Enable_dispatch> 109e60: b8 13 00 00 00 mov $0x13,%eax return RTEMS_INVALID_PRIORITY; 109e65: 83 c4 10 add $0x10,%esp 109e68: eb 28 jmp 109e92 <== ALWAYS TAKEN #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 109e6a: 8b 46 08 mov 0x8(%esi),%eax 109e6d: 0f b7 c8 movzwl %ax,%ecx 109e70: 8b 15 d8 37 12 00 mov 0x1237d8,%edx 109e76: 89 34 8a mov %esi,(%edx,%ecx,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 109e79: 8b 55 08 mov 0x8(%ebp),%edx 109e7c: 89 56 0c mov %edx,0xc(%esi) &_Semaphore_Information, &the_semaphore->Object, (Objects_Name) name ); *id = the_semaphore->Object.id; 109e7f: 8b 55 18 mov 0x18(%ebp),%edx 109e82: 89 02 mov %eax,(%edx) the_semaphore->Object.id, name, 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); 109e84: e8 8c 1c 00 00 call 10bb15 <_Thread_Enable_dispatch> 109e89: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 109e8b: eb 05 jmp 109e92 <== ALWAYS TAKEN 109e8d: b8 0b 00 00 00 mov $0xb,%eax } 109e92: 8d 65 f4 lea -0xc(%ebp),%esp 109e95: 5b pop %ebx 109e96: 5e pop %esi 109e97: 5f pop %edi 109e98: c9 leave 109e99: c3 ret 00109e9c : #endif rtems_status_code rtems_semaphore_delete( rtems_id id ) { 109e9c: 55 push %ebp 109e9d: 89 e5 mov %esp,%ebp 109e9f: 53 push %ebx 109ea0: 83 ec 18 sub $0x18,%esp RTEMS_INLINE_ROUTINE Semaphore_Control *_Semaphore_Get ( Objects_Id id, Objects_Locations *location ) { return (Semaphore_Control *) 109ea3: 8d 45 f4 lea -0xc(%ebp),%eax 109ea6: 50 push %eax 109ea7: ff 75 08 pushl 0x8(%ebp) 109eaa: 68 bc 37 12 00 push $0x1237bc 109eaf: e8 9c 14 00 00 call 10b350 <_Objects_Get> 109eb4: 89 c3 mov %eax,%ebx register Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _Semaphore_Get( id, &location ); switch ( location ) { 109eb6: 83 c4 10 add $0x10,%esp 109eb9: b8 04 00 00 00 mov $0x4,%eax 109ebe: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 109ec2: 75 61 jne 109f25 */ RTEMS_INLINE_ROUTINE bool _Attributes_Is_counting_semaphore( rtems_attribute attribute_set ) { return ((attribute_set & RTEMS_SEMAPHORE_CLASS) == RTEMS_COUNTING_SEMAPHORE); 109ec4: 8b 43 10 mov 0x10(%ebx),%eax case OBJECTS_LOCAL: if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) { 109ec7: 83 e0 30 and $0x30,%eax 109eca: 74 27 je 109ef3 if ( _CORE_mutex_Is_locked( &the_semaphore->Core_control.mutex ) && 109ecc: 83 7b 64 00 cmpl $0x0,0x64(%ebx) 109ed0: 75 11 jne 109ee3 109ed2: 83 f8 20 cmp $0x20,%eax 109ed5: 74 0c je 109ee3 !_Attributes_Is_simple_binary_semaphore( the_semaphore->attribute_set ) ) { _Thread_Enable_dispatch(); 109ed7: e8 39 1c 00 00 call 10bb15 <_Thread_Enable_dispatch> 109edc: b8 0c 00 00 00 mov $0xc,%eax return RTEMS_RESOURCE_IN_USE; 109ee1: eb 42 jmp 109f25 <== ALWAYS TAKEN } _CORE_mutex_Flush( 109ee3: 51 push %ecx 109ee4: 6a 04 push $0x4 109ee6: 6a 00 push $0x0 109ee8: 8d 43 14 lea 0x14(%ebx),%eax 109eeb: 50 push %eax 109eec: e8 2f 09 00 00 call 10a820 <_CORE_mutex_Flush> <== ALWAYS TAKEN 109ef1: eb 0e jmp 109f01 <== ALWAYS TAKEN &the_semaphore->Core_control.mutex, SEMAPHORE_MP_OBJECT_WAS_DELETED, CORE_MUTEX_WAS_DELETED ); } else { _CORE_semaphore_Flush( 109ef3: 52 push %edx 109ef4: 6a 02 push $0x2 109ef6: 6a 00 push $0x0 109ef8: 8d 43 14 lea 0x14(%ebx),%eax 109efb: 50 push %eax 109efc: e8 8b 0b 00 00 call 10aa8c <_CORE_semaphore_Flush> <== ALWAYS TAKEN 109f01: 59 pop %ecx 109f02: 58 pop %eax SEMAPHORE_MP_OBJECT_WAS_DELETED, CORE_SEMAPHORE_WAS_DELETED ); } _Objects_Close( &_Semaphore_Information, &the_semaphore->Object ); 109f03: 53 push %ebx 109f04: 68 bc 37 12 00 push $0x1237bc 109f09: e8 9a 10 00 00 call 10afa8 <_Objects_Close> */ RTEMS_INLINE_ROUTINE void _Semaphore_Free ( Semaphore_Control *the_semaphore ) { _Objects_Free( &_Semaphore_Information, &the_semaphore->Object ); 109f0e: 58 pop %eax 109f0f: 5a pop %edx 109f10: 53 push %ebx 109f11: 68 bc 37 12 00 push $0x1237bc 109f16: e8 0d 13 00 00 call 10b228 <_Objects_Free> 0, /* Not used */ 0 /* Not used */ ); } #endif _Thread_Enable_dispatch(); 109f1b: e8 f5 1b 00 00 call 10bb15 <_Thread_Enable_dispatch> 109f20: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 109f22: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 109f25: 8b 5d fc mov -0x4(%ebp),%ebx 109f28: c9 leave 109f29: c3 ret 001123e8 : #endif rtems_status_code rtems_semaphore_flush( rtems_id id ) { 1123e8: 55 push %ebp 1123e9: 89 e5 mov %esp,%ebp 1123eb: 83 ec 1c sub $0x1c,%esp 1123ee: 8d 45 f4 lea -0xc(%ebp),%eax 1123f1: 50 push %eax 1123f2: ff 75 08 pushl 0x8(%ebp) 1123f5: 68 3c 83 12 00 push $0x12833c 1123fa: e8 b1 a5 ff ff call 10c9b0 <_Objects_Get> 1123ff: 89 c2 mov %eax,%edx register Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _Semaphore_Get( id, &location ); switch ( location ) { 112401: 83 c4 10 add $0x10,%esp 112404: b8 04 00 00 00 mov $0x4,%eax 112409: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 11240d: 75 2b jne 11243a case OBJECTS_LOCAL: if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) { 11240f: f6 42 10 30 testb $0x30,0x10(%edx) 112413: 8d 42 14 lea 0x14(%edx),%eax 112416: 74 0d je 112425 _CORE_mutex_Flush( 112418: 51 push %ecx 112419: 6a 01 push $0x1 11241b: 6a 00 push $0x0 11241d: 50 push %eax 11241e: e8 01 9a ff ff call 10be24 <_CORE_mutex_Flush> <== ALWAYS TAKEN 112423: eb 0b jmp 112430 <== ALWAYS TAKEN &the_semaphore->Core_control.mutex, SEND_OBJECT_WAS_DELETED, CORE_MUTEX_STATUS_UNSATISFIED_NOWAIT ); } else { _CORE_semaphore_Flush( 112425: 52 push %edx 112426: 6a 01 push $0x1 112428: 6a 00 push $0x0 11242a: 50 push %eax 11242b: e8 60 9c ff ff call 10c090 <_CORE_semaphore_Flush> 112430: 83 c4 10 add $0x10,%esp &the_semaphore->Core_control.semaphore, SEND_OBJECT_WAS_DELETED, CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT ); } _Thread_Enable_dispatch(); 112433: e8 bd ad ff ff call 10d1f5 <_Thread_Enable_dispatch> 112438: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11243a: c9 leave 11243b: c3 ret 00109f2c : rtems_status_code rtems_semaphore_obtain( rtems_id id, rtems_option option_set, rtems_interval timeout ) { 109f2c: 55 push %ebp 109f2d: 89 e5 mov %esp,%ebp 109f2f: 57 push %edi 109f30: 56 push %esi 109f31: 53 push %ebx 109f32: 83 ec 1c sub $0x1c,%esp 109f35: 8b 5d 08 mov 0x8(%ebp),%ebx 109f38: 8b 7d 0c mov 0xc(%ebp),%edi 109f3b: 8b 75 10 mov 0x10(%ebp),%esi Objects_Id id, Objects_Locations *location, ISR_Level *level ) { return (Semaphore_Control *) 109f3e: 8d 45 e0 lea -0x20(%ebp),%eax 109f41: 50 push %eax 109f42: 8d 45 e4 lea -0x1c(%ebp),%eax 109f45: 50 push %eax 109f46: 53 push %ebx 109f47: 68 bc 37 12 00 push $0x1237bc 109f4c: e8 af 13 00 00 call 10b300 <_Objects_Get_isr_disable> 109f51: 89 c2 mov %eax,%edx register Semaphore_Control *the_semaphore; Objects_Locations location; ISR_Level level; the_semaphore = _Semaphore_Get_interrupt_disable( id, &location, &level ); switch ( location ) { 109f53: 83 c4 10 add $0x10,%esp 109f56: b8 04 00 00 00 mov $0x4,%eax 109f5b: 83 7d e4 00 cmpl $0x0,-0x1c(%ebp) 109f5f: 0f 85 a8 00 00 00 jne 10a00d case OBJECTS_LOCAL: if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) { 109f65: f6 42 10 30 testb $0x30,0x10(%edx) 109f69: 74 2a je 109f95 _CORE_mutex_Seize( 109f6b: 83 ec 0c sub $0xc,%esp 109f6e: ff 75 e0 pushl -0x20(%ebp) 109f71: 56 push %esi 109f72: 83 e7 01 and $0x1,%edi 109f75: 83 f7 01 xor $0x1,%edi 109f78: 57 push %edi 109f79: 53 push %ebx 109f7a: 83 c2 14 add $0x14,%edx 109f7d: 52 push %edx 109f7e: e8 92 09 00 00 call 10a915 <_CORE_mutex_Seize> <== ALWAYS TAKEN id, ((_Options_Is_no_wait( option_set )) ? false : true), timeout, level ); return _Semaphore_Translate_core_mutex_return_code( 109f83: 83 c4 14 add $0x14,%esp 109f86: a1 30 39 12 00 mov 0x123930,%eax 109f8b: ff 70 34 pushl 0x34(%eax) 109f8e: e8 f5 00 00 00 call 10a088 <_Semaphore_Translate_core_mutex_return_code> <== ALWAYS TAKEN 109f93: eb 75 jmp 10a00a <== ALWAYS TAKEN { Thread_Control *executing; /* disabled when you get here */ executing = _Thread_Executing; 109f95: a1 30 39 12 00 mov 0x123930,%eax executing->Wait.return_code = CORE_SEMAPHORE_STATUS_SUCCESSFUL; 109f9a: c7 40 34 00 00 00 00 movl $0x0,0x34(%eax) if ( the_semaphore->count != 0 ) { 109fa1: 8b 4a 5c mov 0x5c(%edx),%ecx 109fa4: 85 c9 test %ecx,%ecx 109fa6: 74 0a je 109fb2 the_semaphore->count -= 1; 109fa8: 49 dec %ecx 109fa9: 89 4a 5c mov %ecx,0x5c(%edx) _ISR_Enable( *level_p ); 109fac: ff 75 e0 pushl -0x20(%ebp) 109faf: 9d popf 109fb0: eb 48 jmp 109ffa <== ALWAYS TAKEN return; } if ( !wait ) { 109fb2: 83 e7 01 and $0x1,%edi 109fb5: 74 0d je 109fc4 _ISR_Enable( *level_p ); 109fb7: ff 75 e0 pushl -0x20(%ebp) 109fba: 9d popf executing->Wait.return_code = CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT; 109fbb: c7 40 34 01 00 00 00 movl $0x1,0x34(%eax) 109fc2: eb 36 jmp 109ffa <== ALWAYS TAKEN 109fc4: 8b 0d 74 38 12 00 mov 0x123874,%ecx 109fca: 41 inc %ecx 109fcb: 89 0d 74 38 12 00 mov %ecx,0x123874 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; 109fd1: c7 42 44 01 00 00 00 movl $0x1,0x44(%edx) return; } _Thread_Disable_dispatch(); _Thread_queue_Enter_critical_section( &the_semaphore->Wait_queue ); executing->Wait.queue = &the_semaphore->Wait_queue; 109fd8: 83 c2 14 add $0x14,%edx 109fdb: 89 50 44 mov %edx,0x44(%eax) executing->Wait.id = id; 109fde: 89 58 20 mov %ebx,0x20(%eax) _ISR_Enable( *level_p ); 109fe1: ff 75 e0 pushl -0x20(%ebp) 109fe4: 9d popf _Thread_queue_Enqueue( &the_semaphore->Wait_queue, timeout ); 109fe5: 50 push %eax 109fe6: 68 3c c2 10 00 push $0x10c23c 109feb: 56 push %esi 109fec: 52 push %edx 109fed: e8 8e 1f 00 00 call 10bf80 <_Thread_queue_Enqueue_with_handler> _Thread_Enable_dispatch(); 109ff2: e8 1e 1b 00 00 call 10bb15 <_Thread_Enable_dispatch> 109ff7: 83 c4 10 add $0x10,%esp id, ((_Options_Is_no_wait( option_set )) ? false : true), timeout, &level ); return _Semaphore_Translate_core_semaphore_return_code( 109ffa: 83 ec 0c sub $0xc,%esp 109ffd: a1 30 39 12 00 mov 0x123930,%eax 10a002: ff 70 34 pushl 0x34(%eax) 10a005: e8 8d 00 00 00 call 10a097 <_Semaphore_Translate_core_semaphore_return_code> <== ALWAYS TAKEN 10a00a: 83 c4 10 add $0x10,%esp break; } return RTEMS_INVALID_ID; } 10a00d: 8d 65 f4 lea -0xc(%ebp),%esp 10a010: 5b pop %ebx 10a011: 5e pop %esi 10a012: 5f pop %edi 10a013: c9 leave 10a014: c3 ret 0010a018 : #endif rtems_status_code rtems_semaphore_release( rtems_id id ) { 10a018: 55 push %ebp 10a019: 89 e5 mov %esp,%ebp 10a01b: 53 push %ebx 10a01c: 83 ec 18 sub $0x18,%esp 10a01f: 8b 5d 08 mov 0x8(%ebp),%ebx RTEMS_INLINE_ROUTINE Semaphore_Control *_Semaphore_Get ( Objects_Id id, Objects_Locations *location ) { return (Semaphore_Control *) 10a022: 8d 45 f4 lea -0xc(%ebp),%eax 10a025: 50 push %eax 10a026: 53 push %ebx 10a027: 68 bc 37 12 00 push $0x1237bc 10a02c: e8 1f 13 00 00 call 10b350 <_Objects_Get> 10a031: 89 c2 mov %eax,%edx Objects_Locations location; CORE_mutex_Status mutex_status; CORE_semaphore_Status semaphore_status; the_semaphore = _Semaphore_Get( id, &location ); switch ( location ) { 10a033: 83 c4 10 add $0x10,%esp 10a036: b8 04 00 00 00 mov $0x4,%eax 10a03b: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 10a03f: 75 40 jne 10a081 case OBJECTS_LOCAL: if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) { 10a041: f6 42 10 30 testb $0x30,0x10(%edx) 10a045: 8d 42 14 lea 0x14(%edx),%eax 10a048: 74 1b je 10a065 mutex_status = _CORE_mutex_Surrender( 10a04a: 51 push %ecx 10a04b: 6a 00 push $0x0 10a04d: 53 push %ebx 10a04e: 50 push %eax 10a04f: e8 58 09 00 00 call 10a9ac <_CORE_mutex_Surrender> <== ALWAYS TAKEN 10a054: 89 c3 mov %eax,%ebx &the_semaphore->Core_control.mutex, id, MUTEX_MP_SUPPORT ); _Thread_Enable_dispatch(); 10a056: e8 ba 1a 00 00 call 10bb15 <_Thread_Enable_dispatch> return _Semaphore_Translate_core_mutex_return_code( mutex_status ); 10a05b: 89 1c 24 mov %ebx,(%esp) 10a05e: e8 25 00 00 00 call 10a088 <_Semaphore_Translate_core_mutex_return_code> <== ALWAYS TAKEN 10a063: eb 19 jmp 10a07e <== ALWAYS TAKEN } else { semaphore_status = _CORE_semaphore_Surrender( 10a065: 52 push %edx 10a066: 6a 00 push $0x0 10a068: 53 push %ebx 10a069: 50 push %eax 10a06a: e8 69 0a 00 00 call 10aad8 <_CORE_semaphore_Surrender> 10a06f: 89 c3 mov %eax,%ebx &the_semaphore->Core_control.semaphore, id, MUTEX_MP_SUPPORT ); _Thread_Enable_dispatch(); 10a071: e8 9f 1a 00 00 call 10bb15 <_Thread_Enable_dispatch> return _Semaphore_Translate_core_semaphore_return_code( semaphore_status ); 10a076: 89 1c 24 mov %ebx,(%esp) 10a079: e8 19 00 00 00 call 10a097 <_Semaphore_Translate_core_semaphore_return_code> <== ALWAYS TAKEN &the_semaphore->Core_control.semaphore, id, MUTEX_MP_SUPPORT ); _Thread_Enable_dispatch(); return 10a07e: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10a081: 8b 5d fc mov -0x4(%ebp),%ebx 10a084: c9 leave 10a085: c3 ret 0010ae7c : rtems_status_code rtems_signal_catch( rtems_asr_entry asr_handler, rtems_mode mode_set ) { 10ae7c: 55 push %ebp 10ae7d: 89 e5 mov %esp,%ebp 10ae7f: 83 ec 08 sub $0x8,%esp 10ae82: 8b 55 08 mov 0x8(%ebp),%edx RTEMS_API_Control *api; ASR_Information *asr; /* XXX normalize mode */ executing = _Thread_Executing; api = (RTEMS_API_Control*)executing->API_Extensions[ THREAD_API_RTEMS ]; 10ae85: a1 9c 52 12 00 mov 0x12529c,%eax 10ae8a: 8b 80 f0 00 00 00 mov 0xf0(%eax),%eax 10ae90: 8b 0d e0 51 12 00 mov 0x1251e0,%ecx 10ae96: 41 inc %ecx 10ae97: 89 0d e0 51 12 00 mov %ecx,0x1251e0 asr = &api->Signal; _Thread_Disable_dispatch(); /* cannot reschedule while */ /* the thread is inconsistent */ if ( !_ASR_Is_null_handler( asr_handler ) ) { 10ae9d: 85 d2 test %edx,%edx 10ae9f: 74 0b je 10aeac asr->mode_set = mode_set; 10aea1: 8b 4d 0c mov 0xc(%ebp),%ecx 10aea4: 89 48 10 mov %ecx,0x10(%eax) asr->handler = asr_handler; 10aea7: 89 50 0c mov %edx,0xc(%eax) 10aeaa: eb 27 jmp 10aed3 <== ALWAYS TAKEN */ RTEMS_INLINE_ROUTINE void _ASR_Initialize ( ASR_Information *information ) { information->is_enabled = false; 10aeac: c6 40 08 00 movb $0x0,0x8(%eax) information->handler = NULL; 10aeb0: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax) information->mode_set = RTEMS_DEFAULT_MODES; 10aeb7: c7 40 10 00 00 00 00 movl $0x0,0x10(%eax) information->signals_posted = 0; 10aebe: c7 40 14 00 00 00 00 movl $0x0,0x14(%eax) information->signals_pending = 0; 10aec5: c7 40 18 00 00 00 00 movl $0x0,0x18(%eax) information->nest_level = 0; 10aecc: c7 40 1c 00 00 00 00 movl $0x0,0x1c(%eax) } else _ASR_Initialize( asr ); _Thread_Enable_dispatch(); 10aed3: e8 35 1d 00 00 call 10cc0d <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; } 10aed8: 31 c0 xor %eax,%eax 10aeda: c9 leave 10aedb: c3 ret 001155d8 : rtems_status_code rtems_signal_send( rtems_id id, rtems_signal_set signal_set ) { 1155d8: 55 push %ebp 1155d9: 89 e5 mov %esp,%ebp 1155db: 53 push %ebx 1155dc: 83 ec 14 sub $0x14,%esp 1155df: 8b 5d 0c mov 0xc(%ebp),%ebx register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; ASR_Information *asr; if ( !signal_set ) 1155e2: b8 0a 00 00 00 mov $0xa,%eax 1155e7: 85 db test %ebx,%ebx 1155e9: 74 71 je 11565c return RTEMS_INVALID_NUMBER; the_thread = _Thread_Get( id, &location ); 1155eb: 50 push %eax 1155ec: 50 push %eax 1155ed: 8d 45 f4 lea -0xc(%ebp),%eax 1155f0: 50 push %eax 1155f1: ff 75 08 pushl 0x8(%ebp) 1155f4: e8 13 35 00 00 call 118b0c <_Thread_Get> 1155f9: 89 c1 mov %eax,%ecx switch ( location ) { 1155fb: 83 c4 10 add $0x10,%esp 1155fe: b8 04 00 00 00 mov $0x4,%eax 115603: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 115607: 75 53 jne 11565c case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; 115609: 8b 91 f0 00 00 00 mov 0xf0(%ecx),%edx asr = &api->Signal; 11560f: 83 7a 0c 00 cmpl $0x0,0xc(%edx) 115613: 74 3d je 115652 if ( ! _ASR_Is_null_handler( asr->handler ) ) { if ( asr->is_enabled ) { 115615: 80 7a 08 00 cmpb $0x0,0x8(%edx) 115619: 74 26 je 115641 rtems_signal_set *signal_set ) { ISR_Level _level; _ISR_Disable( _level ); 11561b: 9c pushf 11561c: fa cli 11561d: 58 pop %eax *signal_set |= signals; 11561e: 09 5a 14 or %ebx,0x14(%edx) _ISR_Enable( _level ); 115621: 50 push %eax 115622: 9d popf _ASR_Post_signals( signal_set, &asr->signals_posted ); the_thread->do_post_task_switch_extension = true; 115623: c6 41 74 01 movb $0x1,0x74(%ecx) if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) 115627: a1 80 cb 13 00 mov 0x13cb80,%eax 11562c: 85 c0 test %eax,%eax 11562e: 74 19 je 115649 115630: 3b 0d a4 cb 13 00 cmp 0x13cba4,%ecx 115636: 75 11 jne 115649 <== ALWAYS TAKEN _ISR_Signals_to_thread_executing = true; 115638: c6 05 38 cc 13 00 01 movb $0x1,0x13cc38 11563f: eb 08 jmp 115649 <== ALWAYS TAKEN rtems_signal_set *signal_set ) { ISR_Level _level; _ISR_Disable( _level ); 115641: 9c pushf 115642: fa cli 115643: 58 pop %eax *signal_set |= signals; 115644: 09 5a 18 or %ebx,0x18(%edx) _ISR_Enable( _level ); 115647: 50 push %eax 115648: 9d popf } else { _ASR_Post_signals( signal_set, &asr->signals_pending ); } _Thread_Enable_dispatch(); 115649: e8 6f 34 00 00 call 118abd <_Thread_Enable_dispatch> 11564e: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 115650: eb 0a jmp 11565c <== ALWAYS TAKEN } _Thread_Enable_dispatch(); 115652: e8 66 34 00 00 call 118abd <_Thread_Enable_dispatch> 115657: b8 0b 00 00 00 mov $0xb,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11565c: 8b 5d fc mov -0x4(%ebp),%ebx 11565f: c9 leave 115660: c3 ret 00109ff8 : * rtems_stack_checker_Begin_extension */ void rtems_stack_checker_begin_extension( Thread_Control *the_thread ) { 109ff8: 55 push %ebp 109ff9: 89 e5 mov %esp,%ebp 109ffb: 57 push %edi 109ffc: 56 push %esi 109ffd: 8b 45 08 mov 0x8(%ebp),%eax Stack_check_Control *the_pattern; if ( the_thread->Object.id == 0 ) /* skip system tasks */ 10a000: 83 78 08 00 cmpl $0x0,0x8(%eax) 10a004: 74 15 je 10a01b <== ALWAYS TAKEN return; the_pattern = Stack_check_Get_pattern_area(&the_thread->Start.Initial_stack); *the_pattern = Stack_check_Pattern; 10a006: 8b b8 c4 00 00 00 mov 0xc4(%eax),%edi 10a00c: 83 c7 08 add $0x8,%edi 10a00f: be d8 33 16 00 mov $0x1633d8,%esi 10a014: b9 04 00 00 00 mov $0x4,%ecx 10a019: f3 a5 rep movsl %ds:(%esi),%es:(%edi) } 10a01b: 5e pop %esi 10a01c: 5f pop %edi 10a01d: c9 leave 10a01e: c3 ret 0010a3b6 : */ bool rtems_stack_checker_create_extension( Thread_Control *running __attribute__((unused)), Thread_Control *the_thread ) { 10a3b6: 55 push %ebp 10a3b7: 89 e5 mov %esp,%ebp 10a3b9: 57 push %edi 10a3ba: 8b 7d 0c mov 0xc(%ebp),%edi Stack_check_Initialize(); 10a3bd: e8 97 ff ff ff call 10a359 <== ALWAYS TAKEN if (the_thread) 10a3c2: 85 ff test %edi,%edi 10a3c4: 74 12 je 10a3d8 <== ALWAYS TAKEN Stack_check_Dope_stack(&the_thread->Start.Initial_stack); 10a3c6: 8b 8f c0 00 00 00 mov 0xc0(%edi),%ecx 10a3cc: 8b 97 c4 00 00 00 mov 0xc4(%edi),%edx 10a3d2: b0 a5 mov $0xa5,%al 10a3d4: 89 d7 mov %edx,%edi 10a3d6: f3 aa rep stos %al,%es:(%edi) return true; } 10a3d8: b0 01 mov $0x1,%al 10a3da: 5f pop %edi 10a3db: c9 leave 10a3dc: c3 ret 0010a288 : /* * Check if blown */ bool rtems_stack_checker_is_blown( void ) { 10a288: 55 push %ebp 10a289: 89 e5 mov %esp,%ebp 10a28b: 53 push %ebx 10a28c: 83 ec 04 sub $0x4,%esp Stack_Control *the_stack = &_Thread_Executing->Start.Initial_stack; 10a28f: 8b 15 08 36 16 00 mov 0x163608,%edx ) { #if defined(__GNUC__) void *sp = __builtin_frame_address(0); if ( sp < the_stack->area ) { 10a295: 8b 82 c4 00 00 00 mov 0xc4(%edx),%eax 10a29b: 31 db xor %ebx,%ebx 10a29d: 39 c5 cmp %eax,%ebp 10a29f: 72 0e jb 10a2af <== ALWAYS TAKEN } /* * Check if blown */ bool rtems_stack_checker_is_blown( void ) 10a2a1: 8b 8a c0 00 00 00 mov 0xc0(%edx),%ecx 10a2a7: 8d 14 08 lea (%eax,%ecx,1),%edx 10a2aa: 39 d5 cmp %edx,%ebp 10a2ac: 0f 96 c3 setbe %bl /* * The stack checker must be initialized before the pattern is there * to check. */ if ( Stack_check_Initialized ) { 10a2af: b2 01 mov $0x1,%dl 10a2b1: 83 3d 38 07 16 00 00 cmpl $0x0,0x160738 10a2b8: 74 19 je 10a2d3 <== ALWAYS TAKEN pattern_ok = (!memcmp( 10a2ba: 83 c0 08 add $0x8,%eax 10a2bd: 52 push %edx 10a2be: 6a 10 push $0x10 10a2c0: 68 d8 33 16 00 push $0x1633d8 10a2c5: 50 push %eax 10a2c6: e8 6d 0d 03 00 call 13b038 10a2cb: 83 c4 10 add $0x10,%esp 10a2ce: 85 c0 test %eax,%eax 10a2d0: 0f 94 c2 sete %dl } /* * The Stack Pointer and the Pattern Area are OK so return false. */ if ( sp_ok && pattern_ok ) 10a2d3: 84 db test %bl,%bl 10a2d5: 74 06 je 10a2dd <== ALWAYS TAKEN 10a2d7: 31 c0 xor %eax,%eax 10a2d9: 84 d2 test %dl,%dl 10a2db: 75 16 jne 10a2f3 <== NEVER TAKEN return false; /* * Let's report as much as we can. */ Stack_check_report_blown_task( _Thread_Executing, pattern_ok ); 10a2dd: 53 push %ebx <== NOT EXECUTED 10a2de: 53 push %ebx <== NOT EXECUTED 10a2df: 0f b6 d2 movzbl %dl,%edx <== NOT EXECUTED 10a2e2: 52 push %edx <== NOT EXECUTED 10a2e3: ff 35 08 36 16 00 pushl 0x163608 <== NOT EXECUTED 10a2e9: e8 e6 fe ff ff call 10a1d4 <== NOT EXECUTED 10a2ee: b0 01 mov $0x1,%al <== NOT EXECUTED return true; 10a2f0: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } 10a2f3: 8b 5d fc mov -0x4(%ebp),%ebx 10a2f6: c9 leave 10a2f7: c3 ret 0010a1bd : void rtems_stack_checker_report_usage( void ) { 10a1bd: 55 push %ebp <== NOT EXECUTED 10a1be: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10a1c0: 83 ec 10 sub $0x10,%esp <== NOT EXECUTED rtems_stack_checker_report_usage_with_plugin( NULL, printk_plugin ); 10a1c3: 68 44 c7 10 00 push $0x10c744 <== NOT EXECUTED 10a1c8: 6a 00 push $0x0 <== NOT EXECUTED 10a1ca: e8 8d ff ff ff call 10a15c <== NOT EXECUTED 10a1cf: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } 10a1d2: c9 leave <== NOT EXECUTED 10a1d3: c3 ret <== NOT EXECUTED 0010a15c : void rtems_stack_checker_report_usage_with_plugin( void *context, rtems_printk_plugin_t print ) { 10a15c: 55 push %ebp <== NOT EXECUTED 10a15d: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10a15f: 56 push %esi <== NOT EXECUTED 10a160: 53 push %ebx <== NOT EXECUTED 10a161: 8b 75 08 mov 0x8(%ebp),%esi <== NOT EXECUTED 10a164: 8b 5d 0c mov 0xc(%ebp),%ebx <== NOT EXECUTED print_context = context; 10a167: 89 35 3c 07 16 00 mov %esi,0x16073c <== NOT EXECUTED print_handler = print; 10a16d: 89 1d 40 07 16 00 mov %ebx,0x160740 <== NOT EXECUTED (*print)( context, "Stack usage by thread\n"); 10a173: 51 push %ecx <== NOT EXECUTED 10a174: 51 push %ecx <== NOT EXECUTED 10a175: 68 80 07 15 00 push $0x150780 <== NOT EXECUTED 10a17a: 56 push %esi <== NOT EXECUTED 10a17b: ff d3 call *%ebx <== NOT EXECUTED (*print)( context, 10a17d: 58 pop %eax <== NOT EXECUTED 10a17e: 5a pop %edx <== NOT EXECUTED 10a17f: 68 97 07 15 00 push $0x150797 <== NOT EXECUTED 10a184: 56 push %esi <== NOT EXECUTED 10a185: 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 ); 10a187: c7 04 24 46 a0 10 00 movl $0x10a046,(%esp) <== NOT EXECUTED 10a18e: e8 8d 65 00 00 call 110720 <== NOT EXECUTED /* dump interrupt stack info if any */ Stack_check_Dump_threads_usage((Thread_Control *) -1); 10a193: c7 04 24 ff ff ff ff movl $0xffffffff,(%esp) <== NOT EXECUTED 10a19a: e8 a7 fe ff ff call 10a046 <== NOT EXECUTED print_context = NULL; 10a19f: c7 05 3c 07 16 00 00 movl $0x0,0x16073c <== NOT EXECUTED 10a1a6: 00 00 00 <== NOT EXECUTED print_handler = NULL; 10a1a9: c7 05 40 07 16 00 00 movl $0x0,0x160740 <== NOT EXECUTED 10a1b0: 00 00 00 <== NOT EXECUTED 10a1b3: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } 10a1b6: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED 10a1b9: 5b pop %ebx <== NOT EXECUTED 10a1ba: 5e pop %esi <== NOT EXECUTED 10a1bb: c9 leave <== NOT EXECUTED 10a1bc: c3 ret <== NOT EXECUTED 0010a2f8 : */ void rtems_stack_checker_switch_extension( Thread_Control *running __attribute__((unused)), Thread_Control *heir __attribute__((unused)) ) { 10a2f8: 55 push %ebp 10a2f9: 89 e5 mov %esp,%ebp 10a2fb: 53 push %ebx 10a2fc: 83 ec 14 sub $0x14,%esp 10a2ff: 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; 10a302: 8b 83 c4 00 00 00 mov 0xc4(%ebx),%eax ) { #if defined(__GNUC__) void *sp = __builtin_frame_address(0); if ( sp < the_stack->area ) { 10a308: 31 d2 xor %edx,%edx 10a30a: 39 c5 cmp %eax,%ebp 10a30c: 72 0d jb 10a31b <== ALWAYS TAKEN } /* * rtems_stack_checker_switch_extension */ void rtems_stack_checker_switch_extension( 10a30e: 8b 93 c0 00 00 00 mov 0xc0(%ebx),%edx 10a314: 01 c2 add %eax,%edx 10a316: 39 d5 cmp %edx,%ebp 10a318: 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, 10a31b: 83 c0 08 add $0x8,%eax 10a31e: 51 push %ecx 10a31f: 6a 10 push $0x10 10a321: 68 d8 33 16 00 push $0x1633d8 10a326: 50 push %eax 10a327: 88 55 f4 mov %dl,-0xc(%ebp) 10a32a: e8 09 0d 03 00 call 13b038 10a32f: 83 c4 10 add $0x10,%esp 10a332: 85 c0 test %eax,%eax 10a334: 0f 94 c0 sete %al (void *) Stack_check_Pattern.pattern, PATTERN_SIZE_BYTES)); if ( !sp_ok || !pattern_ok ) { 10a337: 8a 55 f4 mov -0xc(%ebp),%dl 10a33a: 84 d2 test %dl,%dl 10a33c: 74 04 je 10a342 <== ALWAYS TAKEN 10a33e: 84 c0 test %al,%al 10a340: 75 12 jne 10a354 <== NEVER TAKEN Stack_check_report_blown_task( running, pattern_ok ); 10a342: 0f b6 c0 movzbl %al,%eax <== NOT EXECUTED 10a345: 89 45 0c mov %eax,0xc(%ebp) <== NOT EXECUTED 10a348: 89 5d 08 mov %ebx,0x8(%ebp) <== NOT EXECUTED } } 10a34b: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 10a34e: c9 leave <== NOT EXECUTED pattern_ok = (!memcmp( pattern, (void *) Stack_check_Pattern.pattern, PATTERN_SIZE_BYTES)); if ( !sp_ok || !pattern_ok ) { Stack_check_report_blown_task( running, pattern_ok ); 10a34f: e9 80 fe ff ff jmp 10a1d4 <== NOT EXECUTED } } 10a354: 8b 5d fc mov -0x4(%ebp),%ebx 10a357: c9 leave 10a358: c3 ret 0010ef10 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 10ef10: 55 push %ebp 10ef11: 89 e5 mov %esp,%ebp 10ef13: 57 push %edi 10ef14: 56 push %esi 10ef15: 53 push %ebx 10ef16: 83 ec 2c sub $0x2c,%esp 10ef19: 8b 75 08 mov 0x8(%ebp),%esi 10ef1c: 8b 5d 0c mov 0xc(%ebp),%ebx 10ef1f: 8b 7d 10 mov 0x10(%ebp),%edi STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 10ef22: b8 09 00 00 00 mov $0x9,%eax 10ef27: 85 db test %ebx,%ebx 10ef29: 74 6e je 10ef99 return RTEMS_INVALID_ADDRESS; errno = 0; 10ef2b: e8 fc 1a 00 00 call 110a2c <__errno> 10ef30: c7 00 00 00 00 00 movl $0x0,(%eax) *n = 0; 10ef36: c7 03 00 00 00 00 movl $0x0,(%ebx) 10ef3c: c7 43 04 00 00 00 00 movl $0x0,0x4(%ebx) #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); 10ef43: 50 push %eax 10ef44: 50 push %eax 10ef45: 8d 45 e4 lea -0x1c(%ebp),%eax 10ef48: 50 push %eax 10ef49: 56 push %esi 10ef4a: e8 9d 45 00 00 call 1134ec #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 ) 10ef4f: 83 c4 10 add $0x10,%esp 10ef52: 85 ff test %edi,%edi 10ef54: 74 05 je 10ef5b *endptr = end; 10ef56: 8b 45 e4 mov -0x1c(%ebp),%eax 10ef59: 89 07 mov %eax,(%edi) /* nothing was converted */ if ( end == s ) 10ef5b: b8 0b 00 00 00 mov $0xb,%eax 10ef60: 39 75 e4 cmp %esi,-0x1c(%ebp) 10ef63: 74 2e je 10ef93 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 10ef65: dd 05 68 1f 12 00 fldl 0x121f68 10ef6b: d9 c9 fxch %st(1) 10ef6d: dd e1 fucom %st(1) 10ef6f: df e0 fnstsw %ax 10ef71: dd d9 fstp %st(1) 10ef73: 9e sahf 10ef74: 76 17 jbe 10ef8d 10ef76: dd 5d c8 fstpl -0x38(%ebp) 10ef79: e8 ae 1a 00 00 call 110a2c <__errno> 10ef7e: 89 c2 mov %eax,%edx 10ef80: b8 0a 00 00 00 mov $0xa,%eax 10ef85: 83 3a 22 cmpl $0x22,(%edx) 10ef88: dd 45 c8 fldl -0x38(%ebp) 10ef8b: 74 0a je 10ef97 <== NEVER TAKEN /* there was an underflow */ if ( (result == STRING_TO_MIN) && (errno == ERANGE)) return RTEMS_INVALID_NUMBER; #endif *n = (STRING_TO_TYPE) result; 10ef8d: dd 1b fstpl (%ebx) 10ef8f: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 10ef91: eb 06 jmp 10ef99 <== ALWAYS TAKEN 10ef93: dd d8 fstp %st(0) 10ef95: eb 02 jmp 10ef99 <== ALWAYS TAKEN 10ef97: dd d8 fstp %st(0) } 10ef99: 8d 65 f4 lea -0xc(%ebp),%esp 10ef9c: 5b pop %ebx 10ef9d: 5e pop %esi 10ef9e: 5f pop %edi 10ef9f: c9 leave 10efa0: c3 ret 0010efa4 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 10efa4: 55 push %ebp 10efa5: 89 e5 mov %esp,%ebp 10efa7: 57 push %edi 10efa8: 56 push %esi 10efa9: 53 push %ebx 10efaa: 83 ec 2c sub $0x2c,%esp 10efad: 8b 75 08 mov 0x8(%ebp),%esi 10efb0: 8b 5d 0c mov 0xc(%ebp),%ebx 10efb3: 8b 7d 10 mov 0x10(%ebp),%edi STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 10efb6: b8 09 00 00 00 mov $0x9,%eax 10efbb: 85 db test %ebx,%ebx 10efbd: 74 67 je 10f026 <== ALWAYS TAKEN return RTEMS_INVALID_ADDRESS; errno = 0; 10efbf: e8 68 1a 00 00 call 110a2c <__errno> 10efc4: c7 00 00 00 00 00 movl $0x0,(%eax) *n = 0; 10efca: c7 03 00 00 00 00 movl $0x0,(%ebx) #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); 10efd0: 50 push %eax 10efd1: 50 push %eax 10efd2: 8d 45 e4 lea -0x1c(%ebp),%eax 10efd5: 50 push %eax 10efd6: 56 push %esi 10efd7: e8 cc 44 00 00 call 1134a8 #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 ) 10efdc: 83 c4 10 add $0x10,%esp 10efdf: 85 ff test %edi,%edi 10efe1: 74 05 je 10efe8 *endptr = end; 10efe3: 8b 45 e4 mov -0x1c(%ebp),%eax 10efe6: 89 07 mov %eax,(%edi) /* nothing was converted */ if ( end == s ) 10efe8: b8 0b 00 00 00 mov $0xb,%eax 10efed: 39 75 e4 cmp %esi,-0x1c(%ebp) 10eff0: 74 2e je 10f020 <== ALWAYS TAKEN return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 10eff2: d9 05 70 1f 12 00 flds 0x121f70 10eff8: d9 c9 fxch %st(1) 10effa: dd e1 fucom %st(1) 10effc: df e0 fnstsw %ax 10effe: dd d9 fstp %st(1) 10f000: 9e sahf 10f001: 76 17 jbe 10f01a 10f003: d9 5d c8 fstps -0x38(%ebp) 10f006: e8 21 1a 00 00 call 110a2c <__errno> 10f00b: 89 c2 mov %eax,%edx 10f00d: b8 0a 00 00 00 mov $0xa,%eax 10f012: 83 3a 22 cmpl $0x22,(%edx) 10f015: d9 45 c8 flds -0x38(%ebp) 10f018: 74 0a je 10f024 <== NEVER TAKEN /* there was an underflow */ if ( (result == STRING_TO_MIN) && (errno == ERANGE)) return RTEMS_INVALID_NUMBER; #endif *n = (STRING_TO_TYPE) result; 10f01a: d9 1b fstps (%ebx) 10f01c: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 10f01e: eb 06 jmp 10f026 <== ALWAYS TAKEN 10f020: dd d8 fstp %st(0) 10f022: eb 02 jmp 10f026 <== ALWAYS TAKEN 10f024: dd d8 fstp %st(0) } 10f026: 8d 65 f4 lea -0xc(%ebp),%esp 10f029: 5b pop %ebx 10f02a: 5e pop %esi 10f02b: 5f pop %edi 10f02c: c9 leave 10f02d: c3 ret 0011e02c : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 11e02c: 55 push %ebp 11e02d: 89 e5 mov %esp,%ebp 11e02f: 57 push %edi 11e030: 56 push %esi 11e031: 53 push %ebx 11e032: 83 ec 2c sub $0x2c,%esp 11e035: 8b 7d 08 mov 0x8(%ebp),%edi 11e038: 8b 5d 0c mov 0xc(%ebp),%ebx 11e03b: 8b 55 10 mov 0x10(%ebp),%edx STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 11e03e: b8 09 00 00 00 mov $0x9,%eax 11e043: 85 db test %ebx,%ebx 11e045: 74 5a je 11e0a1 return RTEMS_INVALID_ADDRESS; errno = 0; 11e047: 89 55 d4 mov %edx,-0x2c(%ebp) 11e04a: e8 81 a3 01 00 call 1383d0 <__errno> 11e04f: c7 00 00 00 00 00 movl $0x0,(%eax) *n = 0; 11e055: 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 ); 11e05b: 50 push %eax 11e05c: ff 75 14 pushl 0x14(%ebp) 11e05f: 8d 45 e4 lea -0x1c(%ebp),%eax 11e062: 50 push %eax 11e063: 57 push %edi 11e064: e8 ef 0e 02 00 call 13ef58 11e069: 89 c6 mov %eax,%esi #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 11e06b: 83 c4 10 add $0x10,%esp 11e06e: 8b 55 d4 mov -0x2c(%ebp),%edx 11e071: 85 d2 test %edx,%edx 11e073: 74 05 je 11e07a *endptr = end; 11e075: 8b 45 e4 mov -0x1c(%ebp),%eax 11e078: 89 02 mov %eax,(%edx) /* nothing was converted */ if ( end == s ) 11e07a: b8 0b 00 00 00 mov $0xb,%eax 11e07f: 39 7d e4 cmp %edi,-0x1c(%ebp) 11e082: 74 1d je 11e0a1 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 11e084: 81 fe ff ff ff 7f cmp $0x7fffffff,%esi 11e08a: 75 11 jne 11e09d 11e08c: e8 3f a3 01 00 call 1383d0 <__errno> 11e091: 89 c2 mov %eax,%edx 11e093: b8 0a 00 00 00 mov $0xa,%eax 11e098: 83 3a 22 cmpl $0x22,(%edx) 11e09b: 74 04 je 11e0a1 <== NEVER TAKEN /* there was an underflow */ if ( (result == STRING_TO_MIN) && (errno == ERANGE)) return RTEMS_INVALID_NUMBER; #endif *n = (STRING_TO_TYPE) result; 11e09d: 89 33 mov %esi,(%ebx) 11e09f: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; } 11e0a1: 8d 65 f4 lea -0xc(%ebp),%esp 11e0a4: 5b pop %ebx 11e0a5: 5e pop %esi 11e0a6: 5f pop %edi 11e0a7: c9 leave 11e0a8: c3 ret 0010f148 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 10f148: 55 push %ebp 10f149: 89 e5 mov %esp,%ebp 10f14b: 57 push %edi 10f14c: 56 push %esi 10f14d: 53 push %ebx 10f14e: 83 ec 2c sub $0x2c,%esp 10f151: 8b 7d 08 mov 0x8(%ebp),%edi 10f154: 8b 5d 0c mov 0xc(%ebp),%ebx 10f157: 8b 55 10 mov 0x10(%ebp),%edx STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 10f15a: b8 09 00 00 00 mov $0x9,%eax 10f15f: 85 db test %ebx,%ebx 10f161: 74 62 je 10f1c5 return RTEMS_INVALID_ADDRESS; errno = 0; 10f163: 89 55 d4 mov %edx,-0x2c(%ebp) 10f166: e8 c1 18 00 00 call 110a2c <__errno> 10f16b: c7 00 00 00 00 00 movl $0x0,(%eax) *n = 0; 10f171: 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 ); 10f177: 50 push %eax 10f178: ff 75 14 pushl 0x14(%ebp) 10f17b: 8d 45 e4 lea -0x1c(%ebp),%eax 10f17e: 50 push %eax 10f17f: 57 push %edi 10f180: e8 03 45 00 00 call 113688 10f185: 89 c6 mov %eax,%esi #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 10f187: 83 c4 10 add $0x10,%esp 10f18a: 8b 55 d4 mov -0x2c(%ebp),%edx 10f18d: 85 d2 test %edx,%edx 10f18f: 74 05 je 10f196 *endptr = end; 10f191: 8b 45 e4 mov -0x1c(%ebp),%eax 10f194: 89 02 mov %eax,(%edx) /* nothing was converted */ if ( end == s ) 10f196: b8 0b 00 00 00 mov $0xb,%eax 10f19b: 39 7d e4 cmp %edi,-0x1c(%ebp) 10f19e: 74 25 je 10f1c5 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 10f1a0: 81 fe ff ff ff 7f cmp $0x7fffffff,%esi 10f1a6: 74 08 je 10f1b0 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MIN /* there was an underflow */ if ( (result == STRING_TO_MIN) && (errno == ERANGE)) 10f1a8: 81 fe 00 00 00 80 cmp $0x80000000,%esi 10f1ae: 75 0a jne 10f1ba 10f1b0: e8 77 18 00 00 call 110a2c <__errno> 10f1b5: 83 38 22 cmpl $0x22,(%eax) 10f1b8: 74 06 je 10f1c0 <== NEVER TAKEN return RTEMS_INVALID_NUMBER; #endif *n = (STRING_TO_TYPE) result; 10f1ba: 89 33 mov %esi,(%ebx) 10f1bc: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 10f1be: eb 05 jmp 10f1c5 <== ALWAYS TAKEN 10f1c0: b8 0a 00 00 00 mov $0xa,%eax } 10f1c5: 8d 65 f4 lea -0xc(%ebp),%esp 10f1c8: 5b pop %ebx 10f1c9: 5e pop %esi 10f1ca: 5f pop %edi 10f1cb: c9 leave 10f1cc: c3 ret 0010f0b0 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 10f0b0: 55 push %ebp 10f0b1: 89 e5 mov %esp,%ebp 10f0b3: 57 push %edi 10f0b4: 56 push %esi 10f0b5: 53 push %ebx 10f0b6: 83 ec 2c sub $0x2c,%esp 10f0b9: 8b 5d 0c mov 0xc(%ebp),%ebx 10f0bc: 8b 7d 10 mov 0x10(%ebp),%edi STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 10f0bf: b8 09 00 00 00 mov $0x9,%eax 10f0c4: 85 db test %ebx,%ebx 10f0c6: 74 78 je 10f140 return RTEMS_INVALID_ADDRESS; errno = 0; 10f0c8: e8 5f 19 00 00 call 110a2c <__errno> 10f0cd: c7 00 00 00 00 00 movl $0x0,(%eax) *n = 0; 10f0d3: c7 03 00 00 00 00 movl $0x0,(%ebx) 10f0d9: 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 ); 10f0e0: 50 push %eax 10f0e1: ff 75 14 pushl 0x14(%ebp) 10f0e4: 8d 45 e4 lea -0x1c(%ebp),%eax 10f0e7: 50 push %eax 10f0e8: ff 75 08 pushl 0x8(%ebp) 10f0eb: e8 b4 45 00 00 call 1136a4 10f0f0: 89 c6 mov %eax,%esi #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 10f0f2: 83 c4 10 add $0x10,%esp 10f0f5: 85 ff test %edi,%edi 10f0f7: 74 05 je 10f0fe *endptr = end; 10f0f9: 8b 45 e4 mov -0x1c(%ebp),%eax 10f0fc: 89 07 mov %eax,(%edi) /* nothing was converted */ if ( end == s ) 10f0fe: b8 0b 00 00 00 mov $0xb,%eax 10f103: 8b 4d 08 mov 0x8(%ebp),%ecx 10f106: 39 4d e4 cmp %ecx,-0x1c(%ebp) 10f109: 74 35 je 10f140 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 10f10b: 81 fa ff ff ff 7f cmp $0x7fffffff,%edx 10f111: 75 05 jne 10f118 10f113: 83 fe ff cmp $0xffffffff,%esi 10f116: 74 0a je 10f122 <== NEVER TAKEN return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MIN /* there was an underflow */ if ( (result == STRING_TO_MIN) && (errno == ERANGE)) 10f118: 8d 82 00 00 00 80 lea -0x80000000(%edx),%eax 10f11e: 09 f0 or %esi,%eax 10f120: 75 10 jne 10f132 10f122: 89 55 d4 mov %edx,-0x2c(%ebp) 10f125: e8 02 19 00 00 call 110a2c <__errno> 10f12a: 83 38 22 cmpl $0x22,(%eax) 10f12d: 8b 55 d4 mov -0x2c(%ebp),%edx 10f130: 74 09 je 10f13b <== NEVER TAKEN return RTEMS_INVALID_NUMBER; #endif *n = (STRING_TO_TYPE) result; 10f132: 89 33 mov %esi,(%ebx) 10f134: 89 53 04 mov %edx,0x4(%ebx) 10f137: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 10f139: eb 05 jmp 10f140 <== ALWAYS TAKEN 10f13b: b8 0a 00 00 00 mov $0xa,%eax } 10f140: 8d 65 f4 lea -0xc(%ebp),%esp 10f143: 5b pop %ebx 10f144: 5e pop %esi 10f145: 5f pop %edi 10f146: c9 leave 10f147: c3 ret 0011e0ac : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 11e0ac: 55 push %ebp 11e0ad: 89 e5 mov %esp,%ebp 11e0af: 57 push %edi 11e0b0: 56 push %esi 11e0b1: 53 push %ebx 11e0b2: 83 ec 2c sub $0x2c,%esp 11e0b5: 8b 7d 08 mov 0x8(%ebp),%edi 11e0b8: 8b 5d 0c mov 0xc(%ebp),%ebx 11e0bb: 8b 55 10 mov 0x10(%ebp),%edx STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 11e0be: b8 09 00 00 00 mov $0x9,%eax 11e0c3: 85 db test %ebx,%ebx 11e0c5: 74 56 je 11e11d return RTEMS_INVALID_ADDRESS; errno = 0; 11e0c7: 89 55 d4 mov %edx,-0x2c(%ebp) 11e0ca: e8 01 a3 01 00 call 1383d0 <__errno> 11e0cf: c7 00 00 00 00 00 movl $0x0,(%eax) *n = 0; 11e0d5: 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 ); 11e0db: 50 push %eax 11e0dc: 6a 10 push $0x10 11e0de: 8d 45 e4 lea -0x1c(%ebp),%eax 11e0e1: 50 push %eax 11e0e2: 57 push %edi 11e0e3: e8 ec 12 02 00 call 13f3d4 11e0e8: 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 ) 11e0ea: 83 c4 10 add $0x10,%esp 11e0ed: 8b 55 d4 mov -0x2c(%ebp),%edx 11e0f0: 85 d2 test %edx,%edx 11e0f2: 74 05 je 11e0f9 *endptr = end; 11e0f4: 8b 45 e4 mov -0x1c(%ebp),%eax 11e0f7: 89 02 mov %eax,(%edx) /* nothing was converted */ if ( end == s ) 11e0f9: b8 0b 00 00 00 mov $0xb,%eax 11e0fe: 39 7d e4 cmp %edi,-0x1c(%ebp) 11e101: 74 1a je 11e11d return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 11e103: 83 fe ff cmp $0xffffffff,%esi 11e106: 75 11 jne 11e119 <== NEVER TAKEN 11e108: e8 c3 a2 01 00 call 1383d0 <__errno> <== NOT EXECUTED 11e10d: 89 c2 mov %eax,%edx <== NOT EXECUTED 11e10f: b8 0a 00 00 00 mov $0xa,%eax <== NOT EXECUTED 11e114: 83 3a 22 cmpl $0x22,(%edx) <== NOT EXECUTED 11e117: 74 04 je 11e11d <== NOT EXECUTED /* there was an underflow */ if ( (result == STRING_TO_MIN) && (errno == ERANGE)) return RTEMS_INVALID_NUMBER; #endif *n = (STRING_TO_TYPE) result; 11e119: 89 33 mov %esi,(%ebx) 11e11b: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; } 11e11d: 8d 65 f4 lea -0xc(%ebp),%esp 11e120: 5b pop %ebx 11e121: 5e pop %esi 11e122: 5f pop %edi 11e123: c9 leave 11e124: c3 ret 0010f2a8 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 10f2a8: 55 push %ebp 10f2a9: 89 e5 mov %esp,%ebp 10f2ab: 57 push %edi 10f2ac: 56 push %esi 10f2ad: 53 push %ebx 10f2ae: 83 ec 2c sub $0x2c,%esp 10f2b1: 8b 7d 08 mov 0x8(%ebp),%edi 10f2b4: 8b 5d 0c mov 0xc(%ebp),%ebx 10f2b7: 8b 55 10 mov 0x10(%ebp),%edx STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 10f2ba: b8 09 00 00 00 mov $0x9,%eax 10f2bf: 85 db test %ebx,%ebx 10f2c1: 74 57 je 10f31a return RTEMS_INVALID_ADDRESS; errno = 0; 10f2c3: 89 55 d4 mov %edx,-0x2c(%ebp) 10f2c6: e8 61 17 00 00 call 110a2c <__errno> 10f2cb: c7 00 00 00 00 00 movl $0x0,(%eax) *n = 0; 10f2d1: 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 ); 10f2d7: 50 push %eax 10f2d8: ff 75 14 pushl 0x14(%ebp) 10f2db: 8d 45 e4 lea -0x1c(%ebp),%eax 10f2de: 50 push %eax 10f2df: 57 push %edi 10f2e0: e8 1f 48 00 00 call 113b04 10f2e5: 89 c6 mov %eax,%esi #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 10f2e7: 83 c4 10 add $0x10,%esp 10f2ea: 8b 55 d4 mov -0x2c(%ebp),%edx 10f2ed: 85 d2 test %edx,%edx 10f2ef: 74 05 je 10f2f6 *endptr = end; 10f2f1: 8b 45 e4 mov -0x1c(%ebp),%eax 10f2f4: 89 02 mov %eax,(%edx) /* nothing was converted */ if ( end == s ) 10f2f6: b8 0b 00 00 00 mov $0xb,%eax 10f2fb: 39 7d e4 cmp %edi,-0x1c(%ebp) 10f2fe: 74 1a je 10f31a return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 10f300: 83 fe ff cmp $0xffffffff,%esi 10f303: 75 11 jne 10f316 10f305: e8 22 17 00 00 call 110a2c <__errno> 10f30a: 89 c2 mov %eax,%edx 10f30c: b8 0a 00 00 00 mov $0xa,%eax 10f311: 83 3a 22 cmpl $0x22,(%edx) 10f314: 74 04 je 10f31a <== NEVER TAKEN /* there was an underflow */ if ( (result == STRING_TO_MIN) && (errno == ERANGE)) return RTEMS_INVALID_NUMBER; #endif *n = (STRING_TO_TYPE) result; 10f316: 89 33 mov %esi,(%ebx) 10f318: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; } 10f31a: 8d 65 f4 lea -0xc(%ebp),%esp 10f31d: 5b pop %ebx 10f31e: 5e pop %esi 10f31f: 5f pop %edi 10f320: c9 leave 10f321: c3 ret 0011e184 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 11e184: 55 push %ebp 11e185: 89 e5 mov %esp,%ebp 11e187: 57 push %edi 11e188: 56 push %esi 11e189: 53 push %ebx 11e18a: 83 ec 2c sub $0x2c,%esp 11e18d: 8b 7d 08 mov 0x8(%ebp),%edi 11e190: 8b 5d 0c mov 0xc(%ebp),%ebx 11e193: 8b 55 10 mov 0x10(%ebp),%edx STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 11e196: b8 09 00 00 00 mov $0x9,%eax 11e19b: 85 db test %ebx,%ebx 11e19d: 74 57 je 11e1f6 return RTEMS_INVALID_ADDRESS; errno = 0; 11e19f: 89 55 d4 mov %edx,-0x2c(%ebp) 11e1a2: e8 29 a2 01 00 call 1383d0 <__errno> 11e1a7: c7 00 00 00 00 00 movl $0x0,(%eax) *n = 0; 11e1ad: 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 ); 11e1b3: 50 push %eax 11e1b4: ff 75 14 pushl 0x14(%ebp) 11e1b7: 8d 45 e4 lea -0x1c(%ebp),%eax 11e1ba: 50 push %eax 11e1bb: 57 push %edi 11e1bc: e8 13 12 02 00 call 13f3d4 11e1c1: 89 c6 mov %eax,%esi #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 11e1c3: 83 c4 10 add $0x10,%esp 11e1c6: 8b 55 d4 mov -0x2c(%ebp),%edx 11e1c9: 85 d2 test %edx,%edx 11e1cb: 74 05 je 11e1d2 *endptr = end; 11e1cd: 8b 45 e4 mov -0x1c(%ebp),%eax 11e1d0: 89 02 mov %eax,(%edx) /* nothing was converted */ if ( end == s ) 11e1d2: b8 0b 00 00 00 mov $0xb,%eax 11e1d7: 39 7d e4 cmp %edi,-0x1c(%ebp) 11e1da: 74 1a je 11e1f6 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 11e1dc: 83 fe ff cmp $0xffffffff,%esi 11e1df: 75 11 jne 11e1f2 11e1e1: e8 ea a1 01 00 call 1383d0 <__errno> 11e1e6: 89 c2 mov %eax,%edx 11e1e8: b8 0a 00 00 00 mov $0xa,%eax 11e1ed: 83 3a 22 cmpl $0x22,(%edx) 11e1f0: 74 04 je 11e1f6 <== NEVER TAKEN /* there was an underflow */ if ( (result == STRING_TO_MIN) && (errno == ERANGE)) return RTEMS_INVALID_NUMBER; #endif *n = (STRING_TO_TYPE) result; 11e1f2: 89 33 mov %esi,(%ebx) 11e1f4: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; } 11e1f6: 8d 65 f4 lea -0xc(%ebp),%esp 11e1f9: 5b pop %ebx 11e1fa: 5e pop %esi 11e1fb: 5f pop %edi 11e1fc: c9 leave 11e1fd: c3 ret 0010f324 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 10f324: 55 push %ebp 10f325: 89 e5 mov %esp,%ebp 10f327: 57 push %edi 10f328: 56 push %esi 10f329: 53 push %ebx 10f32a: 83 ec 2c sub $0x2c,%esp 10f32d: 8b 5d 0c mov 0xc(%ebp),%ebx 10f330: 8b 7d 10 mov 0x10(%ebp),%edi STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 10f333: b8 09 00 00 00 mov $0x9,%eax 10f338: 85 db test %ebx,%ebx 10f33a: 74 6b je 10f3a7 return RTEMS_INVALID_ADDRESS; errno = 0; 10f33c: e8 eb 16 00 00 call 110a2c <__errno> 10f341: c7 00 00 00 00 00 movl $0x0,(%eax) *n = 0; 10f347: c7 03 00 00 00 00 movl $0x0,(%ebx) 10f34d: 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 ); 10f354: 50 push %eax 10f355: ff 75 14 pushl 0x14(%ebp) 10f358: 8d 45 e4 lea -0x1c(%ebp),%eax 10f35b: 50 push %eax 10f35c: ff 75 08 pushl 0x8(%ebp) 10f35f: e8 bc 47 00 00 call 113b20 10f364: 89 c6 mov %eax,%esi #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 10f366: 83 c4 10 add $0x10,%esp 10f369: 85 ff test %edi,%edi 10f36b: 74 05 je 10f372 *endptr = end; 10f36d: 8b 45 e4 mov -0x1c(%ebp),%eax 10f370: 89 07 mov %eax,(%edi) /* nothing was converted */ if ( end == s ) 10f372: b8 0b 00 00 00 mov $0xb,%eax 10f377: 8b 4d 08 mov 0x8(%ebp),%ecx 10f37a: 39 4d e4 cmp %ecx,-0x1c(%ebp) 10f37d: 74 28 je 10f3a7 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 10f37f: 83 fa ff cmp $0xffffffff,%edx 10f382: 75 1c jne 10f3a0 10f384: 83 fe ff cmp $0xffffffff,%esi 10f387: 75 17 jne 10f3a0 <== ALWAYS TAKEN 10f389: 89 55 d4 mov %edx,-0x2c(%ebp) 10f38c: e8 9b 16 00 00 call 110a2c <__errno> 10f391: 89 c1 mov %eax,%ecx 10f393: b8 0a 00 00 00 mov $0xa,%eax 10f398: 83 39 22 cmpl $0x22,(%ecx) 10f39b: 8b 55 d4 mov -0x2c(%ebp),%edx 10f39e: 74 07 je 10f3a7 <== NEVER TAKEN /* there was an underflow */ if ( (result == STRING_TO_MIN) && (errno == ERANGE)) return RTEMS_INVALID_NUMBER; #endif *n = (STRING_TO_TYPE) result; 10f3a0: 89 33 mov %esi,(%ebx) 10f3a2: 89 53 04 mov %edx,0x4(%ebx) 10f3a5: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; } 10f3a7: 8d 65 f4 lea -0xc(%ebp),%esp 10f3aa: 5b pop %ebx 10f3ab: 5e pop %esi 10f3ac: 5f pop %edi 10f3ad: c9 leave 10f3ae: c3 ret 0010a0a8 : size_t stack_size, rtems_mode initial_modes, rtems_attribute attribute_set, rtems_id *id ) { 10a0a8: 55 push %ebp 10a0a9: 89 e5 mov %esp,%ebp 10a0ab: 57 push %edi 10a0ac: 56 push %esi 10a0ad: 53 push %ebx 10a0ae: 83 ec 1c sub $0x1c,%esp 10a0b1: 8b 55 08 mov 0x8(%ebp),%edx 10a0b4: 8b 7d 0c mov 0xc(%ebp),%edi 10a0b7: 8b 75 14 mov 0x14(%ebp),%esi Priority_Control core_priority; RTEMS_API_Control *api; ASR_Information *asr; if ( !id ) 10a0ba: b8 09 00 00 00 mov $0x9,%eax 10a0bf: 83 7d 1c 00 cmpl $0x0,0x1c(%ebp) 10a0c3: 0f 84 07 01 00 00 je 10a1d0 return RTEMS_INVALID_ADDRESS; if ( !rtems_is_name_valid( name ) ) 10a0c9: b0 03 mov $0x3,%al 10a0cb: 85 d2 test %edx,%edx 10a0cd: 0f 84 fd 00 00 00 je 10a1d0 /* * Validate the RTEMS API priority and convert it to the core priority range. */ if ( !_Attributes_Is_system_task( the_attribute_set ) ) { 10a0d3: 66 83 7d 18 00 cmpw $0x0,0x18(%ebp) 10a0d8: 78 21 js 10a0fb */ RTEMS_INLINE_ROUTINE bool _RTEMS_tasks_Priority_is_valid ( rtems_task_priority the_priority ) { return ( ( the_priority >= RTEMS_MINIMUM_PRIORITY ) && 10a0da: 31 c9 xor %ecx,%ecx 10a0dc: 85 ff test %edi,%edi 10a0de: 74 0e je 10a0ee 10a0e0: 0f b6 05 14 f9 11 00 movzbl 0x11f914,%eax 10a0e7: 31 c9 xor %ecx,%ecx 10a0e9: 39 c7 cmp %eax,%edi 10a0eb: 0f 96 c1 setbe %cl if ( !_RTEMS_tasks_Priority_is_valid( initial_priority ) ) 10a0ee: b8 13 00 00 00 mov $0x13,%eax 10a0f3: 85 c9 test %ecx,%ecx 10a0f5: 0f 84 d5 00 00 00 je 10a1d0 */ /* * Lock the allocator mutex for protection */ _RTEMS_Lock_allocator(); 10a0fb: 83 ec 0c sub $0xc,%esp 10a0fe: ff 35 28 39 12 00 pushl 0x123928 10a104: 89 55 e4 mov %edx,-0x1c(%ebp) 10a107: e8 bc 05 00 00 call 10a6c8 <_API_Mutex_Lock> <== ALWAYS TAKEN * This function allocates a task control block from * the inactive chain of free task control blocks. */ RTEMS_INLINE_ROUTINE Thread_Control *_RTEMS_tasks_Allocate( void ) { return (Thread_Control *) _Objects_Allocate( &_RTEMS_tasks_Information ); 10a10c: c7 04 24 fc 37 12 00 movl $0x1237fc,(%esp) 10a113: e8 24 0e 00 00 call 10af3c <_Objects_Allocate> <== ALWAYS TAKEN 10a118: 89 c3 mov %eax,%ebx * the event of an error. */ the_thread = _RTEMS_tasks_Allocate(); if ( !the_thread ) { 10a11a: 83 c4 10 add $0x10,%esp 10a11d: 85 c0 test %eax,%eax 10a11f: 8b 55 e4 mov -0x1c(%ebp),%edx 10a122: 75 18 jne 10a13c _RTEMS_Unlock_allocator(); 10a124: 83 ec 0c sub $0xc,%esp 10a127: ff 35 28 39 12 00 pushl 0x123928 10a12d: e8 de 05 00 00 call 10a710 <_API_Mutex_Unlock> 10a132: b8 05 00 00 00 mov $0x5,%eax 10a137: e9 91 00 00 00 jmp 10a1cd <== ALWAYS TAKEN /* * Initialize the core thread for this task. */ status = _Thread_Initialize( 10a13c: 50 push %eax 10a13d: 52 push %edx 10a13e: 89 f0 mov %esi,%eax 10a140: 83 e0 01 and $0x1,%eax 10a143: 50 push %eax 10a144: 6a 00 push $0x0 10a146: 89 f0 mov %esi,%eax 10a148: c1 e8 09 shr $0x9,%eax 10a14b: 83 e0 01 and $0x1,%eax 10a14e: 50 push %eax 10a14f: 89 f0 mov %esi,%eax 10a151: c1 e8 08 shr $0x8,%eax 10a154: 83 f0 01 xor $0x1,%eax 10a157: 83 e0 01 and $0x1,%eax 10a15a: 50 push %eax 10a15b: 57 push %edi 10a15c: 8b 45 18 mov 0x18(%ebp),%eax 10a15f: 83 e0 01 and $0x1,%eax 10a162: 50 push %eax 10a163: ff 75 10 pushl 0x10(%ebp) 10a166: 6a 00 push $0x0 10a168: 53 push %ebx 10a169: 68 fc 37 12 00 push $0x1237fc 10a16e: e8 39 1a 00 00 call 10bbac <_Thread_Initialize> NULL, /* no budget algorithm callout */ _Modes_Get_interrupt_level(initial_modes), (Objects_Name) name ); if ( !status ) { 10a173: 83 c4 30 add $0x30,%esp 10a176: 84 c0 test %al,%al 10a178: 75 27 jne 10a1a1 */ RTEMS_INLINE_ROUTINE void _RTEMS_tasks_Free ( Thread_Control *the_task ) { _Objects_Free( 10a17a: 83 ec 0c sub $0xc,%esp 10a17d: ff 73 08 pushl 0x8(%ebx) 10a180: e8 13 11 00 00 call 10b298 <_Objects_Get_information_id> 10a185: 5a pop %edx 10a186: 59 pop %ecx 10a187: 53 push %ebx 10a188: 50 push %eax 10a189: e8 9a 10 00 00 call 10b228 <_Objects_Free> #if defined(RTEMS_MULTIPROCESSING) if ( is_global ) _Objects_MP_Free_global_object( the_global_object ); #endif _RTEMS_tasks_Free( the_thread ); _RTEMS_Unlock_allocator(); 10a18e: 58 pop %eax 10a18f: ff 35 28 39 12 00 pushl 0x123928 10a195: e8 76 05 00 00 call 10a710 <_API_Mutex_Unlock> <== ALWAYS TAKEN 10a19a: b8 0d 00 00 00 mov $0xd,%eax 10a19f: eb 2c jmp 10a1cd <== ALWAYS TAKEN } api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; asr->is_enabled = _Modes_Is_asr_disabled(initial_modes) ? false : true; 10a1a1: 8b 83 f0 00 00 00 mov 0xf0(%ebx),%eax 10a1a7: c1 ee 0a shr $0xa,%esi 10a1aa: 83 f6 01 xor $0x1,%esi 10a1ad: 83 e6 01 and $0x1,%esi 10a1b0: 89 f2 mov %esi,%edx 10a1b2: 88 50 08 mov %dl,0x8(%eax) *id = the_thread->Object.id; 10a1b5: 8b 43 08 mov 0x8(%ebx),%eax 10a1b8: 8b 55 1c mov 0x1c(%ebp),%edx 10a1bb: 89 02 mov %eax,(%edx) ); } #endif _RTEMS_Unlock_allocator(); 10a1bd: 83 ec 0c sub $0xc,%esp 10a1c0: ff 35 28 39 12 00 pushl 0x123928 10a1c6: e8 45 05 00 00 call 10a710 <_API_Mutex_Unlock> <== ALWAYS TAKEN 10a1cb: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 10a1cd: 83 c4 10 add $0x10,%esp } 10a1d0: 8d 65 f4 lea -0xc(%ebp),%esp 10a1d3: 5b pop %ebx 10a1d4: 5e pop %esi 10a1d5: 5f pop %edi 10a1d6: c9 leave 10a1d7: c3 ret 0010a1d8 : */ rtems_status_code rtems_task_delete( rtems_id id ) { 10a1d8: 55 push %ebp 10a1d9: 89 e5 mov %esp,%ebp 10a1db: 53 push %ebx 10a1dc: 83 ec 20 sub $0x20,%esp register Thread_Control *the_thread; Objects_Locations location; Objects_Information *the_information; _RTEMS_Lock_allocator(); 10a1df: ff 35 28 39 12 00 pushl 0x123928 10a1e5: e8 de 04 00 00 call 10a6c8 <_API_Mutex_Lock> <== ALWAYS TAKEN the_thread = _Thread_Get( id, &location ); 10a1ea: 5b pop %ebx 10a1eb: 58 pop %eax 10a1ec: 8d 45 f4 lea -0xc(%ebp),%eax 10a1ef: 50 push %eax 10a1f0: ff 75 08 pushl 0x8(%ebp) 10a1f3: e8 40 19 00 00 call 10bb38 <_Thread_Get> 10a1f8: 89 c3 mov %eax,%ebx switch ( location ) { 10a1fa: 83 c4 10 add $0x10,%esp 10a1fd: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 10a201: 75 3b jne 10a23e case OBJECTS_LOCAL: the_information = _Objects_Get_information_id( the_thread->Object.id ); 10a203: 83 ec 0c sub $0xc,%esp 10a206: ff 70 08 pushl 0x8(%eax) 10a209: e8 8a 10 00 00 call 10b298 <_Objects_Get_information_id> 0 /* Not used */ ); } #endif _Thread_Close( the_information, the_thread ); 10a20e: 5a pop %edx 10a20f: 59 pop %ecx 10a210: 53 push %ebx 10a211: 50 push %eax 10a212: e8 0d 16 00 00 call 10b824 <_Thread_Close> 10a217: 58 pop %eax 10a218: ff 73 08 pushl 0x8(%ebx) 10a21b: e8 78 10 00 00 call 10b298 <_Objects_Get_information_id> 10a220: 5a pop %edx 10a221: 59 pop %ecx 10a222: 53 push %ebx 10a223: 50 push %eax 10a224: e8 ff 0f 00 00 call 10b228 <_Objects_Free> _RTEMS_tasks_Free( the_thread ); _RTEMS_Unlock_allocator(); 10a229: 58 pop %eax 10a22a: ff 35 28 39 12 00 pushl 0x123928 10a230: e8 db 04 00 00 call 10a710 <_API_Mutex_Unlock> <== ALWAYS TAKEN _Thread_Enable_dispatch(); 10a235: e8 db 18 00 00 call 10bb15 <_Thread_Enable_dispatch> 10a23a: 31 c0 xor %eax,%eax 10a23c: eb 13 jmp 10a251 <== ALWAYS TAKEN case OBJECTS_ERROR: break; } _RTEMS_Unlock_allocator(); 10a23e: 83 ec 0c sub $0xc,%esp 10a241: ff 35 28 39 12 00 pushl 0x123928 10a247: e8 c4 04 00 00 call 10a710 <_API_Mutex_Unlock> 10a24c: b8 04 00 00 00 mov $0x4,%eax return RTEMS_INVALID_ID; 10a251: 83 c4 10 add $0x10,%esp } 10a254: 8b 5d fc mov -0x4(%ebp),%ebx 10a257: c9 leave 10a258: c3 ret 0010ba00 : rtems_status_code rtems_task_get_note( rtems_id id, uint32_t notepad, uint32_t *note ) { 10ba00: 55 push %ebp 10ba01: 89 e5 mov %esp,%ebp 10ba03: 56 push %esi 10ba04: 53 push %ebx 10ba05: 83 ec 10 sub $0x10,%esp 10ba08: 8b 55 08 mov 0x8(%ebp),%edx 10ba0b: 8b 75 0c mov 0xc(%ebp),%esi 10ba0e: 8b 5d 10 mov 0x10(%ebp),%ebx register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; if ( !rtems_configuration_get_notepads_enabled() ) 10ba11: b8 16 00 00 00 mov $0x16,%eax 10ba16: 80 3d c4 21 12 00 00 cmpb $0x0,0x1221c4 10ba1d: 74 5d je 10ba7c return RTEMS_NOT_CONFIGURED; if ( !note ) 10ba1f: b0 09 mov $0x9,%al 10ba21: 85 db test %ebx,%ebx 10ba23: 74 57 je 10ba7c /* * NOTE: There is no check for < RTEMS_NOTEPAD_FIRST because that would * be checking an unsigned number for being negative. */ if ( notepad > RTEMS_NOTEPAD_LAST ) 10ba25: b0 0a mov $0xa,%al 10ba27: 83 fe 0f cmp $0xf,%esi 10ba2a: 77 50 ja 10ba7c /* * Optimize the most likely case to avoid the Thread_Dispatch. */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || 10ba2c: 85 d2 test %edx,%edx 10ba2e: 74 0a je 10ba3a _Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) { 10ba30: a1 c4 64 12 00 mov 0x1264c4,%eax 10ba35: 3b 50 08 cmp 0x8(%eax),%edx 10ba38: 75 13 jne 10ba4d api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ]; *note = api->Notepads[ notepad ]; 10ba3a: a1 c4 64 12 00 mov 0x1264c4,%eax 10ba3f: 8b 80 f0 00 00 00 mov 0xf0(%eax),%eax 10ba45: 8b 44 b0 20 mov 0x20(%eax,%esi,4),%eax 10ba49: 89 03 mov %eax,(%ebx) 10ba4b: eb 2d jmp 10ba7a <== ALWAYS TAKEN return RTEMS_SUCCESSFUL; } the_thread = _Thread_Get( id, &location ); 10ba4d: 50 push %eax 10ba4e: 50 push %eax 10ba4f: 8d 45 f4 lea -0xc(%ebp),%eax 10ba52: 50 push %eax 10ba53: 52 push %edx 10ba54: e8 9f 1b 00 00 call 10d5f8 <_Thread_Get> 10ba59: 89 c2 mov %eax,%edx switch ( location ) { 10ba5b: 83 c4 10 add $0x10,%esp 10ba5e: b8 04 00 00 00 mov $0x4,%eax 10ba63: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 10ba67: 75 13 jne 10ba7c case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; *note = api->Notepads[ notepad ]; 10ba69: 8b 82 f0 00 00 00 mov 0xf0(%edx),%eax 10ba6f: 8b 44 b0 20 mov 0x20(%eax,%esi,4),%eax 10ba73: 89 03 mov %eax,(%ebx) _Thread_Enable_dispatch(); 10ba75: e8 5b 1b 00 00 call 10d5d5 <_Thread_Enable_dispatch> 10ba7a: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10ba7c: 8d 65 f8 lea -0x8(%ebp),%esp 10ba7f: 5b pop %ebx 10ba80: 5e pop %esi 10ba81: c9 leave 10ba82: c3 ret 0010a25c : rtems_status_code rtems_task_ident( rtems_name name, uint32_t node, rtems_id *id ) { 10a25c: 55 push %ebp 10a25d: 89 e5 mov %esp,%ebp 10a25f: 83 ec 08 sub $0x8,%esp 10a262: 8b 4d 08 mov 0x8(%ebp),%ecx 10a265: 8b 55 10 mov 0x10(%ebp),%edx Objects_Name_or_id_lookup_errors status; if ( !id ) 10a268: b8 09 00 00 00 mov $0x9,%eax 10a26d: 85 d2 test %edx,%edx 10a26f: 74 2b je 10a29c return RTEMS_INVALID_ADDRESS; if ( name == OBJECTS_ID_OF_SELF ) { 10a271: 85 c9 test %ecx,%ecx 10a273: 75 0e jne 10a283 *id = _Thread_Executing->Object.id; 10a275: a1 30 39 12 00 mov 0x123930,%eax 10a27a: 8b 40 08 mov 0x8(%eax),%eax 10a27d: 89 02 mov %eax,(%edx) 10a27f: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 10a281: eb 19 jmp 10a29c <== ALWAYS TAKEN } status = _Objects_Name_to_id_u32( &_RTEMS_tasks_Information, name, node, id ); 10a283: 52 push %edx 10a284: ff 75 0c pushl 0xc(%ebp) 10a287: 51 push %ecx 10a288: 68 fc 37 12 00 push $0x1237fc 10a28d: e8 0a 12 00 00 call 10b49c <_Objects_Name_to_id_u32> return _Status_Object_name_errors_to_status[ status ]; 10a292: 8b 04 85 2c d5 11 00 mov 0x11d52c(,%eax,4),%eax 10a299: 83 c4 10 add $0x10,%esp } 10a29c: c9 leave 10a29d: c3 ret 00115954 : */ rtems_status_code rtems_task_is_suspended( rtems_id id ) { 115954: 55 push %ebp 115955: 89 e5 mov %esp,%ebp 115957: 83 ec 20 sub $0x20,%esp register Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 11595a: 8d 45 f4 lea -0xc(%ebp),%eax 11595d: 50 push %eax 11595e: ff 75 08 pushl 0x8(%ebp) 115961: e8 a6 31 00 00 call 118b0c <_Thread_Get> 115966: 89 c2 mov %eax,%edx switch ( location ) { 115968: 83 c4 10 add $0x10,%esp 11596b: b8 04 00 00 00 mov $0x4,%eax 115970: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 115974: 75 19 jne 11598f case OBJECTS_LOCAL: if ( !_States_Is_suspended( the_thread->current_state ) ) { 115976: f6 42 10 02 testb $0x2,0x10(%edx) 11597a: 75 09 jne 115985 _Thread_Enable_dispatch(); 11597c: e8 3c 31 00 00 call 118abd <_Thread_Enable_dispatch> 115981: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 115983: eb 0a jmp 11598f <== ALWAYS TAKEN } _Thread_Enable_dispatch(); 115985: e8 33 31 00 00 call 118abd <_Thread_Enable_dispatch> 11598a: b8 0f 00 00 00 mov $0xf,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11598f: c9 leave 115990: c3 ret 0010fa04 : rtems_status_code rtems_task_mode( rtems_mode mode_set, rtems_mode mask, rtems_mode *previous_mode_set ) { 10fa04: 55 push %ebp 10fa05: 89 e5 mov %esp,%ebp 10fa07: 57 push %edi 10fa08: 56 push %esi 10fa09: 53 push %ebx 10fa0a: 83 ec 1c sub $0x1c,%esp 10fa0d: 8b 4d 10 mov 0x10(%ebp),%ecx ASR_Information *asr; bool is_asr_enabled = false; bool needs_asr_dispatching = false; rtems_mode old_mode; if ( !previous_mode_set ) 10fa10: b8 09 00 00 00 mov $0x9,%eax 10fa15: 85 c9 test %ecx,%ecx 10fa17: 0f 84 f4 00 00 00 je 10fb11 return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; 10fa1d: 8b 1d 30 39 12 00 mov 0x123930,%ebx api = executing->API_Extensions[ THREAD_API_RTEMS ]; 10fa23: 8b b3 f0 00 00 00 mov 0xf0(%ebx),%esi asr = &api->Signal; old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT; 10fa29: 80 7b 75 01 cmpb $0x1,0x75(%ebx) 10fa2d: 19 ff sbb %edi,%edi 10fa2f: 81 e7 00 01 00 00 and $0x100,%edi if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE ) 10fa35: 83 7b 7c 00 cmpl $0x0,0x7c(%ebx) 10fa39: 74 06 je 10fa41 old_mode |= RTEMS_NO_TIMESLICE; else old_mode |= RTEMS_TIMESLICE; 10fa3b: 81 cf 00 02 00 00 or $0x200,%edi if ( !previous_mode_set ) return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; api = executing->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; 10fa41: 80 7e 08 01 cmpb $0x1,0x8(%esi) 10fa45: 19 d2 sbb %edx,%edx 10fa47: 81 e2 00 04 00 00 and $0x400,%edx old_mode |= RTEMS_NO_TIMESLICE; else old_mode |= RTEMS_TIMESLICE; old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR; old_mode |= _ISR_Get_level(); 10fa4d: 89 55 e4 mov %edx,-0x1c(%ebp) 10fa50: 89 4d e0 mov %ecx,-0x20(%ebp) 10fa53: e8 a3 d2 ff ff call 10ccfb <_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; 10fa58: 8b 55 e4 mov -0x1c(%ebp),%edx 10fa5b: 09 d0 or %edx,%eax old_mode |= _ISR_Get_level(); *previous_mode_set = old_mode; 10fa5d: 09 f8 or %edi,%eax 10fa5f: 8b 4d e0 mov -0x20(%ebp),%ecx 10fa62: 89 01 mov %eax,(%ecx) /* * These are generic thread scheduling characteristics. */ if ( mask & RTEMS_PREEMPT_MASK ) 10fa64: f7 45 0c 00 01 00 00 testl $0x100,0xc(%ebp) 10fa6b: 74 0f je 10fa7c executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false; 10fa6d: 8b 45 08 mov 0x8(%ebp),%eax 10fa70: c1 e8 08 shr $0x8,%eax 10fa73: 83 f0 01 xor $0x1,%eax 10fa76: 83 e0 01 and $0x1,%eax 10fa79: 88 43 75 mov %al,0x75(%ebx) if ( mask & RTEMS_TIMESLICE_MASK ) { 10fa7c: f7 45 0c 00 02 00 00 testl $0x200,0xc(%ebp) 10fa83: 74 21 je 10faa6 if ( _Modes_Is_timeslice(mode_set) ) { 10fa85: f7 45 08 00 02 00 00 testl $0x200,0x8(%ebp) 10fa8c: 74 11 je 10fa9f executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; 10fa8e: c7 43 7c 01 00 00 00 movl $0x1,0x7c(%ebx) executing->cpu_time_budget = _Thread_Ticks_per_timeslice; 10fa95: a1 40 38 12 00 mov 0x123840,%eax 10fa9a: 89 43 78 mov %eax,0x78(%ebx) 10fa9d: eb 07 jmp 10faa6 <== ALWAYS TAKEN } else executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; 10fa9f: c7 43 7c 00 00 00 00 movl $0x0,0x7c(%ebx) /* * Set the new interrupt level */ if ( mask & RTEMS_INTERRUPT_MASK ) 10faa6: f6 45 0c 01 testb $0x1,0xc(%ebp) 10faaa: 74 0a je 10fab6 */ RTEMS_INLINE_ROUTINE void _Modes_Set_interrupt_level ( Modes_Control mode_set ) { _ISR_Set_level( _Modes_Get_interrupt_level( mode_set ) ); 10faac: f6 45 08 01 testb $0x1,0x8(%ebp) 10fab0: 74 03 je 10fab5 10fab2: fa cli 10fab3: eb 01 jmp 10fab6 <== ALWAYS TAKEN 10fab5: fb sti */ is_asr_enabled = false; needs_asr_dispatching = false; if ( mask & RTEMS_ASR_MASK ) { 10fab6: f7 45 0c 00 04 00 00 testl $0x400,0xc(%ebp) 10fabd: 74 33 je 10faf2 * Output: * *previous_mode_set - previous mode set * always return RTEMS_SUCCESSFUL; */ rtems_status_code rtems_task_mode( 10fabf: 8b 45 08 mov 0x8(%ebp),%eax 10fac2: c1 e8 0a shr $0xa,%eax 10fac5: 83 f0 01 xor $0x1,%eax 10fac8: 83 e0 01 and $0x1,%eax if ( !previous_mode_set ) return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; api = executing->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; 10facb: 3a 46 08 cmp 0x8(%esi),%al 10face: 74 22 je 10faf2 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 ) { asr->is_enabled = is_asr_enabled; 10fad0: 88 46 08 mov %al,0x8(%esi) ) { rtems_signal_set _signals; ISR_Level _level; _ISR_Disable( _level ); 10fad3: 9c pushf 10fad4: fa cli 10fad5: 58 pop %eax _signals = information->signals_pending; 10fad6: 8b 56 18 mov 0x18(%esi),%edx information->signals_pending = information->signals_posted; 10fad9: 8b 4e 14 mov 0x14(%esi),%ecx 10fadc: 89 4e 18 mov %ecx,0x18(%esi) information->signals_posted = _signals; 10fadf: 89 56 14 mov %edx,0x14(%esi) _ISR_Enable( _level ); 10fae2: 50 push %eax 10fae3: 9d popf if ( !previous_mode_set ) return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; api = executing->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; 10fae4: 83 7e 14 00 cmpl $0x0,0x14(%esi) 10fae8: 74 08 je 10faf2 if ( is_asr_enabled != asr->is_enabled ) { asr->is_enabled = is_asr_enabled; _ASR_Swap_signals( asr ); if ( _ASR_Are_signals_pending( asr ) ) { needs_asr_dispatching = true; executing->do_post_task_switch_extension = true; 10faea: c6 43 74 01 movb $0x1,0x74(%ebx) 10faee: b3 01 mov $0x1,%bl 10faf0: eb 02 jmp 10faf4 <== ALWAYS TAKEN 10faf2: 31 db xor %ebx,%ebx } } } if ( _System_state_Is_up( _System_state_Get() ) ) 10faf4: 83 3d 0c 3a 12 00 03 cmpl $0x3,0x123a0c 10fafb: 75 12 jne 10fb0f <== ALWAYS TAKEN if ( _Thread_Evaluate_mode() || needs_asr_dispatching ) 10fafd: e8 f2 01 00 00 call 10fcf4 <_Thread_Evaluate_mode> <== ALWAYS TAKEN 10fb02: 84 c0 test %al,%al 10fb04: 75 04 jne 10fb0a 10fb06: 84 db test %bl,%bl 10fb08: 74 05 je 10fb0f _Thread_Dispatch(); 10fb0a: e8 c1 be ff ff call 10b9d0 <_Thread_Dispatch> 10fb0f: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; } 10fb11: 83 c4 1c add $0x1c,%esp 10fb14: 5b pop %ebx 10fb15: 5e pop %esi 10fb16: 5f pop %edi 10fb17: c9 leave 10fb18: c3 ret 0010ac24 : rtems_status_code rtems_task_restart( rtems_id id, uint32_t argument ) { 10ac24: 55 push %ebp 10ac25: 89 e5 mov %esp,%ebp 10ac27: 83 ec 20 sub $0x20,%esp register Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 10ac2a: 8d 45 f4 lea -0xc(%ebp),%eax 10ac2d: 50 push %eax 10ac2e: ff 75 08 pushl 0x8(%ebp) 10ac31: e8 02 19 00 00 call 10c538 <_Thread_Get> 10ac36: 89 c2 mov %eax,%edx switch ( location ) { 10ac38: 83 c4 10 add $0x10,%esp 10ac3b: b8 04 00 00 00 mov $0x4,%eax 10ac40: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 10ac44: 75 26 jne 10ac6c case OBJECTS_LOCAL: if ( _Thread_Restart( the_thread, NULL, argument ) ) { 10ac46: 50 push %eax 10ac47: ff 75 0c pushl 0xc(%ebp) 10ac4a: 6a 00 push $0x0 10ac4c: 52 push %edx 10ac4d: e8 1e 20 00 00 call 10cc70 <_Thread_Restart> 10ac52: 83 c4 10 add $0x10,%esp 10ac55: 84 c0 test %al,%al 10ac57: 74 09 je 10ac62 _Thread_Enable_dispatch(); 10ac59: e8 b7 18 00 00 call 10c515 <_Thread_Enable_dispatch> 10ac5e: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 10ac60: eb 0a jmp 10ac6c <== ALWAYS TAKEN } _Thread_Enable_dispatch(); 10ac62: e8 ae 18 00 00 call 10c515 <_Thread_Enable_dispatch> 10ac67: b8 0e 00 00 00 mov $0xe,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10ac6c: c9 leave 10ac6d: c3 ret 0010d3ac : */ rtems_status_code rtems_task_resume( rtems_id id ) { 10d3ac: 55 push %ebp 10d3ad: 89 e5 mov %esp,%ebp 10d3af: 83 ec 20 sub $0x20,%esp register Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 10d3b2: 8d 45 f4 lea -0xc(%ebp),%eax 10d3b5: 50 push %eax 10d3b6: ff 75 08 pushl 0x8(%ebp) 10d3b9: e8 fa 19 00 00 call 10edb8 <_Thread_Get> 10d3be: 89 c2 mov %eax,%edx switch ( location ) { 10d3c0: 83 c4 10 add $0x10,%esp 10d3c3: b8 04 00 00 00 mov $0x4,%eax 10d3c8: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 10d3cc: 75 26 jne 10d3f4 case OBJECTS_LOCAL: if ( _States_Is_suspended( the_thread->current_state ) ) { 10d3ce: f6 42 10 02 testb $0x2,0x10(%edx) 10d3d2: 74 16 je 10d3ea _Thread_Resume( the_thread, true ); 10d3d4: 50 push %eax 10d3d5: 50 push %eax 10d3d6: 6a 01 push $0x1 10d3d8: 52 push %edx 10d3d9: e8 12 21 00 00 call 10f4f0 <_Thread_Resume> _Thread_Enable_dispatch(); 10d3de: e8 86 19 00 00 call 10ed69 <_Thread_Enable_dispatch> 10d3e3: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 10d3e5: 83 c4 10 add $0x10,%esp 10d3e8: eb 0a jmp 10d3f4 <== ALWAYS TAKEN } _Thread_Enable_dispatch(); 10d3ea: e8 7a 19 00 00 call 10ed69 <_Thread_Enable_dispatch> 10d3ef: b8 0e 00 00 00 mov $0xe,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10d3f4: c9 leave 10d3f5: c3 ret 0010bb54 : rtems_status_code rtems_task_set_note( rtems_id id, uint32_t notepad, uint32_t note ) { 10bb54: 55 push %ebp 10bb55: 89 e5 mov %esp,%ebp 10bb57: 56 push %esi 10bb58: 53 push %ebx 10bb59: 83 ec 10 sub $0x10,%esp 10bb5c: 8b 55 08 mov 0x8(%ebp),%edx 10bb5f: 8b 5d 0c mov 0xc(%ebp),%ebx 10bb62: 8b 75 10 mov 0x10(%ebp),%esi register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; if ( !rtems_configuration_get_notepads_enabled() ) 10bb65: b8 16 00 00 00 mov $0x16,%eax 10bb6a: 80 3d c4 21 12 00 00 cmpb $0x0,0x1221c4 10bb71: 74 53 je 10bbc6 /* * NOTE: There is no check for < RTEMS_NOTEPAD_FIRST because that would * be checking an unsigned number for being negative. */ if ( notepad > RTEMS_NOTEPAD_LAST ) 10bb73: b0 0a mov $0xa,%al 10bb75: 83 fb 0f cmp $0xf,%ebx 10bb78: 77 4c ja 10bbc6 /* * Optimize the most likely case to avoid the Thread_Dispatch. */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || 10bb7a: 85 d2 test %edx,%edx 10bb7c: 74 0a je 10bb88 _Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) { 10bb7e: a1 c4 64 12 00 mov 0x1264c4,%eax 10bb83: 3b 50 08 cmp 0x8(%eax),%edx 10bb86: 75 11 jne 10bb99 api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ]; api->Notepads[ notepad ] = note; 10bb88: a1 c4 64 12 00 mov 0x1264c4,%eax 10bb8d: 8b 80 f0 00 00 00 mov 0xf0(%eax),%eax 10bb93: 89 74 98 20 mov %esi,0x20(%eax,%ebx,4) 10bb97: eb 2b jmp 10bbc4 <== ALWAYS TAKEN return RTEMS_SUCCESSFUL; } the_thread = _Thread_Get( id, &location ); 10bb99: 50 push %eax 10bb9a: 50 push %eax 10bb9b: 8d 45 f4 lea -0xc(%ebp),%eax 10bb9e: 50 push %eax 10bb9f: 52 push %edx 10bba0: e8 53 1a 00 00 call 10d5f8 <_Thread_Get> 10bba5: 89 c2 mov %eax,%edx switch ( location ) { 10bba7: 83 c4 10 add $0x10,%esp 10bbaa: b8 04 00 00 00 mov $0x4,%eax 10bbaf: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 10bbb3: 75 11 jne 10bbc6 case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; api->Notepads[ notepad ] = note; 10bbb5: 8b 82 f0 00 00 00 mov 0xf0(%edx),%eax 10bbbb: 89 74 98 20 mov %esi,0x20(%eax,%ebx,4) _Thread_Enable_dispatch(); 10bbbf: e8 11 1a 00 00 call 10d5d5 <_Thread_Enable_dispatch> 10bbc4: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10bbc6: 8d 65 f8 lea -0x8(%ebp),%esp 10bbc9: 5b pop %ebx 10bbca: 5e pop %esi 10bbcb: c9 leave 10bbcc: c3 ret 0010dfe8 : rtems_status_code rtems_task_set_priority( rtems_id id, rtems_task_priority new_priority, rtems_task_priority *old_priority ) { 10dfe8: 55 push %ebp 10dfe9: 89 e5 mov %esp,%ebp 10dfeb: 56 push %esi 10dfec: 53 push %ebx 10dfed: 83 ec 10 sub $0x10,%esp 10dff0: 8b 5d 0c mov 0xc(%ebp),%ebx 10dff3: 8b 75 10 mov 0x10(%ebp),%esi register Thread_Control *the_thread; Objects_Locations location; if ( new_priority != RTEMS_CURRENT_PRIORITY && 10dff6: 85 db test %ebx,%ebx 10dff8: 74 10 je 10e00a 10dffa: 0f b6 05 94 47 12 00 movzbl 0x124794,%eax 10e001: ba 13 00 00 00 mov $0x13,%edx 10e006: 39 c3 cmp %eax,%ebx 10e008: 77 50 ja 10e05a !_RTEMS_tasks_Priority_is_valid( new_priority ) ) return RTEMS_INVALID_PRIORITY; if ( !old_priority ) 10e00a: ba 09 00 00 00 mov $0x9,%edx 10e00f: 85 f6 test %esi,%esi 10e011: 74 47 je 10e05a return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get( id, &location ); 10e013: 51 push %ecx 10e014: 51 push %ecx 10e015: 8d 45 f4 lea -0xc(%ebp),%eax 10e018: 50 push %eax 10e019: ff 75 08 pushl 0x8(%ebp) 10e01c: e8 17 1b 00 00 call 10fb38 <_Thread_Get> switch ( location ) { 10e021: 83 c4 10 add $0x10,%esp 10e024: ba 04 00 00 00 mov $0x4,%edx 10e029: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 10e02d: 75 2b jne 10e05a case OBJECTS_LOCAL: /* XXX need helper to "convert" from core priority */ *old_priority = the_thread->current_priority; 10e02f: 8b 50 14 mov 0x14(%eax),%edx 10e032: 89 16 mov %edx,(%esi) if ( new_priority != RTEMS_CURRENT_PRIORITY ) { 10e034: 85 db test %ebx,%ebx 10e036: 74 1b je 10e053 the_thread->real_priority = new_priority; 10e038: 89 58 18 mov %ebx,0x18(%eax) if ( the_thread->resource_count == 0 || 10e03b: 83 78 1c 00 cmpl $0x0,0x1c(%eax) 10e03f: 74 05 je 10e046 the_thread->current_priority > new_priority ) 10e041: 39 58 14 cmp %ebx,0x14(%eax) 10e044: 76 0d jbe 10e053 <== NEVER TAKEN _Thread_Change_priority( the_thread, new_priority, false ); 10e046: 52 push %edx 10e047: 6a 00 push $0x0 10e049: 53 push %ebx 10e04a: 50 push %eax 10e04b: e8 fc 15 00 00 call 10f64c <_Thread_Change_priority> 10e050: 83 c4 10 add $0x10,%esp } _Thread_Enable_dispatch(); 10e053: e8 91 1a 00 00 call 10fae9 <_Thread_Enable_dispatch> 10e058: 31 d2 xor %edx,%edx case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10e05a: 89 d0 mov %edx,%eax 10e05c: 8d 65 f8 lea -0x8(%ebp),%esp 10e05f: 5b pop %ebx 10e060: 5e pop %esi 10e061: c9 leave 10e062: c3 ret 0010a314 : rtems_status_code rtems_task_start( rtems_id id, rtems_task_entry entry_point, rtems_task_argument argument ) { 10a314: 55 push %ebp 10a315: 89 e5 mov %esp,%ebp 10a317: 53 push %ebx 10a318: 83 ec 14 sub $0x14,%esp 10a31b: 8b 5d 0c mov 0xc(%ebp),%ebx register Thread_Control *the_thread; Objects_Locations location; if ( entry_point == NULL ) 10a31e: b8 09 00 00 00 mov $0x9,%eax 10a323: 85 db test %ebx,%ebx 10a325: 74 49 je 10a370 return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get( id, &location ); 10a327: 50 push %eax 10a328: 50 push %eax 10a329: 8d 45 f4 lea -0xc(%ebp),%eax 10a32c: 50 push %eax 10a32d: ff 75 08 pushl 0x8(%ebp) 10a330: e8 03 18 00 00 call 10bb38 <_Thread_Get> 10a335: 89 c2 mov %eax,%edx switch ( location ) { 10a337: 83 c4 10 add $0x10,%esp 10a33a: b8 04 00 00 00 mov $0x4,%eax 10a33f: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 10a343: 75 2b jne 10a370 case OBJECTS_LOCAL: if ( _Thread_Start( 10a345: 83 ec 0c sub $0xc,%esp 10a348: ff 75 10 pushl 0x10(%ebp) 10a34b: 6a 00 push $0x0 10a34d: 53 push %ebx 10a34e: 6a 00 push $0x0 10a350: 52 push %edx 10a351: e8 96 21 00 00 call 10c4ec <_Thread_Start> 10a356: 83 c4 20 add $0x20,%esp 10a359: 84 c0 test %al,%al 10a35b: 74 09 je 10a366 the_thread, THREAD_START_NUMERIC, entry_point, NULL, argument ) ) { _Thread_Enable_dispatch(); 10a35d: e8 b3 17 00 00 call 10bb15 <_Thread_Enable_dispatch> 10a362: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 10a364: eb 0a jmp 10a370 <== ALWAYS TAKEN } _Thread_Enable_dispatch(); 10a366: e8 aa 17 00 00 call 10bb15 <_Thread_Enable_dispatch> 10a36b: b8 0e 00 00 00 mov $0xe,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10a370: 8b 5d fc mov -0x4(%ebp),%ebx 10a373: c9 leave 10a374: c3 ret 0010e1bc : */ rtems_status_code rtems_task_suspend( rtems_id id ) { 10e1bc: 55 push %ebp 10e1bd: 89 e5 mov %esp,%ebp 10e1bf: 83 ec 20 sub $0x20,%esp register Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 10e1c2: 8d 45 f4 lea -0xc(%ebp),%eax 10e1c5: 50 push %eax 10e1c6: ff 75 08 pushl 0x8(%ebp) 10e1c9: e8 6a d9 ff ff call 10bb38 <_Thread_Get> 10e1ce: 89 c2 mov %eax,%edx switch ( location ) { 10e1d0: 83 c4 10 add $0x10,%esp 10e1d3: b8 04 00 00 00 mov $0x4,%eax 10e1d8: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 10e1dc: 75 25 jne 10e203 case OBJECTS_LOCAL: if ( !_States_Is_suspended( the_thread->current_state ) ) { 10e1de: f6 42 10 02 testb $0x2,0x10(%edx) 10e1e2: 75 15 jne 10e1f9 _Thread_Suspend( the_thread ); 10e1e4: 83 ec 0c sub $0xc,%esp 10e1e7: 52 push %edx 10e1e8: e8 3f 09 00 00 call 10eb2c <_Thread_Suspend> _Thread_Enable_dispatch(); 10e1ed: e8 23 d9 ff ff call 10bb15 <_Thread_Enable_dispatch> 10e1f2: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 10e1f4: 83 c4 10 add $0x10,%esp 10e1f7: eb 0a jmp 10e203 <== ALWAYS TAKEN } _Thread_Enable_dispatch(); 10e1f9: e8 17 d9 ff ff call 10bb15 <_Thread_Enable_dispatch> 10e1fe: b8 0f 00 00 00 mov $0xf,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10e203: c9 leave 10e204: c3 ret 001275b8 : rtems_status_code rtems_task_variable_add( rtems_id tid, void **ptr, void (*dtor)(void *) ) { 1275b8: 55 push %ebp 1275b9: 89 e5 mov %esp,%ebp 1275bb: 57 push %edi 1275bc: 56 push %esi 1275bd: 53 push %ebx 1275be: 83 ec 1c sub $0x1c,%esp 1275c1: 8b 5d 0c mov 0xc(%ebp),%ebx 1275c4: 8b 7d 10 mov 0x10(%ebp),%edi Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp, *new; if ( !ptr ) 1275c7: b8 09 00 00 00 mov $0x9,%eax 1275cc: 85 db test %ebx,%ebx 1275ce: 74 73 je 127643 return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get (tid, &location); 1275d0: 50 push %eax 1275d1: 50 push %eax 1275d2: 8d 45 e4 lea -0x1c(%ebp),%eax 1275d5: 50 push %eax 1275d6: ff 75 08 pushl 0x8(%ebp) 1275d9: e8 fe 9e fe ff call 1114dc <_Thread_Get> 1275de: 89 c6 mov %eax,%esi switch (location) { 1275e0: 83 c4 10 add $0x10,%esp 1275e3: b8 04 00 00 00 mov $0x4,%eax 1275e8: 83 7d e4 00 cmpl $0x0,-0x1c(%ebp) 1275ec: 75 55 jne 127643 case OBJECTS_LOCAL: /* * Figure out if the variable is already in this task's list. */ tvp = the_thread->task_variables; 1275ee: 8b 86 00 01 00 00 mov 0x100(%esi),%eax while (tvp) { 1275f4: eb 0c jmp 127602 <== ALWAYS TAKEN if (tvp->ptr == ptr) { 1275f6: 39 58 04 cmp %ebx,0x4(%eax) 1275f9: 75 05 jne 127600 tvp->dtor = dtor; 1275fb: 89 78 10 mov %edi,0x10(%eax) 1275fe: eb 3c jmp 12763c <== ALWAYS TAKEN _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } tvp = (rtems_task_variable_t *)tvp->next; 127600: 8b 00 mov (%eax),%eax case OBJECTS_LOCAL: /* * Figure out if the variable is already in this task's list. */ tvp = the_thread->task_variables; while (tvp) { 127602: 85 c0 test %eax,%eax 127604: 75 f0 jne 1275f6 } /* * Now allocate memory for this task variable. */ new = (rtems_task_variable_t *) 127606: 83 ec 0c sub $0xc,%esp 127609: 6a 14 push $0x14 12760b: e8 20 ae fe ff call 112430 <_Workspace_Allocate> _Workspace_Allocate(sizeof(rtems_task_variable_t)); if (new == NULL) { 127610: 83 c4 10 add $0x10,%esp 127613: 85 c0 test %eax,%eax 127615: 75 0c jne 127623 _Thread_Enable_dispatch(); 127617: e8 9d 9e fe ff call 1114b9 <_Thread_Enable_dispatch> 12761c: b8 1a 00 00 00 mov $0x1a,%eax return RTEMS_NO_MEMORY; 127621: eb 20 jmp 127643 <== ALWAYS TAKEN } new->gval = *ptr; 127623: 8b 13 mov (%ebx),%edx 127625: 89 50 08 mov %edx,0x8(%eax) new->ptr = ptr; 127628: 89 58 04 mov %ebx,0x4(%eax) new->dtor = dtor; 12762b: 89 78 10 mov %edi,0x10(%eax) new->next = (struct rtems_task_variable_tt *)the_thread->task_variables; 12762e: 8b 96 00 01 00 00 mov 0x100(%esi),%edx 127634: 89 10 mov %edx,(%eax) the_thread->task_variables = new; 127636: 89 86 00 01 00 00 mov %eax,0x100(%esi) _Thread_Enable_dispatch(); 12763c: e8 78 9e fe ff call 1114b9 <_Thread_Enable_dispatch> 127641: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 127643: 8d 65 f4 lea -0xc(%ebp),%esp 127646: 5b pop %ebx 127647: 5e pop %esi 127648: 5f pop %edi 127649: c9 leave 12764a: c3 ret 0012764c : rtems_status_code rtems_task_variable_delete( rtems_id tid, void **ptr ) { 12764c: 55 push %ebp 12764d: 89 e5 mov %esp,%ebp 12764f: 53 push %ebx 127650: 83 ec 14 sub $0x14,%esp 127653: 8b 5d 0c mov 0xc(%ebp),%ebx Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp, *prev; if ( !ptr ) 127656: b8 09 00 00 00 mov $0x9,%eax 12765b: 85 db test %ebx,%ebx 12765d: 74 64 je 1276c3 return RTEMS_INVALID_ADDRESS; prev = NULL; the_thread = _Thread_Get (tid, &location); 12765f: 52 push %edx 127660: 52 push %edx 127661: 8d 45 f4 lea -0xc(%ebp),%eax 127664: 50 push %eax 127665: ff 75 08 pushl 0x8(%ebp) 127668: e8 6f 9e fe ff call 1114dc <_Thread_Get> 12766d: 89 c1 mov %eax,%ecx switch (location) { 12766f: 83 c4 10 add $0x10,%esp 127672: b8 04 00 00 00 mov $0x4,%eax 127677: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 12767b: 75 46 jne 1276c3 case OBJECTS_LOCAL: tvp = the_thread->task_variables; 12767d: 8b 91 00 01 00 00 mov 0x100(%ecx),%edx 127683: 30 c0 xor %al,%al while (tvp) { 127685: eb 2e jmp 1276b5 <== ALWAYS TAKEN if (tvp->ptr == ptr) { 127687: 39 5a 04 cmp %ebx,0x4(%edx) 12768a: 75 25 jne 1276b1 if (prev) 12768c: 85 c0 test %eax,%eax 12768e: 8b 1a mov (%edx),%ebx 127690: 74 04 je 127696 prev->next = tvp->next; 127692: 89 18 mov %ebx,(%eax) 127694: eb 06 jmp 12769c <== ALWAYS TAKEN else the_thread->task_variables = (rtems_task_variable_t *)tvp->next; 127696: 89 99 00 01 00 00 mov %ebx,0x100(%ecx) _RTEMS_Tasks_Invoke_task_variable_dtor( the_thread, tvp ); 12769c: 50 push %eax 12769d: 50 push %eax 12769e: 52 push %edx 12769f: 51 push %ecx 1276a0: e8 8b 00 00 00 call 127730 <_RTEMS_Tasks_Invoke_task_variable_dtor> <== ALWAYS TAKEN _Thread_Enable_dispatch(); 1276a5: e8 0f 9e fe ff call 1114b9 <_Thread_Enable_dispatch> 1276aa: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 1276ac: 83 c4 10 add $0x10,%esp 1276af: eb 12 jmp 1276c3 <== ALWAYS TAKEN } prev = tvp; tvp = (rtems_task_variable_t *)tvp->next; 1276b1: 89 d0 mov %edx,%eax 1276b3: 8b 12 mov (%edx),%edx the_thread = _Thread_Get (tid, &location); switch (location) { case OBJECTS_LOCAL: tvp = the_thread->task_variables; while (tvp) { 1276b5: 85 d2 test %edx,%edx 1276b7: 75 ce jne 127687 return RTEMS_SUCCESSFUL; } prev = tvp; tvp = (rtems_task_variable_t *)tvp->next; } _Thread_Enable_dispatch(); 1276b9: e8 fb 9d fe ff call 1114b9 <_Thread_Enable_dispatch> 1276be: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1276c3: 8b 5d fc mov -0x4(%ebp),%ebx 1276c6: c9 leave 1276c7: c3 ret 001276c8 : rtems_status_code rtems_task_variable_get( rtems_id tid, void **ptr, void **result ) { 1276c8: 55 push %ebp 1276c9: 89 e5 mov %esp,%ebp 1276cb: 56 push %esi 1276cc: 53 push %ebx 1276cd: 83 ec 10 sub $0x10,%esp 1276d0: 8b 75 0c mov 0xc(%ebp),%esi 1276d3: 8b 5d 10 mov 0x10(%ebp),%ebx Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp; if ( !ptr ) 1276d6: 85 f6 test %esi,%esi 1276d8: 74 48 je 127722 return RTEMS_INVALID_ADDRESS; if ( !result ) 1276da: 85 db test %ebx,%ebx 1276dc: 74 44 je 127722 return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get (tid, &location); 1276de: 50 push %eax 1276df: 50 push %eax 1276e0: 8d 45 f4 lea -0xc(%ebp),%eax 1276e3: 50 push %eax 1276e4: ff 75 08 pushl 0x8(%ebp) 1276e7: e8 f0 9d fe ff call 1114dc <_Thread_Get> 1276ec: 89 c2 mov %eax,%edx switch (location) { 1276ee: 83 c4 10 add $0x10,%esp 1276f1: b8 04 00 00 00 mov $0x4,%eax 1276f6: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 1276fa: 75 2b jne 127727 case OBJECTS_LOCAL: /* * Figure out if the variable is in this task's list. */ tvp = the_thread->task_variables; 1276fc: 8b 82 00 01 00 00 mov 0x100(%edx),%eax while (tvp) { 127702: eb 15 jmp 127719 <== ALWAYS TAKEN if (tvp->ptr == ptr) { 127704: 39 70 04 cmp %esi,0x4(%eax) 127707: 75 0e jne 127717 /* * Should this return the current (i.e not the * saved) value if `tid' is the current task? */ *result = tvp->tval; 127709: 8b 40 0c mov 0xc(%eax),%eax 12770c: 89 03 mov %eax,(%ebx) _Thread_Enable_dispatch(); 12770e: e8 a6 9d fe ff call 1114b9 <_Thread_Enable_dispatch> 127713: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 127715: eb 10 jmp 127727 <== ALWAYS TAKEN } tvp = (rtems_task_variable_t *)tvp->next; 127717: 8b 00 mov (%eax),%eax case OBJECTS_LOCAL: /* * Figure out if the variable is in this task's list. */ tvp = the_thread->task_variables; while (tvp) { 127719: 85 c0 test %eax,%eax 12771b: 75 e7 jne 127704 _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } tvp = (rtems_task_variable_t *)tvp->next; } _Thread_Enable_dispatch(); 12771d: e8 97 9d fe ff call 1114b9 <_Thread_Enable_dispatch> return RTEMS_INVALID_ADDRESS; 127722: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 127727: 8d 65 f8 lea -0x8(%ebp),%esp 12772a: 5b pop %ebx 12772b: 5e pop %esi 12772c: c9 leave 12772d: c3 ret 0010a378 : */ rtems_status_code rtems_task_wake_after( rtems_interval ticks ) { 10a378: 55 push %ebp 10a379: 89 e5 mov %esp,%ebp 10a37b: 53 push %ebx 10a37c: 83 ec 04 sub $0x4,%esp 10a37f: 8b 5d 08 mov 0x8(%ebp),%ebx 10a382: a1 74 38 12 00 mov 0x123874,%eax 10a387: 40 inc %eax 10a388: a3 74 38 12 00 mov %eax,0x123874 _Thread_Disable_dispatch(); if ( ticks == 0 ) { 10a38d: 85 db test %ebx,%ebx 10a38f: 75 07 jne 10a398 _Thread_Yield_processor(); 10a391: e8 ee 21 00 00 call 10c584 <_Thread_Yield_processor> 10a396: eb 45 jmp 10a3dd <== ALWAYS TAKEN } else { _Thread_Set_state( _Thread_Executing, STATES_DELAYING ); 10a398: 50 push %eax 10a399: 50 push %eax 10a39a: 6a 08 push $0x8 10a39c: ff 35 30 39 12 00 pushl 0x123930 10a3a2: e8 31 1f 00 00 call 10c2d8 <_Thread_Set_state> _Watchdog_Initialize( &_Thread_Executing->Timer, _Thread_Delay_ended, _Thread_Executing->Object.id, 10a3a7: a1 30 39 12 00 mov 0x123930,%eax _Thread_Disable_dispatch(); if ( ticks == 0 ) { _Thread_Yield_processor(); } else { _Thread_Set_state( _Thread_Executing, STATES_DELAYING ); _Watchdog_Initialize( 10a3ac: 8b 50 08 mov 0x8(%eax),%edx Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 10a3af: c7 40 50 00 00 00 00 movl $0x0,0x50(%eax) the_watchdog->routine = routine; 10a3b6: c7 40 64 98 b9 10 00 movl $0x10b998,0x64(%eax) the_watchdog->id = id; 10a3bd: 89 50 68 mov %edx,0x68(%eax) the_watchdog->user_data = user_data; 10a3c0: c7 40 6c 00 00 00 00 movl $0x0,0x6c(%eax) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 10a3c7: 89 58 54 mov %ebx,0x54(%eax) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 10a3ca: 5a pop %edx 10a3cb: 59 pop %ecx 10a3cc: 83 c0 48 add $0x48,%eax 10a3cf: 50 push %eax 10a3d0: 68 50 39 12 00 push $0x123950 10a3d5: e8 9e 24 00 00 call 10c878 <_Watchdog_Insert> 10a3da: 83 c4 10 add $0x10,%esp _Thread_Executing->Object.id, NULL ); _Watchdog_Insert_ticks( &_Thread_Executing->Timer, ticks ); } _Thread_Enable_dispatch(); 10a3dd: e8 33 17 00 00 call 10bb15 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; } 10a3e2: 31 c0 xor %eax,%eax 10a3e4: 8b 5d fc mov -0x4(%ebp),%ebx 10a3e7: c9 leave 10a3e8: c3 ret 0010b04c : */ rtems_status_code rtems_task_wake_when( rtems_time_of_day *time_buffer ) { 10b04c: 55 push %ebp 10b04d: 89 e5 mov %esp,%ebp 10b04f: 53 push %ebx 10b050: 83 ec 04 sub $0x4,%esp 10b053: 8b 5d 08 mov 0x8(%ebp),%ebx Watchdog_Interval seconds; if ( !_TOD_Is_set ) 10b056: b8 0b 00 00 00 mov $0xb,%eax 10b05b: 80 3d 14 52 12 00 00 cmpb $0x0,0x125214 10b062: 0f 84 9c 00 00 00 je 10b104 return RTEMS_NOT_DEFINED; if ( !time_buffer ) 10b068: b0 09 mov $0x9,%al 10b06a: 85 db test %ebx,%ebx 10b06c: 0f 84 92 00 00 00 je 10b104 return RTEMS_INVALID_ADDRESS; time_buffer->ticks = 0; 10b072: c7 43 18 00 00 00 00 movl $0x0,0x18(%ebx) if ( !_TOD_Validate( time_buffer ) ) 10b079: 83 ec 0c sub $0xc,%esp 10b07c: 53 push %ebx 10b07d: e8 12 f5 ff ff call 10a594 <_TOD_Validate> <== ALWAYS TAKEN 10b082: 83 c4 10 add $0x10,%esp 10b085: 84 c0 test %al,%al 10b087: 74 76 je 10b0ff return RTEMS_INVALID_CLOCK; seconds = _TOD_To_seconds( time_buffer ); 10b089: 83 ec 0c sub $0xc,%esp 10b08c: 53 push %ebx 10b08d: e8 9a f4 ff ff call 10a52c <_TOD_To_seconds> <== ALWAYS TAKEN 10b092: 89 c3 mov %eax,%ebx if ( seconds <= _TOD_Seconds_since_epoch() ) 10b094: 83 c4 10 add $0x10,%esp 10b097: 3b 05 90 52 12 00 cmp 0x125290,%eax 10b09d: 76 60 jbe 10b0ff 10b09f: a1 00 52 12 00 mov 0x125200,%eax 10b0a4: 40 inc %eax 10b0a5: a3 00 52 12 00 mov %eax,0x125200 return RTEMS_INVALID_CLOCK; _Thread_Disable_dispatch(); _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_TIME ); 10b0aa: 50 push %eax 10b0ab: 50 push %eax 10b0ac: 6a 10 push $0x10 10b0ae: ff 35 bc 52 12 00 pushl 0x1252bc 10b0b4: e8 1f 20 00 00 call 10d0d8 <_Thread_Set_state> _Watchdog_Initialize( &_Thread_Executing->Timer, _Thread_Delay_ended, _Thread_Executing->Object.id, 10b0b9: 8b 15 bc 52 12 00 mov 0x1252bc,%edx if ( seconds <= _TOD_Seconds_since_epoch() ) return RTEMS_INVALID_CLOCK; _Thread_Disable_dispatch(); _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_TIME ); _Watchdog_Initialize( 10b0bf: 8b 42 08 mov 0x8(%edx),%eax Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 10b0c2: c7 42 50 00 00 00 00 movl $0x0,0x50(%edx) the_watchdog->routine = routine; 10b0c9: c7 42 64 98 c7 10 00 movl $0x10c798,0x64(%edx) the_watchdog->id = id; 10b0d0: 89 42 68 mov %eax,0x68(%edx) the_watchdog->user_data = user_data; 10b0d3: c7 42 6c 00 00 00 00 movl $0x0,0x6c(%edx) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 10b0da: 2b 1d 90 52 12 00 sub 0x125290,%ebx 10b0e0: 89 5a 54 mov %ebx,0x54(%edx) _Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog ); 10b0e3: 58 pop %eax 10b0e4: 59 pop %ecx 10b0e5: 83 c2 48 add $0x48,%edx 10b0e8: 52 push %edx 10b0e9: 68 d0 52 12 00 push $0x1252d0 10b0ee: e8 f1 25 00 00 call 10d6e4 <_Watchdog_Insert> ); _Watchdog_Insert_seconds( &_Thread_Executing->Timer, seconds - _TOD_Seconds_since_epoch() ); _Thread_Enable_dispatch(); 10b0f3: e8 1d 18 00 00 call 10c915 <_Thread_Enable_dispatch> 10b0f8: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 10b0fa: 83 c4 10 add $0x10,%esp 10b0fd: eb 05 jmp 10b104 <== ALWAYS TAKEN 10b0ff: b8 14 00 00 00 mov $0x14,%eax } 10b104: 8b 5d fc mov -0x4(%ebp),%ebx 10b107: c9 leave 10b108: c3 ret 00108f44 : #include int rtems_termios_baud_to_index( rtems_termios_baud_t termios_baud ) { 108f44: 55 push %ebp 108f45: 89 e5 mov %esp,%ebp 108f47: 8b 55 08 mov 0x8(%ebp),%edx case B110: baud_index = 3; break; case B134: baud_index = 4; break; case B150: baud_index = 5; break; case B200: baud_index = 6; break; case B300: baud_index = 7; break; case B600: baud_index = 8; break; 108f4a: b8 09 00 00 00 mov $0x9,%eax rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 108f4f: 83 fa 09 cmp $0x9,%edx 108f52: 0f 84 b5 00 00 00 je 10900d <== ALWAYS TAKEN 108f58: 7f 54 jg 108fae <== ALWAYS TAKEN case B0: baud_index = 0; break; case B50: baud_index = 1; break; case B75: baud_index = 2; break; case B110: baud_index = 3; break; 108f5a: b0 04 mov $0x4,%al rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 108f5c: 83 fa 04 cmp $0x4,%edx 108f5f: 0f 84 a8 00 00 00 je 10900d <== ALWAYS TAKEN 108f65: 7f 2b jg 108f92 <== ALWAYS TAKEN 108f67: b0 01 mov $0x1,%al 108f69: 83 fa 01 cmp $0x1,%edx 108f6c: 0f 84 9b 00 00 00 je 10900d <== ALWAYS TAKEN 108f72: 7f 09 jg 108f7d <== ALWAYS TAKEN 108f74: 30 c0 xor %al,%al 108f76: 85 d2 test %edx,%edx 108f78: e9 8b 00 00 00 jmp 109008 108f7d: b8 02 00 00 00 mov $0x2,%eax <== NOT EXECUTED 108f82: 83 fa 02 cmp $0x2,%edx <== NOT EXECUTED 108f85: 0f 84 82 00 00 00 je 10900d <== NOT EXECUTED case B0: baud_index = 0; break; case B50: baud_index = 1; break; case B75: baud_index = 2; break; 108f8b: b0 03 mov $0x3,%al <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 108f8d: 83 fa 03 cmp $0x3,%edx <== NOT EXECUTED 108f90: eb 76 jmp 109008 <== NOT EXECUTED case B0: baud_index = 0; break; case B50: baud_index = 1; break; case B75: baud_index = 2; break; case B110: baud_index = 3; break; case B134: baud_index = 4; break; case B150: baud_index = 5; break; 108f92: b8 06 00 00 00 mov $0x6,%eax <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 108f97: 83 fa 06 cmp $0x6,%edx <== NOT EXECUTED 108f9a: 74 71 je 10900d <== NOT EXECUTED case B0: baud_index = 0; break; case B50: baud_index = 1; break; case B75: baud_index = 2; break; case B110: baud_index = 3; break; case B134: baud_index = 4; break; 108f9c: b0 05 mov $0x5,%al <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 108f9e: 7c 6d jl 10900d <== NOT EXECUTED case B50: baud_index = 1; break; case B75: baud_index = 2; break; case B110: baud_index = 3; break; case B134: baud_index = 4; break; case B150: baud_index = 5; break; case B200: baud_index = 6; break; 108fa0: b0 07 mov $0x7,%al <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 108fa2: 83 fa 07 cmp $0x7,%edx <== NOT EXECUTED 108fa5: 74 66 je 10900d <== NOT EXECUTED case B75: baud_index = 2; break; case B110: baud_index = 3; break; case B134: baud_index = 4; break; case B150: baud_index = 5; break; case B200: baud_index = 6; break; case B300: baud_index = 7; break; 108fa7: b0 08 mov $0x8,%al <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 108fa9: 83 fa 08 cmp $0x8,%edx <== NOT EXECUTED 108fac: eb 5a jmp 109008 <== NOT EXECUTED case B600: baud_index = 8; break; case B1200: baud_index = 9; break; case B1800: baud_index = 10; break; case B2400: baud_index = 11; break; case B4800: baud_index = 12; break; case B9600: baud_index = 13; break; 108fae: b8 0e 00 00 00 mov $0xe,%eax <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 108fb3: 83 fa 0e cmp $0xe,%edx <== NOT EXECUTED 108fb6: 74 55 je 10900d <== NOT EXECUTED 108fb8: 7f 19 jg 108fd3 <== NOT EXECUTED case B150: baud_index = 5; break; case B200: baud_index = 6; break; case B300: baud_index = 7; break; case B600: baud_index = 8; break; case B1200: baud_index = 9; break; case B1800: baud_index = 10; break; 108fba: b0 0b mov $0xb,%al <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 108fbc: 83 fa 0b cmp $0xb,%edx <== NOT EXECUTED 108fbf: 74 4c je 10900d <== NOT EXECUTED case B134: baud_index = 4; break; case B150: baud_index = 5; break; case B200: baud_index = 6; break; case B300: baud_index = 7; break; case B600: baud_index = 8; break; case B1200: baud_index = 9; break; 108fc1: b0 0a mov $0xa,%al <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 108fc3: 7c 48 jl 10900d <== NOT EXECUTED case B200: baud_index = 6; break; case B300: baud_index = 7; break; case B600: baud_index = 8; break; case B1200: baud_index = 9; break; case B1800: baud_index = 10; break; case B2400: baud_index = 11; break; 108fc5: b0 0c mov $0xc,%al <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 108fc7: 83 fa 0c cmp $0xc,%edx <== NOT EXECUTED 108fca: 74 41 je 10900d <== NOT EXECUTED case B300: baud_index = 7; break; case B600: baud_index = 8; break; case B1200: baud_index = 9; break; case B1800: baud_index = 10; break; case B2400: baud_index = 11; break; case B4800: baud_index = 12; break; 108fcc: b0 0d mov $0xd,%al <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 108fce: 83 fa 0d cmp $0xd,%edx <== NOT EXECUTED 108fd1: eb 35 jmp 109008 <== NOT EXECUTED case B2400: baud_index = 11; break; case B4800: baud_index = 12; break; case B9600: baud_index = 13; break; case B19200: baud_index = 14; break; case B38400: baud_index = 15; break; case B57600: baud_index = 16; break; 108fd3: b8 11 00 00 00 mov $0x11,%eax <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 108fd8: 81 fa 02 10 00 00 cmp $0x1002,%edx <== NOT EXECUTED 108fde: 74 2d je 10900d <== NOT EXECUTED 108fe0: 7f 11 jg 108ff3 <== NOT EXECUTED case B1200: baud_index = 9; break; case B1800: baud_index = 10; break; case B2400: baud_index = 11; break; case B4800: baud_index = 12; break; case B9600: baud_index = 13; break; case B19200: baud_index = 14; break; 108fe2: b0 0f mov $0xf,%al <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 108fe4: 83 fa 0f cmp $0xf,%edx <== NOT EXECUTED 108fe7: 74 24 je 10900d <== NOT EXECUTED case B1800: baud_index = 10; break; case B2400: baud_index = 11; break; case B4800: baud_index = 12; break; case B9600: baud_index = 13; break; case B19200: baud_index = 14; break; case B38400: baud_index = 15; break; 108fe9: b0 10 mov $0x10,%al <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 108feb: 81 fa 01 10 00 00 cmp $0x1001,%edx <== NOT EXECUTED 108ff1: eb 15 jmp 109008 <== NOT EXECUTED case B4800: baud_index = 12; break; case B9600: baud_index = 13; break; case B19200: baud_index = 14; break; case B38400: baud_index = 15; break; case B57600: baud_index = 16; break; case B115200: baud_index = 17; break; 108ff3: b8 12 00 00 00 mov $0x12,%eax <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 108ff8: 81 fa 03 10 00 00 cmp $0x1003,%edx <== NOT EXECUTED 108ffe: 74 0d je 10900d <== NOT EXECUTED case B9600: baud_index = 13; break; case B19200: baud_index = 14; break; case B38400: baud_index = 15; break; case B57600: baud_index = 16; break; case B115200: baud_index = 17; break; case B230400: baud_index = 18; break; 109000: b0 13 mov $0x13,%al <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 109002: 81 fa 04 10 00 00 cmp $0x1004,%edx <== NOT EXECUTED 109008: 74 03 je 10900d <== ALWAYS TAKEN case B19200: baud_index = 14; break; case B38400: baud_index = 15; break; case B57600: baud_index = 16; break; case B115200: baud_index = 17; break; case B230400: baud_index = 18; break; case B460800: baud_index = 19; break; 10900a: 83 c8 ff or $0xffffffff,%eax default: baud_index = -1; break; } return baud_index; } 10900d: c9 leave 10900e: c3 ret 00107d4c : #include int32_t rtems_termios_baud_to_number( int termios_baud ) { 107d4c: 55 push %ebp 107d4d: 89 e5 mov %esp,%ebp 107d4f: 8b 55 08 mov 0x8(%ebp),%edx case B110: baud = 110; break; case B134: baud = 134; break; case B150: baud = 150; break; case B200: baud = 200; break; case B300: baud = 300; break; case B600: baud = 600; break; 107d52: b8 b0 04 00 00 mov $0x4b0,%eax int termios_baud ) { int32_t baud; switch (termios_baud) { 107d57: 83 fa 09 cmp $0x9,%edx 107d5a: 0f 84 d6 00 00 00 je 107e36 107d60: 7f 65 jg 107dc7 case B0: baud = 0; break; case B50: baud = 50; break; case B75: baud = 75; break; case B110: baud = 110; break; 107d62: 66 b8 86 00 mov $0x86,%ax int termios_baud ) { int32_t baud; switch (termios_baud) { 107d66: 83 fa 04 cmp $0x4,%edx 107d69: 0f 84 c7 00 00 00 je 107e36 107d6f: 7f 2e jg 107d9f 107d71: b0 32 mov $0x32,%al 107d73: 83 fa 01 cmp $0x1,%edx 107d76: 0f 84 ba 00 00 00 je 107e36 107d7c: 7f 09 jg 107d87 107d7e: 30 c0 xor %al,%al 107d80: 85 d2 test %edx,%edx 107d82: e9 aa 00 00 00 jmp 107e31 <== ALWAYS TAKEN 107d87: b8 4b 00 00 00 mov $0x4b,%eax 107d8c: 83 fa 02 cmp $0x2,%edx 107d8f: 0f 84 a1 00 00 00 je 107e36 case B0: baud = 0; break; case B50: baud = 50; break; case B75: baud = 75; break; 107d95: b0 6e mov $0x6e,%al int termios_baud ) { int32_t baud; switch (termios_baud) { 107d97: 83 fa 03 cmp $0x3,%edx 107d9a: e9 92 00 00 00 jmp 107e31 <== ALWAYS TAKEN case B0: baud = 0; break; case B50: baud = 50; break; case B75: baud = 75; break; case B110: baud = 110; break; case B134: baud = 134; break; case B150: baud = 150; break; 107d9f: b8 c8 00 00 00 mov $0xc8,%eax int termios_baud ) { int32_t baud; switch (termios_baud) { 107da4: 83 fa 06 cmp $0x6,%edx 107da7: 0f 84 89 00 00 00 je 107e36 case B0: baud = 0; break; case B50: baud = 50; break; case B75: baud = 75; break; case B110: baud = 110; break; case B134: baud = 134; break; 107dad: b0 96 mov $0x96,%al int termios_baud ) { int32_t baud; switch (termios_baud) { 107daf: 0f 8c 81 00 00 00 jl 107e36 case B50: baud = 50; break; case B75: baud = 75; break; case B110: baud = 110; break; case B134: baud = 134; break; case B150: baud = 150; break; case B200: baud = 200; break; 107db5: 66 b8 2c 01 mov $0x12c,%ax int termios_baud ) { int32_t baud; switch (termios_baud) { 107db9: 83 fa 07 cmp $0x7,%edx 107dbc: 74 78 je 107e36 case B75: baud = 75; break; case B110: baud = 110; break; case B134: baud = 134; break; case B150: baud = 150; break; case B200: baud = 200; break; case B300: baud = 300; break; 107dbe: 66 b8 58 02 mov $0x258,%ax int termios_baud ) { int32_t baud; switch (termios_baud) { 107dc2: 83 fa 08 cmp $0x8,%edx 107dc5: eb 6a jmp 107e31 <== ALWAYS TAKEN case B600: baud = 600; break; case B1200: baud = 1200; break; case B1800: baud = 1800; break; case B2400: baud = 2400; break; case B4800: baud = 4800; break; case B9600: baud = 9600; break; 107dc7: b8 00 4b 00 00 mov $0x4b00,%eax int termios_baud ) { int32_t baud; switch (termios_baud) { 107dcc: 83 fa 0e cmp $0xe,%edx 107dcf: 74 65 je 107e36 107dd1: 7f 21 jg 107df4 case B150: baud = 150; break; case B200: baud = 200; break; case B300: baud = 300; break; case B600: baud = 600; break; case B1200: baud = 1200; break; case B1800: baud = 1800; break; 107dd3: 66 b8 60 09 mov $0x960,%ax int termios_baud ) { int32_t baud; switch (termios_baud) { 107dd7: 83 fa 0b cmp $0xb,%edx 107dda: 74 5a je 107e36 case B134: baud = 134; break; case B150: baud = 150; break; case B200: baud = 200; break; case B300: baud = 300; break; case B600: baud = 600; break; case B1200: baud = 1200; break; 107ddc: 66 b8 08 07 mov $0x708,%ax int termios_baud ) { int32_t baud; switch (termios_baud) { 107de0: 7c 54 jl 107e36 case B200: baud = 200; break; case B300: baud = 300; break; case B600: baud = 600; break; case B1200: baud = 1200; break; case B1800: baud = 1800; break; case B2400: baud = 2400; break; 107de2: 66 b8 c0 12 mov $0x12c0,%ax int termios_baud ) { int32_t baud; switch (termios_baud) { 107de6: 83 fa 0c cmp $0xc,%edx 107de9: 74 4b je 107e36 case B300: baud = 300; break; case B600: baud = 600; break; case B1200: baud = 1200; break; case B1800: baud = 1800; break; case B2400: baud = 2400; break; case B4800: baud = 4800; break; 107deb: 66 b8 80 25 mov $0x2580,%ax int termios_baud ) { int32_t baud; switch (termios_baud) { 107def: 83 fa 0d cmp $0xd,%edx 107df2: eb 3d jmp 107e31 <== ALWAYS TAKEN case B2400: baud = 2400; break; case B4800: baud = 4800; break; case B9600: baud = 9600; break; case B19200: baud = 19200; break; case B38400: baud = 38400; break; case B57600: baud = 57600; break; 107df4: b8 00 c2 01 00 mov $0x1c200,%eax int termios_baud ) { int32_t baud; switch (termios_baud) { 107df9: 81 fa 02 10 00 00 cmp $0x1002,%edx 107dff: 74 35 je 107e36 107e01: 7f 16 jg 107e19 case B1200: baud = 1200; break; case B1800: baud = 1800; break; case B2400: baud = 2400; break; case B4800: baud = 4800; break; case B9600: baud = 9600; break; case B19200: baud = 19200; break; 107e03: b8 00 96 00 00 mov $0x9600,%eax int termios_baud ) { int32_t baud; switch (termios_baud) { 107e08: 83 fa 0f cmp $0xf,%edx 107e0b: 74 29 je 107e36 case B1800: baud = 1800; break; case B2400: baud = 2400; break; case B4800: baud = 4800; break; case B9600: baud = 9600; break; case B19200: baud = 19200; break; case B38400: baud = 38400; break; 107e0d: 66 b8 00 e1 mov $0xe100,%ax int termios_baud ) { int32_t baud; switch (termios_baud) { 107e11: 81 fa 01 10 00 00 cmp $0x1001,%edx 107e17: eb 18 jmp 107e31 <== ALWAYS TAKEN case B4800: baud = 4800; break; case B9600: baud = 9600; break; case B19200: baud = 19200; break; case B38400: baud = 38400; break; case B57600: baud = 57600; break; case B115200: baud = 115200; break; 107e19: b8 00 84 03 00 mov $0x38400,%eax int termios_baud ) { int32_t baud; switch (termios_baud) { 107e1e: 81 fa 03 10 00 00 cmp $0x1003,%edx 107e24: 74 10 je 107e36 case B9600: baud = 9600; break; case B19200: baud = 19200; break; case B38400: baud = 38400; break; case B57600: baud = 57600; break; case B115200: baud = 115200; break; case B230400: baud = 230400; break; 107e26: b8 00 08 07 00 mov $0x70800,%eax int termios_baud ) { int32_t baud; switch (termios_baud) { 107e2b: 81 fa 04 10 00 00 cmp $0x1004,%edx 107e31: 74 03 je 107e36 case B19200: baud = 19200; break; case B38400: baud = 38400; break; case B57600: baud = 57600; break; case B115200: baud = 115200; break; case B230400: baud = 230400; break; case B460800: baud = 460800; break; 107e33: 83 c8 ff or $0xffffffff,%eax default: baud = -1; break; } return baud; } 107e36: c9 leave 107e37: c3 ret 00107e74 : rtems_status_code rtems_termios_bufsize ( int cbufsize, int raw_input, int raw_output ) { 107e74: 55 push %ebp <== NOT EXECUTED 107e75: 89 e5 mov %esp,%ebp <== NOT EXECUTED rtems_termios_cbufsize = cbufsize; 107e77: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 107e7a: a3 50 16 12 00 mov %eax,0x121650 <== NOT EXECUTED rtems_termios_raw_input_size = raw_input; 107e7f: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED 107e82: a3 54 16 12 00 mov %eax,0x121654 <== NOT EXECUTED rtems_termios_raw_output_size = raw_output; 107e87: 8b 45 10 mov 0x10(%ebp),%eax <== NOT EXECUTED 107e8a: a3 58 16 12 00 mov %eax,0x121658 <== NOT EXECUTED return RTEMS_SUCCESSFUL; } 107e8f: 31 c0 xor %eax,%eax <== NOT EXECUTED 107e91: c9 leave <== NOT EXECUTED 107e92: c3 ret <== NOT EXECUTED 00108ffe : } } rtems_status_code rtems_termios_close (void *arg) { 108ffe: 55 push %ebp 108fff: 89 e5 mov %esp,%ebp 109001: 56 push %esi 109002: 53 push %ebx 109003: 8b 75 08 mov 0x8(%ebp),%esi rtems_libio_open_close_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 109006: 8b 06 mov (%esi),%eax 109008: 8b 58 34 mov 0x34(%eax),%ebx rtems_status_code sc; sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 10900b: 50 push %eax 10900c: 6a 00 push $0x0 10900e: 6a 00 push $0x0 109010: ff 35 68 37 12 00 pushl 0x123768 109016: e8 11 0f 00 00 call 109f2c <== ALWAYS TAKEN if (sc != RTEMS_SUCCESSFUL) 10901b: 83 c4 10 add $0x10,%esp 10901e: 85 c0 test %eax,%eax 109020: 75 7d jne 10909f <== ALWAYS TAKEN rtems_fatal_error_occurred (sc); if (--tty->refcount == 0) { 109022: 8b 43 08 mov 0x8(%ebx),%eax 109025: 48 dec %eax 109026: 89 43 08 mov %eax,0x8(%ebx) 109029: 85 c0 test %eax,%eax 10902b: 0f 85 33 01 00 00 jne 109164 if (rtems_termios_linesw[tty->t_line].l_close != NULL) { 109031: 8b 83 cc 00 00 00 mov 0xcc(%ebx),%eax 109037: c1 e0 05 shl $0x5,%eax 10903a: 8b 80 10 34 12 00 mov 0x123410(%eax),%eax 109040: 85 c0 test %eax,%eax 109042: 74 0b je 10904f <== NEVER TAKEN /* * call discipline-specific close */ sc = rtems_termios_linesw[tty->t_line].l_close(tty); 109044: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 109047: 53 push %ebx <== NOT EXECUTED 109048: ff d0 call *%eax <== NOT EXECUTED 10904a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10904d: eb 1b jmp 10906a <== NOT EXECUTED } else { /* * default: just flush output buffer */ sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 10904f: 51 push %ecx 109050: 6a 00 push $0x0 109052: 6a 00 push $0x0 109054: ff 73 18 pushl 0x18(%ebx) 109057: e8 d0 0e 00 00 call 109f2c <== ALWAYS TAKEN if (sc != RTEMS_SUCCESSFUL) { 10905c: 83 c4 10 add $0x10,%esp 10905f: 85 c0 test %eax,%eax 109061: 75 3c jne 10909f <== ALWAYS TAKEN rtems_fatal_error_occurred (sc); } drainOutput (tty); 109063: 89 d8 mov %ebx,%eax 109065: e8 18 f9 ff ff call 108982 <== ALWAYS TAKEN } if (tty->device.outputUsesInterrupts 10906a: 83 bb b4 00 00 00 02 cmpl $0x2,0xb4(%ebx) 109071: 75 35 jne 1090a8 <== NEVER TAKEN == TERMIOS_TASK_DRIVEN) { /* * send "terminate" to I/O tasks */ sc = rtems_event_send( 109073: 52 push %edx <== NOT EXECUTED 109074: 52 push %edx <== NOT EXECUTED 109075: 6a 01 push $0x1 <== NOT EXECUTED 109077: ff b3 c4 00 00 00 pushl 0xc4(%ebx) <== NOT EXECUTED 10907d: e8 3e 0a 00 00 call 109ac0 <== NOT EXECUTED tty->rxTaskId, TERMIOS_RX_TERMINATE_EVENT); if (sc != RTEMS_SUCCESSFUL) 109082: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 109085: 85 c0 test %eax,%eax <== NOT EXECUTED 109087: 75 16 jne 10909f <== NOT EXECUTED rtems_fatal_error_occurred (sc); sc = rtems_event_send( 109089: 50 push %eax <== NOT EXECUTED 10908a: 50 push %eax <== NOT EXECUTED 10908b: 6a 01 push $0x1 <== NOT EXECUTED 10908d: ff b3 c8 00 00 00 pushl 0xc8(%ebx) <== NOT EXECUTED 109093: e8 28 0a 00 00 call 109ac0 <== NOT EXECUTED tty->txTaskId, TERMIOS_TX_TERMINATE_EVENT); if (sc != RTEMS_SUCCESSFUL) 109098: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10909b: 85 c0 test %eax,%eax <== NOT EXECUTED 10909d: 74 09 je 1090a8 <== NOT EXECUTED rtems_fatal_error_occurred (sc); 10909f: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1090a2: 50 push %eax <== NOT EXECUTED 1090a3: e8 3c 14 00 00 call 10a4e4 <== NOT EXECUTED } if (tty->device.lastClose) 1090a8: 8b 83 9c 00 00 00 mov 0x9c(%ebx),%eax 1090ae: 85 c0 test %eax,%eax 1090b0: 74 0d je 1090bf (*tty->device.lastClose)(tty->major, tty->minor, arg); 1090b2: 51 push %ecx 1090b3: 56 push %esi 1090b4: ff 73 10 pushl 0x10(%ebx) 1090b7: ff 73 0c pushl 0xc(%ebx) 1090ba: ff d0 call *%eax 1090bc: 83 c4 10 add $0x10,%esp if (tty->forw == NULL) { 1090bf: 8b 13 mov (%ebx),%edx 1090c1: 85 d2 test %edx,%edx 1090c3: 8b 43 04 mov 0x4(%ebx),%eax 1090c6: 75 11 jne 1090d9 rtems_termios_ttyTail = tty->back; 1090c8: a3 6c 37 12 00 mov %eax,0x12376c if ( rtems_termios_ttyTail != NULL ) { 1090cd: 85 c0 test %eax,%eax 1090cf: 74 0b je 1090dc <== NEVER TAKEN rtems_termios_ttyTail->forw = NULL; 1090d1: c7 00 00 00 00 00 movl $0x0,(%eax) <== NOT EXECUTED 1090d7: eb 03 jmp 1090dc <== NOT EXECUTED } } else { tty->forw->back = tty->back; 1090d9: 89 42 04 mov %eax,0x4(%edx) } if (tty->back == NULL) { 1090dc: 8b 53 04 mov 0x4(%ebx),%edx 1090df: 85 d2 test %edx,%edx 1090e1: 8b 03 mov (%ebx),%eax 1090e3: 75 12 jne 1090f7 <== ALWAYS TAKEN rtems_termios_ttyHead = tty->forw; 1090e5: a3 70 37 12 00 mov %eax,0x123770 if ( rtems_termios_ttyHead != NULL ) { 1090ea: 85 c0 test %eax,%eax 1090ec: 74 0b je 1090f9 rtems_termios_ttyHead->back = NULL; 1090ee: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax) 1090f5: eb 02 jmp 1090f9 <== ALWAYS TAKEN } } else { tty->back->forw = tty->forw; 1090f7: 89 02 mov %eax,(%edx) <== NOT EXECUTED } rtems_semaphore_delete (tty->isem); 1090f9: 83 ec 0c sub $0xc,%esp 1090fc: ff 73 14 pushl 0x14(%ebx) 1090ff: e8 98 0d 00 00 call 109e9c <== ALWAYS TAKEN rtems_semaphore_delete (tty->osem); 109104: 5a pop %edx 109105: ff 73 18 pushl 0x18(%ebx) 109108: e8 8f 0d 00 00 call 109e9c <== ALWAYS TAKEN rtems_semaphore_delete (tty->rawOutBuf.Semaphore); 10910d: 58 pop %eax 10910e: ff b3 8c 00 00 00 pushl 0x8c(%ebx) 109114: e8 83 0d 00 00 call 109e9c <== ALWAYS TAKEN if ((tty->device.pollRead == NULL) || 109119: 83 c4 10 add $0x10,%esp 10911c: 83 bb a0 00 00 00 00 cmpl $0x0,0xa0(%ebx) 109123: 74 09 je 10912e (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)) 109125: 83 bb b4 00 00 00 02 cmpl $0x2,0xb4(%ebx) 10912c: 75 0e jne 10913c <== NEVER TAKEN rtems_semaphore_delete (tty->rawInBuf.Semaphore); 10912e: 83 ec 0c sub $0xc,%esp 109131: ff 73 68 pushl 0x68(%ebx) 109134: e8 63 0d 00 00 call 109e9c <== ALWAYS TAKEN 109139: 83 c4 10 add $0x10,%esp free (tty->rawInBuf.theBuf); 10913c: 83 ec 0c sub $0xc,%esp 10913f: ff 73 58 pushl 0x58(%ebx) 109142: e8 e9 df ff ff call 107130 free (tty->rawOutBuf.theBuf); 109147: 5e pop %esi 109148: ff 73 7c pushl 0x7c(%ebx) 10914b: e8 e0 df ff ff call 107130 free (tty->cbuf); 109150: 59 pop %ecx 109151: ff 73 1c pushl 0x1c(%ebx) 109154: e8 d7 df ff ff call 107130 free (tty); 109159: 89 1c 24 mov %ebx,(%esp) 10915c: e8 cf df ff ff call 107130 109161: 83 c4 10 add $0x10,%esp } rtems_semaphore_release (rtems_termios_ttyMutex); 109164: 83 ec 0c sub $0xc,%esp 109167: ff 35 68 37 12 00 pushl 0x123768 10916d: e8 a6 0e 00 00 call 10a018 <== ALWAYS TAKEN return RTEMS_SUCCESSFUL; } 109172: 31 c0 xor %eax,%eax 109174: 8d 65 f8 lea -0x8(%ebp),%esp 109177: 5b pop %ebx 109178: 5e pop %esi 109179: c9 leave 10917a: c3 ret 00108076 : * for each transmitted character. * It returns number of characters left to transmit */ int rtems_termios_dequeue_characters (void *ttyp, int len) { 108076: 55 push %ebp 108077: 89 e5 mov %esp,%ebp 108079: 83 ec 08 sub $0x8,%esp 10807c: 8b 45 08 mov 0x8(%ebp),%eax rtems_status_code sc; /* * sum up character count already sent */ tty->t_dqlen += len; 10807f: 8b 55 0c mov 0xc(%ebp),%edx 108082: 01 90 90 00 00 00 add %edx,0x90(%eax) if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 108088: 83 b8 b4 00 00 00 02 cmpl $0x2,0xb4(%eax) 10808f: 75 1f jne 1080b0 <== NEVER TAKEN /* * send wake up to transmitter task */ sc = rtems_event_send(tty->txTaskId, 108091: 52 push %edx <== NOT EXECUTED 108092: 52 push %edx <== NOT EXECUTED 108093: 6a 02 push $0x2 <== NOT EXECUTED 108095: ff b0 c8 00 00 00 pushl 0xc8(%eax) <== NOT EXECUTED 10809b: e8 20 1a 00 00 call 109ac0 <== NOT EXECUTED TERMIOS_TX_START_EVENT); if (sc != RTEMS_SUCCESSFUL) 1080a0: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 1080a3: 85 c0 test %eax,%eax <== NOT EXECUTED 1080a5: 74 30 je 1080d7 <== NOT EXECUTED rtems_fatal_error_occurred (sc); 1080a7: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1080aa: 50 push %eax <== NOT EXECUTED 1080ab: e8 34 24 00 00 call 10a4e4 <== NOT EXECUTED return 0; /* nothing to output in IRQ... */ } else if (tty->t_line == PPPDISC ) { 1080b0: 83 b8 cc 00 00 00 05 cmpl $0x5,0xcc(%eax) 1080b7: 75 15 jne 1080ce <== NEVER TAKEN /* * call any line discipline start function */ if (rtems_termios_linesw[tty->t_line].l_start != NULL) { 1080b9: 8b 15 c0 34 12 00 mov 0x1234c0,%edx <== NOT EXECUTED 1080bf: 85 d2 test %edx,%edx <== NOT EXECUTED 1080c1: 74 14 je 1080d7 <== NOT EXECUTED rtems_termios_linesw[tty->t_line].l_start(tty); 1080c3: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1080c6: 50 push %eax <== NOT EXECUTED 1080c7: ff d2 call *%edx <== NOT EXECUTED 1080c9: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 1080cc: eb 09 jmp 1080d7 <== NOT EXECUTED } return 0; /* nothing to output in IRQ... */ } else { return rtems_termios_refill_transmitter(tty); 1080ce: 89 45 08 mov %eax,0x8(%ebp) } } 1080d1: c9 leave rtems_termios_linesw[tty->t_line].l_start(tty); } return 0; /* nothing to output in IRQ... */ } else { return rtems_termios_refill_transmitter(tty); 1080d2: e9 d7 fd ff ff jmp 107eae <== ALWAYS TAKEN } } 1080d7: 31 c0 xor %eax,%eax <== NOT EXECUTED 1080d9: c9 leave <== NOT EXECUTED 1080da: c3 ret <== NOT EXECUTED 001080db : * 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) { 1080db: 55 push %ebp <== NOT EXECUTED 1080dc: 89 e5 mov %esp,%ebp <== NOT EXECUTED 1080de: 57 push %edi <== NOT EXECUTED 1080df: 56 push %esi <== NOT EXECUTED 1080e0: 53 push %ebx <== NOT EXECUTED 1080e1: 83 ec 2c sub $0x2c,%esp <== NOT EXECUTED 1080e4: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED 1080e7: 8b 7d 0c mov 0xc(%ebp),%edi <== NOT EXECUTED 1080ea: 8b 45 10 mov 0x10(%ebp),%eax <== NOT EXECUTED char c; int dropped = 0; bool flow_rcv = false; /* true, if flow control char received */ rtems_interrupt_level level; if (rtems_termios_linesw[tty->t_line].l_rint != NULL) { 1080ed: 8b 93 cc 00 00 00 mov 0xcc(%ebx),%edx <== NOT EXECUTED 1080f3: c1 e2 05 shl $0x5,%edx <== NOT EXECUTED /* * check to see if rcv wakeup callback was set */ if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) { (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); 1080f6: 89 c6 mov %eax,%esi <== NOT EXECUTED char c; int dropped = 0; bool flow_rcv = false; /* true, if flow control char received */ rtems_interrupt_level level; if (rtems_termios_linesw[tty->t_line].l_rint != NULL) { 1080f8: 83 ba 1c 34 12 00 00 cmpl $0x0,0x12341c(%edx) <== NOT EXECUTED 1080ff: 75 35 jne 108136 <== NOT EXECUTED 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, 108101: 8d 53 4a lea 0x4a(%ebx),%edx <== NOT EXECUTED 108104: 89 55 d0 mov %edx,-0x30(%ebp) <== NOT EXECUTED /* * check to see if rcv wakeup callback was set */ if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) { (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); 108107: 8d 4b 30 lea 0x30(%ebx),%ecx <== NOT EXECUTED 10810a: 89 4d d8 mov %ecx,-0x28(%ebp) <== NOT EXECUTED 10810d: 89 45 e0 mov %eax,-0x20(%ebp) <== NOT EXECUTED 108110: c6 45 de 00 movb $0x0,-0x22(%ebp) <== NOT EXECUTED 108114: 31 f6 xor %esi,%esi <== NOT EXECUTED 108116: e9 1d 02 00 00 jmp 108338 <== NOT EXECUTED 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++; 10811b: 0f be 17 movsbl (%edi),%edx <== NOT EXECUTED 10811e: 47 inc %edi <== NOT EXECUTED rtems_termios_linesw[tty->t_line].l_rint(c,tty); 10811f: 50 push %eax <== NOT EXECUTED 108120: 50 push %eax <== NOT EXECUTED 108121: 8b 83 cc 00 00 00 mov 0xcc(%ebx),%eax <== NOT EXECUTED 108127: c1 e0 05 shl $0x5,%eax <== NOT EXECUTED 10812a: 53 push %ebx <== NOT EXECUTED 10812b: 52 push %edx <== NOT EXECUTED 10812c: ff 90 1c 34 12 00 call *0x12341c(%eax) <== NOT EXECUTED 108132: 4e dec %esi <== NOT EXECUTED 108133: 83 c4 10 add $0x10,%esp <== NOT EXECUTED int dropped = 0; bool flow_rcv = false; /* true, if flow control char received */ rtems_interrupt_level level; if (rtems_termios_linesw[tty->t_line].l_rint != NULL) { while (len--) { 108136: 85 f6 test %esi,%esi <== NOT EXECUTED 108138: 75 e1 jne 10811b <== NOT EXECUTED } /* * check to see if rcv wakeup callback was set */ if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) { 10813a: 83 bb e4 00 00 00 00 cmpl $0x0,0xe4(%ebx) <== NOT EXECUTED 108141: 0f 85 0e 02 00 00 jne 108355 <== NOT EXECUTED 108147: 8b 83 dc 00 00 00 mov 0xdc(%ebx),%eax <== NOT EXECUTED 10814d: 85 c0 test %eax,%eax <== NOT EXECUTED 10814f: 0f 84 00 02 00 00 je 108355 <== NOT EXECUTED (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); 108155: 51 push %ecx <== NOT EXECUTED 108156: 51 push %ecx <== NOT EXECUTED 108157: ff b3 e0 00 00 00 pushl 0xe0(%ebx) <== NOT EXECUTED 10815d: 8d 53 30 lea 0x30(%ebx),%edx <== NOT EXECUTED 108160: 52 push %edx <== NOT EXECUTED 108161: ff d0 call *%eax <== NOT EXECUTED tty->tty_rcvwakeup = 1; 108163: c7 83 e4 00 00 00 01 movl $0x1,0xe4(%ebx) <== NOT EXECUTED 10816a: 00 00 00 <== NOT EXECUTED 10816d: e9 de 01 00 00 jmp 108350 <== NOT EXECUTED } return 0; } while (len--) { c = *buf++; 108172: 8a 07 mov (%edi),%al <== NOT EXECUTED 108174: 88 45 df mov %al,-0x21(%ebp) <== NOT EXECUTED /* FIXME: implement IXANY: any character restarts output */ /* if incoming XON/XOFF controls outgoing stream: */ if (tty->flow_ctrl & FL_MDXON) { 108177: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 10817d: f6 c4 02 test $0x2,%ah <== NOT EXECUTED 108180: 74 47 je 1081c9 <== NOT EXECUTED /* if received char is V_STOP and V_START (both are equal value) */ if (c == tty->termios.c_cc[VSTOP]) { 108182: 0f be 45 df movsbl -0x21(%ebp),%eax <== NOT EXECUTED 108186: 0f b6 53 4a movzbl 0x4a(%ebx),%edx <== NOT EXECUTED 10818a: 39 d0 cmp %edx,%eax <== NOT EXECUTED 10818c: 75 28 jne 1081b6 <== NOT EXECUTED if (c == tty->termios.c_cc[VSTART]) { 10818e: 0f b6 53 49 movzbl 0x49(%ebx),%edx <== NOT EXECUTED 108192: 39 d0 cmp %edx,%eax <== NOT EXECUTED 108194: 75 0b jne 1081a1 <== NOT EXECUTED /* received VSTOP and VSTART==VSTOP? */ /* then toggle "stop output" status */ tty->flow_ctrl = tty->flow_ctrl ^ FL_ORCVXOF; 108196: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 10819c: 83 f0 10 xor $0x10,%eax <== NOT EXECUTED 10819f: eb 09 jmp 1081aa <== NOT EXECUTED } else { /* VSTOP received (other code than VSTART) */ /* stop output */ tty->flow_ctrl |= FL_ORCVXOF; 1081a1: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 1081a7: 83 c8 10 or $0x10,%eax <== NOT EXECUTED 1081aa: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED } } } tty->rawInBufDropped += dropped; rtems_semaphore_release (tty->rawInBuf.Semaphore); return dropped; 1081b0: c6 45 de 01 movb $0x1,-0x22(%ebp) <== NOT EXECUTED 1081b4: eb 19 jmp 1081cf <== NOT EXECUTED /* stop output */ tty->flow_ctrl |= FL_ORCVXOF; } flow_rcv = true; } else if (c == tty->termios.c_cc[VSTART]) { 1081b6: 0f b6 53 49 movzbl 0x49(%ebx),%edx <== NOT EXECUTED 1081ba: 39 d0 cmp %edx,%eax <== NOT EXECUTED 1081bc: 75 0b jne 1081c9 <== NOT EXECUTED /* VSTART received */ /* restart output */ tty->flow_ctrl &= ~FL_ORCVXOF; 1081be: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 1081c4: 83 e0 ef and $0xffffffef,%eax <== NOT EXECUTED 1081c7: eb e1 jmp 1081aa <== NOT EXECUTED flow_rcv = true; } } if (flow_rcv) { 1081c9: 80 7d de 00 cmpb $0x0,-0x22(%ebp) <== NOT EXECUTED 1081cd: 74 51 je 108220 <== NOT EXECUTED /* restart output according to FL_ORCVXOF flag */ if ((tty->flow_ctrl & (FL_ORCVXOF | FL_OSTOP)) == FL_OSTOP) { 1081cf: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 1081d5: 83 e0 30 and $0x30,%eax <== NOT EXECUTED 1081d8: 83 f8 20 cmp $0x20,%eax <== NOT EXECUTED 1081db: 0f 85 53 01 00 00 jne 108334 <== NOT EXECUTED /* disable interrupts */ rtems_interrupt_disable(level); 1081e1: 9c pushf <== NOT EXECUTED 1081e2: fa cli <== NOT EXECUTED 1081e3: 8f 45 e4 popl -0x1c(%ebp) <== NOT EXECUTED tty->flow_ctrl &= ~FL_OSTOP; 1081e6: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 1081ec: 83 e0 df and $0xffffffdf,%eax <== NOT EXECUTED 1081ef: 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) { 1081f5: 83 bb 94 00 00 00 00 cmpl $0x0,0x94(%ebx) <== NOT EXECUTED 1081fc: 74 19 je 108217 <== NOT EXECUTED /* if chars available, call write function... */ (*tty->device.write)(tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail], 1); 1081fe: 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)(tty->minor, 108204: 52 push %edx <== NOT EXECUTED 108205: 6a 01 push $0x1 <== NOT EXECUTED 108207: 03 43 7c add 0x7c(%ebx),%eax <== NOT EXECUTED 10820a: 50 push %eax <== NOT EXECUTED 10820b: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED 10820e: ff 93 a4 00 00 00 call *0xa4(%ebx) <== NOT EXECUTED 108214: 83 c4 10 add $0x10,%esp <== NOT EXECUTED &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail], 1); } /* reenable interrupts */ rtems_interrupt_enable(level); 108217: ff 75 e4 pushl -0x1c(%ebp) <== NOT EXECUTED 10821a: 9d popf <== NOT EXECUTED 10821b: e9 14 01 00 00 jmp 108334 <== NOT EXECUTED } } else { newTail = (tty->rawInBuf.Tail + 1) % tty->rawInBuf.Size; 108220: 8b 43 60 mov 0x60(%ebx),%eax <== NOT EXECUTED 108223: 8b 4b 64 mov 0x64(%ebx),%ecx <== NOT EXECUTED 108226: 40 inc %eax <== NOT EXECUTED 108227: 31 d2 xor %edx,%edx <== NOT EXECUTED 108229: f7 f1 div %ecx <== NOT EXECUTED 10822b: 89 55 e4 mov %edx,-0x1c(%ebp) <== NOT EXECUTED /* if chars_in_buffer > highwater */ rtems_interrupt_disable(level); 10822e: 9c pushf <== NOT EXECUTED 10822f: fa cli <== NOT EXECUTED 108230: 8f 45 d4 popl -0x2c(%ebp) <== NOT EXECUTED if ((((newTail - tty->rawInBuf.Head + tty->rawInBuf.Size) 108233: 8b 53 5c mov 0x5c(%ebx),%edx <== NOT EXECUTED 108236: 8b 43 64 mov 0x64(%ebx),%eax <== NOT EXECUTED 108239: 8b 4b 64 mov 0x64(%ebx),%ecx <== NOT EXECUTED 10823c: 29 d0 sub %edx,%eax <== NOT EXECUTED 10823e: 03 45 e4 add -0x1c(%ebp),%eax <== NOT EXECUTED 108241: 31 d2 xor %edx,%edx <== NOT EXECUTED 108243: f7 f1 div %ecx <== NOT EXECUTED % tty->rawInBuf.Size) > tty->highwater) && 108245: 3b 93 c0 00 00 00 cmp 0xc0(%ebx),%edx <== NOT EXECUTED 10824b: 0f 86 98 00 00 00 jbe 1082e9 <== NOT EXECUTED !(tty->flow_ctrl & FL_IREQXOF)) { 108251: 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) 108257: a8 01 test $0x1,%al <== NOT EXECUTED 108259: 0f 85 8a 00 00 00 jne 1082e9 <== NOT EXECUTED % tty->rawInBuf.Size) > tty->highwater) && !(tty->flow_ctrl & FL_IREQXOF)) { /* incoming data stream should be stopped */ tty->flow_ctrl |= FL_IREQXOF; 10825f: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 108265: 83 c8 01 or $0x1,%eax <== NOT EXECUTED 108268: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED if ((tty->flow_ctrl & (FL_MDXOF | FL_ISNTXOF)) 10826e: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 108274: 25 02 04 00 00 and $0x402,%eax <== NOT EXECUTED 108279: 3d 00 04 00 00 cmp $0x400,%eax <== NOT EXECUTED 10827e: 75 33 jne 1082b3 <== NOT EXECUTED == (FL_MDXOF ) ){ if ((tty->flow_ctrl & FL_OSTOP) || 108280: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 108286: a8 20 test $0x20,%al <== NOT EXECUTED 108288: 75 09 jne 108293 <== NOT EXECUTED (tty->rawOutBufState == rob_idle)) { 10828a: 83 bb 94 00 00 00 00 cmpl $0x0,0x94(%ebx) <== NOT EXECUTED 108291: 75 56 jne 1082e9 <== NOT EXECUTED /* if tx is stopped due to XOFF or out of data */ /* call write function here */ tty->flow_ctrl |= FL_ISNTXOF; 108293: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 108299: 83 c8 02 or $0x2,%eax <== NOT EXECUTED 10829c: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED (*tty->device.write)(tty->minor, 1082a2: 50 push %eax <== NOT EXECUTED 1082a3: 6a 01 push $0x1 <== NOT EXECUTED 1082a5: ff 75 d0 pushl -0x30(%ebp) <== NOT EXECUTED 1082a8: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED 1082ab: ff 93 a4 00 00 00 call *0xa4(%ebx) <== NOT EXECUTED 1082b1: eb 33 jmp 1082e6 <== NOT EXECUTED (void *)&(tty->termios.c_cc[VSTOP]), 1); } } else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF)) 1082b3: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 1082b9: 25 04 01 00 00 and $0x104,%eax <== NOT EXECUTED 1082be: 3d 00 01 00 00 cmp $0x100,%eax <== NOT EXECUTED 1082c3: 75 24 jne 1082e9 <== NOT EXECUTED == (FL_MDRTS ) ) { tty->flow_ctrl |= FL_IRTSOFF; 1082c5: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 1082cb: 83 c8 04 or $0x4,%eax <== NOT EXECUTED 1082ce: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED /* deactivate RTS line */ if (tty->device.stopRemoteTx != NULL) { 1082d4: 8b 83 ac 00 00 00 mov 0xac(%ebx),%eax <== NOT EXECUTED 1082da: 85 c0 test %eax,%eax <== NOT EXECUTED 1082dc: 74 0b je 1082e9 <== NOT EXECUTED tty->device.stopRemoteTx(tty->minor); 1082de: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1082e1: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED 1082e4: ff d0 call *%eax <== NOT EXECUTED 1082e6: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } } } /* reenable interrupts */ rtems_interrupt_enable(level); 1082e9: ff 75 d4 pushl -0x2c(%ebp) <== NOT EXECUTED 1082ec: 9d popf <== NOT EXECUTED if (newTail == tty->rawInBuf.Head) { 1082ed: 8b 43 5c mov 0x5c(%ebx),%eax <== NOT EXECUTED 1082f0: 39 45 e4 cmp %eax,-0x1c(%ebp) <== NOT EXECUTED 1082f3: 75 03 jne 1082f8 <== NOT EXECUTED dropped++; 1082f5: 46 inc %esi <== NOT EXECUTED 1082f6: eb 3c jmp 108334 <== NOT EXECUTED } else { tty->rawInBuf.theBuf[newTail] = c; 1082f8: 8b 43 58 mov 0x58(%ebx),%eax <== NOT EXECUTED 1082fb: 8a 4d df mov -0x21(%ebp),%cl <== NOT EXECUTED 1082fe: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED 108301: 88 0c 10 mov %cl,(%eax,%edx,1) <== NOT EXECUTED tty->rawInBuf.Tail = newTail; 108304: 89 53 60 mov %edx,0x60(%ebx) <== NOT EXECUTED /* * check to see if rcv wakeup callback was set */ if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) { 108307: 83 bb e4 00 00 00 00 cmpl $0x0,0xe4(%ebx) <== NOT EXECUTED 10830e: 75 24 jne 108334 <== NOT EXECUTED 108310: 8b 83 dc 00 00 00 mov 0xdc(%ebx),%eax <== NOT EXECUTED 108316: 85 c0 test %eax,%eax <== NOT EXECUTED 108318: 74 1a je 108334 <== NOT EXECUTED (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); 10831a: 51 push %ecx <== NOT EXECUTED 10831b: 51 push %ecx <== NOT EXECUTED 10831c: ff b3 e0 00 00 00 pushl 0xe0(%ebx) <== NOT EXECUTED 108322: ff 75 d8 pushl -0x28(%ebp) <== NOT EXECUTED 108325: ff d0 call *%eax <== NOT EXECUTED tty->tty_rcvwakeup = 1; 108327: c7 83 e4 00 00 00 01 movl $0x1,0xe4(%ebx) <== NOT EXECUTED 10832e: 00 00 00 <== NOT EXECUTED 108331: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } return 0; } while (len--) { c = *buf++; 108334: 47 inc %edi <== NOT EXECUTED 108335: ff 4d e0 decl -0x20(%ebp) <== NOT EXECUTED tty->tty_rcvwakeup = 1; } return 0; } while (len--) { 108338: 83 7d e0 00 cmpl $0x0,-0x20(%ebp) <== NOT EXECUTED 10833c: 0f 85 30 fe ff ff jne 108172 <== NOT EXECUTED tty->tty_rcvwakeup = 1; } } } } tty->rawInBufDropped += dropped; 108342: 01 73 78 add %esi,0x78(%ebx) <== NOT EXECUTED rtems_semaphore_release (tty->rawInBuf.Semaphore); 108345: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 108348: ff 73 68 pushl 0x68(%ebx) <== NOT EXECUTED 10834b: e8 c8 1c 00 00 call 10a018 <== NOT EXECUTED return dropped; 108350: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 108353: eb 02 jmp 108357 <== NOT EXECUTED 108355: 31 f6 xor %esi,%esi <== NOT EXECUTED } 108357: 89 f0 mov %esi,%eax <== NOT EXECUTED 108359: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 10835c: 5b pop %ebx <== NOT EXECUTED 10835d: 5e pop %esi <== NOT EXECUTED 10835e: 5f pop %edi <== NOT EXECUTED 10835f: c9 leave <== NOT EXECUTED 108360: c3 ret <== NOT EXECUTED 00107e38 : struct rtems_termios_tty *rtems_termios_ttyTail; rtems_id rtems_termios_ttyMutex; void rtems_termios_initialize (void) { 107e38: 55 push %ebp 107e39: 89 e5 mov %esp,%ebp 107e3b: 83 ec 08 sub $0x8,%esp rtems_status_code sc; /* * Create the mutex semaphore for the tty list */ if (!rtems_termios_ttyMutex) { 107e3e: 83 3d 68 37 12 00 00 cmpl $0x0,0x123768 107e45: 75 28 jne 107e6f sc = rtems_semaphore_create ( 107e47: 83 ec 0c sub $0xc,%esp 107e4a: 68 68 37 12 00 push $0x123768 107e4f: 6a 00 push $0x0 107e51: 6a 54 push $0x54 107e53: 6a 01 push $0x1 107e55: 68 69 6d 52 54 push $0x54526d69 107e5a: e8 a1 1e 00 00 call 109d00 rtems_build_name ('T', 'R', 'm', 'i'), 1, RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &rtems_termios_ttyMutex); if (sc != RTEMS_SUCCESSFUL) 107e5f: 83 c4 20 add $0x20,%esp 107e62: 85 c0 test %eax,%eax 107e64: 74 09 je 107e6f <== NEVER TAKEN rtems_fatal_error_occurred (sc); 107e66: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 107e69: 50 push %eax <== NOT EXECUTED 107e6a: e8 75 26 00 00 call 10a4e4 <== NOT EXECUTED } } 107e6f: c9 leave 107e70: c3 ret 00108cb3 : } } rtems_status_code rtems_termios_ioctl (void *arg) { 108cb3: 55 push %ebp 108cb4: 89 e5 mov %esp,%ebp 108cb6: 57 push %edi 108cb7: 56 push %esi 108cb8: 53 push %ebx 108cb9: 83 ec 20 sub $0x20,%esp rtems_libio_ioctl_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 108cbc: 8b 55 08 mov 0x8(%ebp),%edx 108cbf: 8b 02 mov (%edx),%eax 108cc1: 8b 58 34 mov 0x34(%eax),%ebx struct ttywakeup *wakeup = (struct ttywakeup *)args->buffer; 108cc4: 8b 72 08 mov 0x8(%edx),%esi rtems_status_code sc; args->ioctl_return = 0; 108cc7: c7 42 0c 00 00 00 00 movl $0x0,0xc(%edx) sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 108cce: 6a 00 push $0x0 108cd0: 6a 00 push $0x0 108cd2: ff 73 18 pushl 0x18(%ebx) 108cd5: e8 52 12 00 00 call 109f2c 108cda: 89 45 e4 mov %eax,-0x1c(%ebp) if (sc != RTEMS_SUCCESSFUL) { 108cdd: 83 c4 10 add $0x10,%esp 108ce0: 85 c0 test %eax,%eax 108ce2: 74 0b je 108cef <== NEVER TAKEN args->ioctl_return = sc; 108ce4: 8b 4d 08 mov 0x8(%ebp),%ecx <== NOT EXECUTED 108ce7: 89 41 0c mov %eax,0xc(%ecx) <== NOT EXECUTED return sc; 108cea: e9 04 03 00 00 jmp 108ff3 <== NOT EXECUTED } switch (args->command) { 108cef: 8b 55 08 mov 0x8(%ebp),%edx 108cf2: 8b 42 04 mov 0x4(%edx),%eax 108cf5: 83 f8 04 cmp $0x4,%eax 108cf8: 0f 84 4c 02 00 00 je 108f4a <== ALWAYS TAKEN 108cfe: 77 10 ja 108d10 <== ALWAYS TAKEN 108d00: 83 f8 02 cmp $0x2,%eax 108d03: 74 77 je 108d7c 108d05: 0f 87 1d 02 00 00 ja 108f28 108d0b: 48 dec %eax 108d0c: 75 2f jne 108d3d <== ALWAYS TAKEN 108d0e: eb 55 jmp 108d65 <== ALWAYS TAKEN 108d10: 3d 7f 66 04 40 cmp $0x4004667f,%eax <== NOT EXECUTED 108d15: 0f 84 a4 02 00 00 je 108fbf <== NOT EXECUTED 108d1b: 77 0a ja 108d27 <== NOT EXECUTED 108d1d: 83 f8 05 cmp $0x5,%eax <== NOT EXECUTED 108d20: 75 1b jne 108d3d <== NOT EXECUTED 108d22: e9 0d 02 00 00 jmp 108f34 <== NOT EXECUTED 108d27: 3d 1a 74 04 40 cmp $0x4004741a,%eax <== NOT EXECUTED 108d2c: 0f 84 7d 02 00 00 je 108faf <== NOT EXECUTED 108d32: 3d 1b 74 04 80 cmp $0x8004741b,%eax <== NOT EXECUTED 108d37: 0f 84 20 02 00 00 je 108f5d <== NOT EXECUTED default: if (rtems_termios_linesw[tty->t_line].l_ioctl != NULL) { 108d3d: 8b 83 cc 00 00 00 mov 0xcc(%ebx),%eax <== NOT EXECUTED 108d43: c1 e0 05 shl $0x5,%eax <== NOT EXECUTED 108d46: 8b 80 24 34 12 00 mov 0x123424(%eax),%eax <== NOT EXECUTED 108d4c: c7 45 e4 0a 00 00 00 movl $0xa,-0x1c(%ebp) <== NOT EXECUTED 108d53: 85 c0 test %eax,%eax <== NOT EXECUTED 108d55: 0f 84 81 02 00 00 je 108fdc <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_ioctl(tty,args); 108d5b: 52 push %edx <== NOT EXECUTED 108d5c: 52 push %edx <== NOT EXECUTED 108d5d: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED 108d60: e9 3f 02 00 00 jmp 108fa4 <== NOT EXECUTED sc = RTEMS_INVALID_NUMBER; } break; case RTEMS_IO_GET_ATTRIBUTES: *(struct termios *)args->buffer = tty->termios; 108d65: 8b 4d 08 mov 0x8(%ebp),%ecx 108d68: 8b 41 08 mov 0x8(%ecx),%eax 108d6b: 8d 73 30 lea 0x30(%ebx),%esi 108d6e: b9 09 00 00 00 mov $0x9,%ecx 108d73: 89 c7 mov %eax,%edi 108d75: f3 a5 rep movsl %ds:(%esi),%es:(%edi) break; 108d77: e9 60 02 00 00 jmp 108fdc <== ALWAYS TAKEN case RTEMS_IO_SET_ATTRIBUTES: tty->termios = *(struct termios *)args->buffer; 108d7c: 8b 45 08 mov 0x8(%ebp),%eax 108d7f: 8b 70 08 mov 0x8(%eax),%esi 108d82: 8d 7b 30 lea 0x30(%ebx),%edi 108d85: b9 09 00 00 00 mov $0x9,%ecx 108d8a: 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) && 108d8c: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax 108d92: f6 c4 02 test $0x2,%ah 108d95: 74 57 je 108dee 108d97: f6 43 31 04 testb $0x4,0x31(%ebx) 108d9b: 75 51 jne 108dee <== NEVER TAKEN !(tty->termios.c_iflag & IXON)) { /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDXON | FL_ORCVXOF); 108d9d: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 108da3: 25 ef fd ff ff and $0xfffffdef,%eax <== NOT EXECUTED 108da8: 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) { 108dae: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 108db4: a8 20 test $0x20,%al <== NOT EXECUTED 108db6: 74 36 je 108dee <== NOT EXECUTED /* disable interrupts */ rtems_interrupt_disable(level); 108db8: 9c pushf <== NOT EXECUTED 108db9: fa cli <== NOT EXECUTED 108dba: 5e pop %esi <== NOT EXECUTED tty->flow_ctrl &= ~FL_OSTOP; 108dbb: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 108dc1: 83 e0 df and $0xffffffdf,%eax <== NOT EXECUTED 108dc4: 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) { 108dca: 83 bb 94 00 00 00 00 cmpl $0x0,0x94(%ebx) <== NOT EXECUTED 108dd1: 74 19 je 108dec <== NOT EXECUTED /* if chars available, call write function... */ (*tty->device.write)(tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1); 108dd3: 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)(tty->minor, 108dd9: 57 push %edi <== NOT EXECUTED 108dda: 6a 01 push $0x1 <== NOT EXECUTED 108ddc: 03 43 7c add 0x7c(%ebx),%eax <== NOT EXECUTED 108ddf: 50 push %eax <== NOT EXECUTED 108de0: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED 108de3: ff 93 a4 00 00 00 call *0xa4(%ebx) <== NOT EXECUTED 108de9: 83 c4 10 add $0x10,%esp <== NOT EXECUTED &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1); } /* reenable interrupts */ rtems_interrupt_enable(level); 108dec: 56 push %esi <== NOT EXECUTED 108ded: 9d popf <== NOT EXECUTED } } /* check for incoming XON/XOFF flow control switched off */ if (( tty->flow_ctrl & FL_MDXOF) && 108dee: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax 108df4: f6 c4 04 test $0x4,%ah 108df7: 74 24 je 108e1d <== NEVER TAKEN 108df9: f6 43 31 10 testb $0x10,0x31(%ebx) <== NOT EXECUTED 108dfd: 75 1e jne 108e1d <== NOT EXECUTED !(tty->termios.c_iflag & IXOFF)) { /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDXOF); 108dff: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 108e05: 80 e4 fb and $0xfb,%ah <== NOT EXECUTED 108e08: 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); 108e0e: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 108e14: 83 e0 fd and $0xfffffffd,%eax <== NOT EXECUTED 108e17: 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) && 108e1d: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax 108e23: f6 c4 01 test $0x1,%ah 108e26: 74 43 je 108e6b <== NEVER TAKEN 108e28: 83 7b 38 00 cmpl $0x0,0x38(%ebx) <== NOT EXECUTED 108e2c: 78 3d js 108e6b <== NOT EXECUTED !(tty->termios.c_cflag & CRTSCTS)) { /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDRTS); 108e2e: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 108e34: 80 e4 fe and $0xfe,%ah <== NOT EXECUTED 108e37: 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) && 108e3d: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 108e43: a8 04 test $0x4,%al <== NOT EXECUTED 108e45: 74 15 je 108e5c <== NOT EXECUTED (tty->device.startRemoteTx != NULL)) { 108e47: 8b 83 b0 00 00 00 mov 0xb0(%ebx),%eax <== NOT EXECUTED !(tty->termios.c_cflag & CRTSCTS)) { /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDRTS); /* restart remote Tx, if it was stopped */ if ((tty->flow_ctrl & FL_IRTSOFF) && 108e4d: 85 c0 test %eax,%eax <== NOT EXECUTED 108e4f: 74 0b je 108e5c <== NOT EXECUTED (tty->device.startRemoteTx != NULL)) { tty->device.startRemoteTx(tty->minor); 108e51: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 108e54: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED 108e57: ff d0 call *%eax <== NOT EXECUTED 108e59: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } tty->flow_ctrl &= ~(FL_IRTSOFF); 108e5c: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 108e62: 83 e0 fb and $0xfffffffb,%eax <== NOT EXECUTED 108e65: 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) { 108e6b: 83 7b 38 00 cmpl $0x0,0x38(%ebx) 108e6f: 79 0f jns 108e80 <== NEVER TAKEN tty->flow_ctrl |= FL_MDRTS; 108e71: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 108e77: 80 cc 01 or $0x1,%ah <== NOT EXECUTED 108e7a: 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) { 108e80: f6 43 31 10 testb $0x10,0x31(%ebx) 108e84: 74 0f je 108e95 <== NEVER TAKEN tty->flow_ctrl |= FL_MDXOF; 108e86: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 108e8c: 80 cc 04 or $0x4,%ah <== NOT EXECUTED 108e8f: 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) { 108e95: f6 43 31 04 testb $0x4,0x31(%ebx) 108e99: 74 0f je 108eaa <== ALWAYS TAKEN tty->flow_ctrl |= FL_MDXON; 108e9b: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax 108ea1: 80 cc 02 or $0x2,%ah 108ea4: 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) { 108eaa: f6 43 3c 02 testb $0x2,0x3c(%ebx) 108eae: 75 39 jne 108ee9 <== NEVER TAKEN tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; } else { tty->vtimeTicks = tty->termios.c_cc[VTIME] * rtems_clock_get_ticks_per_second() / 10; 108eb0: 0f b6 73 46 movzbl 0x46(%ebx),%esi <== NOT EXECUTED 108eb4: e8 2f 0a 00 00 call 1098e8 <== NOT EXECUTED tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; } else { tty->vtimeTicks = tty->termios.c_cc[VTIME] * 108eb9: 0f af c6 imul %esi,%eax <== NOT EXECUTED 108ebc: b9 0a 00 00 00 mov $0xa,%ecx <== NOT EXECUTED 108ec1: 31 d2 xor %edx,%edx <== NOT EXECUTED 108ec3: f7 f1 div %ecx <== NOT EXECUTED 108ec5: 89 43 54 mov %eax,0x54(%ebx) <== NOT EXECUTED rtems_clock_get_ticks_per_second() / 10; if (tty->termios.c_cc[VTIME]) { 108ec8: 80 7b 46 00 cmpb $0x0,0x46(%ebx) <== NOT EXECUTED 108ecc: 74 15 je 108ee3 <== NOT EXECUTED tty->rawInBufSemaphoreOptions = RTEMS_WAIT; 108ece: c7 43 6c 00 00 00 00 movl $0x0,0x6c(%ebx) <== NOT EXECUTED tty->rawInBufSemaphoreTimeout = tty->vtimeTicks; 108ed5: 89 43 70 mov %eax,0x70(%ebx) <== NOT EXECUTED if (tty->termios.c_cc[VMIN]) 108ed8: 80 7b 47 00 cmpb $0x0,0x47(%ebx) <== NOT EXECUTED 108edc: 75 19 jne 108ef7 <== NOT EXECUTED tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; else tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks; 108ede: 89 43 74 mov %eax,0x74(%ebx) <== NOT EXECUTED 108ee1: eb 24 jmp 108f07 <== NOT EXECUTED } else { if (tty->termios.c_cc[VMIN]) { 108ee3: 80 7b 47 00 cmpb $0x0,0x47(%ebx) <== NOT EXECUTED 108ee7: 74 17 je 108f00 <== NOT EXECUTED tty->rawInBufSemaphoreOptions = RTEMS_WAIT; 108ee9: c7 43 6c 00 00 00 00 movl $0x0,0x6c(%ebx) tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; 108ef0: c7 43 70 00 00 00 00 movl $0x0,0x70(%ebx) tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; 108ef7: c7 43 74 00 00 00 00 movl $0x0,0x74(%ebx) 108efe: eb 07 jmp 108f07 <== ALWAYS TAKEN } else { tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT; 108f00: c7 43 6c 01 00 00 00 movl $0x1,0x6c(%ebx) <== NOT EXECUTED } } } if (tty->device.setAttributes) 108f07: 8b 83 a8 00 00 00 mov 0xa8(%ebx),%eax 108f0d: 85 c0 test %eax,%eax 108f0f: 0f 84 c7 00 00 00 je 108fdc <== ALWAYS TAKEN (*tty->device.setAttributes)(tty->minor, &tty->termios); 108f15: 56 push %esi 108f16: 56 push %esi 108f17: 8d 53 30 lea 0x30(%ebx),%edx 108f1a: 52 push %edx 108f1b: ff 73 10 pushl 0x10(%ebx) 108f1e: ff d0 call *%eax 108f20: 83 c4 10 add $0x10,%esp 108f23: e9 b4 00 00 00 jmp 108fdc <== ALWAYS TAKEN break; case RTEMS_IO_TCDRAIN: drainOutput (tty); 108f28: 89 d8 mov %ebx,%eax 108f2a: e8 53 fa ff ff call 108982 break; 108f2f: e9 a8 00 00 00 jmp 108fdc <== ALWAYS TAKEN case RTEMS_IO_SNDWAKEUP: tty->tty_snd = *wakeup; 108f34: 8b 06 mov (%esi),%eax <== NOT EXECUTED 108f36: 8b 56 04 mov 0x4(%esi),%edx <== NOT EXECUTED 108f39: 89 83 d4 00 00 00 mov %eax,0xd4(%ebx) <== NOT EXECUTED 108f3f: 89 93 d8 00 00 00 mov %edx,0xd8(%ebx) <== NOT EXECUTED break; 108f45: e9 92 00 00 00 jmp 108fdc <== NOT EXECUTED case RTEMS_IO_RCVWAKEUP: tty->tty_rcv = *wakeup; 108f4a: 8b 06 mov (%esi),%eax <== NOT EXECUTED 108f4c: 8b 56 04 mov 0x4(%esi),%edx <== NOT EXECUTED 108f4f: 89 83 dc 00 00 00 mov %eax,0xdc(%ebx) <== NOT EXECUTED 108f55: 89 93 e0 00 00 00 mov %edx,0xe0(%ebx) <== NOT EXECUTED break; 108f5b: eb 7f jmp 108fdc <== NOT EXECUTED #if 1 /* FIXME */ case TIOCSETD: /* * close old line discipline */ if (rtems_termios_linesw[tty->t_line].l_close != NULL) { 108f5d: 8b 83 cc 00 00 00 mov 0xcc(%ebx),%eax <== NOT EXECUTED 108f63: c1 e0 05 shl $0x5,%eax <== NOT EXECUTED 108f66: 8b 80 10 34 12 00 mov 0x123410(%eax),%eax <== NOT EXECUTED 108f6c: 85 c0 test %eax,%eax <== NOT EXECUTED 108f6e: 74 0c je 108f7c <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_close(tty); 108f70: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 108f73: 53 push %ebx <== NOT EXECUTED 108f74: ff d0 call *%eax <== NOT EXECUTED 108f76: 89 45 e4 mov %eax,-0x1c(%ebp) <== NOT EXECUTED 108f79: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } tty->t_line=*(int*)(args->buffer); 108f7c: 8b 55 08 mov 0x8(%ebp),%edx <== NOT EXECUTED 108f7f: 8b 42 08 mov 0x8(%edx),%eax <== NOT EXECUTED 108f82: 8b 00 mov (%eax),%eax <== NOT EXECUTED 108f84: 89 83 cc 00 00 00 mov %eax,0xcc(%ebx) <== NOT EXECUTED tty->t_sc = NULL; /* ensure that no more valid data */ 108f8a: c7 83 d0 00 00 00 00 movl $0x0,0xd0(%ebx) <== NOT EXECUTED 108f91: 00 00 00 <== NOT EXECUTED /* * open new line discipline */ if (rtems_termios_linesw[tty->t_line].l_open != NULL) { 108f94: c1 e0 05 shl $0x5,%eax <== NOT EXECUTED 108f97: 8b 80 0c 34 12 00 mov 0x12340c(%eax),%eax <== NOT EXECUTED 108f9d: 85 c0 test %eax,%eax <== NOT EXECUTED 108f9f: 74 3b je 108fdc <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_open(tty); 108fa1: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 108fa4: 53 push %ebx <== NOT EXECUTED 108fa5: ff d0 call *%eax <== NOT EXECUTED 108fa7: 89 45 e4 mov %eax,-0x1c(%ebp) <== NOT EXECUTED 108faa: e9 71 ff ff ff jmp 108f20 <== NOT EXECUTED } break; case TIOCGETD: *(int*)(args->buffer)=tty->t_line; 108faf: 8b 4d 08 mov 0x8(%ebp),%ecx <== NOT EXECUTED 108fb2: 8b 41 08 mov 0x8(%ecx),%eax <== NOT EXECUTED 108fb5: 8b 93 cc 00 00 00 mov 0xcc(%ebx),%edx <== NOT EXECUTED 108fbb: 89 10 mov %edx,(%eax) <== NOT EXECUTED break; 108fbd: eb 1d jmp 108fdc <== NOT EXECUTED #endif case FIONREAD: { int rawnc = tty->rawInBuf.Tail - tty->rawInBuf.Head; 108fbf: 8b 43 60 mov 0x60(%ebx),%eax <== NOT EXECUTED 108fc2: 8b 53 5c mov 0x5c(%ebx),%edx <== NOT EXECUTED if ( rawnc < 0 ) 108fc5: 29 d0 sub %edx,%eax <== NOT EXECUTED 108fc7: 79 05 jns 108fce <== NOT EXECUTED rawnc += tty->rawInBuf.Size; 108fc9: 8b 53 64 mov 0x64(%ebx),%edx <== NOT EXECUTED 108fcc: 01 d0 add %edx,%eax <== NOT EXECUTED /* Half guess that this is the right operation */ *(int *)args->buffer = tty->ccount - tty->cindex + rawnc; 108fce: 8b 4d 08 mov 0x8(%ebp),%ecx <== NOT EXECUTED 108fd1: 8b 51 08 mov 0x8(%ecx),%edx <== NOT EXECUTED 108fd4: 03 43 20 add 0x20(%ebx),%eax <== NOT EXECUTED 108fd7: 2b 43 24 sub 0x24(%ebx),%eax <== NOT EXECUTED 108fda: 89 02 mov %eax,(%edx) <== NOT EXECUTED } break; } rtems_semaphore_release (tty->osem); 108fdc: 83 ec 0c sub $0xc,%esp 108fdf: ff 73 18 pushl 0x18(%ebx) 108fe2: e8 31 10 00 00 call 10a018 args->ioctl_return = sc; 108fe7: 8b 55 e4 mov -0x1c(%ebp),%edx 108fea: 8b 45 08 mov 0x8(%ebp),%eax 108fed: 89 50 0c mov %edx,0xc(%eax) return sc; 108ff0: 83 c4 10 add $0x10,%esp } 108ff3: 8b 45 e4 mov -0x1c(%ebp),%eax 108ff6: 8d 65 f4 lea -0xc(%ebp),%esp 108ff9: 5b pop %ebx 108ffa: 5e pop %esi 108ffb: 5f pop %edi 108ffc: c9 leave 108ffd: c3 ret 00109138 : #include int rtems_termios_number_to_baud( int32_t baud ) { 109138: 55 push %ebp 109139: 89 e5 mov %esp,%ebp 10913b: 8b 55 08 mov 0x8(%ebp),%edx case 110: termios_baud = B110; break; case 134: termios_baud = B134; break; case 150: termios_baud = B150; break; case 200: termios_baud = B200; break; case 300: termios_baud = B300; break; case 600: termios_baud = B600; break; 10913e: b8 09 00 00 00 mov $0x9,%eax int32_t baud ) { int termios_baud; switch (baud) { 109143: 81 fa b0 04 00 00 cmp $0x4b0,%edx 109149: 0f 84 f8 00 00 00 je 109247 10914f: 7f 79 jg 1091ca case 0: termios_baud = B0; break; case 50: termios_baud = B50; break; case 75: termios_baud = B75; break; case 110: termios_baud = B110; break; 109151: b0 04 mov $0x4,%al int32_t baud ) { int termios_baud; switch (baud) { 109153: 81 fa 86 00 00 00 cmp $0x86,%edx 109159: 0f 84 e8 00 00 00 je 109247 10915f: 7f 2e jg 10918f 109161: b0 01 mov $0x1,%al 109163: 83 fa 32 cmp $0x32,%edx 109166: 0f 84 db 00 00 00 je 109247 10916c: 7f 09 jg 109177 10916e: 30 c0 xor %al,%al 109170: 85 d2 test %edx,%edx 109172: e9 cb 00 00 00 jmp 109242 <== ALWAYS TAKEN 109177: b8 02 00 00 00 mov $0x2,%eax 10917c: 83 fa 4b cmp $0x4b,%edx 10917f: 0f 84 c2 00 00 00 je 109247 case 0: termios_baud = B0; break; case 50: termios_baud = B50; break; case 75: termios_baud = B75; break; 109185: b0 03 mov $0x3,%al int32_t baud ) { int termios_baud; switch (baud) { 109187: 83 fa 6e cmp $0x6e,%edx 10918a: e9 b3 00 00 00 jmp 109242 <== ALWAYS TAKEN case 0: termios_baud = B0; break; case 50: termios_baud = B50; break; case 75: termios_baud = B75; break; case 110: termios_baud = B110; break; case 134: termios_baud = B134; break; case 150: termios_baud = B150; break; 10918f: b8 06 00 00 00 mov $0x6,%eax int32_t baud ) { int termios_baud; switch (baud) { 109194: 81 fa c8 00 00 00 cmp $0xc8,%edx 10919a: 0f 84 a7 00 00 00 je 109247 1091a0: 7f 0d jg 1091af case 0: termios_baud = B0; break; case 50: termios_baud = B50; break; case 75: termios_baud = B75; break; case 110: termios_baud = B110; break; case 134: termios_baud = B134; break; 1091a2: b0 05 mov $0x5,%al int32_t baud ) { int termios_baud; switch (baud) { 1091a4: 81 fa 96 00 00 00 cmp $0x96,%edx 1091aa: e9 93 00 00 00 jmp 109242 <== ALWAYS TAKEN case 50: termios_baud = B50; break; case 75: termios_baud = B75; break; case 110: termios_baud = B110; break; case 134: termios_baud = B134; break; case 150: termios_baud = B150; break; case 200: termios_baud = B200; break; 1091af: b8 07 00 00 00 mov $0x7,%eax int32_t baud ) { int termios_baud; switch (baud) { 1091b4: 81 fa 2c 01 00 00 cmp $0x12c,%edx 1091ba: 0f 84 87 00 00 00 je 109247 case 75: termios_baud = B75; break; case 110: termios_baud = B110; break; case 134: termios_baud = B134; break; case 150: termios_baud = B150; break; case 200: termios_baud = B200; break; case 300: termios_baud = B300; break; 1091c0: b0 08 mov $0x8,%al int32_t baud ) { int termios_baud; switch (baud) { 1091c2: 81 fa 58 02 00 00 cmp $0x258,%edx 1091c8: eb 78 jmp 109242 <== ALWAYS TAKEN case 600: termios_baud = B600; break; case 1200: termios_baud = B1200; break; case 1800: termios_baud = B1800; break; case 2400: termios_baud = B2400; break; case 4800: termios_baud = B4800; break; case 9600: termios_baud = B9600; break; 1091ca: b8 0e 00 00 00 mov $0xe,%eax int32_t baud ) { int termios_baud; switch (baud) { 1091cf: 81 fa 00 4b 00 00 cmp $0x4b00,%edx 1091d5: 74 70 je 109247 1091d7: 7f 2d jg 109206 case 150: termios_baud = B150; break; case 200: termios_baud = B200; break; case 300: termios_baud = B300; break; case 600: termios_baud = B600; break; case 1200: termios_baud = B1200; break; case 1800: termios_baud = B1800; break; 1091d9: b0 0b mov $0xb,%al int32_t baud ) { int termios_baud; switch (baud) { 1091db: 81 fa 60 09 00 00 cmp $0x960,%edx 1091e1: 74 64 je 109247 1091e3: 7f 0a jg 1091ef case 134: termios_baud = B134; break; case 150: termios_baud = B150; break; case 200: termios_baud = B200; break; case 300: termios_baud = B300; break; case 600: termios_baud = B600; break; case 1200: termios_baud = B1200; break; 1091e5: b0 0a mov $0xa,%al int32_t baud ) { int termios_baud; switch (baud) { 1091e7: 81 fa 08 07 00 00 cmp $0x708,%edx 1091ed: eb 53 jmp 109242 <== ALWAYS TAKEN case 200: termios_baud = B200; break; case 300: termios_baud = B300; break; case 600: termios_baud = B600; break; case 1200: termios_baud = B1200; break; case 1800: termios_baud = B1800; break; case 2400: termios_baud = B2400; break; 1091ef: b8 0c 00 00 00 mov $0xc,%eax int32_t baud ) { int termios_baud; switch (baud) { 1091f4: 81 fa c0 12 00 00 cmp $0x12c0,%edx 1091fa: 74 4b je 109247 case 300: termios_baud = B300; break; case 600: termios_baud = B600; break; case 1200: termios_baud = B1200; break; case 1800: termios_baud = B1800; break; case 2400: termios_baud = B2400; break; case 4800: termios_baud = B4800; break; 1091fc: b0 0d mov $0xd,%al int32_t baud ) { int termios_baud; switch (baud) { 1091fe: 81 fa 80 25 00 00 cmp $0x2580,%edx 109204: eb 3c jmp 109242 <== ALWAYS TAKEN case 2400: termios_baud = B2400; break; case 4800: termios_baud = B4800; break; case 9600: termios_baud = B9600; break; case 19200: termios_baud = B19200; break; case 38400: termios_baud = B38400; break; case 57600: termios_baud = B57600; break; 109206: b8 02 10 00 00 mov $0x1002,%eax int32_t baud ) { int termios_baud; switch (baud) { 10920b: 81 fa 00 c2 01 00 cmp $0x1c200,%edx 109211: 74 34 je 109247 109213: 7f 18 jg 10922d case 1200: termios_baud = B1200; break; case 1800: termios_baud = B1800; break; case 2400: termios_baud = B2400; break; case 4800: termios_baud = B4800; break; case 9600: termios_baud = B9600; break; case 19200: termios_baud = B19200; break; 109215: 66 b8 0f 00 mov $0xf,%ax int32_t baud ) { int termios_baud; switch (baud) { 109219: 81 fa 00 96 00 00 cmp $0x9600,%edx 10921f: 74 26 je 109247 case 1800: termios_baud = B1800; break; case 2400: termios_baud = B2400; break; case 4800: termios_baud = B4800; break; case 9600: termios_baud = B9600; break; case 19200: termios_baud = B19200; break; case 38400: termios_baud = B38400; break; 109221: 66 b8 01 10 mov $0x1001,%ax int32_t baud ) { int termios_baud; switch (baud) { 109225: 81 fa 00 e1 00 00 cmp $0xe100,%edx 10922b: eb 15 jmp 109242 <== ALWAYS TAKEN case 4800: termios_baud = B4800; break; case 9600: termios_baud = B9600; break; case 19200: termios_baud = B19200; break; case 38400: termios_baud = B38400; break; case 57600: termios_baud = B57600; break; case 115200: termios_baud = B115200; break; 10922d: b8 03 10 00 00 mov $0x1003,%eax int32_t baud ) { int termios_baud; switch (baud) { 109232: 81 fa 00 84 03 00 cmp $0x38400,%edx 109238: 74 0d je 109247 case 9600: termios_baud = B9600; break; case 19200: termios_baud = B19200; break; case 38400: termios_baud = B38400; break; case 57600: termios_baud = B57600; break; case 115200: termios_baud = B115200; break; case 230400: termios_baud = B230400; break; 10923a: b0 04 mov $0x4,%al int32_t baud ) { int termios_baud; switch (baud) { 10923c: 81 fa 00 08 07 00 cmp $0x70800,%edx 109242: 74 03 je 109247 case 19200: termios_baud = B19200; break; case 38400: termios_baud = B38400; break; case 57600: termios_baud = B57600; break; case 115200: termios_baud = B115200; break; case 230400: termios_baud = B230400; break; case 460800: termios_baud = B460800; break; 109244: 83 c8 ff or $0xffffffff,%eax default: termios_baud = -1; break; } return termios_baud; } 109247: c9 leave 109248: c3 ret 0010917b : rtems_device_major_number major, rtems_device_minor_number minor, void *arg, const rtems_termios_callbacks *callbacks ) { 10917b: 55 push %ebp 10917c: 89 e5 mov %esp,%ebp 10917e: 57 push %edi 10917f: 56 push %esi 109180: 53 push %ebx 109181: 83 ec 20 sub $0x20,%esp 109184: 8b 75 14 mov 0x14(%ebp),%esi struct rtems_termios_tty *tty; /* * See if the device has already been opened */ sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, 109187: 6a 00 push $0x0 109189: 6a 00 push $0x0 10918b: ff 35 68 37 12 00 pushl 0x123768 109191: e8 96 0d 00 00 call 109f2c <== ALWAYS TAKEN 109196: 89 45 e4 mov %eax,-0x1c(%ebp) RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 109199: 83 c4 10 add $0x10,%esp 10919c: 85 c0 test %eax,%eax 10919e: 0f 85 cf 03 00 00 jne 109573 <== ALWAYS TAKEN return sc; for (tty = rtems_termios_ttyHead ; tty != NULL ; tty = tty->forw) { 1091a4: 8b 15 70 37 12 00 mov 0x123770,%edx 1091aa: eb 16 jmp 1091c2 <== ALWAYS TAKEN if ((tty->major == major) && (tty->minor == minor)) 1091ac: 8b 45 08 mov 0x8(%ebp),%eax 1091af: 39 42 0c cmp %eax,0xc(%edx) 1091b2: 75 0c jne 1091c0 1091b4: 8b 4d 0c mov 0xc(%ebp),%ecx 1091b7: 39 4a 10 cmp %ecx,0x10(%edx) 1091ba: 0f 84 24 03 00 00 je 1094e4 <== NEVER 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) { 1091c0: 8b 12 mov (%edx),%edx 1091c2: 85 d2 test %edx,%edx 1091c4: 75 e6 jne 1091ac 1091c6: e9 b3 03 00 00 jmp 10957e <== ALWAYS TAKEN /* * Create a new device */ tty = calloc (1, sizeof (struct rtems_termios_tty)); if (tty == NULL) { rtems_semaphore_release (rtems_termios_ttyMutex); 1091cb: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1091ce: e9 98 00 00 00 jmp 10926b <== NOT EXECUTED return RTEMS_NO_MEMORY; } /* * allocate raw input buffer */ tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE; 1091d3: a1 54 16 12 00 mov 0x121654,%eax 1091d8: 89 42 64 mov %eax,0x64(%edx) tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size); 1091db: 8b 42 64 mov 0x64(%edx),%eax 1091de: 83 ec 0c sub $0xc,%esp 1091e1: 50 push %eax 1091e2: 89 55 e0 mov %edx,-0x20(%ebp) 1091e5: e8 72 e1 ff ff call 10735c 1091ea: 8b 55 e0 mov -0x20(%ebp),%edx 1091ed: 89 42 58 mov %eax,0x58(%edx) if (tty->rawInBuf.theBuf == NULL) { 1091f0: 83 c4 10 add $0x10,%esp 1091f3: 85 c0 test %eax,%eax 1091f5: 75 05 jne 1091fc <== NEVER TAKEN free(tty); 1091f7: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1091fa: eb 68 jmp 109264 <== NOT EXECUTED return RTEMS_NO_MEMORY; } /* * allocate raw output buffer */ tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE; 1091fc: a1 58 16 12 00 mov 0x121658,%eax 109201: 89 82 88 00 00 00 mov %eax,0x88(%edx) tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size); 109207: 8b 82 88 00 00 00 mov 0x88(%edx),%eax 10920d: 83 ec 0c sub $0xc,%esp 109210: 50 push %eax 109211: 89 55 e0 mov %edx,-0x20(%ebp) 109214: e8 43 e1 ff ff call 10735c 109219: 8b 55 e0 mov -0x20(%ebp),%edx 10921c: 89 42 7c mov %eax,0x7c(%edx) if (tty->rawOutBuf.theBuf == NULL) { 10921f: 83 c4 10 add $0x10,%esp 109222: 85 c0 test %eax,%eax 109224: 75 05 jne 10922b <== NEVER TAKEN free((void *)(tty->rawInBuf.theBuf)); 109226: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 109229: eb 2d jmp 109258 <== NOT EXECUTED return RTEMS_NO_MEMORY; } /* * allocate cooked buffer */ tty->cbuf = malloc (CBUFSIZE); 10922b: 83 ec 0c sub $0xc,%esp 10922e: ff 35 50 16 12 00 pushl 0x121650 109234: 89 55 e0 mov %edx,-0x20(%ebp) 109237: e8 20 e1 ff ff call 10735c 10923c: 8b 55 e0 mov -0x20(%ebp),%edx 10923f: 89 42 1c mov %eax,0x1c(%edx) if (tty->cbuf == NULL) { 109242: 83 c4 10 add $0x10,%esp 109245: 85 c0 test %eax,%eax 109247: 75 39 jne 109282 <== NEVER TAKEN free((void *)(tty->rawOutBuf.theBuf)); 109249: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10924c: ff 72 7c pushl 0x7c(%edx) <== NOT EXECUTED 10924f: e8 dc de ff ff call 107130 <== NOT EXECUTED free((void *)(tty->rawInBuf.theBuf)); 109254: 5b pop %ebx <== NOT EXECUTED 109255: 8b 55 e0 mov -0x20(%ebp),%edx <== NOT EXECUTED 109258: ff 72 58 pushl 0x58(%edx) <== NOT EXECUTED 10925b: e8 d0 de ff ff call 107130 <== NOT EXECUTED free(tty); 109260: 59 pop %ecx <== NOT EXECUTED 109261: 8b 55 e0 mov -0x20(%ebp),%edx <== NOT EXECUTED 109264: 52 push %edx <== NOT EXECUTED 109265: e8 c6 de ff ff call 107130 <== NOT EXECUTED rtems_semaphore_release (rtems_termios_ttyMutex); 10926a: 5a pop %edx <== NOT EXECUTED 10926b: ff 35 68 37 12 00 pushl 0x123768 <== NOT EXECUTED 109271: e8 a2 0d 00 00 call 10a018 <== NOT EXECUTED 109276: c7 45 e4 1a 00 00 00 movl $0x1a,-0x1c(%ebp) <== NOT EXECUTED 10927d: e9 ee 02 00 00 jmp 109570 <== NOT EXECUTED return RTEMS_NO_MEMORY; } /* * Initialize wakeup callbacks */ tty->tty_snd.sw_pfn = NULL; 109282: c7 82 d4 00 00 00 00 movl $0x0,0xd4(%edx) 109289: 00 00 00 tty->tty_snd.sw_arg = NULL; 10928c: c7 82 d8 00 00 00 00 movl $0x0,0xd8(%edx) 109293: 00 00 00 tty->tty_rcv.sw_pfn = NULL; 109296: c7 82 dc 00 00 00 00 movl $0x0,0xdc(%edx) 10929d: 00 00 00 tty->tty_rcv.sw_arg = NULL; 1092a0: c7 82 e0 00 00 00 00 movl $0x0,0xe0(%edx) 1092a7: 00 00 00 tty->tty_rcvwakeup = 0; 1092aa: c7 82 e4 00 00 00 00 movl $0x0,0xe4(%edx) 1092b1: 00 00 00 /* * link tty */ tty->forw = rtems_termios_ttyHead; 1092b4: a1 70 37 12 00 mov 0x123770,%eax 1092b9: 89 02 mov %eax,(%edx) tty->back = NULL; 1092bb: c7 42 04 00 00 00 00 movl $0x0,0x4(%edx) if (rtems_termios_ttyHead != NULL) 1092c2: 85 c0 test %eax,%eax 1092c4: 74 03 je 1092c9 rtems_termios_ttyHead->back = tty; 1092c6: 89 50 04 mov %edx,0x4(%eax) rtems_termios_ttyHead = tty; 1092c9: 89 1d 70 37 12 00 mov %ebx,0x123770 if (rtems_termios_ttyTail == NULL) 1092cf: 83 3d 6c 37 12 00 00 cmpl $0x0,0x12376c 1092d6: 75 06 jne 1092de rtems_termios_ttyTail = tty; 1092d8: 89 1d 6c 37 12 00 mov %ebx,0x12376c tty->minor = minor; 1092de: 8b 45 0c mov 0xc(%ebp),%eax 1092e1: 89 43 10 mov %eax,0x10(%ebx) tty->major = major; 1092e4: 8b 4d 08 mov 0x8(%ebp),%ecx 1092e7: 89 4b 0c mov %ecx,0xc(%ebx) /* * Set up mutex semaphores */ sc = rtems_semaphore_create ( 1092ea: 83 ec 0c sub $0xc,%esp 1092ed: 8d 43 14 lea 0x14(%ebx),%eax 1092f0: 50 push %eax 1092f1: 6a 00 push $0x0 1092f3: 6a 54 push $0x54 1092f5: 6a 01 push $0x1 1092f7: 0f be 05 5c 16 12 00 movsbl 0x12165c,%eax 1092fe: 0d 00 69 52 54 or $0x54526900,%eax 109303: 50 push %eax 109304: 89 55 e0 mov %edx,-0x20(%ebp) 109307: e8 f4 09 00 00 call 109d00 <== ALWAYS TAKEN 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) 10930c: 83 c4 20 add $0x20,%esp 10930f: 85 c0 test %eax,%eax 109311: 8b 55 e0 mov -0x20(%ebp),%edx 109314: 0f 85 3f 02 00 00 jne 109559 <== ALWAYS TAKEN rtems_fatal_error_occurred (sc); sc = rtems_semaphore_create ( 10931a: 83 ec 0c sub $0xc,%esp 10931d: 8d 43 18 lea 0x18(%ebx),%eax 109320: 50 push %eax 109321: 6a 00 push $0x0 109323: 6a 54 push $0x54 109325: 6a 01 push $0x1 109327: 0f be 05 5c 16 12 00 movsbl 0x12165c,%eax 10932e: 0d 00 6f 52 54 or $0x54526f00,%eax 109333: 50 push %eax 109334: 89 55 e0 mov %edx,-0x20(%ebp) 109337: e8 c4 09 00 00 call 109d00 <== ALWAYS TAKEN 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) 10933c: 83 c4 20 add $0x20,%esp 10933f: 85 c0 test %eax,%eax 109341: 8b 55 e0 mov -0x20(%ebp),%edx 109344: 0f 85 0f 02 00 00 jne 109559 <== ALWAYS TAKEN rtems_fatal_error_occurred (sc); sc = rtems_semaphore_create ( 10934a: 83 ec 0c sub $0xc,%esp 10934d: 8d 83 8c 00 00 00 lea 0x8c(%ebx),%eax 109353: 50 push %eax 109354: 6a 00 push $0x0 109356: 6a 20 push $0x20 109358: 6a 00 push $0x0 10935a: 0f be 05 5c 16 12 00 movsbl 0x12165c,%eax 109361: 0d 00 78 52 54 or $0x54527800,%eax 109366: 50 push %eax 109367: 89 55 e0 mov %edx,-0x20(%ebp) 10936a: e8 91 09 00 00 call 109d00 <== ALWAYS TAKEN rtems_build_name ('T', 'R', 'x', c), 0, RTEMS_SIMPLE_BINARY_SEMAPHORE | RTEMS_FIFO, RTEMS_NO_PRIORITY, &tty->rawOutBuf.Semaphore); if (sc != RTEMS_SUCCESSFUL) 10936f: 83 c4 20 add $0x20,%esp 109372: 85 c0 test %eax,%eax 109374: 8b 55 e0 mov -0x20(%ebp),%edx 109377: 0f 85 dc 01 00 00 jne 109559 <== ALWAYS TAKEN rtems_fatal_error_occurred (sc); tty->rawOutBufState = rob_idle; 10937d: c7 83 94 00 00 00 00 movl $0x0,0x94(%ebx) 109384: 00 00 00 /* * Set callbacks */ tty->device = *callbacks; 109387: 8d bb 98 00 00 00 lea 0x98(%ebx),%edi 10938d: b9 08 00 00 00 mov $0x8,%ecx 109392: f3 a5 rep movsl %ds:(%esi),%es:(%edi) /* * Create I/O tasks */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 109394: 83 bb b4 00 00 00 02 cmpl $0x2,0xb4(%ebx) 10939b: 75 74 jne 109411 <== NEVER TAKEN sc = rtems_task_create ( 10939d: 50 push %eax <== NOT EXECUTED 10939e: 50 push %eax <== NOT EXECUTED 10939f: 8d 83 c8 00 00 00 lea 0xc8(%ebx),%eax <== NOT EXECUTED 1093a5: 50 push %eax <== NOT EXECUTED 1093a6: 6a 00 push $0x0 <== NOT EXECUTED 1093a8: 68 00 05 00 00 push $0x500 <== NOT EXECUTED 1093ad: 68 00 04 00 00 push $0x400 <== NOT EXECUTED 1093b2: 6a 0a push $0xa <== NOT EXECUTED 1093b4: 0f be 05 5c 16 12 00 movsbl 0x12165c,%eax <== NOT EXECUTED 1093bb: 0d 00 54 78 54 or $0x54785400,%eax <== NOT EXECUTED 1093c0: 50 push %eax <== NOT EXECUTED 1093c1: 89 55 e0 mov %edx,-0x20(%ebp) <== NOT EXECUTED 1093c4: e8 df 0c 00 00 call 10a0a8 <== NOT EXECUTED TERMIOS_TXTASK_STACKSIZE, RTEMS_NO_PREEMPT | RTEMS_NO_TIMESLICE | RTEMS_NO_ASR, RTEMS_NO_FLOATING_POINT | RTEMS_LOCAL, &tty->txTaskId); if (sc != RTEMS_SUCCESSFUL) 1093c9: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 1093cc: 85 c0 test %eax,%eax <== NOT EXECUTED 1093ce: 8b 55 e0 mov -0x20(%ebp),%edx <== NOT EXECUTED 1093d1: 0f 85 82 01 00 00 jne 109559 <== NOT EXECUTED rtems_fatal_error_occurred (sc); sc = rtems_task_create ( 1093d7: 57 push %edi <== NOT EXECUTED 1093d8: 57 push %edi <== NOT EXECUTED 1093d9: 8d 83 c4 00 00 00 lea 0xc4(%ebx),%eax <== NOT EXECUTED 1093df: 50 push %eax <== NOT EXECUTED 1093e0: 6a 00 push $0x0 <== NOT EXECUTED 1093e2: 68 00 05 00 00 push $0x500 <== NOT EXECUTED 1093e7: 68 00 04 00 00 push $0x400 <== NOT EXECUTED 1093ec: 6a 09 push $0x9 <== NOT EXECUTED 1093ee: 0f be 05 5c 16 12 00 movsbl 0x12165c,%eax <== NOT EXECUTED 1093f5: 0d 00 54 78 52 or $0x52785400,%eax <== NOT EXECUTED 1093fa: 50 push %eax <== NOT EXECUTED 1093fb: 89 55 e0 mov %edx,-0x20(%ebp) <== NOT EXECUTED 1093fe: e8 a5 0c 00 00 call 10a0a8 <== NOT EXECUTED TERMIOS_RXTASK_STACKSIZE, RTEMS_NO_PREEMPT | RTEMS_NO_TIMESLICE | RTEMS_NO_ASR, RTEMS_NO_FLOATING_POINT | RTEMS_LOCAL, &tty->rxTaskId); if (sc != RTEMS_SUCCESSFUL) 109403: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 109406: 85 c0 test %eax,%eax <== NOT EXECUTED 109408: 8b 55 e0 mov -0x20(%ebp),%edx <== NOT EXECUTED 10940b: 0f 85 48 01 00 00 jne 109559 <== NOT EXECUTED rtems_fatal_error_occurred (sc); } if ((tty->device.pollRead == NULL) || 109411: 83 bb a0 00 00 00 00 cmpl $0x0,0xa0(%ebx) 109418: 74 09 je 109423 (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)){ 10941a: 83 bb b4 00 00 00 02 cmpl $0x2,0xb4(%ebx) 109421: 75 30 jne 109453 <== NEVER TAKEN sc = rtems_semaphore_create ( 109423: 83 ec 0c sub $0xc,%esp 109426: 8d 43 68 lea 0x68(%ebx),%eax 109429: 50 push %eax 10942a: 6a 00 push $0x0 10942c: 6a 24 push $0x24 10942e: 6a 00 push $0x0 109430: 0f be 05 5c 16 12 00 movsbl 0x12165c,%eax 109437: 0d 00 72 52 54 or $0x54527200,%eax 10943c: 50 push %eax 10943d: 89 55 e0 mov %edx,-0x20(%ebp) 109440: e8 bb 08 00 00 call 109d00 <== ALWAYS TAKEN rtems_build_name ('T', 'R', 'r', c), 0, RTEMS_SIMPLE_BINARY_SEMAPHORE | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &tty->rawInBuf.Semaphore); if (sc != RTEMS_SUCCESSFUL) 109445: 83 c4 20 add $0x20,%esp 109448: 85 c0 test %eax,%eax 10944a: 8b 55 e0 mov -0x20(%ebp),%edx 10944d: 0f 85 06 01 00 00 jne 109559 <== ALWAYS TAKEN } /* * Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; 109453: c7 43 30 02 25 00 00 movl $0x2502,0x30(%ebx) tty->termios.c_oflag = OPOST | ONLCR | XTABS; 10945a: c7 43 34 05 18 00 00 movl $0x1805,0x34(%ebx) tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL; 109461: c7 43 38 bd 08 00 00 movl $0x8bd,0x38(%ebx) tty->termios.c_lflag = ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL; 109468: c7 43 3c 3b 82 00 00 movl $0x823b,0x3c(%ebx) tty->termios.c_cc[VINTR] = '\003'; 10946f: c6 43 41 03 movb $0x3,0x41(%ebx) tty->termios.c_cc[VQUIT] = '\034'; 109473: c6 43 42 1c movb $0x1c,0x42(%ebx) tty->termios.c_cc[VERASE] = '\177'; 109477: c6 43 43 7f movb $0x7f,0x43(%ebx) tty->termios.c_cc[VKILL] = '\025'; 10947b: c6 43 44 15 movb $0x15,0x44(%ebx) tty->termios.c_cc[VEOF] = '\004'; 10947f: c6 43 45 04 movb $0x4,0x45(%ebx) tty->termios.c_cc[VEOL] = '\000'; 109483: c6 43 4c 00 movb $0x0,0x4c(%ebx) tty->termios.c_cc[VEOL2] = '\000'; 109487: c6 43 51 00 movb $0x0,0x51(%ebx) tty->termios.c_cc[VSTART] = '\021'; 10948b: c6 43 49 11 movb $0x11,0x49(%ebx) tty->termios.c_cc[VSTOP] = '\023'; 10948f: c6 43 4a 13 movb $0x13,0x4a(%ebx) tty->termios.c_cc[VSUSP] = '\032'; 109493: c6 43 4b 1a movb $0x1a,0x4b(%ebx) tty->termios.c_cc[VREPRINT] = '\022'; 109497: c6 43 4d 12 movb $0x12,0x4d(%ebx) tty->termios.c_cc[VDISCARD] = '\017'; 10949b: c6 43 4e 0f movb $0xf,0x4e(%ebx) tty->termios.c_cc[VWERASE] = '\027'; 10949f: c6 43 4f 17 movb $0x17,0x4f(%ebx) tty->termios.c_cc[VLNEXT] = '\026'; 1094a3: c6 43 50 16 movb $0x16,0x50(%ebx) /* start with no flow control, clear flow control flags */ tty->flow_ctrl = 0; 1094a7: c7 83 b8 00 00 00 00 movl $0x0,0xb8(%ebx) 1094ae: 00 00 00 /* * set low/highwater mark for XON/XOFF support */ tty->lowwater = tty->rawInBuf.Size * 1/2; 1094b1: 8b 43 64 mov 0x64(%ebx),%eax 1094b4: d1 e8 shr %eax 1094b6: 89 83 bc 00 00 00 mov %eax,0xbc(%ebx) tty->highwater = tty->rawInBuf.Size * 3/4; 1094bc: 8b 43 64 mov 0x64(%ebx),%eax 1094bf: 8d 04 40 lea (%eax,%eax,2),%eax 1094c2: c1 e8 02 shr $0x2,%eax 1094c5: 89 83 c0 00 00 00 mov %eax,0xc0(%ebx) /* * Bump name characer */ if (c++ == 'z') 1094cb: a0 5c 16 12 00 mov 0x12165c,%al 1094d0: 8d 48 01 lea 0x1(%eax),%ecx 1094d3: 88 0d 5c 16 12 00 mov %cl,0x12165c 1094d9: 3c 7a cmp $0x7a,%al 1094db: 75 07 jne 1094e4 <== NEVER TAKEN c = 'a'; 1094dd: c6 05 5c 16 12 00 61 movb $0x61,0x12165c <== NOT EXECUTED } args->iop->data1 = tty; 1094e4: 8b 4d 10 mov 0x10(%ebp),%ecx 1094e7: 8b 01 mov (%ecx),%eax 1094e9: 89 50 34 mov %edx,0x34(%eax) if (!tty->refcount++) { 1094ec: 8b 42 08 mov 0x8(%edx),%eax 1094ef: 8d 48 01 lea 0x1(%eax),%ecx 1094f2: 89 4a 08 mov %ecx,0x8(%edx) 1094f5: 85 c0 test %eax,%eax 1094f7: 75 69 jne 109562 if (tty->device.firstOpen) 1094f9: 8b 82 98 00 00 00 mov 0x98(%edx),%eax 1094ff: 85 c0 test %eax,%eax 109501: 74 15 je 109518 (*tty->device.firstOpen)(major, minor, arg); 109503: 56 push %esi 109504: ff 75 10 pushl 0x10(%ebp) 109507: ff 75 0c pushl 0xc(%ebp) 10950a: ff 75 08 pushl 0x8(%ebp) 10950d: 89 55 e0 mov %edx,-0x20(%ebp) 109510: ff d0 call *%eax 109512: 83 c4 10 add $0x10,%esp 109515: 8b 55 e0 mov -0x20(%ebp),%edx /* * start I/O tasks, if needed */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 109518: 83 ba b4 00 00 00 02 cmpl $0x2,0xb4(%edx) 10951f: 75 41 jne 109562 <== NEVER TAKEN sc = rtems_task_start(tty->rxTaskId, 109521: 53 push %ebx <== NOT EXECUTED 109522: 52 push %edx <== NOT EXECUTED 109523: 68 03 96 10 00 push $0x109603 <== NOT EXECUTED 109528: ff b2 c4 00 00 00 pushl 0xc4(%edx) <== NOT EXECUTED 10952e: 89 55 e0 mov %edx,-0x20(%ebp) <== NOT EXECUTED 109531: e8 de 0d 00 00 call 10a314 <== NOT EXECUTED rtems_termios_rxdaemon, (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) 109536: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 109539: 85 c0 test %eax,%eax <== NOT EXECUTED 10953b: 8b 55 e0 mov -0x20(%ebp),%edx <== NOT EXECUTED 10953e: 75 19 jne 109559 <== NOT EXECUTED rtems_fatal_error_occurred (sc); sc = rtems_task_start(tty->txTaskId, 109540: 51 push %ecx <== NOT EXECUTED 109541: 52 push %edx <== NOT EXECUTED 109542: 68 a0 95 10 00 push $0x1095a0 <== NOT EXECUTED 109547: ff b2 c8 00 00 00 pushl 0xc8(%edx) <== NOT EXECUTED 10954d: e8 c2 0d 00 00 call 10a314 <== NOT EXECUTED rtems_termios_txdaemon, (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) 109552: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 109555: 85 c0 test %eax,%eax <== NOT EXECUTED 109557: 74 09 je 109562 <== NOT EXECUTED rtems_fatal_error_occurred (sc); 109559: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10955c: 50 push %eax <== NOT EXECUTED 10955d: e8 82 0f 00 00 call 10a4e4 <== NOT EXECUTED } } rtems_semaphore_release (rtems_termios_ttyMutex); 109562: 83 ec 0c sub $0xc,%esp 109565: ff 35 68 37 12 00 pushl 0x123768 10956b: e8 a8 0a 00 00 call 10a018 <== ALWAYS TAKEN return RTEMS_SUCCESSFUL; 109570: 83 c4 10 add $0x10,%esp } 109573: 8b 45 e4 mov -0x1c(%ebp),%eax 109576: 8d 65 f4 lea -0xc(%ebp),%esp 109579: 5b pop %ebx 10957a: 5e pop %esi 10957b: 5f pop %edi 10957c: c9 leave 10957d: c3 ret static char c = 'a'; /* * Create a new device */ tty = calloc (1, sizeof (struct rtems_termios_tty)); 10957e: 52 push %edx 10957f: 52 push %edx 109580: 68 e8 00 00 00 push $0xe8 109585: 6a 01 push $0x1 109587: e8 f4 44 00 00 call 10da80 10958c: 89 c2 mov %eax,%edx 10958e: 89 c3 mov %eax,%ebx if (tty == NULL) { 109590: 83 c4 10 add $0x10,%esp 109593: 85 c0 test %eax,%eax 109595: 0f 85 38 fc ff ff jne 1091d3 <== NEVER TAKEN 10959b: e9 2b fc ff ff jmp 1091cb <== NOT EXECUTED 00108361 : * Send characters to device-specific code */ void rtems_termios_puts ( const void *_buf, int len, struct rtems_termios_tty *tty) { 108361: 55 push %ebp 108362: 89 e5 mov %esp,%ebp 108364: 57 push %edi 108365: 56 push %esi 108366: 53 push %ebx 108367: 83 ec 3c sub $0x3c,%esp 10836a: 8b 45 08 mov 0x8(%ebp),%eax 10836d: 8b 75 0c mov 0xc(%ebp),%esi 108370: 8b 5d 10 mov 0x10(%ebp),%ebx const unsigned char *buf = _buf; 108373: 89 c7 mov %eax,%edi unsigned int newHead; rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) { 108375: 83 bb b4 00 00 00 00 cmpl $0x0,0xb4(%ebx) 10837c: 75 1b jne 108399 <== NEVER TAKEN (*tty->device.write)(tty->minor, (void *)buf, len); 10837e: 89 75 10 mov %esi,0x10(%ebp) <== NOT EXECUTED 108381: 89 45 0c mov %eax,0xc(%ebp) <== NOT EXECUTED 108384: 8b 43 10 mov 0x10(%ebx),%eax <== NOT EXECUTED 108387: 89 45 08 mov %eax,0x8(%ebp) <== NOT EXECUTED 10838a: 8b 83 a4 00 00 00 mov 0xa4(%ebx),%eax <== NOT EXECUTED tty->rawOutBufState = rob_busy; } rtems_interrupt_enable (level); len--; } } 108390: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 108393: 5b pop %ebx <== NOT EXECUTED 108394: 5e pop %esi <== NOT EXECUTED 108395: 5f pop %edi <== NOT EXECUTED 108396: c9 leave <== NOT EXECUTED 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); 108397: ff e0 jmp *%eax <== NOT EXECUTED return; } newHead = tty->rawOutBuf.Head; 108399: 8b 83 80 00 00 00 mov 0x80(%ebx),%eax 10839f: 89 45 e4 mov %eax,-0x1c(%ebp) while (len) { 1083a2: e9 ca 00 00 00 jmp 108471 <== ALWAYS TAKEN * len -= ncopy * * To minimize latency, the memcpy should be done * with interrupts enabled. */ newHead = (newHead + 1) % tty->rawOutBuf.Size; 1083a7: 8b 45 e4 mov -0x1c(%ebp),%eax 1083aa: 40 inc %eax 1083ab: 8b 8b 88 00 00 00 mov 0x88(%ebx),%ecx 1083b1: 31 d2 xor %edx,%edx 1083b3: f7 f1 div %ecx 1083b5: 89 55 c4 mov %edx,-0x3c(%ebp) 1083b8: 89 55 e4 mov %edx,-0x1c(%ebp) rtems_interrupt_disable (level); 1083bb: 9c pushf 1083bc: fa cli 1083bd: 8f 45 d4 popl -0x2c(%ebp) 1083c0: 8b 55 d4 mov -0x2c(%ebp),%edx 1083c3: 8b 4d c4 mov -0x3c(%ebp),%ecx while (newHead == tty->rawOutBuf.Tail) { 1083c6: eb 35 jmp 1083fd <== ALWAYS TAKEN tty->rawOutBufState = rob_wait; 1083c8: c7 83 94 00 00 00 02 movl $0x2,0x94(%ebx) 1083cf: 00 00 00 rtems_interrupt_enable (level); 1083d2: 52 push %edx 1083d3: 9d popf sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore, 1083d4: 50 push %eax 1083d5: 6a 00 push $0x0 1083d7: 6a 00 push $0x0 1083d9: ff b3 8c 00 00 00 pushl 0x8c(%ebx) 1083df: 89 4d e0 mov %ecx,-0x20(%ebp) 1083e2: e8 45 1b 00 00 call 109f2c RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 1083e7: 83 c4 10 add $0x10,%esp 1083ea: 85 c0 test %eax,%eax 1083ec: 8b 4d e0 mov -0x20(%ebp),%ecx 1083ef: 74 09 je 1083fa <== NEVER TAKEN rtems_fatal_error_occurred (sc); 1083f1: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1083f4: 50 push %eax <== NOT EXECUTED 1083f5: e8 ea 20 00 00 call 10a4e4 <== NOT EXECUTED rtems_interrupt_disable (level); 1083fa: 9c pushf 1083fb: fa cli 1083fc: 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) { 1083fd: 8b 83 84 00 00 00 mov 0x84(%ebx),%eax 108403: 39 c1 cmp %eax,%ecx 108405: 74 c1 je 1083c8 108407: 89 55 d4 mov %edx,-0x2c(%ebp) 10840a: 89 4d c4 mov %ecx,-0x3c(%ebp) RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); rtems_interrupt_disable (level); } tty->rawOutBuf.theBuf[tty->rawOutBuf.Head] = *buf++; 10840d: 8b 8b 80 00 00 00 mov 0x80(%ebx),%ecx 108413: 8a 07 mov (%edi),%al 108415: 8b 53 7c mov 0x7c(%ebx),%edx 108418: 88 04 0a mov %al,(%edx,%ecx,1) tty->rawOutBuf.Head = newHead; 10841b: 8b 4d c4 mov -0x3c(%ebp),%ecx 10841e: 89 8b 80 00 00 00 mov %ecx,0x80(%ebx) if (tty->rawOutBufState == rob_idle) { 108424: 83 bb 94 00 00 00 00 cmpl $0x0,0x94(%ebx) 10842b: 75 3e jne 10846b /* check, whether XOFF has been received */ if (!(tty->flow_ctrl & FL_ORCVXOF)) { 10842d: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax 108433: a8 10 test $0x10,%al 108435: 75 1b jne 108452 <== ALWAYS TAKEN (*tty->device.write)(tty->minor, (char *)&tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1); 108437: 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, 10843d: 52 push %edx 10843e: 6a 01 push $0x1 108440: 03 43 7c add 0x7c(%ebx),%eax 108443: 50 push %eax 108444: ff 73 10 pushl 0x10(%ebx) 108447: ff 93 a4 00 00 00 call *0xa4(%ebx) 10844d: 83 c4 10 add $0x10,%esp 108450: eb 0f jmp 108461 <== ALWAYS TAKEN (char *)&tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1); } else { /* remember that output has been stopped due to flow ctrl*/ tty->flow_ctrl |= FL_OSTOP; 108452: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 108458: 83 c8 20 or $0x20,%eax <== NOT EXECUTED 10845b: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED } tty->rawOutBufState = rob_busy; 108461: c7 83 94 00 00 00 01 movl $0x1,0x94(%ebx) 108468: 00 00 00 RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); rtems_interrupt_disable (level); } tty->rawOutBuf.theBuf[tty->rawOutBuf.Head] = *buf++; 10846b: 47 inc %edi /* remember that output has been stopped due to flow ctrl*/ tty->flow_ctrl |= FL_OSTOP; } tty->rawOutBufState = rob_busy; } rtems_interrupt_enable (level); 10846c: ff 75 d4 pushl -0x2c(%ebp) 10846f: 9d popf len--; 108470: 4e dec %esi if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) { (*tty->device.write)(tty->minor, (void *)buf, len); return; } newHead = tty->rawOutBuf.Head; while (len) { 108471: 85 f6 test %esi,%esi 108473: 0f 85 2e ff ff ff jne 1083a7 tty->rawOutBufState = rob_busy; } rtems_interrupt_enable (level); len--; } } 108479: 8d 65 f4 lea -0xc(%ebp),%esp 10847c: 5b pop %ebx 10847d: 5e pop %esi 10847e: 5f pop %edi 10847f: c9 leave 108480: c3 ret 001089df : return RTEMS_SUCCESSFUL; } rtems_status_code rtems_termios_read (void *arg) { 1089df: 55 push %ebp <== NOT EXECUTED 1089e0: 89 e5 mov %esp,%ebp <== NOT EXECUTED 1089e2: 57 push %edi <== NOT EXECUTED 1089e3: 56 push %esi <== NOT EXECUTED 1089e4: 53 push %ebx <== NOT EXECUTED 1089e5: 83 ec 50 sub $0x50,%esp <== NOT EXECUTED 1089e8: 8b 75 08 mov 0x8(%ebp),%esi <== NOT EXECUTED rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 1089eb: 8b 06 mov (%esi),%eax <== NOT EXECUTED 1089ed: 8b 58 34 mov 0x34(%eax),%ebx <== NOT EXECUTED uint32_t count = args->count; 1089f0: 8b 46 10 mov 0x10(%esi),%eax <== NOT EXECUTED 1089f3: 89 45 e4 mov %eax,-0x1c(%ebp) <== NOT EXECUTED char *buffer = args->buffer; 1089f6: 8b 4e 0c mov 0xc(%esi),%ecx <== NOT EXECUTED 1089f9: 89 4d e0 mov %ecx,-0x20(%ebp) <== NOT EXECUTED rtems_status_code sc; sc = rtems_semaphore_obtain (tty->isem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 1089fc: 6a 00 push $0x0 <== NOT EXECUTED 1089fe: 6a 00 push $0x0 <== NOT EXECUTED 108a00: ff 73 14 pushl 0x14(%ebx) <== NOT EXECUTED 108a03: e8 24 15 00 00 call 109f2c <== NOT EXECUTED 108a08: 89 45 dc mov %eax,-0x24(%ebp) <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 108a0b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 108a0e: 85 c0 test %eax,%eax <== NOT EXECUTED 108a10: 0f 85 92 02 00 00 jne 108ca8 <== NOT EXECUTED return sc; if (rtems_termios_linesw[tty->t_line].l_read != NULL) { 108a16: 8b 83 cc 00 00 00 mov 0xcc(%ebx),%eax <== NOT EXECUTED 108a1c: c1 e0 05 shl $0x5,%eax <== NOT EXECUTED 108a1f: 8b 80 14 34 12 00 mov 0x123414(%eax),%eax <== NOT EXECUTED 108a25: 85 c0 test %eax,%eax <== NOT EXECUTED 108a27: 74 19 je 108a42 <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_read(tty,args); 108a29: 51 push %ecx <== NOT EXECUTED 108a2a: 51 push %ecx <== NOT EXECUTED 108a2b: 56 push %esi <== NOT EXECUTED 108a2c: 53 push %ebx <== NOT EXECUTED 108a2d: ff d0 call *%eax <== NOT EXECUTED 108a2f: 89 45 dc mov %eax,-0x24(%ebp) <== NOT EXECUTED tty->tty_rcvwakeup = 0; 108a32: c7 83 e4 00 00 00 00 movl $0x0,0xe4(%ebx) <== NOT EXECUTED 108a39: 00 00 00 <== NOT EXECUTED rtems_semaphore_release (tty->isem); 108a3c: 5a pop %edx <== NOT EXECUTED 108a3d: e9 5b 02 00 00 jmp 108c9d <== NOT EXECUTED return sc; } if (tty->cindex == tty->ccount) { 108a42: 8b 43 24 mov 0x24(%ebx),%eax <== NOT EXECUTED 108a45: 3b 43 20 cmp 0x20(%ebx),%eax <== NOT EXECUTED 108a48: 0f 85 25 02 00 00 jne 108c73 <== NOT EXECUTED tty->cindex = tty->ccount = 0; 108a4e: c7 43 20 00 00 00 00 movl $0x0,0x20(%ebx) <== NOT EXECUTED 108a55: c7 43 24 00 00 00 00 movl $0x0,0x24(%ebx) <== NOT EXECUTED tty->read_start_column = tty->column; 108a5c: 8b 43 28 mov 0x28(%ebx),%eax <== NOT EXECUTED 108a5f: 89 43 2c mov %eax,0x2c(%ebx) <== NOT EXECUTED if (tty->device.pollRead != NULL 108a62: 83 bb a0 00 00 00 00 cmpl $0x0,0xa0(%ebx) <== NOT EXECUTED 108a69: 0f 84 c4 00 00 00 je 108b33 <== NOT EXECUTED && tty->device.outputUsesInterrupts == TERMIOS_POLLED) 108a6f: 83 bb b4 00 00 00 00 cmpl $0x0,0xb4(%ebx) <== NOT EXECUTED 108a76: 0f 85 b7 00 00 00 jne 108b33 <== NOT EXECUTED static rtems_status_code fillBufferPoll (struct rtems_termios_tty *tty) { int n; if (tty->termios.c_lflag & ICANON) { 108a7c: f6 43 3c 02 testb $0x2,0x3c(%ebx) <== NOT EXECUTED 108a80: 74 35 je 108ab7 <== NOT EXECUTED for (;;) { n = (*tty->device.pollRead)(tty->minor); 108a82: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 108a85: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED 108a88: ff 93 a0 00 00 00 call *0xa0(%ebx) <== NOT EXECUTED if (n < 0) { 108a8e: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 108a91: 85 c0 test %eax,%eax <== NOT EXECUTED 108a93: 79 0f jns 108aa4 <== NOT EXECUTED rtems_task_wake_after (1); 108a95: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 108a98: 6a 01 push $0x1 <== NOT EXECUTED 108a9a: e8 d9 18 00 00 call 10a378 <== NOT EXECUTED 108a9f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 108aa2: eb de jmp 108a82 <== NOT EXECUTED } else { if (siproc (n, tty)) 108aa4: 0f b6 c0 movzbl %al,%eax <== NOT EXECUTED 108aa7: 89 da mov %ebx,%edx <== NOT EXECUTED 108aa9: e8 db fd ff ff call 108889 <== NOT EXECUTED 108aae: 85 c0 test %eax,%eax <== NOT EXECUTED 108ab0: 74 d0 je 108a82 <== NOT EXECUTED 108ab2: e9 bc 01 00 00 jmp 108c73 <== NOT EXECUTED } } } else { rtems_interval then, now; then = rtems_clock_get_ticks_since_boot(); 108ab7: e8 40 0e 00 00 call 1098fc <== NOT EXECUTED 108abc: 89 c7 mov %eax,%edi <== NOT EXECUTED for (;;) { n = (*tty->device.pollRead)(tty->minor); 108abe: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 108ac1: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED 108ac4: ff 93 a0 00 00 00 call *0xa0(%ebx) <== NOT EXECUTED if (n < 0) { 108aca: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 108acd: 85 c0 test %eax,%eax <== NOT EXECUTED 108acf: 79 3d jns 108b0e <== NOT EXECUTED if (tty->termios.c_cc[VMIN]) { 108ad1: 80 7b 47 00 cmpb $0x0,0x47(%ebx) <== NOT EXECUTED 108ad5: 74 0e je 108ae5 <== NOT EXECUTED if (tty->termios.c_cc[VTIME] && tty->ccount) { 108ad7: 80 7b 46 00 cmpb $0x0,0x46(%ebx) <== NOT EXECUTED 108adb: 74 22 je 108aff <== NOT EXECUTED 108add: 83 7b 20 00 cmpl $0x0,0x20(%ebx) <== NOT EXECUTED 108ae1: 74 1c je 108aff <== NOT EXECUTED 108ae3: eb 0a jmp 108aef <== NOT EXECUTED break; } } } else { if (!tty->termios.c_cc[VTIME]) 108ae5: 80 7b 46 00 cmpb $0x0,0x46(%ebx) <== NOT EXECUTED 108ae9: 0f 84 84 01 00 00 je 108c73 <== NOT EXECUTED break; now = rtems_clock_get_ticks_since_boot(); 108aef: e8 08 0e 00 00 call 1098fc <== NOT EXECUTED if ((now - then) > tty->vtimeTicks) { 108af4: 29 f8 sub %edi,%eax <== NOT EXECUTED 108af6: 3b 43 54 cmp 0x54(%ebx),%eax <== NOT EXECUTED 108af9: 0f 87 74 01 00 00 ja 108c73 <== NOT EXECUTED break; } } rtems_task_wake_after (1); 108aff: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 108b02: 6a 01 push $0x1 <== NOT EXECUTED 108b04: e8 6f 18 00 00 call 10a378 <== NOT EXECUTED 108b09: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 108b0c: eb b0 jmp 108abe <== NOT EXECUTED } else { siproc (n, tty); 108b0e: 0f b6 c0 movzbl %al,%eax <== NOT EXECUTED 108b11: 89 da mov %ebx,%edx <== NOT EXECUTED 108b13: e8 71 fd ff ff call 108889 <== NOT EXECUTED if (tty->ccount >= tty->termios.c_cc[VMIN]) 108b18: 8a 43 47 mov 0x47(%ebx),%al <== NOT EXECUTED 108b1b: 0f b6 d0 movzbl %al,%edx <== NOT EXECUTED 108b1e: 39 53 20 cmp %edx,0x20(%ebx) <== NOT EXECUTED 108b21: 0f 8d 4c 01 00 00 jge 108c73 <== NOT EXECUTED break; if (tty->termios.c_cc[VMIN] && tty->termios.c_cc[VTIME]) 108b27: 84 c0 test %al,%al <== NOT EXECUTED 108b29: 74 93 je 108abe <== NOT EXECUTED 108b2b: 80 7b 46 00 cmpb $0x0,0x46(%ebx) <== NOT EXECUTED 108b2f: 74 8d je 108abe <== NOT EXECUTED 108b31: eb 84 jmp 108ab7 <== 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; 108b33: 8b 53 74 mov 0x74(%ebx),%edx <== NOT EXECUTED 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)(tty->minor, 108b36: 8d 43 49 lea 0x49(%ebx),%eax <== NOT EXECUTED 108b39: 89 45 d0 mov %eax,-0x30(%ebp) <== NOT EXECUTED 108b3c: bf 01 00 00 00 mov $0x1,%edi <== NOT EXECUTED 108b41: e9 de 00 00 00 jmp 108c24 <== NOT EXECUTED 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; 108b46: 8b 43 5c mov 0x5c(%ebx),%eax <== NOT EXECUTED 108b49: 8b 4b 64 mov 0x64(%ebx),%ecx <== NOT EXECUTED 108b4c: 40 inc %eax <== NOT EXECUTED 108b4d: 31 d2 xor %edx,%edx <== NOT EXECUTED 108b4f: f7 f1 div %ecx <== NOT EXECUTED c = tty->rawInBuf.theBuf[newHead]; 108b51: 8b 43 58 mov 0x58(%ebx),%eax <== NOT EXECUTED 108b54: 8a 04 10 mov (%eax,%edx,1),%al <== NOT EXECUTED 108b57: 88 45 d7 mov %al,-0x29(%ebp) <== NOT EXECUTED tty->rawInBuf.Head = newHead; 108b5a: 89 53 5c mov %edx,0x5c(%ebx) <== NOT EXECUTED if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size) 108b5d: 8b 4b 60 mov 0x60(%ebx),%ecx <== NOT EXECUTED 108b60: 89 4d c4 mov %ecx,-0x3c(%ebp) <== NOT EXECUTED 108b63: 8b 43 64 mov 0x64(%ebx),%eax <== NOT EXECUTED 108b66: 89 45 b4 mov %eax,-0x4c(%ebp) <== NOT EXECUTED 108b69: 8b 4b 64 mov 0x64(%ebx),%ecx <== NOT EXECUTED 108b6c: 89 4d d8 mov %ecx,-0x28(%ebp) <== NOT EXECUTED 108b6f: 03 45 c4 add -0x3c(%ebp),%eax <== NOT EXECUTED 108b72: 29 d0 sub %edx,%eax <== NOT EXECUTED 108b74: 31 d2 xor %edx,%edx <== NOT EXECUTED 108b76: f7 f1 div %ecx <== NOT EXECUTED 108b78: 3b 93 bc 00 00 00 cmp 0xbc(%ebx),%edx <== NOT EXECUTED 108b7e: 73 74 jae 108bf4 <== NOT EXECUTED % tty->rawInBuf.Size) < tty->lowwater) { tty->flow_ctrl &= ~FL_IREQXOF; 108b80: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 108b86: 83 e0 fe and $0xfffffffe,%eax <== NOT EXECUTED 108b89: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED /* if tx stopped and XON should be sent... */ if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF)) 108b8f: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 108b95: 25 02 02 00 00 and $0x202,%eax <== NOT EXECUTED 108b9a: 3d 02 02 00 00 cmp $0x202,%eax <== NOT EXECUTED 108b9f: 75 24 jne 108bc5 <== NOT EXECUTED 108ba1: 83 bb 94 00 00 00 00 cmpl $0x0,0x94(%ebx) <== NOT EXECUTED 108ba8: 74 0a je 108bb4 <== NOT EXECUTED == (FL_MDXON | FL_ISNTXOF)) && ((tty->rawOutBufState == rob_idle) || (tty->flow_ctrl & FL_OSTOP))) { 108baa: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size) % tty->rawInBuf.Size) < tty->lowwater) { tty->flow_ctrl &= ~FL_IREQXOF; /* if tx stopped and XON should be sent... */ if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF)) 108bb0: a8 20 test $0x20,%al <== NOT EXECUTED 108bb2: 74 11 je 108bc5 <== NOT EXECUTED == (FL_MDXON | FL_ISNTXOF)) && ((tty->rawOutBufState == rob_idle) || (tty->flow_ctrl & FL_OSTOP))) { /* XON should be sent now... */ (*tty->device.write)(tty->minor, 108bb4: 50 push %eax <== NOT EXECUTED 108bb5: 6a 01 push $0x1 <== NOT EXECUTED 108bb7: ff 75 d0 pushl -0x30(%ebp) <== NOT EXECUTED 108bba: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED 108bbd: ff 93 a4 00 00 00 call *0xa4(%ebx) <== NOT EXECUTED 108bc3: eb 2c jmp 108bf1 <== NOT EXECUTED (void *)&(tty->termios.c_cc[VSTART]), 1); } else if (tty->flow_ctrl & FL_MDRTS) { 108bc5: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 108bcb: f6 c4 01 test $0x1,%ah <== NOT EXECUTED 108bce: 74 24 je 108bf4 <== NOT EXECUTED tty->flow_ctrl &= ~FL_IRTSOFF; 108bd0: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 108bd6: 83 e0 fb and $0xfffffffb,%eax <== NOT EXECUTED 108bd9: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED /* activate RTS line */ if (tty->device.startRemoteTx != NULL) { 108bdf: 8b 83 b0 00 00 00 mov 0xb0(%ebx),%eax <== NOT EXECUTED 108be5: 85 c0 test %eax,%eax <== NOT EXECUTED 108be7: 74 0b je 108bf4 <== NOT EXECUTED tty->device.startRemoteTx(tty->minor); 108be9: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 108bec: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED 108bef: ff d0 call *%eax <== NOT EXECUTED 108bf1: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } } } /* continue processing new character */ if (tty->termios.c_lflag & ICANON) { 108bf4: f6 43 3c 02 testb $0x2,0x3c(%ebx) <== NOT EXECUTED 108bf8: 74 11 je 108c0b <== NOT EXECUTED if (siproc (c, tty)) 108bfa: 0f b6 45 d7 movzbl -0x29(%ebp),%eax <== NOT EXECUTED 108bfe: 89 da mov %ebx,%edx <== NOT EXECUTED 108c00: e8 84 fc ff ff call 108889 <== NOT EXECUTED 108c05: 85 c0 test %eax,%eax <== NOT EXECUTED 108c07: 75 16 jne 108c1f <== NOT EXECUTED 108c09: eb 16 jmp 108c21 <== NOT EXECUTED wait = 0; } else { siproc (c, tty); 108c0b: 0f b6 45 d7 movzbl -0x29(%ebp),%eax <== NOT EXECUTED 108c0f: 89 da mov %ebx,%edx <== NOT EXECUTED 108c11: e8 73 fc ff ff call 108889 <== NOT EXECUTED if (tty->ccount >= tty->termios.c_cc[VMIN]) 108c16: 0f b6 43 47 movzbl 0x47(%ebx),%eax <== NOT EXECUTED 108c1a: 39 43 20 cmp %eax,0x20(%ebx) <== NOT EXECUTED 108c1d: 7c 02 jl 108c21 <== NOT EXECUTED 108c1f: 31 ff xor %edi,%edi <== NOT EXECUTED wait = 0; } timeout = tty->rawInBufSemaphoreTimeout; 108c21: 8b 53 70 mov 0x70(%ebx),%edx <== NOT EXECUTED while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && 108c24: 8b 4b 5c mov 0x5c(%ebx),%ecx <== NOT EXECUTED 108c27: 8b 43 60 mov 0x60(%ebx),%eax <== NOT EXECUTED 108c2a: 39 c1 cmp %eax,%ecx <== NOT EXECUTED 108c2c: 74 0f je 108c3d <== NOT EXECUTED 108c2e: a1 50 16 12 00 mov 0x121650,%eax <== NOT EXECUTED 108c33: 48 dec %eax <== NOT EXECUTED 108c34: 39 43 20 cmp %eax,0x20(%ebx) <== NOT EXECUTED 108c37: 0f 8c 09 ff ff ff jl 108b46 <== NOT EXECUTED } /* * Wait for characters */ if ( wait ) { 108c3d: 85 ff test %edi,%edi <== NOT EXECUTED 108c3f: 74 32 je 108c73 <== NOT EXECUTED sc = rtems_semaphore_obtain (tty->rawInBuf.Semaphore, 108c41: 51 push %ecx <== NOT EXECUTED 108c42: 52 push %edx <== NOT EXECUTED 108c43: ff 73 6c pushl 0x6c(%ebx) <== NOT EXECUTED 108c46: ff 73 68 pushl 0x68(%ebx) <== NOT EXECUTED 108c49: 89 55 cc mov %edx,-0x34(%ebp) <== NOT EXECUTED 108c4c: e8 db 12 00 00 call 109f2c <== NOT EXECUTED tty->rawInBufSemaphoreOptions, timeout); if (sc != RTEMS_SUCCESSFUL) 108c51: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 108c54: 85 c0 test %eax,%eax <== NOT EXECUTED 108c56: 8b 55 cc mov -0x34(%ebp),%edx <== NOT EXECUTED 108c59: 74 c9 je 108c24 <== NOT EXECUTED 108c5b: eb 16 jmp 108c73 <== NOT EXECUTED sc = fillBufferQueue (tty); if (sc != RTEMS_SUCCESSFUL) tty->cindex = tty->ccount = 0; } while (count && (tty->cindex < tty->ccount)) { *buffer++ = tty->cbuf[tty->cindex++]; 108c5d: 8b 7b 1c mov 0x1c(%ebx),%edi <== NOT EXECUTED 108c60: 8b 45 e4 mov -0x1c(%ebp),%eax <== NOT EXECUTED 108c63: 8a 04 07 mov (%edi,%eax,1),%al <== NOT EXECUTED 108c66: 88 02 mov %al,(%edx) <== NOT EXECUTED 108c68: 42 inc %edx <== NOT EXECUTED 108c69: 8b 45 e4 mov -0x1c(%ebp),%eax <== NOT EXECUTED 108c6c: 40 inc %eax <== NOT EXECUTED 108c6d: 89 43 24 mov %eax,0x24(%ebx) <== NOT EXECUTED count--; 108c70: 49 dec %ecx <== NOT EXECUTED 108c71: eb 06 jmp 108c79 <== NOT EXECUTED 108c73: 8b 55 e0 mov -0x20(%ebp),%edx <== NOT EXECUTED 108c76: 8b 4d e4 mov -0x1c(%ebp),%ecx <== NOT EXECUTED else sc = fillBufferQueue (tty); if (sc != RTEMS_SUCCESSFUL) tty->cindex = tty->ccount = 0; } while (count && (tty->cindex < tty->ccount)) { 108c79: 85 c9 test %ecx,%ecx <== NOT EXECUTED 108c7b: 74 0b je 108c88 <== NOT EXECUTED 108c7d: 8b 43 24 mov 0x24(%ebx),%eax <== NOT EXECUTED 108c80: 89 45 e4 mov %eax,-0x1c(%ebp) <== NOT EXECUTED 108c83: 3b 43 20 cmp 0x20(%ebx),%eax <== NOT EXECUTED 108c86: 7c d5 jl 108c5d <== NOT EXECUTED *buffer++ = tty->cbuf[tty->cindex++]; count--; } args->bytes_moved = args->count - count; 108c88: 8b 46 10 mov 0x10(%esi),%eax <== NOT EXECUTED 108c8b: 29 c8 sub %ecx,%eax <== NOT EXECUTED 108c8d: 89 46 18 mov %eax,0x18(%esi) <== NOT EXECUTED tty->tty_rcvwakeup = 0; 108c90: c7 83 e4 00 00 00 00 movl $0x0,0xe4(%ebx) <== NOT EXECUTED 108c97: 00 00 00 <== NOT EXECUTED rtems_semaphore_release (tty->isem); 108c9a: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 108c9d: ff 73 14 pushl 0x14(%ebx) <== NOT EXECUTED 108ca0: e8 73 13 00 00 call 10a018 <== NOT EXECUTED return sc; 108ca5: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } 108ca8: 8b 45 dc mov -0x24(%ebp),%eax <== NOT EXECUTED 108cab: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 108cae: 5b pop %ebx <== NOT EXECUTED 108caf: 5e pop %esi <== NOT EXECUTED 108cb0: 5f pop %edi <== NOT EXECUTED 108cb1: c9 leave <== NOT EXECUTED 108cb2: c3 ret <== NOT EXECUTED 00107eae : * 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) { 107eae: 55 push %ebp 107eaf: 89 e5 mov %esp,%ebp 107eb1: 57 push %edi 107eb2: 56 push %esi 107eb3: 53 push %ebx 107eb4: 83 ec 0c sub $0xc,%esp 107eb7: 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)) 107eba: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax 107ec0: 25 03 04 00 00 and $0x403,%eax 107ec5: 3d 01 04 00 00 cmp $0x401,%eax 107eca: 75 2c jne 107ef8 <== NEVER TAKEN == (FL_MDXOF | FL_IREQXOF)) { /* XOFF should be sent now... */ (*tty->device.write)(tty->minor, 107ecc: 56 push %esi <== NOT EXECUTED 107ecd: 6a 01 push $0x1 <== NOT EXECUTED 107ecf: 8d 43 4a lea 0x4a(%ebx),%eax <== NOT EXECUTED 107ed2: 50 push %eax <== NOT EXECUTED 107ed3: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED 107ed6: ff 93 a4 00 00 00 call *0xa4(%ebx) <== NOT EXECUTED (void *)&(tty->termios.c_cc[VSTOP]), 1); rtems_interrupt_disable(level); 107edc: 9c pushf <== NOT EXECUTED 107edd: fa cli <== NOT EXECUTED 107ede: 5a pop %edx <== NOT EXECUTED tty->t_dqlen--; 107edf: ff 8b 90 00 00 00 decl 0x90(%ebx) <== NOT EXECUTED tty->flow_ctrl |= FL_ISNTXOF; 107ee5: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 107eeb: 83 c8 02 or $0x2,%eax <== NOT EXECUTED 107eee: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED rtems_interrupt_enable(level); 107ef4: 52 push %edx <== NOT EXECUTED 107ef5: 9d popf <== NOT EXECUTED 107ef6: eb 38 jmp 107f30 <== NOT EXECUTED nToSend = 1; } else if ((tty->flow_ctrl & (FL_IREQXOF | FL_ISNTXOF)) 107ef8: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax 107efe: 83 e0 03 and $0x3,%eax 107f01: 83 f8 02 cmp $0x2,%eax 107f04: 75 37 jne 107f3d <== NEVER 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, 107f06: 51 push %ecx <== NOT EXECUTED 107f07: 6a 01 push $0x1 <== NOT EXECUTED 107f09: 8d 43 49 lea 0x49(%ebx),%eax <== NOT EXECUTED 107f0c: 50 push %eax <== NOT EXECUTED 107f0d: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED 107f10: ff 93 a4 00 00 00 call *0xa4(%ebx) <== NOT EXECUTED (void *)&(tty->termios.c_cc[VSTART]), 1); rtems_interrupt_disable(level); 107f16: 9c pushf <== NOT EXECUTED 107f17: fa cli <== NOT EXECUTED 107f18: 5a pop %edx <== NOT EXECUTED tty->t_dqlen--; 107f19: ff 8b 90 00 00 00 decl 0x90(%ebx) <== NOT EXECUTED tty->flow_ctrl &= ~FL_ISNTXOF; 107f1f: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 107f25: 83 e0 fd and $0xfffffffd,%eax <== NOT EXECUTED 107f28: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED rtems_interrupt_enable(level); 107f2e: 52 push %edx <== NOT EXECUTED 107f2f: 9d popf <== NOT EXECUTED 107f30: be 01 00 00 00 mov $0x1,%esi <== NOT EXECUTED 107f35: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 107f38: e9 2f 01 00 00 jmp 10806c <== NOT EXECUTED nToSend = 1; } else { if ( tty->rawOutBuf.Head == tty->rawOutBuf.Tail ) { 107f3d: 8b 93 80 00 00 00 mov 0x80(%ebx),%edx 107f43: 8b 83 84 00 00 00 mov 0x84(%ebx),%eax 107f49: 39 c2 cmp %eax,%edx 107f4b: 75 1f jne 107f6c <== NEVER TAKEN /* * buffer was empty */ if (tty->rawOutBufState == rob_wait) { 107f4d: 31 f6 xor %esi,%esi <== NOT EXECUTED 107f4f: 83 bb 94 00 00 00 02 cmpl $0x2,0x94(%ebx) <== NOT EXECUTED 107f56: 0f 85 10 01 00 00 jne 10806c <== NOT EXECUTED /* * this should never happen... */ rtems_semaphore_release (tty->rawOutBuf.Semaphore); 107f5c: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 107f5f: ff b3 8c 00 00 00 pushl 0x8c(%ebx) <== NOT EXECUTED 107f65: e8 ae 20 00 00 call 10a018 <== NOT EXECUTED 107f6a: eb c9 jmp 107f35 <== NOT EXECUTED } return 0; } rtems_interrupt_disable(level); 107f6c: 9c pushf 107f6d: fa cli 107f6e: 58 pop %eax len = tty->t_dqlen; 107f6f: 8b 8b 90 00 00 00 mov 0x90(%ebx),%ecx tty->t_dqlen = 0; 107f75: c7 83 90 00 00 00 00 movl $0x0,0x90(%ebx) 107f7c: 00 00 00 rtems_interrupt_enable(level); 107f7f: 50 push %eax 107f80: 9d popf newTail = (tty->rawOutBuf.Tail + len) % tty->rawOutBuf.Size; 107f81: 8b 83 84 00 00 00 mov 0x84(%ebx),%eax 107f87: 8b b3 88 00 00 00 mov 0x88(%ebx),%esi 107f8d: 8d 04 01 lea (%ecx,%eax,1),%eax 107f90: 31 d2 xor %edx,%edx 107f92: f7 f6 div %esi 107f94: 89 d7 mov %edx,%edi tty->rawOutBuf.Tail = newTail; 107f96: 89 93 84 00 00 00 mov %edx,0x84(%ebx) if (tty->rawOutBufState == rob_wait) { 107f9c: 83 bb 94 00 00 00 02 cmpl $0x2,0x94(%ebx) 107fa3: 75 11 jne 107fb6 /* * wake up any pending writer task */ rtems_semaphore_release (tty->rawOutBuf.Semaphore); 107fa5: 83 ec 0c sub $0xc,%esp 107fa8: ff b3 8c 00 00 00 pushl 0x8c(%ebx) 107fae: e8 65 20 00 00 call 10a018 107fb3: 83 c4 10 add $0x10,%esp } if (newTail == tty->rawOutBuf.Head) { 107fb6: 8b 83 80 00 00 00 mov 0x80(%ebx),%eax 107fbc: 39 c7 cmp %eax,%edi 107fbe: 75 2a jne 107fea /* * Buffer has become empty */ tty->rawOutBufState = rob_idle; 107fc0: c7 83 94 00 00 00 00 movl $0x0,0x94(%ebx) 107fc7: 00 00 00 nToSend = 0; /* * check to see if snd wakeup callback was set */ if ( tty->tty_snd.sw_pfn != NULL) { 107fca: 8b 83 d4 00 00 00 mov 0xd4(%ebx),%eax 107fd0: 31 f6 xor %esi,%esi 107fd2: 85 c0 test %eax,%eax 107fd4: 0f 84 8c 00 00 00 je 108066 <== NEVER TAKEN (*tty->tty_snd.sw_pfn)(&tty->termios, tty->tty_snd.sw_arg); 107fda: 52 push %edx <== NOT EXECUTED 107fdb: 52 push %edx <== NOT EXECUTED 107fdc: ff b3 d8 00 00 00 pushl 0xd8(%ebx) <== NOT EXECUTED 107fe2: 8d 53 30 lea 0x30(%ebx),%edx <== NOT EXECUTED 107fe5: 52 push %edx <== NOT EXECUTED 107fe6: ff d0 call *%eax <== NOT EXECUTED 107fe8: eb 79 jmp 108063 <== NOT EXECUTED } } /* check, whether output should stop due to received XOFF */ else if ((tty->flow_ctrl & (FL_MDXON | FL_ORCVXOF)) 107fea: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax 107ff0: 25 10 02 00 00 and $0x210,%eax 107ff5: 3d 10 02 00 00 cmp $0x210,%eax 107ffa: 75 22 jne 10801e <== NEVER 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); 107ffc: 9c pushf <== NOT EXECUTED 107ffd: fa cli <== NOT EXECUTED 107ffe: 5a pop %edx <== NOT EXECUTED tty->flow_ctrl |= FL_OSTOP; 107fff: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 108005: 83 c8 20 or $0x20,%eax <== NOT EXECUTED 108008: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED tty->rawOutBufState = rob_busy; /*apm*/ 10800e: c7 83 94 00 00 00 01 movl $0x1,0x94(%ebx) <== NOT EXECUTED 108015: 00 00 00 <== NOT EXECUTED rtems_interrupt_enable(level); 108018: 52 push %edx <== NOT EXECUTED 108019: 9d popf <== NOT EXECUTED 10801a: 31 f6 xor %esi,%esi <== NOT EXECUTED 10801c: eb 48 jmp 108066 <== NOT EXECUTED } else { /* * Buffer not empty, start tranmitter */ if (newTail > tty->rawOutBuf.Head) 10801e: 8b 83 80 00 00 00 mov 0x80(%ebx),%eax 108024: 39 c7 cmp %eax,%edi 108026: 76 08 jbe 108030 nToSend = tty->rawOutBuf.Size - newTail; 108028: 8b b3 88 00 00 00 mov 0x88(%ebx),%esi 10802e: eb 06 jmp 108036 <== ALWAYS TAKEN else nToSend = tty->rawOutBuf.Head - newTail; 108030: 8b b3 80 00 00 00 mov 0x80(%ebx),%esi 108036: 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)) { 108038: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax 10803e: f6 c4 06 test $0x6,%ah 108041: 74 05 je 108048 <== NEVER TAKEN 108043: be 01 00 00 00 mov $0x1,%esi <== NOT EXECUTED nToSend = 1; } tty->rawOutBufState = rob_busy; /*apm*/ 108048: c7 83 94 00 00 00 01 movl $0x1,0x94(%ebx) 10804f: 00 00 00 (*tty->device.write)(tty->minor, 108052: 50 push %eax 108053: 56 push %esi 108054: 8b 43 7c mov 0x7c(%ebx),%eax 108057: 01 f8 add %edi,%eax 108059: 50 push %eax 10805a: ff 73 10 pushl 0x10(%ebx) 10805d: ff 93 a4 00 00 00 call *0xa4(%ebx) 108063: 83 c4 10 add $0x10,%esp &tty->rawOutBuf.theBuf[newTail], nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ 108066: 89 bb 84 00 00 00 mov %edi,0x84(%ebx) } return nToSend; } 10806c: 89 f0 mov %esi,%eax 10806e: 8d 65 f4 lea -0xc(%ebp),%esp 108071: 5b pop %ebx 108072: 5e pop %esi 108073: 5f pop %edi 108074: c9 leave 108075: c3 ret 00109603 : /* * this task actually processes any receive events */ static rtems_task rtems_termios_rxdaemon(rtems_task_argument argument) { 109603: 55 push %ebp <== NOT EXECUTED 109604: 89 e5 mov %esp,%ebp <== NOT EXECUTED 109606: 57 push %edi <== NOT EXECUTED 109607: 56 push %esi <== NOT EXECUTED 109608: 53 push %ebx <== NOT EXECUTED 109609: 83 ec 1c sub $0x1c,%esp <== NOT EXECUTED 10960c: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED char c_buf; while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_RX_PROC_EVENT | 10960f: 8d 7d e0 lea -0x20(%ebp),%edi <== NOT EXECUTED if (c != EOF) { /* * pollRead did call enqueue on its own */ c_buf = c; rtems_termios_enqueue_raw_characters ( 109612: 8d 75 e7 lea -0x19(%ebp),%esi <== NOT EXECUTED char c_buf; while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_RX_PROC_EVENT | 109615: 57 push %edi <== NOT EXECUTED 109616: 6a 00 push $0x0 <== NOT EXECUTED 109618: 6a 02 push $0x2 <== NOT EXECUTED 10961a: 6a 03 push $0x3 <== NOT EXECUTED 10961c: e8 3f 03 00 00 call 109960 <== NOT EXECUTED TERMIOS_RX_TERMINATE_EVENT), RTEMS_EVENT_ANY | RTEMS_WAIT, RTEMS_NO_TIMEOUT, &the_event); if ((the_event & TERMIOS_RX_TERMINATE_EVENT) != 0) { 109621: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 109624: f6 45 e0 01 testb $0x1,-0x20(%ebp) <== NOT EXECUTED 109628: 74 16 je 109640 <== NOT EXECUTED tty->rxTaskId = 0; 10962a: c7 83 c4 00 00 00 00 movl $0x0,0xc4(%ebx) <== NOT EXECUTED 109631: 00 00 00 <== NOT EXECUTED rtems_task_delete(RTEMS_SELF); 109634: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 109637: 6a 00 push $0x0 <== NOT EXECUTED 109639: e8 9a 0b 00 00 call 10a1d8 <== NOT EXECUTED 10963e: eb 21 jmp 109661 <== NOT EXECUTED } else { /* * do something */ c = tty->device.pollRead(tty->minor); 109640: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 109643: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED 109646: ff 93 a0 00 00 00 call *0xa0(%ebx) <== NOT EXECUTED if (c != EOF) { 10964c: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10964f: 83 f8 ff cmp $0xffffffff,%eax <== NOT EXECUTED 109652: 74 c1 je 109615 <== NOT EXECUTED /* * pollRead did call enqueue on its own */ c_buf = c; 109654: 88 45 e7 mov %al,-0x19(%ebp) <== NOT EXECUTED rtems_termios_enqueue_raw_characters ( 109657: 50 push %eax <== NOT EXECUTED 109658: 6a 01 push $0x1 <== NOT EXECUTED 10965a: 56 push %esi <== NOT EXECUTED 10965b: 53 push %ebx <== NOT EXECUTED 10965c: e8 7a ea ff ff call 1080db <== NOT EXECUTED 109661: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 109664: eb af jmp 109615 <== NOT EXECUTED 00107e93 : * signal receive interrupt to rx daemon * NOTE: This routine runs in the context of the * device receive interrupt handler. */ void rtems_termios_rxirq_occured(struct rtems_termios_tty *tty) { 107e93: 55 push %ebp <== NOT EXECUTED 107e94: 89 e5 mov %esp,%ebp <== NOT EXECUTED 107e96: 83 ec 10 sub $0x10,%esp <== NOT EXECUTED /* * send event to rx daemon task */ rtems_event_send(tty->rxTaskId,TERMIOS_RX_PROC_EVENT); 107e99: 6a 02 push $0x2 <== NOT EXECUTED 107e9b: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 107e9e: ff b0 c4 00 00 00 pushl 0xc4(%eax) <== NOT EXECUTED 107ea4: e8 17 1c 00 00 call 109ac0 <== NOT EXECUTED 107ea9: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } 107eac: c9 leave <== NOT EXECUTED 107ead: c3 ret <== NOT EXECUTED 001095a0 : /* * this task actually processes any transmit events */ static rtems_task rtems_termios_txdaemon(rtems_task_argument argument) { 1095a0: 55 push %ebp <== NOT EXECUTED 1095a1: 89 e5 mov %esp,%ebp <== NOT EXECUTED 1095a3: 56 push %esi <== NOT EXECUTED 1095a4: 53 push %ebx <== NOT EXECUTED 1095a5: 83 ec 10 sub $0x10,%esp <== NOT EXECUTED 1095a8: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_TX_START_EVENT | 1095ab: 8d 75 f4 lea -0xc(%ebp),%esi <== NOT EXECUTED 1095ae: 56 push %esi <== NOT EXECUTED 1095af: 6a 00 push $0x0 <== NOT EXECUTED 1095b1: 6a 02 push $0x2 <== NOT EXECUTED 1095b3: 6a 03 push $0x3 <== NOT EXECUTED 1095b5: e8 a6 03 00 00 call 109960 <== NOT EXECUTED TERMIOS_TX_TERMINATE_EVENT), RTEMS_EVENT_ANY | RTEMS_WAIT, RTEMS_NO_TIMEOUT, &the_event); if ((the_event & TERMIOS_TX_TERMINATE_EVENT) != 0) { 1095ba: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 1095bd: f6 45 f4 01 testb $0x1,-0xc(%ebp) <== NOT EXECUTED 1095c1: 74 16 je 1095d9 <== NOT EXECUTED tty->txTaskId = 0; 1095c3: c7 83 c8 00 00 00 00 movl $0x0,0xc8(%ebx) <== NOT EXECUTED 1095ca: 00 00 00 <== NOT EXECUTED rtems_task_delete(RTEMS_SELF); 1095cd: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1095d0: 6a 00 push $0x0 <== NOT EXECUTED 1095d2: e8 01 0c 00 00 call 10a1d8 <== NOT EXECUTED 1095d7: eb 25 jmp 1095fe <== NOT EXECUTED } else { /* * call any line discipline start function */ if (rtems_termios_linesw[tty->t_line].l_start != NULL) { 1095d9: 8b 83 cc 00 00 00 mov 0xcc(%ebx),%eax <== NOT EXECUTED 1095df: c1 e0 05 shl $0x5,%eax <== NOT EXECUTED 1095e2: 8b 80 20 34 12 00 mov 0x123420(%eax),%eax <== NOT EXECUTED 1095e8: 85 c0 test %eax,%eax <== NOT EXECUTED 1095ea: 74 09 je 1095f5 <== NOT EXECUTED rtems_termios_linesw[tty->t_line].l_start(tty); 1095ec: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1095ef: 53 push %ebx <== NOT EXECUTED 1095f0: ff d0 call *%eax <== NOT EXECUTED 1095f2: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } /* * try to push further characters to device */ rtems_termios_refill_transmitter(tty); 1095f5: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1095f8: 53 push %ebx <== NOT EXECUTED 1095f9: e8 b0 e8 ff ff call 107eae <== NOT EXECUTED 1095fe: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 109601: eb ab jmp 1095ae <== NOT EXECUTED 001088db : rtems_termios_puts (&c, 1, tty); } rtems_status_code rtems_termios_write (void *arg) { 1088db: 55 push %ebp 1088dc: 89 e5 mov %esp,%ebp 1088de: 57 push %edi 1088df: 56 push %esi 1088e0: 53 push %ebx 1088e1: 83 ec 20 sub $0x20,%esp 1088e4: 8b 5d 08 mov 0x8(%ebp),%ebx rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 1088e7: 8b 03 mov (%ebx),%eax 1088e9: 8b 70 34 mov 0x34(%eax),%esi rtems_status_code sc; sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 1088ec: 6a 00 push $0x0 1088ee: 6a 00 push $0x0 1088f0: ff 76 18 pushl 0x18(%esi) 1088f3: e8 34 16 00 00 call 109f2c 1088f8: 89 c7 mov %eax,%edi if (sc != RTEMS_SUCCESSFUL) 1088fa: 83 c4 10 add $0x10,%esp 1088fd: 85 c0 test %eax,%eax 1088ff: 75 77 jne 108978 <== ALWAYS TAKEN return sc; if (rtems_termios_linesw[tty->t_line].l_write != NULL) { 108901: 8b 86 cc 00 00 00 mov 0xcc(%esi),%eax 108907: c1 e0 05 shl $0x5,%eax 10890a: 8b 80 18 34 12 00 mov 0x123418(%eax),%eax 108910: 85 c0 test %eax,%eax 108912: 74 0b je 10891f <== NEVER TAKEN sc = rtems_termios_linesw[tty->t_line].l_write(tty,args); 108914: 57 push %edi <== NOT EXECUTED 108915: 57 push %edi <== NOT EXECUTED 108916: 53 push %ebx <== NOT EXECUTED 108917: 56 push %esi <== NOT EXECUTED 108918: ff d0 call *%eax <== NOT EXECUTED 10891a: 89 c7 mov %eax,%edi <== NOT EXECUTED rtems_semaphore_release (tty->osem); 10891c: 5b pop %ebx <== NOT EXECUTED 10891d: eb 4e jmp 10896d <== NOT EXECUTED return sc; } if (tty->termios.c_oflag & OPOST) { 10891f: f6 46 34 01 testb $0x1,0x34(%esi) 108923: 74 2f je 108954 <== ALWAYS TAKEN uint32_t count = args->count; 108925: 8b 4b 10 mov 0x10(%ebx),%ecx char *buffer = args->buffer; 108928: 8b 43 0c mov 0xc(%ebx),%eax 10892b: 89 45 e4 mov %eax,-0x1c(%ebp) while (count--) 10892e: eb 18 jmp 108948 <== ALWAYS TAKEN oproc (*buffer++, tty); 108930: 8b 55 e4 mov -0x1c(%ebp),%edx 108933: 0f b6 02 movzbl (%edx),%eax 108936: 42 inc %edx 108937: 89 55 e4 mov %edx,-0x1c(%ebp) 10893a: 89 f2 mov %esi,%edx 10893c: 89 4d e0 mov %ecx,-0x20(%ebp) 10893f: e8 3d fb ff ff call 108481 <== ALWAYS TAKEN 108944: 8b 4d e0 mov -0x20(%ebp),%ecx 108947: 49 dec %ecx return sc; } if (tty->termios.c_oflag & OPOST) { uint32_t count = args->count; char *buffer = args->buffer; while (count--) 108948: 85 c9 test %ecx,%ecx 10894a: 75 e4 jne 108930 oproc (*buffer++, tty); args->bytes_moved = args->count; 10894c: 8b 43 10 mov 0x10(%ebx),%eax 10894f: 89 43 18 mov %eax,0x18(%ebx) 108952: eb 16 jmp 10896a <== ALWAYS TAKEN } else { rtems_termios_puts (args->buffer, args->count, tty); 108954: 51 push %ecx <== NOT EXECUTED 108955: 56 push %esi <== NOT EXECUTED 108956: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED 108959: ff 73 0c pushl 0xc(%ebx) <== NOT EXECUTED 10895c: e8 00 fa ff ff call 108361 <== NOT EXECUTED args->bytes_moved = args->count; 108961: 8b 43 10 mov 0x10(%ebx),%eax <== NOT EXECUTED 108964: 89 43 18 mov %eax,0x18(%ebx) <== NOT EXECUTED 108967: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } rtems_semaphore_release (tty->osem); 10896a: 83 ec 0c sub $0xc,%esp 10896d: ff 76 18 pushl 0x18(%esi) 108970: e8 a3 16 00 00 call 10a018 return sc; 108975: 83 c4 10 add $0x10,%esp } 108978: 89 f8 mov %edi,%eax 10897a: 8d 65 f4 lea -0xc(%ebp),%esp 10897d: 5b pop %ebx 10897e: 5e pop %esi 10897f: 5f pop %edi 108980: c9 leave 108981: c3 ret 00115e20 : */ rtems_status_code rtems_timer_cancel( rtems_id id ) { 115e20: 55 push %ebp 115e21: 89 e5 mov %esp,%ebp 115e23: 83 ec 1c sub $0x1c,%esp RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Get ( Objects_Id id, Objects_Locations *location ) { return (Timer_Control *) 115e26: 8d 45 f4 lea -0xc(%ebp),%eax 115e29: 50 push %eax 115e2a: ff 75 08 pushl 0x8(%ebp) 115e2d: 68 88 cd 13 00 push $0x13cd88 115e32: e8 55 24 00 00 call 11828c <_Objects_Get> 115e37: 89 c2 mov %eax,%edx Timer_Control *the_timer; Objects_Locations location; the_timer = _Timer_Get( id, &location ); switch ( location ) { 115e39: 83 c4 10 add $0x10,%esp 115e3c: b8 04 00 00 00 mov $0x4,%eax 115e41: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 115e45: 75 1c jne 115e63 case OBJECTS_LOCAL: if ( !_Timer_Is_dormant_class( the_timer->the_class ) ) 115e47: 83 7a 38 04 cmpl $0x4,0x38(%edx) 115e4b: 74 0f je 115e5c <== ALWAYS TAKEN (void) _Watchdog_Remove( &the_timer->Ticker ); 115e4d: 83 ec 0c sub $0xc,%esp 115e50: 83 c2 10 add $0x10,%edx 115e53: 52 push %edx 115e54: e8 5b 3e 00 00 call 119cb4 <_Watchdog_Remove> 115e59: 83 c4 10 add $0x10,%esp _Thread_Enable_dispatch(); 115e5c: e8 5c 2c 00 00 call 118abd <_Thread_Enable_dispatch> 115e61: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 115e63: c9 leave 115e64: c3 ret 00115e68 : rtems_status_code rtems_timer_create( rtems_name name, rtems_id *id ) { 115e68: 55 push %ebp 115e69: 89 e5 mov %esp,%ebp 115e6b: 57 push %edi 115e6c: 56 push %esi 115e6d: 53 push %ebx 115e6e: 83 ec 0c sub $0xc,%esp 115e71: 8b 75 08 mov 0x8(%ebp),%esi 115e74: 8b 5d 0c mov 0xc(%ebp),%ebx Timer_Control *the_timer; if ( !rtems_is_name_valid( name ) ) 115e77: b8 03 00 00 00 mov $0x3,%eax 115e7c: 85 f6 test %esi,%esi 115e7e: 74 6f je 115eef return RTEMS_INVALID_NAME; if ( !id ) 115e80: b0 09 mov $0x9,%al 115e82: 85 db test %ebx,%ebx 115e84: 74 69 je 115eef 115e86: a1 e8 ca 13 00 mov 0x13cae8,%eax 115e8b: 40 inc %eax 115e8c: a3 e8 ca 13 00 mov %eax,0x13cae8 * This function allocates a timer control block from * the inactive chain of free timer control blocks. */ RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Allocate( void ) { return (Timer_Control *) _Objects_Allocate( &_Timer_Information ); 115e91: 83 ec 0c sub $0xc,%esp 115e94: 68 88 cd 13 00 push $0x13cd88 115e99: e8 9e 1f 00 00 call 117e3c <_Objects_Allocate> <== ALWAYS TAKEN _Thread_Disable_dispatch(); /* to prevent deletion */ the_timer = _Timer_Allocate(); if ( !the_timer ) { 115e9e: 83 c4 10 add $0x10,%esp 115ea1: 85 c0 test %eax,%eax 115ea3: 75 0c jne 115eb1 _Thread_Enable_dispatch(); 115ea5: e8 13 2c 00 00 call 118abd <_Thread_Enable_dispatch> 115eaa: b8 05 00 00 00 mov $0x5,%eax return RTEMS_TOO_MANY; 115eaf: eb 3e jmp 115eef <== ALWAYS TAKEN } the_timer->the_class = TIMER_DORMANT; 115eb1: c7 40 38 04 00 00 00 movl $0x4,0x38(%eax) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 115eb8: c7 40 18 00 00 00 00 movl $0x0,0x18(%eax) the_watchdog->routine = routine; 115ebf: c7 40 2c 00 00 00 00 movl $0x0,0x2c(%eax) the_watchdog->id = id; 115ec6: c7 40 30 00 00 00 00 movl $0x0,0x30(%eax) the_watchdog->user_data = user_data; 115ecd: c7 40 34 00 00 00 00 movl $0x0,0x34(%eax) #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 115ed4: 8b 50 08 mov 0x8(%eax),%edx 115ed7: 0f b7 fa movzwl %dx,%edi 115eda: 8b 0d a4 cd 13 00 mov 0x13cda4,%ecx 115ee0: 89 04 b9 mov %eax,(%ecx,%edi,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 115ee3: 89 70 0c mov %esi,0xc(%eax) &_Timer_Information, &the_timer->Object, (Objects_Name) name ); *id = the_timer->Object.id; 115ee6: 89 13 mov %edx,(%ebx) _Thread_Enable_dispatch(); 115ee8: e8 d0 2b 00 00 call 118abd <_Thread_Enable_dispatch> 115eed: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; } 115eef: 8d 65 f4 lea -0xc(%ebp),%esp 115ef2: 5b pop %ebx 115ef3: 5e pop %esi 115ef4: 5f pop %edi 115ef5: c9 leave 115ef6: c3 ret 00115ef8 : */ rtems_status_code rtems_timer_delete( rtems_id id ) { 115ef8: 55 push %ebp 115ef9: 89 e5 mov %esp,%ebp 115efb: 53 push %ebx 115efc: 83 ec 18 sub $0x18,%esp RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Get ( Objects_Id id, Objects_Locations *location ) { return (Timer_Control *) 115eff: 8d 45 f4 lea -0xc(%ebp),%eax 115f02: 50 push %eax 115f03: ff 75 08 pushl 0x8(%ebp) 115f06: 68 88 cd 13 00 push $0x13cd88 115f0b: e8 7c 23 00 00 call 11828c <_Objects_Get> 115f10: 89 c3 mov %eax,%ebx Timer_Control *the_timer; Objects_Locations location; the_timer = _Timer_Get( id, &location ); switch ( location ) { 115f12: 83 c4 10 add $0x10,%esp 115f15: b8 04 00 00 00 mov $0x4,%eax 115f1a: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 115f1e: 75 2f jne 115f4f case OBJECTS_LOCAL: _Objects_Close( &_Timer_Information, &the_timer->Object ); 115f20: 51 push %ecx 115f21: 51 push %ecx 115f22: 53 push %ebx 115f23: 68 88 cd 13 00 push $0x13cd88 115f28: e8 7b 1f 00 00 call 117ea8 <_Objects_Close> <== ALWAYS TAKEN (void) _Watchdog_Remove( &the_timer->Ticker ); 115f2d: 8d 43 10 lea 0x10(%ebx),%eax 115f30: 89 04 24 mov %eax,(%esp) 115f33: e8 7c 3d 00 00 call 119cb4 <_Watchdog_Remove> */ RTEMS_INLINE_ROUTINE void _Timer_Free ( Timer_Control *the_timer ) { _Objects_Free( &_Timer_Information, &the_timer->Object ); 115f38: 58 pop %eax 115f39: 5a pop %edx 115f3a: 53 push %ebx 115f3b: 68 88 cd 13 00 push $0x13cd88 115f40: e8 e3 21 00 00 call 118128 <_Objects_Free> _Timer_Free( the_timer ); _Thread_Enable_dispatch(); 115f45: e8 73 2b 00 00 call 118abd <_Thread_Enable_dispatch> 115f4a: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 115f4c: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 115f4f: 8b 5d fc mov -0x4(%ebp),%ebx 115f52: c9 leave 115f53: c3 ret 00115f54 : rtems_id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { 115f54: 55 push %ebp 115f55: 89 e5 mov %esp,%ebp 115f57: 57 push %edi 115f58: 56 push %esi 115f59: 53 push %ebx 115f5a: 83 ec 1c sub $0x1c,%esp 115f5d: 8b 7d 08 mov 0x8(%ebp),%edi Timer_Control *the_timer; Objects_Locations location; ISR_Level level; if ( ticks == 0 ) 115f60: b8 0a 00 00 00 mov $0xa,%eax 115f65: 83 7d 0c 00 cmpl $0x0,0xc(%ebp) 115f69: 0f 84 87 00 00 00 je 115ff6 return RTEMS_INVALID_NUMBER; if ( !routine ) 115f6f: b0 09 mov $0x9,%al 115f71: 83 7d 10 00 cmpl $0x0,0x10(%ebp) 115f75: 74 7f je 115ff6 RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Get ( Objects_Id id, Objects_Locations *location ) { return (Timer_Control *) 115f77: 52 push %edx 115f78: 8d 45 e4 lea -0x1c(%ebp),%eax 115f7b: 50 push %eax 115f7c: 57 push %edi 115f7d: 68 88 cd 13 00 push $0x13cd88 115f82: e8 05 23 00 00 call 11828c <_Objects_Get> 115f87: 89 c3 mov %eax,%ebx return RTEMS_INVALID_ADDRESS; the_timer = _Timer_Get( id, &location ); switch ( location ) { 115f89: 83 c4 10 add $0x10,%esp 115f8c: b8 04 00 00 00 mov $0x4,%eax 115f91: 83 7d e4 00 cmpl $0x0,-0x1c(%ebp) 115f95: 75 5f jne 115ff6 case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 115f97: 8d 73 10 lea 0x10(%ebx),%esi 115f9a: 83 ec 0c sub $0xc,%esp 115f9d: 56 push %esi 115f9e: e8 11 3d 00 00 call 119cb4 <_Watchdog_Remove> _ISR_Disable( level ); 115fa3: 9c pushf 115fa4: fa cli 115fa5: 58 pop %eax /* * Check to see if the watchdog has just been inserted by a * higher priority interrupt. If so, abandon this insert. */ if ( the_timer->Ticker.state != WATCHDOG_INACTIVE ) { 115fa6: 83 c4 10 add $0x10,%esp 115fa9: 83 7b 18 00 cmpl $0x0,0x18(%ebx) 115fad: 74 0b je 115fba _ISR_Enable( level ); 115faf: 50 push %eax 115fb0: 9d popf _Thread_Enable_dispatch(); 115fb1: e8 07 2b 00 00 call 118abd <_Thread_Enable_dispatch> 115fb6: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 115fb8: eb 3c jmp 115ff6 <== ALWAYS TAKEN /* * OK. Now we now the timer was not rescheduled by an interrupt * so we can atomically initialize it as in use. */ the_timer->the_class = TIMER_INTERVAL; 115fba: c7 43 38 00 00 00 00 movl $0x0,0x38(%ebx) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 115fc1: c7 43 18 00 00 00 00 movl $0x0,0x18(%ebx) the_watchdog->routine = routine; 115fc8: 8b 55 10 mov 0x10(%ebp),%edx 115fcb: 89 53 2c mov %edx,0x2c(%ebx) the_watchdog->id = id; 115fce: 89 7b 30 mov %edi,0x30(%ebx) the_watchdog->user_data = user_data; 115fd1: 8b 55 14 mov 0x14(%ebp),%edx 115fd4: 89 53 34 mov %edx,0x34(%ebx) _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); _ISR_Enable( level ); 115fd7: 50 push %eax 115fd8: 9d popf Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 115fd9: 8b 45 0c mov 0xc(%ebp),%eax 115fdc: 89 43 1c mov %eax,0x1c(%ebx) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 115fdf: 50 push %eax 115fe0: 50 push %eax 115fe1: 56 push %esi 115fe2: 68 c4 cb 13 00 push $0x13cbc4 115fe7: e8 b0 3b 00 00 call 119b9c <_Watchdog_Insert> _Watchdog_Insert_ticks( &the_timer->Ticker, ticks ); _Thread_Enable_dispatch(); 115fec: e8 cc 2a 00 00 call 118abd <_Thread_Enable_dispatch> 115ff1: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 115ff3: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 115ff6: 8d 65 f4 lea -0xc(%ebp),%esp 115ff9: 5b pop %ebx 115ffa: 5e pop %esi 115ffb: 5f pop %edi 115ffc: c9 leave 115ffd: c3 ret 00116000 : rtems_id id, rtems_time_of_day *wall_time, rtems_timer_service_routine_entry routine, void *user_data ) { 116000: 55 push %ebp 116001: 89 e5 mov %esp,%ebp 116003: 57 push %edi 116004: 56 push %esi 116005: 53 push %ebx 116006: 83 ec 1c sub $0x1c,%esp 116009: 8b 5d 0c mov 0xc(%ebp),%ebx Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; if ( !_TOD_Is_set ) 11600c: b8 0b 00 00 00 mov $0xb,%eax 116011: 80 3d fc ca 13 00 00 cmpb $0x0,0x13cafc 116018: 0f 84 ae 00 00 00 je 1160cc return RTEMS_NOT_DEFINED; if ( !_TOD_Validate( wall_time ) ) 11601e: 83 ec 0c sub $0xc,%esp 116021: 53 push %ebx 116022: e8 05 d9 ff ff call 11392c <_TOD_Validate> 116027: 83 c4 10 add $0x10,%esp 11602a: 84 c0 test %al,%al 11602c: 0f 84 95 00 00 00 je 1160c7 return RTEMS_INVALID_CLOCK; if ( !routine ) 116032: b8 09 00 00 00 mov $0x9,%eax 116037: 83 7d 10 00 cmpl $0x0,0x10(%ebp) 11603b: 0f 84 8b 00 00 00 je 1160cc return RTEMS_INVALID_ADDRESS; seconds = _TOD_To_seconds( wall_time ); 116041: 83 ec 0c sub $0xc,%esp 116044: 53 push %ebx 116045: e8 7a d8 ff ff call 1138c4 <_TOD_To_seconds> 11604a: 89 c7 mov %eax,%edi if ( seconds <= _TOD_Seconds_since_epoch() ) 11604c: 83 c4 10 add $0x10,%esp 11604f: 3b 05 78 cb 13 00 cmp 0x13cb78,%eax 116055: 76 70 jbe 1160c7 116057: 51 push %ecx 116058: 8d 45 e4 lea -0x1c(%ebp),%eax 11605b: 50 push %eax 11605c: ff 75 08 pushl 0x8(%ebp) 11605f: 68 88 cd 13 00 push $0x13cd88 116064: e8 23 22 00 00 call 11828c <_Objects_Get> 116069: 89 c3 mov %eax,%ebx return RTEMS_INVALID_CLOCK; the_timer = _Timer_Get( id, &location ); switch ( location ) { 11606b: 83 c4 10 add $0x10,%esp 11606e: b8 04 00 00 00 mov $0x4,%eax 116073: 83 7d e4 00 cmpl $0x0,-0x1c(%ebp) 116077: 75 53 jne 1160cc case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 116079: 8d 73 10 lea 0x10(%ebx),%esi 11607c: 83 ec 0c sub $0xc,%esp 11607f: 56 push %esi 116080: e8 2f 3c 00 00 call 119cb4 <_Watchdog_Remove> the_timer->the_class = TIMER_TIME_OF_DAY; 116085: c7 43 38 02 00 00 00 movl $0x2,0x38(%ebx) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 11608c: c7 43 18 00 00 00 00 movl $0x0,0x18(%ebx) the_watchdog->routine = routine; 116093: 8b 45 10 mov 0x10(%ebp),%eax 116096: 89 43 2c mov %eax,0x2c(%ebx) the_watchdog->id = id; 116099: 8b 45 08 mov 0x8(%ebp),%eax 11609c: 89 43 30 mov %eax,0x30(%ebx) the_watchdog->user_data = user_data; 11609f: 8b 45 14 mov 0x14(%ebp),%eax 1160a2: 89 43 34 mov %eax,0x34(%ebx) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 1160a5: 2b 3d 78 cb 13 00 sub 0x13cb78,%edi 1160ab: 89 7b 1c mov %edi,0x1c(%ebx) _Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog ); 1160ae: 58 pop %eax 1160af: 5a pop %edx 1160b0: 56 push %esi 1160b1: 68 b8 cb 13 00 push $0x13cbb8 1160b6: e8 e1 3a 00 00 call 119b9c <_Watchdog_Insert> _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); _Watchdog_Insert_seconds( &the_timer->Ticker, seconds - _TOD_Seconds_since_epoch() ); _Thread_Enable_dispatch(); 1160bb: e8 fd 29 00 00 call 118abd <_Thread_Enable_dispatch> 1160c0: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 1160c2: 83 c4 10 add $0x10,%esp 1160c5: eb 05 jmp 1160cc <== ALWAYS TAKEN 1160c7: b8 14 00 00 00 mov $0x14,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1160cc: 8d 65 f4 lea -0xc(%ebp),%esp 1160cf: 5b pop %ebx 1160d0: 5e pop %esi 1160d1: 5f pop %edi 1160d2: c9 leave 1160d3: c3 ret 00116364 : rtems_status_code rtems_timer_initiate_server( uint32_t priority, uint32_t stack_size, rtems_attribute attribute_set ) { 116364: 55 push %ebp 116365: 89 e5 mov %esp,%ebp 116367: 53 push %ebx 116368: 83 ec 24 sub $0x24,%esp 11636b: 8b 55 08 mov 0x8(%ebp),%edx */ RTEMS_INLINE_ROUTINE bool _RTEMS_tasks_Priority_is_valid ( rtems_task_priority the_priority ) { return ( ( the_priority >= RTEMS_MINIMUM_PRIORITY ) && 11636e: 31 c0 xor %eax,%eax 116370: 85 d2 test %edx,%edx 116372: 74 0f je 116383 116374: 0f b6 05 94 47 13 00 movzbl 0x134794,%eax 11637b: 39 c2 cmp %eax,%edx 11637d: 0f 96 c0 setbe %al 116380: 0f b6 c0 movzbl %al,%eax * Make sure the requested priority is valid. The if is * structured so we check it is invalid before looking for * a specific invalid value as the default. */ _priority = priority; if ( !_RTEMS_tasks_Priority_is_valid( priority ) ) { 116383: 89 d3 mov %edx,%ebx 116385: 85 c0 test %eax,%eax 116387: 75 0b jne 116394 if ( priority != RTEMS_TIMER_SERVER_DEFAULT_PRIORITY ) 116389: b0 13 mov $0x13,%al 11638b: 42 inc %edx 11638c: 0f 85 4d 01 00 00 jne 1164df 116392: 31 db xor %ebx,%ebx 116394: a1 e8 ca 13 00 mov 0x13cae8,%eax 116399: 40 inc %eax 11639a: a3 e8 ca 13 00 mov %eax,0x13cae8 /* * Just to make sure this is only called once. */ _Thread_Disable_dispatch(); tmpInitialized = initialized; 11639f: 8a 15 0c 84 13 00 mov 0x13840c,%dl initialized = true; 1163a5: c6 05 0c 84 13 00 01 movb $0x1,0x13840c _Thread_Enable_dispatch(); 1163ac: 88 55 e4 mov %dl,-0x1c(%ebp) 1163af: e8 09 27 00 00 call 118abd <_Thread_Enable_dispatch> if ( tmpInitialized ) 1163b4: b8 0e 00 00 00 mov $0xe,%eax 1163b9: 8a 55 e4 mov -0x1c(%ebp),%dl 1163bc: 84 d2 test %dl,%dl 1163be: 0f 85 1b 01 00 00 jne 1164df * other library rules. For example, if using a TSR written in Ada the * Server should run at the same priority as the priority Ada task. * Otherwise, the priority ceiling for the mutex used to protect the * GNAT run-time is violated. */ status = rtems_task_create( 1163c4: 51 push %ecx 1163c5: 51 push %ecx 1163c6: 8d 45 f4 lea -0xc(%ebp),%eax 1163c9: 50 push %eax 1163ca: 8b 45 10 mov 0x10(%ebp),%eax 1163cd: 80 cc 80 or $0x80,%ah 1163d0: 50 push %eax 1163d1: 68 00 01 00 00 push $0x100 1163d6: ff 75 0c pushl 0xc(%ebp) 1163d9: 53 push %ebx 1163da: 68 45 4d 49 54 push $0x54494d45 1163df: e8 80 f2 ff ff call 115664 <== ALWAYS TAKEN /* user may want floating point but we need */ /* system task specified for 0 priority */ attribute_set | RTEMS_SYSTEM_TASK, &id /* get the id back */ ); if (status) { 1163e4: 83 c4 20 add $0x20,%esp 1163e7: 85 c0 test %eax,%eax 1163e9: 74 0c je 1163f7 initialized = false; 1163eb: c6 05 0c 84 13 00 00 movb $0x0,0x13840c return status; 1163f2: e9 e8 00 00 00 jmp 1164df <== ALWAYS TAKEN * We work with the TCB pointer, not the ID, so we need to convert * to a TCB pointer from here out. */ ts->thread = (Thread_Control *)_Objects_Get_local_object( &_RTEMS_tasks_Information, _Objects_Get_index(id) 1163f7: 8b 45 f4 mov -0xc(%ebp),%eax /* * We work with the TCB pointer, not the ID, so we need to convert * to a TCB pointer from here out. */ ts->thread = (Thread_Control *)_Objects_Get_local_object( 1163fa: 0f b7 c8 movzwl %ax,%ecx 1163fd: 8b 15 8c ca 13 00 mov 0x13ca8c,%edx 116403: 8b 14 8a mov (%edx,%ecx,4),%edx 116406: 89 15 10 84 13 00 mov %edx,0x138410 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 11640c: c7 05 40 84 13 00 44 movl $0x138444,0x138440 116413: 84 13 00 the_chain->permanent_null = NULL; 116416: c7 05 44 84 13 00 00 movl $0x0,0x138444 11641d: 00 00 00 the_chain->last = _Chain_Head(the_chain); 116420: c7 05 48 84 13 00 40 movl $0x138440,0x138448 116427: 84 13 00 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 11642a: c7 05 78 84 13 00 7c movl $0x13847c,0x138478 116431: 84 13 00 the_chain->permanent_null = NULL; 116434: c7 05 7c 84 13 00 00 movl $0x0,0x13847c 11643b: 00 00 00 the_chain->last = _Chain_Head(the_chain); 11643e: c7 05 80 84 13 00 78 movl $0x138478,0x138480 116445: 84 13 00 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 116448: c7 05 20 84 13 00 00 movl $0x0,0x138420 11644f: 00 00 00 the_watchdog->routine = routine; 116452: c7 05 34 84 13 00 40 movl $0x118940,0x138434 116459: 89 11 00 the_watchdog->id = id; 11645c: a3 38 84 13 00 mov %eax,0x138438 the_watchdog->user_data = user_data; 116461: c7 05 3c 84 13 00 00 movl $0x0,0x13843c 116468: 00 00 00 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 11646b: c7 05 58 84 13 00 00 movl $0x0,0x138458 116472: 00 00 00 the_watchdog->routine = routine; 116475: c7 05 6c 84 13 00 40 movl $0x118940,0x13846c 11647c: 89 11 00 the_watchdog->id = id; 11647f: a3 70 84 13 00 mov %eax,0x138470 the_watchdog->user_data = user_data; 116484: c7 05 74 84 13 00 00 movl $0x0,0x138474 11648b: 00 00 00 /* * Initialize the pointer to the timer schedule method so applications that * do not use the Timer Server do not have to pull it in. */ ts->schedule_operation = _Timer_server_Schedule_operation_method; 11648e: c7 05 14 84 13 00 ff movl $0x1166ff,0x138414 116495: 66 11 00 ts->Interval_watchdogs.last_snapshot = _Watchdog_Ticks_since_boot; 116498: 8b 15 34 cc 13 00 mov 0x13cc34,%edx 11649e: 89 15 4c 84 13 00 mov %edx,0x13844c ts->TOD_watchdogs.last_snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); 1164a4: 8b 15 78 cb 13 00 mov 0x13cb78,%edx 1164aa: 89 15 84 84 13 00 mov %edx,0x138484 ts->insert_chain = NULL; 1164b0: c7 05 88 84 13 00 00 movl $0x0,0x138488 1164b7: 00 00 00 ts->active = false; 1164ba: c6 05 8c 84 13 00 00 movb $0x0,0x13848c /* * The default timer server is now available. */ _Timer_server = ts; 1164c1: c7 05 c8 cd 13 00 10 movl $0x138410,0x13cdc8 1164c8: 84 13 00 /* * Start the timer server */ status = rtems_task_start( 1164cb: 52 push %edx 1164cc: 68 10 84 13 00 push $0x138410 1164d1: 68 70 65 11 00 push $0x116570 1164d6: 50 push %eax 1164d7: e8 60 f7 ff ff call 115c3c <== ALWAYS TAKEN if (status) { initialized = false; } #endif return status; 1164dc: 83 c4 10 add $0x10,%esp } 1164df: 8b 5d fc mov -0x4(%ebp),%ebx 1164e2: c9 leave 1164e3: c3 ret 00116150 : */ rtems_status_code rtems_timer_reset( rtems_id id ) { 116150: 55 push %ebp 116151: 89 e5 mov %esp,%ebp 116153: 56 push %esi 116154: 53 push %ebx 116155: 83 ec 14 sub $0x14,%esp 116158: 8d 45 f4 lea -0xc(%ebp),%eax 11615b: 50 push %eax 11615c: ff 75 08 pushl 0x8(%ebp) 11615f: 68 88 cd 13 00 push $0x13cd88 116164: e8 23 21 00 00 call 11828c <_Objects_Get> 116169: 89 c3 mov %eax,%ebx Timer_Control *the_timer; Objects_Locations location; rtems_status_code status = RTEMS_SUCCESSFUL; the_timer = _Timer_Get( id, &location ); switch ( location ) { 11616b: 83 c4 10 add $0x10,%esp 11616e: be 04 00 00 00 mov $0x4,%esi 116173: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 116177: 75 50 jne 1161c9 case OBJECTS_LOCAL: if ( the_timer->the_class == TIMER_INTERVAL ) { 116179: 8b 40 38 mov 0x38(%eax),%eax 11617c: 85 c0 test %eax,%eax 11617e: 75 1e jne 11619e _Watchdog_Remove( &the_timer->Ticker ); 116180: 83 c3 10 add $0x10,%ebx 116183: 83 ec 0c sub $0xc,%esp 116186: 53 push %ebx 116187: e8 28 3b 00 00 call 119cb4 <_Watchdog_Remove> _Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker ); 11618c: 59 pop %ecx 11618d: 58 pop %eax 11618e: 53 push %ebx 11618f: 68 c4 cb 13 00 push $0x13cbc4 116194: e8 03 3a 00 00 call 119b9c <_Watchdog_Insert> 116199: 66 31 f6 xor %si,%si 11619c: eb 23 jmp 1161c1 <== ALWAYS TAKEN } else if ( the_timer->the_class == TIMER_INTERVAL_ON_TASK ) { 11619e: be 0b 00 00 00 mov $0xb,%esi 1161a3: 48 dec %eax 1161a4: 75 1e jne 1161c4 Timer_server_Control *timer_server = _Timer_server; 1161a6: 8b 35 c8 cd 13 00 mov 0x13cdc8,%esi if ( !timer_server ) { _Thread_Enable_dispatch(); return RTEMS_INCORRECT_STATE; } #endif _Watchdog_Remove( &the_timer->Ticker ); 1161ac: 83 ec 0c sub $0xc,%esp 1161af: 8d 43 10 lea 0x10(%ebx),%eax 1161b2: 50 push %eax 1161b3: e8 fc 3a 00 00 call 119cb4 <_Watchdog_Remove> (*timer_server->schedule_operation)( timer_server, the_timer ); 1161b8: 58 pop %eax 1161b9: 5a pop %edx 1161ba: 53 push %ebx 1161bb: 56 push %esi 1161bc: ff 56 04 call *0x4(%esi) 1161bf: 31 f6 xor %esi,%esi 1161c1: 83 c4 10 add $0x10,%esp * TIMER_TIME_OF_DAY, or TIMER_TIME_OF_DAY_ON_TASK). We * can only reset active interval timers. */ status = RTEMS_NOT_DEFINED; } _Thread_Enable_dispatch(); 1161c4: e8 f4 28 00 00 call 118abd <_Thread_Enable_dispatch> case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1161c9: 89 f0 mov %esi,%eax 1161cb: 8d 65 f8 lea -0x8(%ebp),%esp 1161ce: 5b pop %ebx 1161cf: 5e pop %esi 1161d0: c9 leave 1161d1: c3 ret 001161d4 : rtems_id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { 1161d4: 55 push %ebp 1161d5: 89 e5 mov %esp,%ebp 1161d7: 57 push %edi 1161d8: 56 push %esi 1161d9: 53 push %ebx 1161da: 83 ec 1c sub $0x1c,%esp 1161dd: 8b 7d 08 mov 0x8(%ebp),%edi Timer_Control *the_timer; Objects_Locations location; ISR_Level level; Timer_server_Control *timer_server = _Timer_server; 1161e0: 8b 35 c8 cd 13 00 mov 0x13cdc8,%esi if ( !timer_server ) 1161e6: b8 0e 00 00 00 mov $0xe,%eax 1161eb: 85 f6 test %esi,%esi 1161ed: 0f 84 8d 00 00 00 je 116280 return RTEMS_INCORRECT_STATE; if ( !routine ) 1161f3: b0 09 mov $0x9,%al 1161f5: 83 7d 10 00 cmpl $0x0,0x10(%ebp) 1161f9: 0f 84 81 00 00 00 je 116280 return RTEMS_INVALID_ADDRESS; if ( ticks == 0 ) 1161ff: b0 0a mov $0xa,%al 116201: 83 7d 0c 00 cmpl $0x0,0xc(%ebp) 116205: 74 79 je 116280 116207: 52 push %edx 116208: 8d 45 e4 lea -0x1c(%ebp),%eax 11620b: 50 push %eax 11620c: 57 push %edi 11620d: 68 88 cd 13 00 push $0x13cd88 116212: e8 75 20 00 00 call 11828c <_Objects_Get> 116217: 89 c3 mov %eax,%ebx return RTEMS_INVALID_NUMBER; the_timer = _Timer_Get( id, &location ); switch ( location ) { 116219: 83 c4 10 add $0x10,%esp 11621c: b8 04 00 00 00 mov $0x4,%eax 116221: 83 7d e4 00 cmpl $0x0,-0x1c(%ebp) 116225: 75 59 jne 116280 case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 116227: 83 ec 0c sub $0xc,%esp 11622a: 8d 43 10 lea 0x10(%ebx),%eax 11622d: 50 push %eax 11622e: e8 81 3a 00 00 call 119cb4 <_Watchdog_Remove> _ISR_Disable( level ); 116233: 9c pushf 116234: fa cli 116235: 58 pop %eax /* * Check to see if the watchdog has just been inserted by a * higher priority interrupt. If so, abandon this insert. */ if ( the_timer->Ticker.state != WATCHDOG_INACTIVE ) { 116236: 83 c4 10 add $0x10,%esp 116239: 83 7b 18 00 cmpl $0x0,0x18(%ebx) 11623d: 74 0b je 11624a _ISR_Enable( level ); 11623f: 50 push %eax 116240: 9d popf _Thread_Enable_dispatch(); 116241: e8 77 28 00 00 call 118abd <_Thread_Enable_dispatch> 116246: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 116248: eb 36 jmp 116280 <== ALWAYS TAKEN /* * OK. Now we now the timer was not rescheduled by an interrupt * so we can atomically initialize it as in use. */ the_timer->the_class = TIMER_INTERVAL_ON_TASK; 11624a: c7 43 38 01 00 00 00 movl $0x1,0x38(%ebx) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 116251: c7 43 18 00 00 00 00 movl $0x0,0x18(%ebx) the_watchdog->routine = routine; 116258: 8b 55 10 mov 0x10(%ebp),%edx 11625b: 89 53 2c mov %edx,0x2c(%ebx) the_watchdog->id = id; 11625e: 89 7b 30 mov %edi,0x30(%ebx) the_watchdog->user_data = user_data; 116261: 8b 55 14 mov 0x14(%ebp),%edx 116264: 89 53 34 mov %edx,0x34(%ebx) _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); the_timer->Ticker.initial = ticks; 116267: 8b 55 0c mov 0xc(%ebp),%edx 11626a: 89 53 1c mov %edx,0x1c(%ebx) _ISR_Enable( level ); 11626d: 50 push %eax 11626e: 9d popf (*timer_server->schedule_operation)( timer_server, the_timer ); 11626f: 50 push %eax 116270: 50 push %eax 116271: 53 push %ebx 116272: 56 push %esi 116273: ff 56 04 call *0x4(%esi) _Thread_Enable_dispatch(); 116276: e8 42 28 00 00 call 118abd <_Thread_Enable_dispatch> 11627b: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 11627d: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116280: 8d 65 f4 lea -0xc(%ebp),%esp 116283: 5b pop %ebx 116284: 5e pop %esi 116285: 5f pop %edi 116286: c9 leave 116287: c3 ret 00116288 : rtems_id id, rtems_time_of_day *wall_time, rtems_timer_service_routine_entry routine, void *user_data ) { 116288: 55 push %ebp 116289: 89 e5 mov %esp,%ebp 11628b: 57 push %edi 11628c: 56 push %esi 11628d: 53 push %ebx 11628e: 83 ec 1c sub $0x1c,%esp 116291: 8b 5d 0c mov 0xc(%ebp),%ebx Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; Timer_server_Control *timer_server = _Timer_server; 116294: 8b 35 c8 cd 13 00 mov 0x13cdc8,%esi if ( !timer_server ) 11629a: b8 0e 00 00 00 mov $0xe,%eax 11629f: 85 f6 test %esi,%esi 1162a1: 0f 84 b4 00 00 00 je 11635b return RTEMS_INCORRECT_STATE; if ( !_TOD_Is_set ) 1162a7: b0 0b mov $0xb,%al 1162a9: 80 3d fc ca 13 00 00 cmpb $0x0,0x13cafc 1162b0: 0f 84 a5 00 00 00 je 11635b <== ALWAYS TAKEN return RTEMS_NOT_DEFINED; if ( !routine ) 1162b6: b0 09 mov $0x9,%al 1162b8: 83 7d 10 00 cmpl $0x0,0x10(%ebp) 1162bc: 0f 84 99 00 00 00 je 11635b return RTEMS_INVALID_ADDRESS; if ( !_TOD_Validate( wall_time ) ) 1162c2: 83 ec 0c sub $0xc,%esp 1162c5: 53 push %ebx 1162c6: e8 61 d6 ff ff call 11392c <_TOD_Validate> 1162cb: 83 c4 10 add $0x10,%esp 1162ce: 84 c0 test %al,%al 1162d0: 0f 84 80 00 00 00 je 116356 return RTEMS_INVALID_CLOCK; seconds = _TOD_To_seconds( wall_time ); 1162d6: 83 ec 0c sub $0xc,%esp 1162d9: 53 push %ebx 1162da: e8 e5 d5 ff ff call 1138c4 <_TOD_To_seconds> 1162df: 89 c7 mov %eax,%edi if ( seconds <= _TOD_Seconds_since_epoch() ) 1162e1: 83 c4 10 add $0x10,%esp 1162e4: 3b 05 78 cb 13 00 cmp 0x13cb78,%eax 1162ea: 76 6a jbe 116356 1162ec: 51 push %ecx 1162ed: 8d 45 e4 lea -0x1c(%ebp),%eax 1162f0: 50 push %eax 1162f1: ff 75 08 pushl 0x8(%ebp) 1162f4: 68 88 cd 13 00 push $0x13cd88 1162f9: e8 8e 1f 00 00 call 11828c <_Objects_Get> 1162fe: 89 c3 mov %eax,%ebx return RTEMS_INVALID_CLOCK; the_timer = _Timer_Get( id, &location ); switch ( location ) { 116300: 83 c4 10 add $0x10,%esp 116303: b8 04 00 00 00 mov $0x4,%eax 116308: 83 7d e4 00 cmpl $0x0,-0x1c(%ebp) 11630c: 75 4d jne 11635b case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 11630e: 83 ec 0c sub $0xc,%esp 116311: 8d 43 10 lea 0x10(%ebx),%eax 116314: 50 push %eax 116315: e8 9a 39 00 00 call 119cb4 <_Watchdog_Remove> the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK; 11631a: 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; 116321: c7 43 18 00 00 00 00 movl $0x0,0x18(%ebx) the_watchdog->routine = routine; 116328: 8b 45 10 mov 0x10(%ebp),%eax 11632b: 89 43 2c mov %eax,0x2c(%ebx) the_watchdog->id = id; 11632e: 8b 45 08 mov 0x8(%ebp),%eax 116331: 89 43 30 mov %eax,0x30(%ebx) the_watchdog->user_data = user_data; 116334: 8b 45 14 mov 0x14(%ebp),%eax 116337: 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(); 11633a: 2b 3d 78 cb 13 00 sub 0x13cb78,%edi 116340: 89 7b 1c mov %edi,0x1c(%ebx) (*timer_server->schedule_operation)( timer_server, the_timer ); 116343: 58 pop %eax 116344: 5a pop %edx 116345: 53 push %ebx 116346: 56 push %esi 116347: ff 56 04 call *0x4(%esi) _Thread_Enable_dispatch(); 11634a: e8 6e 27 00 00 call 118abd <_Thread_Enable_dispatch> 11634f: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 116351: 83 c4 10 add $0x10,%esp 116354: eb 05 jmp 11635b <== ALWAYS TAKEN 116356: b8 14 00 00 00 mov $0x14,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11635b: 8d 65 f4 lea -0xc(%ebp),%esp 11635e: 5b pop %ebx 11635f: 5e pop %esi 116360: 5f pop %edi 116361: c9 leave 116362: c3 ret 0010b389 : static int rtems_verror( rtems_error_code_t error_flag, const char *printf_format, va_list arglist ) { 10b389: 55 push %ebp <== NOT EXECUTED 10b38a: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10b38c: 57 push %edi <== NOT EXECUTED 10b38d: 56 push %esi <== NOT EXECUTED 10b38e: 53 push %ebx <== NOT EXECUTED 10b38f: 83 ec 1c sub $0x1c,%esp <== NOT EXECUTED 10b392: 89 c3 mov %eax,%ebx <== NOT EXECUTED 10b394: 89 55 e4 mov %edx,-0x1c(%ebp) <== NOT EXECUTED 10b397: 89 4d dc mov %ecx,-0x24(%ebp) <== NOT EXECUTED int local_errno = 0; int chars_written = 0; rtems_status_code status; if (error_flag & RTEMS_ERROR_PANIC) 10b39a: 25 00 00 00 20 and $0x20000000,%eax <== NOT EXECUTED 10b39f: 89 45 e0 mov %eax,-0x20(%ebp) <== NOT EXECUTED 10b3a2: 74 2a je 10b3ce <== NOT EXECUTED { if (rtems_panic_in_progress++) 10b3a4: a1 70 a1 12 00 mov 0x12a170,%eax <== NOT EXECUTED 10b3a9: 8d 50 01 lea 0x1(%eax),%edx <== NOT EXECUTED 10b3ac: 89 15 70 a1 12 00 mov %edx,0x12a170 <== NOT EXECUTED 10b3b2: 85 c0 test %eax,%eax <== NOT EXECUTED 10b3b4: 74 0b je 10b3c1 <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10b3b6: a1 d0 a2 12 00 mov 0x12a2d0,%eax <== NOT EXECUTED 10b3bb: 40 inc %eax <== NOT EXECUTED 10b3bc: a3 d0 a2 12 00 mov %eax,0x12a2d0 <== NOT EXECUTED _Thread_Disable_dispatch(); /* disable task switches */ /* don't aggravate things */ if (rtems_panic_in_progress > 2) 10b3c1: 83 3d 70 a1 12 00 02 cmpl $0x2,0x12a170 <== NOT EXECUTED 10b3c8: 0f 8f 1b 01 00 00 jg 10b4e9 <== NOT EXECUTED return 0; } (void) fflush(stdout); /* in case stdout/stderr same */ 10b3ce: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10b3d1: a1 40 80 12 00 mov 0x128040,%eax <== NOT EXECUTED 10b3d6: ff 70 08 pushl 0x8(%eax) <== NOT EXECUTED 10b3d9: e8 c6 aa 00 00 call 115ea4 <== NOT EXECUTED status = error_flag & ~RTEMS_ERROR_MASK; 10b3de: 89 df mov %ebx,%edi <== NOT EXECUTED 10b3e0: 81 e7 ff ff ff 8f and $0x8fffffff,%edi <== NOT EXECUTED if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */ 10b3e6: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10b3e9: 31 f6 xor %esi,%esi <== NOT EXECUTED 10b3eb: f7 c3 00 00 00 40 test $0x40000000,%ebx <== NOT EXECUTED 10b3f1: 74 07 je 10b3fa <== NOT EXECUTED local_errno = errno; 10b3f3: e8 58 a7 00 00 call 115b50 <__errno> <== NOT EXECUTED 10b3f8: 8b 30 mov (%eax),%esi <== NOT EXECUTED #if defined(RTEMS_MULTIPROCESSING) if (_System_state_Is_multiprocessing) fprintf(stderr, "[%" PRIu32 "] ", _Configuration_MP_table->node); #endif chars_written += vfprintf(stderr, printf_format, arglist); 10b3fa: 52 push %edx <== NOT EXECUTED 10b3fb: ff 75 dc pushl -0x24(%ebp) <== NOT EXECUTED 10b3fe: ff 75 e4 pushl -0x1c(%ebp) <== NOT EXECUTED 10b401: a1 40 80 12 00 mov 0x128040,%eax <== NOT EXECUTED 10b406: ff 70 0c pushl 0xc(%eax) <== NOT EXECUTED 10b409: e8 6a 06 01 00 call 11ba78 <== NOT EXECUTED 10b40e: 89 45 e4 mov %eax,-0x1c(%ebp) <== NOT EXECUTED if (status) 10b411: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10b414: 85 ff test %edi,%edi <== NOT EXECUTED 10b416: 74 25 je 10b43d <== NOT EXECUTED chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status)); 10b418: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10b41b: 57 push %edi <== NOT EXECUTED 10b41c: e8 53 ff ff ff call 10b374 <== NOT EXECUTED 10b421: 83 c4 0c add $0xc,%esp <== NOT EXECUTED 10b424: 50 push %eax <== NOT EXECUTED 10b425: 68 53 39 12 00 push $0x123953 <== NOT EXECUTED 10b42a: a1 40 80 12 00 mov 0x128040,%eax <== NOT EXECUTED 10b42f: ff 70 0c pushl 0xc(%eax) <== NOT EXECUTED 10b432: e8 b5 ad 00 00 call 1161ec <== NOT EXECUTED 10b437: 01 45 e4 add %eax,-0x1c(%ebp) <== NOT EXECUTED 10b43a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED if (local_errno) 10b43d: 83 fe 00 cmp $0x0,%esi <== NOT EXECUTED 10b440: 74 41 je 10b483 <== NOT EXECUTED { if ((local_errno > 0) && *strerror(local_errno)) 10b442: 7e 25 jle 10b469 <== NOT EXECUTED 10b444: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10b447: 56 push %esi <== NOT EXECUTED 10b448: e8 67 b5 00 00 call 1169b4 <== NOT EXECUTED 10b44d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10b450: 80 38 00 cmpb $0x0,(%eax) <== NOT EXECUTED 10b453: 74 14 je 10b469 <== NOT EXECUTED chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno)); 10b455: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10b458: 56 push %esi <== NOT EXECUTED 10b459: e8 56 b5 00 00 call 1169b4 <== NOT EXECUTED 10b45e: 83 c4 0c add $0xc,%esp <== NOT EXECUTED 10b461: 50 push %eax <== NOT EXECUTED 10b462: 68 61 39 12 00 push $0x123961 <== NOT EXECUTED 10b467: eb 07 jmp 10b470 <== NOT EXECUTED else chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno); 10b469: 50 push %eax <== NOT EXECUTED 10b46a: 56 push %esi <== NOT EXECUTED 10b46b: 68 6e 39 12 00 push $0x12396e <== NOT EXECUTED 10b470: a1 40 80 12 00 mov 0x128040,%eax <== NOT EXECUTED 10b475: ff 70 0c pushl 0xc(%eax) <== NOT EXECUTED 10b478: e8 6f ad 00 00 call 1161ec <== NOT EXECUTED 10b47d: 01 45 e4 add %eax,-0x1c(%ebp) <== NOT EXECUTED 10b480: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } chars_written += fprintf(stderr, "\n"); 10b483: 57 push %edi <== NOT EXECUTED 10b484: 57 push %edi <== NOT EXECUTED 10b485: 68 40 40 12 00 push $0x124040 <== NOT EXECUTED 10b48a: a1 40 80 12 00 mov 0x128040,%eax <== NOT EXECUTED 10b48f: ff 70 0c pushl 0xc(%eax) <== NOT EXECUTED 10b492: e8 55 ad 00 00 call 1161ec <== NOT EXECUTED 10b497: 89 c7 mov %eax,%edi <== NOT EXECUTED (void) fflush(stderr); 10b499: 59 pop %ecx <== NOT EXECUTED 10b49a: a1 40 80 12 00 mov 0x128040,%eax <== NOT EXECUTED 10b49f: ff 70 0c pushl 0xc(%eax) <== NOT EXECUTED 10b4a2: e8 fd a9 00 00 call 115ea4 <== NOT EXECUTED if (error_flag & (RTEMS_ERROR_PANIC | RTEMS_ERROR_ABORT)) 10b4a7: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10b4aa: 81 e3 00 00 00 30 and $0x30000000,%ebx <== NOT EXECUTED 10b4b0: 75 08 jne 10b4ba <== NOT EXECUTED chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno)); else chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno); } chars_written += fprintf(stderr, "\n"); 10b4b2: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED 10b4b5: 8d 04 17 lea (%edi,%edx,1),%eax <== NOT EXECUTED 10b4b8: eb 31 jmp 10b4eb <== NOT EXECUTED (void) fflush(stderr); if (error_flag & (RTEMS_ERROR_PANIC | RTEMS_ERROR_ABORT)) { if (error_flag & RTEMS_ERROR_PANIC) 10b4ba: 83 7d e0 00 cmpl $0x0,-0x20(%ebp) <== NOT EXECUTED 10b4be: 74 16 je 10b4d6 <== NOT EXECUTED { rtems_error(0, "fatal error, exiting"); 10b4c0: 52 push %edx <== NOT EXECUTED 10b4c1: 52 push %edx <== NOT EXECUTED 10b4c2: 68 82 39 12 00 push $0x123982 <== NOT EXECUTED 10b4c7: 6a 00 push $0x0 <== NOT EXECUTED 10b4c9: e8 3d 00 00 00 call 10b50b <== NOT EXECUTED _exit(local_errno); 10b4ce: 89 34 24 mov %esi,(%esp) <== NOT EXECUTED 10b4d1: e8 26 09 00 00 call 10bdfc <_exit> <== NOT EXECUTED } else { rtems_error(0, "fatal error, aborting"); 10b4d6: 50 push %eax <== NOT EXECUTED 10b4d7: 50 push %eax <== NOT EXECUTED 10b4d8: 68 97 39 12 00 push $0x123997 <== NOT EXECUTED 10b4dd: 6a 00 push $0x0 <== NOT EXECUTED 10b4df: e8 27 00 00 00 call 10b50b <== NOT EXECUTED abort(); 10b4e4: e8 33 a6 00 00 call 115b1c <== NOT EXECUTED 10b4e9: 31 c0 xor %eax,%eax <== NOT EXECUTED } } return chars_written; } 10b4eb: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 10b4ee: 5b pop %ebx <== NOT EXECUTED 10b4ef: 5e pop %esi <== NOT EXECUTED 10b4f0: 5f pop %edi <== NOT EXECUTED 10b4f1: c9 leave <== NOT EXECUTED 10b4f2: c3 ret <== NOT EXECUTED 0010a801 : */ bool rtems_workspace_allocate( uintptr_t bytes, void **pointer ) { 10a801: 55 push %ebp 10a802: 89 e5 mov %esp,%ebp 10a804: 53 push %ebx 10a805: 83 ec 04 sub $0x4,%esp 10a808: 8b 45 08 mov 0x8(%ebp),%eax 10a80b: 8b 5d 0c mov 0xc(%ebp),%ebx void *ptr; /* * check the arguments */ if ( !pointer ) 10a80e: 85 db test %ebx,%ebx 10a810: 74 20 je 10a832 return false; if ( !bytes ) 10a812: 85 c0 test %eax,%eax 10a814: 74 1c je 10a832 RTEMS_INLINE_ROUTINE void *_Protected_heap_Allocate( Heap_Control *heap, uintptr_t size ) { return _Protected_heap_Allocate_aligned_with_boundary( heap, size, 0, 0 ); 10a816: 6a 00 push $0x0 10a818: 6a 00 push $0x0 10a81a: 50 push %eax 10a81b: 68 9c 41 12 00 push $0x12419c 10a820: e8 27 12 00 00 call 10ba4c <_Protected_heap_Allocate_aligned_with_boundary> /* * Allocate the memory */ ptr = _Protected_heap_Allocate( &_Workspace_Area, (intptr_t) bytes ); if (!ptr) 10a825: 83 c4 10 add $0x10,%esp 10a828: 85 c0 test %eax,%eax 10a82a: 74 06 je 10a832 return false; *pointer = ptr; 10a82c: 89 03 mov %eax,(%ebx) 10a82e: b0 01 mov $0x1,%al return true; 10a830: eb 02 jmp 10a834 <== ALWAYS TAKEN 10a832: 31 c0 xor %eax,%eax } 10a834: 8b 5d fc mov -0x4(%ebp),%ebx 10a837: c9 leave 10a838: c3 ret 00125696 : /* * Extract an integer value from the database */ static int scanInt(FILE *fp, int *val) { 125696: 55 push %ebp 125697: 89 e5 mov %esp,%ebp 125699: 57 push %edi 12569a: 56 push %esi 12569b: 53 push %ebx 12569c: 83 ec 3c sub $0x3c,%esp 12569f: 89 c3 mov %eax,%ebx 1256a1: 89 55 e0 mov %edx,-0x20(%ebp) 1256a4: 31 f6 xor %esi,%esi 1256a6: c7 45 e4 ff ff ff 7f movl $0x7fffffff,-0x1c(%ebp) 1256ad: 31 ff xor %edi,%edi sign = 1; } if (!isdigit(c)) return 0; d = c - '0'; if ((i > (limit / 10)) 1256af: 89 7d c4 mov %edi,-0x3c(%ebp) unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp); 1256b2: 8b 43 04 mov 0x4(%ebx),%eax 1256b5: 48 dec %eax 1256b6: 89 43 04 mov %eax,0x4(%ebx) 1256b9: 85 c0 test %eax,%eax 1256bb: 79 15 jns 1256d2 <== NEVER TAKEN 1256bd: 50 push %eax <== NOT EXECUTED 1256be: 50 push %eax <== NOT EXECUTED 1256bf: 53 push %ebx <== NOT EXECUTED 1256c0: ff 35 60 e3 15 00 pushl 0x15e360 <== NOT EXECUTED 1256c6: e8 5d 77 01 00 call 13ce28 <__srget_r> <== NOT EXECUTED 1256cb: 89 c1 mov %eax,%ecx <== NOT EXECUTED 1256cd: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 1256d0: eb 08 jmp 1256da <== NOT EXECUTED 1256d2: 8b 03 mov (%ebx),%eax 1256d4: 0f b6 08 movzbl (%eax),%ecx 1256d7: 40 inc %eax 1256d8: 89 03 mov %eax,(%ebx) if (c == ':') 1256da: 83 f9 3a cmp $0x3a,%ecx 1256dd: 74 4a je 125729 break; if (sign == 0) { 1256df: 85 f6 test %esi,%esi 1256e1: 75 11 jne 1256f4 <== ALWAYS TAKEN if (c == '-') { sign = -1; limit++; continue; 1256e3: 66 be 01 00 mov $0x1,%si for (;;) { c = getc(fp); if (c == ':') break; if (sign == 0) { if (c == '-') { 1256e7: 83 f9 2d cmp $0x2d,%ecx 1256ea: 75 08 jne 1256f4 <== NEVER TAKEN sign = -1; limit++; 1256ec: ff 45 e4 incl -0x1c(%ebp) <== NOT EXECUTED 1256ef: 83 ce ff or $0xffffffff,%esi <== NOT EXECUTED continue; 1256f2: eb be jmp 1256b2 <== NOT EXECUTED } sign = 1; } if (!isdigit(c)) 1256f4: a1 38 e3 15 00 mov 0x15e338,%eax 1256f9: f6 44 08 01 04 testb $0x4,0x1(%eax,%ecx,1) 1256fe: 74 3f je 12573f <== ALWAYS TAKEN return 0; d = c - '0'; if ((i > (limit / 10)) 125700: 8b 45 e4 mov -0x1c(%ebp),%eax 125703: bf 0a 00 00 00 mov $0xa,%edi 125708: 31 d2 xor %edx,%edx 12570a: f7 f7 div %edi 12570c: 89 55 d4 mov %edx,-0x2c(%ebp) 12570f: 39 45 c4 cmp %eax,-0x3c(%ebp) 125712: 77 2b ja 12573f <== ALWAYS TAKEN } sign = 1; } if (!isdigit(c)) return 0; d = c - '0'; 125714: 83 e9 30 sub $0x30,%ecx if ((i > (limit / 10)) 125717: 39 45 c4 cmp %eax,-0x3c(%ebp) 12571a: 75 04 jne 125720 <== NEVER TAKEN 12571c: 39 d1 cmp %edx,%ecx <== NOT EXECUTED 12571e: 77 1f ja 12573f <== NOT EXECUTED || ((i == (limit / 10)) && (d > (limit % 10)))) return 0; i = i * 10 + d; 125720: 6b 7d c4 0a imul $0xa,-0x3c(%ebp),%edi 125724: 8d 3c 39 lea (%ecx,%edi,1),%edi 125727: eb 86 jmp 1256af <== ALWAYS TAKEN 125729: 8b 7d c4 mov -0x3c(%ebp),%edi } if (sign == 0) 12572c: 85 f6 test %esi,%esi 12572e: 74 0f je 12573f <== ALWAYS TAKEN return 0; *val = i * sign; 125730: 0f af f7 imul %edi,%esi 125733: 8b 45 e0 mov -0x20(%ebp),%eax 125736: 89 30 mov %esi,(%eax) 125738: b8 01 00 00 00 mov $0x1,%eax return 1; 12573d: eb 02 jmp 125741 <== ALWAYS TAKEN 12573f: 31 c0 xor %eax,%eax <== NOT EXECUTED } 125741: 8d 65 f4 lea -0xc(%ebp),%esp 125744: 5b pop %ebx 125745: 5e pop %esi 125746: 5f pop %edi 125747: c9 leave 125748: c3 ret 00125749 : /* * Extract a string value from the database */ static int scanString(FILE *fp, char **name, char **bufp, size_t *nleft, int nlFlag) { 125749: 55 push %ebp 12574a: 89 e5 mov %esp,%ebp 12574c: 57 push %edi 12574d: 56 push %esi 12574e: 53 push %ebx 12574f: 83 ec 1c sub $0x1c,%esp 125752: 89 c3 mov %eax,%ebx 125754: 89 ce mov %ecx,%esi 125756: 8b 7d 08 mov 0x8(%ebp),%edi 125759: 8b 4d 0c mov 0xc(%ebp),%ecx int c; *name = *bufp; 12575c: 8b 06 mov (%esi),%eax 12575e: 89 02 mov %eax,(%edx) for (;;) { c = getc(fp); 125760: 8b 43 04 mov 0x4(%ebx),%eax 125763: 48 dec %eax 125764: 89 43 04 mov %eax,0x4(%ebx) 125767: 85 c0 test %eax,%eax 125769: 79 19 jns 125784 12576b: 52 push %edx 12576c: 52 push %edx 12576d: 53 push %ebx 12576e: ff 35 60 e3 15 00 pushl 0x15e360 125774: 89 4d e4 mov %ecx,-0x1c(%ebp) 125777: e8 ac 76 01 00 call 13ce28 <__srget_r> 12577c: 83 c4 10 add $0x10,%esp 12577f: 8b 4d e4 mov -0x1c(%ebp),%ecx 125782: eb 08 jmp 12578c <== ALWAYS TAKEN 125784: 8b 13 mov (%ebx),%edx 125786: 0f b6 02 movzbl (%edx),%eax 125789: 42 inc %edx 12578a: 89 13 mov %edx,(%ebx) if (c == ':') { 12578c: 83 f8 3a cmp $0x3a,%eax 12578f: 75 06 jne 125797 if (nlFlag) 125791: 85 c9 test %ecx,%ecx 125793: 74 21 je 1257b6 <== NEVER TAKEN 125795: eb 2f jmp 1257c6 <== NOT EXECUTED return 0; break; } if (c == '\n') { 125797: 83 f8 0a cmp $0xa,%eax 12579a: 75 06 jne 1257a2 if (!nlFlag) 12579c: 85 c9 test %ecx,%ecx 12579e: 75 16 jne 1257b6 <== NEVER TAKEN 1257a0: eb 24 jmp 1257c6 <== NOT EXECUTED return 0; break; } if (c == EOF) 1257a2: 83 f8 ff cmp $0xffffffff,%eax 1257a5: 74 1f je 1257c6 <== ALWAYS TAKEN return 0; if (*nleft < 2) 1257a7: 83 3f 01 cmpl $0x1,(%edi) 1257aa: 76 1a jbe 1257c6 <== ALWAYS TAKEN return 0; **bufp = c; 1257ac: 8b 16 mov (%esi),%edx 1257ae: 88 02 mov %al,(%edx) ++(*bufp); 1257b0: ff 06 incl (%esi) --(*nleft); 1257b2: ff 0f decl (%edi) } 1257b4: eb aa jmp 125760 <== ALWAYS TAKEN **bufp = '\0'; 1257b6: 8b 06 mov (%esi),%eax 1257b8: c6 00 00 movb $0x0,(%eax) ++(*bufp); 1257bb: ff 06 incl (%esi) --(*nleft); 1257bd: ff 0f decl (%edi) 1257bf: b8 01 00 00 00 mov $0x1,%eax return 1; 1257c4: eb 02 jmp 1257c8 <== ALWAYS TAKEN 1257c6: 31 c0 xor %eax,%eax <== NOT EXECUTED } 1257c8: 8d 65 f4 lea -0xc(%ebp),%esp 1257cb: 5b pop %ebx 1257cc: 5e pop %esi 1257cd: 5f pop %edi 1257ce: c9 leave 1257cf: c3 ret 001257d0 : FILE *fp, struct group *grp, char *buffer, size_t bufsize ) { 1257d0: 55 push %ebp 1257d1: 89 e5 mov %esp,%ebp 1257d3: 57 push %edi 1257d4: 56 push %esi 1257d5: 53 push %ebx 1257d6: 83 ec 34 sub $0x34,%esp 1257d9: 89 c6 mov %eax,%esi 1257db: 89 d3 mov %edx,%ebx 1257dd: 89 4d d4 mov %ecx,-0x2c(%ebp) int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 1257e0: 8d 7d d4 lea -0x2c(%ebp),%edi 1257e3: 6a 00 push $0x0 1257e5: 8d 45 08 lea 0x8(%ebp),%eax 1257e8: 50 push %eax 1257e9: 89 f9 mov %edi,%ecx 1257eb: 89 f0 mov %esi,%eax 1257ed: e8 57 ff ff ff call 125749 <== ALWAYS TAKEN 1257f2: 83 c4 10 add $0x10,%esp 1257f5: 85 c0 test %eax,%eax 1257f7: 0f 84 c8 00 00 00 je 1258c5 <== ALWAYS TAKEN || !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0) 1257fd: 50 push %eax 1257fe: 50 push %eax 1257ff: 8d 53 04 lea 0x4(%ebx),%edx 125802: 6a 00 push $0x0 125804: 8d 45 08 lea 0x8(%ebp),%eax 125807: 50 push %eax 125808: 89 f9 mov %edi,%ecx 12580a: 89 f0 mov %esi,%eax 12580c: e8 38 ff ff ff call 125749 <== ALWAYS TAKEN { int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 125811: 83 c4 10 add $0x10,%esp 125814: 85 c0 test %eax,%eax 125816: 0f 84 a9 00 00 00 je 1258c5 <== ALWAYS TAKEN || !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &grgid) 12581c: 8d 55 e4 lea -0x1c(%ebp),%edx 12581f: 89 f0 mov %esi,%eax 125821: e8 70 fe ff ff call 125696 <== ALWAYS TAKEN { int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 125826: 85 c0 test %eax,%eax 125828: 0f 84 97 00 00 00 je 1258c5 <== ALWAYS TAKEN || !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &grgid) || !scanString(fp, &grmem, &buffer, &bufsize, 1)) 12582e: 51 push %ecx 12582f: 51 push %ecx 125830: 8d 55 e0 lea -0x20(%ebp),%edx 125833: 6a 01 push $0x1 125835: 8d 45 08 lea 0x8(%ebp),%eax 125838: 50 push %eax 125839: 89 f9 mov %edi,%ecx 12583b: 89 f0 mov %esi,%eax 12583d: e8 07 ff ff ff call 125749 <== ALWAYS TAKEN { int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 125842: 83 c4 10 add $0x10,%esp 125845: 85 c0 test %eax,%eax 125847: 74 7c je 1258c5 <== ALWAYS TAKEN || !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &grgid) || !scanString(fp, &grmem, &buffer, &bufsize, 1)) return 0; grp->gr_gid = grgid; 125849: 8b 45 e4 mov -0x1c(%ebp),%eax 12584c: 66 89 43 08 mov %ax,0x8(%ebx) /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 125850: 8b 7d e0 mov -0x20(%ebp),%edi 125853: 89 fa mov %edi,%edx 125855: b8 01 00 00 00 mov $0x1,%eax 12585a: eb 12 jmp 12586e <== ALWAYS TAKEN if(*cp == ',') memcount++; 12585c: 80 7d d3 2c cmpb $0x2c,-0x2d(%ebp) 125860: 0f 94 c1 sete %cl 125863: 89 ce mov %ecx,%esi 125865: 81 e6 ff 00 00 00 and $0xff,%esi 12586b: 01 f0 add %esi,%eax grp->gr_gid = grgid; /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 12586d: 42 inc %edx 12586e: 8a 0a mov (%edx),%cl 125870: 88 4d d3 mov %cl,-0x2d(%ebp) 125873: 84 c9 test %cl,%cl 125875: 75 e5 jne 12585c } /* * Hack to produce (hopefully) a suitably-aligned array of pointers */ if (bufsize < (((memcount+1)*sizeof(char *)) + 15)) 125877: 8d 04 85 13 00 00 00 lea 0x13(,%eax,4),%eax 12587e: 39 45 08 cmp %eax,0x8(%ebp) 125881: 72 42 jb 1258c5 <== ALWAYS TAKEN return 0; grp->gr_mem = (char **)(((uintptr_t)buffer + 15) & ~15); 125883: 8b 45 d4 mov -0x2c(%ebp),%eax 125886: 83 c0 0f add $0xf,%eax 125889: 83 e0 f0 and $0xfffffff0,%eax 12588c: 89 43 0c mov %eax,0xc(%ebx) /* * Fill in pointer array */ grp->gr_mem[0] = grmem; 12588f: 89 38 mov %edi,(%eax) 125891: 8b 45 e0 mov -0x20(%ebp),%eax 125894: 40 inc %eax 125895: ba 01 00 00 00 mov $0x1,%edx for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 12589a: eb 11 jmp 1258ad <== ALWAYS TAKEN if(*cp == ',') { 12589c: 80 f9 2c cmp $0x2c,%cl 12589f: 75 0b jne 1258ac <== NEVER TAKEN *cp = '\0'; 1258a1: c6 40 ff 00 movb $0x0,-0x1(%eax) <== NOT EXECUTED grp->gr_mem[memcount++] = cp + 1; 1258a5: 8b 4b 0c mov 0xc(%ebx),%ecx <== NOT EXECUTED 1258a8: 89 04 91 mov %eax,(%ecx,%edx,4) <== NOT EXECUTED 1258ab: 42 inc %edx <== NOT EXECUTED 1258ac: 40 inc %eax /* * Fill in pointer array */ grp->gr_mem[0] = grmem; for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 1258ad: 8a 48 ff mov -0x1(%eax),%cl 1258b0: 84 c9 test %cl,%cl 1258b2: 75 e8 jne 12589c if(*cp == ',') { *cp = '\0'; grp->gr_mem[memcount++] = cp + 1; } } grp->gr_mem[memcount] = NULL; 1258b4: 8b 43 0c mov 0xc(%ebx),%eax 1258b7: c7 04 90 00 00 00 00 movl $0x0,(%eax,%edx,4) 1258be: b8 01 00 00 00 mov $0x1,%eax return 1; 1258c3: eb 02 jmp 1258c7 <== ALWAYS TAKEN 1258c5: 31 c0 xor %eax,%eax <== NOT EXECUTED } 1258c7: 8d 65 f4 lea -0xc(%ebp),%esp 1258ca: 5b pop %ebx 1258cb: 5e pop %esi 1258cc: 5f pop %edi 1258cd: c9 leave 1258ce: c3 ret 00125907 : FILE *fp, struct passwd *pwd, char *buffer, size_t bufsize ) { 125907: 55 push %ebp 125908: 89 e5 mov %esp,%ebp 12590a: 57 push %edi 12590b: 56 push %esi 12590c: 53 push %ebx 12590d: 83 ec 34 sub $0x34,%esp 125910: 89 c6 mov %eax,%esi 125912: 89 d3 mov %edx,%ebx 125914: 89 4d d4 mov %ecx,-0x2c(%ebp) int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 125917: 8d 7d d4 lea -0x2c(%ebp),%edi 12591a: 6a 00 push $0x0 12591c: 8d 45 08 lea 0x8(%ebp),%eax 12591f: 50 push %eax 125920: 89 f9 mov %edi,%ecx 125922: 89 f0 mov %esi,%eax 125924: e8 20 fe ff ff call 125749 <== ALWAYS TAKEN 125929: 83 c4 10 add $0x10,%esp 12592c: 85 c0 test %eax,%eax 12592e: 0f 84 c4 00 00 00 je 1259f8 <== ALWAYS TAKEN || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) 125934: 51 push %ecx 125935: 51 push %ecx 125936: 8d 53 04 lea 0x4(%ebx),%edx 125939: 6a 00 push $0x0 12593b: 8d 45 08 lea 0x8(%ebp),%eax 12593e: 50 push %eax 12593f: 89 f9 mov %edi,%ecx 125941: 89 f0 mov %esi,%eax 125943: e8 01 fe ff ff call 125749 <== ALWAYS TAKEN size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 125948: 83 c4 10 add $0x10,%esp 12594b: 85 c0 test %eax,%eax 12594d: 0f 84 a5 00 00 00 je 1259f8 <== ALWAYS TAKEN || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &pwuid) 125953: 8d 55 e4 lea -0x1c(%ebp),%edx 125956: 89 f0 mov %esi,%eax 125958: e8 39 fd ff ff call 125696 <== ALWAYS TAKEN size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 12595d: 85 c0 test %eax,%eax 12595f: 0f 84 93 00 00 00 je 1259f8 <== ALWAYS TAKEN || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &pwuid) || !scanInt(fp, &pwgid) 125965: 8d 55 e0 lea -0x20(%ebp),%edx 125968: 89 f0 mov %esi,%eax 12596a: e8 27 fd ff ff call 125696 <== ALWAYS TAKEN size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 12596f: 85 c0 test %eax,%eax 125971: 0f 84 81 00 00 00 je 1259f8 <== ALWAYS TAKEN || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &pwuid) || !scanInt(fp, &pwgid) || !scanString(fp, &pwd->pw_comment, &buffer, &bufsize, 0) 125977: 52 push %edx 125978: 52 push %edx 125979: 8d 53 0c lea 0xc(%ebx),%edx 12597c: 6a 00 push $0x0 12597e: 8d 45 08 lea 0x8(%ebp),%eax 125981: 50 push %eax 125982: 89 f9 mov %edi,%ecx 125984: 89 f0 mov %esi,%eax 125986: e8 be fd ff ff call 125749 <== ALWAYS TAKEN size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 12598b: 83 c4 10 add $0x10,%esp 12598e: 85 c0 test %eax,%eax 125990: 74 66 je 1259f8 <== ALWAYS TAKEN || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &pwuid) || !scanInt(fp, &pwgid) || !scanString(fp, &pwd->pw_comment, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_gecos, &buffer, &bufsize, 0) 125992: 50 push %eax 125993: 50 push %eax 125994: 8d 53 10 lea 0x10(%ebx),%edx 125997: 6a 00 push $0x0 125999: 8d 45 08 lea 0x8(%ebp),%eax 12599c: 50 push %eax 12599d: 89 f9 mov %edi,%ecx 12599f: 89 f0 mov %esi,%eax 1259a1: e8 a3 fd ff ff call 125749 <== ALWAYS TAKEN size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 1259a6: 83 c4 10 add $0x10,%esp 1259a9: 85 c0 test %eax,%eax 1259ab: 74 4b je 1259f8 <== ALWAYS TAKEN || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &pwuid) || !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) 1259ad: 51 push %ecx 1259ae: 51 push %ecx 1259af: 8d 53 14 lea 0x14(%ebx),%edx 1259b2: 6a 00 push $0x0 1259b4: 8d 45 08 lea 0x8(%ebp),%eax 1259b7: 50 push %eax 1259b8: 89 f9 mov %edi,%ecx 1259ba: 89 f0 mov %esi,%eax 1259bc: e8 88 fd ff ff call 125749 <== ALWAYS TAKEN size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 1259c1: 83 c4 10 add $0x10,%esp 1259c4: 85 c0 test %eax,%eax 1259c6: 74 30 je 1259f8 <== ALWAYS TAKEN || !scanInt(fp, &pwuid) || !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)) 1259c8: 52 push %edx 1259c9: 52 push %edx 1259ca: 8d 53 18 lea 0x18(%ebx),%edx 1259cd: 6a 01 push $0x1 1259cf: 8d 45 08 lea 0x8(%ebp),%eax 1259d2: 50 push %eax 1259d3: 89 f9 mov %edi,%ecx 1259d5: 89 f0 mov %esi,%eax 1259d7: e8 6d fd ff ff call 125749 <== ALWAYS TAKEN size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 1259dc: 83 c4 10 add $0x10,%esp 1259df: 85 c0 test %eax,%eax 1259e1: 74 15 je 1259f8 <== ALWAYS TAKEN || !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; pwd->pw_uid = pwuid; 1259e3: 8b 45 e4 mov -0x1c(%ebp),%eax 1259e6: 66 89 43 08 mov %ax,0x8(%ebx) pwd->pw_gid = pwgid; 1259ea: 8b 45 e0 mov -0x20(%ebp),%eax 1259ed: 66 89 43 0a mov %ax,0xa(%ebx) 1259f1: b8 01 00 00 00 mov $0x1,%eax return 1; 1259f6: eb 02 jmp 1259fa <== ALWAYS TAKEN 1259f8: 31 c0 xor %eax,%eax <== NOT EXECUTED } 1259fa: 8d 65 f4 lea -0xc(%ebp),%esp 1259fd: 5b pop %ebx 1259fe: 5e pop %esi 1259ff: 5f pop %edi 125a00: c9 leave 125a01: c3 ret 00125649 : */ int setgid( gid_t gid ) { 125649: 55 push %ebp <== NOT EXECUTED 12564a: 89 e5 mov %esp,%ebp <== NOT EXECUTED _POSIX_types_Gid = gid; 12564c: a1 78 db 15 00 mov 0x15db78,%eax <== NOT EXECUTED 125651: 8b 55 08 mov 0x8(%ebp),%edx <== NOT EXECUTED 125654: 66 89 50 34 mov %dx,0x34(%eax) <== NOT EXECUTED return 0; } 125658: 31 c0 xor %eax,%eax <== NOT EXECUTED 12565a: c9 leave <== NOT EXECUTED 12565b: c3 ret <== NOT EXECUTED 00125b0b : return NULL; return &grent; } void setgrent(void) { 125b0b: 55 push %ebp <== NOT EXECUTED 125b0c: 89 e5 mov %esp,%ebp <== NOT EXECUTED 125b0e: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED init_etc_passwd_group(); 125b11: e8 24 ff ff ff call 125a3a <== NOT EXECUTED if (group_fp != NULL) 125b16: a1 28 30 16 00 mov 0x163028,%eax <== NOT EXECUTED 125b1b: 85 c0 test %eax,%eax <== NOT EXECUTED 125b1d: 74 0c je 125b2b <== NOT EXECUTED fclose(group_fp); 125b1f: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 125b22: 50 push %eax <== NOT EXECUTED 125b23: e8 f4 29 01 00 call 13851c <== NOT EXECUTED 125b28: 83 c4 10 add $0x10,%esp <== NOT EXECUTED group_fp = fopen("/etc/group", "r"); 125b2b: 52 push %edx <== NOT EXECUTED 125b2c: 52 push %edx <== NOT EXECUTED 125b2d: 68 03 16 15 00 push $0x151603 <== NOT EXECUTED 125b32: 68 c5 ec 14 00 push $0x14ecc5 <== NOT EXECUTED 125b37: e8 d0 31 01 00 call 138d0c <== NOT EXECUTED 125b3c: a3 28 30 16 00 mov %eax,0x163028 <== NOT EXECUTED 125b41: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } 125b44: c9 leave <== NOT EXECUTED 125b45: c3 ret <== NOT EXECUTED 00125caf : return NULL; return &pwent; } void setpwent(void) { 125caf: 55 push %ebp <== NOT EXECUTED 125cb0: 89 e5 mov %esp,%ebp <== NOT EXECUTED 125cb2: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED init_etc_passwd_group(); 125cb5: e8 80 fd ff ff call 125a3a <== NOT EXECUTED if (passwd_fp != NULL) 125cba: a1 40 2f 16 00 mov 0x162f40,%eax <== NOT EXECUTED 125cbf: 85 c0 test %eax,%eax <== NOT EXECUTED 125cc1: 74 0c je 125ccf <== NOT EXECUTED fclose(passwd_fp); 125cc3: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 125cc6: 50 push %eax <== NOT EXECUTED 125cc7: e8 50 28 01 00 call 13851c <== NOT EXECUTED 125ccc: 83 c4 10 add $0x10,%esp <== NOT EXECUTED passwd_fp = fopen("/etc/passwd", "r"); 125ccf: 50 push %eax <== NOT EXECUTED 125cd0: 50 push %eax <== NOT EXECUTED 125cd1: 68 03 16 15 00 push $0x151603 <== NOT EXECUTED 125cd6: 68 80 ec 14 00 push $0x14ec80 <== NOT EXECUTED 125cdb: e8 2c 30 01 00 call 138d0c <== NOT EXECUTED 125ce0: a3 40 2f 16 00 mov %eax,0x162f40 <== NOT EXECUTED 125ce5: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } 125ce8: c9 leave <== NOT EXECUTED 125ce9: c3 ret <== NOT EXECUTED 0010b8be : */ int setuid( uid_t uid ) { 10b8be: 55 push %ebp <== NOT EXECUTED 10b8bf: 89 e5 mov %esp,%ebp <== NOT EXECUTED _POSIX_types_Uid = uid; 10b8c1: a1 78 db 15 00 mov 0x15db78,%eax <== NOT EXECUTED 10b8c6: 8b 55 08 mov 0x8(%ebp),%edx <== NOT EXECUTED 10b8c9: 66 89 50 32 mov %dx,0x32(%eax) <== NOT EXECUTED return 0; } 10b8cd: 31 c0 xor %eax,%eax <== NOT EXECUTED 10b8cf: c9 leave <== NOT EXECUTED 10b8d0: c3 ret <== NOT EXECUTED 00108889 : /* * Process input character, with semaphore. */ static int siproc (unsigned char c, struct rtems_termios_tty *tty) { 108889: 55 push %ebp <== NOT EXECUTED 10888a: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10888c: 56 push %esi <== NOT EXECUTED 10888d: 53 push %ebx <== NOT EXECUTED 10888e: 89 d3 mov %edx,%ebx <== NOT EXECUTED 108890: 89 c6 mov %eax,%esi <== NOT EXECUTED int i; /* * Obtain output semaphore if character will be echoed */ if (tty->termios.c_lflag & (ECHO|ECHOE|ECHOK|ECHONL|ECHOPRT|ECHOCTL|ECHOKE)) { 108892: f7 42 3c 78 0e 00 00 testl $0xe78,0x3c(%edx) <== NOT EXECUTED 108899: 74 30 je 1088cb <== NOT EXECUTED rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 10889b: 52 push %edx <== NOT EXECUTED 10889c: 6a 00 push $0x0 <== NOT EXECUTED 10889e: 6a 00 push $0x0 <== NOT EXECUTED 1088a0: ff 73 18 pushl 0x18(%ebx) <== NOT EXECUTED 1088a3: e8 84 16 00 00 call 109f2c <== NOT EXECUTED i = iproc (c, tty); 1088a8: 89 f2 mov %esi,%edx <== NOT EXECUTED 1088aa: 0f b6 c2 movzbl %dl,%eax <== NOT EXECUTED 1088ad: 89 da mov %ebx,%edx <== NOT EXECUTED 1088af: e8 bc fe ff ff call 108770 <== NOT EXECUTED 1088b4: 89 c6 mov %eax,%esi <== NOT EXECUTED rtems_semaphore_release (tty->osem); 1088b6: 58 pop %eax <== NOT EXECUTED 1088b7: ff 73 18 pushl 0x18(%ebx) <== NOT EXECUTED 1088ba: e8 59 17 00 00 call 10a018 <== NOT EXECUTED 1088bf: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } else { i = iproc (c, tty); } return i; } 1088c2: 89 f0 mov %esi,%eax <== NOT EXECUTED 1088c4: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED 1088c7: 5b pop %ebx <== NOT EXECUTED 1088c8: 5e pop %esi <== NOT EXECUTED 1088c9: c9 leave <== NOT EXECUTED 1088ca: c3 ret <== 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); 1088cb: 0f b6 c0 movzbl %al,%eax <== NOT EXECUTED 1088ce: 89 da mov %ebx,%edx <== NOT EXECUTED } return i; } 1088d0: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED 1088d3: 5b pop %ebx <== NOT EXECUTED 1088d4: 5e pop %esi <== NOT EXECUTED 1088d5: 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); 1088d6: e9 95 fe ff ff jmp 108770 <== NOT EXECUTED 0010cadc : int _STAT_NAME( const char *path, struct stat *buf ) { 10cadc: 55 push %ebp 10cadd: 89 e5 mov %esp,%ebp 10cadf: 57 push %edi 10cae0: 56 push %esi 10cae1: 53 push %ebx 10cae2: 83 ec 2c sub $0x2c,%esp 10cae5: 8b 55 08 mov 0x8(%ebp),%edx 10cae8: 8b 75 0c mov 0xc(%ebp),%esi /* * Check to see if we were passed a valid pointer. */ if ( !buf ) 10caeb: 85 f6 test %esi,%esi 10caed: 75 0d jne 10cafc rtems_set_errno_and_return_minus_one( EFAULT ); 10caef: e8 dc b8 02 00 call 1383d0 <__errno> 10caf4: c7 00 0e 00 00 00 movl $0xe,(%eax) 10cafa: eb 53 jmp 10cb4f <== ALWAYS TAKEN status = rtems_filesystem_evaluate_path( path, strlen( path ), 10cafc: 31 c0 xor %eax,%eax 10cafe: 83 c9 ff or $0xffffffff,%ecx 10cb01: 89 d7 mov %edx,%edi 10cb03: f2 ae repnz scas %es:(%edi),%al 10cb05: f7 d1 not %ecx 10cb07: 49 dec %ecx 10cb08: 83 ec 0c sub $0xc,%esp 10cb0b: 6a 01 push $0x1 10cb0d: 8d 5d d4 lea -0x2c(%ebp),%ebx 10cb10: 53 push %ebx 10cb11: 6a 00 push $0x0 10cb13: 51 push %ecx 10cb14: 52 push %edx 10cb15: e8 02 ec ff ff call 10b71c 0, &loc, _STAT_FOLLOW_LINKS ); if ( status != 0 ) 10cb1a: 83 c4 20 add $0x20,%esp 10cb1d: 83 cf ff or $0xffffffff,%edi 10cb20: 85 c0 test %eax,%eax 10cb22: 75 5c jne 10cb80 return -1; if ( !loc.handlers->fstat_h ){ 10cb24: 8b 55 dc mov -0x24(%ebp),%edx 10cb27: 83 7a 18 00 cmpl $0x0,0x18(%edx) 10cb2b: 75 27 jne 10cb54 <== NEVER TAKEN rtems_filesystem_freenode( &loc ); 10cb2d: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED 10cb30: 85 c0 test %eax,%eax <== NOT EXECUTED 10cb32: 74 10 je 10cb44 <== NOT EXECUTED 10cb34: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 10cb37: 85 c0 test %eax,%eax <== NOT EXECUTED 10cb39: 74 09 je 10cb44 <== NOT EXECUTED 10cb3b: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10cb3e: 53 push %ebx <== NOT EXECUTED 10cb3f: ff d0 call *%eax <== NOT EXECUTED 10cb41: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 10cb44: e8 87 b8 02 00 call 1383d0 <__errno> <== NOT EXECUTED 10cb49: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 10cb4f: 83 cf ff or $0xffffffff,%edi 10cb52: eb 2c jmp 10cb80 <== ALWAYS TAKEN /* * Zero out the stat structure so the various support * versions of stat don't have to. */ memset( buf, 0, sizeof(struct stat) ); 10cb54: b9 11 00 00 00 mov $0x11,%ecx 10cb59: 89 f7 mov %esi,%edi 10cb5b: f3 ab rep stos %eax,%es:(%edi) status = (*loc.handlers->fstat_h)( &loc, buf ); 10cb5d: 50 push %eax 10cb5e: 50 push %eax 10cb5f: 56 push %esi 10cb60: 53 push %ebx 10cb61: ff 52 18 call *0x18(%edx) 10cb64: 89 c7 mov %eax,%edi rtems_filesystem_freenode( &loc ); 10cb66: 8b 45 e0 mov -0x20(%ebp),%eax 10cb69: 83 c4 10 add $0x10,%esp 10cb6c: 85 c0 test %eax,%eax 10cb6e: 74 10 je 10cb80 <== ALWAYS TAKEN 10cb70: 8b 40 1c mov 0x1c(%eax),%eax 10cb73: 85 c0 test %eax,%eax 10cb75: 74 09 je 10cb80 <== ALWAYS TAKEN 10cb77: 83 ec 0c sub $0xc,%esp 10cb7a: 53 push %ebx 10cb7b: ff d0 call *%eax 10cb7d: 83 c4 10 add $0x10,%esp return status; } 10cb80: 89 f8 mov %edi,%eax 10cb82: 8d 65 f4 lea -0xc(%ebp),%esp 10cb85: 5b pop %ebx 10cb86: 5e pop %esi 10cb87: 5f pop %edi 10cb88: c9 leave 10cb89: c3 ret 00126740 : */ extern rtems_chain_control rtems_filesystem_mount_table_control; int statvfs (const char *path, struct statvfs *sb) { 126740: 55 push %ebp <== NOT EXECUTED 126741: 89 e5 mov %esp,%ebp <== NOT EXECUTED 126743: 57 push %edi <== NOT EXECUTED 126744: 56 push %esi <== NOT EXECUTED 126745: 53 push %ebx <== NOT EXECUTED 126746: 83 ec 38 sub $0x38,%esp <== NOT EXECUTED 126749: 8b 55 08 mov 0x8(%ebp),%edx <== NOT EXECUTED 12674c: 8b 75 0c mov 0xc(%ebp),%esi <== NOT EXECUTED * 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 ) ) 12674f: 31 c0 xor %eax,%eax <== NOT EXECUTED 126751: 83 c9 ff or $0xffffffff,%ecx <== NOT EXECUTED 126754: 89 d7 mov %edx,%edi <== NOT EXECUTED 126756: f2 ae repnz scas %es:(%edi),%al <== NOT EXECUTED 126758: f7 d1 not %ecx <== NOT EXECUTED 12675a: 49 dec %ecx <== NOT EXECUTED 12675b: 6a 01 push $0x1 <== NOT EXECUTED 12675d: 8d 5d d4 lea -0x2c(%ebp),%ebx <== NOT EXECUTED 126760: 53 push %ebx <== NOT EXECUTED 126761: 6a 00 push $0x0 <== NOT EXECUTED 126763: 51 push %ecx <== NOT EXECUTED 126764: 52 push %edx <== NOT EXECUTED 126765: e8 b2 4f fe ff call 10b71c <== NOT EXECUTED 12676a: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 12676d: 83 cf ff or $0xffffffff,%edi <== NOT EXECUTED 126770: 85 c0 test %eax,%eax <== NOT EXECUTED 126772: 75 4b jne 1267bf <== NOT EXECUTED return -1; mt_entry = loc.mt_entry; 126774: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED fs_mount_root = &mt_entry->mt_fs_root; 126777: 8b 4a 28 mov 0x28(%edx),%ecx <== NOT EXECUTED 12677a: 83 79 44 00 cmpl $0x0,0x44(%ecx) <== NOT EXECUTED 12677e: 75 0d jne 12678d <== NOT EXECUTED if ( !fs_mount_root->ops->statvfs_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 126780: e8 4b 1c 01 00 call 1383d0 <__errno> <== NOT EXECUTED 126785: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 12678b: eb 32 jmp 1267bf <== NOT EXECUTED memset (sb, 0, sizeof (struct statvfs)); 12678d: b9 0e 00 00 00 mov $0xe,%ecx <== NOT EXECUTED 126792: 89 f7 mov %esi,%edi <== NOT EXECUTED 126794: f3 ab rep stos %eax,%es:(%edi) <== NOT EXECUTED result = ( fs_mount_root->ops->statvfs_h )( fs_mount_root, sb ); 126796: 50 push %eax <== NOT EXECUTED 126797: 50 push %eax <== NOT EXECUTED 126798: 8b 42 28 mov 0x28(%edx),%eax <== NOT EXECUTED 12679b: 56 push %esi <== NOT EXECUTED 12679c: 83 c2 1c add $0x1c,%edx <== NOT EXECUTED 12679f: 52 push %edx <== NOT EXECUTED 1267a0: ff 50 44 call *0x44(%eax) <== NOT EXECUTED 1267a3: 89 c7 mov %eax,%edi <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 1267a5: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED 1267a8: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 1267ab: 85 c0 test %eax,%eax <== NOT EXECUTED 1267ad: 74 10 je 1267bf <== NOT EXECUTED 1267af: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 1267b2: 85 c0 test %eax,%eax <== NOT EXECUTED 1267b4: 74 09 je 1267bf <== NOT EXECUTED 1267b6: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1267b9: 53 push %ebx <== NOT EXECUTED 1267ba: ff d0 call *%eax <== NOT EXECUTED 1267bc: 83 c4 10 add $0x10,%esp <== NOT EXECUTED return result; } 1267bf: 89 f8 mov %edi,%eax <== NOT EXECUTED 1267c1: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 1267c4: 5b pop %ebx <== NOT EXECUTED 1267c5: 5e pop %esi <== NOT EXECUTED 1267c6: 5f pop %edi <== NOT EXECUTED 1267c7: c9 leave <== NOT EXECUTED 1267c8: c3 ret <== NOT EXECUTED 001267cc : int symlink( const char *actualpath, const char *sympath ) { 1267cc: 55 push %ebp 1267cd: 89 e5 mov %esp,%ebp 1267cf: 57 push %edi 1267d0: 56 push %esi 1267d1: 83 ec 20 sub $0x20,%esp 1267d4: 8b 45 0c mov 0xc(%ebp),%eax rtems_filesystem_location_info_t loc; int i; const char *name_start; int result; rtems_filesystem_get_start_loc( sympath, &i, &loc ); 1267d7: 8a 10 mov (%eax),%dl 1267d9: 80 fa 5c cmp $0x5c,%dl 1267dc: 74 09 je 1267e7 <== ALWAYS TAKEN 1267de: 80 fa 2f cmp $0x2f,%dl 1267e1: 74 04 je 1267e7 1267e3: 84 d2 test %dl,%dl 1267e5: 75 17 jne 1267fe <== NEVER TAKEN 1267e7: 8d 7d e0 lea -0x20(%ebp),%edi 1267ea: 8b 35 78 db 15 00 mov 0x15db78,%esi 1267f0: 83 c6 18 add $0x18,%esi 1267f3: b9 05 00 00 00 mov $0x5,%ecx 1267f8: f3 a5 rep movsl %ds:(%esi),%es:(%edi) 1267fa: b1 01 mov $0x1,%cl 1267fc: eb 13 jmp 126811 <== ALWAYS TAKEN 1267fe: 8d 7d e0 lea -0x20(%ebp),%edi 126801: 8b 35 78 db 15 00 mov 0x15db78,%esi 126807: 83 c6 04 add $0x4,%esi 12680a: b9 05 00 00 00 mov $0x5,%ecx 12680f: f3 a5 rep movsl %ds:(%esi),%es:(%edi) if ( !loc.ops->evalformake_h ) { 126811: 8b 55 ec mov -0x14(%ebp),%edx 126814: 8b 52 04 mov 0x4(%edx),%edx 126817: 85 d2 test %edx,%edx 126819: 74 32 je 12684d <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.ops->evalformake_h)( &sympath[i], &loc, &name_start ); 12681b: 56 push %esi 12681c: 8d 75 f4 lea -0xc(%ebp),%esi 12681f: 56 push %esi 126820: 8d 7d e0 lea -0x20(%ebp),%edi 126823: 57 push %edi 126824: 01 c8 add %ecx,%eax 126826: 50 push %eax 126827: ff d2 call *%edx if ( result != 0 ) 126829: 83 c4 10 add $0x10,%esp 12682c: 83 ce ff or $0xffffffff,%esi 12682f: 85 c0 test %eax,%eax 126831: 75 50 jne 126883 return -1; if ( !loc.ops->symlink_h ) { 126833: 8b 55 ec mov -0x14(%ebp),%edx 126836: 8b 42 38 mov 0x38(%edx),%eax 126839: 85 c0 test %eax,%eax 12683b: 75 20 jne 12685d <== NEVER TAKEN rtems_filesystem_freenode( &loc ); 12683d: 8b 42 1c mov 0x1c(%edx),%eax <== NOT EXECUTED 126840: 85 c0 test %eax,%eax <== NOT EXECUTED 126842: 74 09 je 12684d <== NOT EXECUTED 126844: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 126847: 57 push %edi <== NOT EXECUTED 126848: ff d0 call *%eax <== NOT EXECUTED 12684a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 12684d: e8 7e 1b 01 00 call 1383d0 <__errno> <== NOT EXECUTED 126852: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 126858: 83 ce ff or $0xffffffff,%esi <== NOT EXECUTED 12685b: eb 26 jmp 126883 <== NOT EXECUTED } result = (*loc.ops->symlink_h)( &loc, actualpath, name_start); 12685d: 52 push %edx 12685e: ff 75 f4 pushl -0xc(%ebp) 126861: ff 75 08 pushl 0x8(%ebp) 126864: 57 push %edi 126865: ff d0 call *%eax 126867: 89 c6 mov %eax,%esi rtems_filesystem_freenode( &loc ); 126869: 8b 45 ec mov -0x14(%ebp),%eax 12686c: 83 c4 10 add $0x10,%esp 12686f: 85 c0 test %eax,%eax 126871: 74 10 je 126883 <== ALWAYS TAKEN 126873: 8b 40 1c mov 0x1c(%eax),%eax 126876: 85 c0 test %eax,%eax 126878: 74 09 je 126883 <== ALWAYS TAKEN 12687a: 83 ec 0c sub $0xc,%esp 12687d: 57 push %edi 12687e: ff d0 call *%eax 126880: 83 c4 10 add $0x10,%esp return result; } 126883: 89 f0 mov %esi,%eax 126885: 8d 65 f8 lea -0x8(%ebp),%esp 126888: 5e pop %esi 126889: 5f pop %edi 12688a: c9 leave 12688b: c3 ret 00109268 : fdatasync(fn); } /* iterate over all FILE *'s for this thread */ static void sync_per_thread(Thread_Control *t) { 109268: 55 push %ebp 109269: 89 e5 mov %esp,%ebp 10926b: 53 push %ebx 10926c: 83 ec 04 sub $0x4,%esp 10926f: 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; 109272: 8b 88 ec 00 00 00 mov 0xec(%eax),%ecx if ( this_reent ) { 109278: 85 c9 test %ecx,%ecx 10927a: 74 32 je 1092ae <== ALWAYS TAKEN current_reent = _Thread_Executing->libc_reent; 10927c: 8b 15 30 67 12 00 mov 0x126730,%edx 109282: 8b 9a ec 00 00 00 mov 0xec(%edx),%ebx _Thread_Executing->libc_reent = this_reent; 109288: 89 8a ec 00 00 00 mov %ecx,0xec(%edx) _fwalk (t->libc_reent, sync_wrapper); 10928e: 52 push %edx 10928f: 52 push %edx 109290: 68 da 92 10 00 push $0x1092da 109295: ff b0 ec 00 00 00 pushl 0xec(%eax) 10929b: e8 78 9d 00 00 call 113018 <_fwalk> _Thread_Executing->libc_reent = current_reent; 1092a0: a1 30 67 12 00 mov 0x126730,%eax 1092a5: 89 98 ec 00 00 00 mov %ebx,0xec(%eax) 1092ab: 83 c4 10 add $0x10,%esp } } 1092ae: 8b 5d fc mov -0x4(%ebp),%ebx 1092b1: c9 leave 1092b2: c3 ret 0011371c : int tcsetattr( int fd, int opt, struct termios *tp ) { 11371c: 55 push %ebp 11371d: 89 e5 mov %esp,%ebp 11371f: 56 push %esi 113720: 53 push %ebx 113721: 8b 5d 08 mov 0x8(%ebp),%ebx 113724: 8b 45 0c mov 0xc(%ebp),%eax 113727: 8b 75 10 mov 0x10(%ebp),%esi switch (opt) { 11372a: 85 c0 test %eax,%eax 11372c: 74 22 je 113750 <== NEVER TAKEN 11372e: 48 dec %eax <== NOT EXECUTED 11372f: 74 0d je 11373e <== NOT EXECUTED default: rtems_set_errno_and_return_minus_one( ENOTSUP ); 113731: e8 66 33 00 00 call 116a9c <__errno> <== NOT EXECUTED 113736: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 11373c: eb 2a jmp 113768 <== NOT EXECUTED case TCSADRAIN: if (ioctl( fd, RTEMS_IO_TCDRAIN, NULL ) < 0) 11373e: 50 push %eax <== NOT EXECUTED 11373f: 6a 00 push $0x0 <== NOT EXECUTED 113741: 6a 03 push $0x3 <== NOT EXECUTED 113743: 53 push %ebx <== NOT EXECUTED 113744: e8 93 28 00 00 call 115fdc <== NOT EXECUTED 113749: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 11374c: 85 c0 test %eax,%eax <== NOT EXECUTED 11374e: 78 18 js 113768 <== NOT EXECUTED return -1; /* * Fall through to.... */ case TCSANOW: return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp ); 113750: 89 75 10 mov %esi,0x10(%ebp) 113753: c7 45 0c 02 00 00 00 movl $0x2,0xc(%ebp) 11375a: 89 5d 08 mov %ebx,0x8(%ebp) } } 11375d: 8d 65 f8 lea -0x8(%ebp),%esp 113760: 5b pop %ebx 113761: 5e pop %esi 113762: c9 leave return -1; /* * Fall through to.... */ case TCSANOW: return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp ); 113763: e9 74 28 00 00 jmp 115fdc } } 113768: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 11376b: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED 11376e: 5b pop %ebx <== NOT EXECUTED 11376f: 5e pop %esi <== NOT EXECUTED 113770: c9 leave <== NOT EXECUTED 113771: c3 ret <== NOT EXECUTED 0010ffe4 : #include int unlink( const char *path ) { 10ffe4: 55 push %ebp 10ffe5: 89 e5 mov %esp,%ebp 10ffe7: 57 push %edi 10ffe8: 56 push %esi 10ffe9: 53 push %ebx 10ffea: 83 ec 58 sub $0x58,%esp /* * Get the node to be unlinked. Find the parent path first. */ parentpathlen = rtems_filesystem_dirname ( path ); 10ffed: ff 75 08 pushl 0x8(%ebp) 10fff0: e8 a6 6f ff ff call 106f9b 10fff5: 89 c2 mov %eax,%edx if ( parentpathlen == 0 ) 10fff7: 83 c4 10 add $0x10,%esp 10fffa: 85 c0 test %eax,%eax 10fffc: 75 36 jne 110034 rtems_filesystem_get_start_loc( path, &i, &parentloc ); 10fffe: 8b 4d 08 mov 0x8(%ebp),%ecx 110001: 8a 01 mov (%ecx),%al 110003: 3c 5c cmp $0x5c,%al 110005: 74 08 je 11000f <== ALWAYS TAKEN 110007: 3c 2f cmp $0x2f,%al 110009: 74 04 je 11000f <== NEVER TAKEN 11000b: 84 c0 test %al,%al <== NOT EXECUTED 11000d: 75 0e jne 11001d <== NOT EXECUTED 11000f: 8d 7d d4 lea -0x2c(%ebp),%edi 110012: 8b 35 60 16 12 00 mov 0x121660,%esi 110018: 83 c6 18 add $0x18,%esi 11001b: eb 0c jmp 110029 <== ALWAYS TAKEN 11001d: 8d 7d d4 lea -0x2c(%ebp),%edi <== NOT EXECUTED 110020: 8b 35 60 16 12 00 mov 0x121660,%esi <== NOT EXECUTED 110026: 83 c6 04 add $0x4,%esi <== NOT EXECUTED 110029: b9 05 00 00 00 mov $0x5,%ecx 11002e: f3 a5 rep movsl %ds:(%esi),%es:(%edi) 110030: 31 db xor %ebx,%ebx 110032: eb 27 jmp 11005b <== ALWAYS TAKEN else { result = rtems_filesystem_evaluate_path( path, parentpathlen, 110034: 83 ec 0c sub $0xc,%esp 110037: 6a 00 push $0x0 110039: 8d 45 d4 lea -0x2c(%ebp),%eax 11003c: 50 push %eax 11003d: 6a 02 push $0x2 11003f: 52 push %edx 110040: ff 75 08 pushl 0x8(%ebp) 110043: 89 55 b4 mov %edx,-0x4c(%ebp) 110046: e8 3d 70 ff ff call 107088 RTEMS_LIBIO_PERMS_WRITE, &parentloc, false ); if ( result != 0 ) 11004b: 83 c4 20 add $0x20,%esp 11004e: 85 c0 test %eax,%eax 110050: 8b 55 b4 mov -0x4c(%ebp),%edx 110053: 0f 85 68 01 00 00 jne 1101c1 <== ALWAYS TAKEN 110059: b3 01 mov $0x1,%bl /* * Start from the parent to find the node that should be under it. */ loc = parentloc; 11005b: 8d 7d c0 lea -0x40(%ebp),%edi 11005e: 8d 75 d4 lea -0x2c(%ebp),%esi 110061: b9 05 00 00 00 mov $0x5,%ecx 110066: f3 a5 rep movsl %ds:(%esi),%es:(%edi) name = path + parentpathlen; 110068: 8b 75 08 mov 0x8(%ebp),%esi 11006b: 01 d6 add %edx,%esi name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 11006d: 83 c9 ff or $0xffffffff,%ecx 110070: 89 f7 mov %esi,%edi 110072: 31 c0 xor %eax,%eax 110074: f2 ae repnz scas %es:(%edi),%al 110076: f7 d1 not %ecx 110078: 49 dec %ecx 110079: 52 push %edx 11007a: 52 push %edx 11007b: 51 push %ecx 11007c: 56 push %esi 11007d: e8 f2 6e ff ff call 106f74 110082: 01 c6 add %eax,%esi result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 110084: 83 c9 ff or $0xffffffff,%ecx 110087: 89 f7 mov %esi,%edi 110089: 31 c0 xor %eax,%eax 11008b: f2 ae repnz scas %es:(%edi),%al 11008d: f7 d1 not %ecx 11008f: 49 dec %ecx 110090: c7 04 24 00 00 00 00 movl $0x0,(%esp) 110097: 8d 7d c0 lea -0x40(%ebp),%edi 11009a: 57 push %edi 11009b: 6a 00 push $0x0 11009d: 51 push %ecx 11009e: 56 push %esi 11009f: e8 2a 6f ff ff call 106fce 0, &loc, false ); if ( result != 0 ) { 1100a4: 83 c4 20 add $0x20,%esp 1100a7: 85 c0 test %eax,%eax 1100a9: 74 2f je 1100da if ( free_parentloc ) 1100ab: 84 db test %bl,%bl 1100ad: 0f 84 0e 01 00 00 je 1101c1 <== ALWAYS TAKEN rtems_filesystem_freenode( &parentloc ); 1100b3: 8b 45 e0 mov -0x20(%ebp),%eax 1100b6: 85 c0 test %eax,%eax 1100b8: 0f 84 03 01 00 00 je 1101c1 <== ALWAYS TAKEN 1100be: 8b 40 1c mov 0x1c(%eax),%eax 1100c1: 85 c0 test %eax,%eax 1100c3: 0f 84 f8 00 00 00 je 1101c1 <== ALWAYS TAKEN 1100c9: 83 ec 0c sub $0xc,%esp 1100cc: 8d 55 d4 lea -0x2c(%ebp),%edx 1100cf: 52 push %edx 1100d0: ff d0 call *%eax 1100d2: 83 ce ff or $0xffffffff,%esi 1100d5: e9 e2 00 00 00 jmp 1101bc <== ALWAYS TAKEN return -1; } if ( !loc.ops->node_type_h ) { 1100da: 8b 55 cc mov -0x34(%ebp),%edx 1100dd: 8b 42 10 mov 0x10(%edx),%eax 1100e0: 85 c0 test %eax,%eax 1100e2: 75 05 jne 1100e9 <== NEVER TAKEN rtems_filesystem_freenode( &loc ); 1100e4: 8b 42 1c mov 0x1c(%edx),%eax <== NOT EXECUTED 1100e7: eb 5b jmp 110144 <== NOT EXECUTED if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) { 1100e9: 83 ec 0c sub $0xc,%esp 1100ec: 57 push %edi 1100ed: ff d0 call *%eax 1100ef: 83 c4 10 add $0x10,%esp 1100f2: 48 dec %eax 1100f3: 8b 45 cc mov -0x34(%ebp),%eax 1100f6: 75 42 jne 11013a rtems_filesystem_freenode( &loc ); 1100f8: 85 c0 test %eax,%eax 1100fa: 74 10 je 11010c <== ALWAYS TAKEN 1100fc: 8b 40 1c mov 0x1c(%eax),%eax 1100ff: 85 c0 test %eax,%eax 110101: 74 09 je 11010c <== ALWAYS TAKEN 110103: 83 ec 0c sub $0xc,%esp 110106: 57 push %edi 110107: ff d0 call *%eax 110109: 83 c4 10 add $0x10,%esp if ( free_parentloc ) 11010c: 84 db test %bl,%bl 11010e: 74 1a je 11012a <== NEVER TAKEN rtems_filesystem_freenode( &parentloc ); 110110: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED 110113: 85 c0 test %eax,%eax <== NOT EXECUTED 110115: 74 13 je 11012a <== NOT EXECUTED 110117: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 11011a: 85 c0 test %eax,%eax <== NOT EXECUTED 11011c: 74 0c je 11012a <== NOT EXECUTED 11011e: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 110121: 8d 55 d4 lea -0x2c(%ebp),%edx <== NOT EXECUTED 110124: 52 push %edx <== NOT EXECUTED 110125: ff d0 call *%eax <== NOT EXECUTED 110127: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EISDIR ); 11012a: e8 21 01 00 00 call 110250 <__errno> 11012f: c7 00 15 00 00 00 movl $0x15,(%eax) 110135: e9 87 00 00 00 jmp 1101c1 <== ALWAYS TAKEN } if ( !loc.ops->unlink_h ) { 11013a: 8b 50 0c mov 0xc(%eax),%edx 11013d: 85 d2 test %edx,%edx 11013f: 75 3b jne 11017c <== NEVER TAKEN rtems_filesystem_freenode( &loc ); 110141: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 110144: 85 c0 test %eax,%eax <== NOT EXECUTED 110146: 74 09 je 110151 <== NOT EXECUTED 110148: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 11014b: 57 push %edi <== NOT EXECUTED 11014c: ff d0 call *%eax <== NOT EXECUTED 11014e: 83 c4 10 add $0x10,%esp <== NOT EXECUTED if ( free_parentloc ) 110151: 84 db test %bl,%bl <== NOT EXECUTED 110153: 74 1a je 11016f <== NOT EXECUTED rtems_filesystem_freenode( &parentloc ); 110155: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED 110158: 85 c0 test %eax,%eax <== NOT EXECUTED 11015a: 74 13 je 11016f <== NOT EXECUTED 11015c: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 11015f: 85 c0 test %eax,%eax <== NOT EXECUTED 110161: 74 0c je 11016f <== NOT EXECUTED 110163: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 110166: 8d 55 d4 lea -0x2c(%ebp),%edx <== NOT EXECUTED 110169: 52 push %edx <== NOT EXECUTED 11016a: ff d0 call *%eax <== NOT EXECUTED 11016c: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 11016f: e8 dc 00 00 00 call 110250 <__errno> <== NOT EXECUTED 110174: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 11017a: eb 45 jmp 1101c1 <== NOT EXECUTED } result = (*loc.ops->unlink_h)( &parentloc, &loc ); 11017c: 50 push %eax 11017d: 50 push %eax 11017e: 57 push %edi 11017f: 8d 45 d4 lea -0x2c(%ebp),%eax 110182: 50 push %eax 110183: ff d2 call *%edx 110185: 89 c6 mov %eax,%esi rtems_filesystem_freenode( &loc ); 110187: 8b 45 cc mov -0x34(%ebp),%eax 11018a: 83 c4 10 add $0x10,%esp 11018d: 85 c0 test %eax,%eax 11018f: 74 10 je 1101a1 <== ALWAYS TAKEN 110191: 8b 40 1c mov 0x1c(%eax),%eax 110194: 85 c0 test %eax,%eax 110196: 74 09 je 1101a1 <== ALWAYS TAKEN 110198: 83 ec 0c sub $0xc,%esp 11019b: 57 push %edi 11019c: ff d0 call *%eax 11019e: 83 c4 10 add $0x10,%esp if ( free_parentloc ) 1101a1: 84 db test %bl,%bl 1101a3: 74 1f je 1101c4 <== ALWAYS TAKEN rtems_filesystem_freenode( &parentloc ); 1101a5: 8b 45 e0 mov -0x20(%ebp),%eax 1101a8: 85 c0 test %eax,%eax 1101aa: 74 18 je 1101c4 <== ALWAYS TAKEN 1101ac: 8b 40 1c mov 0x1c(%eax),%eax 1101af: 85 c0 test %eax,%eax 1101b1: 74 11 je 1101c4 <== ALWAYS TAKEN 1101b3: 83 ec 0c sub $0xc,%esp 1101b6: 8d 55 d4 lea -0x2c(%ebp),%edx 1101b9: 52 push %edx 1101ba: ff d0 call *%eax 1101bc: 83 c4 10 add $0x10,%esp 1101bf: eb 03 jmp 1101c4 <== ALWAYS TAKEN 1101c1: 83 ce ff or $0xffffffff,%esi return result; } 1101c4: 89 f0 mov %esi,%eax 1101c6: 8d 65 f4 lea -0xc(%ebp),%esp 1101c9: 5b pop %ebx 1101ca: 5e pop %esi 1101cb: 5f pop %edi 1101cc: c9 leave 1101cd: c3 ret 0010e6f4 : */ int unmount( const char *path ) { 10e6f4: 55 push %ebp 10e6f5: 89 e5 mov %esp,%ebp 10e6f7: 57 push %edi 10e6f8: 56 push %esi 10e6f9: 53 push %ebx 10e6fa: 83 ec 38 sub $0x38,%esp 10e6fd: 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 ) ) 10e700: 31 c0 xor %eax,%eax 10e702: 83 c9 ff or $0xffffffff,%ecx 10e705: 89 d7 mov %edx,%edi 10e707: f2 ae repnz scas %es:(%edi),%al 10e709: f7 d1 not %ecx 10e70b: 49 dec %ecx 10e70c: 6a 01 push $0x1 10e70e: 8d 75 d4 lea -0x2c(%ebp),%esi 10e711: 56 push %esi 10e712: 6a 00 push $0x0 10e714: 51 push %ecx 10e715: 52 push %edx 10e716: e8 01 d0 ff ff call 10b71c 10e71b: 83 c4 20 add $0x20,%esp 10e71e: 85 c0 test %eax,%eax 10e720: 0f 85 0f 01 00 00 jne 10e835 return -1; mt_entry = loc.mt_entry; 10e726: 8b 5d e4 mov -0x1c(%ebp),%ebx fs_mount_loc = &mt_entry->mt_point_node; fs_root_loc = &mt_entry->mt_fs_root; 10e729: 8b 43 1c mov 0x1c(%ebx),%eax 10e72c: 3b 45 d4 cmp -0x2c(%ebp),%eax 10e72f: 8b 45 e0 mov -0x20(%ebp),%eax 10e732: 74 24 je 10e758 /* * Verify this is the root node for the file system to be unmounted. */ if ( !rtems_filesystem_nodes_equal( fs_root_loc, &loc) ){ rtems_filesystem_freenode( &loc ); 10e734: 85 c0 test %eax,%eax 10e736: 74 10 je 10e748 <== ALWAYS TAKEN 10e738: 8b 40 1c mov 0x1c(%eax),%eax 10e73b: 85 c0 test %eax,%eax 10e73d: 74 09 je 10e748 <== ALWAYS TAKEN 10e73f: 83 ec 0c sub $0xc,%esp 10e742: 56 push %esi 10e743: ff d0 call *%eax 10e745: 83 c4 10 add $0x10,%esp rtems_set_errno_and_return_minus_one( EACCES ); 10e748: e8 83 9c 02 00 call 1383d0 <__errno> 10e74d: c7 00 0d 00 00 00 movl $0xd,(%eax) 10e753: e9 dd 00 00 00 jmp 10e835 <== ALWAYS TAKEN /* * Free the loc node and just use the nodes from the mt_entry . */ rtems_filesystem_freenode( &loc ); 10e758: 85 c0 test %eax,%eax 10e75a: 74 10 je 10e76c <== ALWAYS TAKEN 10e75c: 8b 40 1c mov 0x1c(%eax),%eax 10e75f: 85 c0 test %eax,%eax 10e761: 74 09 je 10e76c <== ALWAYS TAKEN 10e763: 83 ec 0c sub $0xc,%esp 10e766: 56 push %esi 10e767: ff d0 call *%eax 10e769: 83 c4 10 add $0x10,%esp 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; 10e76c: 8b 43 14 mov 0x14(%ebx),%eax 10e76f: 83 78 28 00 cmpl $0x0,0x28(%eax) 10e773: 74 09 je 10e77e <== ALWAYS TAKEN fs_root_loc = &mt_entry->mt_fs_root; 10e775: 8b 43 28 mov 0x28(%ebx),%eax 10e778: 83 78 2c 00 cmpl $0x0,0x2c(%eax) 10e77c: 75 10 jne 10e78e <== NEVER TAKEN if ( !fs_mount_loc->ops->unmount_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( !fs_root_loc->ops->fsunmount_me_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 10e77e: e8 4d 9c 02 00 call 1383d0 <__errno> <== NOT EXECUTED 10e783: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 10e789: e9 a7 00 00 00 jmp 10e835 <== NOT EXECUTED * 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 ) 10e78e: a1 78 db 15 00 mov 0x15db78,%eax 10e793: 39 58 14 cmp %ebx,0x14(%eax) 10e796: 74 1d je 10e7b5 /* * Search the mount table for any mount entries referencing this * mount entry. */ for ( the_node = rtems_filesystem_mount_table_control.first; 10e798: a1 34 34 16 00 mov 0x163434,%eax 10e79d: eb 0a jmp 10e7a9 <== ALWAYS TAKEN 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; fs_root_loc = &mt_entry->mt_fs_root; 10e79f: 8b 50 18 mov 0x18(%eax),%edx 10e7a2: 3b 53 2c cmp 0x2c(%ebx),%edx 10e7a5: 74 0e je 10e7b5 * mount entry. */ for ( the_node = rtems_filesystem_mount_table_control.first; !rtems_chain_is_tail( &rtems_filesystem_mount_table_control, the_node ); the_node = the_node->next ) { 10e7a7: 8b 00 mov (%eax),%eax 10e7a9: 3d 38 34 16 00 cmp $0x163438,%eax 10e7ae: 75 ef jne 10e79f 10e7b0: e9 8b 00 00 00 jmp 10e840 <== ALWAYS TAKEN * descriptors that are currently active and reference nodes in the * file system that we are trying to unmount */ if ( rtems_libio_is_open_files_in_fs( mt_entry ) == 1 ) rtems_set_errno_and_return_minus_one( EBUSY ); 10e7b5: e8 16 9c 02 00 call 1383d0 <__errno> 10e7ba: c7 00 10 00 00 00 movl $0x10,(%eax) 10e7c0: eb 73 jmp 10e835 <== ALWAYS TAKEN * 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 ) 10e7c2: 83 ec 0c sub $0xc,%esp 10e7c5: 8b 43 14 mov 0x14(%ebx),%eax 10e7c8: 53 push %ebx 10e7c9: ff 50 28 call *0x28(%eax) 10e7cc: 83 c4 10 add $0x10,%esp 10e7cf: 85 c0 test %eax,%eax 10e7d1: 75 62 jne 10e835 <== ALWAYS 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){ 10e7d3: 83 ec 0c sub $0xc,%esp 10e7d6: 8b 43 28 mov 0x28(%ebx),%eax 10e7d9: 53 push %ebx 10e7da: ff 50 2c call *0x2c(%eax) 10e7dd: 83 c4 10 add $0x10,%esp 10e7e0: 85 c0 test %eax,%eax 10e7e2: 74 1b je 10e7ff <== NEVER TAKEN if (( fs_mount_loc->ops->mount_h )( mt_entry ) != 0 ) 10e7e4: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10e7e7: 8b 43 14 mov 0x14(%ebx),%eax <== NOT EXECUTED 10e7ea: 53 push %ebx <== NOT EXECUTED 10e7eb: ff 50 20 call *0x20(%eax) <== NOT EXECUTED 10e7ee: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10e7f1: 85 c0 test %eax,%eax <== NOT EXECUTED 10e7f3: 74 40 je 10e835 <== NOT EXECUTED rtems_fatal_error_occurred( 0 ); 10e7f5: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10e7f8: 6a 00 push $0x0 <== NOT EXECUTED 10e7fa: e8 59 12 00 00 call 10fa58 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 10e7ff: 83 ec 0c sub $0xc,%esp 10e802: 53 push %ebx 10e803: e8 d0 14 00 00 call 10fcd8 <_Chain_Extract> /* * 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 ); 10e808: 8b 43 14 mov 0x14(%ebx),%eax 10e80b: 83 c4 10 add $0x10,%esp 10e80e: 85 c0 test %eax,%eax 10e810: 74 13 je 10e825 <== ALWAYS TAKEN 10e812: 8b 40 1c mov 0x1c(%eax),%eax 10e815: 85 c0 test %eax,%eax 10e817: 74 0c je 10e825 <== ALWAYS TAKEN 10e819: 83 ec 0c sub $0xc,%esp 10e81c: 8d 53 08 lea 0x8(%ebx),%edx 10e81f: 52 push %edx 10e820: ff d0 call *%eax 10e822: 83 c4 10 add $0x10,%esp free( mt_entry ); 10e825: 83 ec 0c sub $0xc,%esp 10e828: 53 push %ebx 10e829: e8 96 cf ff ff call 10b7c4 10e82e: 31 c0 xor %eax,%eax return 0; 10e830: 83 c4 10 add $0x10,%esp 10e833: eb 03 jmp 10e838 <== ALWAYS TAKEN 10e835: 83 c8 ff or $0xffffffff,%eax } 10e838: 8d 65 f4 lea -0xc(%ebp),%esp 10e83b: 5b pop %ebx 10e83c: 5e pop %esi 10e83d: 5f pop %edi 10e83e: c9 leave 10e83f: c3 ret * 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 ) 10e840: 83 ec 0c sub $0xc,%esp 10e843: 53 push %ebx 10e844: e8 b1 d1 ff ff call 10b9fa 10e849: 83 c4 10 add $0x10,%esp 10e84c: 48 dec %eax 10e84d: 0f 85 6f ff ff ff jne 10e7c2 10e853: e9 5d ff ff ff jmp 10e7b5 <== ALWAYS TAKEN 00126924 : int utime( const char *path, const struct utimbuf *times ) { 126924: 55 push %ebp 126925: 89 e5 mov %esp,%ebp 126927: 57 push %edi 126928: 56 push %esi 126929: 53 push %ebx 12692a: 83 ec 38 sub $0x38,%esp 12692d: 8b 55 08 mov 0x8(%ebp),%edx 126930: 8b 5d 0c mov 0xc(%ebp),%ebx rtems_filesystem_location_info_t temp_loc; int result; if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x00, &temp_loc, true ) ) 126933: 31 c0 xor %eax,%eax 126935: 83 c9 ff or $0xffffffff,%ecx 126938: 89 d7 mov %edx,%edi 12693a: f2 ae repnz scas %es:(%edi),%al 12693c: f7 d1 not %ecx 12693e: 49 dec %ecx 12693f: 6a 01 push $0x1 126941: 8d 75 d4 lea -0x2c(%ebp),%esi 126944: 56 push %esi 126945: 6a 00 push $0x0 126947: 51 push %ecx 126948: 52 push %edx 126949: e8 ce 4d fe ff call 10b71c 12694e: 83 c4 20 add $0x20,%esp 126951: 83 cf ff or $0xffffffff,%edi 126954: 85 c0 test %eax,%eax 126956: 75 4f jne 1269a7 return -1; if ( !temp_loc.ops->utime_h ){ 126958: 8b 55 e0 mov -0x20(%ebp),%edx 12695b: 8b 42 30 mov 0x30(%edx),%eax 12695e: 85 c0 test %eax,%eax 126960: 75 20 jne 126982 <== NEVER TAKEN rtems_filesystem_freenode( &temp_loc ); 126962: 8b 42 1c mov 0x1c(%edx),%eax <== NOT EXECUTED 126965: 85 c0 test %eax,%eax <== NOT EXECUTED 126967: 74 09 je 126972 <== NOT EXECUTED 126969: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12696c: 56 push %esi <== NOT EXECUTED 12696d: ff d0 call *%eax <== NOT EXECUTED 12696f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 126972: e8 59 1a 01 00 call 1383d0 <__errno> <== NOT EXECUTED 126977: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 12697d: 83 cf ff or $0xffffffff,%edi <== NOT EXECUTED 126980: eb 25 jmp 1269a7 <== NOT EXECUTED } result = (*temp_loc.ops->utime_h)( &temp_loc, times->actime, times->modtime ); 126982: 52 push %edx 126983: ff 73 04 pushl 0x4(%ebx) 126986: ff 33 pushl (%ebx) 126988: 56 push %esi 126989: ff d0 call *%eax 12698b: 89 c7 mov %eax,%edi rtems_filesystem_freenode( &temp_loc ); 12698d: 8b 45 e0 mov -0x20(%ebp),%eax 126990: 83 c4 10 add $0x10,%esp 126993: 85 c0 test %eax,%eax 126995: 74 10 je 1269a7 <== ALWAYS TAKEN 126997: 8b 40 1c mov 0x1c(%eax),%eax 12699a: 85 c0 test %eax,%eax 12699c: 74 09 je 1269a7 <== ALWAYS TAKEN 12699e: 83 ec 0c sub $0xc,%esp 1269a1: 56 push %esi 1269a2: ff d0 call *%eax 1269a4: 83 c4 10 add $0x10,%esp return result; } 1269a7: 89 f8 mov %edi,%eax 1269a9: 8d 65 f4 lea -0xc(%ebp),%esp 1269ac: 5b pop %ebx 1269ad: 5e pop %esi 1269ae: 5f pop %edi 1269af: c9 leave 1269b0: c3 ret 00109668 : */ void vprintk( const char *fmt, va_list ap ) { 109668: 55 push %ebp 109669: 89 e5 mov %esp,%ebp 10966b: 57 push %edi 10966c: 56 push %esi 10966d: 53 push %ebx 10966e: 83 ec 4c sub $0x4c,%esp 109671: 8b 5d 08 mov 0x8(%ebp),%ebx 109674: 8b 75 0c mov 0xc(%ebp),%esi for (; *fmt != '\0'; fmt++) { 109677: e9 58 02 00 00 jmp 1098d4 <== ALWAYS TAKEN bool minus = false; bool sign = false; char lead = ' '; char c; if (*fmt != '%') { 10967c: 3c 25 cmp $0x25,%al 10967e: 74 0c je 10968c BSP_output_char(*fmt); 109680: 83 ec 0c sub $0xc,%esp 109683: 0f be c0 movsbl %al,%eax 109686: 50 push %eax 109687: e9 52 01 00 00 jmp 1097de <== ALWAYS TAKEN continue; } fmt++; 10968c: 43 inc %ebx if (*fmt == '0' ) { 10968d: c6 45 c4 20 movb $0x20,-0x3c(%ebp) 109691: 80 3b 30 cmpb $0x30,(%ebx) 109694: 75 05 jne 10969b lead = '0'; fmt++; 109696: 43 inc %ebx 109697: c6 45 c4 30 movb $0x30,-0x3c(%ebp) } if (*fmt == '-' ) { 10969b: 31 c9 xor %ecx,%ecx 10969d: 80 3b 2d cmpb $0x2d,(%ebx) 1096a0: 75 03 jne 1096a5 minus = true; fmt++; 1096a2: 43 inc %ebx 1096a3: b1 01 mov $0x1,%cl 1096a5: 31 ff xor %edi,%edi 1096a7: eb 0b jmp 1096b4 <== ALWAYS TAKEN } while (*fmt >= '0' && *fmt <= '9' ) { width *= 10; 1096a9: 6b ff 0a imul $0xa,%edi,%edi width += ((unsigned) *fmt - '0'); 1096ac: 0f be d2 movsbl %dl,%edx 1096af: 8d 7c 17 d0 lea -0x30(%edi,%edx,1),%edi fmt++; 1096b3: 43 inc %ebx } if (*fmt == '-' ) { minus = true; fmt++; } while (*fmt >= '0' && *fmt <= '9' ) { 1096b4: 8a 13 mov (%ebx),%dl 1096b6: 8d 42 d0 lea -0x30(%edx),%eax 1096b9: 3c 09 cmp $0x9,%al 1096bb: 76 ec jbe 1096a9 width *= 10; width += ((unsigned) *fmt - '0'); fmt++; } if ((c = *fmt) == 'l') { 1096bd: c6 45 c0 00 movb $0x0,-0x40(%ebp) 1096c1: 80 fa 6c cmp $0x6c,%dl 1096c4: 75 07 jne 1096cd lflag = true; c = *++fmt; 1096c6: 43 inc %ebx 1096c7: 8a 13 mov (%ebx),%dl 1096c9: c6 45 c0 01 movb $0x1,-0x40(%ebp) } if ( c == 'c' ) { 1096cd: 80 fa 63 cmp $0x63,%dl 1096d0: 75 17 jne 1096e9 /* need a cast here since va_arg() only takes fully promoted types */ char chr = (char) va_arg(ap, int); 1096d2: 8d 7e 04 lea 0x4(%esi),%edi BSP_output_char(chr); 1096d5: 83 ec 0c sub $0xc,%esp 1096d8: 0f be 06 movsbl (%esi),%eax 1096db: 50 push %eax 1096dc: ff 15 7c f9 11 00 call *0x11f97c 1096e2: 89 fe mov %edi,%esi 1096e4: e9 fb 00 00 00 jmp 1097e4 <== ALWAYS TAKEN continue; } if ( c == 's' ) { 1096e9: 80 fa 73 cmp $0x73,%dl 1096ec: 0f 85 99 00 00 00 jne 10978b unsigned i, len; char *s, *str; str = va_arg(ap, char *); 1096f2: 8d 46 04 lea 0x4(%esi),%eax 1096f5: 89 45 c4 mov %eax,-0x3c(%ebp) 1096f8: 8b 06 mov (%esi),%eax if ( str == NULL ) { 1096fa: 85 c0 test %eax,%eax 1096fc: 75 05 jne 109703 1096fe: b8 9d d4 11 00 mov $0x11d49d,%eax 109703: 31 f6 xor %esi,%esi str = ""; } /* calculate length of string */ for ( len=0, s=str ; *s ; len++, s++ ) 109705: eb 01 jmp 109708 <== ALWAYS TAKEN 109707: 46 inc %esi 109708: 80 3c 30 00 cmpb $0x0,(%eax,%esi,1) 10970c: 75 f9 jne 109707 ; /* leading spaces */ if ( !minus ) 10970e: 89 f2 mov %esi,%edx 109710: 84 c9 test %cl,%cl 109712: 74 23 je 109737 109714: eb 25 jmp 10973b <== ALWAYS TAKEN for ( i=len ; i BSP_output_char(' '); /* no width option */ if (width == 0) { 10973b: 85 ff test %edi,%edi 10973d: 75 02 jne 109741 10973f: 89 f7 mov %esi,%edi width = len; } /* output the string */ for ( i=0 ; i 109745: eb 1d jmp 109764 <== ALWAYS TAKEN BSP_output_char(*str); 109747: 83 ec 0c sub $0xc,%esp 10974a: 0f be d2 movsbl %dl,%edx 10974d: 52 push %edx 10974e: 89 45 b0 mov %eax,-0x50(%ebp) 109751: 88 4d ac mov %cl,-0x54(%ebp) 109754: ff 15 7c f9 11 00 call *0x11f97c if (width == 0) { width = len; } /* output the string */ for ( i=0 ; i BSP_output_char(*str); /* trailing spaces */ if ( minus ) 10976a: 84 c9 test %cl,%cl 10976c: 75 14 jne 109782 10976e: e9 5d 01 00 00 jmp 1098d0 <== ALWAYS TAKEN for ( i=len ; i 109786: e9 45 01 00 00 jmp 1098d0 <== ALWAYS TAKEN continue; } /* must be a numeric format or something unsupported */ if ( c == 'o' || c == 'O' ) { 10978b: 80 fa 4f cmp $0x4f,%dl 10978e: 74 5c je 1097ec 109790: 80 fa 6f cmp $0x6f,%dl 109793: 74 57 je 1097ec <== ALWAYS TAKEN base = 8; sign = false; } else if ( c == 'i' || c == 'I' || 109795: 80 fa 49 cmp $0x49,%dl 109798: 74 5b je 1097f5 10979a: 80 fa 69 cmp $0x69,%dl 10979d: 74 56 je 1097f5 10979f: 80 fa 44 cmp $0x44,%dl 1097a2: 74 51 je 1097f5 1097a4: 80 fa 64 cmp $0x64,%dl 1097a7: 74 4c je 1097f5 c == 'd' || c == 'D' ) { base = 10; sign = true; } else if ( c == 'u' || c == 'U' ) { 1097a9: 80 fa 55 cmp $0x55,%dl 1097ac: 74 05 je 1097b3 1097ae: 80 fa 75 cmp $0x75,%dl 1097b1: 75 04 jne 1097b7 1097b3: 31 d2 xor %edx,%edx 1097b5: eb 40 jmp 1097f7 <== ALWAYS TAKEN base = 10; sign = false; } else if ( c == 'x' || c == 'X' ) { 1097b7: 80 fa 58 cmp $0x58,%dl 1097ba: 74 05 je 1097c1 1097bc: 80 fa 78 cmp $0x78,%dl 1097bf: 75 04 jne 1097c5 1097c1: 31 d2 xor %edx,%edx 1097c3: eb 0b jmp 1097d0 <== ALWAYS TAKEN base = 16; sign = false; } else if ( c == 'p' ) { 1097c5: 80 fa 70 cmp $0x70,%dl 1097c8: 75 0d jne 1097d7 1097ca: 31 d2 xor %edx,%edx 1097cc: c6 45 c0 01 movb $0x1,-0x40(%ebp) 1097d0: b9 10 00 00 00 mov $0x10,%ecx 1097d5: eb 25 jmp 1097fc <== ALWAYS TAKEN base = 16; sign = false; lflag = true; } else { BSP_output_char(c); 1097d7: 83 ec 0c sub $0xc,%esp 1097da: 0f be d2 movsbl %dl,%edx 1097dd: 52 push %edx 1097de: ff 15 7c f9 11 00 call *0x11f97c continue; 1097e4: 83 c4 10 add $0x10,%esp 1097e7: e9 e7 00 00 00 jmp 1098d3 <== ALWAYS TAKEN 1097ec: 31 d2 xor %edx,%edx 1097ee: b9 08 00 00 00 mov $0x8,%ecx 1097f3: eb 07 jmp 1097fc <== ALWAYS TAKEN 1097f5: b2 01 mov $0x1,%dl 1097f7: b9 0a 00 00 00 mov $0xa,%ecx } printNum( 1097fc: 0f be 45 c4 movsbl -0x3c(%ebp),%eax 109800: 89 45 b4 mov %eax,-0x4c(%ebp) 109803: 8d 46 04 lea 0x4(%esi),%eax 109806: 89 45 c4 mov %eax,-0x3c(%ebp) 109809: 8b 06 mov (%esi),%eax 10980b: 8b 75 c4 mov -0x3c(%ebp),%esi unsigned long unsigned_num; unsigned long n; unsigned count; char toPrint[20]; if ( sign && (num < 0) ) { 10980e: 84 d2 test %dl,%dl 109810: 74 2b je 10983d 109812: 85 c0 test %eax,%eax 109814: 79 27 jns 10983d BSP_output_char('-'); 109816: 83 ec 0c sub $0xc,%esp 109819: 6a 2d push $0x2d 10981b: 89 45 b0 mov %eax,-0x50(%ebp) 10981e: 89 4d ac mov %ecx,-0x54(%ebp) 109821: ff 15 7c f9 11 00 call *0x11f97c unsigned_num = (unsigned long) -num; 109827: 8b 45 b0 mov -0x50(%ebp),%eax 10982a: f7 d8 neg %eax 10982c: 89 45 c4 mov %eax,-0x3c(%ebp) if (maxwidth) maxwidth--; 10982f: 83 c4 10 add $0x10,%esp 109832: 83 ff 01 cmp $0x1,%edi 109835: 83 d7 ff adc $0xffffffff,%edi 109838: 8b 4d ac mov -0x54(%ebp),%ecx 10983b: eb 03 jmp 109840 <== ALWAYS TAKEN } else { unsigned_num = (unsigned long) num; 10983d: 89 45 c4 mov %eax,-0x3c(%ebp) 109840: c7 45 c0 00 00 00 00 movl $0x0,-0x40(%ebp) 109847: eb 1f jmp 109868 <== ALWAYS TAKEN } count = 0; while ((n = unsigned_num / base) > 0) { toPrint[count++] = (char) (unsigned_num - (n * base)); 109849: 8a 45 bc mov -0x44(%ebp),%al 10984c: f6 e1 mul %cl 10984e: 8a 55 c4 mov -0x3c(%ebp),%dl 109851: 28 c2 sub %al,%dl 109853: 88 d0 mov %dl,%al 109855: 8b 55 c0 mov -0x40(%ebp),%edx 109858: 88 44 15 d4 mov %al,-0x2c(%ebp,%edx,1) 10985c: 8b 45 b8 mov -0x48(%ebp),%eax 10985f: 89 45 c0 mov %eax,-0x40(%ebp) 109862: 8b 55 bc mov -0x44(%ebp),%edx 109865: 89 55 c4 mov %edx,-0x3c(%ebp) } else { unsigned_num = (unsigned long) num; } count = 0; while ((n = unsigned_num / base) > 0) { 109868: 8b 45 c4 mov -0x3c(%ebp),%eax 10986b: 31 d2 xor %edx,%edx 10986d: f7 f1 div %ecx 10986f: 89 45 bc mov %eax,-0x44(%ebp) 109872: 85 c0 test %eax,%eax 109874: 8b 55 c0 mov -0x40(%ebp),%edx 109877: 8d 52 01 lea 0x1(%edx),%edx 10987a: 89 55 b8 mov %edx,-0x48(%ebp) 10987d: 75 ca jne 109849 toPrint[count++] = (char) (unsigned_num - (n * base)); unsigned_num = n; } toPrint[count++] = (char) unsigned_num; 10987f: 8a 45 c4 mov -0x3c(%ebp),%al 109882: 8b 55 c0 mov -0x40(%ebp),%edx 109885: 88 44 15 d4 mov %al,-0x2c(%ebp,%edx,1) 109889: eb 10 jmp 10989b <== ALWAYS TAKEN for (n=maxwidth ; n > count; n-- ) BSP_output_char(lead); 10988b: 83 ec 0c sub $0xc,%esp 10988e: ff 75 b4 pushl -0x4c(%ebp) 109891: ff 15 7c f9 11 00 call *0x11f97c toPrint[count++] = (char) (unsigned_num - (n * base)); unsigned_num = n; } toPrint[count++] = (char) unsigned_num; for (n=maxwidth ; n > count; n-- ) 109897: 4f dec %edi 109898: 83 c4 10 add $0x10,%esp 10989b: 3b 7d b8 cmp -0x48(%ebp),%edi 10989e: 77 eb ja 10988b 1098a0: 8d 45 d4 lea -0x2c(%ebp),%eax 1098a3: 03 45 c0 add -0x40(%ebp),%eax 1098a6: 31 ff xor %edi,%edi 1098a8: eb 1f jmp 1098c9 <== ALWAYS TAKEN BSP_output_char(lead); for (n = 0; n < count; n++) { BSP_output_char("0123456789ABCDEF"[(int)(toPrint[count-(n+1)])]); 1098aa: 83 ec 0c sub $0xc,%esp 1098ad: 0f be 10 movsbl (%eax),%edx 1098b0: 0f be 92 9e d4 11 00 movsbl 0x11d49e(%edx),%edx 1098b7: 52 push %edx 1098b8: 89 45 b0 mov %eax,-0x50(%ebp) 1098bb: ff 15 7c f9 11 00 call *0x11f97c toPrint[count++] = (char) unsigned_num; for (n=maxwidth ; n > count; n-- ) BSP_output_char(lead); for (n = 0; n < count; n++) { 1098c1: 47 inc %edi 1098c2: 8b 45 b0 mov -0x50(%ebp),%eax 1098c5: 48 dec %eax 1098c6: 83 c4 10 add $0x10,%esp 1098c9: 3b 7d b8 cmp -0x48(%ebp),%edi 1098cc: 72 dc jb 1098aa 1098ce: eb 03 jmp 1098d3 <== ALWAYS TAKEN 1098d0: 8b 75 c4 mov -0x3c(%ebp),%esi void vprintk( const char *fmt, va_list ap ) { for (; *fmt != '\0'; fmt++) { 1098d3: 43 inc %ebx 1098d4: 8a 03 mov (%ebx),%al 1098d6: 84 c0 test %al,%al 1098d8: 0f 85 9e fd ff ff jne 10967c sign, width, lead ); } } 1098de: 8d 65 f4 lea -0xc(%ebp),%esp 1098e1: 5b pop %ebx 1098e2: 5e pop %esi 1098e3: 5f pop %edi 1098e4: c9 leave 1098e5: c3 ret 0011b8fc : ssize_t write( int fd, const void *buffer, size_t count ) { 11b8fc: 55 push %ebp 11b8fd: 89 e5 mov %esp,%ebp 11b8ff: 56 push %esi 11b900: 53 push %ebx 11b901: 8b 5d 08 mov 0x8(%ebp),%ebx 11b904: 8b 55 0c mov 0xc(%ebp),%edx 11b907: 8b 4d 10 mov 0x10(%ebp),%ecx ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 11b90a: 3b 1d 64 f8 11 00 cmp 0x11f864,%ebx 11b910: 73 14 jae 11b926 <== ALWAYS TAKEN iop = rtems_libio_iop( fd ); 11b912: c1 e3 06 shl $0x6,%ebx 11b915: 03 1d 18 37 12 00 add 0x123718,%ebx rtems_libio_check_is_open( iop ); 11b91b: 8b 73 14 mov 0x14(%ebx),%esi 11b91e: f7 c6 00 01 00 00 test $0x100,%esi 11b924: 75 0d jne 11b933 <== NEVER TAKEN 11b926: e8 25 49 ff ff call 110250 <__errno> <== NOT EXECUTED 11b92b: c7 00 09 00 00 00 movl $0x9,(%eax) <== NOT EXECUTED 11b931: eb 31 jmp 11b964 <== NOT EXECUTED rtems_libio_check_buffer( buffer ); 11b933: 85 d2 test %edx,%edx 11b935: 74 0b je 11b942 <== ALWAYS TAKEN rtems_libio_check_count( count ); 11b937: 31 c0 xor %eax,%eax 11b939: 85 c9 test %ecx,%ecx 11b93b: 74 44 je 11b981 rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 11b93d: 83 e6 04 and $0x4,%esi 11b940: 75 0d jne 11b94f <== NEVER TAKEN 11b942: e8 09 49 ff ff call 110250 <__errno> <== NOT EXECUTED 11b947: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 11b94d: eb 15 jmp 11b964 <== NOT EXECUTED /* * Now process the write() request. */ if ( !iop->handlers->write_h ) 11b94f: 8b 43 3c mov 0x3c(%ebx),%eax 11b952: 8b 40 0c mov 0xc(%eax),%eax 11b955: 85 c0 test %eax,%eax 11b957: 75 10 jne 11b969 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); 11b959: e8 f2 48 ff ff call 110250 <__errno> <== NOT EXECUTED 11b95e: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 11b964: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 11b967: eb 18 jmp 11b981 <== NOT EXECUTED rc = (*iop->handlers->write_h)( iop, buffer, count ); 11b969: 56 push %esi 11b96a: 51 push %ecx 11b96b: 52 push %edx 11b96c: 53 push %ebx 11b96d: ff d0 call *%eax if ( rc > 0 ) 11b96f: 83 c4 10 add $0x10,%esp 11b972: 85 c0 test %eax,%eax 11b974: 7e 0b jle 11b981 <== ALWAYS TAKEN iop->offset += rc; 11b976: 89 c1 mov %eax,%ecx 11b978: c1 f9 1f sar $0x1f,%ecx 11b97b: 01 43 0c add %eax,0xc(%ebx) 11b97e: 11 4b 10 adc %ecx,0x10(%ebx) return rc; } 11b981: 8d 65 f8 lea -0x8(%ebp),%esp 11b984: 5b pop %ebx 11b985: 5e pop %esi 11b986: c9 leave 11b987: c3 ret 0010aaec : ssize_t writev( int fd, const struct iovec *iov, int iovcnt ) { 10aaec: 55 push %ebp 10aaed: 89 e5 mov %esp,%ebp 10aaef: 57 push %edi 10aaf0: 56 push %esi 10aaf1: 53 push %ebx 10aaf2: 83 ec 1c sub $0x1c,%esp 10aaf5: 8b 75 08 mov 0x8(%ebp),%esi 10aaf8: 8b 7d 0c mov 0xc(%ebp),%edi int bytes; rtems_libio_t *iop; ssize_t old; bool all_zeros; rtems_libio_check_fd( fd ); 10aafb: 3b 35 44 21 12 00 cmp 0x122144,%esi 10ab01: 73 11 jae 10ab14 <== ALWAYS TAKEN iop = rtems_libio_iop( fd ); 10ab03: c1 e6 06 shl $0x6,%esi 10ab06: 03 35 c8 67 12 00 add 0x1267c8,%esi rtems_libio_check_is_open( iop ); 10ab0c: 8b 46 14 mov 0x14(%esi),%eax 10ab0f: f6 c4 01 test $0x1,%ah 10ab12: 75 10 jne 10ab24 10ab14: e8 e3 74 00 00 call 111ffc <__errno> 10ab19: c7 00 09 00 00 00 movl $0x9,(%eax) 10ab1f: e9 a4 00 00 00 jmp 10abc8 <== ALWAYS TAKEN rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 10ab24: a8 04 test $0x4,%al 10ab26: 74 57 je 10ab7f <== ALWAYS TAKEN /* * Argument validation on IO vector */ if ( !iov ) 10ab28: 85 ff test %edi,%edi 10ab2a: 74 53 je 10ab7f rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt <= 0 ) 10ab2c: 83 7d 10 00 cmpl $0x0,0x10(%ebp) 10ab30: 7e 4d jle 10ab7f rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt > IOV_MAX ) 10ab32: 81 7d 10 00 04 00 00 cmpl $0x400,0x10(%ebp) 10ab39: 7f 44 jg 10ab7f <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); if ( !iop->handlers->write_h ) 10ab3b: 8b 46 3c mov 0x3c(%esi),%eax 10ab3e: 83 78 0c 00 cmpl $0x0,0xc(%eax) 10ab42: 75 0d jne 10ab51 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); 10ab44: e8 b3 74 00 00 call 111ffc <__errno> <== NOT EXECUTED 10ab49: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 10ab4f: eb 77 jmp 10abc8 <== NOT EXECUTED 10ab51: b2 01 mov $0x1,%dl 10ab53: 31 c0 xor %eax,%eax 10ab55: 31 c9 xor %ecx,%ecx 10ab57: 89 75 e4 mov %esi,-0x1c(%ebp) * entering the write loop. */ all_zeros = true; for ( old=0, total=0, v=0 ; v < iovcnt ; v++ ) { if ( !iov[v].iov_base ) 10ab5a: 83 3c c7 00 cmpl $0x0,(%edi,%eax,8) 10ab5e: 74 1f je 10ab7f rtems_set_errno_and_return_minus_one( EINVAL ); if ( iov[v].iov_len < 0 ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( iov[v].iov_len ) 10ab60: 83 7c c7 04 00 cmpl $0x0,0x4(%edi,%eax,8) 10ab65: 0f 94 c3 sete %bl 10ab68: f7 db neg %ebx 10ab6a: 21 da and %ebx,%edx all_zeros = false; /* check for wrap */ old = total; total += iov[v].iov_len; 10ab6c: 8b 74 c7 04 mov 0x4(%edi,%eax,8),%esi 10ab70: 8d 1c 31 lea (%ecx,%esi,1),%ebx if ( total < old || total > SSIZE_MAX ) 10ab73: 81 fb ff 7f 00 00 cmp $0x7fff,%ebx 10ab79: 7f 04 jg 10ab7f 10ab7b: 39 cb cmp %ecx,%ebx 10ab7d: 7d 0d jge 10ab8c rtems_set_errno_and_return_minus_one( EINVAL ); 10ab7f: e8 78 74 00 00 call 111ffc <__errno> 10ab84: c7 00 16 00 00 00 movl $0x16,(%eax) 10ab8a: eb 3c jmp 10abc8 <== ALWAYS TAKEN * this loop does that check as well and sets "all-zero" appropriately. * The variable "all_zero" is used as an early exit point before * entering the write loop. */ all_zeros = true; for ( old=0, total=0, v=0 ; v < iovcnt ; v++ ) { 10ab8c: 40 inc %eax 10ab8d: 3b 45 10 cmp 0x10(%ebp),%eax 10ab90: 7d 04 jge 10ab96 <== ALWAYS TAKEN 10ab92: 89 d9 mov %ebx,%ecx 10ab94: eb c4 jmp 10ab5a <== ALWAYS TAKEN 10ab96: 8b 75 e4 mov -0x1c(%ebp),%esi <== NOT EXECUTED } /* * A writev with all zeros is supposed to have no effect per OpenGroup. */ if ( all_zeros == true ) { 10ab99: 31 db xor %ebx,%ebx <== NOT EXECUTED 10ab9b: 84 d2 test %dl,%dl <== NOT EXECUTED 10ab9d: 75 51 jne 10abf0 <== NOT EXECUTED 10ab9f: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) <== NOT EXECUTED /* * Now process the writev(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { /* all zero lengths has no effect */ if ( iov[v].iov_len == 0 ) 10aba6: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED 10aba9: 8b 44 d7 04 mov 0x4(%edi,%edx,8),%eax <== NOT EXECUTED 10abad: 85 c0 test %eax,%eax <== NOT EXECUTED 10abaf: 74 34 je 10abe5 <== NOT EXECUTED continue; bytes = (*iop->handlers->write_h)( iop, iov[v].iov_base, iov[v].iov_len ); 10abb1: 52 push %edx <== NOT EXECUTED 10abb2: 8b 56 3c mov 0x3c(%esi),%edx <== NOT EXECUTED 10abb5: 50 push %eax <== NOT EXECUTED 10abb6: 8b 45 e4 mov -0x1c(%ebp),%eax <== NOT EXECUTED 10abb9: ff 34 c7 pushl (%edi,%eax,8) <== NOT EXECUTED 10abbc: 56 push %esi <== NOT EXECUTED 10abbd: ff 52 0c call *0xc(%edx) <== NOT EXECUTED if ( bytes < 0 ) 10abc0: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10abc3: 83 f8 00 cmp $0x0,%eax <== NOT EXECUTED 10abc6: 7d 05 jge 10abcd <== NOT EXECUTED 10abc8: 83 cb ff or $0xffffffff,%ebx 10abcb: eb 23 jmp 10abf0 <== ALWAYS TAKEN return -1; if ( bytes > 0 ) { 10abcd: 74 0d je 10abdc <== NOT EXECUTED iop->offset += bytes; 10abcf: 89 c1 mov %eax,%ecx <== NOT EXECUTED 10abd1: c1 f9 1f sar $0x1f,%ecx <== NOT EXECUTED 10abd4: 01 46 0c add %eax,0xc(%esi) <== NOT EXECUTED 10abd7: 11 4e 10 adc %ecx,0x10(%esi) <== NOT EXECUTED total += bytes; 10abda: 01 c3 add %eax,%ebx <== NOT EXECUTED } if (bytes != iov[ v ].iov_len) 10abdc: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED 10abdf: 3b 44 d7 04 cmp 0x4(%edi,%edx,8),%eax <== NOT EXECUTED 10abe3: 75 0b jne 10abf0 <== NOT EXECUTED } /* * Now process the writev(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { 10abe5: ff 45 e4 incl -0x1c(%ebp) <== NOT EXECUTED 10abe8: 8b 45 10 mov 0x10(%ebp),%eax <== NOT EXECUTED 10abeb: 39 45 e4 cmp %eax,-0x1c(%ebp) <== NOT EXECUTED 10abee: 7c b6 jl 10aba6 <== NOT EXECUTED if (bytes != iov[ v ].iov_len) break; } return total; } 10abf0: 89 d8 mov %ebx,%eax 10abf2: 8d 65 f4 lea -0xc(%ebp),%esp 10abf5: 5b pop %ebx 10abf6: 5e pop %esi 10abf7: 5f pop %edi 10abf8: c9 leave 10abf9: c3 ret