0010d020 : #define MAXSYMLINK 5 int IMFS_Set_handlers( rtems_filesystem_location_info_t *loc ) { 10d020: 55 push %ebp 10d021: 89 e5 mov %esp,%ebp 10d023: 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; 10d026: 8b 50 10 mov 0x10(%eax),%edx 10d029: 8b 52 34 mov 0x34(%edx),%edx switch( node->type ) { 10d02c: 8b 08 mov (%eax),%ecx 10d02e: 8b 49 4c mov 0x4c(%ecx),%ecx 10d031: 49 dec %ecx 10d032: 83 f9 06 cmp $0x6,%ecx 10d035: 77 2d ja 10d064 <== ALWAYS TAKEN 10d037: ff 24 8d 7c ea 11 00 jmp *0x11ea7c(,%ecx,4) case IMFS_DIRECTORY: loc->handlers = fs_info->directory_handlers; 10d03e: 8b 52 08 mov 0x8(%edx),%edx 10d041: eb 15 jmp 10d058 <== ALWAYS TAKEN break; case IMFS_DEVICE: loc->handlers = &IMFS_device_handlers; 10d043: c7 40 08 4c eb 11 00 movl $0x11eb4c,0x8(%eax) break; 10d04a: eb 18 jmp 10d064 <== ALWAYS TAKEN case IMFS_SYM_LINK: case IMFS_HARD_LINK: loc->handlers = &IMFS_link_handlers; 10d04c: c7 40 08 84 eb 11 00 movl $0x11eb84,0x8(%eax) break; 10d053: eb 0f jmp 10d064 <== ALWAYS TAKEN case IMFS_LINEAR_FILE: loc->handlers = fs_info->memfile_handlers; 10d055: 8b 52 04 mov 0x4(%edx),%edx 10d058: 89 50 08 mov %edx,0x8(%eax) break; 10d05b: eb 07 jmp 10d064 <== ALWAYS TAKEN case IMFS_MEMORY_FILE: loc->handlers = fs_info->memfile_handlers; break; case IMFS_FIFO: loc->handlers = &IMFS_fifo_handlers; 10d05d: c7 40 08 98 ea 11 00 movl $0x11ea98,0x8(%eax) break; } return 0; } 10d064: 31 c0 xor %eax,%eax 10d066: c9 leave 10d067: c3 ret 0010ffb4 : IMFS_jnode_t *IMFS_allocate_node( IMFS_jnode_types_t type, const char *name, mode_t mode ) { 10ffb4: 55 push %ebp 10ffb5: 89 e5 mov %esp,%ebp 10ffb7: 53 push %ebx 10ffb8: 83 ec 1c sub $0x1c,%esp struct timeval tv; /* * Allocate an IMFS jnode */ node = calloc( 1, sizeof( IMFS_jnode_t ) ); 10ffbb: 6a 64 push $0x64 10ffbd: 6a 01 push $0x1 10ffbf: e8 18 dc ff ff call 10dbdc 10ffc4: 89 c3 mov %eax,%ebx if ( !node ) 10ffc6: 83 c4 10 add $0x10,%esp 10ffc9: 85 c0 test %eax,%eax 10ffcb: 74 4f je 11001c <== ALWAYS TAKEN return NULL; /* * Fill in the basic information */ node->st_nlink = 1; 10ffcd: 66 c7 40 34 01 00 movw $0x1,0x34(%eax) node->type = type; 10ffd3: 8b 45 08 mov 0x8(%ebp),%eax 10ffd6: 89 43 4c mov %eax,0x4c(%ebx) strncpy( node->name, name, IMFS_NAME_MAX ); 10ffd9: 51 push %ecx 10ffda: 6a 20 push $0x20 10ffdc: ff 75 0c pushl 0xc(%ebp) 10ffdf: 8d 43 0c lea 0xc(%ebx),%eax 10ffe2: 50 push %eax 10ffe3: e8 70 21 00 00 call 112158 /* * Fill in the mode and permission information for the jnode structure. */ node->st_mode = mode; 10ffe8: 8b 45 10 mov 0x10(%ebp),%eax 10ffeb: 89 43 30 mov %eax,0x30(%ebx) #if defined(RTEMS_POSIX_API) node->st_uid = geteuid(); 10ffee: e8 69 dd ff ff call 10dd5c <== ALWAYS TAKEN 10fff3: 66 89 43 3c mov %ax,0x3c(%ebx) node->st_gid = getegid(); 10fff7: e8 50 dd ff ff call 10dd4c <== ALWAYS TAKEN 10fffc: 66 89 43 3e mov %ax,0x3e(%ebx) #endif /* * Now set all the times. */ gettimeofday( &tv, 0 ); 110000: 58 pop %eax 110001: 5a pop %edx 110002: 6a 00 push $0x0 110004: 8d 45 f0 lea -0x10(%ebp),%eax 110007: 50 push %eax 110008: e8 5f dd ff ff call 10dd6c node->stat_atime = (time_t) tv.tv_sec; 11000d: 8b 45 f0 mov -0x10(%ebp),%eax 110010: 89 43 40 mov %eax,0x40(%ebx) node->stat_mtime = (time_t) tv.tv_sec; 110013: 89 43 44 mov %eax,0x44(%ebx) node->stat_ctime = (time_t) tv.tv_sec; 110016: 89 43 48 mov %eax,0x48(%ebx) return node; 110019: 83 c4 10 add $0x10,%esp } 11001c: 89 d8 mov %ebx,%eax 11001e: 8b 5d fc mov -0x4(%ebp),%ebx 110021: c9 leave 110022: c3 ret 00111254 : int IMFS_chown( rtems_filesystem_location_info_t *pathloc, /* IN */ uid_t owner, /* IN */ gid_t group /* IN */ ) { 111254: 55 push %ebp 111255: 89 e5 mov %esp,%ebp 111257: 57 push %edi 111258: 56 push %esi 111259: 53 push %ebx 11125a: 83 ec 1c sub $0x1c,%esp 11125d: 8b 7d 0c mov 0xc(%ebp),%edi 111260: 8b 75 10 mov 0x10(%ebp),%esi IMFS_jnode_t *jnode; #if defined(RTEMS_POSIX_API) uid_t st_uid; #endif jnode = (IMFS_jnode_t *) pathloc->node_access; 111263: 8b 45 08 mov 0x8(%ebp),%eax 111266: 8b 18 mov (%eax),%ebx /* * Verify I am the owner of the node or the super user. */ #if defined(RTEMS_POSIX_API) st_uid = geteuid(); 111268: e8 f3 0d 00 00 call 112060 if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) ) 11126d: 66 85 c0 test %ax,%ax 111270: 74 16 je 111288 <== NEVER TAKEN 111272: 66 3b 43 3c cmp 0x3c(%ebx),%ax <== NOT EXECUTED 111276: 74 10 je 111288 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EPERM ); 111278: e8 43 49 00 00 call 115bc0 <__errno> <== NOT EXECUTED 11127d: c7 00 01 00 00 00 movl $0x1,(%eax) <== NOT EXECUTED 111283: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 111286: eb 20 jmp 1112a8 <== NOT EXECUTED #endif jnode->st_uid = owner; 111288: 66 89 7b 3c mov %di,0x3c(%ebx) jnode->st_gid = group; 11128c: 66 89 73 3e mov %si,0x3e(%ebx) IMFS_update_ctime( jnode ); 111290: 50 push %eax 111291: 50 push %eax 111292: 6a 00 push $0x0 111294: 8d 45 e0 lea -0x20(%ebp),%eax 111297: 50 push %eax 111298: e8 77 70 ff ff call 108314 11129d: 8b 45 e0 mov -0x20(%ebp),%eax 1112a0: 89 43 48 mov %eax,0x48(%ebx) 1112a3: 31 c0 xor %eax,%eax return 0; 1112a5: 83 c4 10 add $0x10,%esp } 1112a8: 8d 65 f4 lea -0xc(%ebp),%esp 1112ab: 5b pop %ebx 1112ac: 5e pop %esi 1112ad: 5f pop %edi 1112ae: c9 leave 1112af: c3 ret 00110056 : IMFS_jnode_types_t type, const char *name, mode_t mode, const IMFS_types_union *info ) { 110056: 55 push %ebp 110057: 89 e5 mov %esp,%ebp 110059: 57 push %edi 11005a: 56 push %esi 11005b: 53 push %ebx 11005c: 83 ec 1c sub $0x1c,%esp 11005f: 8b 75 08 mov 0x8(%ebp),%esi 110062: 8b 7d 0c mov 0xc(%ebp),%edi 110065: 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 ) 110068: 31 c0 xor %eax,%eax 11006a: 85 f6 test %esi,%esi 11006c: 0f 84 da 00 00 00 je 11014c <== ALWAYS TAKEN return NULL; /* * Allocate filesystem node and fill in basic information */ node = IMFS_allocate_node( type, name, mode & ~rtems_filesystem_umask ); 110072: 50 push %eax 110073: a1 40 1f 12 00 mov 0x121f40,%eax 110078: 8b 40 2c mov 0x2c(%eax),%eax 11007b: f7 d0 not %eax 11007d: 23 45 14 and 0x14(%ebp),%eax 110080: 50 push %eax 110081: ff 75 10 pushl 0x10(%ebp) 110084: 57 push %edi 110085: e8 2a ff ff ff call 10ffb4 <== ALWAYS TAKEN if ( !node ) 11008a: 83 c4 10 add $0x10,%esp 11008d: 85 c0 test %eax,%eax 11008f: 0f 84 b7 00 00 00 je 11014c <== ALWAYS TAKEN return NULL; /* * Set the type specific information */ switch (type) { 110095: 4f dec %edi 110096: 83 ff 06 cmp $0x6,%edi 110099: 77 73 ja 11010e <== ALWAYS TAKEN 11009b: ff 24 bd d8 ee 11 00 jmp *0x11eed8(,%edi,4) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 1100a2: 8d 50 54 lea 0x54(%eax),%edx 1100a5: 89 50 50 mov %edx,0x50(%eax) the_chain->permanent_null = NULL; 1100a8: c7 40 54 00 00 00 00 movl $0x0,0x54(%eax) the_chain->last = _Chain_Head(the_chain); 1100af: 8d 50 50 lea 0x50(%eax),%edx 1100b2: 89 50 58 mov %edx,0x58(%eax) 1100b5: eb 6d jmp 110124 <== 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; 1100b7: 8b 13 mov (%ebx),%edx 1100b9: 89 50 50 mov %edx,0x50(%eax) break; 1100bc: eb 66 jmp 110124 <== ALWAYS TAKEN case IMFS_DEVICE: node->info.device.major = info->device.major; 1100be: 8b 13 mov (%ebx),%edx 1100c0: 89 50 50 mov %edx,0x50(%eax) node->info.device.minor = info->device.minor; 1100c3: 8b 53 04 mov 0x4(%ebx),%edx 1100c6: 89 50 54 mov %edx,0x54(%eax) break; 1100c9: eb 59 jmp 110124 <== ALWAYS TAKEN case IMFS_LINEAR_FILE: node->info.linearfile.size = 0; 1100cb: c7 40 50 00 00 00 00 movl $0x0,0x50(%eax) <== NOT EXECUTED 1100d2: c7 40 54 00 00 00 00 movl $0x0,0x54(%eax) <== NOT EXECUTED node->info.linearfile.direct = 0; 1100d9: c7 40 58 00 00 00 00 movl $0x0,0x58(%eax) <== NOT EXECUTED case IMFS_MEMORY_FILE: node->info.file.size = 0; 1100e0: c7 40 50 00 00 00 00 movl $0x0,0x50(%eax) 1100e7: c7 40 54 00 00 00 00 movl $0x0,0x54(%eax) node->info.file.indirect = 0; 1100ee: c7 40 58 00 00 00 00 movl $0x0,0x58(%eax) node->info.file.doubly_indirect = 0; 1100f5: c7 40 5c 00 00 00 00 movl $0x0,0x5c(%eax) node->info.file.triply_indirect = 0; 1100fc: c7 40 60 00 00 00 00 movl $0x0,0x60(%eax) break; 110103: eb 1f jmp 110124 <== ALWAYS TAKEN case IMFS_FIFO: node->info.fifo.pipe = NULL; 110105: c7 40 50 00 00 00 00 movl $0x0,0x50(%eax) break; 11010c: eb 16 jmp 110124 <== ALWAYS TAKEN default: assert(0); 11010e: 68 4c df 11 00 push $0x11df4c <== NOT EXECUTED 110113: 68 f4 ee 11 00 push $0x11eef4 <== NOT EXECUTED 110118: 6a 5c push $0x5c <== NOT EXECUTED 11011a: 68 8c ee 11 00 push $0x11ee8c <== NOT EXECUTED 11011f: e8 1c 6d 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; 110124: 8b 16 mov (%esi),%edx fs_info = parent_loc->mt_entry->fs_info; 110126: 8b 4e 10 mov 0x10(%esi),%ecx 110129: 8b 59 34 mov 0x34(%ecx),%ebx node->Parent = parent; 11012c: 89 50 08 mov %edx,0x8(%eax) node->st_ino = ++fs_info->ino_count; 11012f: 8b 0b mov (%ebx),%ecx 110131: 41 inc %ecx 110132: 89 0b mov %ecx,(%ebx) 110134: 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 ); 110137: 53 push %ebx 110138: 53 push %ebx 110139: 50 push %eax 11013a: 83 c2 50 add $0x50,%edx 11013d: 52 push %edx 11013e: 89 45 e4 mov %eax,-0x1c(%ebp) 110141: e8 4a a6 ff ff call 10a790 <_Chain_Append> rtems_chain_append( &parent->info.directory.Entries, &node->Node ); return node; 110146: 83 c4 10 add $0x10,%esp 110149: 8b 45 e4 mov -0x1c(%ebp),%eax } 11014c: 8d 65 f4 lea -0xc(%ebp),%esp 11014f: 5b pop %ebx 110150: 5e pop %esi 110151: 5f pop %edi 110152: c9 leave 110153: c3 ret 00110023 : IMFS_jnode_t *IMFS_create_root_node(void) { 110023: 55 push %ebp 110024: 89 e5 mov %esp,%ebp 110026: 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) ); 110029: 68 ed 41 00 00 push $0x41ed 11002e: 68 1d e7 11 00 push $0x11e71d 110033: 6a 01 push $0x1 110035: e8 7a ff ff ff call 10ffb4 <== ALWAYS TAKEN if ( !node ) 11003a: 83 c4 10 add $0x10,%esp 11003d: 85 c0 test %eax,%eax 11003f: 74 13 je 110054 <== ALWAYS TAKEN */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 110041: 8d 50 54 lea 0x54(%eax),%edx 110044: 89 50 50 mov %edx,0x50(%eax) the_chain->permanent_null = NULL; 110047: c7 40 54 00 00 00 00 movl $0x0,0x54(%eax) the_chain->last = _Chain_Head(the_chain); 11004e: 8d 50 50 lea 0x50(%eax),%edx 110051: 89 50 58 mov %edx,0x58(%eax) * NOTE: Root node is always a directory. */ rtems_chain_initialize_empty(&node->info.directory.Entries); return node; } 110054: c9 leave 110055: 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 c0 88 12 00 mov 0x1288c0,%eax 1085ac: ff 70 08 pushl 0x8(%eax) 1085af: 68 37 37 12 00 push $0x123737 1085b4: e8 5b cc 00 00 call 115214 fprintf(stdout, "/\n" ); 1085b9: 5a pop %edx 1085ba: 59 pop %ecx 1085bb: a1 c0 88 12 00 mov 0x1288c0,%eax 1085c0: ff 70 08 pushl 0x8(%eax) 1085c3: 68 6c 37 12 00 push $0x12376c 1085c8: e8 47 cc 00 00 call 115214 IMFS_dump_directory( rtems_filesystem_root.node_access, 0 ); 1085cd: 59 pop %ecx 1085ce: 58 pop %eax 1085cf: 6a 00 push $0x0 1085d1: a1 e0 87 12 00 mov 0x1287e0,%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 c0 88 12 00 mov 0x1288c0,%eax 1085e5: ff 70 08 pushl 0x8(%eax) 1085e8: 68 6f 37 12 00 push $0x12376f 1085ed: e8 22 cc 00 00 call 115214 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 f3 36 12 00 push $0x1236f3 <== NOT EXECUTED 108503: 68 e0 37 12 00 push $0x1237e0 <== 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 01 37 12 00 push $0x123701 <== NOT EXECUTED 108518: 68 e0 37 12 00 push $0x1237e0 <== NOT EXECUTED 10851d: 68 86 00 00 00 push $0x86 <== NOT EXECUTED 108522: 68 47 36 12 00 push $0x123647 <== 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 0c 37 12 00 push $0x12370c <== NOT EXECUTED 108537: 68 e0 37 12 00 push $0x1237e0 <== 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 c0 88 12 00 mov 0x1288c0,%eax 10855d: ff 70 08 pushl 0x8(%eax) 108560: 68 32 37 12 00 push $0x123732 108565: e8 aa cc 00 00 call 115214 !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 0010d1ba : const char *pathname, /* IN */ int pathnamelen, /* IN */ int flags, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 10d1ba: 55 push %ebp 10d1bb: 89 e5 mov %esp,%ebp 10d1bd: 57 push %edi 10d1be: 56 push %esi 10d1bf: 53 push %ebx 10d1c0: 83 ec 5c sub $0x5c,%esp 10d1c3: 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; 10d1c6: 8b 3b mov (%ebx),%edi 10d1c8: be 01 00 00 00 mov $0x1,%esi 10d1cd: 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) ) { 10d1d4: e9 20 01 00 00 jmp 10d2f9 <== ALWAYS TAKEN type = IMFS_get_token( &pathname[i], pathnamelen, token, &len ); 10d1d9: 8d 45 e4 lea -0x1c(%ebp),%eax 10d1dc: 50 push %eax 10d1dd: 8d 4d af lea -0x51(%ebp),%ecx 10d1e0: 51 push %ecx 10d1e1: ff 75 0c pushl 0xc(%ebp) 10d1e4: 8b 45 08 mov 0x8(%ebp),%eax 10d1e7: 03 45 a4 add -0x5c(%ebp),%eax 10d1ea: 50 push %eax 10d1eb: e8 a8 06 00 00 call 10d898 <== ALWAYS TAKEN 10d1f0: 89 c6 mov %eax,%esi pathnamelen -= len; 10d1f2: 8b 55 e4 mov -0x1c(%ebp),%edx i += len; if ( !pathloc->node_access ) 10d1f5: 83 c4 10 add $0x10,%esp 10d1f8: 83 3b 00 cmpl $0x0,(%ebx) 10d1fb: 0f 84 d4 00 00 00 je 10d2d5 <== 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 ) 10d201: 85 c0 test %eax,%eax 10d203: 74 21 je 10d226 if ( node->type == IMFS_DIRECTORY ) 10d205: 83 7f 4c 01 cmpl $0x1,0x4c(%edi) 10d209: 75 1b jne 10d226 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) 10d20b: 50 push %eax 10d20c: 50 push %eax 10d20d: 6a 01 push $0x1 10d20f: 53 push %ebx 10d210: 89 55 a0 mov %edx,-0x60(%ebp) 10d213: e8 50 fe ff ff call 10d068 <== ALWAYS TAKEN 10d218: 83 c4 10 add $0x10,%esp 10d21b: 85 c0 test %eax,%eax 10d21d: 8b 55 a0 mov -0x60(%ebp),%edx 10d220: 0f 84 44 01 00 00 je 10d36a */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { type = IMFS_get_token( &pathname[i], pathnamelen, token, &len ); pathnamelen -= len; 10d226: 29 55 0c sub %edx,0xc(%ebp) i += len; 10d229: 01 55 a4 add %edx,-0x5c(%ebp) if ( type != IMFS_NO_MORE_PATH ) if ( node->type == IMFS_DIRECTORY ) if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; 10d22c: 8b 3b mov (%ebx),%edi switch( type ) { 10d22e: 83 fe 03 cmp $0x3,%esi 10d231: 74 34 je 10d267 10d233: 83 fe 04 cmp $0x4,%esi 10d236: 0f 84 b0 00 00 00 je 10d2ec 10d23c: 83 fe 02 cmp $0x2,%esi 10d23f: 0f 85 b4 00 00 00 jne 10d2f9 case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) 10d245: a1 40 1f 12 00 mov 0x121f40,%eax 10d24a: 3b 78 18 cmp 0x18(%eax),%edi 10d24d: 74 8a je 10d1d9 /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == pathloc->mt_entry->mt_fs_root.node_access) { 10d24f: 8b 73 10 mov 0x10(%ebx),%esi /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == 10d252: 3b 7e 1c cmp 0x1c(%esi),%edi 10d255: 75 0b jne 10d262 */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; /* Throw out the .. in this case */ } else { newloc = pathloc->mt_entry->mt_point_node; 10d257: 8d 7d d0 lea -0x30(%ebp),%edi 10d25a: 83 c6 08 add $0x8,%esi 10d25d: e9 b7 00 00 00 jmp 10d319 <== ALWAYS TAKEN pathnamelen+len, flags,pathloc); } } else { if ( !node->Parent ) 10d262: 8b 7f 08 mov 0x8(%edi),%edi 10d265: eb 6a jmp 10d2d1 <== ALWAYS TAKEN case IMFS_NAME: /* * If we are at a link follow it. */ if ( node->type == IMFS_HARD_LINK ) { 10d267: 8b 47 4c mov 0x4c(%edi),%eax 10d26a: 83 f8 03 cmp $0x3,%eax 10d26d: 75 15 jne 10d284 IMFS_evaluate_hard_link( pathloc, 0 ); 10d26f: 57 push %edi 10d270: 57 push %edi 10d271: 6a 00 push $0x0 10d273: 53 push %ebx 10d274: e8 3d fe ff ff call 10d0b6 <== ALWAYS TAKEN node = pathloc->node_access; 10d279: 8b 3b mov (%ebx),%edi if ( !node ) 10d27b: 83 c4 10 add $0x10,%esp 10d27e: 85 ff test %edi,%edi 10d280: 75 21 jne 10d2a3 <== NEVER TAKEN 10d282: eb 25 jmp 10d2a9 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTDIR ); } else if ( node->type == IMFS_SYM_LINK ) { 10d284: 83 f8 04 cmp $0x4,%eax 10d287: 75 1a jne 10d2a3 result = IMFS_evaluate_sym_link( pathloc, 0 ); 10d289: 56 push %esi 10d28a: 56 push %esi 10d28b: 6a 00 push $0x0 10d28d: 53 push %ebx 10d28e: e8 79 fe ff ff call 10d10c <== ALWAYS TAKEN 10d293: 89 c6 mov %eax,%esi node = pathloc->node_access; 10d295: 8b 3b mov (%ebx),%edi if ( result == -1 ) 10d297: 83 c4 10 add $0x10,%esp 10d29a: 83 f8 ff cmp $0xffffffff,%eax 10d29d: 0f 84 d5 00 00 00 je 10d378 <== ALWAYS TAKEN /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) 10d2a3: 83 7f 4c 01 cmpl $0x1,0x4c(%edi) 10d2a7: 74 10 je 10d2b9 rtems_set_errno_and_return_minus_one( ENOTDIR ); 10d2a9: e8 16 42 00 00 call 1114c4 <__errno> 10d2ae: c7 00 14 00 00 00 movl $0x14,(%eax) 10d2b4: e9 bc 00 00 00 jmp 10d375 <== 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 ) { 10d2b9: 8b 77 5c mov 0x5c(%edi),%esi 10d2bc: 85 f6 test %esi,%esi 10d2be: 75 53 jne 10d313 /* * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); 10d2c0: 51 push %ecx 10d2c1: 51 push %ecx 10d2c2: 8d 45 af lea -0x51(%ebp),%eax 10d2c5: 50 push %eax 10d2c6: 57 push %edi 10d2c7: e8 40 05 00 00 call 10d80c <== ALWAYS TAKEN 10d2cc: 89 c7 mov %eax,%edi if ( !node ) 10d2ce: 83 c4 10 add $0x10,%esp 10d2d1: 85 ff test %edi,%edi 10d2d3: 75 10 jne 10d2e5 rtems_set_errno_and_return_minus_one( ENOENT ); 10d2d5: e8 ea 41 00 00 call 1114c4 <__errno> 10d2da: c7 00 02 00 00 00 movl $0x2,(%eax) 10d2e0: e9 90 00 00 00 jmp 10d375 <== ALWAYS TAKEN /* * Set the node access to the point we have found. */ pathloc->node_access = node; 10d2e5: 89 3b mov %edi,(%ebx) 10d2e7: e9 ed fe ff ff jmp 10d1d9 <== ALWAYS TAKEN case IMFS_NO_MORE_PATH: case IMFS_CURRENT_DIR: break; case IMFS_INVALID_TOKEN: rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); 10d2ec: e8 d3 41 00 00 call 1114c4 <__errno> 10d2f1: c7 00 5b 00 00 00 movl $0x5b,(%eax) 10d2f7: eb 7c jmp 10d375 <== ALWAYS TAKEN /* * Evaluate all tokens until we are done or an error occurs. */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { 10d2f9: 83 fe 04 cmp $0x4,%esi 10d2fc: 74 08 je 10d306 <== ALWAYS TAKEN 10d2fe: 85 f6 test %esi,%esi 10d300: 0f 85 d3 fe ff ff jne 10d1d9 * 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 ) { 10d306: 83 7f 4c 01 cmpl $0x1,0x4c(%edi) 10d30a: 75 41 jne 10d34d if ( node->info.directory.mt_fs != NULL ) { 10d30c: 8b 77 5c mov 0x5c(%edi),%esi 10d30f: 85 f6 test %esi,%esi 10d311: 74 3a je 10d34d newloc = node->info.directory.mt_fs->mt_fs_root; 10d313: 8d 7d d0 lea -0x30(%ebp),%edi 10d316: 83 c6 1c add $0x1c,%esi 10d319: b9 05 00 00 00 mov $0x5,%ecx 10d31e: f3 a5 rep movsl %ds:(%esi),%es:(%edi) *pathloc = newloc; 10d320: 8d 75 d0 lea -0x30(%ebp),%esi 10d323: b1 05 mov $0x5,%cl 10d325: 89 df mov %ebx,%edi 10d327: f3 a5 rep movsl %ds:(%esi),%es:(%edi) return (*pathloc->ops->evalpath_h)( &pathname[i-len], 10d329: 8b 45 e4 mov -0x1c(%ebp),%eax 10d32c: 8b 53 0c mov 0xc(%ebx),%edx 10d32f: 53 push %ebx 10d330: ff 75 10 pushl 0x10(%ebp) 10d333: 8b 4d 0c mov 0xc(%ebp),%ecx 10d336: 01 c1 add %eax,%ecx 10d338: 51 push %ecx 10d339: 8b 4d a4 mov -0x5c(%ebp),%ecx 10d33c: 29 c1 sub %eax,%ecx 10d33e: 8b 45 08 mov 0x8(%ebp),%eax 10d341: 01 c8 add %ecx,%eax 10d343: 50 push %eax 10d344: ff 12 call *(%edx) 10d346: 89 c6 mov %eax,%esi 10d348: 83 c4 10 add $0x10,%esp 10d34b: eb 2b jmp 10d378 <== ALWAYS TAKEN flags, pathloc ); } else { result = IMFS_Set_handlers( pathloc ); } } else { result = IMFS_Set_handlers( pathloc ); 10d34d: 83 ec 0c sub $0xc,%esp 10d350: 53 push %ebx 10d351: e8 ca fc ff ff call 10d020 <== ALWAYS TAKEN 10d356: 89 c6 mov %eax,%esi 10d358: 58 pop %eax 10d359: 5a pop %edx /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( pathloc, flags ) ) 10d35a: ff 75 10 pushl 0x10(%ebp) 10d35d: 53 push %ebx 10d35e: e8 05 fd ff ff call 10d068 <== ALWAYS TAKEN 10d363: 83 c4 10 add $0x10,%esp 10d366: 85 c0 test %eax,%eax 10d368: 75 0e jne 10d378 rtems_set_errno_and_return_minus_one( EACCES ); 10d36a: e8 55 41 00 00 call 1114c4 <__errno> 10d36f: c7 00 0d 00 00 00 movl $0xd,(%eax) 10d375: 83 ce ff or $0xffffffff,%esi return result; } 10d378: 89 f0 mov %esi,%eax 10d37a: 8d 65 f4 lea -0xc(%ebp),%esp 10d37d: 5b pop %ebx 10d37e: 5e pop %esi 10d37f: 5f pop %edi 10d380: c9 leave 10d381: c3 ret 0010d405 : int IMFS_evaluate_for_make( const char *path, /* IN */ rtems_filesystem_location_info_t *pathloc, /* IN/OUT */ const char **name /* OUT */ ) { 10d405: 55 push %ebp 10d406: 89 e5 mov %esp,%ebp 10d408: 57 push %edi 10d409: 56 push %esi 10d40a: 53 push %ebx 10d40b: 83 ec 5c sub $0x5c,%esp 10d40e: 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; 10d411: 8b 1a mov (%edx),%ebx /* * Get the path length. */ pathlen = strlen( path ); 10d413: 31 c0 xor %eax,%eax 10d415: 83 c9 ff or $0xffffffff,%ecx 10d418: 8b 7d 08 mov 0x8(%ebp),%edi 10d41b: f2 ae repnz scas %es:(%edi),%al 10d41d: f7 d1 not %ecx 10d41f: 49 dec %ecx 10d420: 89 4d a0 mov %ecx,-0x60(%ebp) 10d423: 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 ); 10d42a: 8d 7d af lea -0x51(%ebp),%edi 10d42d: 89 d6 mov %edx,%esi 10d42f: 8d 45 e4 lea -0x1c(%ebp),%eax 10d432: 50 push %eax 10d433: 57 push %edi 10d434: ff 75 a0 pushl -0x60(%ebp) 10d437: 8b 45 08 mov 0x8(%ebp),%eax 10d43a: 03 45 a4 add -0x5c(%ebp),%eax 10d43d: 50 push %eax 10d43e: e8 55 04 00 00 call 10d898 <== ALWAYS TAKEN 10d443: 89 c2 mov %eax,%edx pathlen -= len; 10d445: 8b 4d e4 mov -0x1c(%ebp),%ecx 10d448: 29 4d a0 sub %ecx,-0x60(%ebp) i += len; if ( !pathloc->node_access ) 10d44b: 83 c4 10 add $0x10,%esp 10d44e: 83 3e 00 cmpl $0x0,(%esi) 10d451: 0f 84 6a 01 00 00 je 10d5c1 <== ALWAYS TAKEN /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) 10d457: 85 c0 test %eax,%eax 10d459: 74 36 je 10d491 if ( node->type == IMFS_DIRECTORY ) 10d45b: 83 7b 4c 01 cmpl $0x1,0x4c(%ebx) 10d45f: 75 30 jne 10d491 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) 10d461: 50 push %eax 10d462: 50 push %eax 10d463: 6a 01 push $0x1 10d465: 56 push %esi 10d466: 89 55 9c mov %edx,-0x64(%ebp) 10d469: 89 4d 98 mov %ecx,-0x68(%ebp) 10d46c: e8 f7 fb ff ff call 10d068 <== ALWAYS TAKEN 10d471: 83 c4 10 add $0x10,%esp 10d474: 85 c0 test %eax,%eax 10d476: 8b 55 9c mov -0x64(%ebp),%edx 10d479: 8b 4d 98 mov -0x68(%ebp),%ecx 10d47c: 75 13 jne 10d491 rtems_set_errno_and_return_minus_one( EACCES ); 10d47e: e8 41 40 00 00 call 1114c4 <__errno> 10d483: c7 00 0d 00 00 00 movl $0xd,(%eax) 10d489: 83 cb ff or $0xffffffff,%ebx 10d48c: e9 8a 01 00 00 jmp 10d61b <== ALWAYS TAKEN while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); pathlen -= len; i += len; 10d491: 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; 10d494: 8b 1e mov (%esi),%ebx switch( type ) { 10d496: 83 fa 02 cmp $0x2,%edx 10d499: 74 1f je 10d4ba 10d49b: 77 0a ja 10d4a7 10d49d: 85 d2 test %edx,%edx 10d49f: 0f 84 d9 00 00 00 je 10d57e 10d4a5: eb 88 jmp 10d42f <== ALWAYS TAKEN 10d4a7: 83 fa 03 cmp $0x3,%edx 10d4aa: 74 40 je 10d4ec 10d4ac: 83 fa 04 cmp $0x4,%edx 10d4af: 0f 85 7a ff ff ff jne 10d42f <== ALWAYS TAKEN 10d4b5: e9 d4 00 00 00 jmp 10d58e <== 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 ) 10d4ba: a1 40 1f 12 00 mov 0x121f40,%eax 10d4bf: 3b 58 18 cmp 0x18(%eax),%ebx 10d4c2: 0f 84 67 ff ff ff je 10d42f /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == pathloc->mt_entry->mt_fs_root.node_access){ 10d4c8: 8b 46 10 mov 0x10(%esi),%eax 10d4cb: 3b 58 1c cmp 0x1c(%eax),%ebx 10d4ce: 75 0c jne 10d4dc 10d4d0: 89 f2 mov %esi,%edx 10d4d2: 89 c6 mov %eax,%esi if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; } else { newloc = pathloc->mt_entry->mt_point_node; 10d4d4: 8d 7d d0 lea -0x30(%ebp),%edi 10d4d7: 83 c6 08 add $0x8,%esi 10d4da: eb 5a jmp 10d536 <== ALWAYS TAKEN *pathloc = newloc; return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); } } else { if ( !node->Parent ) 10d4dc: 8b 5b 08 mov 0x8(%ebx),%ebx 10d4df: 85 db test %ebx,%ebx 10d4e1: 0f 85 90 00 00 00 jne 10d577 10d4e7: e9 d5 00 00 00 jmp 10d5c1 <== ALWAYS TAKEN pathloc->node_access = node; break; case IMFS_NAME: if ( node->type == IMFS_HARD_LINK ) { 10d4ec: 8b 43 4c mov 0x4c(%ebx),%eax 10d4ef: 83 f8 03 cmp $0x3,%eax 10d4f2: 74 05 je 10d4f9 result = IMFS_evaluate_link( pathloc, 0 ); if ( result == -1 ) return -1; } else if ( node->type == IMFS_SYM_LINK ) { 10d4f4: 83 f8 04 cmp $0x4,%eax 10d4f7: 75 16 jne 10d50f result = IMFS_evaluate_link( pathloc, 0 ); 10d4f9: 53 push %ebx 10d4fa: 53 push %ebx 10d4fb: 6a 00 push $0x0 10d4fd: 56 push %esi 10d4fe: e8 7f fe ff ff call 10d382 <== ALWAYS TAKEN if ( result == -1 ) 10d503: 83 c4 10 add $0x10,%esp 10d506: 83 f8 ff cmp $0xffffffff,%eax 10d509: 0f 84 0a 01 00 00 je 10d619 <== ALWAYS TAKEN return -1; } node = pathloc->node_access; 10d50f: 8b 06 mov (%esi),%eax if ( !node ) 10d511: 85 c0 test %eax,%eax 10d513: 0f 84 da 00 00 00 je 10d5f3 <== ALWAYS TAKEN /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) 10d519: 83 78 4c 01 cmpl $0x1,0x4c(%eax) 10d51d: 0f 85 d0 00 00 00 jne 10d5f3 /* * 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 ) { 10d523: 8b 50 5c mov 0x5c(%eax),%edx 10d526: 85 d2 test %edx,%edx 10d528: 74 3b je 10d565 10d52a: 89 f0 mov %esi,%eax 10d52c: 89 d6 mov %edx,%esi 10d52e: 89 c2 mov %eax,%edx newloc = node->info.directory.mt_fs->mt_fs_root; 10d530: 8d 7d d0 lea -0x30(%ebp),%edi 10d533: 83 c6 1c add $0x1c,%esi 10d536: b9 05 00 00 00 mov $0x5,%ecx 10d53b: f3 a5 rep movsl %ds:(%esi),%es:(%edi) *pathloc = newloc; 10d53d: 8d 75 d0 lea -0x30(%ebp),%esi 10d540: b1 05 mov $0x5,%cl 10d542: 89 d7 mov %edx,%edi 10d544: f3 a5 rep movsl %ds:(%esi),%es:(%edi) return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); 10d546: 51 push %ecx 10d547: 8b 42 0c mov 0xc(%edx),%eax 10d54a: ff 75 10 pushl 0x10(%ebp) 10d54d: 52 push %edx 10d54e: 8b 55 a4 mov -0x5c(%ebp),%edx 10d551: 2b 55 e4 sub -0x1c(%ebp),%edx 10d554: 03 55 08 add 0x8(%ebp),%edx 10d557: 52 push %edx 10d558: ff 50 04 call *0x4(%eax) 10d55b: 89 c3 mov %eax,%ebx 10d55d: 83 c4 10 add $0x10,%esp 10d560: e9 b6 00 00 00 jmp 10d61b <== ALWAYS TAKEN /* * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); 10d565: 52 push %edx 10d566: 52 push %edx 10d567: 57 push %edi 10d568: 50 push %eax 10d569: e8 9e 02 00 00 call 10d80c <== ALWAYS TAKEN 10d56e: 89 c3 mov %eax,%ebx /* * If there is no node we have found the name of the node we * wish to create. */ if ( ! node ) 10d570: 83 c4 10 add $0x10,%esp 10d573: 85 c0 test %eax,%eax 10d575: 74 27 je 10d59e done = true; else pathloc->node_access = node; 10d577: 89 1e mov %ebx,(%esi) 10d579: e9 b1 fe ff ff jmp 10d42f <== ALWAYS TAKEN break; case IMFS_NO_MORE_PATH: rtems_set_errno_and_return_minus_one( EEXIST ); 10d57e: e8 41 3f 00 00 call 1114c4 <__errno> 10d583: c7 00 11 00 00 00 movl $0x11,(%eax) 10d589: e9 fb fe ff ff jmp 10d489 <== ALWAYS TAKEN break; case IMFS_INVALID_TOKEN: rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); 10d58e: e8 31 3f 00 00 call 1114c4 <__errno> 10d593: c7 00 5b 00 00 00 movl $0x5b,(%eax) 10d599: e9 eb fe ff ff jmp 10d489 <== ALWAYS TAKEN 10d59e: 89 f2 mov %esi,%edx case IMFS_CURRENT_DIR: break; } } *name = &path[ i - len ]; 10d5a0: 8b 45 a4 mov -0x5c(%ebp),%eax 10d5a3: 2b 45 e4 sub -0x1c(%ebp),%eax 10d5a6: 03 45 08 add 0x8(%ebp),%eax 10d5a9: 8b 4d 10 mov 0x10(%ebp),%ecx 10d5ac: 89 01 mov %eax,(%ecx) 10d5ae: 8b 45 08 mov 0x8(%ebp),%eax 10d5b1: 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++) { 10d5b4: eb 1b jmp 10d5d1 <== ALWAYS TAKEN 10d5b6: 40 inc %eax if ( !IMFS_is_separator( path[ i ] ) ) 10d5b7: 80 f9 5c cmp $0x5c,%cl 10d5ba: 74 15 je 10d5d1 10d5bc: 80 f9 2f cmp $0x2f,%cl 10d5bf: 74 10 je 10d5d1 rtems_set_errno_and_return_minus_one( ENOENT ); 10d5c1: e8 fe 3e 00 00 call 1114c4 <__errno> 10d5c6: c7 00 02 00 00 00 movl $0x2,(%eax) 10d5cc: e9 b8 fe ff ff jmp 10d489 <== 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++) { 10d5d1: 8a 08 mov (%eax),%cl 10d5d3: 84 c9 test %cl,%cl 10d5d5: 75 df jne 10d5b6 /* * Verify we can execute and write to this directory. */ result = IMFS_Set_handlers( pathloc ); 10d5d7: 83 ec 0c sub $0xc,%esp 10d5da: 52 push %edx 10d5db: 89 55 9c mov %edx,-0x64(%ebp) 10d5de: e8 3d fa ff ff call 10d020 <== ALWAYS TAKEN 10d5e3: 89 c3 mov %eax,%ebx /* * The returned node must be a directory */ node = pathloc->node_access; 10d5e5: 8b 55 9c mov -0x64(%ebp),%edx 10d5e8: 8b 02 mov (%edx),%eax 10d5ea: 83 c4 10 add $0x10,%esp 10d5ed: 83 78 4c 01 cmpl $0x1,0x4c(%eax) 10d5f1: 74 10 je 10d603 <== NEVER TAKEN if ( node->type != IMFS_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); 10d5f3: e8 cc 3e 00 00 call 1114c4 <__errno> 10d5f8: c7 00 14 00 00 00 movl $0x14,(%eax) 10d5fe: e9 86 fe ff ff jmp 10d489 <== ALWAYS TAKEN /* * We must have Write and execute permission on the returned node. */ if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) ) 10d603: 56 push %esi 10d604: 56 push %esi 10d605: 6a 03 push $0x3 10d607: 52 push %edx 10d608: e8 5b fa ff ff call 10d068 <== ALWAYS TAKEN 10d60d: 83 c4 10 add $0x10,%esp 10d610: 85 c0 test %eax,%eax 10d612: 75 07 jne 10d61b 10d614: e9 65 fe ff ff jmp 10d47e <== ALWAYS TAKEN 10d619: 89 c3 mov %eax,%ebx <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EACCES ); return result; } 10d61b: 89 d8 mov %ebx,%eax 10d61d: 8d 65 f4 lea -0xc(%ebp),%esp 10d620: 5b pop %ebx 10d621: 5e pop %esi 10d622: 5f pop %edi 10d623: c9 leave 10d624: c3 ret 0010d0b6 : int IMFS_evaluate_hard_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 10d0b6: 55 push %ebp 10d0b7: 89 e5 mov %esp,%ebp 10d0b9: 53 push %ebx 10d0ba: 83 ec 04 sub $0x4,%esp 10d0bd: 8b 5d 08 mov 0x8(%ebp),%ebx IMFS_jnode_t *jnode = node->node_access; 10d0c0: 8b 03 mov (%ebx),%eax /* * Check for things that should never happen. */ if ( jnode->type != IMFS_HARD_LINK ) 10d0c2: 83 78 4c 03 cmpl $0x3,0x4c(%eax) 10d0c6: 74 0d je 10d0d5 <== NEVER TAKEN rtems_fatal_error_occurred (0xABCD0000); 10d0c8: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10d0cb: 68 00 00 cd ab push $0xabcd0000 <== NOT EXECUTED 10d0d0: e8 17 d4 ff ff call 10a4ec <== NOT EXECUTED /* * Set the hard link value and the handlers. */ node->node_access = jnode->info.hard_link.link_node; 10d0d5: 8b 40 50 mov 0x50(%eax),%eax 10d0d8: 89 03 mov %eax,(%ebx) IMFS_Set_handlers( node ); 10d0da: 83 ec 0c sub $0xc,%esp 10d0dd: 53 push %ebx 10d0de: e8 3d ff ff ff call 10d020 <== ALWAYS TAKEN /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) 10d0e3: 58 pop %eax 10d0e4: 5a pop %edx 10d0e5: ff 75 0c pushl 0xc(%ebp) 10d0e8: 53 push %ebx 10d0e9: e8 7a ff ff ff call 10d068 <== ALWAYS TAKEN 10d0ee: 89 c2 mov %eax,%edx 10d0f0: 83 c4 10 add $0x10,%esp 10d0f3: 31 c0 xor %eax,%eax 10d0f5: 85 d2 test %edx,%edx 10d0f7: 75 0e jne 10d107 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EACCES ); 10d0f9: e8 c6 43 00 00 call 1114c4 <__errno> <== NOT EXECUTED 10d0fe: c7 00 0d 00 00 00 movl $0xd,(%eax) <== NOT EXECUTED 10d104: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED return result; } 10d107: 8b 5d fc mov -0x4(%ebp),%ebx 10d10a: c9 leave 10d10b: c3 ret 0010d382 : int IMFS_evaluate_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 10d382: 55 push %ebp 10d383: 89 e5 mov %esp,%ebp 10d385: 57 push %edi 10d386: 56 push %esi 10d387: 53 push %ebx 10d388: 83 ec 0c sub $0xc,%esp 10d38b: 8b 5d 08 mov 0x8(%ebp),%ebx 10d38e: 8b 75 0c mov 0xc(%ebp),%esi IMFS_jnode_t *jnode; int result = 0; do { jnode = node->node_access; 10d391: 8b 3b mov (%ebx),%edi /* * Increment and check the link counter. */ rtems_filesystem_link_counts ++; 10d393: a1 40 1f 12 00 mov 0x121f40,%eax 10d398: 8b 50 30 mov 0x30(%eax),%edx 10d39b: 42 inc %edx 10d39c: 66 89 50 30 mov %dx,0x30(%eax) if ( rtems_filesystem_link_counts > MAXSYMLINK ) { 10d3a0: 66 83 fa 05 cmp $0x5,%dx 10d3a4: 76 16 jbe 10d3bc rtems_filesystem_link_counts = 0; 10d3a6: 66 c7 40 30 00 00 movw $0x0,0x30(%eax) rtems_set_errno_and_return_minus_one( ELOOP ); 10d3ac: e8 13 41 00 00 call 1114c4 <__errno> 10d3b1: c7 00 5c 00 00 00 movl $0x5c,(%eax) 10d3b7: 83 c8 ff or $0xffffffff,%eax 10d3ba: eb 41 jmp 10d3fd <== ALWAYS TAKEN /* * Follow the Link node. */ if ( jnode->type == IMFS_HARD_LINK ) 10d3bc: 8b 47 4c mov 0x4c(%edi),%eax 10d3bf: 83 f8 03 cmp $0x3,%eax 10d3c2: 75 0b jne 10d3cf result = IMFS_evaluate_hard_link( node, flags ); 10d3c4: 51 push %ecx 10d3c5: 51 push %ecx 10d3c6: 56 push %esi 10d3c7: 53 push %ebx 10d3c8: e8 e9 fc ff ff call 10d0b6 <== ALWAYS TAKEN 10d3cd: eb 0e jmp 10d3dd <== ALWAYS TAKEN else if (jnode->type == IMFS_SYM_LINK ) 10d3cf: 83 f8 04 cmp $0x4,%eax 10d3d2: 75 10 jne 10d3e4 result = IMFS_evaluate_sym_link( node, flags ); 10d3d4: 52 push %edx 10d3d5: 52 push %edx 10d3d6: 56 push %esi 10d3d7: 53 push %ebx 10d3d8: e8 2f fd ff ff call 10d10c <== ALWAYS TAKEN 10d3dd: 83 c4 10 add $0x10,%esp } while ( ( result == 0 ) && ( ( jnode->type == IMFS_SYM_LINK ) || ( jnode->type == IMFS_HARD_LINK ) ) ); 10d3e0: 85 c0 test %eax,%eax 10d3e2: 75 0d jne 10d3f1 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 ) || 10d3e4: 8b 47 4c mov 0x4c(%edi),%eax 10d3e7: 83 e8 03 sub $0x3,%eax 10d3ea: 83 f8 01 cmp $0x1,%eax 10d3ed: 76 a2 jbe 10d391 10d3ef: 31 c0 xor %eax,%eax /* * Clear link counter. */ rtems_filesystem_link_counts = 0; 10d3f1: 8b 15 40 1f 12 00 mov 0x121f40,%edx 10d3f7: 66 c7 42 30 00 00 movw $0x0,0x30(%edx) return result; } 10d3fd: 8d 65 f4 lea -0xc(%ebp),%esp 10d400: 5b pop %ebx 10d401: 5e pop %esi 10d402: 5f pop %edi 10d403: c9 leave 10d404: c3 ret 0010d068 : int IMFS_evaluate_permission( rtems_filesystem_location_info_t *node, int flags ) { 10d068: 55 push %ebp 10d069: 89 e5 mov %esp,%ebp 10d06b: 57 push %edi 10d06c: 56 push %esi 10d06d: 53 push %ebx 10d06e: 83 ec 0c sub $0xc,%esp 10d071: 8b 75 0c mov 0xc(%ebp),%esi if ( !rtems_libio_is_valid_perms( flags ) ) { assert( 0 ); rtems_set_errno_and_return_minus_one( EIO ); } jnode = node->node_access; 10d074: 8b 45 08 mov 0x8(%ebp),%eax 10d077: 8b 18 mov (%eax),%ebx #if defined(RTEMS_POSIX_API) st_uid = geteuid(); 10d079: e8 de 0c 00 00 call 10dd5c <== ALWAYS TAKEN 10d07e: 89 c7 mov %eax,%edi st_gid = getegid(); 10d080: e8 c7 0c 00 00 call 10dd4c <== ALWAYS TAKEN * Check if I am owner or a group member or someone else. */ flags_to_test = flags; if ( st_uid == jnode->st_uid ) 10d085: 66 3b 7b 3c cmp 0x3c(%ebx),%di 10d089: 75 07 jne 10d092 flags_to_test <<= 6; 10d08b: 89 f2 mov %esi,%edx 10d08d: c1 e2 06 shl $0x6,%edx 10d090: eb 0f jmp 10d0a1 <== ALWAYS TAKEN else if ( st_gid == jnode->st_gid ) 10d092: 89 f2 mov %esi,%edx 10d094: 66 3b 43 3e cmp 0x3e(%ebx),%ax 10d098: 75 07 jne 10d0a1 <== ALWAYS TAKEN flags_to_test <<= 3; 10d09a: 8d 14 f5 00 00 00 00 lea 0x0(,%esi,8),%edx /* * If all of the flags are set we have permission * to do this. */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) 10d0a1: 8b 43 30 mov 0x30(%ebx),%eax 10d0a4: 21 d0 and %edx,%eax 10d0a6: 39 d0 cmp %edx,%eax 10d0a8: 0f 94 c0 sete %al 10d0ab: 0f b6 c0 movzbl %al,%eax return 1; return 0; } 10d0ae: 83 c4 0c add $0xc,%esp 10d0b1: 5b pop %ebx 10d0b2: 5e pop %esi 10d0b3: 5f pop %edi 10d0b4: c9 leave 10d0b5: c3 ret 0010d10c : int IMFS_evaluate_sym_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 10d10c: 55 push %ebp 10d10d: 89 e5 mov %esp,%ebp 10d10f: 57 push %edi 10d110: 56 push %esi 10d111: 53 push %ebx 10d112: 83 ec 0c sub $0xc,%esp 10d115: 8b 5d 08 mov 0x8(%ebp),%ebx IMFS_jnode_t *jnode = node->node_access; 10d118: 8b 03 mov (%ebx),%eax /* * Check for things that should never happen. */ if ( jnode->type != IMFS_SYM_LINK ) 10d11a: 83 78 4c 04 cmpl $0x4,0x4c(%eax) 10d11e: 74 0a je 10d12a <== NEVER TAKEN rtems_fatal_error_occurred (0xABCD0000); 10d120: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10d123: 68 00 00 cd ab push $0xabcd0000 <== NOT EXECUTED 10d128: eb 0f jmp 10d139 <== NOT EXECUTED if ( !jnode->Parent ) 10d12a: 8b 50 08 mov 0x8(%eax),%edx 10d12d: 85 d2 test %edx,%edx 10d12f: 75 0d jne 10d13e <== NEVER TAKEN rtems_fatal_error_occurred( 0xBAD00000 ); 10d131: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10d134: 68 00 00 d0 ba push $0xbad00000 <== NOT EXECUTED 10d139: e8 ae d3 ff ff call 10a4ec <== 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; 10d13e: 89 13 mov %edx,(%ebx) rtems_filesystem_get_sym_start_loc( 10d140: 8b 50 50 mov 0x50(%eax),%edx 10d143: 8a 0a mov (%edx),%cl 10d145: 80 f9 5c cmp $0x5c,%cl 10d148: 74 0b je 10d155 <== ALWAYS TAKEN 10d14a: 80 f9 2f cmp $0x2f,%cl 10d14d: 74 06 je 10d155 10d14f: 31 d2 xor %edx,%edx 10d151: 84 c9 test %cl,%cl 10d153: 75 17 jne 10d16c <== NEVER TAKEN 10d155: 8b 35 40 1f 12 00 mov 0x121f40,%esi 10d15b: 83 c6 18 add $0x18,%esi 10d15e: b9 05 00 00 00 mov $0x5,%ecx 10d163: 89 df mov %ebx,%edi 10d165: f3 a5 rep movsl %ds:(%esi),%es:(%edi) 10d167: 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] ), 10d16c: 03 50 50 add 0x50(%eax),%edx 10d16f: 31 c0 xor %eax,%eax 10d171: 83 c9 ff or $0xffffffff,%ecx 10d174: 89 d7 mov %edx,%edi 10d176: f2 ae repnz scas %es:(%edi),%al 10d178: f7 d1 not %ecx 10d17a: 49 dec %ecx /* * Use eval path to evaluate the path of the symbolic link. */ result = IMFS_eval_path( 10d17b: 53 push %ebx 10d17c: ff 75 0c pushl 0xc(%ebp) 10d17f: 51 push %ecx 10d180: 52 push %edx 10d181: e8 34 00 00 00 call 10d1ba <== ALWAYS TAKEN 10d186: 89 c6 mov %eax,%esi strlen( &jnode->info.sym_link.name[i] ), flags, node ); IMFS_Set_handlers( node ); 10d188: 89 1c 24 mov %ebx,(%esp) 10d18b: e8 90 fe ff ff call 10d020 <== ALWAYS TAKEN /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) 10d190: 59 pop %ecx 10d191: 5f pop %edi 10d192: ff 75 0c pushl 0xc(%ebp) 10d195: 53 push %ebx 10d196: e8 cd fe ff ff call 10d068 <== ALWAYS TAKEN 10d19b: 83 c4 10 add $0x10,%esp 10d19e: 85 c0 test %eax,%eax 10d1a0: 75 0e jne 10d1b0 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EACCES ); 10d1a2: e8 1d 43 00 00 call 1114c4 <__errno> <== NOT EXECUTED 10d1a7: c7 00 0d 00 00 00 movl $0xd,(%eax) <== NOT EXECUTED 10d1ad: 83 ce ff or $0xffffffff,%esi <== NOT EXECUTED return result; } 10d1b0: 89 f0 mov %esi,%eax 10d1b2: 8d 65 f4 lea -0xc(%ebp),%esp 10d1b5: 5b pop %ebx 10d1b6: 5e pop %esi 10d1b7: 5f pop %edi 10d1b8: c9 leave 10d1b9: c3 ret 00110154 : int IMFS_fchmod( rtems_filesystem_location_info_t *loc, mode_t mode ) { 110154: 55 push %ebp 110155: 89 e5 mov %esp,%ebp 110157: 53 push %ebx 110158: 83 ec 14 sub $0x14,%esp IMFS_jnode_t *jnode; #if defined(RTEMS_POSIX_API) uid_t st_uid; #endif jnode = loc->node_access; 11015b: 8b 45 08 mov 0x8(%ebp),%eax 11015e: 8b 18 mov (%eax),%ebx /* * Verify I am the owner of the node or the super user. */ #if defined(RTEMS_POSIX_API) st_uid = geteuid(); 110160: e8 f7 db ff ff call 10dd5c if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) ) 110165: 66 85 c0 test %ax,%ax 110168: 74 16 je 110180 <== NEVER TAKEN 11016a: 66 3b 43 3c cmp 0x3c(%ebx),%ax <== NOT EXECUTED 11016e: 74 10 je 110180 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EPERM ); 110170: e8 4f 13 00 00 call 1114c4 <__errno> <== NOT EXECUTED 110175: c7 00 01 00 00 00 movl $0x1,(%eax) <== NOT EXECUTED 11017b: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 11017e: eb 2e jmp 1101ae <== NOT EXECUTED /* * Change only the RWX permissions on the jnode to mode. */ jnode->st_mode &= ~(S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX); jnode->st_mode |= mode & (S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX); 110180: 8b 45 0c mov 0xc(%ebp),%eax 110183: 25 ff 0f 00 00 and $0xfff,%eax 110188: 8b 53 30 mov 0x30(%ebx),%edx 11018b: 81 e2 00 f0 ff ff and $0xfffff000,%edx 110191: 09 d0 or %edx,%eax 110193: 89 43 30 mov %eax,0x30(%ebx) IMFS_update_ctime( jnode ); 110196: 50 push %eax 110197: 50 push %eax 110198: 6a 00 push $0x0 11019a: 8d 45 f0 lea -0x10(%ebp),%eax 11019d: 50 push %eax 11019e: e8 c9 db ff ff call 10dd6c 1101a3: 8b 45 f0 mov -0x10(%ebp),%eax 1101a6: 89 43 48 mov %eax,0x48(%ebx) 1101a9: 31 c0 xor %eax,%eax return 0; 1101ab: 83 c4 10 add $0x10,%esp } 1101ae: 8b 5d fc mov -0x4(%ebp),%ebx 1101b1: c9 leave 1101b2: c3 ret 0010d770 : } int IMFS_fifo_close( rtems_libio_t *iop ) { 10d770: 55 push %ebp <== NOT EXECUTED 10d771: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10d773: 57 push %edi <== NOT EXECUTED 10d774: 56 push %esi <== NOT EXECUTED 10d775: 53 push %ebx <== NOT EXECUTED 10d776: 83 ec 14 sub $0x14,%esp <== NOT EXECUTED 10d779: 8b 7d 08 mov 0x8(%ebp),%edi <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; 10d77c: 8b 77 38 mov 0x38(%edi),%esi <== NOT EXECUTED int err = pipe_release(&JNODE2PIPE(jnode), iop); 10d77f: 57 push %edi <== NOT EXECUTED 10d780: 8d 46 50 lea 0x50(%esi),%eax <== NOT EXECUTED 10d783: 50 push %eax <== NOT EXECUTED 10d784: e8 ee 23 00 00 call 10fb77 <== NOT EXECUTED 10d789: 89 c3 mov %eax,%ebx <== NOT EXECUTED if (! err) { 10d78b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10d78e: 83 f8 00 cmp $0x0,%eax <== NOT EXECUTED 10d791: 75 2c jne 10d7bf <== NOT EXECUTED iop->flags &= ~LIBIO_FLAGS_OPEN; 10d793: 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) 10d79a: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10d79d: 56 push %esi <== NOT EXECUTED 10d79e: e8 7b 06 00 00 call 10de1e <== NOT EXECUTED 10d7a3: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10d7a6: 85 c0 test %eax,%eax <== NOT EXECUTED 10d7a8: 75 23 jne 10d7cd <== NOT EXECUTED 10d7aa: 66 83 7e 34 00 cmpw $0x0,0x34(%esi) <== NOT EXECUTED 10d7af: 75 1c jne 10d7cd <== NOT EXECUTED free(jnode); 10d7b1: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10d7b4: 56 push %esi <== NOT EXECUTED 10d7b5: e8 76 99 ff ff call 107130 <== NOT EXECUTED 10d7ba: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10d7bd: eb 0e jmp 10d7cd <== NOT EXECUTED } IMFS_FIFO_RETURN(err); 10d7bf: 7d 0c jge 10d7cd <== NOT EXECUTED 10d7c1: e8 fe 3c 00 00 call 1114c4 <__errno> <== NOT EXECUTED 10d7c6: f7 db neg %ebx <== NOT EXECUTED 10d7c8: 89 18 mov %ebx,(%eax) <== NOT EXECUTED 10d7ca: 83 cb ff or $0xffffffff,%ebx <== NOT EXECUTED } 10d7cd: 89 d8 mov %ebx,%eax <== NOT EXECUTED 10d7cf: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 10d7d2: 5b pop %ebx <== NOT EXECUTED 10d7d3: 5e pop %esi <== NOT EXECUTED 10d7d4: 5f pop %edi <== NOT EXECUTED 10d7d5: c9 leave <== NOT EXECUTED 10d7d6: c3 ret <== NOT EXECUTED 0010d663 : int IMFS_fifo_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) { 10d663: 55 push %ebp <== NOT EXECUTED 10d664: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10d666: 53 push %ebx <== NOT EXECUTED 10d667: 83 ec 04 sub $0x4,%esp <== NOT EXECUTED 10d66a: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 10d66d: 8b 4d 0c mov 0xc(%ebp),%ecx <== NOT EXECUTED 10d670: 8b 55 10 mov 0x10(%ebp),%edx <== NOT EXECUTED int err; if (command == FIONBIO) { 10d673: 81 f9 7e 66 04 80 cmp $0x8004667e,%ecx <== NOT EXECUTED 10d679: 75 1c jne 10d697 <== NOT EXECUTED if (buffer == NULL) 10d67b: bb f2 ff ff ff mov $0xfffffff2,%ebx <== NOT EXECUTED 10d680: 85 d2 test %edx,%edx <== NOT EXECUTED 10d682: 74 2a je 10d6ae <== NOT EXECUTED err = -EFAULT; else { if (*(int *)buffer) 10d684: 83 3a 00 cmpl $0x0,(%edx) <== NOT EXECUTED 10d687: 74 06 je 10d68f <== NOT EXECUTED iop->flags |= LIBIO_FLAGS_NO_DELAY; 10d689: 83 48 14 01 orl $0x1,0x14(%eax) <== NOT EXECUTED 10d68d: eb 04 jmp 10d693 <== NOT EXECUTED else iop->flags &= ~LIBIO_FLAGS_NO_DELAY; 10d68f: 83 60 14 fe andl $0xfffffffe,0x14(%eax) <== NOT EXECUTED 10d693: 31 db xor %ebx,%ebx <== NOT EXECUTED 10d695: eb 23 jmp 10d6ba <== NOT EXECUTED return 0; } } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); 10d697: 50 push %eax <== NOT EXECUTED 10d698: 52 push %edx <== NOT EXECUTED 10d699: 51 push %ecx <== NOT EXECUTED 10d69a: 8b 40 38 mov 0x38(%eax),%eax <== NOT EXECUTED 10d69d: ff 70 50 pushl 0x50(%eax) <== NOT EXECUTED 10d6a0: e8 36 21 00 00 call 10f7db <== NOT EXECUTED 10d6a5: 89 c3 mov %eax,%ebx <== NOT EXECUTED IMFS_FIFO_RETURN(err); 10d6a7: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10d6aa: 85 c0 test %eax,%eax <== NOT EXECUTED 10d6ac: 79 0c jns 10d6ba <== NOT EXECUTED 10d6ae: e8 11 3e 00 00 call 1114c4 <__errno> <== NOT EXECUTED 10d6b3: f7 db neg %ebx <== NOT EXECUTED 10d6b5: 89 18 mov %ebx,(%eax) <== NOT EXECUTED 10d6b7: 83 cb ff or $0xffffffff,%ebx <== NOT EXECUTED } 10d6ba: 89 d8 mov %ebx,%eax <== NOT EXECUTED 10d6bc: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 10d6bf: c9 leave <== NOT EXECUTED 10d6c0: c3 ret <== NOT EXECUTED 0010d628 : rtems_off64_t IMFS_fifo_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { 10d628: 55 push %ebp <== NOT EXECUTED 10d629: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10d62b: 53 push %ebx <== NOT EXECUTED 10d62c: 83 ec 04 sub $0x4,%esp <== NOT EXECUTED 10d62f: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED off_t err = pipe_lseek(LIBIO2PIPE(iop), offset, whence, iop); 10d632: 50 push %eax <== NOT EXECUTED 10d633: ff 75 14 pushl 0x14(%ebp) <== NOT EXECUTED 10d636: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED 10d639: 8b 40 38 mov 0x38(%eax),%eax <== NOT EXECUTED 10d63c: ff 70 50 pushl 0x50(%eax) <== NOT EXECUTED 10d63f: e8 40 21 00 00 call 10f784 <== NOT EXECUTED 10d644: 89 c3 mov %eax,%ebx <== NOT EXECUTED IMFS_FIFO_RETURN(err); 10d646: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10d649: 85 c0 test %eax,%eax <== NOT EXECUTED 10d64b: 79 10 jns 10d65d <== NOT EXECUTED 10d64d: e8 72 3e 00 00 call 1114c4 <__errno> <== NOT EXECUTED 10d652: f7 db neg %ebx <== NOT EXECUTED 10d654: 89 18 mov %ebx,(%eax) <== NOT EXECUTED 10d656: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 10d659: 89 c2 mov %eax,%edx <== NOT EXECUTED 10d65b: eb 01 jmp 10d65e <== NOT EXECUTED 10d65d: 99 cltd <== NOT EXECUTED } 10d65e: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 10d661: c9 leave <== NOT EXECUTED 10d662: c3 ret <== NOT EXECUTED 0010d7d7 : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 10d7d7: 55 push %ebp 10d7d8: 89 e5 mov %esp,%ebp 10d7da: 53 push %ebx 10d7db: 83 ec 0c sub $0xc,%esp 10d7de: 8b 45 08 mov 0x8(%ebp),%eax IMFS_jnode_t *jnode = iop->file_info; int err = fifo_open(&JNODE2PIPE(jnode), iop); 10d7e1: 50 push %eax 10d7e2: 8b 40 38 mov 0x38(%eax),%eax 10d7e5: 83 c0 50 add $0x50,%eax 10d7e8: 50 push %eax 10d7e9: e8 59 24 00 00 call 10fc47 10d7ee: 89 c3 mov %eax,%ebx IMFS_FIFO_RETURN(err); 10d7f0: 83 c4 10 add $0x10,%esp 10d7f3: 85 c0 test %eax,%eax 10d7f5: 79 0c jns 10d803 <== ALWAYS TAKEN 10d7f7: e8 c8 3c 00 00 call 1114c4 <__errno> 10d7fc: f7 db neg %ebx 10d7fe: 89 18 mov %ebx,(%eax) 10d800: 83 cb ff or $0xffffffff,%ebx } 10d803: 89 d8 mov %ebx,%eax 10d805: 8b 5d fc mov -0x4(%ebp),%ebx 10d808: c9 leave 10d809: c3 ret 0010d71a : ssize_t IMFS_fifo_read( rtems_libio_t *iop, void *buffer, size_t count ) { 10d71a: 55 push %ebp <== NOT EXECUTED 10d71b: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10d71d: 56 push %esi <== NOT EXECUTED 10d71e: 53 push %ebx <== NOT EXECUTED 10d71f: 83 ec 10 sub $0x10,%esp <== NOT EXECUTED 10d722: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; 10d725: 8b 70 38 mov 0x38(%eax),%esi <== NOT EXECUTED int err = pipe_read(JNODE2PIPE(jnode), buffer, count, iop); 10d728: 50 push %eax <== NOT EXECUTED 10d729: ff 75 10 pushl 0x10(%ebp) <== NOT EXECUTED 10d72c: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED 10d72f: ff 76 50 pushl 0x50(%esi) <== NOT EXECUTED 10d732: e8 fa 20 00 00 call 10f831 <== NOT EXECUTED 10d737: 89 c3 mov %eax,%ebx <== NOT EXECUTED if (err > 0) 10d739: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10d73c: 83 f8 00 cmp $0x0,%eax <== NOT EXECUTED 10d73f: 7e 18 jle 10d759 <== NOT EXECUTED IMFS_update_atime(jnode); 10d741: 52 push %edx <== NOT EXECUTED 10d742: 52 push %edx <== NOT EXECUTED 10d743: 6a 00 push $0x0 <== NOT EXECUTED 10d745: 8d 45 f0 lea -0x10(%ebp),%eax <== NOT EXECUTED 10d748: 50 push %eax <== NOT EXECUTED 10d749: e8 1e 06 00 00 call 10dd6c <== NOT EXECUTED 10d74e: 8b 45 f0 mov -0x10(%ebp),%eax <== NOT EXECUTED 10d751: 89 46 40 mov %eax,0x40(%esi) <== NOT EXECUTED 10d754: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10d757: eb 0e jmp 10d767 <== NOT EXECUTED IMFS_FIFO_RETURN(err); 10d759: 74 0c je 10d767 <== NOT EXECUTED 10d75b: e8 64 3d 00 00 call 1114c4 <__errno> <== NOT EXECUTED 10d760: f7 db neg %ebx <== NOT EXECUTED 10d762: 89 18 mov %ebx,(%eax) <== NOT EXECUTED 10d764: 83 cb ff or $0xffffffff,%ebx <== NOT EXECUTED } 10d767: 89 d8 mov %ebx,%eax <== NOT EXECUTED 10d769: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED 10d76c: 5b pop %ebx <== NOT EXECUTED 10d76d: 5e pop %esi <== NOT EXECUTED 10d76e: c9 leave <== NOT EXECUTED 10d76f: c3 ret <== NOT EXECUTED 0010d6c1 : ssize_t IMFS_fifo_write( rtems_libio_t *iop, const void *buffer, size_t count ) { 10d6c1: 55 push %ebp <== NOT EXECUTED 10d6c2: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10d6c4: 56 push %esi <== NOT EXECUTED 10d6c5: 53 push %ebx <== NOT EXECUTED 10d6c6: 83 ec 10 sub $0x10,%esp <== NOT EXECUTED 10d6c9: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; 10d6cc: 8b 70 38 mov 0x38(%eax),%esi <== NOT EXECUTED int err = pipe_write(JNODE2PIPE(jnode), buffer, count, iop); 10d6cf: 50 push %eax <== NOT EXECUTED 10d6d0: ff 75 10 pushl 0x10(%ebp) <== NOT EXECUTED 10d6d3: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED 10d6d6: ff 76 50 pushl 0x50(%esi) <== NOT EXECUTED 10d6d9: e8 b5 22 00 00 call 10f993 <== NOT EXECUTED 10d6de: 89 c3 mov %eax,%ebx <== NOT EXECUTED if (err > 0) { 10d6e0: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10d6e3: 83 f8 00 cmp $0x0,%eax <== NOT EXECUTED 10d6e6: 7e 1b jle 10d703 <== NOT EXECUTED IMFS_mtime_ctime_update(jnode); 10d6e8: 50 push %eax <== NOT EXECUTED 10d6e9: 50 push %eax <== NOT EXECUTED 10d6ea: 6a 00 push $0x0 <== NOT EXECUTED 10d6ec: 8d 45 f0 lea -0x10(%ebp),%eax <== NOT EXECUTED 10d6ef: 50 push %eax <== NOT EXECUTED 10d6f0: e8 77 06 00 00 call 10dd6c <== NOT EXECUTED 10d6f5: 8b 45 f0 mov -0x10(%ebp),%eax <== NOT EXECUTED 10d6f8: 89 46 44 mov %eax,0x44(%esi) <== NOT EXECUTED 10d6fb: 89 46 48 mov %eax,0x48(%esi) <== NOT EXECUTED 10d6fe: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10d701: eb 0e jmp 10d711 <== NOT EXECUTED } IMFS_FIFO_RETURN(err); 10d703: 74 0c je 10d711 <== NOT EXECUTED 10d705: e8 ba 3d 00 00 call 1114c4 <__errno> <== NOT EXECUTED 10d70a: f7 db neg %ebx <== NOT EXECUTED 10d70c: 89 18 mov %ebx,(%eax) <== NOT EXECUTED 10d70e: 83 cb ff or $0xffffffff,%ebx <== NOT EXECUTED } 10d711: 89 d8 mov %ebx,%eax <== NOT EXECUTED 10d713: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED 10d716: 5b pop %ebx <== NOT EXECUTED 10d717: 5e pop %esi <== NOT EXECUTED 10d718: c9 leave <== NOT EXECUTED 10d719: c3 ret <== NOT EXECUTED 0010d80c : IMFS_jnode_t *IMFS_find_match_in_dir( IMFS_jnode_t *directory, char *name ) { 10d80c: 55 push %ebp 10d80d: 89 e5 mov %esp,%ebp 10d80f: 57 push %edi 10d810: 56 push %esi 10d811: 53 push %ebx 10d812: 83 ec 0c sub $0xc,%esp 10d815: 8b 5d 08 mov 0x8(%ebp),%ebx 10d818: 8b 7d 0c mov 0xc(%ebp),%edi /* * Check for fatal errors. A NULL directory show a problem in the * the IMFS code. */ assert( directory ); 10d81b: 85 db test %ebx,%ebx 10d81d: 75 16 jne 10d835 <== NEVER TAKEN 10d81f: 68 d0 ea 11 00 push $0x11ead0 <== NOT EXECUTED 10d824: 68 30 eb 11 00 push $0x11eb30 <== NOT EXECUTED 10d829: 6a 2a push $0x2a <== NOT EXECUTED 10d82b: 68 da ea 11 00 push $0x11eada <== NOT EXECUTED 10d830: e8 0b 96 ff ff call 106e40 <__assert_func> <== NOT EXECUTED if ( !name ) 10d835: 85 ff test %edi,%edi 10d837: 74 52 je 10d88b <== ALWAYS TAKEN /* * Check for "." and ".." */ if ( !strcmp( name, dotname ) ) 10d839: 56 push %esi 10d83a: 56 push %esi 10d83b: 68 28 eb 11 00 push $0x11eb28 10d840: 57 push %edi 10d841: e8 6a 47 00 00 call 111fb0 10d846: 83 c4 10 add $0x10,%esp 10d849: 85 c0 test %eax,%eax 10d84b: 74 40 je 10d88d <== ALWAYS TAKEN return directory; if ( !strcmp( name, dotdotname ) ) 10d84d: 51 push %ecx 10d84e: 51 push %ecx 10d84f: 68 2a eb 11 00 push $0x11eb2a 10d854: 57 push %edi 10d855: e8 56 47 00 00 call 111fb0 10d85a: 83 c4 10 add $0x10,%esp 10d85d: 85 c0 test %eax,%eax 10d85f: 75 05 jne 10d866 <== NEVER TAKEN return directory->Parent; 10d861: 8b 5b 08 mov 0x8(%ebx),%ebx <== NOT EXECUTED 10d864: eb 27 jmp 10d88d <== NOT EXECUTED the_chain = &directory->info.directory.Entries; for ( the_node = the_chain->first; 10d866: 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; 10d869: 83 c3 54 add $0x54,%ebx 10d86c: eb 19 jmp 10d887 <== 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 ) ) 10d86e: 8d 46 0c lea 0xc(%esi),%eax 10d871: 52 push %edx 10d872: 52 push %edx 10d873: 50 push %eax 10d874: 57 push %edi 10d875: e8 36 47 00 00 call 111fb0 10d87a: 83 c4 10 add $0x10,%esp 10d87d: 85 c0 test %eax,%eax 10d87f: 75 04 jne 10d885 10d881: 89 f3 mov %esi,%ebx 10d883: eb 08 jmp 10d88d <== 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 ) { 10d885: 8b 36 mov (%esi),%esi if ( !strcmp( name, dotdotname ) ) return directory->Parent; the_chain = &directory->info.directory.Entries; for ( the_node = the_chain->first; 10d887: 39 de cmp %ebx,%esi 10d889: 75 e3 jne 10d86e 10d88b: 31 db xor %ebx,%ebx if ( !strcmp( name, the_jnode->name ) ) return the_jnode; } return 0; } 10d88d: 89 d8 mov %ebx,%eax 10d88f: 8d 65 f4 lea -0xc(%ebp),%esp 10d892: 5b pop %ebx 10d893: 5e pop %esi 10d894: 5f pop %edi 10d895: c9 leave 10d896: c3 ret 00111c44 : ((IMFS_jnode_t *)( rtems_chain_head( jnode_get_control( jnode ) )->next)) int IMFS_fsunmount( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { 111c44: 55 push %ebp 111c45: 89 e5 mov %esp,%ebp 111c47: 57 push %edi 111c48: 56 push %esi 111c49: 53 push %ebx 111c4a: 83 ec 2c sub $0x2c,%esp 111c4d: 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; 111c50: 8b 58 1c mov 0x1c(%eax),%ebx loc = temp_mt_entry->mt_fs_root; 111c53: 8d 7d d4 lea -0x2c(%ebp),%edi 111c56: 8d 70 1c lea 0x1c(%eax),%esi 111c59: b9 05 00 00 00 mov $0x5,%ecx 111c5e: 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; 111c60: c7 40 1c 00 00 00 00 movl $0x0,0x1c(%eax) do { next = jnode->Parent; loc.node_access = (void *)jnode; IMFS_Set_handlers( &loc ); 111c67: 8d 75 d4 lea -0x2c(%ebp),%esi */ temp_mt_entry->mt_fs_root.node_access = NULL; do { next = jnode->Parent; 111c6a: 8b 7b 08 mov 0x8(%ebx),%edi loc.node_access = (void *)jnode; 111c6d: 89 5d d4 mov %ebx,-0x2c(%ebp) IMFS_Set_handlers( &loc ); 111c70: 83 ec 0c sub $0xc,%esp 111c73: 56 push %esi 111c74: e8 d7 f7 ff ff call 111450 <== ALWAYS TAKEN if ( jnode->type != IMFS_DIRECTORY ) { 111c79: 83 c4 10 add $0x10,%esp 111c7c: 83 7b 4c 01 cmpl $0x1,0x4c(%ebx) 111c80: 75 08 jne 111c8a */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 111c82: 8d 43 54 lea 0x54(%ebx),%eax 111c85: 39 43 50 cmp %eax,0x50(%ebx) 111c88: 75 13 jne 111c9d result = IMFS_unlink( NULL, &loc ); if (result != 0) return -1; jnode = next; } else if ( jnode_has_no_children( jnode ) ) { result = IMFS_unlink( NULL, &loc ); 111c8a: 50 push %eax 111c8b: 50 push %eax 111c8c: 56 push %esi 111c8d: 6a 00 push $0x0 111c8f: e8 cc 60 ff ff call 107d60 if (result != 0) 111c94: 83 c4 10 add $0x10,%esp 111c97: 85 c0 test %eax,%eax 111c99: 75 1d jne 111cb8 <== ALWAYS TAKEN 111c9b: 89 fb mov %edi,%ebx return -1; jnode = next; } if ( jnode != NULL ) { 111c9d: 85 db test %ebx,%ebx 111c9f: 74 1c je 111cbd if ( jnode->type == IMFS_DIRECTORY ) { 111ca1: 83 7b 4c 01 cmpl $0x1,0x4c(%ebx) 111ca5: 75 c3 jne 111c6a <== ALWAYS TAKEN 111ca7: 8d 43 54 lea 0x54(%ebx),%eax 111caa: 39 43 50 cmp %eax,0x50(%ebx) 111cad: 74 bb je 111c6a if ( jnode_has_children( jnode ) ) jnode = jnode_get_first_child( jnode ); 111caf: 8b 5b 50 mov 0x50(%ebx),%ebx } } } while (jnode != NULL); 111cb2: 85 db test %ebx,%ebx 111cb4: 75 b4 jne 111c6a <== NEVER TAKEN 111cb6: eb 05 jmp 111cbd <== NOT EXECUTED 111cb8: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 111cbb: eb 02 jmp 111cbf <== NOT EXECUTED 111cbd: 31 c0 xor %eax,%eax return 0; } 111cbf: 8d 65 f4 lea -0xc(%ebp),%esp 111cc2: 5b pop %ebx 111cc3: 5e pop %esi 111cc4: 5f pop %edi 111cc5: c9 leave 111cc6: c3 ret 0010d898 : const char *path, int pathlen, char *token, int *token_len ) { 10d898: 55 push %ebp 10d899: 89 e5 mov %esp,%ebp 10d89b: 56 push %esi 10d89c: 53 push %ebx 10d89d: 8b 5d 08 mov 0x8(%ebp),%ebx 10d8a0: 8b 4d 0c mov 0xc(%ebp),%ecx 10d8a3: 8b 75 10 mov 0x10(%ebp),%esi register char c; /* * Copy a name into token. (Remember NULL is a token.) */ c = path[i]; 10d8a6: 8a 13 mov (%ebx),%dl 10d8a8: 31 c0 xor %eax,%eax while ( (!IMFS_is_separator(c)) && (i < pathlen) && (i <= IMFS_NAME_MAX) ) { 10d8aa: eb 13 jmp 10d8bf <== ALWAYS TAKEN token[i] = c; 10d8ac: 88 14 06 mov %dl,(%esi,%eax,1) if ( i == IMFS_NAME_MAX ) 10d8af: 83 f8 20 cmp $0x20,%eax 10d8b2: 75 07 jne 10d8bb 10d8b4: bb 04 00 00 00 mov $0x4,%ebx 10d8b9: eb 7c jmp 10d937 <== ALWAYS TAKEN return IMFS_INVALID_TOKEN; if ( !IMFS_is_valid_name_char(c) ) type = IMFS_INVALID_TOKEN; c = path [++i]; 10d8bb: 40 inc %eax 10d8bc: 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) ) { 10d8bf: 80 fa 5c cmp $0x5c,%dl 10d8c2: 74 0d je 10d8d1 10d8c4: 80 fa 2f cmp $0x2f,%dl 10d8c7: 74 08 je 10d8d1 10d8c9: 39 c8 cmp %ecx,%eax 10d8cb: 7d 04 jge 10d8d1 10d8cd: 84 d2 test %dl,%dl 10d8cf: 75 db jne 10d8ac <== NEVER TAKEN /* * Copy a seperator into token. */ if ( i == 0 ) { 10d8d1: 85 c0 test %eax,%eax 10d8d3: 75 17 jne 10d8ec token[i] = c; 10d8d5: 88 16 mov %dl,(%esi) if ( (token[i] != '\0') && pathlen ) { 10d8d7: 84 d2 test %dl,%dl 10d8d9: 74 0d je 10d8e8 10d8db: 85 c9 test %ecx,%ecx 10d8dd: 74 09 je 10d8e8 10d8df: bb 01 00 00 00 mov $0x1,%ebx 10d8e4: b0 01 mov $0x1,%al 10d8e6: eb 14 jmp 10d8fc <== ALWAYS TAKEN 10d8e8: 31 db xor %ebx,%ebx 10d8ea: eb 10 jmp 10d8fc <== ALWAYS TAKEN i++; type = IMFS_CURRENT_DIR; } else { type = IMFS_NO_MORE_PATH; } } else if (token[ i-1 ] != '\0') { 10d8ec: bb 03 00 00 00 mov $0x3,%ebx 10d8f1: 80 7c 06 ff 00 cmpb $0x0,-0x1(%esi,%eax,1) 10d8f6: 74 04 je 10d8fc <== ALWAYS TAKEN token[i] = '\0'; 10d8f8: c6 04 06 00 movb $0x0,(%esi,%eax,1) /* * Set token_len to the number of characters copied. */ *token_len = i; 10d8fc: 8b 55 14 mov 0x14(%ebp),%edx 10d8ff: 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 ) { 10d901: 83 fb 03 cmp $0x3,%ebx 10d904: 75 31 jne 10d937 if ( strcmp( token, "..") == 0 ) 10d906: 52 push %edx 10d907: 52 push %edx 10d908: 68 47 eb 11 00 push $0x11eb47 10d90d: 56 push %esi 10d90e: e8 9d 46 00 00 call 111fb0 10d913: 83 c4 10 add $0x10,%esp 10d916: 85 c0 test %eax,%eax 10d918: 75 04 jne 10d91e 10d91a: b3 02 mov $0x2,%bl 10d91c: eb 19 jmp 10d937 <== ALWAYS TAKEN type = IMFS_UP_DIR; else if ( strcmp( token, "." ) == 0 ) 10d91e: 50 push %eax 10d91f: 50 push %eax 10d920: 68 48 eb 11 00 push $0x11eb48 10d925: 56 push %esi 10d926: e8 85 46 00 00 call 111fb0 10d92b: 83 c4 10 add $0x10,%esp 10d92e: 85 c0 test %eax,%eax 10d930: 75 05 jne 10d937 10d932: bb 01 00 00 00 mov $0x1,%ebx type = IMFS_CURRENT_DIR; } return type; } 10d937: 89 d8 mov %ebx,%eax 10d939: 8d 65 f8 lea -0x8(%ebp),%esp 10d93c: 5b pop %ebx 10d93d: 5e pop %esi 10d93e: c9 leave 10d93f: 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 b4 34 12 00 push $0x1234b4 1079db: 68 24 35 12 00 push $0x123524 1079e0: 68 88 2e 12 00 push $0x122e88 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 0010d940 : 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 ) { 10d940: 55 push %ebp 10d941: 89 e5 mov %esp,%ebp 10d943: 57 push %edi 10d944: 56 push %esi 10d945: 53 push %ebx 10d946: 83 ec 0c sub $0xc,%esp 10d949: 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, 10d94c: 8b 0d 48 01 12 00 mov 0x120148,%ecx 10d952: 31 d2 xor %edx,%edx 10d954: 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) { 10d959: 39 c8 cmp %ecx,%eax 10d95b: 74 0d je 10d96a 10d95d: d1 e0 shl %eax 10d95f: 42 inc %edx 10d960: 83 fa 06 cmp $0x6,%edx 10d963: 75 f4 jne 10d959 <== NEVER TAKEN 10d965: 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) 10d96a: a3 90 3e 12 00 mov %eax,0x123e90 /* * 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(); 10d96f: e8 af 26 00 00 call 110023 10d974: 89 43 1c mov %eax,0x1c(%ebx) temp_mt_entry->mt_fs_root.handlers = directory_handlers; 10d977: 8b 45 14 mov 0x14(%ebp),%eax 10d97a: 89 43 24 mov %eax,0x24(%ebx) temp_mt_entry->mt_fs_root.ops = op_table; 10d97d: 8b 45 0c mov 0xc(%ebp),%eax 10d980: 89 43 28 mov %eax,0x28(%ebx) temp_mt_entry->pathconf_limits_and_options = IMFS_LIMITS_AND_OPTIONS; 10d983: 8d 7b 38 lea 0x38(%ebx),%edi 10d986: be 5c ee 11 00 mov $0x11ee5c,%esi 10d98b: b9 0c 00 00 00 mov $0xc,%ecx 10d990: f3 a5 rep movsl %ds:(%esi),%es:(%edi) /* * Create custom file system data. */ fs_info = calloc( 1, sizeof( IMFS_fs_info_t ) ); 10d992: 50 push %eax 10d993: 50 push %eax 10d994: 6a 0c push $0xc 10d996: 6a 01 push $0x1 10d998: e8 3f 02 00 00 call 10dbdc <== ALWAYS TAKEN if ( !fs_info ) { 10d99d: 83 c4 10 add $0x10,%esp 10d9a0: 85 c0 test %eax,%eax 10d9a2: 75 1e jne 10d9c2 <== NEVER TAKEN free(temp_mt_entry->mt_fs_root.node_access); 10d9a4: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10d9a7: ff 73 1c pushl 0x1c(%ebx) <== NOT EXECUTED 10d9aa: e8 81 97 ff ff call 107130 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOMEM); 10d9af: e8 10 3b 00 00 call 1114c4 <__errno> <== NOT EXECUTED 10d9b4: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED 10d9ba: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 10d9bd: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10d9c0: eb 26 jmp 10d9e8 <== NOT EXECUTED } temp_mt_entry->fs_info = fs_info; 10d9c2: 89 43 34 mov %eax,0x34(%ebx) /* * Set st_ino for the root to 1. */ fs_info->ino_count = 1; 10d9c5: c7 00 01 00 00 00 movl $0x1,(%eax) fs_info->memfile_handlers = memfile_handlers; 10d9cb: 8b 55 10 mov 0x10(%ebp),%edx 10d9ce: 89 50 04 mov %edx,0x4(%eax) fs_info->directory_handlers = directory_handlers; 10d9d1: 8b 55 14 mov 0x14(%ebp),%edx 10d9d4: 89 50 08 mov %edx,0x8(%eax) jnode = temp_mt_entry->mt_fs_root.node_access; jnode->st_ino = fs_info->ino_count; 10d9d7: 8b 43 1c mov 0x1c(%ebx),%eax 10d9da: c7 40 38 01 00 00 00 movl $0x1,0x38(%eax) /* Initialize POSIX FIFO/pipe module */ rtems_pipe_initialize(); 10d9e1: e8 a8 1d 00 00 call 10f78e 10d9e6: 31 c0 xor %eax,%eax return 0; } 10d9e8: 8d 65 f4 lea -0xc(%ebp),%esp 10d9eb: 5b pop %ebx 10d9ec: 5e pop %esi 10d9ed: 5f pop %edi 10d9ee: c9 leave 10d9ef: 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 01 e1 00 00 call 115bc0 <__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 72 a2 00 00 call 111d54 * 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 5a 98 00 00 call 111352 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 bc e0 00 00 call 115bc0 <__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 001142e0 : MEMFILE_STATIC int IMFS_memfile_addblock( IMFS_jnode_t *the_jnode, unsigned int block ) { 1142e0: 55 push %ebp 1142e1: 89 e5 mov %esp,%ebp 1142e3: 53 push %ebx 1142e4: 83 ec 04 sub $0x4,%esp 1142e7: 8b 45 08 mov 0x8(%ebp),%eax block_p memory; block_p *block_entry_ptr; assert( the_jnode ); 1142ea: 85 c0 test %eax,%eax 1142ec: 75 11 jne 1142ff <== NEVER TAKEN 1142ee: 68 c4 37 12 00 push $0x1237c4 <== NOT EXECUTED 1142f3: 68 68 39 12 00 push $0x123968 <== NOT EXECUTED 1142f8: 68 69 01 00 00 push $0x169 <== NOT EXECUTED 1142fd: eb 15 jmp 114314 <== NOT EXECUTED if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 1142ff: 83 78 4c 05 cmpl $0x5,0x4c(%eax) 114303: 74 19 je 11431e <== NEVER TAKEN 114305: 68 14 38 12 00 push $0x123814 <== NOT EXECUTED 11430a: 68 68 39 12 00 push $0x123968 <== NOT EXECUTED 11430f: 68 6d 01 00 00 push $0x16d <== NOT EXECUTED 114314: 68 ce 37 12 00 push $0x1237ce <== NOT EXECUTED 114319: e8 52 3c 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 ); 11431e: 52 push %edx 11431f: 6a 01 push $0x1 114321: ff 75 0c pushl 0xc(%ebp) 114324: 50 push %eax 114325: e8 84 fb ff ff call 113eae <== ALWAYS TAKEN 11432a: 89 c3 mov %eax,%ebx if ( *block_entry_ptr ) 11432c: 83 c4 10 add $0x10,%esp 11432f: 31 c0 xor %eax,%eax 114331: 83 3b 00 cmpl $0x0,(%ebx) 114334: 75 14 jne 11434a #if 0 fprintf(stdout, "%d %p", block, block_entry_ptr ); fflush(stdout); #endif memory = memfile_alloc_block(); 114336: e8 51 fb ff ff call 113e8c <== ALWAYS TAKEN 11433b: 89 c2 mov %eax,%edx if ( !memory ) 11433d: b8 01 00 00 00 mov $0x1,%eax 114342: 85 d2 test %edx,%edx 114344: 74 04 je 11434a <== ALWAYS TAKEN return 1; *block_entry_ptr = memory; 114346: 89 13 mov %edx,(%ebx) 114348: 30 c0 xor %al,%al return 0; } 11434a: 8b 5d fc mov -0x4(%ebp),%ebx 11434d: c9 leave 11434e: c3 ret 0011434f : MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, off_t new_length ) { 11434f: 55 push %ebp 114350: 89 e5 mov %esp,%ebp 114352: 57 push %edi 114353: 56 push %esi 114354: 53 push %ebx 114355: 83 ec 1c sub $0x1c,%esp 114358: 8b 5d 08 mov 0x8(%ebp),%ebx /* * Perform internal consistency checks */ assert( the_jnode ); 11435b: 85 db test %ebx,%ebx 11435d: 75 11 jne 114370 <== NEVER TAKEN 11435f: 68 c4 37 12 00 push $0x1237c4 <== NOT EXECUTED 114364: 68 80 39 12 00 push $0x123980 <== NOT EXECUTED 114369: 68 31 01 00 00 push $0x131 <== NOT EXECUTED 11436e: eb 15 jmp 114385 <== NOT EXECUTED if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 114370: 83 7b 4c 05 cmpl $0x5,0x4c(%ebx) 114374: 74 19 je 11438f <== NEVER TAKEN 114376: 68 14 38 12 00 push $0x123814 <== NOT EXECUTED 11437b: 68 80 39 12 00 push $0x123980 <== NOT EXECUTED 114380: 68 35 01 00 00 push $0x135 <== NOT EXECUTED 114385: 68 ce 37 12 00 push $0x1237ce <== NOT EXECUTED 11438a: e8 e1 3b 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 ) 11438f: 8b 0d b8 8d 12 00 mov 0x128db8,%ecx 114395: 89 ce mov %ecx,%esi 114397: c1 ee 02 shr $0x2,%esi 11439a: 8d 56 01 lea 0x1(%esi),%edx 11439d: 0f af d6 imul %esi,%edx 1143a0: 42 inc %edx 1143a1: 0f af d6 imul %esi,%edx 1143a4: 4a dec %edx 1143a5: 0f af d1 imul %ecx,%edx 1143a8: 39 55 0c cmp %edx,0xc(%ebp) 1143ab: 72 0d jb 1143ba <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); 1143ad: e8 0e 18 00 00 call 115bc0 <__errno> <== NOT EXECUTED 1143b2: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 1143b8: eb 66 jmp 114420 <== NOT EXECUTED if ( new_length <= the_jnode->info.file.size ) 1143ba: 8b 45 0c mov 0xc(%ebp),%eax 1143bd: 99 cltd 1143be: 89 45 e0 mov %eax,-0x20(%ebp) 1143c1: 89 55 e4 mov %edx,-0x1c(%ebp) 1143c4: 8b 73 50 mov 0x50(%ebx),%esi 1143c7: 8b 7b 54 mov 0x54(%ebx),%edi 1143ca: 39 fa cmp %edi,%edx 1143cc: 7f 06 jg 1143d4 <== ALWAYS TAKEN 1143ce: 7c 67 jl 114437 <== ALWAYS TAKEN 1143d0: 39 f0 cmp %esi,%eax 1143d2: 76 63 jbe 114437 /* * Calculate the number of range of blocks to allocate */ new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK; 1143d4: 8b 45 0c mov 0xc(%ebp),%eax 1143d7: 99 cltd 1143d8: f7 f9 idiv %ecx 1143da: 89 45 dc mov %eax,-0x24(%ebp) old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; 1143dd: 89 c8 mov %ecx,%eax 1143df: 99 cltd 1143e0: 52 push %edx 1143e1: 51 push %ecx 1143e2: 57 push %edi 1143e3: 56 push %esi 1143e4: e8 e3 c7 00 00 call 120bcc <__divdi3> 1143e9: 83 c4 10 add $0x10,%esp 1143ec: 89 c7 mov %eax,%edi 1143ee: 89 c6 mov %eax,%esi /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { 1143f0: eb 34 jmp 114426 <== ALWAYS TAKEN if ( IMFS_memfile_addblock( the_jnode, block ) ) { 1143f2: 50 push %eax 1143f3: 50 push %eax 1143f4: 56 push %esi 1143f5: 53 push %ebx 1143f6: e8 e5 fe ff ff call 1142e0 <== ALWAYS TAKEN 1143fb: 83 c4 10 add $0x10,%esp 1143fe: 85 c0 test %eax,%eax 114400: 74 23 je 114425 <== NEVER TAKEN 114402: eb 0d jmp 114411 <== NOT EXECUTED for ( ; block>=old_blocks ; block-- ) { IMFS_memfile_remove_block( the_jnode, block ); 114404: 51 push %ecx <== NOT EXECUTED 114405: 51 push %ecx <== NOT EXECUTED 114406: 56 push %esi <== NOT EXECUTED 114407: 53 push %ebx <== NOT EXECUTED 114408: e8 92 fc ff ff call 11409f <== 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-- ) { 11440d: 4e dec %esi <== NOT EXECUTED 11440e: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 114411: 39 fe cmp %edi,%esi <== NOT EXECUTED 114413: 73 ef jae 114404 <== NOT EXECUTED IMFS_memfile_remove_block( the_jnode, block ); } rtems_set_errno_and_return_minus_one( ENOSPC ); 114415: e8 a6 17 00 00 call 115bc0 <__errno> <== NOT EXECUTED 11441a: c7 00 1c 00 00 00 movl $0x1c,(%eax) <== NOT EXECUTED 114420: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 114423: eb 14 jmp 114439 <== NOT EXECUTED /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { 114425: 46 inc %esi 114426: 3b 75 dc cmp -0x24(%ebp),%esi 114429: 76 c7 jbe 1143f2 /* * Set the new length of the file. */ the_jnode->info.file.size = new_length; 11442b: 8b 45 e0 mov -0x20(%ebp),%eax 11442e: 8b 55 e4 mov -0x1c(%ebp),%edx 114431: 89 43 50 mov %eax,0x50(%ebx) 114434: 89 53 54 mov %edx,0x54(%ebx) 114437: 31 c0 xor %eax,%eax return 0; } 114439: 8d 65 f4 lea -0xc(%ebp),%esp 11443c: 5b pop %ebx 11443d: 5e pop %esi 11443e: 5f pop %edi 11443f: c9 leave 114440: c3 ret 00113eae : #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { 113eae: 55 push %ebp 113eaf: 89 e5 mov %esp,%ebp 113eb1: 57 push %edi 113eb2: 56 push %esi 113eb3: 53 push %ebx 113eb4: 83 ec 1c sub $0x1c,%esp 113eb7: 8b 5d 08 mov 0x8(%ebp),%ebx 113eba: 8b 7d 0c mov 0xc(%ebp),%edi 113ebd: 8b 75 10 mov 0x10(%ebp),%esi /* * Perform internal consistency checks */ assert( the_jnode ); 113ec0: 85 db test %ebx,%ebx 113ec2: 75 11 jne 113ed5 <== NEVER TAKEN 113ec4: 68 c4 37 12 00 push $0x1237c4 <== NOT EXECUTED 113ec9: 68 d0 38 12 00 push $0x1238d0 <== NOT EXECUTED 113ece: 68 88 03 00 00 push $0x388 <== NOT EXECUTED 113ed3: eb 15 jmp 113eea <== NOT EXECUTED if ( !the_jnode ) return NULL; assert( the_jnode->type == IMFS_MEMORY_FILE ); 113ed5: 83 7b 4c 05 cmpl $0x5,0x4c(%ebx) 113ed9: 74 19 je 113ef4 <== NEVER TAKEN 113edb: 68 14 38 12 00 push $0x123814 <== NOT EXECUTED 113ee0: 68 d0 38 12 00 push $0x1238d0 <== NOT EXECUTED 113ee5: 68 8c 03 00 00 push $0x38c <== NOT EXECUTED 113eea: 68 ce 37 12 00 push $0x1237ce <== NOT EXECUTED 113eef: e8 7c 40 ff ff call 107f70 <__assert_func> <== NOT EXECUTED /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { 113ef4: 8b 0d b8 8d 12 00 mov 0x128db8,%ecx 113efa: c1 e9 02 shr $0x2,%ecx 113efd: 8d 41 ff lea -0x1(%ecx),%eax 113f00: 39 c7 cmp %eax,%edi 113f02: 77 2f ja 113f33 <== ALWAYS TAKEN #if 0 fprintf(stdout, "(s %d) ", block ); fflush(stdout); #endif p = info->indirect; 113f04: 8b 53 58 mov 0x58(%ebx),%edx if ( malloc_it ) { 113f07: 85 f6 test %esi,%esi 113f09: 74 23 je 113f2e if ( !p ) { 113f0b: 85 d2 test %edx,%edx 113f0d: 75 10 jne 113f1f p = memfile_alloc_block(); 113f0f: e8 78 ff ff ff call 113e8c <== ALWAYS TAKEN if ( !p ) 113f14: 85 c0 test %eax,%eax 113f16: 0f 84 0f 01 00 00 je 11402b <== ALWAYS TAKEN return 0; info->indirect = p; 113f1c: 89 43 58 mov %eax,0x58(%ebx) } return &info->indirect[ my_block ]; 113f1f: 8d 04 bd 00 00 00 00 lea 0x0(,%edi,4),%eax 113f26: 03 43 58 add 0x58(%ebx),%eax 113f29: e9 ff 00 00 00 jmp 11402d <== ALWAYS TAKEN } if ( !p ) return 0; return &info->indirect[ my_block ]; 113f2e: 8d 04 ba lea (%edx,%edi,4),%eax 113f31: eb 69 jmp 113f9c <== ALWAYS TAKEN /* * Is the block number in the doubly indirect portion? */ if ( my_block <= LAST_DOUBLY_INDIRECT ) { 113f33: 8d 41 01 lea 0x1(%ecx),%eax <== NOT EXECUTED 113f36: 0f af c1 imul %ecx,%eax <== NOT EXECUTED 113f39: 8d 50 ff lea -0x1(%eax),%edx <== NOT EXECUTED 113f3c: 39 d7 cmp %edx,%edi <== NOT EXECUTED 113f3e: 77 69 ja 113fa9 <== NOT EXECUTED #if 0 fprintf(stdout, "(d %d) ", block ); fflush(stdout); #endif my_block -= FIRST_DOUBLY_INDIRECT; 113f40: 29 cf sub %ecx,%edi <== NOT EXECUTED singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 113f42: 89 f8 mov %edi,%eax <== NOT EXECUTED 113f44: 31 d2 xor %edx,%edx <== NOT EXECUTED 113f46: f7 f1 div %ecx <== NOT EXECUTED 113f48: 89 55 e4 mov %edx,-0x1c(%ebp) <== NOT EXECUTED 113f4b: 89 c7 mov %eax,%edi <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; p = info->doubly_indirect; 113f4d: 8b 43 5c mov 0x5c(%ebx),%eax <== NOT EXECUTED if ( malloc_it ) { 113f50: 85 f6 test %esi,%esi <== NOT EXECUTED 113f52: 74 37 je 113f8b <== NOT EXECUTED if ( !p ) { 113f54: 85 c0 test %eax,%eax <== NOT EXECUTED 113f56: 75 10 jne 113f68 <== NOT EXECUTED p = memfile_alloc_block(); 113f58: e8 2f ff ff ff call 113e8c <== NOT EXECUTED if ( !p ) 113f5d: 85 c0 test %eax,%eax <== NOT EXECUTED 113f5f: 0f 84 c6 00 00 00 je 11402b <== NOT EXECUTED return 0; info->doubly_indirect = p; 113f65: 89 43 5c mov %eax,0x5c(%ebx) <== NOT EXECUTED } p1 = (block_p *)p[ doubly ]; 113f68: 8d 1c b8 lea (%eax,%edi,4),%ebx <== NOT EXECUTED 113f6b: 8b 03 mov (%ebx),%eax <== NOT EXECUTED if ( !p1 ) { 113f6d: 85 c0 test %eax,%eax <== NOT EXECUTED 113f6f: 75 0f jne 113f80 <== NOT EXECUTED p1 = memfile_alloc_block(); 113f71: e8 16 ff ff ff call 113e8c <== NOT EXECUTED if ( !p1 ) 113f76: 85 c0 test %eax,%eax <== NOT EXECUTED 113f78: 0f 84 ad 00 00 00 je 11402b <== NOT EXECUTED return 0; p[ doubly ] = (block_p) p1; 113f7e: 89 03 mov %eax,(%ebx) <== NOT EXECUTED } return (block_p *)&p1[ singly ]; 113f80: 8b 4d e4 mov -0x1c(%ebp),%ecx <== NOT EXECUTED 113f83: 8d 04 88 lea (%eax,%ecx,4),%eax <== NOT EXECUTED 113f86: e9 a2 00 00 00 jmp 11402d <== NOT EXECUTED } if ( !p ) 113f8b: 85 c0 test %eax,%eax <== NOT EXECUTED 113f8d: 0f 84 98 00 00 00 je 11402b <== NOT EXECUTED return 0; p = (block_p *)p[ doubly ]; 113f93: 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 ]; 113f96: 8b 4d e4 mov -0x1c(%ebp),%ecx <== NOT EXECUTED 113f99: 8d 04 8a lea (%edx,%ecx,4),%eax <== NOT EXECUTED if ( !p ) return 0; p = (block_p *)p[ doubly ]; if ( !p ) 113f9c: 85 d2 test %edx,%edx 113f9e: 0f 85 89 00 00 00 jne 11402d <== NEVER TAKEN 113fa4: e9 82 00 00 00 jmp 11402b <== NOT EXECUTED #endif /* * Is the block number in the triply indirect portion? */ if ( my_block <= LAST_TRIPLY_INDIRECT ) { 113fa9: 8d 50 01 lea 0x1(%eax),%edx <== NOT EXECUTED 113fac: 0f af d1 imul %ecx,%edx <== NOT EXECUTED 113faf: 4a dec %edx <== NOT EXECUTED 113fb0: 39 d7 cmp %edx,%edi <== NOT EXECUTED 113fb2: 77 77 ja 11402b <== NOT EXECUTED my_block -= FIRST_TRIPLY_INDIRECT; 113fb4: 29 c7 sub %eax,%edi <== NOT EXECUTED 113fb6: 89 f8 mov %edi,%eax <== NOT EXECUTED singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 113fb8: 31 d2 xor %edx,%edx <== NOT EXECUTED 113fba: f7 f1 div %ecx <== NOT EXECUTED 113fbc: 89 55 e4 mov %edx,-0x1c(%ebp) <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS; 113fbf: 31 d2 xor %edx,%edx <== NOT EXECUTED 113fc1: f7 f1 div %ecx <== NOT EXECUTED 113fc3: 89 55 e0 mov %edx,-0x20(%ebp) <== NOT EXECUTED 113fc6: 89 c7 mov %eax,%edi <== NOT EXECUTED doubly %= IMFS_MEMFILE_BLOCK_SLOTS; p = info->triply_indirect; 113fc8: 8b 43 60 mov 0x60(%ebx),%eax <== NOT EXECUTED if ( malloc_it ) { 113fcb: 85 f6 test %esi,%esi <== NOT EXECUTED 113fcd: 74 43 je 114012 <== NOT EXECUTED if ( !p ) { 113fcf: 85 c0 test %eax,%eax <== NOT EXECUTED 113fd1: 75 0c jne 113fdf <== NOT EXECUTED p = memfile_alloc_block(); 113fd3: e8 b4 fe ff ff call 113e8c <== NOT EXECUTED if ( !p ) 113fd8: 85 c0 test %eax,%eax <== NOT EXECUTED 113fda: 74 4f je 11402b <== NOT EXECUTED return 0; info->triply_indirect = p; 113fdc: 89 43 60 mov %eax,0x60(%ebx) <== NOT EXECUTED } p1 = (block_p *) p[ triply ]; 113fdf: 8d 1c b8 lea (%eax,%edi,4),%ebx <== NOT EXECUTED 113fe2: 8b 03 mov (%ebx),%eax <== NOT EXECUTED if ( !p1 ) { 113fe4: 85 c0 test %eax,%eax <== NOT EXECUTED 113fe6: 75 0b jne 113ff3 <== NOT EXECUTED p1 = memfile_alloc_block(); 113fe8: e8 9f fe ff ff call 113e8c <== NOT EXECUTED if ( !p1 ) 113fed: 85 c0 test %eax,%eax <== NOT EXECUTED 113fef: 74 3a je 11402b <== NOT EXECUTED return 0; p[ triply ] = (block_p) p1; 113ff1: 89 03 mov %eax,(%ebx) <== NOT EXECUTED } p2 = (block_p *)p1[ doubly ]; 113ff3: 8b 4d e0 mov -0x20(%ebp),%ecx <== NOT EXECUTED 113ff6: 8d 1c 88 lea (%eax,%ecx,4),%ebx <== NOT EXECUTED 113ff9: 8b 03 mov (%ebx),%eax <== NOT EXECUTED if ( !p2 ) { 113ffb: 85 c0 test %eax,%eax <== NOT EXECUTED 113ffd: 75 0b jne 11400a <== NOT EXECUTED p2 = memfile_alloc_block(); 113fff: e8 88 fe ff ff call 113e8c <== NOT EXECUTED if ( !p2 ) 114004: 85 c0 test %eax,%eax <== NOT EXECUTED 114006: 74 23 je 11402b <== NOT EXECUTED return 0; p1[ doubly ] = (block_p) p2; 114008: 89 03 mov %eax,(%ebx) <== NOT EXECUTED } return (block_p *)&p2[ singly ]; 11400a: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED 11400d: 8d 04 90 lea (%eax,%edx,4),%eax <== NOT EXECUTED 114010: eb 1b jmp 11402d <== NOT EXECUTED } if ( !p ) 114012: 85 c0 test %eax,%eax <== NOT EXECUTED 114014: 74 15 je 11402b <== 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 ]; 114016: 8b 14 b8 mov (%eax,%edi,4),%edx <== NOT EXECUTED if ( !p1 ) 114019: 85 d2 test %edx,%edx <== NOT EXECUTED 11401b: 74 0e je 11402b <== NOT EXECUTED p2 = (block_p *)p1[ doubly ]; if ( !p ) return 0; return (block_p *)&p2[ singly ]; 11401d: 8b 45 e4 mov -0x1c(%ebp),%eax <== NOT EXECUTED 114020: c1 e0 02 shl $0x2,%eax <== NOT EXECUTED 114023: 8b 4d e0 mov -0x20(%ebp),%ecx <== NOT EXECUTED 114026: 03 04 8a add (%edx,%ecx,4),%eax <== NOT EXECUTED 114029: eb 02 jmp 11402d <== NOT EXECUTED 11402b: 31 c0 xor %eax,%eax <== NOT EXECUTED /* * This means the requested block number is out of range. */ return 0; } 11402d: 8d 65 f4 lea -0xc(%ebp),%esp 114030: 5b pop %ebx 114031: 5e pop %esi 114032: 5f pop %edi 114033: c9 leave 114034: c3 ret 00114789 : IMFS_jnode_t *the_jnode, off_t start, unsigned char *destination, unsigned int length ) { 114789: 55 push %ebp 11478a: 89 e5 mov %esp,%ebp 11478c: 57 push %edi 11478d: 56 push %esi 11478e: 53 push %ebx 11478f: 83 ec 3c sub $0x3c,%esp /* * Perform internal consistency checks */ assert( the_jnode ); 114792: 83 7d 08 00 cmpl $0x0,0x8(%ebp) 114796: 75 11 jne 1147a9 <== NEVER TAKEN 114798: 68 c4 37 12 00 push $0x1237c4 <== NOT EXECUTED 11479d: 68 04 39 12 00 push $0x123904 <== NOT EXECUTED 1147a2: 68 4c 02 00 00 push $0x24c <== NOT EXECUTED 1147a7: eb 1d jmp 1147c6 <== NOT EXECUTED if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE || 1147a9: 8b 45 08 mov 0x8(%ebp),%eax 1147ac: 8b 48 4c mov 0x4c(%eax),%ecx 1147af: 8d 59 fb lea -0x5(%ecx),%ebx 1147b2: 83 fb 01 cmp $0x1,%ebx 1147b5: 76 19 jbe 1147d0 <== NEVER TAKEN 1147b7: 68 7e 38 12 00 push $0x12387e <== NOT EXECUTED 1147bc: 68 04 39 12 00 push $0x123904 <== NOT EXECUTED 1147c1: 68 51 02 00 00 push $0x251 <== NOT EXECUTED 1147c6: 68 ce 37 12 00 push $0x1237ce <== NOT EXECUTED 1147cb: e8 a0 37 ff ff call 107f70 <__assert_func> <== NOT EXECUTED /* * Error checks on arguments */ assert( dest ); 1147d0: 83 7d 10 00 cmpl $0x0,0x10(%ebp) 1147d4: 75 11 jne 1147e7 <== NEVER TAKEN 1147d6: 68 c9 38 12 00 push $0x1238c9 <== NOT EXECUTED 1147db: 68 04 39 12 00 push $0x123904 <== NOT EXECUTED 1147e0: 68 5a 02 00 00 push $0x25a <== NOT EXECUTED 1147e5: eb df jmp 1147c6 <== NOT EXECUTED /* * If there is nothing to read, then quick exit. */ my_length = length; if ( !my_length ) 1147e7: 83 7d 14 00 cmpl $0x0,0x14(%ebp) 1147eb: 75 13 jne 114800 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); 1147ed: e8 ce 13 00 00 call 115bc0 <__errno> <== NOT EXECUTED 1147f2: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 1147f8: 83 cb ff or $0xffffffff,%ebx <== NOT EXECUTED 1147fb: e9 a3 01 00 00 jmp 1149a3 <== NOT EXECUTED /* * Linear files (as created from a tar file are easier to handle * than block files). */ if (the_jnode->type == IMFS_LINEAR_FILE) { 114800: 83 f9 06 cmp $0x6,%ecx 114803: 75 64 jne 114869 <== NEVER TAKEN unsigned char *file_ptr; file_ptr = (unsigned char *)the_jnode->info.linearfile.direct; 114805: 8b 55 08 mov 0x8(%ebp),%edx <== NOT EXECUTED 114808: 8b 7a 58 mov 0x58(%edx),%edi <== NOT EXECUTED if (my_length > (the_jnode->info.linearfile.size - start)) 11480b: 8b 5a 50 mov 0x50(%edx),%ebx <== NOT EXECUTED 11480e: 8b 72 54 mov 0x54(%edx),%esi <== NOT EXECUTED 114811: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED 114814: 99 cltd <== NOT EXECUTED 114815: 89 45 d0 mov %eax,-0x30(%ebp) <== NOT EXECUTED 114818: 89 55 d4 mov %edx,-0x2c(%ebp) <== NOT EXECUTED 11481b: 89 da mov %ebx,%edx <== NOT EXECUTED 11481d: 89 f1 mov %esi,%ecx <== NOT EXECUTED 11481f: 2b 55 d0 sub -0x30(%ebp),%edx <== NOT EXECUTED 114822: 1b 4d d4 sbb -0x2c(%ebp),%ecx <== NOT EXECUTED 114825: 89 55 d0 mov %edx,-0x30(%ebp) <== NOT EXECUTED 114828: 89 4d d4 mov %ecx,-0x2c(%ebp) <== NOT EXECUTED 11482b: 31 c9 xor %ecx,%ecx <== NOT EXECUTED 11482d: 3b 4d d4 cmp -0x2c(%ebp),%ecx <== NOT EXECUTED 114830: 7f 0c jg 11483e <== NOT EXECUTED 114832: 7c 05 jl 114839 <== NOT EXECUTED 114834: 39 55 14 cmp %edx,0x14(%ebp) <== NOT EXECUTED 114837: 77 05 ja 11483e <== NOT EXECUTED 114839: 8b 5d 14 mov 0x14(%ebp),%ebx <== NOT EXECUTED 11483c: eb 03 jmp 114841 <== NOT EXECUTED my_length = the_jnode->info.linearfile.size - start; 11483e: 2b 5d 0c sub 0xc(%ebp),%ebx <== NOT EXECUTED memcpy(dest, &file_ptr[start], my_length); 114841: 8b 4d 0c mov 0xc(%ebp),%ecx <== NOT EXECUTED 114844: 8d 34 0f lea (%edi,%ecx,1),%esi <== NOT EXECUTED 114847: 8b 7d 10 mov 0x10(%ebp),%edi <== NOT EXECUTED 11484a: 89 d9 mov %ebx,%ecx <== NOT EXECUTED 11484c: f3 a4 rep movsb %ds:(%esi),%es:(%edi) <== NOT EXECUTED IMFS_update_atime( the_jnode ); 11484e: 51 push %ecx <== NOT EXECUTED 11484f: 51 push %ecx <== NOT EXECUTED 114850: 6a 00 push $0x0 <== NOT EXECUTED 114852: 8d 45 e0 lea -0x20(%ebp),%eax <== NOT EXECUTED 114855: 50 push %eax <== NOT EXECUTED 114856: e8 b9 3a ff ff call 108314 <== NOT EXECUTED 11485b: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED 11485e: 8b 7d 08 mov 0x8(%ebp),%edi <== NOT EXECUTED 114861: 89 47 40 mov %eax,0x40(%edi) <== NOT EXECUTED 114864: e9 37 01 00 00 jmp 1149a0 <== 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 ) 114869: 8b 45 08 mov 0x8(%ebp),%eax 11486c: 8b 58 50 mov 0x50(%eax),%ebx 11486f: 8b 4d 14 mov 0x14(%ebp),%ecx 114872: 03 4d 0c add 0xc(%ebp),%ecx 114875: 31 f6 xor %esi,%esi 114877: 3b 70 54 cmp 0x54(%eax),%esi 11487a: 7f 0e jg 11488a <== ALWAYS TAKEN 11487c: 7c 04 jl 114882 <== ALWAYS TAKEN 11487e: 39 d9 cmp %ebx,%ecx 114880: 77 08 ja 11488a <== NEVER TAKEN 114882: 8b 55 14 mov 0x14(%ebp),%edx <== NOT EXECUTED 114885: 89 55 d0 mov %edx,-0x30(%ebp) <== NOT EXECUTED 114888: eb 06 jmp 114890 <== NOT EXECUTED my_length = the_jnode->info.file.size - start; 11488a: 2b 5d 0c sub 0xc(%ebp),%ebx 11488d: 89 5d d0 mov %ebx,-0x30(%ebp) /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 114890: 8b 1d b8 8d 12 00 mov 0x128db8,%ebx 114896: 8b 45 0c mov 0xc(%ebp),%eax 114899: 99 cltd 11489a: f7 fb idiv %ebx 11489c: 89 d6 mov %edx,%esi 11489e: 89 45 c4 mov %eax,-0x3c(%ebp) block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 1148a1: 89 c2 mov %eax,%edx if ( start_offset ) { 1148a3: 85 f6 test %esi,%esi 1148a5: 75 0a jne 1148b1 1148a7: 8b 4d 10 mov 0x10(%ebp),%ecx 1148aa: 89 4d c8 mov %ecx,-0x38(%ebp) 1148ad: 31 db xor %ebx,%ebx 1148af: eb 49 jmp 1148fa <== 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 ); 1148b1: 52 push %edx 1148b2: 6a 00 push $0x0 1148b4: ff 75 c4 pushl -0x3c(%ebp) 1148b7: ff 75 08 pushl 0x8(%ebp) 1148ba: e8 ef f5 ff ff call 113eae assert( block_ptr ); 1148bf: 83 c4 10 add $0x10,%esp 1148c2: 85 c0 test %eax,%eax 1148c4: 75 14 jne 1148da <== NEVER TAKEN 1148c6: 68 44 38 12 00 push $0x123844 <== NOT EXECUTED 1148cb: 68 04 39 12 00 push $0x123904 <== NOT EXECUTED 1148d0: 68 96 02 00 00 push $0x296 <== NOT EXECUTED 1148d5: e9 ec fe ff ff jmp 1147c6 <== 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; 1148da: 89 da mov %ebx,%edx 1148dc: 29 f2 sub %esi,%edx 1148de: 8b 5d d0 mov -0x30(%ebp),%ebx 1148e1: 39 d3 cmp %edx,%ebx 1148e3: 76 02 jbe 1148e7 1148e5: 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 ); 1148e7: 03 30 add (%eax),%esi dest += to_copy; 1148e9: 8b 7d 10 mov 0x10(%ebp),%edi 1148ec: 89 d9 mov %ebx,%ecx 1148ee: f3 a4 rep movsb %ds:(%esi),%es:(%edi) 1148f0: 89 7d c8 mov %edi,-0x38(%ebp) block++; 1148f3: 8b 55 c4 mov -0x3c(%ebp),%edx 1148f6: 42 inc %edx my_length -= to_copy; 1148f7: 29 5d d0 sub %ebx,-0x30(%ebp) /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; 1148fa: a1 b8 8d 12 00 mov 0x128db8,%eax 1148ff: 89 45 cc mov %eax,-0x34(%ebp) while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 114902: eb 43 jmp 114947 <== ALWAYS TAKEN block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 114904: 50 push %eax 114905: 6a 00 push $0x0 114907: 52 push %edx 114908: ff 75 08 pushl 0x8(%ebp) 11490b: 89 55 c0 mov %edx,-0x40(%ebp) 11490e: e8 9b f5 ff ff call 113eae assert( block_ptr ); 114913: 83 c4 10 add $0x10,%esp 114916: 85 c0 test %eax,%eax 114918: 8b 55 c0 mov -0x40(%ebp),%edx 11491b: 75 14 jne 114931 <== NEVER TAKEN 11491d: 68 44 38 12 00 push $0x123844 <== NOT EXECUTED 114922: 68 04 39 12 00 push $0x123904 <== NOT EXECUTED 114927: 68 a7 02 00 00 push $0x2a7 <== NOT EXECUTED 11492c: e9 95 fe ff ff jmp 1147c6 <== NOT EXECUTED if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); 114931: 8b 30 mov (%eax),%esi 114933: 8b 7d c8 mov -0x38(%ebp),%edi 114936: 8b 4d cc mov -0x34(%ebp),%ecx 114939: f3 a4 rep movsb %ds:(%esi),%es:(%edi) dest += to_copy; 11493b: 89 7d c8 mov %edi,-0x38(%ebp) block++; 11493e: 42 inc %edx my_length -= to_copy; 11493f: 8b 4d cc mov -0x34(%ebp),%ecx 114942: 29 4d d0 sub %ecx,-0x30(%ebp) copied += to_copy; 114945: 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 ) { 114947: 8b 7d d0 mov -0x30(%ebp),%edi 11494a: 3b 3d b8 8d 12 00 cmp 0x128db8,%edi 114950: 73 b2 jae 114904 * Phase 3: possibly the first part of one block */ assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); if ( my_length ) { 114952: 85 ff test %edi,%edi 114954: 74 34 je 11498a block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 114956: 57 push %edi 114957: 6a 00 push $0x0 114959: 52 push %edx 11495a: ff 75 08 pushl 0x8(%ebp) 11495d: e8 4c f5 ff ff call 113eae assert( block_ptr ); 114962: 83 c4 10 add $0x10,%esp 114965: 85 c0 test %eax,%eax 114967: 75 14 jne 11497d <== NEVER TAKEN 114969: 68 44 38 12 00 push $0x123844 <== NOT EXECUTED 11496e: 68 04 39 12 00 push $0x123904 <== NOT EXECUTED 114973: 68 b9 02 00 00 push $0x2b9 <== NOT EXECUTED 114978: e9 49 fe ff ff jmp 1147c6 <== NOT EXECUTED if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], my_length ); 11497d: 8b 30 mov (%eax),%esi 11497f: 8b 7d c8 mov -0x38(%ebp),%edi 114982: 8b 4d d0 mov -0x30(%ebp),%ecx 114985: f3 a4 rep movsb %ds:(%esi),%es:(%edi) copied += my_length; 114987: 03 5d d0 add -0x30(%ebp),%ebx } IMFS_update_atime( the_jnode ); 11498a: 56 push %esi 11498b: 56 push %esi 11498c: 6a 00 push $0x0 11498e: 8d 45 e0 lea -0x20(%ebp),%eax 114991: 50 push %eax 114992: e8 7d 39 ff ff call 108314 114997: 8b 45 e0 mov -0x20(%ebp),%eax 11499a: 8b 55 08 mov 0x8(%ebp),%edx 11499d: 89 42 40 mov %eax,0x40(%edx) return copied; 1149a0: 83 c4 10 add $0x10,%esp } 1149a3: 89 d8 mov %ebx,%eax 1149a5: 8d 65 f4 lea -0xc(%ebp),%esp 1149a8: 5b pop %ebx 1149a9: 5e pop %esi 1149aa: 5f pop %edi 1149ab: c9 leave 1149ac: c3 ret 001140ea : */ int IMFS_memfile_remove( IMFS_jnode_t *the_jnode ) { 1140ea: 55 push %ebp 1140eb: 89 e5 mov %esp,%ebp 1140ed: 57 push %edi 1140ee: 56 push %esi 1140ef: 53 push %ebx 1140f0: 83 ec 1c sub $0x1c,%esp 1140f3: 8b 5d 08 mov 0x8(%ebp),%ebx /* * Perform internal consistency checks */ assert( the_jnode ); 1140f6: 85 db test %ebx,%ebx 1140f8: 75 11 jne 11410b <== NEVER TAKEN 1140fa: 68 c4 37 12 00 push $0x1237c4 <== NOT EXECUTED 1140ff: 68 18 39 12 00 push $0x123918 <== NOT EXECUTED 114104: 68 ee 01 00 00 push $0x1ee <== NOT EXECUTED 114109: eb 15 jmp 114120 <== NOT EXECUTED if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 11410b: 83 7b 4c 05 cmpl $0x5,0x4c(%ebx) 11410f: 74 19 je 11412a <== NEVER TAKEN 114111: 68 14 38 12 00 push $0x123814 <== NOT EXECUTED 114116: 68 18 39 12 00 push $0x123918 <== NOT EXECUTED 11411b: 68 f2 01 00 00 push $0x1f2 <== NOT EXECUTED 114120: 68 ce 37 12 00 push $0x1237ce <== NOT EXECUTED 114125: e8 46 3e 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; 11412a: 8b 35 b8 8d 12 00 mov 0x128db8,%esi 114130: c1 ee 02 shr $0x2,%esi * + indirect * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; 114133: 83 7b 58 00 cmpl $0x0,0x58(%ebx) 114137: 74 0f je 114148 if ( info->indirect ) { memfile_free_blocks_in_table( &info->indirect, to_free ); 114139: 57 push %edi 11413a: 57 push %edi 11413b: 56 push %esi 11413c: 8d 43 58 lea 0x58(%ebx),%eax 11413f: 50 push %eax 114140: e8 f0 fe ff ff call 114035 <== ALWAYS TAKEN 114145: 83 c4 10 add $0x10,%esp * + indirect * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; 114148: 31 ff xor %edi,%edi 11414a: 83 7b 5c 00 cmpl $0x0,0x5c(%ebx) 11414e: 75 21 jne 114171 <== ALWAYS TAKEN 114150: eb 3a jmp 11418c <== ALWAYS TAKEN } if ( info->doubly_indirect ) { for ( i=0 ; idoubly_indirect[i] ) { 114152: 8b 43 5c mov 0x5c(%ebx),%eax <== NOT EXECUTED 114155: 8d 14 bd 00 00 00 00 lea 0x0(,%edi,4),%edx <== NOT EXECUTED 11415c: 83 3c b8 00 cmpl $0x0,(%eax,%edi,4) <== NOT EXECUTED 114160: 74 0e je 114170 <== NOT EXECUTED memfile_free_blocks_in_table( 114162: 51 push %ecx <== NOT EXECUTED 114163: 51 push %ecx <== NOT EXECUTED 114164: 56 push %esi <== NOT EXECUTED 114165: 01 d0 add %edx,%eax <== NOT EXECUTED 114167: 50 push %eax <== NOT EXECUTED 114168: e8 c8 fe ff ff call 114035 <== NOT EXECUTED 11416d: 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 ); 11417d: 57 push %edi <== NOT EXECUTED 11417e: 57 push %edi <== NOT EXECUTED 11417f: 56 push %esi <== NOT EXECUTED 114180: 8d 43 5c lea 0x5c(%ebx),%eax <== NOT EXECUTED 114183: 50 push %eax <== NOT EXECUTED 114184: e8 ac fe ff ff call 114035 <== NOT EXECUTED 114189: 83 c4 10 add $0x10,%esp <== NOT EXECUTED * + indirect * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; 11418c: 31 ff xor %edi,%edi 11418e: 83 7b 60 00 cmpl $0x0,0x60(%ebx) 114192: 75 5b jne 1141ef <== ALWAYS TAKEN 114194: eb 74 jmp 11420a <== ALWAYS TAKEN 114196: 8d 04 bd 00 00 00 00 lea 0x0(,%edi,4),%eax <== NOT EXECUTED 11419d: 89 45 e4 mov %eax,-0x1c(%ebp) <== NOT EXECUTED } if ( info->triply_indirect ) { for ( i=0 ; itriply_indirect[i]; 1141a0: 8b 43 60 mov 0x60(%ebx),%eax <== NOT EXECUTED 1141a3: 8b 04 b8 mov (%eax,%edi,4),%eax <== NOT EXECUTED if ( !p ) /* ensure we have a valid pointer */ 1141a6: 85 c0 test %eax,%eax <== NOT EXECUTED 1141a8: 74 51 je 1141fb <== NOT EXECUTED 1141aa: 31 d2 xor %edx,%edx <== NOT EXECUTED 1141ac: eb 21 jmp 1141cf <== NOT EXECUTED break; for ( j=0 ; j <== NOT EXECUTED memfile_free_blocks_in_table( (block_p **)&p[j], to_free); 1141b3: 51 push %ecx <== NOT EXECUTED 1141b4: 51 push %ecx <== NOT EXECUTED 1141b5: 56 push %esi <== NOT EXECUTED 1141b6: 50 push %eax <== NOT EXECUTED 1141b7: 89 45 e0 mov %eax,-0x20(%ebp) <== NOT EXECUTED 1141ba: 89 55 dc mov %edx,-0x24(%ebp) <== NOT EXECUTED 1141bd: e8 73 fe ff ff call 114035 <== NOT EXECUTED 1141c2: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 1141c5: 8b 55 dc mov -0x24(%ebp),%edx <== NOT EXECUTED 1141c8: 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( 1141dc: 52 push %edx <== NOT EXECUTED 1141dd: 52 push %edx <== NOT EXECUTED 1141de: 56 push %esi <== NOT EXECUTED 1141df: 8b 45 e4 mov -0x1c(%ebp),%eax <== NOT EXECUTED 1141e2: 03 43 60 add 0x60(%ebx),%eax <== NOT EXECUTED 1141e5: 50 push %eax <== NOT EXECUTED 1141e6: e8 4a fe ff ff call 114035 <== 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( 1141fb: 50 push %eax <== NOT EXECUTED 1141fc: 50 push %eax <== NOT EXECUTED 1141fd: 56 push %esi <== NOT EXECUTED 1141fe: 83 c3 60 add $0x60,%ebx <== NOT EXECUTED 114201: 53 push %ebx <== NOT EXECUTED 114202: e8 2e fe ff ff call 114035 <== NOT EXECUTED 114207: 83 c4 10 add $0x10,%esp <== NOT EXECUTED (block_p **)&info->triply_indirect, to_free ); } return 0; } 11420a: 31 c0 xor %eax,%eax 11420c: 8d 65 f4 lea -0xc(%ebp),%esp 11420f: 5b pop %ebx 114210: 5e pop %esi 114211: 5f pop %edi 114212: c9 leave 114213: c3 ret 0011409f : MEMFILE_STATIC int IMFS_memfile_remove_block( IMFS_jnode_t *the_jnode, unsigned int block ) { 11409f: 55 push %ebp <== NOT EXECUTED 1140a0: 89 e5 mov %esp,%ebp <== NOT EXECUTED 1140a2: 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 ); 1140a5: 6a 00 push $0x0 <== NOT EXECUTED 1140a7: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED 1140aa: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED 1140ad: e8 fc fd ff ff call 113eae <== NOT EXECUTED assert( block_ptr ); 1140b2: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 1140b5: 85 c0 test %eax,%eax <== NOT EXECUTED 1140b7: 75 19 jne 1140d2 <== NOT EXECUTED 1140b9: 68 44 38 12 00 push $0x123844 <== NOT EXECUTED 1140be: 68 4c 39 12 00 push $0x12394c <== NOT EXECUTED 1140c3: 68 96 01 00 00 push $0x196 <== NOT EXECUTED 1140c8: 68 ce 37 12 00 push $0x1237ce <== NOT EXECUTED 1140cd: e8 9e 3e ff ff call 107f70 <__assert_func> <== NOT EXECUTED if ( block_ptr ) { ptr = *block_ptr; 1140d2: 8b 10 mov (%eax),%edx <== NOT EXECUTED *block_ptr = 0; 1140d4: c7 00 00 00 00 00 movl $0x0,(%eax) <== NOT EXECUTED memfile_free_block( ptr ); 1140da: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1140dd: 52 push %edx <== NOT EXECUTED 1140de: e8 90 fd ff ff call 113e73 <== NOT EXECUTED } return 1; } 1140e3: b8 01 00 00 00 mov $0x1,%eax <== NOT EXECUTED 1140e8: c9 leave <== NOT EXECUTED 1140e9: c3 ret <== NOT EXECUTED 001144fc : IMFS_jnode_t *the_jnode, off_t start, const unsigned char *source, unsigned int length ) { 1144fc: 55 push %ebp 1144fd: 89 e5 mov %esp,%ebp 1144ff: 57 push %edi 114500: 56 push %esi 114501: 53 push %ebx 114502: 83 ec 3c sub $0x3c,%esp 114505: 8b 5d 08 mov 0x8(%ebp),%ebx 114508: 8b 7d 0c mov 0xc(%ebp),%edi /* * Perform internal consistency checks */ assert( the_jnode ); 11450b: 85 db test %ebx,%ebx 11450d: 75 11 jne 114520 <== NEVER TAKEN 11450f: 68 c4 37 12 00 push $0x1237c4 <== NOT EXECUTED 114514: 68 f0 38 12 00 push $0x1238f0 <== NOT EXECUTED 114519: 68 e3 02 00 00 push $0x2e3 <== NOT EXECUTED 11451e: eb 15 jmp 114535 <== NOT EXECUTED if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 114520: 83 7b 4c 05 cmpl $0x5,0x4c(%ebx) 114524: 74 19 je 11453f <== NEVER TAKEN 114526: 68 14 38 12 00 push $0x123814 <== NOT EXECUTED 11452b: 68 f0 38 12 00 push $0x1238f0 <== NOT EXECUTED 114530: 68 e7 02 00 00 push $0x2e7 <== NOT EXECUTED 114535: 68 ce 37 12 00 push $0x1237ce <== NOT EXECUTED 11453a: e8 31 3a ff ff call 107f70 <__assert_func> <== NOT EXECUTED /* * Error check arguments */ assert( source ); 11453f: 83 7d 10 00 cmpl $0x0,0x10(%ebp) 114543: 75 11 jne 114556 <== NEVER TAKEN 114545: 68 4e 38 12 00 push $0x12384e <== NOT EXECUTED 11454a: 68 f0 38 12 00 push $0x1238f0 <== NOT EXECUTED 11454f: 68 ef 02 00 00 push $0x2ef <== NOT EXECUTED 114554: eb df jmp 114535 <== NOT EXECUTED /* * If there is nothing to write, then quick exit. */ my_length = length; if ( !my_length ) 114556: 83 7d 14 00 cmpl $0x0,0x14(%ebp) 11455a: 75 0d jne 114569 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); 11455c: e8 5f 16 00 00 call 115bc0 <__errno> <== NOT EXECUTED 114561: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 114567: eb 2e jmp 114597 <== 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; 114569: 8b 45 14 mov 0x14(%ebp),%eax 11456c: 01 f8 add %edi,%eax if ( last_byte > the_jnode->info.file.size ) { 11456e: 31 d2 xor %edx,%edx 114570: 3b 53 54 cmp 0x54(%ebx),%edx 114573: 7c 2a jl 11459f <== ALWAYS TAKEN 114575: 7f 05 jg 11457c <== ALWAYS TAKEN 114577: 3b 43 50 cmp 0x50(%ebx),%eax 11457a: 76 23 jbe 11459f <== ALWAYS TAKEN status = IMFS_memfile_extend( the_jnode, last_byte ); 11457c: 51 push %ecx 11457d: 51 push %ecx 11457e: 50 push %eax 11457f: 53 push %ebx 114580: e8 ca fd ff ff call 11434f <== ALWAYS TAKEN if ( status ) 114585: 83 c4 10 add $0x10,%esp 114588: 85 c0 test %eax,%eax 11458a: 74 13 je 11459f <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOSPC ); 11458c: e8 2f 16 00 00 call 115bc0 <__errno> <== NOT EXECUTED 114591: c7 00 1c 00 00 00 movl $0x1c,(%eax) <== NOT EXECUTED 114597: 83 ca ff or $0xffffffff,%edx <== NOT EXECUTED 11459a: e9 29 01 00 00 jmp 1146c8 <== NOT EXECUTED /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 11459f: 8b 35 b8 8d 12 00 mov 0x128db8,%esi 1145a5: 89 f8 mov %edi,%eax 1145a7: 99 cltd 1145a8: f7 fe idiv %esi 1145aa: 89 d7 mov %edx,%edi 1145ac: 89 45 c8 mov %eax,-0x38(%ebp) block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 1145af: 89 45 cc mov %eax,-0x34(%ebp) if ( start_offset ) { 1145b2: 85 d2 test %edx,%edx 1145b4: 75 0d jne 1145c3 1145b6: 8b 75 10 mov 0x10(%ebp),%esi 1145b9: 8b 45 14 mov 0x14(%ebp),%eax 1145bc: 89 45 d4 mov %eax,-0x2c(%ebp) 1145bf: 31 d2 xor %edx,%edx 1145c1: eb 53 jmp 114616 <== 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 ); 1145c3: 52 push %edx 1145c4: 6a 00 push $0x0 1145c6: ff 75 c8 pushl -0x38(%ebp) 1145c9: 53 push %ebx 1145ca: e8 df f8 ff ff call 113eae 1145cf: 89 c2 mov %eax,%edx assert( block_ptr ); 1145d1: 83 c4 10 add $0x10,%esp 1145d4: 85 c0 test %eax,%eax 1145d6: 75 14 jne 1145ec <== NEVER TAKEN 1145d8: 68 44 38 12 00 push $0x123844 <== NOT EXECUTED 1145dd: 68 f0 38 12 00 push $0x1238f0 <== NOT EXECUTED 1145e2: 68 1c 03 00 00 push $0x31c <== NOT EXECUTED 1145e7: e9 49 ff ff ff jmp 114535 <== 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; 1145ec: 89 f0 mov %esi,%eax 1145ee: 29 f8 sub %edi,%eax 1145f0: 3b 45 14 cmp 0x14(%ebp),%eax 1145f3: 76 03 jbe 1145f8 <== ALWAYS TAKEN 1145f5: 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 ); 1145f8: 8b 12 mov (%edx),%edx 1145fa: 01 fa add %edi,%edx src += to_copy; 1145fc: 89 d7 mov %edx,%edi 1145fe: 8b 75 10 mov 0x10(%ebp),%esi 114601: 89 c1 mov %eax,%ecx 114603: f3 a4 rep movsb %ds:(%esi),%es:(%edi) block++; 114605: 8b 55 c8 mov -0x38(%ebp),%edx 114608: 42 inc %edx 114609: 89 55 cc mov %edx,-0x34(%ebp) my_length -= to_copy; 11460c: 8b 55 14 mov 0x14(%ebp),%edx 11460f: 29 c2 sub %eax,%edx 114611: 89 55 d4 mov %edx,-0x2c(%ebp) copied += to_copy; 114614: 89 c2 mov %eax,%edx /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; 114616: a1 b8 8d 12 00 mov 0x128db8,%eax 11461b: 89 45 d0 mov %eax,-0x30(%ebp) while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 11461e: eb 41 jmp 114661 <== ALWAYS TAKEN block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 114620: 50 push %eax 114621: 6a 00 push $0x0 114623: ff 75 cc pushl -0x34(%ebp) 114626: 53 push %ebx 114627: 89 55 c4 mov %edx,-0x3c(%ebp) 11462a: e8 7f f8 ff ff call 113eae assert( block_ptr ); 11462f: 83 c4 10 add $0x10,%esp 114632: 85 c0 test %eax,%eax 114634: 8b 55 c4 mov -0x3c(%ebp),%edx 114637: 75 14 jne 11464d <== NEVER TAKEN 114639: 68 44 38 12 00 push $0x123844 <== NOT EXECUTED 11463e: 68 f0 38 12 00 push $0x1238f0 <== NOT EXECUTED 114643: 68 30 03 00 00 push $0x330 <== NOT EXECUTED 114648: e9 e8 fe ff ff jmp 114535 <== 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 ); 11464d: 8b 00 mov (%eax),%eax src += to_copy; 11464f: 89 c7 mov %eax,%edi 114651: 8b 4d d0 mov -0x30(%ebp),%ecx 114654: f3 a4 rep movsb %ds:(%esi),%es:(%edi) block++; 114656: ff 45 cc incl -0x34(%ebp) my_length -= to_copy; 114659: 8b 45 d0 mov -0x30(%ebp),%eax 11465c: 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( 11465f: 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 ) { 114661: 8b 45 d4 mov -0x2c(%ebp),%eax 114664: 3b 05 b8 8d 12 00 cmp 0x128db8,%eax 11466a: 73 b4 jae 114620 */ assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); to_copy = my_length; if ( my_length ) { 11466c: 85 c0 test %eax,%eax 11466e: 74 39 je 1146a9 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 114670: 57 push %edi 114671: 6a 00 push $0x0 114673: ff 75 cc pushl -0x34(%ebp) 114676: 53 push %ebx 114677: 89 55 c4 mov %edx,-0x3c(%ebp) 11467a: e8 2f f8 ff ff call 113eae assert( block_ptr ); 11467f: 83 c4 10 add $0x10,%esp 114682: 85 c0 test %eax,%eax 114684: 8b 55 c4 mov -0x3c(%ebp),%edx 114687: 75 14 jne 11469d <== NEVER TAKEN 114689: 68 44 38 12 00 push $0x123844 <== NOT EXECUTED 11468e: 68 f0 38 12 00 push $0x1238f0 <== NOT EXECUTED 114693: 68 46 03 00 00 push $0x346 <== NOT EXECUTED 114698: e9 98 fe ff ff jmp 114535 <== 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 ); 11469d: 8b 00 mov (%eax),%eax 11469f: 89 c7 mov %eax,%edi 1146a1: 8b 4d d4 mov -0x2c(%ebp),%ecx 1146a4: f3 a4 rep movsb %ds:(%esi),%es:(%edi) my_length = 0; copied += to_copy; 1146a6: 03 55 d4 add -0x2c(%ebp),%edx } IMFS_mtime_ctime_update( the_jnode ); 1146a9: 51 push %ecx 1146aa: 51 push %ecx 1146ab: 6a 00 push $0x0 1146ad: 8d 45 e0 lea -0x20(%ebp),%eax 1146b0: 50 push %eax 1146b1: 89 55 c4 mov %edx,-0x3c(%ebp) 1146b4: e8 5b 3c ff ff call 108314 1146b9: 8b 45 e0 mov -0x20(%ebp),%eax 1146bc: 89 43 44 mov %eax,0x44(%ebx) 1146bf: 89 43 48 mov %eax,0x48(%ebx) return copied; 1146c2: 83 c4 10 add $0x10,%esp 1146c5: 8b 55 c4 mov -0x3c(%ebp),%edx } 1146c8: 89 d0 mov %edx,%eax 1146ca: 8d 65 f4 lea -0xc(%ebp),%esp 1146cd: 5b pop %ebx 1146ce: 5e pop %esi 1146cf: 5f pop %edi 1146d0: c9 leave 1146d1: c3 ret 0010d9f0 : const char *token, /* IN */ mode_t mode, /* IN */ dev_t dev, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 10d9f0: 55 push %ebp 10d9f1: 89 e5 mov %esp,%ebp 10d9f3: 57 push %edi 10d9f4: 56 push %esi 10d9f5: 53 push %ebx 10d9f6: 83 ec 4c sub $0x4c,%esp 10d9f9: 8b 55 08 mov 0x8(%ebp),%edx 10d9fc: 8b 5d 10 mov 0x10(%ebp),%ebx 10d9ff: 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 ); 10da02: 31 c0 xor %eax,%eax 10da04: 83 c9 ff or $0xffffffff,%ecx 10da07: 89 d7 mov %edx,%edi 10da09: f2 ae repnz scas %es:(%edi),%al 10da0b: f7 d1 not %ecx 10da0d: 49 dec %ecx 10da0e: 8d 45 e4 lea -0x1c(%ebp),%eax 10da11: 50 push %eax 10da12: 8d 45 af lea -0x51(%ebp),%eax 10da15: 50 push %eax 10da16: 51 push %ecx 10da17: 52 push %edx 10da18: e8 7b fe ff ff call 10d898 <== ALWAYS TAKEN /* * Figure out what type of IMFS node this is. */ if ( S_ISDIR(mode) ) 10da1d: 8b 45 0c mov 0xc(%ebp),%eax 10da20: 25 00 f0 00 00 and $0xf000,%eax 10da25: 83 c4 10 add $0x10,%esp 10da28: 3d 00 40 00 00 cmp $0x4000,%eax 10da2d: 74 40 je 10da6f type = IMFS_DIRECTORY; else if ( S_ISREG(mode) ) 10da2f: ba 05 00 00 00 mov $0x5,%edx 10da34: 3d 00 80 00 00 cmp $0x8000,%eax 10da39: 74 39 je 10da74 type = IMFS_MEMORY_FILE; else if ( S_ISBLK(mode) || S_ISCHR(mode) ) { 10da3b: 3d 00 20 00 00 cmp $0x2000,%eax 10da40: 74 07 je 10da49 10da42: 3d 00 60 00 00 cmp $0x6000,%eax 10da47: 75 0d jne 10da56 type = IMFS_DEVICE; rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor ); 10da49: 89 5d d0 mov %ebx,-0x30(%ebp) 10da4c: 89 75 d4 mov %esi,-0x2c(%ebp) 10da4f: ba 02 00 00 00 mov $0x2,%edx 10da54: eb 1e jmp 10da74 <== ALWAYS TAKEN } else if (S_ISFIFO(mode)) 10da56: ba 07 00 00 00 mov $0x7,%edx 10da5b: 3d 00 10 00 00 cmp $0x1000,%eax 10da60: 74 12 je 10da74 <== NEVER TAKEN type = IMFS_FIFO; else { rtems_set_errno_and_return_minus_one( EINVAL ); 10da62: e8 5d 3a 00 00 call 1114c4 <__errno> <== NOT EXECUTED 10da67: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 10da6d: eb 32 jmp 10daa1 <== NOT EXECUTED 10da6f: 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( 10da74: 83 ec 0c sub $0xc,%esp 10da77: 8d 45 d0 lea -0x30(%ebp),%eax 10da7a: 50 push %eax 10da7b: ff 75 0c pushl 0xc(%ebp) 10da7e: 8d 45 af lea -0x51(%ebp),%eax 10da81: 50 push %eax 10da82: 52 push %edx 10da83: ff 75 18 pushl 0x18(%ebp) 10da86: e8 cb 25 00 00 call 110056 10da8b: 89 c2 mov %eax,%edx new_name, mode, &info ); if ( !new_node ) 10da8d: 83 c4 20 add $0x20,%esp 10da90: 31 c0 xor %eax,%eax 10da92: 85 d2 test %edx,%edx 10da94: 75 0e jne 10daa4 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOMEM ); 10da96: e8 29 3a 00 00 call 1114c4 <__errno> <== NOT EXECUTED 10da9b: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED 10daa1: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED return 0; } 10daa4: 8d 65 f4 lea -0xc(%ebp),%esp 10daa7: 5b pop %ebx 10daa8: 5e pop %esi 10daa9: 5f pop %edi 10daaa: c9 leave 10daab: 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 b5 df 00 00 call 115bc0 <__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 3d 36 12 00 push $0x12363d <== NOT EXECUTED 1083e1: 68 f4 37 12 00 push $0x1237f4 <== 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 c0 88 12 00 mov 0x1288c0,%eax 1083f4: ff 70 08 pushl 0x8(%eax) 1083f7: 8d 43 0c lea 0xc(%ebx),%eax 1083fa: 50 push %eax 1083fb: e8 14 ce 00 00 call 115214 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 c0 88 12 00 mov 0x1288c0,%eax 108417: ff 24 95 c4 37 12 00 jmp *0x1237c4(,%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 fe cc 00 00 call 115128 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 90 36 12 00 push $0x123690 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 a3 36 12 00 push $0x1236a3 <== 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 b2 36 12 00 push $0x1236b2 10844f: ff 70 08 pushl 0x8(%eax) 108452: e8 95 cc 00 00 call 1150ec (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 53 39 12 00 movl $0x123953,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 06 e4 00 00 jmp 116870 (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 be 36 12 00 push $0x1236be <== NOT EXECUTED 108474: e8 9b cd 00 00 call 115214 <== NOT EXECUTED assert(0); 108479: 68 f8 2e 12 00 push $0x122ef8 <== NOT EXECUTED 10847e: 68 f4 37 12 00 push $0x1237f4 <== NOT EXECUTED 108483: 6a 5d push $0x5d <== NOT EXECUTED 108485: 68 47 36 12 00 push $0x123647 <== 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 be 36 12 00 push $0x1236be <== NOT EXECUTED 108499: e8 76 cd 00 00 call 115214 <== NOT EXECUTED assert(0); 10849e: 68 f8 2e 12 00 push $0x122ef8 <== NOT EXECUTED 1084a3: 68 f4 37 12 00 push $0x1237f4 <== 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 d2 36 12 00 push $0x1236d2 <== NOT EXECUTED 1084b6: e8 59 cd 00 00 call 115214 <== NOT EXECUTED assert(0); 1084bb: 68 f8 2e 12 00 push $0x122ef8 <== NOT EXECUTED 1084c0: 68 f4 37 12 00 push $0x1237f4 <== 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 e5 36 12 00 push $0x1236e5 <== NOT EXECUTED 1084d0: a1 c0 88 12 00 mov 0x1288c0,%eax <== NOT EXECUTED 1084d5: ff 70 08 pushl 0x8(%eax) <== NOT EXECUTED 1084d8: e8 0f cc 00 00 call 1150ec <== NOT EXECUTED assert(0); 1084dd: 68 f8 2e 12 00 push $0x122ef8 <== NOT EXECUTED 1084e2: 68 f4 37 12 00 push $0x1237f4 <== 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 73 df 00 00 call 115bc0 <__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 8e eb 00 00 call 116818 <== 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 04 41 00 00 call 10bda0 <_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 c9 40 00 00 call 10bd7c <_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 0010dabc : int IMFS_rmnod( rtems_filesystem_location_info_t *parent_pathloc, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN */ ) { 10dabc: 55 push %ebp 10dabd: 89 e5 mov %esp,%ebp 10dabf: 56 push %esi 10dac0: 53 push %ebx 10dac1: 83 ec 10 sub $0x10,%esp 10dac4: 8b 75 0c mov 0xc(%ebp),%esi IMFS_jnode_t *the_jnode; the_jnode = (IMFS_jnode_t *) pathloc->node_access; 10dac7: 8b 1e mov (%esi),%ebx /* * Take the node out of the parent's chain that contains this node */ if ( the_jnode->Parent != NULL ) { 10dac9: 83 7b 08 00 cmpl $0x0,0x8(%ebx) 10dacd: 74 13 je 10dae2 <== ALWAYS TAKEN */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 10dacf: 83 ec 0c sub $0xc,%esp 10dad2: 53 push %ebx 10dad3: e8 d0 10 00 00 call 10eba8 <_Chain_Extract> rtems_chain_extract( (rtems_chain_node *) the_jnode ); the_jnode->Parent = NULL; 10dad8: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx) 10dadf: 83 c4 10 add $0x10,%esp /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; 10dae2: 66 ff 4b 34 decw 0x34(%ebx) IMFS_update_ctime( the_jnode ); 10dae6: 50 push %eax 10dae7: 50 push %eax 10dae8: 6a 00 push $0x0 10daea: 8d 45 f0 lea -0x10(%ebp),%eax 10daed: 50 push %eax 10daee: e8 79 02 00 00 call 10dd6c 10daf3: 8b 45 f0 mov -0x10(%ebp),%eax 10daf6: 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) ) { 10daf9: 89 1c 24 mov %ebx,(%esp) 10dafc: e8 1d 03 00 00 call 10de1e <== ALWAYS TAKEN 10db01: 83 c4 10 add $0x10,%esp 10db04: 85 c0 test %eax,%eax 10db06: 75 3f jne 10db47 <== ALWAYS TAKEN 10db08: 66 83 7b 34 00 cmpw $0x0,0x34(%ebx) 10db0d: 75 38 jne 10db47 <== ALWAYS TAKEN /* * Is rtems_filesystem_current this node? */ if ( rtems_filesystem_current.node_access == pathloc->node_access ) 10db0f: a1 40 1f 12 00 mov 0x121f40,%eax 10db14: 8b 50 04 mov 0x4(%eax),%edx 10db17: 3b 16 cmp (%esi),%edx 10db19: 75 07 jne 10db22 <== NEVER TAKEN rtems_filesystem_current.node_access = NULL; 10db1b: 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 ) { 10db22: 83 7b 4c 04 cmpl $0x4,0x4c(%ebx) 10db26: 75 13 jne 10db3b if ( the_jnode->info.sym_link.name ) 10db28: 8b 43 50 mov 0x50(%ebx),%eax 10db2b: 85 c0 test %eax,%eax 10db2d: 74 0c je 10db3b <== ALWAYS TAKEN free( (void*) the_jnode->info.sym_link.name ); 10db2f: 83 ec 0c sub $0xc,%esp 10db32: 50 push %eax 10db33: e8 f8 95 ff ff call 107130 10db38: 83 c4 10 add $0x10,%esp } free( the_jnode ); 10db3b: 83 ec 0c sub $0xc,%esp 10db3e: 53 push %ebx 10db3f: e8 ec 95 ff ff call 107130 10db44: 83 c4 10 add $0x10,%esp } return 0; } 10db47: 31 c0 xor %eax,%eax 10db49: 8d 65 f8 lea -0x8(%ebp),%esp 10db4c: 5b pop %ebx 10db4d: 5e pop %esi 10db4e: c9 leave 10db4f: c3 ret 0010db50 : int IMFS_stat( rtems_filesystem_location_info_t *loc, struct stat *buf ) { 10db50: 55 push %ebp 10db51: 89 e5 mov %esp,%ebp 10db53: 53 push %ebx 10db54: 83 ec 04 sub $0x4,%esp 10db57: 8b 45 0c mov 0xc(%ebp),%eax IMFS_jnode_t *the_jnode; IMFS_device_t *io; the_jnode = loc->node_access; 10db5a: 8b 55 08 mov 0x8(%ebp),%edx 10db5d: 8b 12 mov (%edx),%edx switch ( the_jnode->type ) { 10db5f: 8b 4a 4c mov 0x4c(%edx),%ecx 10db62: 83 e9 02 sub $0x2,%ecx 10db65: 83 f9 05 cmp $0x5,%ecx 10db68: 77 26 ja 10db90 <== ALWAYS TAKEN 10db6a: ff 24 8d bc eb 11 00 jmp *0x11ebbc(,%ecx,4) case IMFS_DEVICE: io = &the_jnode->info.device; buf->st_rdev = rtems_filesystem_make_dev_t( io->major, io->minor ); 10db71: 8b 4a 54 mov 0x54(%edx),%ecx rtems_device_minor_number _minor ) { union __rtems_dev_t temp; temp.__overlay.major = _major; 10db74: 8b 5a 50 mov 0x50(%edx),%ebx 10db77: 89 58 18 mov %ebx,0x18(%eax) 10db7a: 89 48 1c mov %ecx,0x1c(%eax) break; 10db7d: eb 21 jmp 10dba0 <== ALWAYS TAKEN case IMFS_LINEAR_FILE: case IMFS_MEMORY_FILE: buf->st_size = the_jnode->info.file.size; 10db7f: 8b 4a 50 mov 0x50(%edx),%ecx 10db82: 89 48 20 mov %ecx,0x20(%eax) break; 10db85: eb 19 jmp 10dba0 <== ALWAYS TAKEN case IMFS_SYM_LINK: buf->st_size = 0; break; case IMFS_FIFO: buf->st_size = 0; 10db87: c7 40 20 00 00 00 00 movl $0x0,0x20(%eax) <== NOT EXECUTED break; 10db8e: eb 10 jmp 10dba0 <== NOT EXECUTED default: rtems_set_errno_and_return_minus_one( ENOTSUP ); 10db90: e8 2f 39 00 00 call 1114c4 <__errno> <== NOT EXECUTED 10db95: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 10db9b: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 10db9e: eb 36 jmp 10dbd6 <== NOT EXECUTED break; } buf->st_mode = the_jnode->st_mode; 10dba0: 8b 4a 30 mov 0x30(%edx),%ecx 10dba3: 89 48 0c mov %ecx,0xc(%eax) buf->st_nlink = the_jnode->st_nlink; 10dba6: 8b 4a 34 mov 0x34(%edx),%ecx 10dba9: 66 89 48 10 mov %cx,0x10(%eax) buf->st_ino = the_jnode->st_ino; 10dbad: 8b 4a 38 mov 0x38(%edx),%ecx 10dbb0: 89 48 08 mov %ecx,0x8(%eax) buf->st_uid = the_jnode->st_uid; 10dbb3: 8b 4a 3c mov 0x3c(%edx),%ecx 10dbb6: 66 89 48 12 mov %cx,0x12(%eax) buf->st_gid = the_jnode->st_gid; 10dbba: 66 8b 4a 3e mov 0x3e(%edx),%cx 10dbbe: 66 89 48 14 mov %cx,0x14(%eax) buf->st_atime = the_jnode->stat_atime; 10dbc2: 8b 4a 40 mov 0x40(%edx),%ecx 10dbc5: 89 48 24 mov %ecx,0x24(%eax) buf->st_mtime = the_jnode->stat_mtime; 10dbc8: 8b 4a 44 mov 0x44(%edx),%ecx 10dbcb: 89 48 2c mov %ecx,0x2c(%eax) buf->st_ctime = the_jnode->stat_ctime; 10dbce: 8b 52 48 mov 0x48(%edx),%edx 10dbd1: 89 50 34 mov %edx,0x34(%eax) 10dbd4: 31 c0 xor %eax,%eax return 0; } 10dbd6: 5a pop %edx 10dbd7: 5b pop %ebx 10dbd8: c9 leave 10dbd9: 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 5e a0 00 00 call 111d54 /* * Duplicate link name */ info.sym_link.name = strdup(link_name); 107cf6: 58 pop %eax 107cf7: ff 75 0c pushl 0xc(%ebp) 107cfa: e8 bd e9 00 00 call 1166bc 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 b2 de 00 00 call 115bc0 <__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 22 96 00 00 call 111352 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 75 de 00 00 call 115bc0 <__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 40 de 00 00 call 115bc0 <__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 a9 96 00 00 call 111450 /* * 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 a1 dd 00 00 call 115bc0 <__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 8e dd 00 00 call 115bc0 <__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 10 25 12 00 mov 0x122510,%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 14 25 12 00 mov 0x122514,%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 0d 25 12 00 00 cmpb $0x0,0x12250d 1072f5: 75 11 jne 107308 !rtems_unified_work_area && rtems_configuration_get_do_zero_of_workspace() 1072f7: 80 3d 20 02 12 00 00 cmpb $0x0,0x120220 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 0d 25 12 00 00 cmpb $0x0,0x12250d 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 50 01 12 00 pushl 0x120150 10731b: e8 44 39 00 00 call 10ac64 <_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 bb 31 00 00 call 10a4ec <== NOT EXECUTED } } MSBUMP( space_available, _Protected_heap_Get_size(RTEMS_Malloc_Heap) ); 107331: 8b 1d a8 40 12 00 mov 0x1240a8,%ebx 107337: 83 ec 0c sub $0xc,%esp 10733a: ff 35 50 01 12 00 pushl 0x120150 107340: e8 b7 43 00 00 call 10b6fc <_Protected_heap_Get_size> 107345: 8d 1c 18 lea (%eax,%ebx,1),%ebx 107348: 89 1d a8 40 12 00 mov %ebx,0x1240a8 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 bc 0d 16 00 mov 0x160dbc,%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 6c 3a 16 00 00 cmpl $0x0,0x163a6c <== NOT EXECUTED 10a076: 0f 84 d8 00 00 00 je 10a154 <== NOT EXECUTED 10a07c: 31 db xor %ebx,%ebx <== NOT EXECUTED 10a07e: be 68 3a 16 00 mov $0x163a68,%esi <== NOT EXECUTED 10a083: c7 45 cc 00 00 00 00 movl $0x0,-0x34(%ebp) <== NOT EXECUTED 10a08a: eb 0f jmp 10a09b <== NOT EXECUTED current = 0; } else return; } else { stack = &the_thread->Start.Initial_stack; 10a08c: 8d b3 c4 00 00 00 lea 0xc4(%ebx),%esi <== NOT EXECUTED current = (void *)_CPU_Context_Get_SP( &the_thread->Registers ); 10a092: 8b 8b d8 00 00 00 mov 0xd8(%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 d4 19 15 00 push $0x1519d4 <== NOT EXECUTED 10a0e2: ff 35 b8 0d 16 00 pushl 0x160db8 <== 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 e1 19 15 00 push $0x1519e1 <== NOT EXECUTED 10a0f8: ff 35 b8 0d 16 00 pushl 0x160db8 <== 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 ef 19 15 00 push $0x1519ef <== NOT EXECUTED 10a11c: ff 35 b8 0d 16 00 pushl 0x160db8 <== NOT EXECUTED 10a122: ff 15 bc 0d 16 00 call *0x160dbc <== 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 b4 0d 16 00 00 cmpl $0x0,0x160db4 <== NOT EXECUTED 10a132: a1 bc 0d 16 00 mov 0x160dbc,%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 0d 1a 15 00 push $0x151a0d <== 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 1a 1a 15 00 push $0x151a1a <== NOT EXECUTED 10a149: ff 35 b8 0d 16 00 pushl 0x160db8 <== 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 b4 0d 16 00 00 cmpl $0x0,0x160db4 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 54 1b 15 00 mov 0x151b54(,%edx,4),%edx 10a374: 89 14 85 58 3a 16 00 mov %edx,0x163a58(,%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 dc 3b 16 00 mov 0x163bdc,%edx 10a387: 85 d2 test %edx,%edx 10a389: 74 1e je 10a3a9 <== ALWAYS TAKEN 10a38b: 8b 0d 9c 3b 16 00 mov 0x163b9c,%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 6c 3a 16 00 mov %edx,0x163a6c Stack_check_Interrupt_stack.size = (char *) _CPU_Interrupt_stack_high - 10a39b: 29 d1 sub %edx,%ecx 10a39d: 89 0d 68 3a 16 00 mov %ecx,0x163a68 (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 b4 0d 16 00 01 movl $0x1,0x160db4 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 c8 00 00 00 mov 0xc8(%ebx),%esi <== NOT EXECUTED char name [32]; printk("BLOWN STACK!!!\n"); 10a1e8: 68 81 1a 15 00 push $0x151a81 <== 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 91 1a 15 00 push $0x151a91 <== 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 ae 1a 15 00 push $0x151aae <== 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 c0 1a 15 00 push $0x151ac0 <== 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 d4 1a 15 00 push $0x151ad4 <== 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 c8 00 00 00 mov 0xc8(%ebx),%ecx <== NOT EXECUTED 10a244: 8b 83 c4 00 00 00 mov 0xc4(%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 ea 1a 15 00 push $0x151aea <== 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 1b 1b 15 00 push $0x151b1b <== 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 d8 57 00 00 call 10fa60 <== NOT EXECUTED 0010a6c0 <_API_Mutex_Allocate>: #include void _API_Mutex_Allocate( API_Mutex_Control **the_mutex ) { 10a6c0: 55 push %ebp 10a6c1: 89 e5 mov %esp,%ebp 10a6c3: 57 push %edi 10a6c4: 56 push %esi 10a6c5: 83 ec 1c sub $0x1c,%esp CORE_mutex_Attributes attr = { CORE_MUTEX_NESTING_IS_ERROR, false, CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT, 0 }; 10a6c8: 8d 7d e8 lea -0x18(%ebp),%edi 10a6cb: be c0 e7 11 00 mov $0x11e7c0,%esi 10a6d0: b9 04 00 00 00 mov $0x4,%ecx 10a6d5: f3 a5 rep movsl %ds:(%esi),%es:(%edi) mutex = (API_Mutex_Control *) _Objects_Allocate( &_API_Mutex_Information ); 10a6d7: 68 d4 42 12 00 push $0x1242d4 10a6dc: e8 0b 09 00 00 call 10afec <_Objects_Allocate> <== ALWAYS TAKEN 10a6e1: 89 c6 mov %eax,%esi _CORE_mutex_Initialize( &mutex->Mutex, &attr, CORE_MUTEX_UNLOCKED ); 10a6e3: 83 c4 0c add $0xc,%esp 10a6e6: 6a 01 push $0x1 10a6e8: 8d 45 e8 lea -0x18(%ebp),%eax 10a6eb: 50 push %eax 10a6ec: 8d 46 10 lea 0x10(%esi),%eax 10a6ef: 50 push %eax 10a6f0: e8 e7 01 00 00 call 10a8dc <_CORE_mutex_Initialize> <== ALWAYS TAKEN #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10a6f5: 0f b7 56 08 movzwl 0x8(%esi),%edx 10a6f9: a1 f0 42 12 00 mov 0x1242f0,%eax 10a6fe: 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; 10a701: c7 46 0c 01 00 00 00 movl $0x1,0xc(%esi) _Objects_Open_u32( &_API_Mutex_Information, &mutex->Object, 1 ); *the_mutex = mutex; 10a708: 8b 45 08 mov 0x8(%ebp),%eax 10a70b: 89 30 mov %esi,(%eax) 10a70d: 83 c4 10 add $0x10,%esp } 10a710: 8d 65 f8 lea -0x8(%ebp),%esp 10a713: 5e pop %esi 10a714: 5f pop %edi 10a715: c9 leave 10a716: c3 ret 0010a73c <_API_Mutex_Initialization>: #include void _API_Mutex_Initialization( uint32_t maximum_mutexes ) { 10a73c: 55 push %ebp 10a73d: 89 e5 mov %esp,%ebp 10a73f: 83 ec 0c sub $0xc,%esp _Objects_Initialize_information( 10a742: 6a 00 push $0x0 10a744: 6a 00 push $0x0 10a746: 6a 74 push $0x74 10a748: ff 75 08 pushl 0x8(%ebp) 10a74b: 6a 02 push $0x2 10a74d: 6a 01 push $0x1 10a74f: 68 d4 42 12 00 push $0x1242d4 10a754: e8 ff 0c 00 00 call 10b458 <_Objects_Initialize_information> <== ALWAYS TAKEN 10a759: 83 c4 20 add $0x20,%esp , true, /* true if this is a global object class */ NULL /* Proxy extraction support callout */ #endif ); } 10a75c: c9 leave 10a75d: c3 ret 0010a718 <_API_Mutex_Lock>: #include void _API_Mutex_Lock( API_Mutex_Control *the_mutex ) { 10a718: 55 push %ebp 10a719: 89 e5 mov %esp,%ebp 10a71b: 83 ec 14 sub $0x14,%esp 10a71e: 8b 45 08 mov 0x8(%ebp),%eax ISR_Level level; _ISR_Disable( level ); 10a721: 9c pushf 10a722: fa cli 10a723: 5a pop %edx _CORE_mutex_Seize( 10a724: 52 push %edx 10a725: 6a 00 push $0x0 10a727: 6a 01 push $0x1 10a729: ff 70 08 pushl 0x8(%eax) 10a72c: 83 c0 10 add $0x10,%eax 10a72f: 50 push %eax 10a730: e8 90 02 00 00 call 10a9c5 <_CORE_mutex_Seize> <== ALWAYS TAKEN 10a735: 83 c4 20 add $0x20,%esp the_mutex->Object.id, true, 0, level ); } 10a738: c9 leave 10a739: c3 ret 0010a760 <_API_Mutex_Unlock>: #include void _API_Mutex_Unlock( API_Mutex_Control *the_mutex ) { 10a760: 55 push %ebp 10a761: 89 e5 mov %esp,%ebp 10a763: 83 ec 0c sub $0xc,%esp 10a766: 8b 45 08 mov 0x8(%ebp),%eax rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10a769: 8b 15 ec 41 12 00 mov 0x1241ec,%edx 10a76f: 42 inc %edx 10a770: 89 15 ec 41 12 00 mov %edx,0x1241ec _Thread_Disable_dispatch(); _CORE_mutex_Surrender( 10a776: 6a 00 push $0x0 10a778: ff 70 08 pushl 0x8(%eax) 10a77b: 83 c0 10 add $0x10,%eax 10a77e: 50 push %eax 10a77f: e8 d8 02 00 00 call 10aa5c <_CORE_mutex_Surrender> <== ALWAYS TAKEN &the_mutex->Mutex, the_mutex->Object.id, NULL ); _Thread_Enable_dispatch(); 10a784: 83 c4 10 add $0x10,%esp } 10a787: c9 leave _CORE_mutex_Surrender( &the_mutex->Mutex, the_mutex->Object.id, NULL ); _Thread_Enable_dispatch(); 10a788: e9 64 14 00 00 jmp 10bbf1 <_Thread_Enable_dispatch> 0010a6a8 <_API_extensions_Add>: */ void _API_extensions_Add( API_extensions_Control *the_extension ) { 10a6a8: 55 push %ebp 10a6a9: 89 e5 mov %esp,%ebp 10a6ab: 83 ec 10 sub $0x10,%esp _Chain_Append( &_API_extensions_List, &the_extension->Node ); 10a6ae: ff 75 08 pushl 0x8(%ebp) 10a6b1: 68 08 44 12 00 push $0x124408 10a6b6: e8 d5 00 00 00 call 10a790 <_Chain_Append> <== ALWAYS TAKEN 10a6bb: 83 c4 10 add $0x10,%esp } 10a6be: c9 leave 10a6bf: c3 ret 0010a65b <_API_extensions_Run_postdriver>: * * _API_extensions_Run_postdriver */ void _API_extensions_Run_postdriver( void ) { 10a65b: 55 push %ebp 10a65c: 89 e5 mov %esp,%ebp 10a65e: 53 push %ebx 10a65f: 83 ec 04 sub $0x4,%esp Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; 10a662: 8b 1d 08 44 12 00 mov 0x124408,%ebx 10a668: eb 05 jmp 10a66f <_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)(); 10a66a: 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 ) { 10a66d: 8b 1b mov (%ebx),%ebx */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10a66f: 81 fb 0c 44 12 00 cmp $0x12440c,%ebx 10a675: 75 f3 jne 10a66a <_API_extensions_Run_postdriver+0xf> #if defined(FUNCTIONALITY_NOT_CURRENTLY_USED_BY_ANY_API) if ( the_extension->postdriver_hook ) #endif (*the_extension->postdriver_hook)(); } } 10a677: 58 pop %eax 10a678: 5b pop %ebx 10a679: c9 leave 10a67a: c3 ret 0010a67b <_API_extensions_Run_postswitch>: * * _API_extensions_Run_postswitch */ void _API_extensions_Run_postswitch( void ) { 10a67b: 55 push %ebp 10a67c: 89 e5 mov %esp,%ebp 10a67e: 53 push %ebx 10a67f: 83 ec 04 sub $0x4,%esp Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; 10a682: 8b 1d 08 44 12 00 mov 0x124408,%ebx 10a688: eb 11 jmp 10a69b <_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 ); 10a68a: 83 ec 0c sub $0xc,%esp 10a68d: ff 35 a8 42 12 00 pushl 0x1242a8 10a693: 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 ) { 10a696: 8b 1b mov (%ebx),%ebx 10a698: 83 c4 10 add $0x10,%esp 10a69b: 81 fb 0c 44 12 00 cmp $0x12440c,%ebx 10a6a1: 75 e7 jne 10a68a <_API_extensions_Run_postswitch+0xf> #if defined(RTEMS_ITRON_API) if ( the_extension->postswitch_hook ) #endif (*the_extension->postswitch_hook)( _Thread_Executing ); } } 10a6a3: 8b 5d fc mov -0x4(%ebp),%ebx 10a6a6: c9 leave 10a6a7: c3 ret 0010c798 <_CORE_RWLock_Obtain_for_reading>: Objects_Id id, bool wait, Watchdog_Interval timeout, CORE_RWLock_API_mp_support_callout api_rwlock_mp_support ) { 10c798: 55 push %ebp 10c799: 89 e5 mov %esp,%ebp 10c79b: 57 push %edi 10c79c: 56 push %esi 10c79d: 53 push %ebx 10c79e: 83 ec 1c sub $0x1c,%esp 10c7a1: 8b 5d 08 mov 0x8(%ebp),%ebx 10c7a4: 8b 4d 0c mov 0xc(%ebp),%ecx 10c7a7: 8b 45 14 mov 0x14(%ebp),%eax 10c7aa: 89 45 e4 mov %eax,-0x1c(%ebp) 10c7ad: 8a 55 10 mov 0x10(%ebp),%dl ISR_Level level; Thread_Control *executing = _Thread_Executing; 10c7b0: 8b 35 c0 72 12 00 mov 0x1272c0,%esi * If unlocked, then OK to read. * If locked for reading and no waiters, then OK to read. * If any thread is waiting, then we wait. */ _ISR_Disable( level ); 10c7b6: 9c pushf 10c7b7: fa cli 10c7b8: 5f pop %edi switch ( the_rwlock->current_state ) { 10c7b9: 8b 43 44 mov 0x44(%ebx),%eax 10c7bc: 85 c0 test %eax,%eax 10c7be: 74 05 je 10c7c5 <_CORE_RWLock_Obtain_for_reading+0x2d> 10c7c0: 48 dec %eax 10c7c1: 75 3a jne 10c7fd <_CORE_RWLock_Obtain_for_reading+0x65> 10c7c3: eb 0e jmp 10c7d3 <_CORE_RWLock_Obtain_for_reading+0x3b> <== ALWAYS TAKEN case CORE_RWLOCK_UNLOCKED: the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_READING; 10c7c5: c7 43 44 01 00 00 00 movl $0x1,0x44(%ebx) the_rwlock->number_of_readers += 1; 10c7cc: ff 43 48 incl 0x48(%ebx) _ISR_Enable( level ); 10c7cf: 57 push %edi 10c7d0: 9d popf 10c7d1: eb 21 jmp 10c7f4 <_CORE_RWLock_Obtain_for_reading+0x5c> <== ALWAYS TAKEN executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; return; case CORE_RWLOCK_LOCKED_FOR_READING: { Thread_Control *waiter; waiter = _Thread_queue_First( &the_rwlock->Wait_queue ); 10c7d3: 83 ec 0c sub $0xc,%esp 10c7d6: 53 push %ebx 10c7d7: 88 55 dc mov %dl,-0x24(%ebp) 10c7da: 89 4d e0 mov %ecx,-0x20(%ebp) 10c7dd: e8 66 1a 00 00 call 10e248 <_Thread_queue_First> if ( !waiter ) { 10c7e2: 83 c4 10 add $0x10,%esp 10c7e5: 85 c0 test %eax,%eax 10c7e7: 8a 55 dc mov -0x24(%ebp),%dl 10c7ea: 8b 4d e0 mov -0x20(%ebp),%ecx 10c7ed: 75 0e jne 10c7fd <_CORE_RWLock_Obtain_for_reading+0x65> <== ALWAYS TAKEN the_rwlock->number_of_readers += 1; 10c7ef: ff 43 48 incl 0x48(%ebx) _ISR_Enable( level ); 10c7f2: 57 push %edi 10c7f3: 9d popf executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; 10c7f4: c7 46 34 00 00 00 00 movl $0x0,0x34(%esi) return; 10c7fb: eb 48 jmp 10c845 <_CORE_RWLock_Obtain_for_reading+0xad> <== ALWAYS TAKEN /* * If the thread is not willing to wait, then return immediately. */ if ( !wait ) { 10c7fd: 84 d2 test %dl,%dl 10c7ff: 75 0b jne 10c80c <_CORE_RWLock_Obtain_for_reading+0x74> _ISR_Enable( level ); 10c801: 57 push %edi 10c802: 9d popf executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE; 10c803: c7 46 34 02 00 00 00 movl $0x2,0x34(%esi) 10c80a: eb 39 jmp 10c845 <_CORE_RWLock_Obtain_for_reading+0xad> <== ALWAYS TAKEN 10c80c: c7 43 30 01 00 00 00 movl $0x1,0x30(%ebx) /* * We need to wait to enter this critical section */ _Thread_queue_Enter_critical_section( &the_rwlock->Wait_queue ); executing->Wait.queue = &the_rwlock->Wait_queue; 10c813: 89 5e 44 mov %ebx,0x44(%esi) executing->Wait.id = id; 10c816: 89 4e 20 mov %ecx,0x20(%esi) executing->Wait.option = CORE_RWLOCK_THREAD_WAITING_FOR_READ; 10c819: c7 46 30 00 00 00 00 movl $0x0,0x30(%esi) executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; 10c820: c7 46 34 00 00 00 00 movl $0x0,0x34(%esi) _ISR_Enable( level ); 10c827: 57 push %edi 10c828: 9d popf _Thread_queue_Enqueue_with_handler( 10c829: c7 45 10 74 c9 10 00 movl $0x10c974,0x10(%ebp) 10c830: 8b 45 e4 mov -0x1c(%ebp),%eax 10c833: 89 45 0c mov %eax,0xc(%ebp) 10c836: 89 5d 08 mov %ebx,0x8(%ebp) timeout, _CORE_RWLock_Timeout ); /* return to API level so it can dispatch and we block */ } 10c839: 8d 65 f4 lea -0xc(%ebp),%esp 10c83c: 5b pop %ebx 10c83d: 5e pop %esi 10c83e: 5f pop %edi 10c83f: c9 leave executing->Wait.id = id; executing->Wait.option = CORE_RWLOCK_THREAD_WAITING_FOR_READ; executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; _ISR_Enable( level ); _Thread_queue_Enqueue_with_handler( 10c840: e9 2b 17 00 00 jmp 10df70 <_Thread_queue_Enqueue_with_handler> timeout, _CORE_RWLock_Timeout ); /* return to API level so it can dispatch and we block */ } 10c845: 8d 65 f4 lea -0xc(%ebp),%esp 10c848: 5b pop %ebx 10c849: 5e pop %esi 10c84a: 5f pop %edi 10c84b: c9 leave 10c84c: c3 ret 0010c850 <_CORE_RWLock_Obtain_for_writing>: Objects_Id id, bool wait, Watchdog_Interval timeout, CORE_RWLock_API_mp_support_callout api_rwlock_mp_support ) { 10c850: 55 push %ebp 10c851: 89 e5 mov %esp,%ebp 10c853: 56 push %esi 10c854: 53 push %ebx 10c855: 83 ec 10 sub $0x10,%esp 10c858: 8b 55 08 mov 0x8(%ebp),%edx 10c85b: 8b 75 0c mov 0xc(%ebp),%esi 10c85e: 8b 5d 14 mov 0x14(%ebp),%ebx 10c861: 8a 45 10 mov 0x10(%ebp),%al 10c864: 88 45 f7 mov %al,-0x9(%ebp) ISR_Level level; Thread_Control *executing = _Thread_Executing; 10c867: a1 c0 72 12 00 mov 0x1272c0,%eax * Otherwise, we have to block. * If locked for reading and no waiters, then OK to read. * If any thread is waiting, then we wait. */ _ISR_Disable( level ); 10c86c: 9c pushf 10c86d: fa cli 10c86e: 59 pop %ecx switch ( the_rwlock->current_state ) { 10c86f: 83 7a 44 00 cmpl $0x0,0x44(%edx) 10c873: 75 12 jne 10c887 <_CORE_RWLock_Obtain_for_writing+0x37> case CORE_RWLOCK_UNLOCKED: the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_WRITING; 10c875: c7 42 44 02 00 00 00 movl $0x2,0x44(%edx) _ISR_Enable( level ); 10c87c: 51 push %ecx 10c87d: 9d popf executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; 10c87e: c7 40 34 00 00 00 00 movl $0x0,0x34(%eax) return; 10c885: eb 46 jmp 10c8cd <_CORE_RWLock_Obtain_for_writing+0x7d> <== ALWAYS TAKEN /* * If the thread is not willing to wait, then return immediately. */ if ( !wait ) { 10c887: 80 7d f7 00 cmpb $0x0,-0x9(%ebp) 10c88b: 75 0b jne 10c898 <_CORE_RWLock_Obtain_for_writing+0x48> _ISR_Enable( level ); 10c88d: 51 push %ecx 10c88e: 9d popf executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE; 10c88f: c7 40 34 02 00 00 00 movl $0x2,0x34(%eax) 10c896: eb 35 jmp 10c8cd <_CORE_RWLock_Obtain_for_writing+0x7d> <== ALWAYS TAKEN 10c898: c7 42 30 01 00 00 00 movl $0x1,0x30(%edx) /* * We need to wait to enter this critical section */ _Thread_queue_Enter_critical_section( &the_rwlock->Wait_queue ); executing->Wait.queue = &the_rwlock->Wait_queue; 10c89f: 89 50 44 mov %edx,0x44(%eax) executing->Wait.id = id; 10c8a2: 89 70 20 mov %esi,0x20(%eax) executing->Wait.option = CORE_RWLOCK_THREAD_WAITING_FOR_WRITE; 10c8a5: c7 40 30 01 00 00 00 movl $0x1,0x30(%eax) executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; 10c8ac: c7 40 34 00 00 00 00 movl $0x0,0x34(%eax) _ISR_Enable( level ); 10c8b3: 51 push %ecx 10c8b4: 9d popf _Thread_queue_Enqueue_with_handler( 10c8b5: c7 45 10 74 c9 10 00 movl $0x10c974,0x10(%ebp) 10c8bc: 89 5d 0c mov %ebx,0xc(%ebp) 10c8bf: 89 55 08 mov %edx,0x8(%ebp) _CORE_RWLock_Timeout ); /* return to API level so it can dispatch and we block */ } 10c8c2: 83 c4 10 add $0x10,%esp 10c8c5: 5b pop %ebx 10c8c6: 5e pop %esi 10c8c7: c9 leave executing->Wait.id = id; executing->Wait.option = CORE_RWLOCK_THREAD_WAITING_FOR_WRITE; executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; _ISR_Enable( level ); _Thread_queue_Enqueue_with_handler( 10c8c8: e9 a3 16 00 00 jmp 10df70 <_Thread_queue_Enqueue_with_handler> _CORE_RWLock_Timeout ); /* return to API level so it can dispatch and we block */ } 10c8cd: 83 c4 10 add $0x10,%esp 10c8d0: 5b pop %ebx 10c8d1: 5e pop %esi 10c8d2: c9 leave 10c8d3: c3 ret 0010c8d4 <_CORE_RWLock_Release>: */ CORE_RWLock_Status _CORE_RWLock_Release( CORE_RWLock_Control *the_rwlock ) { 10c8d4: 55 push %ebp 10c8d5: 89 e5 mov %esp,%ebp 10c8d7: 53 push %ebx 10c8d8: 83 ec 04 sub $0x4,%esp 10c8db: 8b 5d 08 mov 0x8(%ebp),%ebx ISR_Level level; Thread_Control *executing = _Thread_Executing; 10c8de: 8b 15 c0 72 12 00 mov 0x1272c0,%edx * Otherwise, we have to block. * If locked for reading and no waiters, then OK to read. * If any thread is waiting, then we wait. */ _ISR_Disable( level ); 10c8e4: 9c pushf 10c8e5: fa cli 10c8e6: 58 pop %eax if ( the_rwlock->current_state == CORE_RWLOCK_UNLOCKED){ 10c8e7: 8b 4b 44 mov 0x44(%ebx),%ecx 10c8ea: 85 c9 test %ecx,%ecx 10c8ec: 75 0b jne 10c8f9 <_CORE_RWLock_Release+0x25> _ISR_Enable( level ); 10c8ee: 50 push %eax 10c8ef: 9d popf executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE; 10c8f0: c7 42 34 02 00 00 00 movl $0x2,0x34(%edx) return CORE_RWLOCK_SUCCESSFUL; 10c8f7: eb 72 jmp 10c96b <_CORE_RWLock_Release+0x97> <== ALWAYS TAKEN } if ( the_rwlock->current_state == CORE_RWLOCK_LOCKED_FOR_READING ) { 10c8f9: 49 dec %ecx 10c8fa: 75 0f jne 10c90b <_CORE_RWLock_Release+0x37> the_rwlock->number_of_readers -= 1; 10c8fc: 8b 4b 48 mov 0x48(%ebx),%ecx 10c8ff: 49 dec %ecx 10c900: 89 4b 48 mov %ecx,0x48(%ebx) if ( the_rwlock->number_of_readers != 0 ) { 10c903: 85 c9 test %ecx,%ecx 10c905: 74 04 je 10c90b <_CORE_RWLock_Release+0x37> /* must be unlocked again */ _ISR_Enable( level ); 10c907: 50 push %eax 10c908: 9d popf return CORE_RWLOCK_SUCCESSFUL; 10c909: eb 60 jmp 10c96b <_CORE_RWLock_Release+0x97> <== ALWAYS TAKEN } } /* CORE_RWLOCK_LOCKED_FOR_WRITING or READING with readers */ executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; 10c90b: c7 42 34 00 00 00 00 movl $0x0,0x34(%edx) /* * Implicitly transition to "unlocked" and find another thread interested * in obtaining this rwlock. */ the_rwlock->current_state = CORE_RWLOCK_UNLOCKED; 10c912: c7 43 44 00 00 00 00 movl $0x0,0x44(%ebx) _ISR_Enable( level ); 10c919: 50 push %eax 10c91a: 9d popf next = _Thread_queue_Dequeue( &the_rwlock->Wait_queue ); 10c91b: 83 ec 0c sub $0xc,%esp 10c91e: 53 push %ebx 10c91f: e8 48 15 00 00 call 10de6c <_Thread_queue_Dequeue> if ( next ) { 10c924: 83 c4 10 add $0x10,%esp 10c927: 85 c0 test %eax,%eax 10c929: 74 40 je 10c96b <_CORE_RWLock_Release+0x97> if ( next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE ) { 10c92b: 83 78 30 01 cmpl $0x1,0x30(%eax) 10c92f: 75 09 jne 10c93a <_CORE_RWLock_Release+0x66> the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_WRITING; 10c931: c7 43 44 02 00 00 00 movl $0x2,0x44(%ebx) return CORE_RWLOCK_SUCCESSFUL; 10c938: eb 31 jmp 10c96b <_CORE_RWLock_Release+0x97> <== ALWAYS TAKEN } /* * Must be CORE_RWLOCK_THREAD_WAITING_FOR_READING */ the_rwlock->number_of_readers += 1; 10c93a: ff 43 48 incl 0x48(%ebx) the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_READING; 10c93d: c7 43 44 01 00 00 00 movl $0x1,0x44(%ebx) /* * Now see if more readers can be let go. */ while ( 1 ) { next = _Thread_queue_First( &the_rwlock->Wait_queue ); 10c944: 83 ec 0c sub $0xc,%esp 10c947: 53 push %ebx 10c948: e8 fb 18 00 00 call 10e248 <_Thread_queue_First> if ( !next || 10c94d: 83 c4 10 add $0x10,%esp 10c950: 85 c0 test %eax,%eax 10c952: 74 17 je 10c96b <_CORE_RWLock_Release+0x97> next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE ) 10c954: 83 78 30 01 cmpl $0x1,0x30(%eax) 10c958: 74 11 je 10c96b <_CORE_RWLock_Release+0x97> <== ALWAYS TAKEN return CORE_RWLOCK_SUCCESSFUL; the_rwlock->number_of_readers += 1; 10c95a: ff 43 48 incl 0x48(%ebx) _Thread_queue_Extract( &the_rwlock->Wait_queue, next ); 10c95d: 52 push %edx 10c95e: 52 push %edx 10c95f: 50 push %eax 10c960: 53 push %ebx 10c961: e8 d2 17 00 00 call 10e138 <_Thread_queue_Extract> } 10c966: 83 c4 10 add $0x10,%esp 10c969: eb d9 jmp 10c944 <_CORE_RWLock_Release+0x70> <== ALWAYS TAKEN } /* indentation is to match _ISR_Disable at top */ return CORE_RWLOCK_SUCCESSFUL; } 10c96b: 31 c0 xor %eax,%eax 10c96d: 8b 5d fc mov -0x4(%ebp),%ebx 10c970: c9 leave 10c971: c3 ret 0010c974 <_CORE_RWLock_Timeout>: void _CORE_RWLock_Timeout( Objects_Id id, void *ignored ) { 10c974: 55 push %ebp 10c975: 89 e5 mov %esp,%ebp 10c977: 83 ec 20 sub $0x20,%esp Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 10c97a: 8d 45 f4 lea -0xc(%ebp),%eax 10c97d: 50 push %eax 10c97e: ff 75 08 pushl 0x8(%ebp) 10c981: e8 7a 11 00 00 call 10db00 <_Thread_Get> switch ( location ) { 10c986: 83 c4 10 add $0x10,%esp 10c989: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 10c98d: 75 17 jne 10c9a6 <_CORE_RWLock_Timeout+0x32> <== ALWAYS TAKEN #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_queue_Process_timeout( the_thread ); 10c98f: 83 ec 0c sub $0xc,%esp 10c992: 50 push %eax 10c993: e8 70 19 00 00 call 10e308 <_Thread_queue_Process_timeout> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 10c998: a1 04 72 12 00 mov 0x127204,%eax 10c99d: 48 dec %eax 10c99e: a3 04 72 12 00 mov %eax,0x127204 10c9a3: 83 c4 10 add $0x10,%esp _Thread_Unnest_dispatch(); break; } } 10c9a6: c9 leave 10c9a7: c3 ret 00110a44 <_CORE_barrier_Release>: #else Objects_Id id __attribute__((unused)), CORE_barrier_API_mp_support_callout api_barrier_mp_support __attribute__((unused)) #endif ) { 110a44: 55 push %ebp 110a45: 89 e5 mov %esp,%ebp 110a47: 56 push %esi 110a48: 53 push %ebx 110a49: 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)) ) { 110a4c: 31 db xor %ebx,%ebx 110a4e: eb 01 jmp 110a51 <_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++; 110a50: 43 inc %ebx { Thread_Control *the_thread; uint32_t count; count = 0; while ( (the_thread = _Thread_queue_Dequeue(&the_barrier->Wait_queue)) ) { 110a51: 83 ec 0c sub $0xc,%esp 110a54: 56 push %esi 110a55: e8 26 b5 ff ff call 10bf80 <_Thread_queue_Dequeue> 110a5a: 83 c4 10 add $0x10,%esp 110a5d: 85 c0 test %eax,%eax 110a5f: 75 ef jne 110a50 <_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; 110a61: c7 46 48 00 00 00 00 movl $0x0,0x48(%esi) return count; } 110a68: 89 d8 mov %ebx,%eax 110a6a: 8d 65 f8 lea -0x8(%ebp),%esp 110a6d: 5b pop %ebx 110a6e: 5e pop %esi 110a6f: c9 leave 110a70: c3 ret 00110a74 <_CORE_barrier_Wait>: Objects_Id id, bool wait, Watchdog_Interval timeout, CORE_barrier_API_mp_support_callout api_barrier_mp_support ) { 110a74: 55 push %ebp 110a75: 89 e5 mov %esp,%ebp 110a77: 57 push %edi 110a78: 56 push %esi 110a79: 53 push %ebx 110a7a: 83 ec 1c sub $0x1c,%esp 110a7d: 8b 45 08 mov 0x8(%ebp),%eax 110a80: 8b 4d 0c mov 0xc(%ebp),%ecx 110a83: 8b 75 14 mov 0x14(%ebp),%esi 110a86: 8b 7d 18 mov 0x18(%ebp),%edi Thread_Control *executing; ISR_Level level; executing = _Thread_Executing; 110a89: 8b 15 a8 42 12 00 mov 0x1242a8,%edx executing->Wait.return_code = CORE_BARRIER_STATUS_SUCCESSFUL; 110a8f: c7 42 34 00 00 00 00 movl $0x0,0x34(%edx) _ISR_Disable( level ); 110a96: 9c pushf 110a97: fa cli 110a98: 8f 45 e4 popl -0x1c(%ebp) the_barrier->number_of_waiting_threads++; 110a9b: 8b 58 48 mov 0x48(%eax),%ebx 110a9e: 43 inc %ebx 110a9f: 89 58 48 mov %ebx,0x48(%eax) if ( _CORE_barrier_Is_automatic( &the_barrier->Attributes ) ) { 110aa2: 83 78 40 00 cmpl $0x0,0x40(%eax) 110aa6: 75 25 jne 110acd <_CORE_barrier_Wait+0x59> if ( the_barrier->number_of_waiting_threads == the_barrier->Attributes.maximum_count) { 110aa8: 3b 58 44 cmp 0x44(%eax),%ebx 110aab: 75 20 jne 110acd <_CORE_barrier_Wait+0x59> executing->Wait.return_code = CORE_BARRIER_STATUS_AUTOMATICALLY_RELEASED; 110aad: c7 42 34 01 00 00 00 movl $0x1,0x34(%edx) _ISR_Enable( level ); 110ab4: ff 75 e4 pushl -0x1c(%ebp) 110ab7: 9d popf _CORE_barrier_Release( the_barrier, id, api_barrier_mp_support ); 110ab8: 89 7d 10 mov %edi,0x10(%ebp) 110abb: 89 4d 0c mov %ecx,0xc(%ebp) 110abe: 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 ); } 110ac1: 83 c4 1c add $0x1c,%esp 110ac4: 5b pop %ebx 110ac5: 5e pop %esi 110ac6: 5f pop %edi 110ac7: 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 ); 110ac8: e9 77 ff ff ff jmp 110a44 <_CORE_barrier_Release> <== ALWAYS TAKEN 110acd: 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; 110ad4: 89 42 44 mov %eax,0x44(%edx) executing->Wait.id = id; 110ad7: 89 4a 20 mov %ecx,0x20(%edx) _ISR_Enable( level ); 110ada: ff 75 e4 pushl -0x1c(%ebp) 110add: 9d popf _Thread_queue_Enqueue( &the_barrier->Wait_queue, timeout ); 110ade: c7 45 10 40 c3 10 00 movl $0x10c340,0x10(%ebp) 110ae5: 89 75 0c mov %esi,0xc(%ebp) 110ae8: 89 45 08 mov %eax,0x8(%ebp) } 110aeb: 83 c4 1c add $0x1c,%esp 110aee: 5b pop %ebx 110aef: 5e pop %esi 110af0: 5f pop %edi 110af1: 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 ); 110af2: e9 8d b5 ff ff jmp 10c084 <_Thread_queue_Enqueue_with_handler> 00116dc0 <_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 ) { 116dc0: 55 push %ebp 116dc1: 89 e5 mov %esp,%ebp 116dc3: 57 push %edi 116dc4: 56 push %esi 116dc5: 53 push %ebx 116dc6: 83 ec 1c sub $0x1c,%esp 116dc9: 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 ) { 116dcc: b8 01 00 00 00 mov $0x1,%eax 116dd1: 8b 55 10 mov 0x10(%ebp),%edx 116dd4: 3b 53 4c cmp 0x4c(%ebx),%edx 116dd7: 77 4c ja 116e25 <_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))) { 116dd9: 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 ) { 116de0: 83 7b 48 00 cmpl $0x0,0x48(%ebx) 116de4: 74 23 je 116e09 <_CORE_message_queue_Broadcast+0x49> *count = 0; 116de6: 8b 45 1c mov 0x1c(%ebp),%eax 116de9: c7 00 00 00 00 00 movl $0x0,(%eax) 116def: eb 32 jmp 116e23 <_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; 116df1: ff 45 e4 incl -0x1c(%ebp) const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 116df4: 8b 42 2c mov 0x2c(%edx),%eax 116df7: 89 c7 mov %eax,%edi 116df9: 8b 75 0c mov 0xc(%ebp),%esi 116dfc: 8b 4d 10 mov 0x10(%ebp),%ecx 116dff: f3 a4 rep movsb %ds:(%esi),%es:(%edi) buffer, waitp->return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; 116e01: 8b 42 28 mov 0x28(%edx),%eax 116e04: 8b 55 10 mov 0x10(%ebp),%edx 116e07: 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))) { 116e09: 83 ec 0c sub $0xc,%esp 116e0c: 53 push %ebx 116e0d: e8 9e 21 00 00 call 118fb0 <_Thread_queue_Dequeue> 116e12: 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 = 116e14: 83 c4 10 add $0x10,%esp 116e17: 85 c0 test %eax,%eax 116e19: 75 d6 jne 116df1 <_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; 116e1b: 8b 55 e4 mov -0x1c(%ebp),%edx 116e1e: 8b 45 1c mov 0x1c(%ebp),%eax 116e21: 89 10 mov %edx,(%eax) 116e23: 31 c0 xor %eax,%eax return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } 116e25: 8d 65 f4 lea -0xc(%ebp),%esp 116e28: 5b pop %ebx 116e29: 5e pop %esi 116e2a: 5f pop %edi 116e2b: c9 leave 116e2c: c3 ret 001145fc <_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 ) { 1145fc: 55 push %ebp 1145fd: 89 e5 mov %esp,%ebp 1145ff: 53 push %ebx 114600: 83 ec 08 sub $0x8,%esp 114603: 8b 5d 08 mov 0x8(%ebp),%ebx /* * This will flush blocked threads whether they were blocked on * a send or receive. */ _Thread_queue_Flush( 114606: ff 75 10 pushl 0x10(%ebp) 114609: ff 75 0c pushl 0xc(%ebp) 11460c: 53 push %ebx 11460d: e8 f2 b2 ff ff call 10f904 <_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 ) 114612: 83 c4 10 add $0x10,%esp 114615: 83 7b 48 00 cmpl $0x0,0x48(%ebx) 114619: 74 0c je 114627 <_CORE_message_queue_Close+0x2b> (void) _CORE_message_queue_Flush_support( the_message_queue ); 11461b: 83 ec 0c sub $0xc,%esp 11461e: 53 push %ebx 11461f: e8 14 00 00 00 call 114638 <_CORE_message_queue_Flush_support> <== ALWAYS TAKEN 114624: 83 c4 10 add $0x10,%esp (void) _Workspace_Free( the_message_queue->message_buffers ); 114627: 8b 43 5c mov 0x5c(%ebx),%eax 11462a: 89 45 08 mov %eax,0x8(%ebp) } 11462d: 8b 5d fc mov -0x4(%ebp),%ebx 114630: 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 ); 114631: e9 a3 bc ff ff jmp 1102d9 <_Workspace_Free> 00116e6c <_CORE_message_queue_Flush>: */ uint32_t _CORE_message_queue_Flush( CORE_message_queue_Control *the_message_queue ) { 116e6c: 55 push %ebp 116e6d: 89 e5 mov %esp,%ebp 116e6f: 83 ec 08 sub $0x8,%esp 116e72: 8b 45 08 mov 0x8(%ebp),%eax if ( the_message_queue->number_of_pending_messages != 0 ) 116e75: 83 78 48 00 cmpl $0x0,0x48(%eax) 116e79: 75 04 jne 116e7f <_CORE_message_queue_Flush+0x13> return _CORE_message_queue_Flush_support( the_message_queue ); else return 0; } 116e7b: 31 c0 xor %eax,%eax 116e7d: c9 leave 116e7e: 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 ); 116e7f: 89 45 08 mov %eax,0x8(%ebp) else return 0; } 116e82: 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 ); 116e83: e9 00 00 00 00 jmp 116e88 <_CORE_message_queue_Flush_support> <== ALWAYS TAKEN 00112204 <_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 ) { 112204: 55 push %ebp 112205: 89 e5 mov %esp,%ebp 112207: 57 push %edi 112208: 56 push %esi 112209: 53 push %ebx 11220a: 83 ec 0c sub $0xc,%esp 11220d: 8b 5d 08 mov 0x8(%ebp),%ebx 112210: 8b 75 10 mov 0x10(%ebp),%esi 112213: 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; 112216: 89 73 44 mov %esi,0x44(%ebx) the_message_queue->number_of_pending_messages = 0; 112219: c7 43 48 00 00 00 00 movl $0x0,0x48(%ebx) the_message_queue->maximum_message_size = maximum_message_size; 112220: 89 53 4c mov %edx,0x4c(%ebx) CORE_message_queue_Control *the_message_queue, CORE_message_queue_Notify_Handler the_handler, void *the_argument ) { the_message_queue->notify_handler = the_handler; 112223: c7 43 60 00 00 00 00 movl $0x0,0x60(%ebx) the_message_queue->notify_argument = the_argument; 11222a: c7 43 64 00 00 00 00 movl $0x0,0x64(%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)) { 112231: 89 d0 mov %edx,%eax 112233: f6 c2 03 test $0x3,%dl 112236: 74 0a je 112242 <_CORE_message_queue_Initialize+0x3e> allocated_message_size += sizeof(uint32_t); 112238: 8d 42 04 lea 0x4(%edx),%eax allocated_message_size &= ~(sizeof(uint32_t) - 1); 11223b: 83 e0 fc and $0xfffffffc,%eax } if (allocated_message_size < maximum_message_size) 11223e: 39 d0 cmp %edx,%eax 112240: 72 5f jb 1122a1 <_CORE_message_queue_Initialize+0x9d> <== 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)); 112242: 8d 78 14 lea 0x14(%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 * 112245: 89 fa mov %edi,%edx 112247: 0f af d6 imul %esi,%edx (allocated_message_size + sizeof(CORE_message_queue_Buffer_control)); if (message_buffering_required < allocated_message_size) 11224a: 39 c2 cmp %eax,%edx 11224c: 72 53 jb 1122a1 <_CORE_message_queue_Initialize+0x9d> <== ALWAYS TAKEN return false; /* * Attempt to allocate the message memory */ the_message_queue->message_buffers = (CORE_message_queue_Buffer *) 11224e: 83 ec 0c sub $0xc,%esp 112251: 52 push %edx 112252: e8 11 26 00 00 call 114868 <_Workspace_Allocate> 112257: 89 43 5c mov %eax,0x5c(%ebx) _Workspace_Allocate( message_buffering_required ); if (the_message_queue->message_buffers == 0) 11225a: 83 c4 10 add $0x10,%esp 11225d: 85 c0 test %eax,%eax 11225f: 74 40 je 1122a1 <_CORE_message_queue_Initialize+0x9d> /* * Initialize the pool of inactive messages, pending messages, * and set of waiting threads. */ _Chain_Initialize ( 112261: 57 push %edi 112262: 56 push %esi 112263: 50 push %eax 112264: 8d 43 68 lea 0x68(%ebx),%eax 112267: 50 push %eax 112268: e8 b3 45 00 00 call 116820 <_Chain_Initialize> <== ALWAYS TAKEN */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 11226d: 8d 43 54 lea 0x54(%ebx),%eax 112270: 89 43 50 mov %eax,0x50(%ebx) the_chain->permanent_null = NULL; 112273: c7 43 54 00 00 00 00 movl $0x0,0x54(%ebx) the_chain->last = _Chain_Head(the_chain); 11227a: 8d 43 50 lea 0x50(%ebx),%eax 11227d: 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( 112280: 6a 06 push $0x6 112282: 68 80 00 00 00 push $0x80 112287: 8b 45 0c mov 0xc(%ebp),%eax 11228a: 83 38 01 cmpl $0x1,(%eax) 11228d: 0f 94 c0 sete %al 112290: 0f b6 c0 movzbl %al,%eax 112293: 50 push %eax 112294: 53 push %ebx 112295: e8 a6 1c 00 00 call 113f40 <_Thread_queue_Initialize> 11229a: b0 01 mov $0x1,%al THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO, STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; 11229c: 83 c4 20 add $0x20,%esp 11229f: eb 02 jmp 1122a3 <_CORE_message_queue_Initialize+0x9f> <== ALWAYS TAKEN 1122a1: 31 c0 xor %eax,%eax } 1122a3: 8d 65 f4 lea -0xc(%ebp),%esp 1122a6: 5b pop %ebx 1122a7: 5e pop %esi 1122a8: 5f pop %edi 1122a9: c9 leave 1122aa: c3 ret 0010ebf8 <_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 ) { 10ebf8: 55 push %ebp 10ebf9: 89 e5 mov %esp,%ebp 10ebfb: 56 push %esi 10ebfc: 53 push %ebx 10ebfd: 8b 45 08 mov 0x8(%ebp),%eax 10ec00: 8b 55 0c mov 0xc(%ebp),%edx 10ec03: 8b 5d 10 mov 0x10(%ebp),%ebx 10ec06: 89 5a 08 mov %ebx,0x8(%edx) _CORE_message_queue_Append_unprotected(the_message_queue, the_message); else _CORE_message_queue_Prepend_unprotected(the_message_queue, the_message); _ISR_Enable( level ); #else if ( submit_type == CORE_MESSAGE_QUEUE_SEND_REQUEST ) { 10ec09: 81 fb ff ff ff 7f cmp $0x7fffffff,%ebx 10ec0f: 75 1a jne 10ec2b <_CORE_message_queue_Insert_message+0x33> _ISR_Disable( level ); 10ec11: 9c pushf 10ec12: fa cli 10ec13: 5b pop %ebx SET_NOTIFY(); the_message_queue->number_of_pending_messages++; 10ec14: ff 40 48 incl 0x48(%eax) Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 10ec17: 8d 48 54 lea 0x54(%eax),%ecx 10ec1a: 89 0a mov %ecx,(%edx) old_last_node = the_chain->last; 10ec1c: 8b 48 58 mov 0x58(%eax),%ecx the_chain->last = the_node; 10ec1f: 89 50 58 mov %edx,0x58(%eax) old_last_node->next = the_node; 10ec22: 89 11 mov %edx,(%ecx) the_node->previous = old_last_node; 10ec24: 89 4a 04 mov %ecx,0x4(%edx) _CORE_message_queue_Append_unprotected(the_message_queue, the_message); _ISR_Enable( level ); 10ec27: 53 push %ebx 10ec28: 9d popf 10ec29: eb 4d jmp 10ec78 <_CORE_message_queue_Insert_message+0x80> <== ALWAYS TAKEN } else if ( submit_type == CORE_MESSAGE_QUEUE_URGENT_REQUEST ) { 10ec2b: 81 fb 00 00 00 80 cmp $0x80000000,%ebx 10ec31: 75 1b jne 10ec4e <_CORE_message_queue_Insert_message+0x56> _ISR_Disable( level ); 10ec33: 9c pushf 10ec34: fa cli 10ec35: 5b pop %ebx SET_NOTIFY(); the_message_queue->number_of_pending_messages++; 10ec36: ff 40 48 incl 0x48(%eax) */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Head( Chain_Control *the_chain ) { return (Chain_Node *) the_chain; 10ec39: 8d 48 50 lea 0x50(%eax),%ecx Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 10ec3c: 89 4a 04 mov %ecx,0x4(%edx) before_node = after_node->next; 10ec3f: 8b 48 50 mov 0x50(%eax),%ecx after_node->next = the_node; 10ec42: 89 50 50 mov %edx,0x50(%eax) the_node->next = before_node; 10ec45: 89 0a mov %ecx,(%edx) before_node->previous = the_node; 10ec47: 89 51 04 mov %edx,0x4(%ecx) _CORE_message_queue_Prepend_unprotected(the_message_queue, the_message); _ISR_Enable( level ); 10ec4a: 53 push %ebx 10ec4b: 9d popf 10ec4c: eb 2a jmp 10ec78 <_CORE_message_queue_Insert_message+0x80> <== ALWAYS TAKEN Chain_Control *the_header; int the_priority; the_priority = _CORE_message_queue_Get_message_priority(the_message); the_header = &the_message_queue->Pending_messages; the_node = the_header->first; 10ec4e: 8b 48 50 mov 0x50(%eax),%ecx */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10ec51: 8d 70 54 lea 0x54(%eax),%esi while ( !_Chain_Is_tail( the_header, the_node ) ) { 10ec54: eb 07 jmp 10ec5d <_CORE_message_queue_Insert_message+0x65> <== ALWAYS TAKEN RTEMS_INLINE_ROUTINE int _CORE_message_queue_Get_message_priority ( CORE_message_queue_Buffer_control *the_message ) { #if defined(RTEMS_SCORE_COREMSG_ENABLE_MESSAGE_PRIORITY) return the_message->priority; 10ec56: 39 59 08 cmp %ebx,0x8(%ecx) 10ec59: 7f 06 jg 10ec61 <_CORE_message_queue_Insert_message+0x69> this_message = (CORE_message_queue_Buffer_control *) the_node; this_priority = _CORE_message_queue_Get_message_priority(this_message); if ( this_priority <= the_priority ) { the_node = the_node->next; 10ec5b: 8b 09 mov (%ecx),%ecx int the_priority; the_priority = _CORE_message_queue_Get_message_priority(the_message); the_header = &the_message_queue->Pending_messages; the_node = the_header->first; while ( !_Chain_Is_tail( the_header, the_node ) ) { 10ec5d: 39 f1 cmp %esi,%ecx 10ec5f: 75 f5 jne 10ec56 <_CORE_message_queue_Insert_message+0x5e> the_node = the_node->next; continue; } break; } _ISR_Disable( level ); 10ec61: 9c pushf 10ec62: fa cli 10ec63: 5e pop %esi SET_NOTIFY(); the_message_queue->number_of_pending_messages++; 10ec64: ff 40 48 incl 0x48(%eax) _Chain_Insert_unprotected( the_node->previous, &the_message->Node ); 10ec67: 8b 49 04 mov 0x4(%ecx),%ecx Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 10ec6a: 89 4a 04 mov %ecx,0x4(%edx) before_node = after_node->next; 10ec6d: 8b 19 mov (%ecx),%ebx after_node->next = the_node; 10ec6f: 89 11 mov %edx,(%ecx) the_node->next = before_node; 10ec71: 89 1a mov %ebx,(%edx) before_node->previous = the_node; 10ec73: 89 53 04 mov %edx,0x4(%ebx) _ISR_Enable( level ); 10ec76: 56 push %esi 10ec77: 9d popf /* * According to POSIX, does this happen before or after the message * is actually enqueued. It is logical to think afterwards, because * the message is actually in the queue at this point. */ if ( notify && the_message_queue->notify_handler ) 10ec78: 8b 50 60 mov 0x60(%eax),%edx 10ec7b: 85 d2 test %edx,%edx 10ec7d: 74 0b je 10ec8a <_CORE_message_queue_Insert_message+0x92> (*the_message_queue->notify_handler)(the_message_queue->notify_argument); 10ec7f: 8b 40 64 mov 0x64(%eax),%eax 10ec82: 89 45 08 mov %eax,0x8(%ebp) #endif } 10ec85: 5b pop %ebx 10ec86: 5e pop %esi 10ec87: c9 leave * According to POSIX, does this happen before or after the message * is actually enqueued. It is logical to think afterwards, because * 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); 10ec88: ff e2 jmp *%edx #endif } 10ec8a: 5b pop %ebx 10ec8b: 5e pop %esi 10ec8c: c9 leave 10ec8d: c3 ret 001122ac <_CORE_message_queue_Seize>: void *buffer, size_t *size_p, bool wait, Watchdog_Interval timeout ) { 1122ac: 55 push %ebp 1122ad: 89 e5 mov %esp,%ebp 1122af: 57 push %edi 1122b0: 56 push %esi 1122b1: 53 push %ebx 1122b2: 83 ec 2c sub $0x2c,%esp 1122b5: 8b 55 08 mov 0x8(%ebp),%edx 1122b8: 8b 45 0c mov 0xc(%ebp),%eax 1122bb: 89 45 dc mov %eax,-0x24(%ebp) 1122be: 8b 5d 10 mov 0x10(%ebp),%ebx 1122c1: 89 5d e0 mov %ebx,-0x20(%ebp) 1122c4: 8b 4d 14 mov 0x14(%ebp),%ecx 1122c7: 8b 75 1c mov 0x1c(%ebp),%esi 1122ca: 89 75 d4 mov %esi,-0x2c(%ebp) 1122cd: 8a 45 18 mov 0x18(%ebp),%al 1122d0: 88 45 db mov %al,-0x25(%ebp) ISR_Level level; CORE_message_queue_Buffer_control *the_message; Thread_Control *executing; executing = _Thread_Executing; 1122d3: a1 78 d5 12 00 mov 0x12d578,%eax executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; 1122d8: c7 40 34 00 00 00 00 movl $0x0,0x34(%eax) _ISR_Disable( level ); 1122df: 9c pushf 1122e0: fa cli 1122e1: 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)); 1122e4: 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; 1122e7: 8d 72 54 lea 0x54(%edx),%esi 1122ea: 39 f3 cmp %esi,%ebx 1122ec: 0f 84 8a 00 00 00 je 11237c <_CORE_message_queue_Seize+0xd0> { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; 1122f2: 8b 33 mov (%ebx),%esi the_chain->first = new_first; 1122f4: 89 72 50 mov %esi,0x50(%edx) new_first->previous = _Chain_Head(the_chain); 1122f7: 8d 7a 50 lea 0x50(%edx),%edi 1122fa: 89 7e 04 mov %edi,0x4(%esi) the_message = _CORE_message_queue_Get_pending_message( the_message_queue ); if ( the_message != NULL ) { 1122fd: 85 db test %ebx,%ebx 1122ff: 74 7b je 11237c <_CORE_message_queue_Seize+0xd0> <== ALWAYS TAKEN the_message_queue->number_of_pending_messages -= 1; 112301: ff 4a 48 decl 0x48(%edx) _ISR_Enable( level ); 112304: ff 75 e4 pushl -0x1c(%ebp) 112307: 9d popf *size_p = the_message->Contents.size; 112308: 8b 43 0c mov 0xc(%ebx),%eax 11230b: 89 01 mov %eax,(%ecx) _Thread_Executing->Wait.count = 11230d: 8b 73 08 mov 0x8(%ebx),%esi 112310: a1 78 d5 12 00 mov 0x12d578,%eax 112315: 89 70 24 mov %esi,0x24(%eax) _CORE_message_queue_Get_message_priority( the_message ); _CORE_message_queue_Copy_buffer( the_message->Contents.buffer, 112318: 8d 73 10 lea 0x10(%ebx),%esi 11231b: 89 75 e4 mov %esi,-0x1c(%ebp) const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 11231e: 8b 09 mov (%ecx),%ecx 112320: 8b 7d e0 mov -0x20(%ebp),%edi 112323: f3 a4 rep movsb %ds:(%esi),%es:(%edi) * is not, then we can go ahead and free the buffer. * * NOTE: If we note that the queue was not full before this receive, * then we can avoid this dequeue. */ the_thread = _Thread_queue_Dequeue( &the_message_queue->Wait_queue ); 112325: 83 ec 0c sub $0xc,%esp 112328: 52 push %edx 112329: 89 55 d0 mov %edx,-0x30(%ebp) 11232c: e8 f3 18 00 00 call 113c24 <_Thread_queue_Dequeue> if ( !the_thread ) { 112331: 83 c4 10 add $0x10,%esp 112334: 85 c0 test %eax,%eax 112336: 8b 55 d0 mov -0x30(%ebp),%edx 112339: 75 15 jne 112350 <_CORE_message_queue_Seize+0xa4> 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 ); 11233b: 89 5d 0c mov %ebx,0xc(%ebp) 11233e: 83 c2 68 add $0x68,%edx 112341: 89 55 08 mov %edx,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 ); } 112344: 8d 65 f4 lea -0xc(%ebp),%esp 112347: 5b pop %ebx 112348: 5e pop %esi 112349: 5f pop %edi 11234a: c9 leave 11234b: e9 34 fe ff ff jmp 112184 <_Chain_Append> <== ALWAYS TAKEN CORE_message_queue_Buffer_control *the_message, int priority ) { #if defined(RTEMS_SCORE_COREMSG_ENABLE_MESSAGE_PRIORITY) the_message->priority = priority; 112350: 8b 48 24 mov 0x24(%eax),%ecx 112353: 89 4b 08 mov %ecx,0x8(%ebx) */ _CORE_message_queue_Set_message_priority( the_message, the_thread->Wait.count ); the_message->Contents.size = (size_t) the_thread->Wait.option; 112356: 8b 48 30 mov 0x30(%eax),%ecx 112359: 89 4b 0c mov %ecx,0xc(%ebx) const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 11235c: 8b 70 2c mov 0x2c(%eax),%esi 11235f: 8b 7d e4 mov -0x1c(%ebp),%edi 112362: f3 a4 rep movsb %ds:(%esi),%es:(%edi) the_thread->Wait.return_argument_second.immutable_object, the_message->Contents.buffer, the_message->Contents.size ); _CORE_message_queue_Insert_message( 112364: 8b 43 08 mov 0x8(%ebx),%eax 112367: 89 45 10 mov %eax,0x10(%ebp) 11236a: 89 5d 0c mov %ebx,0xc(%ebp) 11236d: 89 55 08 mov %edx,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 ); } 112370: 8d 65 f4 lea -0xc(%ebp),%esp 112373: 5b pop %ebx 112374: 5e pop %esi 112375: 5f pop %edi 112376: c9 leave the_thread->Wait.return_argument_second.immutable_object, the_message->Contents.buffer, the_message->Contents.size ); _CORE_message_queue_Insert_message( 112377: e9 dc 44 00 00 jmp 116858 <_CORE_message_queue_Insert_message> return; } #endif } if ( !wait ) { 11237c: 80 7d db 00 cmpb $0x0,-0x25(%ebp) 112380: 75 13 jne 112395 <_CORE_message_queue_Seize+0xe9> _ISR_Enable( level ); 112382: ff 75 e4 pushl -0x1c(%ebp) 112385: 9d popf executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT; 112386: c7 40 34 04 00 00 00 movl $0x4,0x34(%eax) 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 ); } 11238d: 8d 65 f4 lea -0xc(%ebp),%esp 112390: 5b pop %ebx 112391: 5e pop %esi 112392: 5f pop %edi 112393: c9 leave 112394: 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; 112395: c7 42 30 01 00 00 00 movl $0x1,0x30(%edx) 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; 11239c: 89 50 44 mov %edx,0x44(%eax) executing->Wait.id = id; 11239f: 8b 5d dc mov -0x24(%ebp),%ebx 1123a2: 89 58 20 mov %ebx,0x20(%eax) executing->Wait.return_argument_second.mutable_object = buffer; 1123a5: 8b 75 e0 mov -0x20(%ebp),%esi 1123a8: 89 70 2c mov %esi,0x2c(%eax) executing->Wait.return_argument = size_p; 1123ab: 89 48 28 mov %ecx,0x28(%eax) /* Wait.count will be filled in with the message priority */ _ISR_Enable( level ); 1123ae: ff 75 e4 pushl -0x1c(%ebp) 1123b1: 9d popf _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); 1123b2: c7 45 10 e4 3f 11 00 movl $0x113fe4,0x10(%ebp) 1123b9: 8b 45 d4 mov -0x2c(%ebp),%eax 1123bc: 89 45 0c mov %eax,0xc(%ebp) 1123bf: 89 55 08 mov %edx,0x8(%ebp) } 1123c2: 8d 65 f4 lea -0xc(%ebp),%esp 1123c5: 5b pop %ebx 1123c6: 5e pop %esi 1123c7: 5f pop %edi 1123c8: 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 ); 1123c9: e9 5a 19 00 00 jmp 113d28 <_Thread_queue_Enqueue_with_handler> 0010a7d8 <_CORE_message_queue_Submit>: #endif CORE_message_queue_Submit_types submit_type, bool wait, Watchdog_Interval timeout ) { 10a7d8: 55 push %ebp 10a7d9: 89 e5 mov %esp,%ebp 10a7db: 57 push %edi 10a7dc: 56 push %esi 10a7dd: 53 push %ebx 10a7de: 83 ec 1c sub $0x1c,%esp 10a7e1: 8b 5d 08 mov 0x8(%ebp),%ebx 10a7e4: 8b 75 0c mov 0xc(%ebp),%esi 10a7e7: 8a 4d 20 mov 0x20(%ebp),%cl CORE_message_queue_Buffer_control *the_message; Thread_Control *the_thread; if ( size > the_message_queue->maximum_message_size ) { 10a7ea: b8 01 00 00 00 mov $0x1,%eax 10a7ef: 8b 55 10 mov 0x10(%ebp),%edx 10a7f2: 3b 53 4c cmp 0x4c(%ebx),%edx 10a7f5: 0f 87 cd 00 00 00 ja 10a8c8 <_CORE_message_queue_Submit+0xf0> } /* * Is there a thread currently waiting on this message queue? */ if ( the_message_queue->number_of_pending_messages == 0 ) { 10a7fb: 83 7b 48 00 cmpl $0x0,0x48(%ebx) 10a7ff: 75 37 jne 10a838 <_CORE_message_queue_Submit+0x60> the_thread = _Thread_queue_Dequeue( &the_message_queue->Wait_queue ); 10a801: 83 ec 0c sub $0xc,%esp 10a804: 53 push %ebx 10a805: 88 4d e4 mov %cl,-0x1c(%ebp) 10a808: e8 73 17 00 00 call 10bf80 <_Thread_queue_Dequeue> 10a80d: 89 c2 mov %eax,%edx if ( the_thread ) { 10a80f: 83 c4 10 add $0x10,%esp 10a812: 85 c0 test %eax,%eax 10a814: 8a 4d e4 mov -0x1c(%ebp),%cl 10a817: 74 1f je 10a838 <_CORE_message_queue_Submit+0x60> const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 10a819: 8b 40 2c mov 0x2c(%eax),%eax 10a81c: 89 c7 mov %eax,%edi 10a81e: 8b 4d 10 mov 0x10(%ebp),%ecx 10a821: 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; 10a823: 8b 42 28 mov 0x28(%edx),%eax 10a826: 8b 4d 10 mov 0x10(%ebp),%ecx 10a829: 89 08 mov %ecx,(%eax) the_thread->Wait.count = (uint32_t) submit_type; 10a82b: 8b 45 1c mov 0x1c(%ebp),%eax 10a82e: 89 42 24 mov %eax,0x24(%edx) 10a831: 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; 10a833: e9 90 00 00 00 jmp 10a8c8 <_CORE_message_queue_Submit+0xf0> <== 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 ) { 10a838: 8b 43 48 mov 0x48(%ebx),%eax 10a83b: 3b 43 44 cmp 0x44(%ebx),%eax 10a83e: 73 33 jae 10a873 <_CORE_message_queue_Submit+0x9b> 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 *) 10a840: 83 ec 0c sub $0xc,%esp 10a843: 8d 43 68 lea 0x68(%ebx),%eax 10a846: 50 push %eax 10a847: e8 68 ff ff ff call 10a7b4 <_Chain_Get> <== ALWAYS TAKEN 10a84c: 89 c2 mov %eax,%edx const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 10a84e: 8d 40 10 lea 0x10(%eax),%eax 10a851: 89 c7 mov %eax,%edi 10a853: 8b 4d 10 mov 0x10(%ebp),%ecx 10a856: f3 a4 rep movsb %ds:(%esi),%es:(%edi) _CORE_message_queue_Copy_buffer( buffer, the_message->Contents.buffer, size ); the_message->Contents.size = size; 10a858: 8b 4d 10 mov 0x10(%ebp),%ecx 10a85b: 89 4a 0c mov %ecx,0xc(%edx) CORE_message_queue_Buffer_control *the_message, int priority ) { #if defined(RTEMS_SCORE_COREMSG_ENABLE_MESSAGE_PRIORITY) the_message->priority = priority; 10a85e: 8b 45 1c mov 0x1c(%ebp),%eax 10a861: 89 42 08 mov %eax,0x8(%edx) _CORE_message_queue_Set_message_priority( the_message, submit_type ); _CORE_message_queue_Insert_message( 10a864: 83 c4 0c add $0xc,%esp 10a867: 50 push %eax 10a868: 52 push %edx 10a869: 53 push %ebx 10a86a: e8 89 43 00 00 call 10ebf8 <_CORE_message_queue_Insert_message> 10a86f: 31 c0 xor %eax,%eax 10a871: eb 52 jmp 10a8c5 <_CORE_message_queue_Submit+0xed> <== ALWAYS TAKEN /* * No message buffers were available so we may need to return an * overflow error or block the sender until the message is placed * on the queue. */ if ( !wait ) { 10a873: b8 02 00 00 00 mov $0x2,%eax 10a878: 84 c9 test %cl,%cl 10a87a: 74 4c je 10a8c8 <_CORE_message_queue_Submit+0xf0> /* * Do NOT block on a send if the caller is in an ISR. It is * deadly to block in an ISR. */ if ( _ISR_Is_in_progress() ) { 10a87c: 8b 15 84 42 12 00 mov 0x124284,%edx 10a882: b0 03 mov $0x3,%al 10a884: 85 d2 test %edx,%edx 10a886: 75 40 jne 10a8c8 <_CORE_message_queue_Submit+0xf0> * Thus the unusual choice to open a new scope and declare * it as a variable. Doing this emphasizes how dangerous it * would be to use this variable prior to here. */ { Thread_Control *executing = _Thread_Executing; 10a888: a1 a8 42 12 00 mov 0x1242a8,%eax ISR_Level level; _ISR_Disable( level ); 10a88d: 9c pushf 10a88e: fa cli 10a88f: 59 pop %ecx 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; 10a890: c7 43 30 01 00 00 00 movl $0x1,0x30(%ebx) _Thread_queue_Enter_critical_section( &the_message_queue->Wait_queue ); executing->Wait.queue = &the_message_queue->Wait_queue; 10a897: 89 58 44 mov %ebx,0x44(%eax) executing->Wait.id = id; 10a89a: 8b 55 14 mov 0x14(%ebp),%edx 10a89d: 89 50 20 mov %edx,0x20(%eax) executing->Wait.return_argument_second.immutable_object = buffer; 10a8a0: 89 70 2c mov %esi,0x2c(%eax) executing->Wait.option = (uint32_t) size; 10a8a3: 8b 55 10 mov 0x10(%ebp),%edx 10a8a6: 89 50 30 mov %edx,0x30(%eax) executing->Wait.count = submit_type; 10a8a9: 8b 55 1c mov 0x1c(%ebp),%edx 10a8ac: 89 50 24 mov %edx,0x24(%eax) _ISR_Enable( level ); 10a8af: 51 push %ecx 10a8b0: 9d popf _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); 10a8b1: 50 push %eax 10a8b2: 68 40 c3 10 00 push $0x10c340 10a8b7: ff 75 24 pushl 0x24(%ebp) 10a8ba: 53 push %ebx 10a8bb: e8 c4 17 00 00 call 10c084 <_Thread_queue_Enqueue_with_handler> 10a8c0: b8 07 00 00 00 mov $0x7,%eax } return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT; 10a8c5: 83 c4 10 add $0x10,%esp #endif } 10a8c8: 8d 65 f4 lea -0xc(%ebp),%esp 10a8cb: 5b pop %ebx 10a8cc: 5e pop %esi 10a8cd: 5f pop %edi 10a8ce: c9 leave 10a8cf: c3 ret 0010a8dc <_CORE_mutex_Initialize>: CORE_mutex_Status _CORE_mutex_Initialize( CORE_mutex_Control *the_mutex, CORE_mutex_Attributes *the_mutex_attributes, uint32_t initial_lock ) { 10a8dc: 55 push %ebp 10a8dd: 89 e5 mov %esp,%ebp 10a8df: 57 push %edi 10a8e0: 56 push %esi 10a8e1: 53 push %ebx 10a8e2: 83 ec 0c sub $0xc,%esp 10a8e5: 8b 55 08 mov 0x8(%ebp),%edx 10a8e8: 8b 5d 0c mov 0xc(%ebp),%ebx 10a8eb: 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; 10a8ee: 8d 7a 40 lea 0x40(%edx),%edi 10a8f1: b9 04 00 00 00 mov $0x4,%ecx 10a8f6: 89 de mov %ebx,%esi 10a8f8: f3 a5 rep movsl %ds:(%esi),%es:(%edi) the_mutex->lock = initial_lock; 10a8fa: 89 42 50 mov %eax,0x50(%edx) the_mutex->blocked_count = 0; 10a8fd: c7 42 58 00 00 00 00 movl $0x0,0x58(%edx) if ( initial_lock == CORE_MUTEX_LOCKED ) { 10a904: 85 c0 test %eax,%eax 10a906: 75 35 jne 10a93d <_CORE_mutex_Initialize+0x61> the_mutex->nest_count = 1; 10a908: c7 42 54 01 00 00 00 movl $0x1,0x54(%edx) the_mutex->holder = _Thread_Executing; 10a90f: 8b 0d a8 42 12 00 mov 0x1242a8,%ecx 10a915: 89 4a 5c mov %ecx,0x5c(%edx) the_mutex->holder_id = _Thread_Executing->Object.id; 10a918: 8b 41 08 mov 0x8(%ecx),%eax 10a91b: 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; 10a91e: 8b 42 48 mov 0x48(%edx),%eax if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 10a921: 83 f8 02 cmp $0x2,%eax 10a924: 74 05 je 10a92b <_CORE_mutex_Initialize+0x4f> 10a926: 83 f8 03 cmp $0x3,%eax 10a929: 75 27 jne 10a952 <_CORE_mutex_Initialize+0x76> _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { if ( _Thread_Executing->current_priority < the_mutex->Attributes.priority_ceiling ) 10a92b: 8b 71 14 mov 0x14(%ecx),%esi 10a92e: b8 06 00 00 00 mov $0x6,%eax 10a933: 3b 72 4c cmp 0x4c(%edx),%esi 10a936: 72 36 jb 10a96e <_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++; 10a938: ff 41 1c incl 0x1c(%ecx) 10a93b: eb 15 jmp 10a952 <_CORE_mutex_Initialize+0x76> <== ALWAYS TAKEN } } else { the_mutex->nest_count = 0; 10a93d: c7 42 54 00 00 00 00 movl $0x0,0x54(%edx) the_mutex->holder = NULL; 10a944: c7 42 5c 00 00 00 00 movl $0x0,0x5c(%edx) the_mutex->holder_id = 0; 10a94b: c7 42 60 00 00 00 00 movl $0x0,0x60(%edx) } _Thread_queue_Initialize( 10a952: 6a 05 push $0x5 10a954: 68 00 04 00 00 push $0x400 10a959: 31 c0 xor %eax,%eax 10a95b: 83 7b 08 00 cmpl $0x0,0x8(%ebx) 10a95f: 0f 95 c0 setne %al 10a962: 50 push %eax 10a963: 52 push %edx 10a964: e8 33 19 00 00 call 10c29c <_Thread_queue_Initialize> 10a969: 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; 10a96b: 83 c4 10 add $0x10,%esp } 10a96e: 8d 65 f4 lea -0xc(%ebp),%esp 10a971: 5b pop %ebx 10a972: 5e pop %esi 10a973: 5f pop %edi 10a974: c9 leave 10a975: c3 ret 0010a9c5 <_CORE_mutex_Seize>: Objects_Id _id, bool _wait, Watchdog_Interval _timeout, ISR_Level _level ) { 10a9c5: 55 push %ebp 10a9c6: 89 e5 mov %esp,%ebp 10a9c8: 53 push %ebx 10a9c9: 83 ec 14 sub $0x14,%esp 10a9cc: 8b 5d 08 mov 0x8(%ebp),%ebx 10a9cf: 8a 55 10 mov 0x10(%ebp),%dl _CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level ); 10a9d2: a1 ec 41 12 00 mov 0x1241ec,%eax 10a9d7: 85 c0 test %eax,%eax 10a9d9: 74 19 je 10a9f4 <_CORE_mutex_Seize+0x2f> 10a9db: 84 d2 test %dl,%dl 10a9dd: 74 15 je 10a9f4 <_CORE_mutex_Seize+0x2f> <== ALWAYS TAKEN 10a9df: 83 3d 84 43 12 00 01 cmpl $0x1,0x124384 10a9e6: 76 0c jbe 10a9f4 <_CORE_mutex_Seize+0x2f> 10a9e8: 53 push %ebx 10a9e9: 6a 13 push $0x13 10a9eb: 6a 00 push $0x0 10a9ed: 6a 00 push $0x0 10a9ef: e8 60 05 00 00 call 10af54 <_Internal_error_Occurred> 10a9f4: 51 push %ecx 10a9f5: 51 push %ecx 10a9f6: 8d 45 18 lea 0x18(%ebp),%eax 10a9f9: 50 push %eax 10a9fa: 53 push %ebx 10a9fb: 88 55 f4 mov %dl,-0xc(%ebp) 10a9fe: e8 8d 42 00 00 call 10ec90 <_CORE_mutex_Seize_interrupt_trylock> 10aa03: 83 c4 10 add $0x10,%esp 10aa06: 85 c0 test %eax,%eax 10aa08: 8a 55 f4 mov -0xc(%ebp),%dl 10aa0b: 74 48 je 10aa55 <_CORE_mutex_Seize+0x90> 10aa0d: 84 d2 test %dl,%dl 10aa0f: 75 12 jne 10aa23 <_CORE_mutex_Seize+0x5e> 10aa11: ff 75 18 pushl 0x18(%ebp) 10aa14: 9d popf 10aa15: a1 a8 42 12 00 mov 0x1242a8,%eax 10aa1a: c7 40 34 01 00 00 00 movl $0x1,0x34(%eax) 10aa21: eb 32 jmp 10aa55 <_CORE_mutex_Seize+0x90> <== ALWAYS TAKEN 10aa23: c7 43 30 01 00 00 00 movl $0x1,0x30(%ebx) 10aa2a: a1 a8 42 12 00 mov 0x1242a8,%eax 10aa2f: 89 58 44 mov %ebx,0x44(%eax) 10aa32: 8b 55 0c mov 0xc(%ebp),%edx 10aa35: 89 50 20 mov %edx,0x20(%eax) 10aa38: a1 ec 41 12 00 mov 0x1241ec,%eax 10aa3d: 40 inc %eax 10aa3e: a3 ec 41 12 00 mov %eax,0x1241ec 10aa43: ff 75 18 pushl 0x18(%ebp) 10aa46: 9d popf 10aa47: 50 push %eax 10aa48: 50 push %eax 10aa49: ff 75 14 pushl 0x14(%ebp) 10aa4c: 53 push %ebx 10aa4d: e8 26 ff ff ff call 10a978 <_CORE_mutex_Seize_interrupt_blocking> <== ALWAYS TAKEN 10aa52: 83 c4 10 add $0x10,%esp } 10aa55: 8b 5d fc mov -0x4(%ebp),%ebx 10aa58: c9 leave 10aa59: c3 ret 0010a978 <_CORE_mutex_Seize_interrupt_blocking>: void _CORE_mutex_Seize_interrupt_blocking( CORE_mutex_Control *the_mutex, Watchdog_Interval timeout ) { 10a978: 55 push %ebp 10a979: 89 e5 mov %esp,%ebp 10a97b: 56 push %esi 10a97c: 53 push %ebx 10a97d: 8b 5d 08 mov 0x8(%ebp),%ebx 10a980: 8b 75 0c mov 0xc(%ebp),%esi Thread_Control *executing; executing = _Thread_Executing; 10a983: 8b 15 a8 42 12 00 mov 0x1242a8,%edx if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) ) { 10a989: 83 7b 48 02 cmpl $0x2,0x48(%ebx) 10a98d: 75 18 jne 10a9a7 <_CORE_mutex_Seize_interrupt_blocking+0x2f> if ( the_mutex->holder->current_priority > executing->current_priority ) { 10a98f: 8b 43 5c mov 0x5c(%ebx),%eax 10a992: 8b 52 14 mov 0x14(%edx),%edx 10a995: 39 50 14 cmp %edx,0x14(%eax) 10a998: 76 0d jbe 10a9a7 <_CORE_mutex_Seize_interrupt_blocking+0x2f> _Thread_Change_priority( 10a99a: 51 push %ecx 10a99b: 6a 00 push $0x0 10a99d: 52 push %edx 10a99e: 50 push %eax 10a99f: e8 b0 0d 00 00 call 10b754 <_Thread_Change_priority> <== ALWAYS TAKEN 10a9a4: 83 c4 10 add $0x10,%esp false ); } } the_mutex->blocked_count++; 10a9a7: ff 43 58 incl 0x58(%ebx) _Thread_queue_Enqueue( &the_mutex->Wait_queue, timeout ); 10a9aa: 50 push %eax 10a9ab: 68 40 c3 10 00 push $0x10c340 10a9b0: 56 push %esi 10a9b1: 53 push %ebx 10a9b2: e8 cd 16 00 00 call 10c084 <_Thread_queue_Enqueue_with_handler> _Thread_Enable_dispatch(); 10a9b7: 83 c4 10 add $0x10,%esp } 10a9ba: 8d 65 f8 lea -0x8(%ebp),%esp 10a9bd: 5b pop %ebx 10a9be: 5e pop %esi 10a9bf: c9 leave } the_mutex->blocked_count++; _Thread_queue_Enqueue( &the_mutex->Wait_queue, timeout ); _Thread_Enable_dispatch(); 10a9c0: e9 2c 12 00 00 jmp 10bbf1 <_Thread_Enable_dispatch> 0010ec90 <_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 ) { 10ec90: 55 push %ebp 10ec91: 89 e5 mov %esp,%ebp 10ec93: 53 push %ebx 10ec94: 83 ec 04 sub $0x4,%esp 10ec97: 8b 45 08 mov 0x8(%ebp),%eax 10ec9a: 8b 4d 0c mov 0xc(%ebp),%ecx { Thread_Control *executing; /* disabled when you get here */ executing = _Thread_Executing; 10ec9d: 8b 15 a8 42 12 00 mov 0x1242a8,%edx executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; 10eca3: c7 42 34 00 00 00 00 movl $0x0,0x34(%edx) if ( !_CORE_mutex_Is_locked( the_mutex ) ) { 10ecaa: 83 78 50 00 cmpl $0x0,0x50(%eax) 10ecae: 0f 84 87 00 00 00 je 10ed3b <_CORE_mutex_Seize_interrupt_trylock+0xab> the_mutex->lock = CORE_MUTEX_LOCKED; 10ecb4: c7 40 50 00 00 00 00 movl $0x0,0x50(%eax) the_mutex->holder = executing; 10ecbb: 89 50 5c mov %edx,0x5c(%eax) the_mutex->holder_id = executing->Object.id; 10ecbe: 8b 5a 08 mov 0x8(%edx),%ebx 10ecc1: 89 58 60 mov %ebx,0x60(%eax) the_mutex->nest_count = 1; 10ecc4: 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; 10eccb: 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 ) || 10ecce: 83 fb 02 cmp $0x2,%ebx 10ecd1: 74 05 je 10ecd8 <_CORE_mutex_Seize_interrupt_trylock+0x48> 10ecd3: 83 fb 03 cmp $0x3,%ebx 10ecd6: 75 08 jne 10ece0 <_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++; 10ecd8: ff 42 1c incl 0x1c(%edx) } if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { 10ecdb: 83 fb 03 cmp $0x3,%ebx 10ecde: 74 05 je 10ece5 <_CORE_mutex_Seize_interrupt_trylock+0x55> _ISR_Enable( *level_p ); 10ece0: ff 31 pushl (%ecx) 10ece2: 9d popf 10ece3: eb 7b jmp 10ed60 <_CORE_mutex_Seize_interrupt_trylock+0xd0> <== ALWAYS TAKEN { Priority_Control ceiling; Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; current = executing->current_priority; 10ece5: 8b 5a 14 mov 0x14(%edx),%ebx if ( current == ceiling ) { 10ece8: 3b 58 4c cmp 0x4c(%eax),%ebx 10eceb: 75 05 jne 10ecf2 <_CORE_mutex_Seize_interrupt_trylock+0x62> _ISR_Enable( *level_p ); 10eced: ff 31 pushl (%ecx) 10ecef: 9d popf 10ecf0: eb 6e jmp 10ed60 <_CORE_mutex_Seize_interrupt_trylock+0xd0> <== ALWAYS TAKEN return 0; } if ( current > ceiling ) { 10ecf2: 76 2a jbe 10ed1e <_CORE_mutex_Seize_interrupt_trylock+0x8e> rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10ecf4: 8b 15 ec 41 12 00 mov 0x1241ec,%edx 10ecfa: 42 inc %edx 10ecfb: 89 15 ec 41 12 00 mov %edx,0x1241ec _Thread_Disable_dispatch(); _ISR_Enable( *level_p ); 10ed01: ff 31 pushl (%ecx) 10ed03: 9d popf _Thread_Change_priority( 10ed04: 52 push %edx 10ed05: 6a 00 push $0x0 10ed07: ff 70 4c pushl 0x4c(%eax) 10ed0a: ff 70 5c pushl 0x5c(%eax) 10ed0d: e8 42 ca ff ff call 10b754 <_Thread_Change_priority> the_mutex->holder, the_mutex->Attributes.priority_ceiling, false ); _Thread_Enable_dispatch(); 10ed12: e8 da ce ff ff call 10bbf1 <_Thread_Enable_dispatch> 10ed17: 31 c0 xor %eax,%eax 10ed19: 83 c4 10 add $0x10,%esp 10ed1c: eb 4b jmp 10ed69 <_CORE_mutex_Seize_interrupt_trylock+0xd9> <== ALWAYS TAKEN return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; 10ed1e: c7 42 34 06 00 00 00 movl $0x6,0x34(%edx) the_mutex->lock = CORE_MUTEX_UNLOCKED; 10ed25: c7 40 50 01 00 00 00 movl $0x1,0x50(%eax) the_mutex->nest_count = 0; /* undo locking above */ 10ed2c: c7 40 54 00 00 00 00 movl $0x0,0x54(%eax) executing->resource_count--; /* undo locking above */ 10ed33: ff 4a 1c decl 0x1c(%edx) _ISR_Enable( *level_p ); 10ed36: ff 31 pushl (%ecx) 10ed38: 9d popf 10ed39: eb 25 jmp 10ed60 <_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 ) ) { 10ed3b: 8b 58 5c mov 0x5c(%eax),%ebx 10ed3e: 39 d3 cmp %edx,%ebx 10ed40: 75 22 jne 10ed64 <_CORE_mutex_Seize_interrupt_trylock+0xd4> switch ( the_mutex->Attributes.lock_nesting_behavior ) { 10ed42: 8b 50 40 mov 0x40(%eax),%edx 10ed45: 85 d2 test %edx,%edx 10ed47: 74 05 je 10ed4e <_CORE_mutex_Seize_interrupt_trylock+0xbe> 10ed49: 4a dec %edx 10ed4a: 75 18 jne 10ed64 <_CORE_mutex_Seize_interrupt_trylock+0xd4> 10ed4c: eb 08 jmp 10ed56 <_CORE_mutex_Seize_interrupt_trylock+0xc6> <== ALWAYS TAKEN case CORE_MUTEX_NESTING_ACQUIRES: the_mutex->nest_count++; 10ed4e: ff 40 54 incl 0x54(%eax) _ISR_Enable( *level_p ); 10ed51: ff 31 pushl (%ecx) 10ed53: 9d popf 10ed54: eb 0a jmp 10ed60 <_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; 10ed56: c7 43 34 02 00 00 00 movl $0x2,0x34(%ebx) _ISR_Enable( *level_p ); 10ed5d: ff 31 pushl (%ecx) 10ed5f: 9d popf 10ed60: 31 c0 xor %eax,%eax 10ed62: eb 05 jmp 10ed69 <_CORE_mutex_Seize_interrupt_trylock+0xd9> <== ALWAYS TAKEN 10ed64: b8 01 00 00 00 mov $0x1,%eax return _CORE_mutex_Seize_interrupt_trylock_body( the_mutex, level_p ); } 10ed69: 8b 5d fc mov -0x4(%ebp),%ebx 10ed6c: c9 leave 10ed6d: c3 ret 0010aa5c <_CORE_mutex_Surrender>: #else Objects_Id id __attribute__((unused)), CORE_mutex_API_mp_support_callout api_mutex_mp_support __attribute__((unused)) #endif ) { 10aa5c: 55 push %ebp 10aa5d: 89 e5 mov %esp,%ebp 10aa5f: 53 push %ebx 10aa60: 83 ec 04 sub $0x4,%esp 10aa63: 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; 10aa66: 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 ) { 10aa69: 80 7b 44 00 cmpb $0x0,0x44(%ebx) 10aa6d: 74 11 je 10aa80 <_CORE_mutex_Surrender+0x24> if ( !_Thread_Is_executing( holder ) ) 10aa6f: b8 03 00 00 00 mov $0x3,%eax 10aa74: 3b 15 a8 42 12 00 cmp 0x1242a8,%edx 10aa7a: 0f 85 b6 00 00 00 jne 10ab36 <_CORE_mutex_Surrender+0xda> return CORE_MUTEX_STATUS_NOT_OWNER_OF_RESOURCE; } /* XXX already unlocked -- not right status */ if ( !the_mutex->nest_count ) 10aa80: 8b 43 54 mov 0x54(%ebx),%eax 10aa83: 85 c0 test %eax,%eax 10aa85: 0f 84 a9 00 00 00 je 10ab34 <_CORE_mutex_Surrender+0xd8> return CORE_MUTEX_STATUS_SUCCESSFUL; the_mutex->nest_count--; 10aa8b: 48 dec %eax 10aa8c: 89 43 54 mov %eax,0x54(%ebx) if ( the_mutex->nest_count != 0 ) { 10aa8f: 85 c0 test %eax,%eax 10aa91: 0f 85 9d 00 00 00 jne 10ab34 <_CORE_mutex_Surrender+0xd8> 10aa97: 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 ) || 10aa9a: 83 f8 02 cmp $0x2,%eax 10aa9d: 74 05 je 10aaa4 <_CORE_mutex_Surrender+0x48> 10aa9f: 83 f8 03 cmp $0x3,%eax 10aaa2: 75 03 jne 10aaa7 <_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--; 10aaa4: ff 4a 1c decl 0x1c(%edx) } the_mutex->holder = NULL; 10aaa7: c7 43 5c 00 00 00 00 movl $0x0,0x5c(%ebx) the_mutex->holder_id = 0; 10aaae: c7 43 60 00 00 00 00 movl $0x0,0x60(%ebx) 10aab5: 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 ) || 10aab8: 83 f8 02 cmp $0x2,%eax 10aabb: 74 05 je 10aac2 <_CORE_mutex_Surrender+0x66> 10aabd: 83 f8 03 cmp $0x3,%eax 10aac0: 75 1b jne 10aadd <_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 && 10aac2: 83 7a 1c 00 cmpl $0x0,0x1c(%edx) 10aac6: 75 15 jne 10aadd <_CORE_mutex_Surrender+0x81> holder->real_priority != holder->current_priority ) { 10aac8: 8b 42 18 mov 0x18(%edx),%eax 10aacb: 3b 42 14 cmp 0x14(%edx),%eax 10aace: 74 0d je 10aadd <_CORE_mutex_Surrender+0x81> _Thread_Change_priority( holder, holder->real_priority, true ); 10aad0: 51 push %ecx 10aad1: 6a 01 push $0x1 10aad3: 50 push %eax 10aad4: 52 push %edx 10aad5: e8 7a 0c 00 00 call 10b754 <_Thread_Change_priority> <== ALWAYS TAKEN 10aada: 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 ) ) ) { 10aadd: 83 ec 0c sub $0xc,%esp 10aae0: 53 push %ebx 10aae1: e8 9a 14 00 00 call 10bf80 <_Thread_queue_Dequeue> 10aae6: 83 c4 10 add $0x10,%esp 10aae9: 85 c0 test %eax,%eax 10aaeb: 74 40 je 10ab2d <_CORE_mutex_Surrender+0xd1> } else #endif { the_mutex->holder = the_thread; 10aaed: 89 43 5c mov %eax,0x5c(%ebx) the_mutex->holder_id = the_thread->Object.id; 10aaf0: 8b 50 08 mov 0x8(%eax),%edx 10aaf3: 89 53 60 mov %edx,0x60(%ebx) the_mutex->nest_count = 1; 10aaf6: c7 43 54 01 00 00 00 movl $0x1,0x54(%ebx) switch ( the_mutex->Attributes.discipline ) { 10aafd: 8b 53 48 mov 0x48(%ebx),%edx 10ab00: 83 fa 02 cmp $0x2,%edx 10ab03: 74 07 je 10ab0c <_CORE_mutex_Surrender+0xb0> 10ab05: 83 fa 03 cmp $0x3,%edx 10ab08: 75 2a jne 10ab34 <_CORE_mutex_Surrender+0xd8> 10ab0a: eb 05 jmp 10ab11 <_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++; 10ab0c: ff 40 1c incl 0x1c(%eax) 10ab0f: eb 23 jmp 10ab34 <_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++; 10ab11: ff 40 1c incl 0x1c(%eax) if (the_mutex->Attributes.priority_ceiling < 10ab14: 8b 53 4c mov 0x4c(%ebx),%edx the_thread->current_priority){ 10ab17: 3b 50 14 cmp 0x14(%eax),%edx 10ab1a: 73 18 jae 10ab34 <_CORE_mutex_Surrender+0xd8> _Thread_Change_priority( 10ab1c: 51 push %ecx 10ab1d: 6a 00 push $0x0 10ab1f: 52 push %edx 10ab20: 50 push %eax 10ab21: e8 2e 0c 00 00 call 10b754 <_Thread_Change_priority> <== ALWAYS TAKEN 10ab26: 31 c0 xor %eax,%eax 10ab28: 83 c4 10 add $0x10,%esp 10ab2b: eb 09 jmp 10ab36 <_CORE_mutex_Surrender+0xda> <== ALWAYS TAKEN } break; } } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; 10ab2d: c7 43 50 01 00 00 00 movl $0x1,0x50(%ebx) 10ab34: 31 c0 xor %eax,%eax return CORE_MUTEX_STATUS_SUCCESSFUL; } 10ab36: 8b 5d fc mov -0x4(%ebp),%ebx 10ab39: c9 leave 10ab3a: c3 ret 001127f0 <_CORE_semaphore_Seize>: CORE_semaphore_Control *the_semaphore, Objects_Id id, bool wait, Watchdog_Interval timeout ) { 1127f0: 55 push %ebp 1127f1: 89 e5 mov %esp,%ebp 1127f3: 57 push %edi 1127f4: 56 push %esi 1127f5: 53 push %ebx 1127f6: 83 ec 1c sub $0x1c,%esp 1127f9: 8b 45 08 mov 0x8(%ebp),%eax 1127fc: 8b 75 0c mov 0xc(%ebp),%esi 1127ff: 8b 7d 14 mov 0x14(%ebp),%edi 112802: 8a 55 10 mov 0x10(%ebp),%dl 112805: 88 55 e7 mov %dl,-0x19(%ebp) Thread_Control *executing; ISR_Level level; executing = _Thread_Executing; 112808: 8b 15 b8 a4 12 00 mov 0x12a4b8,%edx executing->Wait.return_code = CORE_SEMAPHORE_STATUS_SUCCESSFUL; 11280e: c7 42 34 00 00 00 00 movl $0x0,0x34(%edx) _ISR_Disable( level ); 112815: 9c pushf 112816: fa cli 112817: 59 pop %ecx if ( the_semaphore->count != 0 ) { 112818: 8b 58 48 mov 0x48(%eax),%ebx 11281b: 85 db test %ebx,%ebx 11281d: 74 08 je 112827 <_CORE_semaphore_Seize+0x37> the_semaphore->count -= 1; 11281f: 4b dec %ebx 112820: 89 58 48 mov %ebx,0x48(%eax) _ISR_Enable( level ); 112823: 51 push %ecx 112824: 9d popf return; 112825: eb 39 jmp 112860 <_CORE_semaphore_Seize+0x70> <== ALWAYS TAKEN /* * If the semaphore was not available and the caller was not willing * to block, then return immediately with a status indicating that * the semaphore was not available and the caller never blocked. */ if ( !wait ) { 112827: 80 7d e7 00 cmpb $0x0,-0x19(%ebp) 11282b: 75 0b jne 112838 <_CORE_semaphore_Seize+0x48> _ISR_Enable( level ); 11282d: 51 push %ecx 11282e: 9d popf executing->Wait.return_code = CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT; 11282f: c7 42 34 01 00 00 00 movl $0x1,0x34(%edx) 112836: eb 28 jmp 112860 <_CORE_semaphore_Seize+0x70> <== ALWAYS TAKEN 112838: c7 40 30 01 00 00 00 movl $0x1,0x30(%eax) /* * If the semaphore is not available and the caller is willing to * block, then we now block the caller with optional timeout. */ _Thread_queue_Enter_critical_section( &the_semaphore->Wait_queue ); executing->Wait.queue = &the_semaphore->Wait_queue; 11283f: 89 42 44 mov %eax,0x44(%edx) executing->Wait.id = id; 112842: 89 72 20 mov %esi,0x20(%edx) _ISR_Enable( level ); 112845: 51 push %ecx 112846: 9d popf _Thread_queue_Enqueue( &the_semaphore->Wait_queue, timeout ); 112847: c7 45 10 a0 f8 10 00 movl $0x10f8a0,0x10(%ebp) 11284e: 89 7d 0c mov %edi,0xc(%ebp) 112851: 89 45 08 mov %eax,0x8(%ebp) } 112854: 83 c4 1c add $0x1c,%esp 112857: 5b pop %ebx 112858: 5e pop %esi 112859: 5f pop %edi 11285a: c9 leave */ _Thread_queue_Enter_critical_section( &the_semaphore->Wait_queue ); executing->Wait.queue = &the_semaphore->Wait_queue; executing->Wait.id = id; _ISR_Enable( level ); _Thread_queue_Enqueue( &the_semaphore->Wait_queue, timeout ); 11285b: e9 84 cd ff ff jmp 10f5e4 <_Thread_queue_Enqueue_with_handler> } 112860: 83 c4 1c add $0x1c,%esp 112863: 5b pop %ebx 112864: 5e pop %esi 112865: 5f pop %edi 112866: c9 leave 112867: c3 ret 0010ab88 <_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 ) { 10ab88: 55 push %ebp 10ab89: 89 e5 mov %esp,%ebp 10ab8b: 53 push %ebx 10ab8c: 83 ec 10 sub $0x10,%esp 10ab8f: 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)) ) { 10ab92: 53 push %ebx 10ab93: e8 e8 13 00 00 call 10bf80 <_Thread_queue_Dequeue> 10ab98: 89 c2 mov %eax,%edx 10ab9a: 83 c4 10 add $0x10,%esp 10ab9d: 31 c0 xor %eax,%eax 10ab9f: 85 d2 test %edx,%edx 10aba1: 75 15 jne 10abb8 <_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 ); 10aba3: 9c pushf 10aba4: fa cli 10aba5: 59 pop %ecx if ( the_semaphore->count < the_semaphore->Attributes.maximum_count ) 10aba6: 8b 53 48 mov 0x48(%ebx),%edx 10aba9: b0 04 mov $0x4,%al 10abab: 3b 53 40 cmp 0x40(%ebx),%edx 10abae: 73 06 jae 10abb6 <_CORE_semaphore_Surrender+0x2e> <== ALWAYS TAKEN the_semaphore->count += 1; 10abb0: 42 inc %edx 10abb1: 89 53 48 mov %edx,0x48(%ebx) 10abb4: 30 c0 xor %al,%al else status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); 10abb6: 51 push %ecx 10abb7: 9d popf } return status; } 10abb8: 8b 5d fc mov -0x4(%ebp),%ebx 10abbb: c9 leave 10abbc: c3 ret 0010b4f0 <_CORE_spinlock_Release>: */ CORE_spinlock_Status _CORE_spinlock_Release( CORE_spinlock_Control *the_spinlock ) { 10b4f0: 55 push %ebp 10b4f1: 89 e5 mov %esp,%ebp 10b4f3: 53 push %ebx 10b4f4: 8b 45 08 mov 0x8(%ebp),%eax ISR_Level level; _ISR_Disable( level ); 10b4f7: 9c pushf 10b4f8: fa cli 10b4f9: 5a pop %edx /* * It must locked before it can be unlocked. */ if ( the_spinlock->lock == CORE_SPINLOCK_UNLOCKED ) { 10b4fa: 8b 48 04 mov 0x4(%eax),%ecx 10b4fd: 85 c9 test %ecx,%ecx 10b4ff: 75 09 jne 10b50a <_CORE_spinlock_Release+0x1a> _ISR_Enable( level ); 10b501: 52 push %edx 10b502: 9d popf 10b503: b8 06 00 00 00 mov $0x6,%eax return CORE_SPINLOCK_NOT_LOCKED; 10b508: eb 30 jmp 10b53a <_CORE_spinlock_Release+0x4a> <== ALWAYS TAKEN } /* * It must locked by the current thread before it can be unlocked. */ if ( the_spinlock->holder != _Thread_Executing->Object.id ) { 10b50a: 8b 58 0c mov 0xc(%eax),%ebx 10b50d: 8b 0d b8 52 12 00 mov 0x1252b8,%ecx 10b513: 3b 59 08 cmp 0x8(%ecx),%ebx 10b516: 74 09 je 10b521 <_CORE_spinlock_Release+0x31> _ISR_Enable( level ); 10b518: 52 push %edx 10b519: 9d popf 10b51a: b8 02 00 00 00 mov $0x2,%eax return CORE_SPINLOCK_NOT_HOLDER; 10b51f: eb 19 jmp 10b53a <_CORE_spinlock_Release+0x4a> <== ALWAYS TAKEN } /* * Let it be unlocked. */ the_spinlock->users -= 1; 10b521: 8b 48 08 mov 0x8(%eax),%ecx 10b524: 49 dec %ecx 10b525: 89 48 08 mov %ecx,0x8(%eax) the_spinlock->lock = CORE_SPINLOCK_UNLOCKED; 10b528: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax) the_spinlock->holder = 0; 10b52f: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax) _ISR_Enable( level ); 10b536: 52 push %edx 10b537: 9d popf 10b538: 31 c0 xor %eax,%eax return CORE_SPINLOCK_SUCCESSFUL; } 10b53a: 5b pop %ebx 10b53b: c9 leave 10b53c: c3 ret 0010b540 <_CORE_spinlock_Wait>: CORE_spinlock_Status _CORE_spinlock_Wait( CORE_spinlock_Control *the_spinlock, bool wait, Watchdog_Interval timeout ) { 10b540: 55 push %ebp 10b541: 89 e5 mov %esp,%ebp 10b543: 56 push %esi 10b544: 53 push %ebx 10b545: 83 ec 10 sub $0x10,%esp 10b548: 8b 5d 08 mov 0x8(%ebp),%ebx 10b54b: 8a 4d 0c mov 0xc(%ebp),%cl ISR_Level level; #if defined(FUNCTIONALITY_NOT_CURRENTLY_USED_BY_ANY_API) Watchdog_Interval limit = _Watchdog_Ticks_since_boot + timeout; #endif _ISR_Disable( level ); 10b54e: 9c pushf 10b54f: fa cli 10b550: 58 pop %eax if ( (the_spinlock->lock == CORE_SPINLOCK_LOCKED) && 10b551: 8b 53 04 mov 0x4(%ebx),%edx 10b554: 4a dec %edx 10b555: 75 17 jne 10b56e <_CORE_spinlock_Wait+0x2e> (the_spinlock->holder == _Thread_Executing->Object.id) ) { 10b557: 8b 73 0c mov 0xc(%ebx),%esi 10b55a: 8b 15 b8 52 12 00 mov 0x1252b8,%edx 10b560: 3b 72 08 cmp 0x8(%edx),%esi 10b563: 75 09 jne 10b56e <_CORE_spinlock_Wait+0x2e> _ISR_Enable( level ); 10b565: 50 push %eax 10b566: 9d popf 10b567: b8 01 00 00 00 mov $0x1,%eax return CORE_SPINLOCK_HOLDER_RELOCKING; 10b56c: eb 58 jmp 10b5c6 <_CORE_spinlock_Wait+0x86> <== ALWAYS TAKEN } the_spinlock->users += 1; 10b56e: 8b 53 08 mov 0x8(%ebx),%edx 10b571: 42 inc %edx 10b572: 89 53 08 mov %edx,0x8(%ebx) for ( ;; ) { if ( the_spinlock->lock == CORE_SPINLOCK_UNLOCKED ) { 10b575: 8b 53 04 mov 0x4(%ebx),%edx 10b578: 85 d2 test %edx,%edx 10b57a: 75 19 jne 10b595 <_CORE_spinlock_Wait+0x55> the_spinlock->lock = CORE_SPINLOCK_LOCKED; 10b57c: c7 43 04 01 00 00 00 movl $0x1,0x4(%ebx) the_spinlock->holder = _Thread_Executing->Object.id; 10b583: 8b 15 b8 52 12 00 mov 0x1252b8,%edx 10b589: 8b 52 08 mov 0x8(%edx),%edx 10b58c: 89 53 0c mov %edx,0xc(%ebx) _ISR_Enable( level ); 10b58f: 50 push %eax 10b590: 9d popf 10b591: 31 c0 xor %eax,%eax return CORE_SPINLOCK_SUCCESSFUL; 10b593: eb 31 jmp 10b5c6 <_CORE_spinlock_Wait+0x86> <== ALWAYS TAKEN } /* * Spinlock is unavailable. If not willing to wait, return. */ if ( !wait ) { 10b595: 84 c9 test %cl,%cl 10b597: 75 10 jne 10b5a9 <_CORE_spinlock_Wait+0x69> the_spinlock->users -= 1; 10b599: 8b 53 08 mov 0x8(%ebx),%edx 10b59c: 4a dec %edx 10b59d: 89 53 08 mov %edx,0x8(%ebx) _ISR_Enable( level ); 10b5a0: 50 push %eax 10b5a1: 9d popf 10b5a2: b8 05 00 00 00 mov $0x5,%eax return CORE_SPINLOCK_UNAVAILABLE; 10b5a7: eb 1d jmp 10b5c6 <_CORE_spinlock_Wait+0x86> <== ALWAYS TAKEN * * A spinlock cannot be deleted while it is being used so we are * safe from deletion. */ _ISR_Enable( level ); 10b5a9: 50 push %eax 10b5aa: 9d popf /* An ISR could occur here */ _Thread_Enable_dispatch(); 10b5ab: 88 4d f4 mov %cl,-0xc(%ebp) 10b5ae: e8 4e 10 00 00 call 10c601 <_Thread_Enable_dispatch> 10b5b3: a1 fc 51 12 00 mov 0x1251fc,%eax 10b5b8: 40 inc %eax 10b5b9: a3 fc 51 12 00 mov %eax,0x1251fc /* Another thread could get dispatched here */ /* Reenter the critical sections so we can attempt the lock again. */ _Thread_Disable_dispatch(); _ISR_Disable( level ); 10b5be: 9c pushf 10b5bf: fa cli 10b5c0: 58 pop %eax } 10b5c1: 8a 4d f4 mov -0xc(%ebp),%cl 10b5c4: eb af jmp 10b575 <_CORE_spinlock_Wait+0x35> <== ALWAYS TAKEN } 10b5c6: 83 c4 10 add $0x10,%esp 10b5c9: 5b pop %ebx 10b5ca: 5e pop %esi 10b5cb: c9 leave 10b5cc: c3 ret 0010a7b4 <_Chain_Get>: */ Chain_Node *_Chain_Get( Chain_Control *the_chain ) { 10a7b4: 55 push %ebp 10a7b5: 89 e5 mov %esp,%ebp 10a7b7: 53 push %ebx 10a7b8: 8b 55 08 mov 0x8(%ebp),%edx ISR_Level level; Chain_Node *return_node; return_node = NULL; _ISR_Disable( level ); 10a7bb: 9c pushf 10a7bc: fa cli 10a7bd: 5b pop %ebx */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 10a7be: 8b 02 mov (%edx),%eax */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10a7c0: 8d 4a 04 lea 0x4(%edx),%ecx 10a7c3: 39 c8 cmp %ecx,%eax 10a7c5: 75 04 jne 10a7cb <_Chain_Get+0x17> 10a7c7: 31 c0 xor %eax,%eax 10a7c9: eb 07 jmp 10a7d2 <_Chain_Get+0x1e> <== ALWAYS TAKEN { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; 10a7cb: 8b 08 mov (%eax),%ecx the_chain->first = new_first; 10a7cd: 89 0a mov %ecx,(%edx) new_first->previous = _Chain_Head(the_chain); 10a7cf: 89 51 04 mov %edx,0x4(%ecx) if ( !_Chain_Is_empty( the_chain ) ) return_node = _Chain_Get_first_unprotected( the_chain ); _ISR_Enable( level ); 10a7d2: 53 push %ebx 10a7d3: 9d popf return return_node; } 10a7d4: 5b pop %ebx 10a7d5: c9 leave 10a7d6: c3 ret 0010ebc0 <_Chain_Initialize>: Chain_Control *the_chain, void *starting_address, size_t number_nodes, size_t node_size ) { 10ebc0: 55 push %ebp 10ebc1: 89 e5 mov %esp,%ebp 10ebc3: 56 push %esi 10ebc4: 53 push %ebx 10ebc5: 8b 4d 08 mov 0x8(%ebp),%ecx 10ebc8: 8b 5d 10 mov 0x10(%ebp),%ebx 10ebcb: 8b 75 14 mov 0x14(%ebp),%esi */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Head( Chain_Control *the_chain ) { return (Chain_Node *) the_chain; 10ebce: 89 c8 mov %ecx,%eax Chain_Node *current; Chain_Node *next; count = number_nodes; current = _Chain_Head( the_chain ); the_chain->permanent_null = NULL; 10ebd0: c7 41 04 00 00 00 00 movl $0x0,0x4(%ecx) next = starting_address; 10ebd7: 8b 55 0c mov 0xc(%ebp),%edx while ( count-- ) { 10ebda: eb 0a jmp 10ebe6 <_Chain_Initialize+0x26> <== ALWAYS TAKEN current->next = next; 10ebdc: 89 10 mov %edx,(%eax) next->previous = current; 10ebde: 89 42 04 mov %eax,0x4(%edx) current = next; next = (Chain_Node *) 10ebe1: 4b dec %ebx 10ebe2: 89 d0 mov %edx,%eax 10ebe4: 01 f2 add %esi,%edx count = number_nodes; current = _Chain_Head( the_chain ); the_chain->permanent_null = NULL; next = starting_address; while ( count-- ) { 10ebe6: 85 db test %ebx,%ebx 10ebe8: 75 f2 jne 10ebdc <_Chain_Initialize+0x1c> next->previous = current; current = next; next = (Chain_Node *) _Addresses_Add_offset( (void *) next, node_size ); } current->next = _Chain_Tail( the_chain ); 10ebea: 8d 51 04 lea 0x4(%ecx),%edx 10ebed: 89 10 mov %edx,(%eax) the_chain->last = current; 10ebef: 89 41 08 mov %eax,0x8(%ecx) } 10ebf2: 5b pop %ebx 10ebf3: 5e pop %esi 10ebf4: c9 leave 10ebf5: 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 a8 42 12 00 mov 0x1242a8,%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 f4 00 00 00 mov 0xf4(%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 c4 4a 12 00 01 movl $0x1,0x124ac4 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 c8 42 12 00 push $0x1242c8 109a6f: e8 3c 2f 00 00 call 10c9b0 <_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 58 29 00 00 call 10c3dc <_Thread_Set_state> _ISR_Disable( level ); 109a84: 9c pushf 109a85: fa cli 109a86: 5a pop %edx sync_state = _Event_Sync_state; 109a87: a1 c4 4a 12 00 mov 0x124ac4,%eax _Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 109a8c: c7 05 c4 4a 12 00 00 movl $0x0,0x124ac4 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 51 1c 00 00 jmp 10b708 <_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 f4 00 00 00 mov 0xf4(%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 84 42 12 00 mov 0x124284,%ecx 109b40: 85 c9 test %ecx,%ecx 109b42: 74 49 je 109b8d <_Event_Surrender+0x81> 109b44: 3b 1d a8 42 12 00 cmp 0x1242a8,%ebx 109b4a: 75 41 jne 109b8d <_Event_Surrender+0x81> _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || 109b4c: 8b 0d c4 4a 12 00 mov 0x124ac4,%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 c4 4a 12 00 mov 0x124ac4,%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 c4 4a 12 00 03 movl $0x3,0x124ac4 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 f2 2e 00 00 call 10cac8 <_Watchdog_Remove> 109bd6: 58 pop %eax 109bd7: 5a pop %edx 109bd8: 68 f8 ff 03 10 push $0x1003fff8 109bdd: 53 push %ebx 109bde: e8 91 1c 00 00 call 10b874 <_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 0e 20 00 00 call 10bc14 <_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 a8 42 12 00 cmp 0x1242a8,%eax 109c1f: 75 13 jne 109c34 <_Event_Timeout+0x40> if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) 109c21: 8b 0d c4 4a 12 00 mov 0x124ac4,%ecx 109c27: 49 dec %ecx 109c28: 75 0a jne 109c34 <_Event_Timeout+0x40> _Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; 109c2a: c7 05 c4 4a 12 00 02 movl $0x2,0x124ac4 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 2a 1c 00 00 call 10b874 <_Thread_Clear_state> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 109c4a: a1 ec 41 12 00 mov 0x1241ec,%eax 109c4f: 48 dec %eax 109c50: a3 ec 41 12 00 mov %eax,0x1241ec 109c55: 83 c4 10 add $0x10,%esp case OBJECTS_REMOTE: /* impossible */ #endif case OBJECTS_ERROR: break; } } 109c58: c9 leave 109c59: c3 ret 0010a4c4 <_Extension_Manager_initialization>: * * Output parameters: NONE */ void _Extension_Manager_initialization(void) { 10a4c4: 55 push %ebp 10a4c5: 89 e5 mov %esp,%ebp 10a4c7: 83 ec 0c sub $0xc,%esp _Objects_Initialize_information( 10a4ca: 6a 04 push $0x4 10a4cc: 6a 00 push $0x0 10a4ce: 6a 44 push $0x44 10a4d0: ff 35 00 02 12 00 pushl 0x120200 10a4d6: 6a 09 push $0x9 10a4d8: 6a 02 push $0x2 10a4da: 68 08 4b 12 00 push $0x124b08 10a4df: e8 74 0f 00 00 call 10b458 <_Objects_Initialize_information> <== ALWAYS TAKEN 10a4e4: 83 c4 20 add $0x20,%esp , false, /* true if this is a global object class */ NULL /* Proxy extraction support callout */ #endif ); } 10a4e7: c9 leave 10a4e8: c3 ret 0010ee28 <_Heap_Allocate_aligned_with_boundary>: Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { 10ee28: 55 push %ebp 10ee29: 89 e5 mov %esp,%ebp 10ee2b: 57 push %edi 10ee2c: 56 push %esi 10ee2d: 53 push %ebx 10ee2e: 83 ec 2c sub $0x2c,%esp 10ee31: 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; 10ee34: 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; 10ee37: 8b 46 10 mov 0x10(%esi),%eax 10ee3a: 89 45 e0 mov %eax,-0x20(%ebp) uintptr_t alloc_begin = 0; uint32_t search_count = 0; if ( block_size_floor < alloc_size ) { 10ee3d: 8b 45 0c mov 0xc(%ebp),%eax 10ee40: 83 c0 04 add $0x4,%eax 10ee43: 89 45 cc mov %eax,-0x34(%ebp) 10ee46: 0f 82 2f 01 00 00 jb 10ef7b <_Heap_Allocate_aligned_with_boundary+0x153> /* Integer overflow occured */ return NULL; } if ( boundary != 0 ) { 10ee4c: 83 7d 14 00 cmpl $0x0,0x14(%ebp) 10ee50: 74 18 je 10ee6a <_Heap_Allocate_aligned_with_boundary+0x42> if ( boundary < alloc_size ) { 10ee52: 8b 45 0c mov 0xc(%ebp),%eax 10ee55: 39 45 14 cmp %eax,0x14(%ebp) 10ee58: 0f 82 1d 01 00 00 jb 10ef7b <_Heap_Allocate_aligned_with_boundary+0x153> return NULL; } if ( alignment == 0 ) { 10ee5e: 83 7d 10 00 cmpl $0x0,0x10(%ebp) 10ee62: 75 06 jne 10ee6a <_Heap_Allocate_aligned_with_boundary+0x42> 10ee64: 8b 45 e0 mov -0x20(%ebp),%eax 10ee67: 89 45 10 mov %eax,0x10(%ebp) 10ee6a: 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; 10ee71: 8b 45 e0 mov -0x20(%ebp),%eax 10ee74: 83 c0 07 add $0x7,%eax 10ee77: 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; 10ee7a: c7 45 d8 04 00 00 00 movl $0x4,-0x28(%ebp) 10ee81: 8b 45 0c mov 0xc(%ebp),%eax 10ee84: 29 45 d8 sub %eax,-0x28(%ebp) 10ee87: 89 f7 mov %esi,%edi 10ee89: e9 ba 00 00 00 jmp 10ef48 <_Heap_Allocate_aligned_with_boundary+0x120> <== ALWAYS TAKEN while ( block != free_list_tail ) { _HAssert( _Heap_Is_prev_used( block ) ); /* Statistics */ ++search_count; 10ee8e: 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 ) { 10ee91: 8b 59 04 mov 0x4(%ecx),%ebx 10ee94: 3b 5d cc cmp -0x34(%ebp),%ebx 10ee97: 0f 86 a8 00 00 00 jbe 10ef45 <_Heap_Allocate_aligned_with_boundary+0x11d> if ( alignment == 0 ) { 10ee9d: 83 7d 10 00 cmpl $0x0,0x10(%ebp) 10eea1: 8d 41 08 lea 0x8(%ecx),%eax 10eea4: 89 45 dc mov %eax,-0x24(%ebp) 10eea7: 75 07 jne 10eeb0 <_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; 10eea9: 89 c3 mov %eax,%ebx 10eeab: e9 91 00 00 00 jmp 10ef41 <_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; 10eeb0: 8b 47 14 mov 0x14(%edi),%eax 10eeb3: 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; 10eeb6: 83 e3 fe and $0xfffffffe,%ebx 10eeb9: 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; 10eebc: 8b 75 c8 mov -0x38(%ebp),%esi 10eebf: 29 c6 sub %eax,%esi 10eec1: 01 de add %ebx,%esi uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET; uintptr_t alloc_begin = alloc_end - alloc_size; 10eec3: 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); 10eec6: 89 d8 mov %ebx,%eax 10eec8: 31 d2 xor %edx,%edx 10eeca: f7 75 10 divl 0x10(%ebp) 10eecd: 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 ) { 10eecf: 39 f3 cmp %esi,%ebx 10eed1: 76 0b jbe 10eede <_Heap_Allocate_aligned_with_boundary+0xb6> 10eed3: 89 f0 mov %esi,%eax 10eed5: 31 d2 xor %edx,%edx 10eed7: f7 75 10 divl 0x10(%ebp) 10eeda: 89 f3 mov %esi,%ebx 10eedc: 29 d3 sub %edx,%ebx } alloc_end = alloc_begin + alloc_size; /* Ensure boundary constaint */ if ( boundary != 0 ) { 10eede: 83 7d 14 00 cmpl $0x0,0x14(%ebp) 10eee2: 74 3f je 10ef23 <_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; 10eee4: 8b 45 0c mov 0xc(%ebp),%eax 10eee7: 8d 34 03 lea (%ebx,%eax,1),%esi /* Ensure boundary constaint */ if ( boundary != 0 ) { uintptr_t const boundary_floor = alloc_begin_floor + alloc_size; 10eeea: 8b 45 dc mov -0x24(%ebp),%eax 10eeed: 03 45 0c add 0xc(%ebp),%eax 10eef0: 89 45 d0 mov %eax,-0x30(%ebp) 10eef3: eb 19 jmp 10ef0e <_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 ) { 10eef5: 3b 55 d0 cmp -0x30(%ebp),%edx 10eef8: 72 4b jb 10ef45 <_Heap_Allocate_aligned_with_boundary+0x11d> return 0; } alloc_begin = boundary_line - alloc_size; 10eefa: 89 d3 mov %edx,%ebx 10eefc: 2b 5d 0c sub 0xc(%ebp),%ebx 10eeff: 89 d8 mov %ebx,%eax 10ef01: 31 d2 xor %edx,%edx 10ef03: f7 75 10 divl 0x10(%ebp) 10ef06: 29 d3 sub %edx,%ebx alloc_begin = _Heap_Align_down( alloc_begin, alignment ); alloc_end = alloc_begin + alloc_size; 10ef08: 8b 45 0c mov 0xc(%ebp),%eax 10ef0b: 8d 34 03 lea (%ebx,%eax,1),%esi 10ef0e: 89 f0 mov %esi,%eax 10ef10: 31 d2 xor %edx,%edx 10ef12: f7 75 14 divl 0x14(%ebp) 10ef15: 89 f0 mov %esi,%eax 10ef17: 29 d0 sub %edx,%eax 10ef19: 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 ) { 10ef1b: 39 f0 cmp %esi,%eax 10ef1d: 73 04 jae 10ef23 <_Heap_Allocate_aligned_with_boundary+0xfb> 10ef1f: 39 c3 cmp %eax,%ebx 10ef21: 72 d2 jb 10eef5 <_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 ) { 10ef23: 3b 5d dc cmp -0x24(%ebp),%ebx 10ef26: 72 1d jb 10ef45 <_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; 10ef28: be f8 ff ff ff mov $0xfffffff8,%esi 10ef2d: 29 ce sub %ecx,%esi 10ef2f: 01 de add %ebx,%esi 10ef31: 89 d8 mov %ebx,%eax 10ef33: 31 d2 xor %edx,%edx 10ef35: f7 75 e0 divl -0x20(%ebp) if ( free_size >= min_block_size || free_size == 0 ) { 10ef38: 29 d6 sub %edx,%esi 10ef3a: 74 05 je 10ef41 <_Heap_Allocate_aligned_with_boundary+0x119> 10ef3c: 3b 75 d4 cmp -0x2c(%ebp),%esi 10ef3f: 72 04 jb 10ef45 <_Heap_Allocate_aligned_with_boundary+0x11d> boundary ); } } if ( alloc_begin != 0 ) { 10ef41: 85 db test %ebx,%ebx 10ef43: 75 11 jne 10ef56 <_Heap_Allocate_aligned_with_boundary+0x12e> <== NEVER TAKEN break; } block = block->next; 10ef45: 8b 49 08 mov 0x8(%ecx),%ecx if ( alignment == 0 ) { alignment = page_size; } } while ( block != free_list_tail ) { 10ef48: 39 f9 cmp %edi,%ecx 10ef4a: 0f 85 3e ff ff ff jne 10ee8e <_Heap_Allocate_aligned_with_boundary+0x66> 10ef50: 89 fe mov %edi,%esi 10ef52: 31 db xor %ebx,%ebx 10ef54: eb 16 jmp 10ef6c <_Heap_Allocate_aligned_with_boundary+0x144> <== ALWAYS TAKEN 10ef56: 89 fe mov %edi,%esi block = block->next; } if ( alloc_begin != 0 ) { /* Statistics */ stats->searches += search_count; 10ef58: 8b 45 e4 mov -0x1c(%ebp),%eax 10ef5b: 01 47 4c add %eax,0x4c(%edi) block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size ); 10ef5e: ff 75 0c pushl 0xc(%ebp) 10ef61: 53 push %ebx 10ef62: 51 push %ecx 10ef63: 57 push %edi 10ef64: e8 0f bf ff ff call 10ae78 <_Heap_Block_allocate> <== ALWAYS TAKEN 10ef69: 83 c4 10 add $0x10,%esp uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { Heap_Statistics *const stats = &heap->stats; 10ef6c: 8b 45 e4 mov -0x1c(%ebp),%eax 10ef6f: 39 46 44 cmp %eax,0x44(%esi) 10ef72: 73 03 jae 10ef77 <_Heap_Allocate_aligned_with_boundary+0x14f> ); } /* Statistics */ if ( stats->max_search < search_count ) { stats->max_search = search_count; 10ef74: 89 46 44 mov %eax,0x44(%esi) } return (void *) alloc_begin; 10ef77: 89 d8 mov %ebx,%eax 10ef79: eb 02 jmp 10ef7d <_Heap_Allocate_aligned_with_boundary+0x155> <== ALWAYS TAKEN 10ef7b: 31 c0 xor %eax,%eax } 10ef7d: 8d 65 f4 lea -0xc(%ebp),%esp 10ef80: 5b pop %ebx 10ef81: 5e pop %esi 10ef82: 5f pop %edi 10ef83: c9 leave 10ef84: c3 ret 0010ae78 <_Heap_Block_allocate>: Heap_Control *heap, Heap_Block *block, uintptr_t alloc_begin, uintptr_t alloc_size ) { 10ae78: 55 push %ebp 10ae79: 89 e5 mov %esp,%ebp 10ae7b: 57 push %edi 10ae7c: 56 push %esi 10ae7d: 53 push %ebx 10ae7e: 83 ec 10 sub $0x10,%esp 10ae81: 8b 75 08 mov 0x8(%ebp),%esi 10ae84: 8b 5d 0c mov 0xc(%ebp),%ebx 10ae87: 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; 10ae8a: 89 5d e8 mov %ebx,-0x18(%ebp) 10ae8d: 8d 50 f8 lea -0x8(%eax),%edx 10ae90: 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; 10ae93: 89 d7 mov %edx,%edi 10ae95: 29 df sub %ebx,%edi Heap_Block *free_list_anchor = NULL; _HAssert( alloc_area_begin <= alloc_begin ); if ( _Heap_Is_free( block ) ) { 10ae97: 8b 53 04 mov 0x4(%ebx),%edx 10ae9a: 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 ); 10ae9d: 89 f1 mov %esi,%ecx Heap_Block *free_list_anchor = NULL; _HAssert( alloc_area_begin <= alloc_begin ); if ( _Heap_Is_free( block ) ) { 10ae9f: f6 44 13 04 01 testb $0x1,0x4(%ebx,%edx,1) 10aea4: 75 1b jne 10aec1 <_Heap_Block_allocate+0x49> free_list_anchor = block->prev; 10aea6: 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; 10aea9: 8b 53 08 mov 0x8(%ebx),%edx Heap_Block *prev = block->prev; prev->next = next; 10aeac: 89 51 08 mov %edx,0x8(%ecx) next->prev = prev; 10aeaf: 89 4a 0c mov %ecx,0xc(%edx) _Heap_Free_list_remove( block ); /* Statistics */ --stats->free_blocks; 10aeb2: ff 4e 38 decl 0x38(%esi) ++stats->used_blocks; 10aeb5: ff 46 40 incl 0x40(%esi) stats->free_size -= _Heap_Block_size( block ); 10aeb8: 8b 53 04 mov 0x4(%ebx),%edx 10aebb: 83 e2 fe and $0xfffffffe,%edx 10aebe: 29 56 30 sub %edx,0x30(%esi) } else { free_list_anchor = _Heap_Free_list_head( heap ); } if ( alloc_area_offset < heap->page_size ) { 10aec1: 8b 56 10 mov 0x10(%esi),%edx 10aec4: 89 55 e4 mov %edx,-0x1c(%ebp) 10aec7: 39 d7 cmp %edx,%edi 10aec9: 73 0e jae 10aed9 <_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 ); 10aecb: 03 7d 14 add 0x14(%ebp),%edi 10aece: 57 push %edi 10aecf: 51 push %ecx 10aed0: 53 push %ebx 10aed1: 56 push %esi 10aed2: e8 cc fe ff ff call 10ada3 <_Heap_Block_split> <== ALWAYS TAKEN 10aed7: eb 62 jmp 10af3b <_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; 10aed9: 8b 7b 04 mov 0x4(%ebx),%edi 10aedc: 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 ) 10aedf: 31 d2 xor %edx,%edx 10aee1: f7 75 e4 divl -0x1c(%ebp) 10aee4: 8b 45 f0 mov -0x10(%ebp),%eax 10aee7: 29 d0 sub %edx,%eax 10aee9: 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; 10aeeb: 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; 10aeed: 01 46 30 add %eax,0x30(%esi) if ( _Heap_Is_prev_used( block ) ) { 10aef0: f6 43 04 01 testb $0x1,0x4(%ebx) 10aef4: 74 16 je 10af0c <_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; 10aef6: 8b 51 08 mov 0x8(%ecx),%edx new_block->next = next; 10aef9: 89 53 08 mov %edx,0x8(%ebx) new_block->prev = block_before; 10aefc: 89 4b 0c mov %ecx,0xc(%ebx) block_before->next = new_block; 10aeff: 89 59 08 mov %ebx,0x8(%ecx) next->prev = new_block; 10af02: 89 5a 0c mov %ebx,0xc(%edx) _Heap_Free_list_insert_after( free_list_anchor, block ); free_list_anchor = block; /* Statistics */ ++stats->free_blocks; 10af05: ff 46 38 incl 0x38(%esi) 10af08: 89 d9 mov %ebx,%ecx 10af0a: eb 0a jmp 10af16 <_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); 10af0c: 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; 10af0e: 8b 53 04 mov 0x4(%ebx),%edx 10af11: 83 e2 fe and $0xfffffffe,%edx 10af14: 01 d0 add %edx,%eax } block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED; 10af16: 89 c2 mov %eax,%edx 10af18: 83 ca 01 or $0x1,%edx 10af1b: 89 53 04 mov %edx,0x4(%ebx) new_block->prev_size = block_size; 10af1e: 89 07 mov %eax,(%edi) new_block->size_and_flag = new_block_size; 10af20: 8b 45 ec mov -0x14(%ebp),%eax 10af23: 83 e0 fe and $0xfffffffe,%eax 10af26: 03 45 e8 add -0x18(%ebp),%eax 10af29: 29 f8 sub %edi,%eax 10af2b: 89 47 04 mov %eax,0x4(%edi) _Heap_Block_split( heap, new_block, free_list_anchor, alloc_size ); 10af2e: ff 75 14 pushl 0x14(%ebp) 10af31: 51 push %ecx 10af32: 57 push %edi 10af33: 56 push %esi 10af34: e8 6a fe ff ff call 10ada3 <_Heap_Block_split> <== ALWAYS TAKEN 10af39: 89 fb mov %edi,%ebx 10af3b: 83 c4 10 add $0x10,%esp alloc_size ); } /* Statistics */ if ( stats->min_free_size > stats->free_size ) { 10af3e: 8b 46 30 mov 0x30(%esi),%eax Heap_Block *block, uintptr_t alloc_begin, uintptr_t alloc_size ) { Heap_Statistics *const stats = &heap->stats; 10af41: 39 46 34 cmp %eax,0x34(%esi) 10af44: 76 03 jbe 10af49 <_Heap_Block_allocate+0xd1> ); } /* Statistics */ if ( stats->min_free_size > stats->free_size ) { stats->min_free_size = stats->free_size; 10af46: 89 46 34 mov %eax,0x34(%esi) } return block; } 10af49: 89 d8 mov %ebx,%eax 10af4b: 8d 65 f4 lea -0xc(%ebp),%esp 10af4e: 5b pop %ebx 10af4f: 5e pop %esi 10af50: 5f pop %edi 10af51: c9 leave 10af52: c3 ret 0010ada3 <_Heap_Block_split>: Heap_Control *heap, Heap_Block *block, Heap_Block *free_list_anchor, uintptr_t alloc_size ) { 10ada3: 55 push %ebp 10ada4: 89 e5 mov %esp,%ebp 10ada6: 57 push %edi 10ada7: 56 push %esi 10ada8: 53 push %ebx 10ada9: 83 ec 10 sub $0x10,%esp 10adac: 8b 4d 08 mov 0x8(%ebp),%ecx Heap_Statistics *const stats = &heap->stats; uintptr_t const page_size = heap->page_size; 10adaf: 8b 71 10 mov 0x10(%ecx),%esi uintptr_t const min_block_size = heap->min_block_size; 10adb2: 8b 41 14 mov 0x14(%ecx),%eax 10adb5: 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; 10adb8: 8b 55 0c mov 0xc(%ebp),%edx 10adbb: 8b 52 04 mov 0x4(%edx),%edx 10adbe: 89 55 e8 mov %edx,-0x18(%ebp) 10adc1: 83 e2 fe and $0xfffffffe,%edx 10adc4: 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; 10adc7: 89 c2 mov %eax,%edx 10adc9: 83 ea 08 sub $0x8,%edx 10adcc: 8b 45 14 mov 0x14(%ebp),%eax 10adcf: 39 d0 cmp %edx,%eax 10add1: 73 02 jae 10add5 <_Heap_Block_split+0x32> 10add3: 89 d0 mov %edx,%eax 10add5: 83 c0 08 add $0x8,%eax 10add8: 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; 10addb: 31 d2 xor %edx,%edx 10addd: f7 f6 div %esi if ( remainder != 0 ) { 10addf: 8b 7d f0 mov -0x10(%ebp),%edi 10ade2: 85 d2 test %edx,%edx 10ade4: 74 04 je 10adea <_Heap_Block_split+0x47> return value - remainder + alignment; 10ade6: 01 f7 add %esi,%edi 10ade8: 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); 10adea: 8b 45 0c mov 0xc(%ebp),%eax 10aded: 03 45 ec add -0x14(%ebp),%eax 10adf0: 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 ) { 10adf2: 8b 5d ec mov -0x14(%ebp),%ebx 10adf5: 83 c3 04 add $0x4,%ebx 10adf8: 2b 5d f0 sub -0x10(%ebp),%ebx 10adfb: 8b 75 e4 mov -0x1c(%ebp),%esi 10adfe: 83 c6 04 add $0x4,%esi 10ae01: 39 f3 cmp %esi,%ebx 10ae03: 72 67 jb 10ae6c <_Heap_Block_split+0xc9> 10ae05: 8b 5d 0c mov 0xc(%ebp),%ebx 10ae08: 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; 10ae0b: 8b 75 ec mov -0x14(%ebp),%esi 10ae0e: 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; 10ae10: 8b 5d e8 mov -0x18(%ebp),%ebx 10ae13: 83 e3 01 and $0x1,%ebx 10ae16: 09 fb or %edi,%ebx 10ae18: 8b 7d 0c mov 0xc(%ebp),%edi 10ae1b: 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; 10ae1e: 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; 10ae21: 8b 5a 04 mov 0x4(%edx),%ebx 10ae24: 83 e3 fe and $0xfffffffe,%ebx if ( _Heap_Is_used( next_block ) ) { 10ae27: f6 44 1a 04 01 testb $0x1,0x4(%edx,%ebx,1) 10ae2c: 74 17 je 10ae45 <_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; 10ae2e: 8b 7d 10 mov 0x10(%ebp),%edi 10ae31: 8b 5f 08 mov 0x8(%edi),%ebx new_block->next = next; 10ae34: 89 58 08 mov %ebx,0x8(%eax) new_block->prev = block_before; 10ae37: 89 78 0c mov %edi,0xc(%eax) block_before->next = new_block; 10ae3a: 89 47 08 mov %eax,0x8(%edi) next->prev = new_block; 10ae3d: 89 43 0c mov %eax,0xc(%ebx) _Heap_Free_list_insert_after( free_list_anchor, free_block ); /* Statistics */ ++stats->free_blocks; 10ae40: ff 41 38 incl 0x38(%ecx) 10ae43: eb 17 jmp 10ae5c <_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; 10ae45: 8b 4a 08 mov 0x8(%edx),%ecx Heap_Block *prev = old_block->prev; 10ae48: 8b 52 0c mov 0xc(%edx),%edx new_block->next = next; 10ae4b: 89 48 08 mov %ecx,0x8(%eax) new_block->prev = prev; 10ae4e: 89 50 0c mov %edx,0xc(%eax) next->prev = new_block; 10ae51: 89 41 0c mov %eax,0xc(%ecx) prev->next = new_block; 10ae54: 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; 10ae57: 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); 10ae59: 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; 10ae5c: 89 f1 mov %esi,%ecx 10ae5e: 83 c9 01 or $0x1,%ecx 10ae61: 89 48 04 mov %ecx,0x4(%eax) next_block->prev_size = free_block_size; 10ae64: 89 32 mov %esi,(%edx) next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 10ae66: 83 62 04 fe andl $0xfffffffe,0x4(%edx) 10ae6a: eb 04 jmp 10ae70 <_Heap_Block_split+0xcd> <== ALWAYS TAKEN } else { next_block->size_and_flag |= HEAP_PREV_BLOCK_USED; 10ae6c: 83 48 04 01 orl $0x1,0x4(%eax) } } 10ae70: 83 c4 10 add $0x10,%esp 10ae73: 5b pop %ebx 10ae74: 5e pop %esi 10ae75: 5f pop %edi 10ae76: c9 leave 10ae77: c3 ret 001121d4 <_Heap_Extend>: Heap_Control *heap, void *area_begin_ptr, uintptr_t area_size, uintptr_t *amount_extended ) { 1121d4: 55 push %ebp 1121d5: 89 e5 mov %esp,%ebp 1121d7: 56 push %esi 1121d8: 53 push %ebx 1121d9: 8b 4d 08 mov 0x8(%ebp),%ecx 1121dc: 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; 1121df: 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; 1121e2: 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 ) { 1121e5: 39 f2 cmp %esi,%edx 1121e7: 73 0a jae 1121f3 <_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; 1121e9: b8 01 00 00 00 mov $0x1,%eax 1121ee: 3b 51 18 cmp 0x18(%ecx),%edx 1121f1: 73 5f jae 112252 <_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 ) { 1121f3: b8 02 00 00 00 mov $0x2,%eax 1121f8: 39 f2 cmp %esi,%edx 1121fa: 75 56 jne 112252 <_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; 1121fc: 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; 1121ff: 89 51 1c mov %edx,0x1c(%ecx) extend_size = new_heap_area_end 112202: 29 da sub %ebx,%edx 112204: 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); 112207: 89 f0 mov %esi,%eax 112209: 31 d2 xor %edx,%edx 11220b: f7 71 10 divl 0x10(%ecx) 11220e: 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; 112210: 8b 45 14 mov 0x14(%ebp),%eax 112213: 89 30 mov %esi,(%eax) if( extend_size >= heap->min_block_size ) { 112215: 31 c0 xor %eax,%eax 112217: 3b 71 14 cmp 0x14(%ecx),%esi 11221a: 72 36 jb 112252 <_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); 11221c: 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; 11221f: 8b 43 04 mov 0x4(%ebx),%eax 112222: 83 e0 01 and $0x1,%eax 112225: 09 f0 or %esi,%eax 112227: 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 = 11222a: 8b 41 20 mov 0x20(%ecx),%eax 11222d: 29 d0 sub %edx,%eax 11222f: 83 c8 01 or $0x1,%eax 112232: 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; 112235: 89 51 24 mov %edx,0x24(%ecx) /* Statistics */ stats->size += extend_size; 112238: 01 71 2c add %esi,0x2c(%ecx) ++stats->used_blocks; 11223b: ff 41 40 incl 0x40(%ecx) --stats->frees; /* Do not count subsequent call as actual free() */ 11223e: ff 49 50 decl 0x50(%ecx) _Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block )); 112241: 50 push %eax 112242: 50 push %eax 112243: 83 c3 08 add $0x8,%ebx 112246: 53 push %ebx 112247: 51 push %ecx 112248: e8 d7 b5 ff ff call 10d824 <_Heap_Free> <== ALWAYS TAKEN 11224d: 31 c0 xor %eax,%eax 11224f: 83 c4 10 add $0x10,%esp } return HEAP_EXTEND_SUCCESSFUL; } 112252: 8d 65 f8 lea -0x8(%ebp),%esp 112255: 5b pop %ebx 112256: 5e pop %esi 112257: c9 leave 112258: c3 ret 0010ef88 <_Heap_Free>: #include #include #include bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) { 10ef88: 55 push %ebp 10ef89: 89 e5 mov %esp,%ebp 10ef8b: 57 push %edi 10ef8c: 56 push %esi 10ef8d: 53 push %ebx 10ef8e: 83 ec 14 sub $0x14,%esp 10ef91: 8b 4d 08 mov 0x8(%ebp),%ecx 10ef94: 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 ) 10ef97: 8d 58 f8 lea -0x8(%eax),%ebx 10ef9a: 31 d2 xor %edx,%edx 10ef9c: f7 71 10 divl 0x10(%ecx) 10ef9f: 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; 10efa1: 8b 41 20 mov 0x20(%ecx),%eax 10efa4: 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 10efa7: 31 c0 xor %eax,%eax 10efa9: 3b 5d f0 cmp -0x10(%ebp),%ebx 10efac: 72 08 jb 10efb6 <_Heap_Free+0x2e> 10efae: 31 c0 xor %eax,%eax 10efb0: 39 59 24 cmp %ebx,0x24(%ecx) 10efb3: 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 ) ) { 10efb6: 85 c0 test %eax,%eax 10efb8: 0f 84 2d 01 00 00 je 10f0eb <_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; 10efbe: 8b 7b 04 mov 0x4(%ebx),%edi 10efc1: 89 fa mov %edi,%edx 10efc3: 83 e2 fe and $0xfffffffe,%edx 10efc6: 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); 10efc9: 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 10efcc: 31 f6 xor %esi,%esi 10efce: 3b 45 f0 cmp -0x10(%ebp),%eax 10efd1: 72 0e jb 10efe1 <_Heap_Free+0x59> <== ALWAYS TAKEN 10efd3: 39 41 24 cmp %eax,0x24(%ecx) 10efd6: 0f 93 c2 setae %dl 10efd9: 89 d6 mov %edx,%esi 10efdb: 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 ) ) { 10efe1: 85 f6 test %esi,%esi 10efe3: 0f 84 02 01 00 00 je 10f0eb <_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; 10efe9: 8b 70 04 mov 0x4(%eax),%esi _HAssert( false ); return false; } if ( !_Heap_Is_prev_used( next_block ) ) { 10efec: f7 c6 01 00 00 00 test $0x1,%esi 10eff2: 0f 84 f3 00 00 00 je 10f0eb <_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; 10eff8: 83 e6 fe and $0xfffffffe,%esi 10effb: 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 )); 10effe: 8b 51 24 mov 0x24(%ecx),%edx 10f001: 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 10f004: 31 f6 xor %esi,%esi 10f006: 39 d0 cmp %edx,%eax 10f008: 74 0d je 10f017 <_Heap_Free+0x8f> 10f00a: 8b 55 e8 mov -0x18(%ebp),%edx 10f00d: 8b 74 10 04 mov 0x4(%eax,%edx,1),%esi 10f011: 83 e6 01 and $0x1,%esi 10f014: 83 f6 01 xor $0x1,%esi && !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size )); if ( !_Heap_Is_prev_used( block ) ) { 10f017: 83 e7 01 and $0x1,%edi 10f01a: 75 64 jne 10f080 <_Heap_Free+0xf8> uintptr_t const prev_size = block->prev_size; 10f01c: 8b 13 mov (%ebx),%edx 10f01e: 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); 10f021: 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 10f023: 31 ff xor %edi,%edi 10f025: 3b 5d f0 cmp -0x10(%ebp),%ebx 10f028: 72 0e jb 10f038 <_Heap_Free+0xb0> <== ALWAYS TAKEN 10f02a: 39 5d e4 cmp %ebx,-0x1c(%ebp) 10f02d: 0f 93 c2 setae %dl 10f030: 89 d7 mov %edx,%edi 10f032: 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 ) ) { 10f038: 85 ff test %edi,%edi 10f03a: 0f 84 ab 00 00 00 je 10f0eb <_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) ) { 10f040: f6 43 04 01 testb $0x1,0x4(%ebx) 10f044: 0f 84 a1 00 00 00 je 10f0eb <_Heap_Free+0x163> <== ALWAYS TAKEN _HAssert( false ); return( false ); } if ( next_is_free ) { /* coalesce both */ 10f04a: 89 f2 mov %esi,%edx 10f04c: 84 d2 test %dl,%dl 10f04e: 74 1a je 10f06a <_Heap_Free+0xe2> uintptr_t const size = block_size + prev_size + next_block_size; 10f050: 8b 75 e0 mov -0x20(%ebp),%esi 10f053: 03 75 e8 add -0x18(%ebp),%esi 10f056: 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; 10f059: 8b 78 08 mov 0x8(%eax),%edi Heap_Block *prev = block->prev; 10f05c: 8b 40 0c mov 0xc(%eax),%eax prev->next = next; 10f05f: 89 78 08 mov %edi,0x8(%eax) next->prev = prev; 10f062: 89 47 0c mov %eax,0xc(%edi) _Heap_Free_list_remove( next_block ); stats->free_blocks -= 1; 10f065: ff 49 38 decl 0x38(%ecx) 10f068: eb 34 jmp 10f09e <_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; 10f06a: 8b 75 e0 mov -0x20(%ebp),%esi 10f06d: 03 75 ec add -0x14(%ebp),%esi prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 10f070: 89 f7 mov %esi,%edi 10f072: 83 cf 01 or $0x1,%edi 10f075: 89 7b 04 mov %edi,0x4(%ebx) next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 10f078: 83 60 04 fe andl $0xfffffffe,0x4(%eax) next_block->prev_size = size; 10f07c: 89 30 mov %esi,(%eax) 10f07e: eb 5b jmp 10f0db <_Heap_Free+0x153> <== ALWAYS TAKEN } } else if ( next_is_free ) { /* coalesce next */ 10f080: 89 f2 mov %esi,%edx 10f082: 84 d2 test %dl,%dl 10f084: 74 25 je 10f0ab <_Heap_Free+0x123> uintptr_t const size = block_size + next_block_size; 10f086: 8b 75 e8 mov -0x18(%ebp),%esi 10f089: 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; 10f08c: 8b 78 08 mov 0x8(%eax),%edi Heap_Block *prev = old_block->prev; 10f08f: 8b 40 0c mov 0xc(%eax),%eax new_block->next = next; 10f092: 89 7b 08 mov %edi,0x8(%ebx) new_block->prev = prev; 10f095: 89 43 0c mov %eax,0xc(%ebx) next->prev = new_block; 10f098: 89 5f 0c mov %ebx,0xc(%edi) prev->next = new_block; 10f09b: 89 58 08 mov %ebx,0x8(%eax) _Heap_Free_list_replace( next_block, block ); block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 10f09e: 89 f0 mov %esi,%eax 10f0a0: 83 c8 01 or $0x1,%eax 10f0a3: 89 43 04 mov %eax,0x4(%ebx) next_block = _Heap_Block_at( block, size ); next_block->prev_size = size; 10f0a6: 89 34 33 mov %esi,(%ebx,%esi,1) 10f0a9: eb 30 jmp 10f0db <_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; 10f0ab: 8b 71 08 mov 0x8(%ecx),%esi new_block->next = next; 10f0ae: 89 73 08 mov %esi,0x8(%ebx) new_block->prev = block_before; 10f0b1: 89 4b 0c mov %ecx,0xc(%ebx) block_before->next = new_block; 10f0b4: 89 59 08 mov %ebx,0x8(%ecx) next->prev = new_block; 10f0b7: 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; 10f0ba: 8b 75 e0 mov -0x20(%ebp),%esi 10f0bd: 83 ce 01 or $0x1,%esi 10f0c0: 89 73 04 mov %esi,0x4(%ebx) next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 10f0c3: 83 60 04 fe andl $0xfffffffe,0x4(%eax) next_block->prev_size = block_size; 10f0c7: 8b 55 e0 mov -0x20(%ebp),%edx 10f0ca: 89 10 mov %edx,(%eax) /* Statistics */ ++stats->free_blocks; 10f0cc: 8b 41 38 mov 0x38(%ecx),%eax 10f0cf: 40 inc %eax 10f0d0: 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; 10f0d3: 39 41 3c cmp %eax,0x3c(%ecx) 10f0d6: 73 03 jae 10f0db <_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; 10f0d8: 89 41 3c mov %eax,0x3c(%ecx) } } /* Statistics */ --stats->used_blocks; 10f0db: ff 49 40 decl 0x40(%ecx) ++stats->frees; 10f0de: ff 41 50 incl 0x50(%ecx) stats->free_size += block_size; 10f0e1: 8b 45 e0 mov -0x20(%ebp),%eax 10f0e4: 01 41 30 add %eax,0x30(%ecx) 10f0e7: b0 01 mov $0x1,%al return( true ); 10f0e9: eb 02 jmp 10f0ed <_Heap_Free+0x165> <== ALWAYS TAKEN 10f0eb: 31 c0 xor %eax,%eax } 10f0ed: 83 c4 14 add $0x14,%esp 10f0f0: 5b pop %ebx 10f0f1: 5e pop %esi 10f0f2: 5f pop %edi 10f0f3: c9 leave 10f0f4: c3 ret 0012887c <_Heap_Get_free_information>: void _Heap_Get_free_information( Heap_Control *the_heap, Heap_Information *info ) { 12887c: 55 push %ebp 12887d: 89 e5 mov %esp,%ebp 12887f: 53 push %ebx 128880: 8b 5d 08 mov 0x8(%ebp),%ebx 128883: 8b 45 0c mov 0xc(%ebp),%eax Heap_Block *the_block; Heap_Block *const tail = _Heap_Free_list_tail(the_heap); info->number = 0; 128886: c7 00 00 00 00 00 movl $0x0,(%eax) info->largest = 0; 12888c: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax) info->total = 0; 128893: 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; 12889a: 8b 4b 08 mov 0x8(%ebx),%ecx for(the_block = _Heap_Free_list_first(the_heap); 12889d: eb 16 jmp 1288b5 <_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; 12889f: 8b 51 04 mov 0x4(%ecx),%edx 1288a2: 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++; 1288a5: ff 00 incl (%eax) info->total += the_size; 1288a7: 01 50 08 add %edx,0x8(%eax) if ( info->largest < the_size ) 1288aa: 39 50 04 cmp %edx,0x4(%eax) 1288ad: 73 03 jae 1288b2 <_Heap_Get_free_information+0x36> info->largest = the_size; 1288af: 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) 1288b2: 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); 1288b5: 39 d9 cmp %ebx,%ecx 1288b7: 75 e6 jne 12889f <_Heap_Get_free_information+0x23> info->number++; info->total += the_size; if ( info->largest < the_size ) info->largest = the_size; } } 1288b9: 5b pop %ebx 1288ba: c9 leave 1288bb: c3 ret 00135618 <_Heap_Get_information>: void _Heap_Get_information( Heap_Control *the_heap, Heap_Information_block *the_info ) { 135618: 55 push %ebp 135619: 89 e5 mov %esp,%ebp 13561b: 57 push %edi 13561c: 56 push %esi 13561d: 53 push %ebx 13561e: 8b 4d 08 mov 0x8(%ebp),%ecx 135621: 8b 45 0c mov 0xc(%ebp),%eax Heap_Block *the_block = the_heap->first_block; 135624: 8b 51 20 mov 0x20(%ecx),%edx Heap_Block *const end = the_heap->last_block; 135627: 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; 13562a: c7 00 00 00 00 00 movl $0x0,(%eax) the_info->Free.total = 0; 135630: c7 40 08 00 00 00 00 movl $0x0,0x8(%eax) the_info->Free.largest = 0; 135637: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax) the_info->Used.number = 0; 13563e: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax) the_info->Used.total = 0; 135645: c7 40 14 00 00 00 00 movl $0x0,0x14(%eax) the_info->Used.largest = 0; 13564c: 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; 135653: 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 ) { 135656: eb 22 jmp 13567a <_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; 135658: 8b 4a 04 mov 0x4(%edx),%ecx 13565b: 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); 13565e: 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) ) 135661: 89 c2 mov %eax,%edx 135663: f6 47 04 01 testb $0x1,0x4(%edi) 135667: 74 02 je 13566b <_Heap_Get_information+0x53> 135669: 89 da mov %ebx,%edx info = &the_info->Used; else info = &the_info->Free; info->number++; 13566b: ff 02 incl (%edx) info->total += the_size; 13566d: 01 4a 08 add %ecx,0x8(%edx) if ( info->largest < the_size ) 135670: 39 4a 04 cmp %ecx,0x4(%edx) 135673: 73 03 jae 135678 <_Heap_Get_information+0x60> info->largest = the_size; 135675: 89 4a 04 mov %ecx,0x4(%edx) 135678: 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 ) { 13567a: 39 f2 cmp %esi,%edx 13567c: 75 da jne 135658 <_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; 13567e: 83 40 14 08 addl $0x8,0x14(%eax) } 135682: 5b pop %ebx 135683: 5e pop %esi 135684: 5f pop %edi 135685: c9 leave 135686: c3 ret 0010ac64 <_Heap_Initialize>: Heap_Control *heap, void *heap_area_begin_ptr, uintptr_t heap_area_size, uintptr_t page_size ) { 10ac64: 55 push %ebp 10ac65: 89 e5 mov %esp,%ebp 10ac67: 57 push %edi 10ac68: 56 push %esi 10ac69: 53 push %ebx 10ac6a: 83 ec 0c sub $0xc,%esp 10ac6d: 8b 4d 08 mov 0x8(%ebp),%ecx 10ac70: 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 ) { 10ac73: 85 db test %ebx,%ebx 10ac75: 75 04 jne 10ac7b <_Heap_Initialize+0x17> 10ac77: b3 04 mov $0x4,%bl 10ac79: eb 15 jmp 10ac90 <_Heap_Initialize+0x2c> <== ALWAYS TAKEN uintptr_t alignment ) { uintptr_t remainder = value % alignment; if ( remainder != 0 ) { 10ac7b: 89 d8 mov %ebx,%eax 10ac7d: 83 e0 03 and $0x3,%eax 10ac80: 74 05 je 10ac87 <_Heap_Initialize+0x23> return value - remainder + alignment; 10ac82: 83 c3 04 add $0x4,%ebx 10ac85: 29 c3 sub %eax,%ebx page_size = CPU_ALIGNMENT; } else { page_size = _Heap_Align_up( page_size, CPU_ALIGNMENT ); if ( page_size < CPU_ALIGNMENT ) { 10ac87: 83 fb 03 cmp $0x3,%ebx 10ac8a: 0f 86 01 01 00 00 jbe 10ad91 <_Heap_Initialize+0x12d> RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_up( uintptr_t value, uintptr_t alignment ) { uintptr_t remainder = value % alignment; 10ac90: b8 10 00 00 00 mov $0x10,%eax 10ac95: 31 d2 xor %edx,%edx 10ac97: f7 f3 div %ebx if ( remainder != 0 ) { 10ac99: c7 45 f0 10 00 00 00 movl $0x10,-0x10(%ebp) 10aca0: 85 d2 test %edx,%edx 10aca2: 74 08 je 10acac <_Heap_Initialize+0x48> return value - remainder + alignment; 10aca4: 8d 43 10 lea 0x10(%ebx),%eax 10aca7: 29 d0 sub %edx,%eax 10aca9: 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; 10acac: 8b 7d 0c mov 0xc(%ebp),%edi 10acaf: 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; 10acb2: 89 f8 mov %edi,%eax 10acb4: 31 d2 xor %edx,%edx 10acb6: f7 f3 div %ebx if ( remainder != 0 ) { 10acb8: 85 d2 test %edx,%edx 10acba: 74 05 je 10acc1 <_Heap_Initialize+0x5d> return value - remainder + alignment; 10acbc: 8d 3c 3b lea (%ebx,%edi,1),%edi 10acbf: 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; 10acc1: 8b 45 0c mov 0xc(%ebp),%eax 10acc4: 03 45 10 add 0x10(%ebp),%eax 10acc7: 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); 10acca: 8d 77 f8 lea -0x8(%edi),%esi 10accd: 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 ( 10acd0: 39 7d 10 cmp %edi,0x10(%ebp) 10acd3: 0f 86 b8 00 00 00 jbe 10ad91 <_Heap_Initialize+0x12d> 10acd9: 8b 45 0c mov 0xc(%ebp),%eax 10acdc: 39 45 ec cmp %eax,-0x14(%ebp) 10acdf: 0f 82 ac 00 00 00 jb 10ad91 <_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; 10ace5: 8b 45 10 mov 0x10(%ebp),%eax 10ace8: 29 f8 sub %edi,%eax 10acea: 89 c7 mov %eax,%edi RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 10acec: 31 d2 xor %edx,%edx 10acee: f7 f3 div %ebx 10acf0: 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 ( 10acf2: 3b 7d f0 cmp -0x10(%ebp),%edi 10acf5: 0f 82 96 00 00 00 jb 10ad91 <_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; 10acfb: 8d 47 f8 lea -0x8(%edi),%eax 10acfe: 89 45 e8 mov %eax,-0x18(%ebp) return 0; } /* First block */ first_block = (Heap_Block *) first_block_begin; first_block->prev_size = page_size; 10ad01: 89 1e mov %ebx,(%esi) first_block->size_and_flag = first_block_size | HEAP_PREV_BLOCK_USED; 10ad03: 89 fa mov %edi,%edx 10ad05: 83 ca 01 or $0x1,%edx 10ad08: 89 56 04 mov %edx,0x4(%esi) first_block->next = _Heap_Free_list_tail( heap ); 10ad0b: 89 4e 08 mov %ecx,0x8(%esi) first_block->prev = _Heap_Free_list_head( heap ); 10ad0e: 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); 10ad11: 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; 10ad14: 89 3a mov %edi,(%edx) last_block->size_and_flag = first_block_begin - (uintptr_t) last_block; 10ad16: 89 f0 mov %esi,%eax 10ad18: 29 d0 sub %edx,%eax 10ad1a: 89 42 04 mov %eax,0x4(%edx) /* Heap control */ heap->page_size = page_size; 10ad1d: 89 59 10 mov %ebx,0x10(%ecx) heap->min_block_size = min_block_size; 10ad20: 8b 45 f0 mov -0x10(%ebp),%eax 10ad23: 89 41 14 mov %eax,0x14(%ecx) heap->area_begin = heap_area_begin; 10ad26: 8b 45 0c mov 0xc(%ebp),%eax 10ad29: 89 41 18 mov %eax,0x18(%ecx) heap->area_end = heap_area_end; 10ad2c: 8b 45 ec mov -0x14(%ebp),%eax 10ad2f: 89 41 1c mov %eax,0x1c(%ecx) heap->first_block = first_block; 10ad32: 89 71 20 mov %esi,0x20(%ecx) heap->last_block = last_block; 10ad35: 89 51 24 mov %edx,0x24(%ecx) _Heap_Free_list_head( heap )->next = first_block; 10ad38: 89 71 08 mov %esi,0x8(%ecx) _Heap_Free_list_tail( heap )->prev = first_block; 10ad3b: 89 71 0c mov %esi,0xc(%ecx) /* Statistics */ stats->size = first_block_size; 10ad3e: 89 79 2c mov %edi,0x2c(%ecx) stats->free_size = first_block_size; 10ad41: 89 79 30 mov %edi,0x30(%ecx) stats->min_free_size = first_block_size; 10ad44: 89 79 34 mov %edi,0x34(%ecx) stats->free_blocks = 1; 10ad47: c7 41 38 01 00 00 00 movl $0x1,0x38(%ecx) stats->max_free_blocks = 1; 10ad4e: c7 41 3c 01 00 00 00 movl $0x1,0x3c(%ecx) stats->used_blocks = 0; 10ad55: c7 41 40 00 00 00 00 movl $0x0,0x40(%ecx) stats->max_search = 0; 10ad5c: c7 41 44 00 00 00 00 movl $0x0,0x44(%ecx) stats->allocs = 0; 10ad63: c7 41 48 00 00 00 00 movl $0x0,0x48(%ecx) stats->searches = 0; 10ad6a: c7 41 4c 00 00 00 00 movl $0x0,0x4c(%ecx) stats->frees = 0; 10ad71: c7 41 50 00 00 00 00 movl $0x0,0x50(%ecx) stats->resizes = 0; 10ad78: c7 41 54 00 00 00 00 movl $0x0,0x54(%ecx) stats->instance = instance++; 10ad7f: 8b 15 88 3e 12 00 mov 0x123e88,%edx 10ad85: 89 51 28 mov %edx,0x28(%ecx) 10ad88: 42 inc %edx 10ad89: 89 15 88 3e 12 00 mov %edx,0x123e88 ); _HAssert( _Heap_Is_aligned( _Heap_Alloc_area_of_block( last_block ), page_size ) ); return alloc_area_size; 10ad8f: eb 07 jmp 10ad98 <_Heap_Initialize+0x134> <== ALWAYS TAKEN 10ad91: c7 45 e8 00 00 00 00 movl $0x0,-0x18(%ebp) } 10ad98: 8b 45 e8 mov -0x18(%ebp),%eax 10ad9b: 83 c4 0c add $0xc,%esp 10ad9e: 5b pop %ebx 10ad9f: 5e pop %esi 10ada0: 5f pop %edi 10ada1: c9 leave 10ada2: c3 ret 0011cc78 <_Heap_Resize_block>: void *alloc_begin_ptr, uintptr_t new_alloc_size, uintptr_t *old_size, uintptr_t *new_size ) { 11cc78: 55 push %ebp 11cc79: 89 e5 mov %esp,%ebp 11cc7b: 57 push %edi 11cc7c: 56 push %esi 11cc7d: 53 push %ebx 11cc7e: 83 ec 2c sub $0x2c,%esp 11cc81: 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 ) 11cc84: 8b 4d 0c mov 0xc(%ebp),%ecx 11cc87: 83 e9 08 sub $0x8,%ecx 11cc8a: 8b 45 0c mov 0xc(%ebp),%eax 11cc8d: 31 d2 xor %edx,%edx 11cc8f: f7 73 10 divl 0x10(%ebx) 11cc92: 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; 11cc94: 8b 45 14 mov 0x14(%ebp),%eax 11cc97: c7 00 00 00 00 00 movl $0x0,(%eax) *new_size = 0; 11cc9d: 8b 55 18 mov 0x18(%ebp),%edx 11cca0: 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 11cca6: 39 4b 20 cmp %ecx,0x20(%ebx) 11cca9: 0f 87 ac 00 00 00 ja 11cd5b <_Heap_Resize_block+0xe3> 11ccaf: 39 4b 24 cmp %ecx,0x24(%ebx) 11ccb2: 0f 82 a3 00 00 00 jb 11cd5b <_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; 11ccb8: 8b 51 04 mov 0x4(%ecx),%edx 11ccbb: 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; 11ccbe: 8d 3c 11 lea (%ecx,%edx,1),%edi uintptr_t alloc_size = block_end - alloc_begin + HEAP_BLOCK_SIZE_OFFSET; 11ccc1: 89 f8 mov %edi,%eax 11ccc3: 2b 45 0c sub 0xc(%ebp),%eax 11ccc6: 83 c0 04 add $0x4,%eax 11ccc9: 89 45 e4 mov %eax,-0x1c(%ebp) 11cccc: 8b 77 04 mov 0x4(%edi),%esi 11cccf: 83 e6 fe and $0xfffffffe,%esi 11ccd2: 89 75 d4 mov %esi,-0x2c(%ebp) RTEMS_INLINE_ROUTINE bool _Heap_Is_free( const Heap_Block *block ) { return !_Heap_Is_used( block ); 11ccd5: 8b 44 37 04 mov 0x4(%edi,%esi,1),%eax 11ccd9: 83 e0 01 and $0x1,%eax 11ccdc: 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; 11ccdf: 8b 45 e4 mov -0x1c(%ebp),%eax 11cce2: 8b 75 14 mov 0x14(%ebp),%esi 11cce5: 89 06 mov %eax,(%esi) if ( next_block_is_free ) { 11cce7: 8a 45 d0 mov -0x30(%ebp),%al 11ccea: 34 01 xor $0x1,%al 11ccec: 88 45 e3 mov %al,-0x1d(%ebp) 11ccef: 74 09 je 11ccfa <_Heap_Resize_block+0x82> block_size += next_block_size; 11ccf1: 03 55 d4 add -0x2c(%ebp),%edx alloc_size += next_block_size; 11ccf4: 8b 75 d4 mov -0x2c(%ebp),%esi 11ccf7: 01 75 e4 add %esi,-0x1c(%ebp) } if ( new_alloc_size > alloc_size ) { 11ccfa: b8 01 00 00 00 mov $0x1,%eax 11ccff: 8b 75 e4 mov -0x1c(%ebp),%esi 11cd02: 39 75 10 cmp %esi,0x10(%ebp) 11cd05: 77 59 ja 11cd60 <_Heap_Resize_block+0xe8> return HEAP_RESIZE_UNSATISFIED; } if ( next_block_is_free ) { 11cd07: 80 7d e3 00 cmpb $0x0,-0x1d(%ebp) 11cd0b: 74 25 je 11cd32 <_Heap_Resize_block+0xba> uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; block->size_and_flag = size | flag; 11cd0d: 8b 41 04 mov 0x4(%ecx),%eax 11cd10: 83 e0 01 and $0x1,%eax 11cd13: 09 d0 or %edx,%eax 11cd15: 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; 11cd18: 8b 47 08 mov 0x8(%edi),%eax Heap_Block *prev = block->prev; 11cd1b: 8b 7f 0c mov 0xc(%edi),%edi prev->next = next; 11cd1e: 89 47 08 mov %eax,0x8(%edi) next->prev = prev; 11cd21: 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; 11cd24: 83 4c 0a 04 01 orl $0x1,0x4(%edx,%ecx,1) /* Statistics */ --stats->free_blocks; 11cd29: ff 4b 38 decl 0x38(%ebx) stats->free_size -= next_block_size; 11cd2c: 8b 45 d4 mov -0x2c(%ebp),%eax 11cd2f: 29 43 30 sub %eax,0x30(%ebx) } block = _Heap_Block_allocate( heap, block, alloc_begin, new_alloc_size ); 11cd32: ff 75 10 pushl 0x10(%ebp) 11cd35: ff 75 0c pushl 0xc(%ebp) 11cd38: 51 push %ecx 11cd39: 53 push %ebx 11cd3a: e8 39 e1 fe ff call 10ae78 <_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; 11cd3f: 8b 50 04 mov 0x4(%eax),%edx 11cd42: 83 e2 fe and $0xfffffffe,%edx 11cd45: 2b 45 0c sub 0xc(%ebp),%eax 11cd48: 8d 44 10 04 lea 0x4(%eax,%edx,1),%eax 11cd4c: 8b 55 18 mov 0x18(%ebp),%edx 11cd4f: 89 02 mov %eax,(%edx) /* Statistics */ ++stats->resizes; 11cd51: ff 43 54 incl 0x54(%ebx) 11cd54: 31 c0 xor %eax,%eax 11cd56: 83 c4 10 add $0x10,%esp 11cd59: eb 05 jmp 11cd60 <_Heap_Resize_block+0xe8> <== ALWAYS TAKEN 11cd5b: b8 02 00 00 00 mov $0x2,%eax new_size ); } else { return HEAP_RESIZE_FATAL_ERROR; } } 11cd60: 8d 65 f4 lea -0xc(%ebp),%esp 11cd63: 5b pop %ebx 11cd64: 5e pop %esi 11cd65: 5f pop %edi 11cd66: c9 leave 11cd67: c3 ret 0011cd68 <_Heap_Size_of_alloc_area>: bool _Heap_Size_of_alloc_area( Heap_Control *heap, void *alloc_begin_ptr, uintptr_t *alloc_size ) { 11cd68: 55 push %ebp 11cd69: 89 e5 mov %esp,%ebp 11cd6b: 56 push %esi 11cd6c: 53 push %ebx 11cd6d: 8b 5d 08 mov 0x8(%ebp),%ebx 11cd70: 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 ) 11cd73: 8d 4e f8 lea -0x8(%esi),%ecx 11cd76: 89 f0 mov %esi,%eax 11cd78: 31 d2 xor %edx,%edx 11cd7a: f7 73 10 divl 0x10(%ebx) 11cd7d: 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; 11cd7f: 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 11cd82: 31 c0 xor %eax,%eax 11cd84: 39 d1 cmp %edx,%ecx 11cd86: 72 08 jb 11cd90 <_Heap_Size_of_alloc_area+0x28> 11cd88: 31 c0 xor %eax,%eax 11cd8a: 39 4b 24 cmp %ecx,0x24(%ebx) 11cd8d: 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 ) ) { 11cd90: 85 c0 test %eax,%eax 11cd92: 74 2e je 11cdc2 <_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); 11cd94: 8b 41 04 mov 0x4(%ecx),%eax 11cd97: 83 e0 fe and $0xfffffffe,%eax 11cd9a: 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 11cd9c: 31 c0 xor %eax,%eax 11cd9e: 39 d1 cmp %edx,%ecx 11cda0: 72 08 jb 11cdaa <_Heap_Size_of_alloc_area+0x42> <== ALWAYS TAKEN 11cda2: 31 c0 xor %eax,%eax 11cda4: 39 4b 24 cmp %ecx,0x24(%ebx) 11cda7: 0f 93 c0 setae %al } block_size = _Heap_Block_size( block ); next_block = _Heap_Block_at( block, block_size ); if ( 11cdaa: 85 c0 test %eax,%eax 11cdac: 74 14 je 11cdc2 <_Heap_Size_of_alloc_area+0x5a> <== ALWAYS TAKEN 11cdae: f6 41 04 01 testb $0x1,0x4(%ecx) 11cdb2: 74 0e je 11cdc2 <_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; 11cdb4: 29 f1 sub %esi,%ecx 11cdb6: 8d 51 04 lea 0x4(%ecx),%edx 11cdb9: 8b 45 10 mov 0x10(%ebp),%eax 11cdbc: 89 10 mov %edx,(%eax) 11cdbe: b0 01 mov $0x1,%al return true; 11cdc0: eb 02 jmp 11cdc4 <_Heap_Size_of_alloc_area+0x5c> <== ALWAYS TAKEN 11cdc2: 31 c0 xor %eax,%eax } 11cdc4: 5b pop %ebx 11cdc5: 5e pop %esi 11cdc6: c9 leave 11cdc7: c3 ret 0010b965 <_Heap_Walk>: bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { 10b965: 55 push %ebp 10b966: 89 e5 mov %esp,%ebp 10b968: 57 push %edi 10b969: 56 push %esi 10b96a: 53 push %ebx 10b96b: 83 ec 4c sub $0x4c,%esp 10b96e: 8b 7d 08 mov 0x8(%ebp),%edi 10b971: 8b 75 0c mov 0xc(%ebp),%esi uintptr_t const page_size = heap->page_size; 10b974: 8b 4f 10 mov 0x10(%edi),%ecx uintptr_t const min_block_size = heap->min_block_size; 10b977: 8b 47 14 mov 0x14(%edi),%eax 10b97a: 89 45 dc mov %eax,-0x24(%ebp) Heap_Block *const last_block = heap->last_block; 10b97d: 8b 57 24 mov 0x24(%edi),%edx 10b980: 89 55 d0 mov %edx,-0x30(%ebp) Heap_Block *block = heap->first_block; 10b983: 8b 5f 20 mov 0x20(%edi),%ebx Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; 10b986: c7 45 e4 77 bc 10 00 movl $0x10bc77,-0x1c(%ebp) 10b98d: 80 7d 10 00 cmpb $0x0,0x10(%ebp) 10b991: 75 07 jne 10b99a <_Heap_Walk+0x35> 10b993: c7 45 e4 60 b9 10 00 movl $0x10b960,-0x1c(%ebp) if ( !_System_state_Is_up( _System_state_Get() ) ) { 10b99a: 83 3d 0c 64 12 00 03 cmpl $0x3,0x12640c 10b9a1: 0f 85 c6 02 00 00 jne 10bc6d <_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)( 10b9a7: 50 push %eax 10b9a8: ff 77 0c pushl 0xc(%edi) 10b9ab: ff 77 08 pushl 0x8(%edi) 10b9ae: ff 75 d0 pushl -0x30(%ebp) 10b9b1: 53 push %ebx 10b9b2: ff 77 1c pushl 0x1c(%edi) 10b9b5: ff 77 18 pushl 0x18(%edi) 10b9b8: ff 75 dc pushl -0x24(%ebp) 10b9bb: 51 push %ecx 10b9bc: 68 68 f7 11 00 push $0x11f768 10b9c1: 6a 00 push $0x0 10b9c3: 56 push %esi 10b9c4: 89 4d bc mov %ecx,-0x44(%ebp) 10b9c7: 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 ) { 10b9ca: 83 c4 30 add $0x30,%esp 10b9cd: 8b 4d bc mov -0x44(%ebp),%ecx 10b9d0: 85 c9 test %ecx,%ecx 10b9d2: 75 0b jne 10b9df <_Heap_Walk+0x7a> (*printer)( source, true, "page size is zero\n" ); 10b9d4: 53 push %ebx 10b9d5: 68 f9 f7 11 00 push $0x11f7f9 10b9da: e9 5b 02 00 00 jmp 10bc3a <_Heap_Walk+0x2d5> <== ALWAYS TAKEN return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { 10b9df: f6 c1 03 test $0x3,%cl 10b9e2: 74 0b je 10b9ef <_Heap_Walk+0x8a> (*printer)( 10b9e4: 51 push %ecx 10b9e5: 68 0c f8 11 00 push $0x11f80c 10b9ea: e9 4b 02 00 00 jmp 10bc3a <_Heap_Walk+0x2d5> <== ALWAYS TAKEN ); return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { 10b9ef: 8b 45 dc mov -0x24(%ebp),%eax 10b9f2: 31 d2 xor %edx,%edx 10b9f4: f7 f1 div %ecx 10b9f6: 85 d2 test %edx,%edx 10b9f8: 74 0d je 10ba07 <_Heap_Walk+0xa2> (*printer)( 10b9fa: ff 75 dc pushl -0x24(%ebp) 10b9fd: 68 2a f8 11 00 push $0x11f82a 10ba02: e9 33 02 00 00 jmp 10bc3a <_Heap_Walk+0x2d5> <== ALWAYS TAKEN ); return false; } if ( 10ba07: 8d 43 08 lea 0x8(%ebx),%eax 10ba0a: 31 d2 xor %edx,%edx 10ba0c: f7 f1 div %ecx 10ba0e: 85 d2 test %edx,%edx 10ba10: 74 0b je 10ba1d <_Heap_Walk+0xb8> !_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size ) ) { (*printer)( 10ba12: 53 push %ebx 10ba13: 68 4e f8 11 00 push $0x11f84e 10ba18: e9 1d 02 00 00 jmp 10bc3a <_Heap_Walk+0x2d5> <== ALWAYS TAKEN ); return false; } if ( !_Heap_Is_prev_used( first_block ) ) { 10ba1d: f6 43 04 01 testb $0x1,0x4(%ebx) 10ba21: 75 0b jne 10ba2e <_Heap_Walk+0xc9> (*printer)( 10ba23: 51 push %ecx 10ba24: 68 7f f8 11 00 push $0x11f87f 10ba29: e9 0c 02 00 00 jmp 10bc3a <_Heap_Walk+0x2d5> <== ALWAYS TAKEN ); return false; } if ( first_block->prev_size != page_size ) { 10ba2e: 8b 03 mov (%ebx),%eax 10ba30: 89 45 d4 mov %eax,-0x2c(%ebp) 10ba33: 39 c8 cmp %ecx,%eax 10ba35: 74 0f je 10ba46 <_Heap_Walk+0xe1> (*printer)( 10ba37: 83 ec 0c sub $0xc,%esp 10ba3a: 51 push %ecx 10ba3b: 50 push %eax 10ba3c: 68 ad f8 11 00 push $0x11f8ad 10ba41: e9 3d 01 00 00 jmp 10bb83 <_Heap_Walk+0x21e> <== ALWAYS TAKEN ); return false; } if ( _Heap_Is_free( last_block ) ) { 10ba46: 8b 55 d0 mov -0x30(%ebp),%edx 10ba49: 8b 42 04 mov 0x4(%edx),%eax 10ba4c: 83 e0 fe and $0xfffffffe,%eax 10ba4f: f6 44 02 04 01 testb $0x1,0x4(%edx,%eax,1) 10ba54: 75 0b jne 10ba61 <_Heap_Walk+0xfc> (*printer)( 10ba56: 52 push %edx 10ba57: 68 d8 f8 11 00 push $0x11f8d8 10ba5c: e9 d9 01 00 00 jmp 10bc3a <_Heap_Walk+0x2d5> <== ALWAYS TAKEN int source, Heap_Walk_printer printer, Heap_Control *heap ) { uintptr_t const page_size = heap->page_size; 10ba61: 8b 4f 10 mov 0x10(%edi),%ecx 10ba64: 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; 10ba67: 8b 4f 08 mov 0x8(%edi),%ecx 10ba6a: 89 7d e0 mov %edi,-0x20(%ebp) 10ba6d: eb 6a jmp 10bad9 <_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 10ba6f: 31 c0 xor %eax,%eax 10ba71: 39 4f 20 cmp %ecx,0x20(%edi) 10ba74: 77 08 ja 10ba7e <_Heap_Walk+0x119> 10ba76: 31 c0 xor %eax,%eax 10ba78: 39 4f 24 cmp %ecx,0x24(%edi) 10ba7b: 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 ) ) { 10ba7e: 85 c0 test %eax,%eax 10ba80: 75 0b jne 10ba8d <_Heap_Walk+0x128> (*printer)( 10ba82: 51 push %ecx 10ba83: 68 ed f8 11 00 push $0x11f8ed 10ba88: e9 ad 01 00 00 jmp 10bc3a <_Heap_Walk+0x2d5> <== ALWAYS TAKEN ); return false; } if ( 10ba8d: 8d 41 08 lea 0x8(%ecx),%eax 10ba90: 31 d2 xor %edx,%edx 10ba92: f7 75 d8 divl -0x28(%ebp) 10ba95: 85 d2 test %edx,%edx 10ba97: 74 0b je 10baa4 <_Heap_Walk+0x13f> !_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size ) ) { (*printer)( 10ba99: 51 push %ecx 10ba9a: 68 0d f9 11 00 push $0x11f90d 10ba9f: e9 96 01 00 00 jmp 10bc3a <_Heap_Walk+0x2d5> <== ALWAYS TAKEN ); return false; } if ( _Heap_Is_used( free_block ) ) { 10baa4: 8b 41 04 mov 0x4(%ecx),%eax 10baa7: 83 e0 fe and $0xfffffffe,%eax 10baaa: f6 44 01 04 01 testb $0x1,0x4(%ecx,%eax,1) 10baaf: 74 0b je 10babc <_Heap_Walk+0x157> (*printer)( 10bab1: 51 push %ecx 10bab2: 68 3d f9 11 00 push $0x11f93d 10bab7: e9 7e 01 00 00 jmp 10bc3a <_Heap_Walk+0x2d5> <== ALWAYS TAKEN ); return false; } if ( free_block->prev != prev_block ) { 10babc: 8b 41 0c mov 0xc(%ecx),%eax 10babf: 3b 45 e0 cmp -0x20(%ebp),%eax 10bac2: 74 0f je 10bad3 <_Heap_Walk+0x16e> (*printer)( 10bac4: 83 ec 0c sub $0xc,%esp 10bac7: 50 push %eax 10bac8: 51 push %ecx 10bac9: 68 59 f9 11 00 push $0x11f959 10bace: e9 b0 00 00 00 jmp 10bb83 <_Heap_Walk+0x21e> <== ALWAYS TAKEN return false; } prev_block = free_block; free_block = free_block->next; 10bad3: 89 4d e0 mov %ecx,-0x20(%ebp) 10bad6: 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 ) { 10bad9: 39 f9 cmp %edi,%ecx 10badb: 75 92 jne 10ba6f <_Heap_Walk+0x10a> 10badd: 89 75 e0 mov %esi,-0x20(%ebp) 10bae0: e9 7f 01 00 00 jmp 10bc64 <_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; 10bae5: 8b 43 04 mov 0x4(%ebx),%eax 10bae8: 89 c1 mov %eax,%ecx 10baea: 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); 10baed: 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 ) { 10baf0: a8 01 test $0x1,%al 10baf2: 74 0c je 10bb00 <_Heap_Walk+0x19b> (*printer)( 10baf4: 83 ec 0c sub $0xc,%esp 10baf7: 51 push %ecx 10baf8: 53 push %ebx 10baf9: 68 8b f9 11 00 push $0x11f98b 10bafe: eb 0b jmp 10bb0b <_Heap_Walk+0x1a6> <== ALWAYS TAKEN "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( 10bb00: 50 push %eax 10bb01: 50 push %eax 10bb02: ff 33 pushl (%ebx) 10bb04: 51 push %ecx 10bb05: 53 push %ebx 10bb06: 68 a2 f9 11 00 push $0x11f9a2 10bb0b: 6a 00 push $0x0 10bb0d: ff 75 e0 pushl -0x20(%ebp) 10bb10: 89 4d bc mov %ecx,-0x44(%ebp) 10bb13: ff 55 e4 call *-0x1c(%ebp) 10bb16: 83 c4 20 add $0x20,%esp 10bb19: 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 10bb1c: 31 c0 xor %eax,%eax 10bb1e: 39 77 20 cmp %esi,0x20(%edi) 10bb21: 77 08 ja 10bb2b <_Heap_Walk+0x1c6> <== ALWAYS TAKEN 10bb23: 31 c0 xor %eax,%eax 10bb25: 39 77 24 cmp %esi,0x24(%edi) 10bb28: 0f 93 c0 setae %al block_size, block->prev_size ); } if ( !_Heap_Is_block_in_heap( heap, next_block ) ) { 10bb2b: 85 c0 test %eax,%eax 10bb2d: 75 11 jne 10bb40 <_Heap_Walk+0x1db> 10bb2f: 89 f1 mov %esi,%ecx 10bb31: 8b 75 e0 mov -0x20(%ebp),%esi (*printer)( 10bb34: 83 ec 0c sub $0xc,%esp 10bb37: 51 push %ecx 10bb38: 53 push %ebx 10bb39: 68 c7 f9 11 00 push $0x11f9c7 10bb3e: eb 43 jmp 10bb83 <_Heap_Walk+0x21e> <== ALWAYS TAKEN ); return false; } if ( !_Heap_Is_aligned( block_size, page_size ) ) { 10bb40: 89 c8 mov %ecx,%eax 10bb42: 31 d2 xor %edx,%edx 10bb44: f7 75 d4 divl -0x2c(%ebp) 10bb47: 85 d2 test %edx,%edx 10bb49: 74 0f je 10bb5a <_Heap_Walk+0x1f5> 10bb4b: 8b 75 e0 mov -0x20(%ebp),%esi (*printer)( 10bb4e: 83 ec 0c sub $0xc,%esp 10bb51: 51 push %ecx 10bb52: 53 push %ebx 10bb53: 68 f4 f9 11 00 push $0x11f9f4 10bb58: eb 29 jmp 10bb83 <_Heap_Walk+0x21e> <== ALWAYS TAKEN ); return false; } if ( block_size < min_block_size ) { 10bb5a: 3b 4d dc cmp -0x24(%ebp),%ecx 10bb5d: 73 11 jae 10bb70 <_Heap_Walk+0x20b> 10bb5f: 8b 75 e0 mov -0x20(%ebp),%esi (*printer)( 10bb62: 57 push %edi 10bb63: 57 push %edi 10bb64: ff 75 dc pushl -0x24(%ebp) 10bb67: 51 push %ecx 10bb68: 53 push %ebx 10bb69: 68 22 fa 11 00 push $0x11fa22 10bb6e: eb 13 jmp 10bb83 <_Heap_Walk+0x21e> <== ALWAYS TAKEN ); return false; } if ( next_block_begin <= block_begin ) { 10bb70: 39 de cmp %ebx,%esi 10bb72: 77 1f ja 10bb93 <_Heap_Walk+0x22e> 10bb74: 89 f1 mov %esi,%ecx 10bb76: 8b 75 e0 mov -0x20(%ebp),%esi (*printer)( 10bb79: 83 ec 0c sub $0xc,%esp 10bb7c: 51 push %ecx 10bb7d: 53 push %ebx 10bb7e: 68 4d fa 11 00 push $0x11fa4d 10bb83: 6a 01 push $0x1 10bb85: 56 push %esi 10bb86: ff 55 e4 call *-0x1c(%ebp) 10bb89: 31 c0 xor %eax,%eax "block 0x%08x: next block 0x%08x is not a successor\n", block, next_block ); return false; 10bb8b: 83 c4 20 add $0x20,%esp 10bb8e: e9 dc 00 00 00 jmp 10bc6f <_Heap_Walk+0x30a> <== ALWAYS TAKEN } if ( !_Heap_Is_prev_used( next_block ) ) { 10bb93: f6 46 04 01 testb $0x1,0x4(%esi) 10bb97: 0f 85 c5 00 00 00 jne 10bc62 <_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; 10bb9d: 8b 47 08 mov 0x8(%edi),%eax 10bba0: 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; 10bba3: 8b 53 04 mov 0x4(%ebx),%edx 10bba6: 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; 10bba9: 83 e2 fe and $0xfffffffe,%edx 10bbac: 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); 10bbaf: 01 da add %ebx,%edx 10bbb1: 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)( 10bbb4: 8b 4b 08 mov 0x8(%ebx),%ecx 10bbb7: 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; 10bbba: ba 81 fa 11 00 mov $0x11fa81,%edx 10bbbf: 3b 4f 0c cmp 0xc(%edi),%ecx 10bbc2: 74 0e je 10bbd2 <_Heap_Walk+0x26d> " (= first)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last)" : (block->next == free_list_tail ? " (= tail)" : "") 10bbc4: ba 8b fa 11 00 mov $0x11fa8b,%edx 10bbc9: 39 f9 cmp %edi,%ecx 10bbcb: 74 05 je 10bbd2 <_Heap_Walk+0x26d> 10bbcd: ba b5 f6 11 00 mov $0x11f6b5,%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)( 10bbd2: 8b 43 0c mov 0xc(%ebx),%eax 10bbd5: 89 45 d8 mov %eax,-0x28(%ebp) 10bbd8: b8 95 fa 11 00 mov $0x11fa95,%eax 10bbdd: 8b 4d c0 mov -0x40(%ebp),%ecx 10bbe0: 39 4d d8 cmp %ecx,-0x28(%ebp) 10bbe3: 74 0f je 10bbf4 <_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)" : ""), 10bbe5: b8 a0 fa 11 00 mov $0x11faa0,%eax 10bbea: 39 7d d8 cmp %edi,-0x28(%ebp) 10bbed: 74 05 je 10bbf4 <_Heap_Walk+0x28f> 10bbef: b8 b5 f6 11 00 mov $0x11f6b5,%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)( 10bbf4: 52 push %edx 10bbf5: ff 75 b4 pushl -0x4c(%ebp) 10bbf8: 50 push %eax 10bbf9: ff 75 d8 pushl -0x28(%ebp) 10bbfc: 53 push %ebx 10bbfd: 68 aa fa 11 00 push $0x11faaa 10bc02: 6a 00 push $0x0 10bc04: ff 75 e0 pushl -0x20(%ebp) 10bc07: 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 ) { 10bc0a: 8b 55 c8 mov -0x38(%ebp),%edx 10bc0d: 8b 02 mov (%edx),%eax 10bc0f: 83 c4 20 add $0x20,%esp 10bc12: 39 45 cc cmp %eax,-0x34(%ebp) 10bc15: 74 14 je 10bc2b <_Heap_Walk+0x2c6> 10bc17: 8b 75 e0 mov -0x20(%ebp),%esi (*printer)( 10bc1a: 51 push %ecx 10bc1b: 52 push %edx 10bc1c: 50 push %eax 10bc1d: ff 75 cc pushl -0x34(%ebp) 10bc20: 53 push %ebx 10bc21: 68 d6 fa 11 00 push $0x11fad6 10bc26: e9 58 ff ff ff jmp 10bb83 <_Heap_Walk+0x21e> <== ALWAYS TAKEN ); return false; } if ( !prev_used ) { 10bc2b: f6 45 c4 01 testb $0x1,-0x3c(%ebp) 10bc2f: 75 16 jne 10bc47 <_Heap_Walk+0x2e2> 10bc31: 8b 75 e0 mov -0x20(%ebp),%esi (*printer)( 10bc34: 53 push %ebx 10bc35: 68 0f fb 11 00 push $0x11fb0f 10bc3a: 6a 01 push $0x1 10bc3c: 56 push %esi 10bc3d: ff 55 e4 call *-0x1c(%ebp) 10bc40: 31 c0 xor %eax,%eax 10bc42: 83 c4 10 add $0x10,%esp 10bc45: eb 28 jmp 10bc6f <_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; 10bc47: 8b 47 08 mov 0x8(%edi),%eax 10bc4a: eb 07 jmp 10bc53 <_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 ) { 10bc4c: 39 d8 cmp %ebx,%eax 10bc4e: 74 12 je 10bc62 <_Heap_Walk+0x2fd> return true; } free_block = free_block->next; 10bc50: 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 ) { 10bc53: 39 f8 cmp %edi,%eax 10bc55: 75 f5 jne 10bc4c <_Heap_Walk+0x2e7> 10bc57: 8b 75 e0 mov -0x20(%ebp),%esi return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( 10bc5a: 53 push %ebx 10bc5b: 68 3e fb 11 00 push $0x11fb3e 10bc60: eb d8 jmp 10bc3a <_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 ) { 10bc62: 89 f3 mov %esi,%ebx if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; } while ( block != last_block ) { 10bc64: 3b 5d d0 cmp -0x30(%ebp),%ebx 10bc67: 0f 85 78 fe ff ff jne 10bae5 <_Heap_Walk+0x180> 10bc6d: b0 01 mov $0x1,%al block = next_block; } return true; } 10bc6f: 8d 65 f4 lea -0xc(%ebp),%esp 10bc72: 5b pop %ebx 10bc73: 5e pop %esi 10bc74: 5f pop %edi 10bc75: c9 leave 10bc76: c3 ret 0010bc77 <_Heap_Walk_print>: { /* Do nothing */ } static void _Heap_Walk_print( int source, bool error, const char *fmt, ... ) { 10bc77: 55 push %ebp 10bc78: 89 e5 mov %esp,%ebp 10bc7a: 83 ec 08 sub $0x8,%esp 10bc7d: 8b 45 08 mov 0x8(%ebp),%eax va_list ap; if ( error ) { 10bc80: 80 7d 0c 00 cmpb $0x0,0xc(%ebp) 10bc84: 74 0a je 10bc90 <_Heap_Walk_print+0x19> printk( "FAIL[%d]: ", source ); 10bc86: 51 push %ecx 10bc87: 51 push %ecx 10bc88: 50 push %eax 10bc89: 68 69 fb 11 00 push $0x11fb69 10bc8e: eb 08 jmp 10bc98 <_Heap_Walk_print+0x21> <== ALWAYS TAKEN } else { printk( "PASS[%d]: ", source ); 10bc90: 52 push %edx 10bc91: 52 push %edx 10bc92: 50 push %eax 10bc93: 68 74 fb 11 00 push $0x11fb74 10bc98: e8 17 c8 ff ff call 1084b4 10bc9d: 5a pop %edx 10bc9e: 59 pop %ecx ) { /* Do nothing */ } static void _Heap_Walk_print( int source, bool error, const char *fmt, ... ) 10bc9f: 8d 45 14 lea 0x14(%ebp),%eax } else { printk( "PASS[%d]: ", source ); } va_start( ap, fmt ); vprintk( fmt, ap ); 10bca2: 50 push %eax 10bca3: ff 75 10 pushl 0x10(%ebp) 10bca6: e8 3d e1 ff ff call 109de8 10bcab: 83 c4 10 add $0x10,%esp va_end( ap ); } 10bcae: c9 leave 10bcaf: c3 ret 0010a500 <_IO_Initialize_all_drivers>: * * Output Parameters: NONE */ void _IO_Initialize_all_drivers( void ) { 10a500: 55 push %ebp 10a501: 89 e5 mov %esp,%ebp 10a503: 53 push %ebx 10a504: 83 ec 04 sub $0x4,%esp 10a507: 31 db xor %ebx,%ebx rtems_device_major_number major; for ( major=0 ; major < _IO_Number_of_drivers ; major ++ ) 10a509: eb 0f jmp 10a51a <_IO_Initialize_all_drivers+0x1a> <== ALWAYS TAKEN (void) rtems_io_initialize( major, 0, NULL ); 10a50b: 50 push %eax 10a50c: 6a 00 push $0x0 10a50e: 6a 00 push $0x0 10a510: 53 push %ebx 10a511: e8 62 46 00 00 call 10eb78 <== ALWAYS TAKEN void _IO_Initialize_all_drivers( void ) { rtems_device_major_number major; for ( major=0 ; major < _IO_Number_of_drivers ; major ++ ) 10a516: 43 inc %ebx 10a517: 83 c4 10 add $0x10,%esp 10a51a: 3b 1d 48 4b 12 00 cmp 0x124b48,%ebx 10a520: 72 e9 jb 10a50b <_IO_Initialize_all_drivers+0xb> (void) rtems_io_initialize( major, 0, NULL ); } 10a522: 8b 5d fc mov -0x4(%ebp),%ebx 10a525: c9 leave 10a526: c3 ret 0010a527 <_IO_Manager_initialization>: * workspace. * */ void _IO_Manager_initialization(void) { 10a527: 55 push %ebp 10a528: 89 e5 mov %esp,%ebp 10a52a: 57 push %edi 10a52b: 56 push %esi 10a52c: 53 push %ebx 10a52d: 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; 10a530: 8b 35 2c 02 12 00 mov 0x12022c,%esi drivers_in_table = Configuration.number_of_device_drivers; 10a536: a1 28 02 12 00 mov 0x120228,%eax 10a53b: 89 45 e4 mov %eax,-0x1c(%ebp) number_of_drivers = Configuration.maximum_drivers; 10a53e: 8b 3d 24 02 12 00 mov 0x120224,%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 ) 10a544: 39 c7 cmp %eax,%edi 10a546: 76 30 jbe 10a578 <_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 *) 10a548: 6b df 18 imul $0x18,%edi,%ebx 10a54b: 83 ec 0c sub $0xc,%esp 10a54e: 53 push %ebx 10a54f: e8 44 26 00 00 call 10cb98 <_Workspace_Allocate_or_fatal_error> 10a554: 89 c2 mov %eax,%edx 10a556: a3 4c 4b 12 00 mov %eax,0x124b4c _Workspace_Allocate_or_fatal_error( sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); _IO_Number_of_drivers = number_of_drivers; 10a55b: 89 3d 48 4b 12 00 mov %edi,0x124b48 memset( 10a561: 31 c0 xor %eax,%eax 10a563: 89 d7 mov %edx,%edi 10a565: 89 d9 mov %ebx,%ecx 10a567: f3 aa rep stos %al,%es:(%edi) 10a569: 89 f0 mov %esi,%eax 10a56b: 8b 15 4c 4b 12 00 mov 0x124b4c,%edx 10a571: 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++ ) 10a573: 83 c4 10 add $0x10,%esp 10a576: eb 22 jmp 10a59a <_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; 10a578: 89 35 4c 4b 12 00 mov %esi,0x124b4c _IO_Number_of_drivers = number_of_drivers; 10a57e: 8b 45 e4 mov -0x1c(%ebp),%eax 10a581: a3 48 4b 12 00 mov %eax,0x124b48 return; 10a586: eb 17 jmp 10a59f <_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]; 10a588: 89 d7 mov %edx,%edi 10a58a: 89 c6 mov %eax,%esi 10a58c: b9 06 00 00 00 mov $0x6,%ecx 10a591: 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++ ) 10a593: 43 inc %ebx 10a594: 83 c0 18 add $0x18,%eax 10a597: 83 c2 18 add $0x18,%edx 10a59a: 3b 5d e4 cmp -0x1c(%ebp),%ebx 10a59d: 72 e9 jb 10a588 <_IO_Manager_initialization+0x61> _IO_Driver_address_table[index] = driver_table[index]; number_of_drivers = drivers_in_table; } 10a59f: 8d 65 f4 lea -0xc(%ebp),%esp 10a5a2: 5b pop %ebx 10a5a3: 5e pop %esi 10a5a4: 5f pop %edi 10a5a5: c9 leave 10a5a6: c3 ret 0010af54 <_Internal_error_Occurred>: void _Internal_error_Occurred( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { 10af54: 55 push %ebp 10af55: 89 e5 mov %esp,%ebp 10af57: 53 push %ebx 10af58: 83 ec 08 sub $0x8,%esp 10af5b: 8b 45 08 mov 0x8(%ebp),%eax 10af5e: 8b 55 0c mov 0xc(%ebp),%edx 10af61: 8b 5d 10 mov 0x10(%ebp),%ebx _Internal_errors_What_happened.the_source = the_source; 10af64: a3 90 42 12 00 mov %eax,0x124290 _Internal_errors_What_happened.is_internal = is_internal; 10af69: 88 15 94 42 12 00 mov %dl,0x124294 _Internal_errors_What_happened.the_error = the_error; 10af6f: 89 1d 98 42 12 00 mov %ebx,0x124298 _User_extensions_Fatal( the_source, is_internal, the_error ); 10af75: 53 push %ebx 10af76: 0f b6 d2 movzbl %dl,%edx 10af79: 52 push %edx 10af7a: 50 push %eax 10af7b: e8 13 19 00 00 call 10c893 <_User_extensions_Fatal> RTEMS_INLINE_ROUTINE void _System_state_Set ( System_state_Codes state ) { _System_state_Current = state; 10af80: c7 05 84 43 12 00 05 movl $0x5,0x124384 <== NOT EXECUTED 10af87: 00 00 00 <== NOT EXECUTED _System_state_Set( SYSTEM_STATE_FAILED ); _CPU_Fatal_halt( the_error ); 10af8a: fa cli <== NOT EXECUTED 10af8b: 89 d8 mov %ebx,%eax <== NOT EXECUTED 10af8d: f4 hlt <== NOT EXECUTED 10af8e: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10af91: eb fe jmp 10af91 <_Internal_error_Occurred+0x3d> <== NOT EXECUTED 0010afec <_Objects_Allocate>: */ Objects_Control *_Objects_Allocate( Objects_Information *information ) { 10afec: 55 push %ebp 10afed: 89 e5 mov %esp,%ebp 10afef: 56 push %esi 10aff0: 53 push %ebx 10aff1: 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 ) 10aff4: 31 c9 xor %ecx,%ecx 10aff6: 83 7b 18 00 cmpl $0x0,0x18(%ebx) 10affa: 74 53 je 10b04f <_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 ); 10affc: 8d 73 20 lea 0x20(%ebx),%esi 10afff: 83 ec 0c sub $0xc,%esp 10b002: 56 push %esi 10b003: e8 ac f7 ff ff call 10a7b4 <_Chain_Get> <== ALWAYS TAKEN 10b008: 89 c1 mov %eax,%ecx if ( information->auto_extend ) { 10b00a: 83 c4 10 add $0x10,%esp 10b00d: 80 7b 12 00 cmpb $0x0,0x12(%ebx) 10b011: 74 3c je 10b04f <_Objects_Allocate+0x63> /* * If the list is empty then we are out of objects and need to * extend information base. */ if ( !the_object ) { 10b013: 85 c0 test %eax,%eax 10b015: 75 1a jne 10b031 <_Objects_Allocate+0x45> _Objects_Extend_information( information ); 10b017: 83 ec 0c sub $0xc,%esp 10b01a: 53 push %ebx 10b01b: e8 60 00 00 00 call 10b080 <_Objects_Extend_information> <== ALWAYS TAKEN the_object = (Objects_Control *) _Chain_Get( &information->Inactive ); 10b020: 89 34 24 mov %esi,(%esp) 10b023: e8 8c f7 ff ff call 10a7b4 <_Chain_Get> <== ALWAYS TAKEN 10b028: 89 c1 mov %eax,%ecx } if ( the_object ) { 10b02a: 83 c4 10 add $0x10,%esp 10b02d: 85 c0 test %eax,%eax 10b02f: 74 1e je 10b04f <_Objects_Allocate+0x63> uint32_t block; block = (uint32_t) _Objects_Get_index( the_object->id ) - 10b031: 0f b7 41 08 movzwl 0x8(%ecx),%eax 10b035: 0f b7 53 08 movzwl 0x8(%ebx),%edx 10b039: 29 d0 sub %edx,%eax _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; 10b03b: 0f b7 73 14 movzwl 0x14(%ebx),%esi 10b03f: 31 d2 xor %edx,%edx 10b041: f7 f6 div %esi 10b043: c1 e0 02 shl $0x2,%eax 10b046: 03 43 30 add 0x30(%ebx),%eax 10b049: ff 08 decl (%eax) information->inactive--; 10b04b: 66 ff 4b 2c decw 0x2c(%ebx) } } return the_object; } 10b04f: 89 c8 mov %ecx,%eax 10b051: 8d 65 f8 lea -0x8(%ebp),%esp 10b054: 5b pop %ebx 10b055: 5e pop %esi 10b056: c9 leave 10b057: c3 ret 0010b058 <_Objects_Close>: void _Objects_Close( Objects_Information *information, Objects_Control *the_object ) { 10b058: 55 push %ebp 10b059: 89 e5 mov %esp,%ebp 10b05b: 53 push %ebx 10b05c: 83 ec 04 sub $0x4,%esp 10b05f: 8b 45 08 mov 0x8(%ebp),%eax 10b062: 8b 55 0c mov 0xc(%ebp),%edx #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10b065: 0f b7 5a 08 movzwl 0x8(%edx),%ebx 10b069: 8b 48 1c mov 0x1c(%eax),%ecx 10b06c: c7 04 99 00 00 00 00 movl $0x0,(%ecx,%ebx,4) _Objects_Invalidate_Id( information, the_object ); _Objects_Namespace_remove( information, the_object ); 10b073: 89 55 0c mov %edx,0xc(%ebp) } 10b076: 58 pop %eax 10b077: 5b pop %ebx 10b078: c9 leave Objects_Control *the_object ) { _Objects_Invalidate_Id( information, the_object ); _Objects_Namespace_remove( information, the_object ); 10b079: e9 c6 04 00 00 jmp 10b544 <_Objects_Namespace_remove> <== ALWAYS TAKEN 0010b080 <_Objects_Extend_information>: */ void _Objects_Extend_information( Objects_Information *information ) { 10b080: 55 push %ebp 10b081: 89 e5 mov %esp,%ebp 10b083: 57 push %edi 10b084: 56 push %esi 10b085: 53 push %ebx 10b086: 83 ec 4c sub $0x4c,%esp 10b089: 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 ); 10b08c: 0f b7 43 08 movzwl 0x8(%ebx),%eax 10b090: 89 45 c8 mov %eax,-0x38(%ebp) index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) 10b093: 8b 4b 34 mov 0x34(%ebx),%ecx 10b096: 85 c9 test %ecx,%ecx 10b098: 75 0e jne 10b0a8 <_Objects_Extend_information+0x28> 10b09a: 89 45 d4 mov %eax,-0x2c(%ebp) 10b09d: c7 45 cc 00 00 00 00 movl $0x0,-0x34(%ebp) 10b0a4: 31 d2 xor %edx,%edx 10b0a6: eb 31 jmp 10b0d9 <_Objects_Extend_information+0x59> <== ALWAYS TAKEN block_count = 0; else { block_count = information->maximum / information->allocation_size; 10b0a8: 0f b7 73 14 movzwl 0x14(%ebx),%esi 10b0ac: 8b 43 10 mov 0x10(%ebx),%eax 10b0af: 31 d2 xor %edx,%edx 10b0b1: 66 f7 f6 div %si 10b0b4: 0f b7 d0 movzwl %ax,%edx 10b0b7: 8b 7d c8 mov -0x38(%ebp),%edi 10b0ba: 89 7d d4 mov %edi,-0x2c(%ebp) 10b0bd: c7 45 cc 00 00 00 00 movl $0x0,-0x34(%ebp) 10b0c4: 31 c0 xor %eax,%eax for ( ; block < block_count; block++ ) { 10b0c6: eb 0a jmp 10b0d2 <_Objects_Extend_information+0x52> <== ALWAYS TAKEN if ( information->object_blocks[ block ] == NULL ) 10b0c8: 83 3c 81 00 cmpl $0x0,(%ecx,%eax,4) 10b0cc: 74 08 je 10b0d6 <_Objects_Extend_information+0x56> 10b0ce: 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++ ) { 10b0d1: 40 inc %eax 10b0d2: 39 d0 cmp %edx,%eax 10b0d4: 72 f2 jb 10b0c8 <_Objects_Extend_information+0x48> 10b0d6: 89 45 cc mov %eax,-0x34(%ebp) else index_base += information->allocation_size; } } maximum = (uint32_t) information->maximum + information->allocation_size; 10b0d9: 0f b7 43 14 movzwl 0x14(%ebx),%eax 10b0dd: 0f b7 4b 10 movzwl 0x10(%ebx),%ecx 10b0e1: 8d 0c 08 lea (%eax,%ecx,1),%ecx 10b0e4: 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 ) { 10b0e7: 81 f9 ff ff 00 00 cmp $0xffff,%ecx 10b0ed: 0f 87 db 01 00 00 ja 10b2ce <_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; 10b0f3: 0f af 43 18 imul 0x18(%ebx),%eax if ( information->auto_extend ) { 10b0f7: 80 7b 12 00 cmpb $0x0,0x12(%ebx) 10b0fb: 74 1e je 10b11b <_Objects_Extend_information+0x9b> new_object_block = _Workspace_Allocate( block_size ); 10b0fd: 83 ec 0c sub $0xc,%esp 10b100: 50 push %eax 10b101: 89 55 b4 mov %edx,-0x4c(%ebp) 10b104: e8 bb 1a 00 00 call 10cbc4 <_Workspace_Allocate> 10b109: 89 45 bc mov %eax,-0x44(%ebp) if ( !new_object_block ) 10b10c: 83 c4 10 add $0x10,%esp 10b10f: 85 c0 test %eax,%eax 10b111: 8b 55 b4 mov -0x4c(%ebp),%edx 10b114: 75 1a jne 10b130 <_Objects_Extend_information+0xb0> 10b116: e9 b3 01 00 00 jmp 10b2ce <_Objects_Extend_information+0x24e> <== ALWAYS TAKEN return; } else { new_object_block = _Workspace_Allocate_or_fatal_error( block_size ); 10b11b: 83 ec 0c sub $0xc,%esp 10b11e: 50 push %eax 10b11f: 89 55 b4 mov %edx,-0x4c(%ebp) 10b122: e8 71 1a 00 00 call 10cb98 <_Workspace_Allocate_or_fatal_error> 10b127: 89 45 bc mov %eax,-0x44(%ebp) 10b12a: 83 c4 10 add $0x10,%esp 10b12d: 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 ) { 10b130: 0f b7 43 10 movzwl 0x10(%ebx),%eax 10b134: 39 45 d4 cmp %eax,-0x2c(%ebp) 10b137: 0f 82 14 01 00 00 jb 10b251 <_Objects_Extend_information+0x1d1> */ /* * Up the block count and maximum */ block_count++; 10b13d: 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 ); 10b140: 83 ec 0c sub $0xc,%esp 10b143: 8b 4d b8 mov -0x48(%ebp),%ecx 10b146: 03 4d c8 add -0x38(%ebp),%ecx 10b149: 8d 04 76 lea (%esi,%esi,2),%eax 10b14c: 8d 04 01 lea (%ecx,%eax,1),%eax 10b14f: c1 e0 02 shl $0x2,%eax 10b152: 50 push %eax 10b153: 89 55 b4 mov %edx,-0x4c(%ebp) 10b156: e8 69 1a 00 00 call 10cbc4 <_Workspace_Allocate> if ( !object_blocks ) { 10b15b: 83 c4 10 add $0x10,%esp 10b15e: 85 c0 test %eax,%eax 10b160: 8b 55 b4 mov -0x4c(%ebp),%edx 10b163: 75 13 jne 10b178 <_Objects_Extend_information+0xf8> _Workspace_Free( new_object_block ); 10b165: 83 ec 0c sub $0xc,%esp 10b168: ff 75 bc pushl -0x44(%ebp) 10b16b: e8 6d 1a 00 00 call 10cbdd <_Workspace_Free> return; 10b170: 83 c4 10 add $0x10,%esp 10b173: e9 56 01 00 00 jmp 10b2ce <_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); 10b178: 8d 0c b0 lea (%eax,%esi,4),%ecx 10b17b: 89 4d c0 mov %ecx,-0x40(%ebp) 10b17e: 8d 34 f0 lea (%eax,%esi,8),%esi 10b181: 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 ) { 10b184: 0f b7 73 10 movzwl 0x10(%ebx),%esi 10b188: 31 c9 xor %ecx,%ecx 10b18a: 3b 75 c8 cmp -0x38(%ebp),%esi 10b18d: 76 3e jbe 10b1cd <_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, 10b18f: 8d 34 95 00 00 00 00 lea 0x0(,%edx,4),%esi 10b196: 89 75 d0 mov %esi,-0x30(%ebp) 10b199: 8b 73 34 mov 0x34(%ebx),%esi 10b19c: 89 c7 mov %eax,%edi 10b19e: 8b 4d d0 mov -0x30(%ebp),%ecx 10b1a1: f3 a4 rep movsb %ds:(%esi),%es:(%edi) information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, 10b1a3: 8b 73 30 mov 0x30(%ebx),%esi 10b1a6: 8b 7d c0 mov -0x40(%ebp),%edi 10b1a9: 8b 4d d0 mov -0x30(%ebp),%ecx 10b1ac: f3 a4 rep movsb %ds:(%esi),%es:(%edi) information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, 10b1ae: 0f b7 4b 10 movzwl 0x10(%ebx),%ecx 10b1b2: 03 4d c8 add -0x38(%ebp),%ecx 10b1b5: c1 e1 02 shl $0x2,%ecx 10b1b8: 8b 73 1c mov 0x1c(%ebx),%esi 10b1bb: 8b 7d c4 mov -0x3c(%ebp),%edi 10b1be: f3 a4 rep movsb %ds:(%esi),%es:(%edi) 10b1c0: eb 10 jmp 10b1d2 <_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; 10b1c2: 8b 7d c4 mov -0x3c(%ebp),%edi 10b1c5: 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++ ) { 10b1cc: 41 inc %ecx 10b1cd: 3b 4d c8 cmp -0x38(%ebp),%ecx 10b1d0: 72 f0 jb 10b1c2 <_Objects_Extend_information+0x142> } /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; 10b1d2: c7 04 90 00 00 00 00 movl $0x0,(%eax,%edx,4) inactive_per_block[block_count] = 0; 10b1d9: 8b 4d c0 mov -0x40(%ebp),%ecx 10b1dc: c7 04 91 00 00 00 00 movl $0x0,(%ecx,%edx,4) for ( index=index_base ; index < ( information->allocation_size + index_base ); 10b1e3: 0f b7 53 14 movzwl 0x14(%ebx),%edx 10b1e7: 8b 75 d4 mov -0x2c(%ebp),%esi 10b1ea: 01 d6 add %edx,%esi 10b1ec: 8b 7d d4 mov -0x2c(%ebp),%edi 10b1ef: 8b 55 c4 mov -0x3c(%ebp),%edx 10b1f2: 8d 0c ba lea (%edx,%edi,4),%ecx 10b1f5: 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 ; 10b1f7: eb 0a jmp 10b203 <_Objects_Extend_information+0x183> <== ALWAYS TAKEN index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL; 10b1f9: 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++ ) { 10b1ff: 42 inc %edx 10b200: 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 ; 10b203: 39 f2 cmp %esi,%edx 10b205: 72 f2 jb 10b1f9 <_Objects_Extend_information+0x179> index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL; } _ISR_Disable( level ); 10b207: 9c pushf 10b208: fa cli 10b209: 5e pop %esi old_tables = information->object_blocks; 10b20a: 8b 53 34 mov 0x34(%ebx),%edx information->object_blocks = object_blocks; 10b20d: 89 43 34 mov %eax,0x34(%ebx) information->inactive_per_block = inactive_per_block; 10b210: 8b 4d c0 mov -0x40(%ebp),%ecx 10b213: 89 4b 30 mov %ecx,0x30(%ebx) information->local_table = local_table; 10b216: 8b 7d c4 mov -0x3c(%ebp),%edi 10b219: 89 7b 1c mov %edi,0x1c(%ebx) information->maximum = (Objects_Maximum) maximum; 10b21c: 8b 45 b8 mov -0x48(%ebp),%eax 10b21f: 66 89 43 10 mov %ax,0x10(%ebx) information->maximum_id = _Objects_Build_id( 10b223: 8b 03 mov (%ebx),%eax 10b225: c1 e0 18 shl $0x18,%eax 10b228: 0d 00 00 01 00 or $0x10000,%eax 10b22d: 0f b7 4b 04 movzwl 0x4(%ebx),%ecx 10b231: c1 e1 1b shl $0x1b,%ecx 10b234: 09 c8 or %ecx,%eax 10b236: 0f b7 4d b8 movzwl -0x48(%ebp),%ecx 10b23a: 09 c8 or %ecx,%eax 10b23c: 89 43 0c mov %eax,0xc(%ebx) information->the_class, _Objects_Local_node, information->maximum ); _ISR_Enable( level ); 10b23f: 56 push %esi 10b240: 9d popf if ( old_tables ) 10b241: 85 d2 test %edx,%edx 10b243: 74 0c je 10b251 <_Objects_Extend_information+0x1d1> _Workspace_Free( old_tables ); 10b245: 83 ec 0c sub $0xc,%esp 10b248: 52 push %edx 10b249: e8 8f 19 00 00 call 10cbdd <_Workspace_Free> 10b24e: 83 c4 10 add $0x10,%esp } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; 10b251: 8b 55 cc mov -0x34(%ebp),%edx 10b254: c1 e2 02 shl $0x2,%edx 10b257: 89 55 d0 mov %edx,-0x30(%ebp) 10b25a: 8b 43 34 mov 0x34(%ebx),%eax 10b25d: 8b 75 bc mov -0x44(%ebp),%esi 10b260: 8b 4d cc mov -0x34(%ebp),%ecx 10b263: 89 34 88 mov %esi,(%eax,%ecx,4) /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 10b266: ff 73 18 pushl 0x18(%ebx) 10b269: 0f b7 53 14 movzwl 0x14(%ebx),%edx 10b26d: 52 push %edx 10b26e: ff 34 88 pushl (%eax,%ecx,4) 10b271: 8d 45 dc lea -0x24(%ebp),%eax 10b274: 50 push %eax 10b275: 89 45 b4 mov %eax,-0x4c(%ebp) 10b278: e8 43 39 00 00 call 10ebc0 <_Chain_Initialize> <== ALWAYS TAKEN information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 10b27d: 8d 7b 20 lea 0x20(%ebx),%edi 10b280: 8b 75 d4 mov -0x2c(%ebp),%esi 10b283: eb 23 jmp 10b2a8 <_Objects_Extend_information+0x228> <== ALWAYS TAKEN */ index = index_base; while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) { the_object->id = _Objects_Build_id( 10b285: 8b 13 mov (%ebx),%edx 10b287: c1 e2 18 shl $0x18,%edx 10b28a: 81 ca 00 00 01 00 or $0x10000,%edx 10b290: 0f b7 4b 04 movzwl 0x4(%ebx),%ecx 10b294: c1 e1 1b shl $0x1b,%ecx 10b297: 09 ca or %ecx,%edx 10b299: 09 f2 or %esi,%edx 10b29b: 89 50 08 mov %edx,0x8(%eax) information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 10b29e: 52 push %edx 10b29f: 52 push %edx 10b2a0: 50 push %eax 10b2a1: 57 push %edi 10b2a2: e8 e9 f4 ff ff call 10a790 <_Chain_Append> <== ALWAYS TAKEN index++; 10b2a7: 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 ) { 10b2a8: 8d 45 dc lea -0x24(%ebp),%eax 10b2ab: 89 04 24 mov %eax,(%esp) 10b2ae: e8 01 f5 ff ff call 10a7b4 <_Chain_Get> <== ALWAYS TAKEN 10b2b3: 83 c4 10 add $0x10,%esp 10b2b6: 85 c0 test %eax,%eax 10b2b8: 75 cb jne 10b285 <_Objects_Extend_information+0x205> _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 10b2ba: 8b 43 30 mov 0x30(%ebx),%eax 10b2bd: 0f b7 53 14 movzwl 0x14(%ebx),%edx 10b2c1: 8b 4d d0 mov -0x30(%ebp),%ecx 10b2c4: 89 14 08 mov %edx,(%eax,%ecx,1) information->inactive = 10b2c7: 8b 43 14 mov 0x14(%ebx),%eax 10b2ca: 66 01 43 2c add %ax,0x2c(%ebx) (Objects_Maximum)(information->inactive + information->allocation_size); } 10b2ce: 8d 65 f4 lea -0xc(%ebp),%esp 10b2d1: 5b pop %ebx 10b2d2: 5e pop %esi 10b2d3: 5f pop %edi 10b2d4: c9 leave 10b2d5: c3 ret 0010b2d8 <_Objects_Free>: void _Objects_Free( Objects_Information *information, Objects_Control *the_object ) { 10b2d8: 55 push %ebp 10b2d9: 89 e5 mov %esp,%ebp 10b2db: 57 push %edi 10b2dc: 56 push %esi 10b2dd: 53 push %ebx 10b2de: 83 ec 14 sub $0x14,%esp 10b2e1: 8b 5d 08 mov 0x8(%ebp),%ebx 10b2e4: 8b 75 0c mov 0xc(%ebp),%esi uint32_t allocation_size = information->allocation_size; 10b2e7: 8b 7b 14 mov 0x14(%ebx),%edi _Chain_Append( &information->Inactive, &the_object->Node ); 10b2ea: 56 push %esi 10b2eb: 8d 43 20 lea 0x20(%ebx),%eax 10b2ee: 50 push %eax 10b2ef: e8 9c f4 ff ff call 10a790 <_Chain_Append> <== ALWAYS TAKEN if ( information->auto_extend ) { 10b2f4: 83 c4 10 add $0x10,%esp 10b2f7: 80 7b 12 00 cmpb $0x0,0x12(%ebx) 10b2fb: 74 42 je 10b33f <_Objects_Free+0x67> void _Objects_Free( Objects_Information *information, Objects_Control *the_object ) { uint32_t allocation_size = information->allocation_size; 10b2fd: 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 ) - 10b300: 0f b7 46 08 movzwl 0x8(%esi),%eax 10b304: 0f b7 53 08 movzwl 0x8(%ebx),%edx 10b308: 29 d0 sub %edx,%eax _Objects_Get_index( information->minimum_id )); block /= information->allocation_size; information->inactive_per_block[ block ]++; 10b30a: 0f b7 73 14 movzwl 0x14(%ebx),%esi 10b30e: 31 d2 xor %edx,%edx 10b310: f7 f6 div %esi 10b312: c1 e0 02 shl $0x2,%eax 10b315: 03 43 30 add 0x30(%ebx),%eax 10b318: ff 00 incl (%eax) information->inactive++; 10b31a: 8b 43 2c mov 0x2c(%ebx),%eax 10b31d: 40 inc %eax 10b31e: 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 ) ) ) { 10b322: 0f b7 c0 movzwl %ax,%eax 10b325: 89 ca mov %ecx,%edx 10b327: d1 ea shr %edx 10b329: 8d 0c 0a lea (%edx,%ecx,1),%ecx 10b32c: 39 c8 cmp %ecx,%eax 10b32e: 76 0f jbe 10b33f <_Objects_Free+0x67> _Objects_Shrink_information( information ); 10b330: 89 5d 08 mov %ebx,0x8(%ebp) } } } 10b333: 8d 65 f4 lea -0xc(%ebp),%esp 10b336: 5b pop %ebx 10b337: 5e pop %esi 10b338: 5f pop %edi 10b339: 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 ); 10b33a: e9 a5 02 00 00 jmp 10b5e4 <_Objects_Shrink_information> <== ALWAYS TAKEN } } } 10b33f: 8d 65 f4 lea -0xc(%ebp),%esp 10b342: 5b pop %ebx 10b343: 5e pop %esi 10b344: 5f pop %edi 10b345: c9 leave 10b346: c3 ret 0010b400 <_Objects_Get>: Objects_Control *_Objects_Get( Objects_Information *information, Objects_Id id, Objects_Locations *location ) { 10b400: 55 push %ebp 10b401: 89 e5 mov %esp,%ebp 10b403: 56 push %esi 10b404: 53 push %ebx 10b405: 8b 55 08 mov 0x8(%ebp),%edx 10b408: 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; 10b40b: b8 01 00 00 00 mov $0x1,%eax 10b410: 2b 42 08 sub 0x8(%edx),%eax 10b413: 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 ) { 10b416: 0f b7 4a 10 movzwl 0x10(%edx),%ecx 10b41a: 39 c8 cmp %ecx,%eax 10b41c: 77 2c ja 10b44a <_Objects_Get+0x4a> 10b41e: 8b 0d ec 41 12 00 mov 0x1241ec,%ecx 10b424: 41 inc %ecx 10b425: 89 0d ec 41 12 00 mov %ecx,0x1241ec _Thread_Disable_dispatch(); if ( (the_object = information->local_table[ index ]) != NULL ) { 10b42b: 8b 52 1c mov 0x1c(%edx),%edx 10b42e: 8b 1c 82 mov (%edx,%eax,4),%ebx 10b431: 85 db test %ebx,%ebx 10b433: 74 08 je 10b43d <_Objects_Get+0x3d> *location = OBJECTS_LOCAL; 10b435: c7 06 00 00 00 00 movl $0x0,(%esi) return the_object; 10b43b: eb 15 jmp 10b452 <_Objects_Get+0x52> <== ALWAYS TAKEN /* * Valid Id for this API, Class and Node but the object has not * been allocated yet. */ _Thread_Enable_dispatch(); 10b43d: e8 af 07 00 00 call 10bbf1 <_Thread_Enable_dispatch> <== ALWAYS TAKEN *location = OBJECTS_ERROR; 10b442: c7 06 01 00 00 00 movl $0x1,(%esi) return NULL; 10b448: eb 08 jmp 10b452 <_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; 10b44a: c7 06 01 00 00 00 movl $0x1,(%esi) 10b450: 31 db xor %ebx,%ebx _Objects_MP_Is_remote( information, id, location, &the_object ); return the_object; #else return NULL; #endif } 10b452: 89 d8 mov %ebx,%eax 10b454: 5b pop %ebx 10b455: 5e pop %esi 10b456: c9 leave 10b457: c3 ret 0010b368 <_Objects_Get_information>: Objects_Information *_Objects_Get_information( Objects_APIs the_api, uint32_t the_class ) { 10b368: 55 push %ebp 10b369: 89 e5 mov %esp,%ebp 10b36b: 56 push %esi 10b36c: 53 push %ebx 10b36d: 8b 75 08 mov 0x8(%ebp),%esi 10b370: 8b 5d 0c mov 0xc(%ebp),%ebx Objects_Information *info; int the_class_api_maximum; if ( !the_class ) 10b373: 85 db test %ebx,%ebx 10b375: 74 2d je 10b3a4 <_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 ); 10b377: 83 ec 0c sub $0xc,%esp 10b37a: 56 push %esi 10b37b: e8 78 3d 00 00 call 10f0f8 <_Objects_API_maximum_class> <== ALWAYS TAKEN if ( the_class_api_maximum == 0 ) 10b380: 83 c4 10 add $0x10,%esp 10b383: 85 c0 test %eax,%eax 10b385: 74 1d je 10b3a4 <_Objects_Get_information+0x3c> return NULL; if ( the_class > (uint32_t) the_class_api_maximum ) 10b387: 39 c3 cmp %eax,%ebx 10b389: 77 19 ja 10b3a4 <_Objects_Get_information+0x3c> return NULL; if ( !_Objects_Information_table[ the_api ] ) 10b38b: 8b 04 b5 c0 41 12 00 mov 0x1241c0(,%esi,4),%eax 10b392: 85 c0 test %eax,%eax 10b394: 74 0e je 10b3a4 <_Objects_Get_information+0x3c> <== ALWAYS TAKEN return NULL; info = _Objects_Information_table[ the_api ][ the_class ]; 10b396: 8b 04 98 mov (%eax,%ebx,4),%eax if ( !info ) 10b399: 85 c0 test %eax,%eax 10b39b: 74 09 je 10b3a6 <_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 ) 10b39d: 66 83 78 10 00 cmpw $0x0,0x10(%eax) 10b3a2: 75 02 jne 10b3a6 <_Objects_Get_information+0x3e> 10b3a4: 31 c0 xor %eax,%eax return NULL; #endif return info; } 10b3a6: 8d 65 f8 lea -0x8(%ebp),%esp 10b3a9: 5b pop %ebx 10b3aa: 5e pop %esi 10b3ab: c9 leave 10b3ac: c3 ret 0010b348 <_Objects_Get_information_id>: #include Objects_Information *_Objects_Get_information_id( Objects_Id id ) { 10b348: 55 push %ebp 10b349: 89 e5 mov %esp,%ebp 10b34b: 83 ec 10 sub $0x10,%esp 10b34e: 8b 45 08 mov 0x8(%ebp),%eax return _Objects_Get_information( 10b351: 89 c2 mov %eax,%edx 10b353: c1 ea 1b shr $0x1b,%edx 10b356: 52 push %edx 10b357: c1 e8 18 shr $0x18,%eax 10b35a: 83 e0 07 and $0x7,%eax 10b35d: 50 push %eax 10b35e: e8 05 00 00 00 call 10b368 <_Objects_Get_information> <== ALWAYS TAKEN _Objects_Get_API( id ), _Objects_Get_class( id ) ); } 10b363: c9 leave 10b364: c3 ret 0010b3b0 <_Objects_Get_isr_disable>: Objects_Information *information, Objects_Id id, Objects_Locations *location, ISR_Level *level_p ) { 10b3b0: 55 push %ebp 10b3b1: 89 e5 mov %esp,%ebp 10b3b3: 56 push %esi 10b3b4: 53 push %ebx 10b3b5: 8b 5d 08 mov 0x8(%ebp),%ebx 10b3b8: 8b 55 10 mov 0x10(%ebp),%edx Objects_Control *the_object; uint32_t index; ISR_Level level; index = id - information->minimum_id + 1; 10b3bb: b8 01 00 00 00 mov $0x1,%eax 10b3c0: 2b 43 08 sub 0x8(%ebx),%eax 10b3c3: 03 45 0c add 0xc(%ebp),%eax _ISR_Disable( level ); 10b3c6: 9c pushf 10b3c7: fa cli 10b3c8: 59 pop %ecx if ( information->maximum >= index ) { 10b3c9: 0f b7 73 10 movzwl 0x10(%ebx),%esi 10b3cd: 39 c6 cmp %eax,%esi 10b3cf: 72 21 jb 10b3f2 <_Objects_Get_isr_disable+0x42> if ( (the_object = information->local_table[ index ]) != NULL ) { 10b3d1: 8b 5b 1c mov 0x1c(%ebx),%ebx 10b3d4: 8b 04 83 mov (%ebx,%eax,4),%eax 10b3d7: 85 c0 test %eax,%eax 10b3d9: 74 0d je 10b3e8 <_Objects_Get_isr_disable+0x38> *location = OBJECTS_LOCAL; 10b3db: c7 02 00 00 00 00 movl $0x0,(%edx) *level_p = level; 10b3e1: 8b 55 14 mov 0x14(%ebp),%edx 10b3e4: 89 0a mov %ecx,(%edx) return the_object; 10b3e6: eb 14 jmp 10b3fc <_Objects_Get_isr_disable+0x4c> <== ALWAYS TAKEN } _ISR_Enable( level ); 10b3e8: 51 push %ecx 10b3e9: 9d popf *location = OBJECTS_ERROR; 10b3ea: c7 02 01 00 00 00 movl $0x1,(%edx) return NULL; 10b3f0: eb 0a jmp 10b3fc <_Objects_Get_isr_disable+0x4c> <== ALWAYS TAKEN } _ISR_Enable( level ); 10b3f2: 51 push %ecx 10b3f3: 9d popf *location = OBJECTS_ERROR; 10b3f4: c7 02 01 00 00 00 movl $0x1,(%edx) 10b3fa: 31 c0 xor %eax,%eax _Objects_MP_Is_remote( information, id, location, &the_object ); return the_object; #else return NULL; #endif } 10b3fc: 5b pop %ebx 10b3fd: 5e pop %esi 10b3fe: c9 leave 10b3ff: c3 ret 00114cbc <_Objects_Get_name_as_string>: char *_Objects_Get_name_as_string( Objects_Id id, size_t length, char *name ) { 114cbc: 55 push %ebp 114cbd: 89 e5 mov %esp,%ebp 114cbf: 57 push %edi 114cc0: 56 push %esi 114cc1: 53 push %ebx 114cc2: 83 ec 3c sub $0x3c,%esp 114cc5: 8b 7d 0c mov 0xc(%ebp),%edi 114cc8: 8b 5d 10 mov 0x10(%ebp),%ebx char lname[5]; Objects_Control *the_object; Objects_Locations location; Objects_Id tmpId; if ( length == 0 ) 114ccb: 85 ff test %edi,%edi 114ccd: 0f 84 ba 00 00 00 je 114d8d <_Objects_Get_name_as_string+0xd1> <== ALWAYS TAKEN return NULL; if ( name == NULL ) 114cd3: 85 db test %ebx,%ebx 114cd5: 0f 84 b4 00 00 00 je 114d8f <_Objects_Get_name_as_string+0xd3> <== ALWAYS TAKEN return NULL; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 114cdb: 8b 75 08 mov 0x8(%ebp),%esi 114cde: 85 f6 test %esi,%esi 114ce0: 75 08 jne 114cea <_Objects_Get_name_as_string+0x2e> 114ce2: a1 8c fb 12 00 mov 0x12fb8c,%eax 114ce7: 8b 70 08 mov 0x8(%eax),%esi information = _Objects_Get_information_id( tmpId ); 114cea: 83 ec 0c sub $0xc,%esp 114ced: 56 push %esi 114cee: e8 45 9c ff ff call 10e938 <_Objects_Get_information_id> <== ALWAYS TAKEN 114cf3: 89 c2 mov %eax,%edx if ( !information ) 114cf5: 83 c4 10 add $0x10,%esp 114cf8: 85 c0 test %eax,%eax 114cfa: 0f 84 8d 00 00 00 je 114d8d <_Objects_Get_name_as_string+0xd1> <== ALWAYS TAKEN return NULL; the_object = _Objects_Get( information, tmpId, &location ); 114d00: 50 push %eax 114d01: 8d 45 e4 lea -0x1c(%ebp),%eax 114d04: 50 push %eax 114d05: 56 push %esi 114d06: 52 push %edx 114d07: 89 55 cc mov %edx,-0x34(%ebp) 114d0a: e8 e1 9c ff ff call 10e9f0 <_Objects_Get> <== ALWAYS TAKEN switch ( location ) { 114d0f: 83 c4 10 add $0x10,%esp 114d12: 83 7d e4 00 cmpl $0x0,-0x1c(%ebp) 114d16: 8b 55 cc mov -0x34(%ebp),%edx 114d19: 75 72 jne 114d8d <_Objects_Get_name_as_string+0xd1> <== ALWAYS TAKEN return NULL; case OBJECTS_LOCAL: #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) { 114d1b: 80 7a 38 00 cmpb $0x0,0x38(%edx) 114d1f: 74 0b je 114d2c <_Objects_Get_name_as_string+0x70> s = the_object->name.name_p; 114d21: 8b 70 0c mov 0xc(%eax),%esi lname[ 4 ] = '\0'; s = lname; } d = name; if ( s ) { 114d24: 89 d8 mov %ebx,%eax 114d26: 85 f6 test %esi,%esi 114d28: 75 27 jne 114d51 <_Objects_Get_name_as_string+0x95> 114d2a: eb 57 jmp 114d83 <_Objects_Get_name_as_string+0xc7> <== ALWAYS TAKEN if ( information->is_string ) { s = the_object->name.name_p; } else #endif { uint32_t u32_name = (uint32_t) the_object->name.name_u32; 114d2c: 8b 40 0c mov 0xc(%eax),%eax lname[ 0 ] = (u32_name >> 24) & 0xff; 114d2f: 89 c2 mov %eax,%edx 114d31: c1 ea 18 shr $0x18,%edx 114d34: 88 55 df mov %dl,-0x21(%ebp) lname[ 1 ] = (u32_name >> 16) & 0xff; 114d37: 89 c2 mov %eax,%edx 114d39: c1 ea 10 shr $0x10,%edx 114d3c: 88 55 e0 mov %dl,-0x20(%ebp) lname[ 2 ] = (u32_name >> 8) & 0xff; 114d3f: 89 c2 mov %eax,%edx 114d41: c1 ea 08 shr $0x8,%edx 114d44: 88 55 e1 mov %dl,-0x1f(%ebp) lname[ 3 ] = (u32_name >> 0) & 0xff; 114d47: 88 45 e2 mov %al,-0x1e(%ebp) lname[ 4 ] = '\0'; 114d4a: c6 45 e3 00 movb $0x0,-0x1d(%ebp) 114d4e: 8d 75 df lea -0x21(%ebp),%esi 114d51: 89 d8 mov %ebx,%eax 114d53: 31 d2 xor %edx,%edx s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { 114d55: 4f dec %edi 114d56: 89 7d d0 mov %edi,-0x30(%ebp) 114d59: 89 75 c4 mov %esi,-0x3c(%ebp) 114d5c: eb 16 jmp 114d74 <_Objects_Get_name_as_string+0xb8> <== ALWAYS TAKEN *d = (isprint((unsigned char)*s)) ? *s : '*'; 114d5e: 0f b6 f1 movzbl %cl,%esi 114d61: 8b 3d e8 d1 12 00 mov 0x12d1e8,%edi 114d67: f6 44 37 01 97 testb $0x97,0x1(%edi,%esi,1) 114d6c: 75 02 jne 114d70 <_Objects_Get_name_as_string+0xb4> 114d6e: b1 2a mov $0x2a,%cl 114d70: 88 08 mov %cl,(%eax) s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { 114d72: 42 inc %edx 114d73: 40 inc %eax 114d74: 3b 55 d0 cmp -0x30(%ebp),%edx 114d77: 73 0a jae 114d83 <_Objects_Get_name_as_string+0xc7> 114d79: 8b 75 c4 mov -0x3c(%ebp),%esi 114d7c: 8a 0c 16 mov (%esi,%edx,1),%cl 114d7f: 84 c9 test %cl,%cl 114d81: 75 db jne 114d5e <_Objects_Get_name_as_string+0xa2> *d = (isprint((unsigned char)*s)) ? *s : '*'; } } *d = '\0'; 114d83: c6 00 00 movb $0x0,(%eax) _Thread_Enable_dispatch(); 114d86: e8 ca a4 ff ff call 10f255 <_Thread_Enable_dispatch> <== ALWAYS TAKEN return name; 114d8b: eb 02 jmp 114d8f <_Objects_Get_name_as_string+0xd3> <== ALWAYS TAKEN 114d8d: 31 db xor %ebx,%ebx } return NULL; /* unreachable path */ } 114d8f: 89 d8 mov %ebx,%eax 114d91: 8d 65 f4 lea -0xc(%ebp),%esp 114d94: 5b pop %ebx 114d95: 5e pop %esi 114d96: 5f pop %edi 114d97: c9 leave 114d98: c3 ret 001173c8 <_Objects_Get_next>: Objects_Information *information, Objects_Id id, Objects_Locations *location_p, Objects_Id *next_id_p ) { 1173c8: 55 push %ebp 1173c9: 89 e5 mov %esp,%ebp 1173cb: 57 push %edi 1173cc: 56 push %esi 1173cd: 53 push %ebx 1173ce: 83 ec 1c sub $0x1c,%esp 1173d1: 8b 7d 08 mov 0x8(%ebp),%edi 1173d4: 8b 75 10 mov 0x10(%ebp),%esi 1173d7: 8b 55 14 mov 0x14(%ebp),%edx Objects_Control *object; Objects_Id next_id; if ( !information ) 1173da: 85 ff test %edi,%edi 1173dc: 74 43 je 117421 <_Objects_Get_next+0x59> return NULL; if ( !location_p ) 1173de: 85 f6 test %esi,%esi 1173e0: 74 3f je 117421 <_Objects_Get_next+0x59> return NULL; if ( !next_id_p ) 1173e2: 85 d2 test %edx,%edx 1173e4: 74 3b je 117421 <_Objects_Get_next+0x59> return NULL; if (_Objects_Get_index(id) == OBJECTS_ID_INITIAL_INDEX) 1173e6: 8b 5d 0c mov 0xc(%ebp),%ebx 1173e9: 66 85 db test %bx,%bx 1173ec: 75 03 jne 1173f1 <_Objects_Get_next+0x29> next_id = information->minimum_id; 1173ee: 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) 1173f1: 66 39 5f 10 cmp %bx,0x10(%edi) 1173f5: 73 0e jae 117405 <_Objects_Get_next+0x3d> { *location_p = OBJECTS_ERROR; 1173f7: c7 06 01 00 00 00 movl $0x1,(%esi) *next_id_p = next_id; return object; final: *next_id_p = OBJECTS_ID_FINAL; 1173fd: c7 02 ff ff ff ff movl $0xffffffff,(%edx) 117403: eb 1c jmp 117421 <_Objects_Get_next+0x59> <== ALWAYS TAKEN *location_p = OBJECTS_ERROR; goto final; } /* try to grab one */ object = _Objects_Get(information, next_id, location_p); 117405: 50 push %eax 117406: 56 push %esi 117407: 53 push %ebx 117408: 57 push %edi 117409: 89 55 e4 mov %edx,-0x1c(%ebp) 11740c: e8 df 75 ff ff call 10e9f0 <_Objects_Get> <== ALWAYS TAKEN next_id++; 117411: 43 inc %ebx } while (*location_p != OBJECTS_LOCAL); 117412: 83 c4 10 add $0x10,%esp 117415: 83 3e 00 cmpl $0x0,(%esi) 117418: 8b 55 e4 mov -0x1c(%ebp),%edx 11741b: 75 d4 jne 1173f1 <_Objects_Get_next+0x29> *next_id_p = next_id; 11741d: 89 1a mov %ebx,(%edx) return object; 11741f: eb 02 jmp 117423 <_Objects_Get_next+0x5b> <== ALWAYS TAKEN final: *next_id_p = OBJECTS_ID_FINAL; return 0; 117421: 31 c0 xor %eax,%eax } 117423: 8d 65 f4 lea -0xc(%ebp),%esp 117426: 5b pop %ebx 117427: 5e pop %esi 117428: 5f pop %edi 117429: c9 leave 11742a: c3 ret 00118354 <_Objects_Get_no_protection>: Objects_Control *_Objects_Get_no_protection( Objects_Information *information, Objects_Id id, Objects_Locations *location ) { 118354: 55 push %ebp 118355: 89 e5 mov %esp,%ebp 118357: 53 push %ebx 118358: 8b 55 08 mov 0x8(%ebp),%edx 11835b: 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; 11835e: b8 01 00 00 00 mov $0x1,%eax 118363: 2b 42 08 sub 0x8(%edx),%eax 118366: 03 45 0c add 0xc(%ebp),%eax if ( information->maximum >= index ) { 118369: 0f b7 5a 10 movzwl 0x10(%edx),%ebx 11836d: 39 c3 cmp %eax,%ebx 11836f: 72 12 jb 118383 <_Objects_Get_no_protection+0x2f> if ( (the_object = information->local_table[ index ]) != NULL ) { 118371: 8b 52 1c mov 0x1c(%edx),%edx 118374: 8b 04 82 mov (%edx,%eax,4),%eax 118377: 85 c0 test %eax,%eax 118379: 74 08 je 118383 <_Objects_Get_no_protection+0x2f> <== ALWAYS TAKEN *location = OBJECTS_LOCAL; 11837b: c7 01 00 00 00 00 movl $0x0,(%ecx) return the_object; 118381: eb 08 jmp 11838b <_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; 118383: c7 01 01 00 00 00 movl $0x1,(%ecx) 118389: 31 c0 xor %eax,%eax return NULL; } 11838b: 5b pop %ebx 11838c: c9 leave 11838d: c3 ret 0010ea48 <_Objects_Id_to_name>: */ Objects_Name_or_id_lookup_errors _Objects_Id_to_name ( Objects_Id id, Objects_Name *name ) { 10ea48: 55 push %ebp 10ea49: 89 e5 mov %esp,%ebp 10ea4b: 83 ec 18 sub $0x18,%esp /* * Caller is trusted for name != NULL. */ tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 10ea4e: 8b 45 08 mov 0x8(%ebp),%eax 10ea51: 85 c0 test %eax,%eax 10ea53: 75 08 jne 10ea5d <_Objects_Id_to_name+0x15> 10ea55: a1 8c fb 12 00 mov 0x12fb8c,%eax 10ea5a: 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); 10ea5d: 89 c2 mov %eax,%edx 10ea5f: c1 ea 18 shr $0x18,%edx 10ea62: 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 ) 10ea65: 8d 4a ff lea -0x1(%edx),%ecx 10ea68: 83 f9 03 cmp $0x3,%ecx 10ea6b: 77 38 ja 10eaa5 <_Objects_Id_to_name+0x5d> 10ea6d: eb 3d jmp 10eaac <_Objects_Id_to_name+0x64> <== 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 ]; 10ea6f: 89 c1 mov %eax,%ecx 10ea71: c1 e9 1b shr $0x1b,%ecx 10ea74: 8b 14 8a mov (%edx,%ecx,4),%edx if ( !information ) 10ea77: 85 d2 test %edx,%edx 10ea79: 74 2a je 10eaa5 <_Objects_Id_to_name+0x5d> <== ALWAYS TAKEN return OBJECTS_INVALID_ID; #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) 10ea7b: 80 7a 38 00 cmpb $0x0,0x38(%edx) 10ea7f: 75 24 jne 10eaa5 <_Objects_Id_to_name+0x5d> <== ALWAYS TAKEN return OBJECTS_INVALID_ID; #endif the_object = _Objects_Get( information, tmpId, &ignored_location ); 10ea81: 51 push %ecx 10ea82: 8d 4d f4 lea -0xc(%ebp),%ecx 10ea85: 51 push %ecx 10ea86: 50 push %eax 10ea87: 52 push %edx 10ea88: e8 63 ff ff ff call 10e9f0 <_Objects_Get> <== ALWAYS TAKEN if ( !the_object ) 10ea8d: 83 c4 10 add $0x10,%esp 10ea90: 85 c0 test %eax,%eax 10ea92: 74 11 je 10eaa5 <_Objects_Id_to_name+0x5d> return OBJECTS_INVALID_ID; *name = the_object->name; 10ea94: 8b 50 0c mov 0xc(%eax),%edx 10ea97: 8b 45 0c mov 0xc(%ebp),%eax 10ea9a: 89 10 mov %edx,(%eax) _Thread_Enable_dispatch(); 10ea9c: e8 b4 07 00 00 call 10f255 <_Thread_Enable_dispatch> <== ALWAYS TAKEN 10eaa1: 31 c0 xor %eax,%eax return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; 10eaa3: eb 05 jmp 10eaaa <_Objects_Id_to_name+0x62> <== ALWAYS TAKEN 10eaa5: b8 03 00 00 00 mov $0x3,%eax } 10eaaa: c9 leave 10eaab: 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 ] ) 10eaac: 8b 14 95 a4 fa 12 00 mov 0x12faa4(,%edx,4),%edx 10eab3: 85 d2 test %edx,%edx 10eab5: 75 b8 jne 10ea6f <_Objects_Id_to_name+0x27> 10eab7: eb ec jmp 10eaa5 <_Objects_Id_to_name+0x5d> <== ALWAYS TAKEN 0010b458 <_Objects_Initialize_information>: , bool supports_global, Objects_Thread_queue_Extract_callout extract #endif ) { 10b458: 55 push %ebp 10b459: 89 e5 mov %esp,%ebp 10b45b: 57 push %edi 10b45c: 56 push %esi 10b45d: 53 push %ebx 10b45e: 83 ec 1c sub $0x1c,%esp 10b461: 8b 45 08 mov 0x8(%ebp),%eax 10b464: 8b 55 0c mov 0xc(%ebp),%edx 10b467: 8b 75 10 mov 0x10(%ebp),%esi 10b46a: 8b 5d 14 mov 0x14(%ebp),%ebx 10b46d: 8b 4d 20 mov 0x20(%ebp),%ecx 10b470: 89 4d e4 mov %ecx,-0x1c(%ebp) 10b473: 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; 10b477: 89 10 mov %edx,(%eax) information->the_class = the_class; 10b479: 66 89 70 04 mov %si,0x4(%eax) information->size = size; 10b47d: 89 78 18 mov %edi,0x18(%eax) information->local_table = 0; 10b480: c7 40 1c 00 00 00 00 movl $0x0,0x1c(%eax) information->inactive_per_block = 0; 10b487: c7 40 30 00 00 00 00 movl $0x0,0x30(%eax) information->object_blocks = 0; 10b48e: c7 40 34 00 00 00 00 movl $0x0,0x34(%eax) information->inactive = 0; 10b495: 66 c7 40 2c 00 00 movw $0x0,0x2c(%eax) #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) information->is_string = is_string; 10b49b: 8b 7d 1c mov 0x1c(%ebp),%edi 10b49e: 89 f9 mov %edi,%ecx 10b4a0: 88 48 38 mov %cl,0x38(%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; 10b4a3: 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; 10b4a9: 8b 3c 95 c0 41 12 00 mov 0x1241c0(,%edx,4),%edi 10b4b0: 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; 10b4b3: 89 df mov %ebx,%edi 10b4b5: 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 = 10b4b8: 89 f9 mov %edi,%ecx 10b4ba: 88 48 12 mov %cl,0x12(%eax) (maximum & OBJECTS_UNLIMITED_OBJECTS) ? true : false; maximum_per_allocation = maximum & ~OBJECTS_UNLIMITED_OBJECTS; 10b4bd: 89 d9 mov %ebx,%ecx 10b4bf: 81 e1 ff ff ff 7f and $0x7fffffff,%ecx /* * Unlimited and maximum of zero is illogical. */ if ( information->auto_extend && maximum_per_allocation == 0) { 10b4c5: 85 ff test %edi,%edi 10b4c7: 74 10 je 10b4d9 <_Objects_Initialize_information+0x81> 10b4c9: 85 c9 test %ecx,%ecx 10b4cb: 75 0c jne 10b4d9 <_Objects_Initialize_information+0x81> _Internal_error_Occurred( 10b4cd: 50 push %eax 10b4ce: 6a 14 push $0x14 10b4d0: 6a 01 push $0x1 10b4d2: 6a 00 push $0x0 10b4d4: e8 7b fa ff ff call 10af54 <_Internal_error_Occurred> } /* * The allocation unit is the maximum value */ information->allocation_size = maximum_per_allocation; 10b4d9: 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; 10b4dd: c7 40 1c 8c 3e 12 00 movl $0x123e8c,0x1c(%eax) /* * Calculate minimum and maximum Id's */ minimum_index = (maximum_per_allocation == 0) ? 0 : 1; information->minimum_id = 10b4e4: c1 e2 18 shl $0x18,%edx 10b4e7: 81 ca 00 00 01 00 or $0x10000,%edx 10b4ed: c1 e6 1b shl $0x1b,%esi 10b4f0: 09 f2 or %esi,%edx 10b4f2: 85 c9 test %ecx,%ecx 10b4f4: 0f 95 c3 setne %bl 10b4f7: 89 de mov %ebx,%esi 10b4f9: 81 e6 ff 00 00 00 and $0xff,%esi 10b4ff: 09 f2 or %esi,%edx 10b501: 89 50 08 mov %edx,0x8(%eax) /* * Calculate the maximum name length */ name_length = maximum_name_length; if ( name_length & (OBJECTS_NAME_ALIGNMENT-1) ) 10b504: 8b 55 e4 mov -0x1c(%ebp),%edx 10b507: f6 c2 03 test $0x3,%dl 10b50a: 74 06 je 10b512 <_Objects_Initialize_information+0xba> name_length = (name_length + OBJECTS_NAME_ALIGNMENT) & 10b50c: 83 c2 04 add $0x4,%edx 10b50f: 83 e2 fc and $0xfffffffc,%edx ~(OBJECTS_NAME_ALIGNMENT-1); information->name_length = name_length; 10b512: 66 89 50 3a mov %dx,0x3a(%eax) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 10b516: 8d 50 24 lea 0x24(%eax),%edx 10b519: 89 50 20 mov %edx,0x20(%eax) the_chain->permanent_null = NULL; 10b51c: c7 40 24 00 00 00 00 movl $0x0,0x24(%eax) the_chain->last = _Chain_Head(the_chain); 10b523: 8d 50 20 lea 0x20(%eax),%edx 10b526: 89 50 28 mov %edx,0x28(%eax) _Chain_Initialize_empty( &information->Inactive ); /* * Initialize objects .. if there are any */ if ( maximum_per_allocation ) { 10b529: 85 c9 test %ecx,%ecx 10b52b: 74 0f je 10b53c <_Objects_Initialize_information+0xe4> /* * 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 ); 10b52d: 89 45 08 mov %eax,0x8(%ebp) _Chain_Initialize_empty( &information->global_table[ index ] ); } else information->global_table = NULL; #endif } 10b530: 8d 65 f4 lea -0xc(%ebp),%esp 10b533: 5b pop %ebx 10b534: 5e pop %esi 10b535: 5f pop %edi 10b536: 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 ); 10b537: e9 44 fb ff ff jmp 10b080 <_Objects_Extend_information> <== ALWAYS TAKEN _Chain_Initialize_empty( &information->global_table[ index ] ); } else information->global_table = NULL; #endif } 10b53c: 8d 65 f4 lea -0xc(%ebp),%esp 10b53f: 5b pop %ebx 10b540: 5e pop %esi 10b541: 5f pop %edi 10b542: c9 leave 10b543: c3 ret 00114a2c <_Objects_Name_to_id_string>: Objects_Name_or_id_lookup_errors _Objects_Name_to_id_string( Objects_Information *information, const char *name, Objects_Id *id ) { 114a2c: 55 push %ebp 114a2d: 89 e5 mov %esp,%ebp 114a2f: 57 push %edi 114a30: 56 push %esi 114a31: 53 push %ebx 114a32: 83 ec 1c sub $0x1c,%esp 114a35: 8b 7d 08 mov 0x8(%ebp),%edi 114a38: 8b 55 0c mov 0xc(%ebp),%edx uint32_t index; uint32_t name_length; /* ASSERT: information->is_string == true */ if ( !id ) 114a3b: b8 02 00 00 00 mov $0x2,%eax 114a40: 83 7d 10 00 cmpl $0x0,0x10(%ebp) 114a44: 74 5b je 114aa1 <_Objects_Name_to_id_string+0x75> return OBJECTS_INVALID_ADDRESS; if ( !name ) 114a46: 85 d2 test %edx,%edx 114a48: 74 52 je 114a9c <_Objects_Name_to_id_string+0x70> return OBJECTS_INVALID_NAME; if ( information->maximum != 0 ) { 114a4a: 8b 47 10 mov 0x10(%edi),%eax 114a4d: 66 85 c0 test %ax,%ax 114a50: 74 4a je 114a9c <_Objects_Name_to_id_string+0x70> 114a52: bb 01 00 00 00 mov $0x1,%ebx name_length = information->name_length; for ( index = 1; index <= information->maximum; index++ ) { 114a57: 0f b7 c0 movzwl %ax,%eax 114a5a: 89 45 e4 mov %eax,-0x1c(%ebp) 114a5d: eb 38 jmp 114a97 <_Objects_Name_to_id_string+0x6b> <== ALWAYS TAKEN the_object = information->local_table[ index ]; 114a5f: 8b 47 1c mov 0x1c(%edi),%eax 114a62: 8b 34 98 mov (%eax,%ebx,4),%esi if ( !the_object ) 114a65: 85 f6 test %esi,%esi 114a67: 74 2d je 114a96 <_Objects_Name_to_id_string+0x6a> continue; if ( !the_object->name.name_p ) 114a69: 8b 46 0c mov 0xc(%esi),%eax 114a6c: 85 c0 test %eax,%eax 114a6e: 74 26 je 114a96 <_Objects_Name_to_id_string+0x6a> continue; if (!strncmp( name, the_object->name.name_p, information->name_length)) { 114a70: 51 push %ecx 114a71: 0f b7 4f 3a movzwl 0x3a(%edi),%ecx 114a75: 51 push %ecx 114a76: 50 push %eax 114a77: 52 push %edx 114a78: 89 55 e0 mov %edx,-0x20(%ebp) 114a7b: e8 48 35 00 00 call 117fc8 114a80: 83 c4 10 add $0x10,%esp 114a83: 85 c0 test %eax,%eax 114a85: 8b 55 e0 mov -0x20(%ebp),%edx 114a88: 75 0c jne 114a96 <_Objects_Name_to_id_string+0x6a> *id = the_object->id; 114a8a: 8b 46 08 mov 0x8(%esi),%eax 114a8d: 8b 55 10 mov 0x10(%ebp),%edx 114a90: 89 02 mov %eax,(%edx) 114a92: 31 c0 xor %eax,%eax return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; 114a94: eb 0b jmp 114aa1 <_Objects_Name_to_id_string+0x75> <== ALWAYS TAKEN return OBJECTS_INVALID_NAME; if ( information->maximum != 0 ) { name_length = information->name_length; for ( index = 1; index <= information->maximum; index++ ) { 114a96: 43 inc %ebx 114a97: 3b 5d e4 cmp -0x1c(%ebp),%ebx 114a9a: 76 c3 jbe 114a5f <_Objects_Name_to_id_string+0x33> 114a9c: b8 01 00 00 00 mov $0x1,%eax } } } return OBJECTS_INVALID_NAME; } 114aa1: 8d 65 f4 lea -0xc(%ebp),%esp 114aa4: 5b pop %ebx 114aa5: 5e pop %esi 114aa6: 5f pop %edi 114aa7: c9 leave 114aa8: c3 ret 0010b578 <_Objects_Name_to_id_u32>: Objects_Information *information, uint32_t name, uint32_t node, Objects_Id *id ) { 10b578: 55 push %ebp 10b579: 89 e5 mov %esp,%ebp 10b57b: 57 push %edi 10b57c: 56 push %esi 10b57d: 53 push %ebx 10b57e: 8b 4d 08 mov 0x8(%ebp),%ecx 10b581: 8b 5d 0c mov 0xc(%ebp),%ebx 10b584: 8b 55 10 mov 0x10(%ebp),%edx 10b587: 8b 75 14 mov 0x14(%ebp),%esi Objects_Name name_for_mp; #endif /* ASSERT: information->is_string == false */ if ( !id ) 10b58a: b8 02 00 00 00 mov $0x2,%eax 10b58f: 85 f6 test %esi,%esi 10b591: 74 49 je 10b5dc <_Objects_Name_to_id_u32+0x64> return OBJECTS_INVALID_ADDRESS; if ( name == 0 ) 10b593: 85 db test %ebx,%ebx 10b595: 74 40 je 10b5d7 <_Objects_Name_to_id_u32+0x5f> return OBJECTS_INVALID_NAME; search_local_node = false; if ( information->maximum != 0 && 10b597: 8b 79 10 mov 0x10(%ecx),%edi 10b59a: 66 85 ff test %di,%di 10b59d: 74 38 je 10b5d7 <_Objects_Name_to_id_u32+0x5f> 10b59f: 81 fa ff ff ff 7f cmp $0x7fffffff,%edx 10b5a5: 74 24 je 10b5cb <_Objects_Name_to_id_u32+0x53> 10b5a7: 85 d2 test %edx,%edx 10b5a9: 74 20 je 10b5cb <_Objects_Name_to_id_u32+0x53> 10b5ab: 4a dec %edx 10b5ac: 75 29 jne 10b5d7 <_Objects_Name_to_id_u32+0x5f> 10b5ae: eb 1b jmp 10b5cb <_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 ]; 10b5b0: 8b 51 1c mov 0x1c(%ecx),%edx 10b5b3: 8b 14 82 mov (%edx,%eax,4),%edx if ( !the_object ) 10b5b6: 85 d2 test %edx,%edx 10b5b8: 74 0e je 10b5c8 <_Objects_Name_to_id_u32+0x50> continue; if ( name == the_object->name.name_u32 ) { 10b5ba: 3b 5a 0c cmp 0xc(%edx),%ebx 10b5bd: 75 09 jne 10b5c8 <_Objects_Name_to_id_u32+0x50> *id = the_object->id; 10b5bf: 8b 42 08 mov 0x8(%edx),%eax 10b5c2: 89 06 mov %eax,(%esi) 10b5c4: 31 c0 xor %eax,%eax return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; 10b5c6: eb 14 jmp 10b5dc <_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++ ) { 10b5c8: 40 inc %eax 10b5c9: eb 08 jmp 10b5d3 <_Objects_Name_to_id_u32+0x5b> <== ALWAYS TAKEN 10b5cb: b8 01 00 00 00 mov $0x1,%eax 10b5d0: 0f b7 ff movzwl %di,%edi 10b5d3: 39 f8 cmp %edi,%eax 10b5d5: 76 d9 jbe 10b5b0 <_Objects_Name_to_id_u32+0x38> 10b5d7: 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 } 10b5dc: 5b pop %ebx 10b5dd: 5e pop %esi 10b5de: 5f pop %edi 10b5df: c9 leave 10b5e0: c3 ret 0010bbc8 <_Objects_Set_name>: bool _Objects_Set_name( Objects_Information *information, Objects_Control *the_object, const char *name ) { 10bbc8: 55 push %ebp 10bbc9: 89 e5 mov %esp,%ebp 10bbcb: 57 push %edi 10bbcc: 56 push %esi 10bbcd: 53 push %ebx 10bbce: 83 ec 34 sub $0x34,%esp 10bbd1: 8b 55 08 mov 0x8(%ebp),%edx 10bbd4: 8b 7d 0c mov 0xc(%ebp),%edi 10bbd7: 8b 5d 10 mov 0x10(%ebp),%ebx size_t length; const char *s; s = name; length = strnlen( name, information->name_length ); 10bbda: 0f b7 42 3a movzwl 0x3a(%edx),%eax 10bbde: 50 push %eax 10bbdf: 53 push %ebx 10bbe0: 89 55 d4 mov %edx,-0x2c(%ebp) 10bbe3: e8 48 73 00 00 call 112f30 10bbe8: 89 c6 mov %eax,%esi #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) { 10bbea: 83 c4 10 add $0x10,%esp 10bbed: 8b 55 d4 mov -0x2c(%ebp),%edx 10bbf0: 80 7a 38 00 cmpb $0x0,0x38(%edx) 10bbf4: 74 54 je 10bc4a <_Objects_Set_name+0x82> char *d; d = _Workspace_Allocate( length + 1 ); 10bbf6: 83 ec 0c sub $0xc,%esp 10bbf9: 8d 40 01 lea 0x1(%eax),%eax 10bbfc: 50 push %eax 10bbfd: e8 7e 16 00 00 call 10d280 <_Workspace_Allocate> 10bc02: 89 c2 mov %eax,%edx if ( !d ) 10bc04: 83 c4 10 add $0x10,%esp 10bc07: 31 c0 xor %eax,%eax 10bc09: 85 d2 test %edx,%edx 10bc0b: 74 79 je 10bc86 <_Objects_Set_name+0xbe> <== ALWAYS TAKEN return false; if ( the_object->name.name_p ) { 10bc0d: 8b 47 0c mov 0xc(%edi),%eax 10bc10: 85 c0 test %eax,%eax 10bc12: 74 19 je 10bc2d <_Objects_Set_name+0x65> _Workspace_Free( (void *)the_object->name.name_p ); 10bc14: 83 ec 0c sub $0xc,%esp 10bc17: 50 push %eax 10bc18: 89 55 d4 mov %edx,-0x2c(%ebp) 10bc1b: e8 79 16 00 00 call 10d299 <_Workspace_Free> the_object->name.name_p = NULL; 10bc20: c7 47 0c 00 00 00 00 movl $0x0,0xc(%edi) 10bc27: 83 c4 10 add $0x10,%esp 10bc2a: 8b 55 d4 mov -0x2c(%ebp),%edx } strncpy( d, name, length ); 10bc2d: 50 push %eax 10bc2e: 56 push %esi 10bc2f: 53 push %ebx 10bc30: 52 push %edx 10bc31: 89 55 d4 mov %edx,-0x2c(%ebp) 10bc34: e8 7b 72 00 00 call 112eb4 d[length] = '\0'; 10bc39: 8b 55 d4 mov -0x2c(%ebp),%edx 10bc3c: c6 04 32 00 movb $0x0,(%edx,%esi,1) the_object->name.name_p = d; 10bc40: 89 57 0c mov %edx,0xc(%edi) 10bc43: b0 01 mov $0x1,%al 10bc45: 83 c4 10 add $0x10,%esp 10bc48: eb 3c jmp 10bc86 <_Objects_Set_name+0xbe> <== ALWAYS TAKEN } else #endif { the_object->name.name_u32 = _Objects_Build_name( 10bc4a: 8a 03 mov (%ebx),%al 10bc4c: 88 45 d8 mov %al,-0x28(%ebp) 10bc4f: 83 fe 01 cmp $0x1,%esi 10bc52: 76 3a jbe 10bc8e <_Objects_Set_name+0xc6> 10bc54: 0f be 53 01 movsbl 0x1(%ebx),%edx 10bc58: c1 e2 10 shl $0x10,%edx 10bc5b: 83 fe 02 cmp $0x2,%esi 10bc5e: 76 33 jbe 10bc93 <_Objects_Set_name+0xcb> 10bc60: 0f be 43 02 movsbl 0x2(%ebx),%eax 10bc64: c1 e0 08 shl $0x8,%eax 10bc67: b9 20 00 00 00 mov $0x20,%ecx 10bc6c: 83 fe 03 cmp $0x3,%esi 10bc6f: 76 04 jbe 10bc75 <_Objects_Set_name+0xad> 10bc71: 0f be 4b 03 movsbl 0x3(%ebx),%ecx 10bc75: 8a 5d d8 mov -0x28(%ebp),%bl 10bc78: c1 e3 18 shl $0x18,%ebx 10bc7b: 09 d3 or %edx,%ebx 10bc7d: 09 c3 or %eax,%ebx 10bc7f: 09 cb or %ecx,%ebx 10bc81: 89 5f 0c mov %ebx,0xc(%edi) 10bc84: b0 01 mov $0x1,%al ); } return true; } 10bc86: 8d 65 f4 lea -0xc(%ebp),%esp 10bc89: 5b pop %ebx 10bc8a: 5e pop %esi 10bc8b: 5f pop %edi 10bc8c: c9 leave 10bc8d: c3 ret d[length] = '\0'; the_object->name.name_p = d; } else #endif { the_object->name.name_u32 = _Objects_Build_name( 10bc8e: ba 00 00 20 00 mov $0x200000,%edx 10bc93: b8 00 20 00 00 mov $0x2000,%eax 10bc98: b9 20 00 00 00 mov $0x20,%ecx 10bc9d: eb d6 jmp 10bc75 <_Objects_Set_name+0xad> <== ALWAYS TAKEN 0010b5e4 <_Objects_Shrink_information>: */ void _Objects_Shrink_information( Objects_Information *information ) { 10b5e4: 55 push %ebp 10b5e5: 89 e5 mov %esp,%ebp 10b5e7: 57 push %edi 10b5e8: 56 push %esi 10b5e9: 53 push %ebx 10b5ea: 83 ec 1c sub $0x1c,%esp 10b5ed: 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 ); 10b5f0: 0f b7 73 08 movzwl 0x8(%ebx),%esi block_count = (information->maximum - index_base) / 10b5f4: 0f b7 4b 14 movzwl 0x14(%ebx),%ecx 10b5f8: 0f b7 43 10 movzwl 0x10(%ebx),%eax 10b5fc: 29 f0 sub %esi,%eax 10b5fe: 31 d2 xor %edx,%edx 10b600: f7 f1 div %ecx 10b602: 89 45 e4 mov %eax,-0x1c(%ebp) 10b605: 31 c0 xor %eax,%eax information->allocation_size; for ( block = 0; block < block_count; block++ ) { 10b607: eb 77 jmp 10b680 <_Objects_Shrink_information+0x9c> <== ALWAYS TAKEN 10b609: 8d 3c 85 00 00 00 00 lea 0x0(,%eax,4),%edi if ( information->inactive_per_block[ block ] == 10b610: 8b 53 30 mov 0x30(%ebx),%edx 10b613: 39 0c 82 cmp %ecx,(%edx,%eax,4) 10b616: 75 65 jne 10b67d <_Objects_Shrink_information+0x99> information->allocation_size ) { /* * Assume the Inactive chain is never empty at this point */ the_object = (Objects_Control *) information->Inactive.first; 10b618: 8b 43 20 mov 0x20(%ebx),%eax do { index = _Objects_Get_index( the_object->id ); 10b61b: 0f b7 50 08 movzwl 0x8(%eax),%edx 10b61f: 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; 10b622: 8b 10 mov (%eax),%edx if ((index >= index_base) && 10b624: 39 75 e4 cmp %esi,-0x1c(%ebp) 10b627: 72 1e jb 10b647 <_Objects_Shrink_information+0x63> (index < (index_base + information->allocation_size))) { 10b629: 0f b7 4b 14 movzwl 0x14(%ebx),%ecx 10b62d: 8d 0c 0e lea (%esi,%ecx,1),%ecx 10b630: 39 4d e4 cmp %ecx,-0x1c(%ebp) 10b633: 73 12 jae 10b647 <_Objects_Shrink_information+0x63> _Chain_Extract( &extract_me->Node ); 10b635: 83 ec 0c sub $0xc,%esp 10b638: 50 push %eax 10b639: 89 55 e0 mov %edx,-0x20(%ebp) 10b63c: e8 67 35 00 00 call 10eba8 <_Chain_Extract> 10b641: 83 c4 10 add $0x10,%esp 10b644: 8b 55 e0 mov -0x20(%ebp),%edx } } while ( the_object ); 10b647: 85 d2 test %edx,%edx 10b649: 74 04 je 10b64f <_Objects_Shrink_information+0x6b> 10b64b: 89 d0 mov %edx,%eax 10b64d: eb cc jmp 10b61b <_Objects_Shrink_information+0x37> <== ALWAYS TAKEN /* * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); 10b64f: 83 ec 0c sub $0xc,%esp 10b652: 8b 43 34 mov 0x34(%ebx),%eax 10b655: ff 34 38 pushl (%eax,%edi,1) 10b658: e8 80 15 00 00 call 10cbdd <_Workspace_Free> information->object_blocks[ block ] = NULL; 10b65d: 8b 43 34 mov 0x34(%ebx),%eax 10b660: c7 04 38 00 00 00 00 movl $0x0,(%eax,%edi,1) information->inactive_per_block[ block ] = 0; 10b667: 8b 43 30 mov 0x30(%ebx),%eax 10b66a: c7 04 38 00 00 00 00 movl $0x0,(%eax,%edi,1) information->inactive -= information->allocation_size; 10b671: 8b 43 14 mov 0x14(%ebx),%eax 10b674: 66 29 43 2c sub %ax,0x2c(%ebx) return; 10b678: 83 c4 10 add $0x10,%esp 10b67b: eb 08 jmp 10b685 <_Objects_Shrink_information+0xa1> <== ALWAYS TAKEN } index_base += information->allocation_size; 10b67d: 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++ ) { 10b67f: 40 inc %eax 10b680: 3b 45 e4 cmp -0x1c(%ebp),%eax 10b683: 72 84 jb 10b609 <_Objects_Shrink_information+0x25> return; } index_base += information->allocation_size; } } 10b685: 8d 65 f4 lea -0xc(%ebp),%esp 10b688: 5b pop %ebx 10b689: 5e pop %esi 10b68a: 5f pop %edi 10b68b: c9 leave 10b68c: c3 ret 0010a5a8 <_POSIX_API_Initialize>: */ Objects_Information *_POSIX_Objects[ OBJECTS_POSIX_CLASSES_LAST + 1 ]; void _POSIX_API_Initialize(void) { 10a5a8: 55 push %ebp 10a5a9: 89 e5 mov %esp,%ebp 10a5ab: 83 ec 08 sub $0x8,%esp /* * Install our API Object Management Table and initialize the * various managers. */ _Objects_Information_table[OBJECTS_POSIX_API] = _POSIX_Objects; 10a5ae: c7 05 cc 41 12 00 ac movl $0x1246ac,0x1241cc 10a5b5: 46 12 00 _POSIX_signals_Manager_Initialization(); 10a5b8: e8 83 3b 00 00 call 10e140 <_POSIX_signals_Manager_Initialization> _POSIX_Threads_Manager_initialization(); 10a5bd: e8 3e 3d 00 00 call 10e300 <_POSIX_Threads_Manager_initialization> <== ALWAYS TAKEN _POSIX_Condition_variables_Manager_initialization(); 10a5c2: e8 25 3a 00 00 call 10dfec <_POSIX_Condition_variables_Manager_initialization> _POSIX_Key_Manager_initialization(); 10a5c7: e8 48 3a 00 00 call 10e014 <_POSIX_Key_Manager_initialization> _POSIX_Mutex_Manager_initialization(); 10a5cc: e8 b7 3a 00 00 call 10e088 <_POSIX_Mutex_Manager_initialization> _POSIX_Message_queue_Manager_initialization(); 10a5d1: e8 66 3a 00 00 call 10e03c <_POSIX_Message_queue_Manager_initialization> _POSIX_Semaphore_Manager_initialization(); 10a5d6: e8 19 40 00 00 call 10e5f4 <_POSIX_Semaphore_Manager_initialization> _POSIX_Timer_Manager_initialization(); 10a5db: e8 ec 3f 00 00 call 10e5cc <_POSIX_Timer_Manager_initialization> _POSIX_Barrier_Manager_initialization(); 10a5e0: e8 0b 3b 00 00 call 10e0f0 <_POSIX_Barrier_Manager_initialization> _POSIX_RWLock_Manager_initialization(); 10a5e5: e8 2e 3b 00 00 call 10e118 <_POSIX_RWLock_Manager_initialization> _POSIX_Spinlock_Manager_initialization(); } 10a5ea: c9 leave _POSIX_Message_queue_Manager_initialization(); _POSIX_Semaphore_Manager_initialization(); _POSIX_Timer_Manager_initialization(); _POSIX_Barrier_Manager_initialization(); _POSIX_RWLock_Manager_initialization(); _POSIX_Spinlock_Manager_initialization(); 10a5eb: e9 d4 3c 00 00 jmp 10e2c4 <_POSIX_Spinlock_Manager_initialization> 0010a9a8 <_POSIX_Condition_variables_Get>: POSIX_Condition_variables_Control *_POSIX_Condition_variables_Get ( pthread_cond_t *cond, Objects_Locations *location ) { 10a9a8: 55 push %ebp 10a9a9: 89 e5 mov %esp,%ebp 10a9ab: 56 push %esi 10a9ac: 53 push %ebx 10a9ad: 8b 5d 08 mov 0x8(%ebp),%ebx 10a9b0: 8b 75 0c mov 0xc(%ebp),%esi int status; if ( !cond ) { 10a9b3: 85 db test %ebx,%ebx 10a9b5: 74 16 je 10a9cd <_POSIX_Condition_variables_Get+0x25> *location = OBJECTS_ERROR; return (POSIX_Condition_variables_Control *) 0; } if ( *cond == PTHREAD_COND_INITIALIZER ) { 10a9b7: 83 3b ff cmpl $0xffffffff,(%ebx) 10a9ba: 75 1b jne 10a9d7 <_POSIX_Condition_variables_Get+0x2f> /* * Do an "auto-create" here. */ status = pthread_cond_init( cond, 0 ); 10a9bc: 52 push %edx 10a9bd: 52 push %edx 10a9be: 6a 00 push $0x0 10a9c0: 53 push %ebx 10a9c1: e8 2a 00 00 00 call 10a9f0 <== ALWAYS TAKEN if ( status ) { 10a9c6: 83 c4 10 add $0x10,%esp 10a9c9: 85 c0 test %eax,%eax 10a9cb: 74 0a je 10a9d7 <_POSIX_Condition_variables_Get+0x2f> *location = OBJECTS_ERROR; 10a9cd: c7 06 01 00 00 00 movl $0x1,(%esi) 10a9d3: 31 c0 xor %eax,%eax return (POSIX_Condition_variables_Control *) 0; 10a9d5: eb 11 jmp 10a9e8 <_POSIX_Condition_variables_Get+0x40> <== ALWAYS TAKEN } /* * Now call Objects_Get() */ return (POSIX_Condition_variables_Control *)_Objects_Get( 10a9d7: 50 push %eax 10a9d8: 56 push %esi 10a9d9: ff 33 pushl (%ebx) 10a9db: 68 ac 76 12 00 push $0x1276ac 10a9e0: e8 c7 26 00 00 call 10d0ac <_Objects_Get> 10a9e5: 83 c4 10 add $0x10,%esp &_POSIX_Condition_variables_Information, (Objects_Id) *cond, location ); } 10a9e8: 8d 65 f8 lea -0x8(%ebp),%esp 10a9eb: 5b pop %ebx 10a9ec: 5e pop %esi 10a9ed: c9 leave 10a9ee: c3 ret 0010aaa4 <_POSIX_Condition_variables_Signal_support>: int _POSIX_Condition_variables_Signal_support( pthread_cond_t *cond, bool is_broadcast ) { 10aaa4: 55 push %ebp 10aaa5: 89 e5 mov %esp,%ebp 10aaa7: 56 push %esi 10aaa8: 53 push %ebx 10aaa9: 83 ec 28 sub $0x28,%esp 10aaac: 8a 45 0c mov 0xc(%ebp),%al 10aaaf: 88 45 e7 mov %al,-0x19(%ebp) register POSIX_Condition_variables_Control *the_cond; Objects_Locations location; Thread_Control *the_thread; the_cond = _POSIX_Condition_variables_Get( cond, &location ); 10aab2: 8d 45 f4 lea -0xc(%ebp),%eax 10aab5: 50 push %eax 10aab6: ff 75 08 pushl 0x8(%ebp) 10aab9: e8 ea fe ff ff call 10a9a8 <_POSIX_Condition_variables_Get> <== ALWAYS TAKEN 10aabe: 89 c3 mov %eax,%ebx switch ( location ) { 10aac0: 83 c4 10 add $0x10,%esp 10aac3: b8 16 00 00 00 mov $0x16,%eax 10aac8: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 10aacc: 75 2b jne 10aaf9 <_POSIX_Condition_variables_Signal_support+0x55> case OBJECTS_LOCAL: do { the_thread = _Thread_queue_Dequeue( &the_cond->Wait_queue ); 10aace: 8d 73 18 lea 0x18(%ebx),%esi 10aad1: 83 ec 0c sub $0xc,%esp 10aad4: 56 push %esi 10aad5: e8 52 31 00 00 call 10dc2c <_Thread_queue_Dequeue> if ( !the_thread ) 10aada: 83 c4 10 add $0x10,%esp 10aadd: 85 c0 test %eax,%eax 10aadf: 75 07 jne 10aae8 <_POSIX_Condition_variables_Signal_support+0x44> the_cond->Mutex = POSIX_CONDITION_VARIABLES_NO_MUTEX; 10aae1: c7 43 14 00 00 00 00 movl $0x0,0x14(%ebx) } while ( is_broadcast && the_thread ); 10aae8: 80 7d e7 00 cmpb $0x0,-0x19(%ebp) 10aaec: 74 04 je 10aaf2 <_POSIX_Condition_variables_Signal_support+0x4e> 10aaee: 85 c0 test %eax,%eax 10aaf0: 75 df jne 10aad1 <_POSIX_Condition_variables_Signal_support+0x2d> _Thread_Enable_dispatch(); 10aaf2: e8 a6 2d 00 00 call 10d89d <_Thread_Enable_dispatch> 10aaf7: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10aaf9: 8d 65 f8 lea -0x8(%ebp),%esp 10aafc: 5b pop %ebx 10aafd: 5e pop %esi 10aafe: c9 leave 10aaff: c3 ret 0010ab54 <_POSIX_Condition_variables_Wait_support>: pthread_cond_t *cond, pthread_mutex_t *mutex, Watchdog_Interval timeout, bool already_timedout ) { 10ab54: 55 push %ebp 10ab55: 89 e5 mov %esp,%ebp 10ab57: 57 push %edi 10ab58: 56 push %esi 10ab59: 53 push %ebx 10ab5a: 83 ec 34 sub $0x34,%esp 10ab5d: 8b 7d 08 mov 0x8(%ebp),%edi 10ab60: 8b 75 0c mov 0xc(%ebp),%esi 10ab63: 8a 45 14 mov 0x14(%ebp),%al 10ab66: 88 45 d7 mov %al,-0x29(%ebp) register POSIX_Condition_variables_Control *the_cond; Objects_Locations location; int status; int mutex_status; if ( !_POSIX_Mutex_Get( mutex, &location ) ) { 10ab69: 8d 5d e4 lea -0x1c(%ebp),%ebx 10ab6c: 53 push %ebx 10ab6d: 56 push %esi 10ab6e: e8 82 01 00 00 call 10acf5 <_POSIX_Mutex_Get> <== ALWAYS TAKEN 10ab73: 83 c4 10 add $0x10,%esp 10ab76: 85 c0 test %eax,%eax 10ab78: 0f 84 ae 00 00 00 je 10ac2c <_POSIX_Condition_variables_Wait_support+0xd8> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 10ab7e: a1 2c 72 12 00 mov 0x12722c,%eax 10ab83: 48 dec %eax 10ab84: a3 2c 72 12 00 mov %eax,0x12722c return EINVAL; } _Thread_Unnest_dispatch(); the_cond = _POSIX_Condition_variables_Get( cond, &location ); 10ab89: 52 push %edx 10ab8a: 52 push %edx 10ab8b: 53 push %ebx 10ab8c: 57 push %edi 10ab8d: e8 16 fe ff ff call 10a9a8 <_POSIX_Condition_variables_Get> <== ALWAYS TAKEN 10ab92: 89 c3 mov %eax,%ebx switch ( location ) { 10ab94: 83 c4 10 add $0x10,%esp 10ab97: 83 7d e4 00 cmpl $0x0,-0x1c(%ebp) 10ab9b: 0f 85 8b 00 00 00 jne 10ac2c <_POSIX_Condition_variables_Wait_support+0xd8> case OBJECTS_LOCAL: if ( the_cond->Mutex && ( the_cond->Mutex != *mutex ) ) { 10aba1: 8b 40 14 mov 0x14(%eax),%eax 10aba4: 85 c0 test %eax,%eax 10aba6: 74 0b je 10abb3 <_POSIX_Condition_variables_Wait_support+0x5f> 10aba8: 3b 06 cmp (%esi),%eax 10abaa: 74 07 je 10abb3 <_POSIX_Condition_variables_Wait_support+0x5f> _Thread_Enable_dispatch(); 10abac: e8 ec 2c 00 00 call 10d89d <_Thread_Enable_dispatch> 10abb1: eb 79 jmp 10ac2c <_POSIX_Condition_variables_Wait_support+0xd8> <== ALWAYS TAKEN return EINVAL; } (void) pthread_mutex_unlock( mutex ); 10abb3: 83 ec 0c sub $0xc,%esp 10abb6: 56 push %esi 10abb7: e8 20 03 00 00 call 10aedc <== ALWAYS TAKEN _Thread_Enable_dispatch(); return EINVAL; } */ if ( !already_timedout ) { 10abbc: 83 c4 10 add $0x10,%esp 10abbf: 80 7d d7 00 cmpb $0x0,-0x29(%ebp) 10abc3: 75 4d jne 10ac12 <_POSIX_Condition_variables_Wait_support+0xbe> the_cond->Mutex = *mutex; 10abc5: 8b 06 mov (%esi),%eax 10abc7: 89 43 14 mov %eax,0x14(%ebx) 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; 10abca: c7 43 48 01 00 00 00 movl $0x1,0x48(%ebx) _Thread_queue_Enter_critical_section( &the_cond->Wait_queue ); _Thread_Executing->Wait.return_code = 0; 10abd1: a1 e8 72 12 00 mov 0x1272e8,%eax 10abd6: c7 40 34 00 00 00 00 movl $0x0,0x34(%eax) _Thread_Executing->Wait.queue = &the_cond->Wait_queue; 10abdd: 83 c3 18 add $0x18,%ebx 10abe0: 89 58 44 mov %ebx,0x44(%eax) _Thread_Executing->Wait.id = *cond; 10abe3: 8b 17 mov (%edi),%edx 10abe5: 89 50 20 mov %edx,0x20(%eax) _Thread_queue_Enqueue( &the_cond->Wait_queue, timeout ); 10abe8: 50 push %eax 10abe9: 68 34 e0 10 00 push $0x10e034 10abee: ff 75 10 pushl 0x10(%ebp) 10abf1: 53 push %ebx 10abf2: e8 39 31 00 00 call 10dd30 <_Thread_queue_Enqueue_with_handler> _Thread_Enable_dispatch(); 10abf7: e8 a1 2c 00 00 call 10d89d <_Thread_Enable_dispatch> /* * Switch ourself out because we blocked as a result of the * _Thread_queue_Enqueue. */ status = _Thread_Executing->Wait.return_code; 10abfc: a1 e8 72 12 00 mov 0x1272e8,%eax 10ac01: 8b 58 34 mov 0x34(%eax),%ebx if ( status && status != ETIMEDOUT ) 10ac04: 83 c4 10 add $0x10,%esp 10ac07: 83 fb 74 cmp $0x74,%ebx 10ac0a: 74 10 je 10ac1c <_POSIX_Condition_variables_Wait_support+0xc8> 10ac0c: 85 db test %ebx,%ebx 10ac0e: 75 21 jne 10ac31 <_POSIX_Condition_variables_Wait_support+0xdd> <== ALWAYS TAKEN 10ac10: eb 0a jmp 10ac1c <_POSIX_Condition_variables_Wait_support+0xc8> <== ALWAYS TAKEN return status; } else { _Thread_Enable_dispatch(); 10ac12: e8 86 2c 00 00 call 10d89d <_Thread_Enable_dispatch> 10ac17: bb 74 00 00 00 mov $0x74,%ebx /* * When we get here the dispatch disable level is 0. */ mutex_status = pthread_mutex_lock( mutex ); 10ac1c: 83 ec 0c sub $0xc,%esp 10ac1f: 56 push %esi 10ac20: e8 37 02 00 00 call 10ae5c <== ALWAYS TAKEN if ( mutex_status ) 10ac25: 83 c4 10 add $0x10,%esp 10ac28: 85 c0 test %eax,%eax 10ac2a: 74 05 je 10ac31 <_POSIX_Condition_variables_Wait_support+0xdd> 10ac2c: bb 16 00 00 00 mov $0x16,%ebx case OBJECTS_ERROR: break; } return EINVAL; } 10ac31: 89 d8 mov %ebx,%eax 10ac33: 8d 65 f4 lea -0xc(%ebp),%esp 10ac36: 5b pop %ebx 10ac37: 5e pop %esi 10ac38: 5f pop %edi 10ac39: c9 leave 10ac3a: c3 ret 00110394 <_POSIX_Keys_Run_destructors>: */ void _POSIX_Keys_Run_destructors( Thread_Control *thread ) { 110394: 55 push %ebp 110395: 89 e5 mov %esp,%ebp 110397: 57 push %edi 110398: 56 push %esi 110399: 53 push %ebx 11039a: 83 ec 3c sub $0x3c,%esp uint32_t iterations; bool are_all_null; POSIX_Keys_Control *the_key; void *value; thread_index = _Objects_Get_index( thread->Object.id ); 11039d: 8b 45 08 mov 0x8(%ebp),%eax 1103a0: 8b 50 08 mov 0x8(%eax),%edx */ RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API( Objects_Id id ) { return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS); 1103a3: 89 d0 mov %edx,%eax 1103a5: c1 e8 18 shr $0x18,%eax 1103a8: 83 e0 07 and $0x7,%eax if ( !the_key ) continue; if ( !the_key->destructor ) continue; value = the_key->Values[ thread_api ][ thread_index ]; 1103ab: 0f b7 d2 movzwl %dx,%edx 1103ae: c1 e2 02 shl $0x2,%edx 1103b1: 89 55 e0 mov %edx,-0x20(%ebp) 1103b4: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) 1103bb: 83 c0 04 add $0x4,%eax 1103be: bf 01 00 00 00 mov $0x1,%edi 1103c3: bb 01 00 00 00 mov $0x1,%ebx for ( ; ; ) { are_all_null = true; for ( index=1 ; index <= _POSIX_Keys_Information.maximum ; index++ ) { 1103c8: eb 4b jmp 110415 <_POSIX_Keys_Run_destructors+0x81> <== ALWAYS TAKEN the_key = (POSIX_Keys_Control *) 1103ca: 8b 15 48 46 12 00 mov 0x124648,%edx 1103d0: 8b 34 9a mov (%edx,%ebx,4),%esi _POSIX_Keys_Information.local_table[ index ]; if ( !the_key ) 1103d3: 85 f6 test %esi,%esi 1103d5: 74 3d je 110414 <_POSIX_Keys_Run_destructors+0x80> continue; if ( !the_key->destructor ) 1103d7: 8b 56 10 mov 0x10(%esi),%edx 1103da: 89 55 c4 mov %edx,-0x3c(%ebp) 1103dd: 85 d2 test %edx,%edx 1103df: 74 33 je 110414 <_POSIX_Keys_Run_destructors+0x80> continue; value = the_key->Values[ thread_api ][ thread_index ]; 1103e1: 8b 54 86 04 mov 0x4(%esi,%eax,4),%edx 1103e5: 8b 4d e0 mov -0x20(%ebp),%ecx 1103e8: 8b 0c 0a mov (%edx,%ecx,1),%ecx 1103eb: 89 4d d4 mov %ecx,-0x2c(%ebp) if ( value ) { 1103ee: 85 c9 test %ecx,%ecx 1103f0: 74 22 je 110414 <_POSIX_Keys_Run_destructors+0x80> (*the_key->destructor)( value ); 1103f2: 83 ec 0c sub $0xc,%esp 1103f5: 51 push %ecx 1103f6: 89 45 dc mov %eax,-0x24(%ebp) 1103f9: ff 55 c4 call *-0x3c(%ebp) if ( the_key->Values[ thread_api ][ thread_index ] ) 1103fc: 8b 45 dc mov -0x24(%ebp),%eax 1103ff: 8b 54 86 04 mov 0x4(%esi,%eax,4),%edx 110403: 83 c4 10 add $0x10,%esp 110406: 8b 4d e0 mov -0x20(%ebp),%ecx 110409: 83 3c 0a 00 cmpl $0x0,(%edx,%ecx,1) 11040d: 0f 94 c2 sete %dl 110410: f7 da neg %edx 110412: 21 d7 and %edx,%edi for ( ; ; ) { are_all_null = true; for ( index=1 ; index <= _POSIX_Keys_Information.maximum ; index++ ) { 110414: 43 inc %ebx 110415: 0f b7 15 3c 46 12 00 movzwl 0x12463c,%edx 11041c: 39 d3 cmp %edx,%ebx 11041e: 76 aa jbe 1103ca <_POSIX_Keys_Run_destructors+0x36> if ( the_key->Values[ thread_api ][ thread_index ] ) are_all_null = false; } } if ( are_all_null == true ) 110420: 89 fa mov %edi,%edx 110422: 84 d2 test %dl,%dl 110424: 75 09 jne 11042f <_POSIX_Keys_Run_destructors+0x9b> return; iterations++; 110426: ff 45 e4 incl -0x1c(%ebp) * loop. It seems rude to unnecessarily lock up a system. * * Reference: 17.1.1.2 P1003.1c/Draft 10, p. 163, line 99. */ if ( iterations >= PTHREAD_DESTRUCTOR_ITERATIONS ) 110429: 83 7d e4 04 cmpl $0x4,-0x1c(%ebp) 11042d: 75 8f jne 1103be <_POSIX_Keys_Run_destructors+0x2a> return; } } 11042f: 8d 65 f4 lea -0xc(%ebp),%esp 110432: 5b pop %ebx 110433: 5e pop %esi 110434: 5f pop %edi 110435: c9 leave 110436: c3 ret 00113764 <_POSIX_Message_queue_Create_support>: const char *name_arg, int pshared, struct mq_attr *attr_ptr, POSIX_Message_queue_Control **message_queue ) { 113764: 55 push %ebp 113765: 89 e5 mov %esp,%ebp 113767: 57 push %edi 113768: 56 push %esi 113769: 53 push %ebx 11376a: 83 ec 34 sub $0x34,%esp 11376d: 8b 75 10 mov 0x10(%ebp),%esi CORE_message_queue_Attributes *the_mq_attr; struct mq_attr attr; char *name; size_t n; n = strnlen( name_arg, NAME_MAX ); 113770: 68 ff 00 00 00 push $0xff 113775: ff 75 08 pushl 0x8(%ebp) 113778: e8 43 49 00 00 call 1180c0 11377d: 89 45 d0 mov %eax,-0x30(%ebp) 113780: a1 2c ce 12 00 mov 0x12ce2c,%eax 113785: 40 inc %eax 113786: a3 2c ce 12 00 mov %eax,0x12ce2c * There is no real basis for the default values. They will work * but were not compared against any existing implementation for * compatibility. See README.mqueue for an example program we * think will print out the defaults. Report anything you find with it. */ if ( attr_ptr == NULL ) { 11378b: 83 c4 10 add $0x10,%esp 11378e: 85 f6 test %esi,%esi 113790: 75 0e jne 1137a0 <_POSIX_Message_queue_Create_support+0x3c> 113792: bb 0a 00 00 00 mov $0xa,%ebx 113797: c7 45 d4 10 00 00 00 movl $0x10,-0x2c(%ebp) 11379e: eb 31 jmp 1137d1 <_POSIX_Message_queue_Create_support+0x6d> <== ALWAYS TAKEN attr.mq_maxmsg = 10; attr.mq_msgsize = 16; } else { if ( attr_ptr->mq_maxmsg <= 0 ){ 1137a0: 83 7e 04 00 cmpl $0x0,0x4(%esi) 1137a4: 7e 06 jle 1137ac <_POSIX_Message_queue_Create_support+0x48> _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EINVAL ); } if ( attr_ptr->mq_msgsize <= 0 ){ 1137a6: 83 7e 08 00 cmpl $0x0,0x8(%esi) 1137aa: 7f 12 jg 1137be <_POSIX_Message_queue_Create_support+0x5a> _Thread_Enable_dispatch(); 1137ac: e8 ec d9 ff ff call 11119d <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EINVAL ); 1137b1: e8 a2 33 00 00 call 116b58 <__errno> 1137b6: c7 00 16 00 00 00 movl $0x16,(%eax) 1137bc: eb 39 jmp 1137f7 <_POSIX_Message_queue_Create_support+0x93> <== ALWAYS TAKEN } attr = *attr_ptr; 1137be: 8d 7d d8 lea -0x28(%ebp),%edi 1137c1: b9 04 00 00 00 mov $0x4,%ecx 1137c6: f3 a5 rep movsl %ds:(%esi),%es:(%edi) 1137c8: 8b 5d dc mov -0x24(%ebp),%ebx 1137cb: 8b 45 e0 mov -0x20(%ebp),%eax 1137ce: 89 45 d4 mov %eax,-0x2c(%ebp) */ RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control *_POSIX_Message_queue_Allocate( void ) { return (POSIX_Message_queue_Control *) 1137d1: 83 ec 0c sub $0xc,%esp 1137d4: 68 94 d1 12 00 push $0x12d194 1137d9: e8 72 cd ff ff call 110550 <_Objects_Allocate> 1137de: 89 c6 mov %eax,%esi } the_mq = _POSIX_Message_queue_Allocate(); if ( !the_mq ) { 1137e0: 83 c4 10 add $0x10,%esp 1137e3: 85 c0 test %eax,%eax 1137e5: 75 18 jne 1137ff <_POSIX_Message_queue_Create_support+0x9b> _Thread_Enable_dispatch(); 1137e7: e8 b1 d9 ff ff call 11119d <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( ENFILE ); 1137ec: e8 67 33 00 00 call 116b58 <__errno> 1137f1: c7 00 17 00 00 00 movl $0x17,(%eax) 1137f7: 83 c8 ff or $0xffffffff,%eax 1137fa: e9 c2 00 00 00 jmp 1138c1 <_POSIX_Message_queue_Create_support+0x15d> <== ALWAYS TAKEN } the_mq->process_shared = pshared; 1137ff: 8b 45 0c mov 0xc(%ebp),%eax 113802: 89 46 10 mov %eax,0x10(%esi) the_mq->named = true; 113805: c6 46 14 01 movb $0x1,0x14(%esi) the_mq->open_count = 1; 113809: c7 46 18 01 00 00 00 movl $0x1,0x18(%esi) the_mq->linked = true; 113810: c6 46 15 01 movb $0x1,0x15(%esi) /* * Make a copy of the user's string for name just in case it was * dynamically constructed. */ name = _Workspace_Allocate(n+1); 113814: 8b 55 d0 mov -0x30(%ebp),%edx 113817: 42 inc %edx 113818: 83 ec 0c sub $0xc,%esp 11381b: 52 push %edx 11381c: 89 55 cc mov %edx,-0x34(%ebp) 11381f: e8 10 ea ff ff call 112234 <_Workspace_Allocate> 113824: 89 c7 mov %eax,%edi if (!name) { 113826: 83 c4 10 add $0x10,%esp 113829: 85 c0 test %eax,%eax 11382b: 8b 55 cc mov -0x34(%ebp),%edx 11382e: 75 1f jne 11384f <_POSIX_Message_queue_Create_support+0xeb> RTEMS_INLINE_ROUTINE void _POSIX_Message_queue_Free ( POSIX_Message_queue_Control *the_mq ) { _Objects_Free( &_POSIX_Message_queue_Information, &the_mq->Object ); 113830: 53 push %ebx 113831: 53 push %ebx 113832: 56 push %esi 113833: 68 94 d1 12 00 push $0x12d194 113838: e8 ff cf ff ff call 11083c <_Objects_Free> _POSIX_Message_queue_Free( the_mq ); _Thread_Enable_dispatch(); 11383d: e8 5b d9 ff ff call 11119d <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( ENOMEM ); 113842: e8 11 33 00 00 call 116b58 <__errno> 113847: c7 00 0c 00 00 00 movl $0xc,(%eax) 11384d: eb 4f jmp 11389e <_POSIX_Message_queue_Create_support+0x13a> <== ALWAYS TAKEN } strncpy( name, name_arg, n+1 ); 11384f: 51 push %ecx 113850: 52 push %edx 113851: ff 75 08 pushl 0x8(%ebp) 113854: 50 push %eax 113855: e8 ea 47 00 00 call 118044 * * Joel: Cite POSIX or OpenGroup on above statement so we can determine * if it is a real requirement. */ the_mq_attr = &the_mq->Message_queue.Attributes; the_mq_attr->discipline = CORE_MESSAGE_QUEUE_DISCIPLINES_FIFO; 11385a: c7 46 5c 00 00 00 00 movl $0x0,0x5c(%esi) if ( !_CORE_message_queue_Initialize( 113861: ff 75 d4 pushl -0x2c(%ebp) 113864: 53 push %ebx 113865: 8d 46 5c lea 0x5c(%esi),%eax 113868: 50 push %eax 113869: 8d 46 1c lea 0x1c(%esi),%eax 11386c: 50 push %eax 11386d: e8 6a 0c 00 00 call 1144dc <_CORE_message_queue_Initialize> 113872: 83 c4 20 add $0x20,%esp 113875: 84 c0 test %al,%al 113877: 75 2d jne 1138a6 <_POSIX_Message_queue_Create_support+0x142> 113879: 50 push %eax 11387a: 50 push %eax 11387b: 56 push %esi 11387c: 68 94 d1 12 00 push $0x12d194 113881: e8 b6 cf ff ff call 11083c <_Objects_Free> attr.mq_maxmsg, attr.mq_msgsize ) ) { _POSIX_Message_queue_Free( the_mq ); _Workspace_Free(name); 113886: 89 3c 24 mov %edi,(%esp) 113889: e8 bf e9 ff ff call 11224d <_Workspace_Free> _Thread_Enable_dispatch(); 11388e: e8 0a d9 ff ff call 11119d <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( ENOSPC ); 113893: e8 c0 32 00 00 call 116b58 <__errno> 113898: c7 00 1c 00 00 00 movl $0x1c,(%eax) 11389e: 83 c8 ff or $0xffffffff,%eax 1138a1: 83 c4 10 add $0x10,%esp 1138a4: eb 1b jmp 1138c1 <_POSIX_Message_queue_Create_support+0x15d> <== ALWAYS TAKEN #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 1138a6: 0f b7 56 08 movzwl 0x8(%esi),%edx 1138aa: a1 b0 d1 12 00 mov 0x12d1b0,%eax 1138af: 89 34 90 mov %esi,(%eax,%edx,4) the_object ); #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) /* ASSERT: information->is_string */ the_object->name.name_p = name; 1138b2: 89 7e 0c mov %edi,0xc(%esi) &_POSIX_Message_queue_Information, &the_mq->Object, name ); *message_queue = the_mq; 1138b5: 8b 45 14 mov 0x14(%ebp),%eax 1138b8: 89 30 mov %esi,(%eax) _Thread_Enable_dispatch(); 1138ba: e8 de d8 ff ff call 11119d <_Thread_Enable_dispatch> 1138bf: 31 c0 xor %eax,%eax return 0; } 1138c1: 8d 65 f4 lea -0xc(%ebp),%esp 1138c4: 5b pop %ebx 1138c5: 5e pop %esi 1138c6: 5f pop %edi 1138c7: c9 leave 1138c8: c3 ret 001138cc <_POSIX_Message_queue_Name_to_id>: */ int _POSIX_Message_queue_Name_to_id( const char *name, Objects_Id *id ) { 1138cc: 55 push %ebp 1138cd: 89 e5 mov %esp,%ebp 1138cf: 53 push %ebx 1138d0: 83 ec 14 sub $0x14,%esp 1138d3: 8b 5d 08 mov 0x8(%ebp),%ebx Objects_Name_or_id_lookup_errors status; Objects_Id the_id; if ( !name ) 1138d6: 85 db test %ebx,%ebx 1138d8: 74 4b je 113925 <_POSIX_Message_queue_Name_to_id+0x59> return EINVAL; if ( !name[0] ) 1138da: 80 3b 00 cmpb $0x0,(%ebx) 1138dd: 74 46 je 113925 <_POSIX_Message_queue_Name_to_id+0x59> return EINVAL; if ( strnlen( name, NAME_MAX ) >= NAME_MAX ) 1138df: 52 push %edx 1138e0: 52 push %edx 1138e1: 68 ff 00 00 00 push $0xff 1138e6: 53 push %ebx 1138e7: e8 d4 47 00 00 call 1180c0 1138ec: 89 c2 mov %eax,%edx 1138ee: 83 c4 10 add $0x10,%esp 1138f1: b8 5b 00 00 00 mov $0x5b,%eax 1138f6: 81 fa fe 00 00 00 cmp $0xfe,%edx 1138fc: 77 2c ja 11392a <_POSIX_Message_queue_Name_to_id+0x5e> return ENAMETOOLONG; status = _Objects_Name_to_id_string( 1138fe: 50 push %eax 1138ff: 8d 45 f4 lea -0xc(%ebp),%eax 113902: 50 push %eax 113903: 53 push %ebx 113904: 68 94 d1 12 00 push $0x12d194 113909: e8 1e 11 00 00 call 114a2c <_Objects_Name_to_id_string> &_POSIX_Message_queue_Information, name, &the_id ); *id = the_id; 11390e: 8b 4d f4 mov -0xc(%ebp),%ecx 113911: 8b 55 0c mov 0xc(%ebp),%edx 113914: 89 0a mov %ecx,(%edx) if ( status == OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL ) 113916: 83 c4 10 add $0x10,%esp 113919: 83 f8 01 cmp $0x1,%eax 11391c: 19 c0 sbb %eax,%eax 11391e: f7 d0 not %eax 113920: 83 e0 02 and $0x2,%eax 113923: eb 05 jmp 11392a <_POSIX_Message_queue_Name_to_id+0x5e> <== ALWAYS TAKEN 113925: b8 16 00 00 00 mov $0x16,%eax return 0; return ENOENT; } 11392a: 8b 5d fc mov -0x4(%ebp),%ebx 11392d: c9 leave 11392e: c3 ret 0010def4 <_POSIX_Message_queue_Receive_support>: size_t msg_len, unsigned int *msg_prio, bool wait, Watchdog_Interval timeout ) { 10def4: 55 push %ebp 10def5: 89 e5 mov %esp,%ebp 10def7: 57 push %edi 10def8: 56 push %esi 10def9: 53 push %ebx 10defa: 83 ec 30 sub $0x30,%esp 10defd: 8b 75 08 mov 0x8(%ebp),%esi 10df00: 8b 5d 14 mov 0x14(%ebp),%ebx 10df03: 8a 55 18 mov 0x18(%ebp),%dl RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control_fd *_POSIX_Message_queue_Get_fd ( mqd_t id, Objects_Locations *location ) { return (POSIX_Message_queue_Control_fd *) _Objects_Get( 10df06: 8d 45 e4 lea -0x1c(%ebp),%eax 10df09: 50 push %eax 10df0a: 56 push %esi 10df0b: 68 20 d3 12 00 push $0x12d320 10df10: 88 55 d4 mov %dl,-0x2c(%ebp) 10df13: e8 4c 2a 00 00 call 110964 <_Objects_Get> Objects_Locations location; size_t length_out; bool do_wait; the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { 10df18: 83 c4 10 add $0x10,%esp 10df1b: 83 7d e4 00 cmpl $0x0,-0x1c(%ebp) 10df1f: 8a 55 d4 mov -0x2c(%ebp),%dl 10df22: 0f 85 af 00 00 00 jne 10dfd7 <_POSIX_Message_queue_Receive_support+0xe3> case OBJECTS_LOCAL: if ( (the_mq_fd->oflag & O_ACCMODE) == O_WRONLY ) { 10df28: 8b 78 14 mov 0x14(%eax),%edi 10df2b: 89 f9 mov %edi,%ecx 10df2d: 83 e1 03 and $0x3,%ecx 10df30: 49 dec %ecx 10df31: 75 0a jne 10df3d <_POSIX_Message_queue_Receive_support+0x49> _Thread_Enable_dispatch(); 10df33: e8 65 32 00 00 call 11119d <_Thread_Enable_dispatch> 10df38: e9 9a 00 00 00 jmp 10dfd7 <_POSIX_Message_queue_Receive_support+0xe3> <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EBADF ); } the_mq = the_mq_fd->Queue; 10df3d: 8b 48 10 mov 0x10(%eax),%ecx if ( msg_len < the_mq->Message_queue.maximum_message_size ) { 10df40: 8b 45 10 mov 0x10(%ebp),%eax 10df43: 3b 41 68 cmp 0x68(%ecx),%eax 10df46: 73 15 jae 10df5d <_POSIX_Message_queue_Receive_support+0x69> _Thread_Enable_dispatch(); 10df48: e8 50 32 00 00 call 11119d <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EMSGSIZE ); 10df4d: e8 06 8c 00 00 call 116b58 <__errno> 10df52: c7 00 7a 00 00 00 movl $0x7a,(%eax) 10df58: e9 85 00 00 00 jmp 10dfe2 <_POSIX_Message_queue_Receive_support+0xee> <== ALWAYS TAKEN length_out = -1; /* * A timed receive with a bad time will do a poll regardless. */ if ( wait ) 10df5d: 31 c0 xor %eax,%eax 10df5f: 84 d2 test %dl,%dl 10df61: 74 0b je 10df6e <_POSIX_Message_queue_Receive_support+0x7a> <== ALWAYS TAKEN do_wait = (the_mq_fd->oflag & O_NONBLOCK) ? false : true; 10df63: 89 f8 mov %edi,%eax 10df65: c1 e8 0e shr $0xe,%eax 10df68: 83 f0 01 xor $0x1,%eax 10df6b: 83 e0 01 and $0x1,%eax /* * Now if something goes wrong, we return a "length" of -1 * to indicate an error. */ length_out = -1; 10df6e: c7 45 e0 ff ff ff ff movl $0xffffffff,-0x20(%ebp) do_wait = wait; /* * Now perform the actual message receive */ _CORE_message_queue_Seize( 10df75: 52 push %edx 10df76: 52 push %edx 10df77: ff 75 1c pushl 0x1c(%ebp) 10df7a: 0f b6 c0 movzbl %al,%eax 10df7d: 50 push %eax 10df7e: 8d 45 e0 lea -0x20(%ebp),%eax 10df81: 50 push %eax 10df82: ff 75 0c pushl 0xc(%ebp) 10df85: 56 push %esi 10df86: 83 c1 1c add $0x1c,%ecx 10df89: 51 push %ecx 10df8a: e8 09 1c 00 00 call 10fb98 <_CORE_message_queue_Seize> &length_out, do_wait, timeout ); _Thread_Enable_dispatch(); 10df8f: 83 c4 20 add $0x20,%esp 10df92: e8 06 32 00 00 call 11119d <_Thread_Enable_dispatch> *msg_prio = _POSIX_Message_queue_Priority_from_core(_Thread_Executing->Wait.count); 10df97: a1 e8 ce 12 00 mov 0x12cee8,%eax do_wait, timeout ); _Thread_Enable_dispatch(); *msg_prio = 10df9c: 8b 50 24 mov 0x24(%eax),%edx 10df9f: c1 fa 1f sar $0x1f,%edx 10dfa2: 8b 48 24 mov 0x24(%eax),%ecx 10dfa5: 31 d1 xor %edx,%ecx 10dfa7: 89 0b mov %ecx,(%ebx) 10dfa9: 29 13 sub %edx,(%ebx) _POSIX_Message_queue_Priority_from_core(_Thread_Executing->Wait.count); if ( !_Thread_Executing->Wait.return_code ) 10dfab: 83 78 34 00 cmpl $0x0,0x34(%eax) 10dfaf: 75 05 jne 10dfb6 <_POSIX_Message_queue_Receive_support+0xc2> return length_out; 10dfb1: 8b 45 e0 mov -0x20(%ebp),%eax 10dfb4: eb 2f jmp 10dfe5 <_POSIX_Message_queue_Receive_support+0xf1> <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( 10dfb6: e8 9d 8b 00 00 call 116b58 <__errno> 10dfbb: 89 c3 mov %eax,%ebx 10dfbd: 83 ec 0c sub $0xc,%esp 10dfc0: a1 e8 ce 12 00 mov 0x12cee8,%eax 10dfc5: ff 70 34 pushl 0x34(%eax) 10dfc8: e8 ff 01 00 00 call 10e1cc <_POSIX_Message_queue_Translate_core_message_queue_return_code> 10dfcd: 89 03 mov %eax,(%ebx) 10dfcf: 83 c8 ff or $0xffffffff,%eax 10dfd2: 83 c4 10 add $0x10,%esp 10dfd5: eb 0e jmp 10dfe5 <_POSIX_Message_queue_Receive_support+0xf1> <== ALWAYS TAKEN #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); 10dfd7: e8 7c 8b 00 00 call 116b58 <__errno> 10dfdc: c7 00 09 00 00 00 movl $0x9,(%eax) 10dfe2: 83 c8 ff or $0xffffffff,%eax } 10dfe5: 8d 65 f4 lea -0xc(%ebp),%esp 10dfe8: 5b pop %ebx 10dfe9: 5e pop %esi 10dfea: 5f pop %edi 10dfeb: c9 leave 10dfec: c3 ret 0010e010 <_POSIX_Message_queue_Send_support>: size_t msg_len, uint32_t msg_prio, bool wait, Watchdog_Interval timeout ) { 10e010: 55 push %ebp 10e011: 89 e5 mov %esp,%ebp 10e013: 57 push %edi 10e014: 56 push %esi 10e015: 53 push %ebx 10e016: 83 ec 2c sub $0x2c,%esp 10e019: 8b 5d 08 mov 0x8(%ebp),%ebx 10e01c: 8b 75 14 mov 0x14(%ebp),%esi 10e01f: 8a 55 18 mov 0x18(%ebp),%dl /* * Validate the priority. * XXX - Do not validate msg_prio is not less than 0. */ if ( msg_prio > MQ_PRIO_MAX ) 10e022: 83 fe 20 cmp $0x20,%esi 10e025: 76 10 jbe 10e037 <_POSIX_Message_queue_Send_support+0x27> rtems_set_errno_and_return_minus_one( EINVAL ); 10e027: e8 2c 8b 00 00 call 116b58 <__errno> 10e02c: c7 00 16 00 00 00 movl $0x16,(%eax) 10e032: e9 a3 00 00 00 jmp 10e0da <_POSIX_Message_queue_Send_support+0xca> <== ALWAYS TAKEN 10e037: 50 push %eax 10e038: 8d 45 e4 lea -0x1c(%ebp),%eax 10e03b: 50 push %eax 10e03c: 53 push %ebx 10e03d: 68 20 d3 12 00 push $0x12d320 10e042: 88 55 d4 mov %dl,-0x2c(%ebp) 10e045: e8 1a 29 00 00 call 110964 <_Objects_Get> the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { 10e04a: 83 c4 10 add $0x10,%esp 10e04d: 83 7d e4 00 cmpl $0x0,-0x1c(%ebp) 10e051: 8a 55 d4 mov -0x2c(%ebp),%dl 10e054: 75 79 jne 10e0cf <_POSIX_Message_queue_Send_support+0xbf> case OBJECTS_LOCAL: if ( (the_mq_fd->oflag & O_ACCMODE) == O_RDONLY ) { 10e056: 8b 78 14 mov 0x14(%eax),%edi 10e059: f7 c7 03 00 00 00 test $0x3,%edi 10e05f: 75 07 jne 10e068 <_POSIX_Message_queue_Send_support+0x58> _Thread_Enable_dispatch(); 10e061: e8 37 31 00 00 call 11119d <_Thread_Enable_dispatch> 10e066: eb 67 jmp 10e0cf <_POSIX_Message_queue_Send_support+0xbf> <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EBADF ); } the_mq = the_mq_fd->Queue; 10e068: 8b 48 10 mov 0x10(%eax),%ecx /* * A timed receive with a bad time will do a poll regardless. */ if ( wait ) 10e06b: 31 c0 xor %eax,%eax 10e06d: 84 d2 test %dl,%dl 10e06f: 74 0b je 10e07c <_POSIX_Message_queue_Send_support+0x6c> do_wait = (the_mq_fd->oflag & O_NONBLOCK) ? false : true; 10e071: 89 f8 mov %edi,%eax 10e073: c1 e8 0e shr $0xe,%eax 10e076: 83 f0 01 xor $0x1,%eax 10e079: 83 e0 01 and $0x1,%eax do_wait = wait; /* * Now perform the actual message receive */ msg_status = _CORE_message_queue_Submit( 10e07c: ff 75 1c pushl 0x1c(%ebp) 10e07f: 0f b6 c0 movzbl %al,%eax 10e082: 50 push %eax 10e083: f7 de neg %esi 10e085: 56 push %esi 10e086: 6a 00 push $0x0 10e088: 53 push %ebx 10e089: ff 75 10 pushl 0x10(%ebp) 10e08c: ff 75 0c pushl 0xc(%ebp) 10e08f: 83 c1 1c add $0x1c,%ecx 10e092: 51 push %ecx 10e093: e8 24 1c 00 00 call 10fcbc <_CORE_message_queue_Submit> 10e098: 89 c3 mov %eax,%ebx _POSIX_Message_queue_Priority_to_core( msg_prio ), do_wait, timeout /* no timeout */ ); _Thread_Enable_dispatch(); 10e09a: 83 c4 20 add $0x20,%esp 10e09d: e8 fb 30 00 00 call 11119d <_Thread_Enable_dispatch> * after it wakes up. The returned status is correct for * non-blocking operations but if we blocked, then we need * to look at the status in our TCB. */ if ( msg_status == CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT ) 10e0a2: 83 fb 07 cmp $0x7,%ebx 10e0a5: 75 08 jne 10e0af <_POSIX_Message_queue_Send_support+0x9f> msg_status = _Thread_Executing->Wait.return_code; 10e0a7: a1 e8 ce 12 00 mov 0x12cee8,%eax 10e0ac: 8b 58 34 mov 0x34(%eax),%ebx if ( !msg_status ) 10e0af: 31 c0 xor %eax,%eax 10e0b1: 85 db test %ebx,%ebx 10e0b3: 74 28 je 10e0dd <_POSIX_Message_queue_Send_support+0xcd> return msg_status; rtems_set_errno_and_return_minus_one( 10e0b5: e8 9e 8a 00 00 call 116b58 <__errno> 10e0ba: 89 c6 mov %eax,%esi 10e0bc: 83 ec 0c sub $0xc,%esp 10e0bf: 53 push %ebx 10e0c0: e8 07 01 00 00 call 10e1cc <_POSIX_Message_queue_Translate_core_message_queue_return_code> <== ALWAYS TAKEN 10e0c5: 89 06 mov %eax,(%esi) 10e0c7: 83 c8 ff or $0xffffffff,%eax 10e0ca: 83 c4 10 add $0x10,%esp 10e0cd: eb 0e jmp 10e0dd <_POSIX_Message_queue_Send_support+0xcd> <== ALWAYS TAKEN #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); 10e0cf: e8 84 8a 00 00 call 116b58 <__errno> 10e0d4: c7 00 09 00 00 00 movl $0x9,(%eax) 10e0da: 83 c8 ff or $0xffffffff,%eax } 10e0dd: 8d 65 f4 lea -0xc(%ebp),%esp 10e0e0: 5b pop %ebx 10e0e1: 5e pop %esi 10e0e2: 5f pop %edi 10e0e3: c9 leave 10e0e4: c3 ret 0010baa1 <_POSIX_Mutex_Get>: POSIX_Mutex_Control *_POSIX_Mutex_Get ( pthread_mutex_t *mutex, Objects_Locations *location ) { 10baa1: 55 push %ebp 10baa2: 89 e5 mov %esp,%ebp 10baa4: 56 push %esi 10baa5: 53 push %ebx 10baa6: 8b 5d 08 mov 0x8(%ebp),%ebx 10baa9: 8b 75 0c mov 0xc(%ebp),%esi ___POSIX_Mutex_Get_support_error_check( mutex, location ); 10baac: 85 db test %ebx,%ebx 10baae: 74 16 je 10bac6 <_POSIX_Mutex_Get+0x25> ___POSIX_Mutex_Get_support_auto_initialization( mutex, location ); 10bab0: 83 3b ff cmpl $0xffffffff,(%ebx) 10bab3: 75 1b jne 10bad0 <_POSIX_Mutex_Get+0x2f> 10bab5: 51 push %ecx 10bab6: 51 push %ecx 10bab7: 6a 00 push $0x0 10bab9: 53 push %ebx 10baba: e8 6d 00 00 00 call 10bb2c <== ALWAYS TAKEN 10babf: 83 c4 10 add $0x10,%esp 10bac2: 85 c0 test %eax,%eax 10bac4: 74 0a je 10bad0 <_POSIX_Mutex_Get+0x2f> 10bac6: c7 06 01 00 00 00 movl $0x1,(%esi) 10bacc: 31 c0 xor %eax,%eax 10bace: eb 11 jmp 10bae1 <_POSIX_Mutex_Get+0x40> <== ALWAYS TAKEN return (POSIX_Mutex_Control *) 10bad0: 52 push %edx 10bad1: 56 push %esi 10bad2: ff 33 pushl (%ebx) 10bad4: 68 e4 95 12 00 push $0x1295e4 10bad9: e8 7e 26 00 00 call 10e15c <_Objects_Get> 10bade: 83 c4 10 add $0x10,%esp _Objects_Get( &_POSIX_Mutex_Information, (Objects_Id) *mutex, location ); } 10bae1: 8d 65 f8 lea -0x8(%ebp),%esp 10bae4: 5b pop %ebx 10bae5: 5e pop %esi 10bae6: c9 leave 10bae7: c3 ret 0010ba58 <_POSIX_Mutex_Get_interrupt_disable>: POSIX_Mutex_Control *_POSIX_Mutex_Get_interrupt_disable ( pthread_mutex_t *mutex, Objects_Locations *location, ISR_Level *level ) { 10ba58: 55 push %ebp 10ba59: 89 e5 mov %esp,%ebp 10ba5b: 56 push %esi 10ba5c: 53 push %ebx 10ba5d: 8b 5d 08 mov 0x8(%ebp),%ebx 10ba60: 8b 75 0c mov 0xc(%ebp),%esi ___POSIX_Mutex_Get_support_error_check( mutex, location ); 10ba63: 85 db test %ebx,%ebx 10ba65: 74 16 je 10ba7d <_POSIX_Mutex_Get_interrupt_disable+0x25> ___POSIX_Mutex_Get_support_auto_initialization( mutex, location ); 10ba67: 83 3b ff cmpl $0xffffffff,(%ebx) 10ba6a: 75 1b jne 10ba87 <_POSIX_Mutex_Get_interrupt_disable+0x2f> 10ba6c: 50 push %eax 10ba6d: 50 push %eax 10ba6e: 6a 00 push $0x0 10ba70: 53 push %ebx 10ba71: e8 b6 00 00 00 call 10bb2c <== ALWAYS TAKEN 10ba76: 83 c4 10 add $0x10,%esp 10ba79: 85 c0 test %eax,%eax 10ba7b: 74 0a je 10ba87 <_POSIX_Mutex_Get_interrupt_disable+0x2f> 10ba7d: c7 06 01 00 00 00 movl $0x1,(%esi) 10ba83: 31 c0 xor %eax,%eax 10ba85: eb 13 jmp 10ba9a <_POSIX_Mutex_Get_interrupt_disable+0x42> <== ALWAYS TAKEN return (POSIX_Mutex_Control *) _Objects_Get_isr_disable( 10ba87: ff 75 10 pushl 0x10(%ebp) 10ba8a: 56 push %esi 10ba8b: ff 33 pushl (%ebx) 10ba8d: 68 e4 95 12 00 push $0x1295e4 10ba92: e8 75 26 00 00 call 10e10c <_Objects_Get_isr_disable> 10ba97: 83 c4 10 add $0x10,%esp &_POSIX_Mutex_Information, (Objects_Id) *mutex, location, level ); } 10ba9a: 8d 65 f8 lea -0x8(%ebp),%esp 10ba9d: 5b pop %ebx 10ba9e: 5e pop %esi 10ba9f: c9 leave 10baa0: c3 ret 0010bc60 <_POSIX_Mutex_Lock_support>: int _POSIX_Mutex_Lock_support( pthread_mutex_t *mutex, bool blocking, Watchdog_Interval timeout ) { 10bc60: 55 push %ebp 10bc61: 89 e5 mov %esp,%ebp 10bc63: 53 push %ebx 10bc64: 83 ec 18 sub $0x18,%esp 10bc67: 8a 5d 0c mov 0xc(%ebp),%bl register POSIX_Mutex_Control *the_mutex; Objects_Locations location; ISR_Level level; the_mutex = _POSIX_Mutex_Get_interrupt_disable( mutex, &location, &level ); 10bc6a: 8d 45 f0 lea -0x10(%ebp),%eax 10bc6d: 50 push %eax 10bc6e: 8d 45 f4 lea -0xc(%ebp),%eax 10bc71: 50 push %eax 10bc72: ff 75 08 pushl 0x8(%ebp) 10bc75: e8 de fd ff ff call 10ba58 <_POSIX_Mutex_Get_interrupt_disable> <== ALWAYS TAKEN 10bc7a: 89 c2 mov %eax,%edx switch ( location ) { 10bc7c: 83 c4 10 add $0x10,%esp 10bc7f: b8 16 00 00 00 mov $0x16,%eax 10bc84: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 10bc88: 75 2c jne 10bcb6 <_POSIX_Mutex_Lock_support+0x56> case OBJECTS_LOCAL: _CORE_mutex_Seize( 10bc8a: 83 ec 0c sub $0xc,%esp 10bc8d: ff 75 f0 pushl -0x10(%ebp) 10bc90: ff 75 10 pushl 0x10(%ebp) 10bc93: 0f b6 db movzbl %bl,%ebx 10bc96: 53 push %ebx 10bc97: ff 72 08 pushl 0x8(%edx) 10bc9a: 83 c2 14 add $0x14,%edx 10bc9d: 52 push %edx 10bc9e: e8 c6 19 00 00 call 10d669 <_CORE_mutex_Seize> the_mutex->Object.id, blocking, timeout, level ); return _POSIX_Mutex_Translate_core_mutex_return_code( 10bca3: 83 c4 14 add $0x14,%esp 10bca6: a1 f8 92 12 00 mov 0x1292f8,%eax 10bcab: ff 70 34 pushl 0x34(%eax) 10bcae: e8 c1 00 00 00 call 10bd74 <_POSIX_Mutex_Translate_core_mutex_return_code> <== ALWAYS TAKEN 10bcb3: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return EINVAL; } 10bcb6: 8b 5d fc mov -0x4(%ebp),%ebx 10bcb9: c9 leave 10bcba: c3 ret 00111e7c <_POSIX_Semaphore_Create_support>: const char *name, int pshared, unsigned int value, POSIX_Semaphore_Control **the_sem ) { 111e7c: 55 push %ebp 111e7d: 89 e5 mov %esp,%ebp 111e7f: 56 push %esi 111e80: 53 push %ebx 111e81: 8b 5d 08 mov 0x8(%ebp),%ebx POSIX_Semaphore_Control *the_semaphore; CORE_semaphore_Attributes *the_sem_attr; char *name_p = (char *)name; /* Sharing semaphores among processes is not currently supported */ if (pshared != 0) 111e84: 83 7d 0c 00 cmpl $0x0,0xc(%ebp) 111e88: 74 0d je 111e97 <_POSIX_Semaphore_Create_support+0x1b> rtems_set_errno_and_return_minus_one( ENOSYS ); 111e8a: e8 5d 33 00 00 call 1151ec <__errno> 111e8f: c7 00 58 00 00 00 movl $0x58,(%eax) 111e95: eb 26 jmp 111ebd <_POSIX_Semaphore_Create_support+0x41> <== ALWAYS TAKEN if ( name ) { 111e97: 85 db test %ebx,%ebx 111e99: 74 2a je 111ec5 <_POSIX_Semaphore_Create_support+0x49> if ( strnlen( name, NAME_MAX ) >= NAME_MAX ) 111e9b: 52 push %edx 111e9c: 52 push %edx 111e9d: 68 ff 00 00 00 push $0xff 111ea2: 53 push %ebx 111ea3: e8 f8 41 00 00 call 1160a0 111ea8: 83 c4 10 add $0x10,%esp 111eab: 3d fe 00 00 00 cmp $0xfe,%eax 111eb0: 76 13 jbe 111ec5 <_POSIX_Semaphore_Create_support+0x49> rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); 111eb2: e8 35 33 00 00 call 1151ec <__errno> 111eb7: c7 00 5b 00 00 00 movl $0x5b,(%eax) 111ebd: 83 c8 ff or $0xffffffff,%eax 111ec0: e9 9b 00 00 00 jmp 111f60 <_POSIX_Semaphore_Create_support+0xe4> <== ALWAYS TAKEN 111ec5: a1 fc a3 12 00 mov 0x12a3fc,%eax 111eca: 40 inc %eax 111ecb: a3 fc a3 12 00 mov %eax,0x12a3fc * _POSIX_Semaphore_Allocate */ RTEMS_INLINE_ROUTINE POSIX_Semaphore_Control *_POSIX_Semaphore_Allocate( void ) { return (POSIX_Semaphore_Control *) 111ed0: 83 ec 0c sub $0xc,%esp 111ed3: 68 e4 a6 12 00 push $0x12a6e4 111ed8: e8 27 c6 ff ff call 10e504 <_Objects_Allocate> 111edd: 89 c6 mov %eax,%esi _Thread_Disable_dispatch(); the_semaphore = _POSIX_Semaphore_Allocate(); if ( !the_semaphore ) { 111edf: 83 c4 10 add $0x10,%esp 111ee2: 85 c0 test %eax,%eax 111ee4: 75 12 jne 111ef8 <_POSIX_Semaphore_Create_support+0x7c> _Thread_Enable_dispatch(); 111ee6: e8 66 d2 ff ff call 10f151 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( ENOSPC ); 111eeb: e8 fc 32 00 00 call 1151ec <__errno> 111ef0: c7 00 1c 00 00 00 movl $0x1c,(%eax) 111ef6: eb c5 jmp 111ebd <_POSIX_Semaphore_Create_support+0x41> <== ALWAYS TAKEN } the_semaphore->process_shared = pshared; 111ef8: c7 40 10 00 00 00 00 movl $0x0,0x10(%eax) if ( name ) { 111eff: 85 db test %ebx,%ebx 111f01: 74 11 je 111f14 <_POSIX_Semaphore_Create_support+0x98> the_semaphore->named = true; 111f03: c6 40 14 01 movb $0x1,0x14(%eax) the_semaphore->open_count = 1; 111f07: c7 40 18 01 00 00 00 movl $0x1,0x18(%eax) the_semaphore->linked = true; 111f0e: c6 40 15 01 movb $0x1,0x15(%eax) 111f12: eb 0f jmp 111f23 <_POSIX_Semaphore_Create_support+0xa7> <== ALWAYS TAKEN } else { the_semaphore->named = false; 111f14: c6 40 14 00 movb $0x0,0x14(%eax) the_semaphore->open_count = 0; 111f18: c7 40 18 00 00 00 00 movl $0x0,0x18(%eax) the_semaphore->linked = false; 111f1f: c6 40 15 00 movb $0x0,0x15(%eax) * blocking tasks on this semaphore should be. It could somehow * be derived from the current scheduling policy. One * thing is certain, no matter what we decide, it won't be * the same as all other POSIX implementations. :) */ the_sem_attr->discipline = CORE_SEMAPHORE_DISCIPLINES_FIFO; 111f23: c7 46 60 00 00 00 00 movl $0x0,0x60(%esi) /* * This effectively disables limit checking. */ the_sem_attr->maximum_count = 0xFFFFFFFF; 111f2a: c7 46 5c ff ff ff ff movl $0xffffffff,0x5c(%esi) _CORE_semaphore_Initialize( &the_semaphore->Semaphore, the_sem_attr, value ); 111f31: 50 push %eax 111f32: ff 75 10 pushl 0x10(%ebp) 111f35: 8d 46 5c lea 0x5c(%esi),%eax 111f38: 50 push %eax 111f39: 8d 46 1c lea 0x1c(%esi),%eax 111f3c: 50 push %eax 111f3d: e8 1e c1 ff ff call 10e060 <_CORE_semaphore_Initialize> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 111f42: 0f b7 56 08 movzwl 0x8(%esi),%edx 111f46: a1 00 a7 12 00 mov 0x12a700,%eax 111f4b: 89 34 90 mov %esi,(%eax,%edx,4) the_object ); #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) /* ASSERT: information->is_string */ the_object->name.name_p = name; 111f4e: 89 5e 0c mov %ebx,0xc(%esi) &_POSIX_Semaphore_Information, &the_semaphore->Object, name_p ); *the_sem = the_semaphore; 111f51: 8b 45 14 mov 0x14(%ebp),%eax 111f54: 89 30 mov %esi,(%eax) _Thread_Enable_dispatch(); 111f56: e8 f6 d1 ff ff call 10f151 <_Thread_Enable_dispatch> 111f5b: 31 c0 xor %eax,%eax return 0; 111f5d: 83 c4 10 add $0x10,%esp } 111f60: 8d 65 f8 lea -0x8(%ebp),%esp 111f63: 5b pop %ebx 111f64: 5e pop %esi 111f65: c9 leave 111f66: c3 ret 00111fb0 <_POSIX_Semaphore_Name_to_id>: int _POSIX_Semaphore_Name_to_id( const char *name, sem_t *id ) { 111fb0: 55 push %ebp 111fb1: 89 e5 mov %esp,%ebp 111fb3: 83 ec 18 sub $0x18,%esp 111fb6: 8b 45 08 mov 0x8(%ebp),%eax Objects_Name_or_id_lookup_errors status; Objects_Id the_id; if ( !name ) 111fb9: 85 c0 test %eax,%eax 111fbb: 74 2c je 111fe9 <_POSIX_Semaphore_Name_to_id+0x39> return EINVAL; if ( !name[0] ) 111fbd: 80 38 00 cmpb $0x0,(%eax) 111fc0: 74 27 je 111fe9 <_POSIX_Semaphore_Name_to_id+0x39> return EINVAL; status = _Objects_Name_to_id_string( 111fc2: 52 push %edx 111fc3: 8d 55 f4 lea -0xc(%ebp),%edx 111fc6: 52 push %edx 111fc7: 50 push %eax 111fc8: 68 e4 a6 12 00 push $0x12a6e4 111fcd: e8 a6 0c 00 00 call 112c78 <_Objects_Name_to_id_string> &_POSIX_Semaphore_Information, name, &the_id ); *id = the_id; 111fd2: 8b 4d f4 mov -0xc(%ebp),%ecx 111fd5: 8b 55 0c mov 0xc(%ebp),%edx 111fd8: 89 0a mov %ecx,(%edx) if ( status == OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL ) 111fda: 83 c4 10 add $0x10,%esp 111fdd: 83 f8 01 cmp $0x1,%eax 111fe0: 19 c0 sbb %eax,%eax 111fe2: f7 d0 not %eax 111fe4: 83 e0 02 and $0x2,%eax 111fe7: eb 05 jmp 111fee <_POSIX_Semaphore_Name_to_id+0x3e> <== ALWAYS TAKEN 111fe9: b8 16 00 00 00 mov $0x16,%eax return 0; return ENOENT; } 111fee: c9 leave 111fef: c3 ret 00112018 <_POSIX_Semaphore_Wait_support>: int _POSIX_Semaphore_Wait_support( sem_t *sem, bool blocking, Watchdog_Interval timeout ) { 112018: 55 push %ebp 112019: 89 e5 mov %esp,%ebp 11201b: 53 push %ebx 11201c: 83 ec 18 sub $0x18,%esp 11201f: 8a 5d 0c mov 0xc(%ebp),%bl RTEMS_INLINE_ROUTINE POSIX_Semaphore_Control *_POSIX_Semaphore_Get ( sem_t *id, Objects_Locations *location ) { return (POSIX_Semaphore_Control *) 112022: 8d 45 f4 lea -0xc(%ebp),%eax 112025: 50 push %eax 112026: 8b 45 08 mov 0x8(%ebp),%eax 112029: ff 30 pushl (%eax) 11202b: 68 e4 a6 12 00 push $0x12a6e4 112030: e8 e3 c8 ff ff call 10e918 <_Objects_Get> POSIX_Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _POSIX_Semaphore_Get( sem, &location ); switch ( location ) { 112035: 83 c4 10 add $0x10,%esp 112038: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 11203c: 75 4a jne 112088 <_POSIX_Semaphore_Wait_support+0x70> case OBJECTS_LOCAL: _CORE_semaphore_Seize( 11203e: ff 75 10 pushl 0x10(%ebp) 112041: 0f b6 db movzbl %bl,%ebx 112044: 53 push %ebx 112045: ff 70 08 pushl 0x8(%eax) 112048: 83 c0 1c add $0x1c,%eax 11204b: 50 push %eax 11204c: e8 9f 07 00 00 call 1127f0 <_CORE_semaphore_Seize> <== ALWAYS TAKEN &the_semaphore->Semaphore, the_semaphore->Object.id, blocking, timeout ); _Thread_Enable_dispatch(); 112051: e8 fb d0 ff ff call 10f151 <_Thread_Enable_dispatch> if ( !_Thread_Executing->Wait.return_code ) 112056: 83 c4 10 add $0x10,%esp 112059: 31 c0 xor %eax,%eax 11205b: 8b 15 b8 a4 12 00 mov 0x12a4b8,%edx 112061: 83 7a 34 00 cmpl $0x0,0x34(%edx) 112065: 74 2f je 112096 <_POSIX_Semaphore_Wait_support+0x7e> return 0; rtems_set_errno_and_return_minus_one( 112067: e8 80 31 00 00 call 1151ec <__errno> 11206c: 89 c3 mov %eax,%ebx 11206e: 83 ec 0c sub $0xc,%esp 112071: a1 b8 a4 12 00 mov 0x12a4b8,%eax 112076: ff 70 34 pushl 0x34(%eax) 112079: e8 d2 22 00 00 call 114350 <_POSIX_Semaphore_Translate_core_semaphore_return_code> 11207e: 89 03 mov %eax,(%ebx) 112080: 83 c8 ff or $0xffffffff,%eax 112083: 83 c4 10 add $0x10,%esp 112086: eb 0e jmp 112096 <_POSIX_Semaphore_Wait_support+0x7e> <== ALWAYS TAKEN #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 112088: e8 5f 31 00 00 call 1151ec <__errno> 11208d: c7 00 16 00 00 00 movl $0x16,(%eax) 112093: 83 c8 ff or $0xffffffff,%eax } 112096: 8b 5d fc mov -0x4(%ebp),%ebx 112099: c9 leave 11209a: c3 ret 0010e39c <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch>: #include void _POSIX_Thread_Evaluate_cancellation_and_enable_dispatch( Thread_Control *the_thread ) { 10e39c: 55 push %ebp 10e39d: 89 e5 mov %esp,%ebp 10e39f: 83 ec 08 sub $0x8,%esp 10e3a2: 8b 55 08 mov 0x8(%ebp),%edx POSIX_API_Control *thread_support; thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ]; 10e3a5: 8b 82 f8 00 00 00 mov 0xf8(%edx),%eax if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && 10e3ab: 83 b8 cc 00 00 00 00 cmpl $0x0,0xcc(%eax) 10e3b2: 75 2c jne 10e3e0 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x44> <== ALWAYS TAKEN thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS && 10e3b4: 83 b8 d0 00 00 00 01 cmpl $0x1,0xd0(%eax) 10e3bb: 75 23 jne 10e3e0 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x44> thread_support->cancelation_requested ) { 10e3bd: 83 b8 d4 00 00 00 00 cmpl $0x0,0xd4(%eax) 10e3c4: 74 1a je 10e3e0 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x44> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 10e3c6: a1 e4 51 12 00 mov 0x1251e4,%eax 10e3cb: 48 dec %eax 10e3cc: a3 e4 51 12 00 mov %eax,0x1251e4 _Thread_Unnest_dispatch(); _POSIX_Thread_Exit( the_thread, PTHREAD_CANCELED ); 10e3d1: 50 push %eax 10e3d2: 50 push %eax 10e3d3: 6a ff push $0xffffffff 10e3d5: 52 push %edx 10e3d6: e8 bd 05 00 00 call 10e998 <_POSIX_Thread_Exit> { POSIX_API_Control *thread_support; thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ]; if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && 10e3db: 83 c4 10 add $0x10,%esp _Thread_Unnest_dispatch(); _POSIX_Thread_Exit( the_thread, PTHREAD_CANCELED ); } else _Thread_Enable_dispatch(); } 10e3de: c9 leave 10e3df: c3 ret 10e3e0: c9 leave thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS && thread_support->cancelation_requested ) { _Thread_Unnest_dispatch(); _POSIX_Thread_Exit( the_thread, PTHREAD_CANCELED ); } else _Thread_Enable_dispatch(); 10e3e1: e9 b7 db ff ff jmp 10bf9d <_Thread_Enable_dispatch> 0010f36c <_POSIX_Thread_Translate_sched_param>: int policy, struct sched_param *param, Thread_CPU_budget_algorithms *budget_algorithm, Thread_CPU_budget_algorithm_callout *budget_callout ) { 10f36c: 55 push %ebp 10f36d: 89 e5 mov %esp,%ebp 10f36f: 57 push %edi 10f370: 56 push %esi 10f371: 53 push %ebx 10f372: 83 ec 18 sub $0x18,%esp 10f375: 8b 7d 08 mov 0x8(%ebp),%edi 10f378: 8b 5d 0c mov 0xc(%ebp),%ebx 10f37b: 8b 75 10 mov 0x10(%ebp),%esi if ( !_POSIX_Priority_Is_valid( param->sched_priority ) ) 10f37e: ff 33 pushl (%ebx) 10f380: e8 c7 ff ff ff call 10f34c <_POSIX_Priority_Is_valid> <== ALWAYS TAKEN 10f385: 83 c4 10 add $0x10,%esp 10f388: 84 c0 test %al,%al 10f38a: 0f 84 97 00 00 00 je 10f427 <_POSIX_Thread_Translate_sched_param+0xbb> <== ALWAYS TAKEN return EINVAL; *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; 10f390: c7 06 00 00 00 00 movl $0x0,(%esi) *budget_callout = NULL; 10f396: 8b 45 14 mov 0x14(%ebp),%eax 10f399: c7 00 00 00 00 00 movl $0x0,(%eax) if ( policy == SCHED_OTHER ) { 10f39f: 85 ff test %edi,%edi 10f3a1: 75 08 jne 10f3ab <_POSIX_Thread_Translate_sched_param+0x3f> *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; 10f3a3: c7 06 01 00 00 00 movl $0x1,(%esi) 10f3a9: eb 18 jmp 10f3c3 <_POSIX_Thread_Translate_sched_param+0x57> <== ALWAYS TAKEN return 0; } if ( policy == SCHED_FIFO ) { 10f3ab: 83 ff 01 cmp $0x1,%edi 10f3ae: 75 08 jne 10f3b8 <_POSIX_Thread_Translate_sched_param+0x4c> *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; 10f3b0: c7 06 00 00 00 00 movl $0x0,(%esi) 10f3b6: eb 0b jmp 10f3c3 <_POSIX_Thread_Translate_sched_param+0x57> <== ALWAYS TAKEN return 0; } if ( policy == SCHED_RR ) { 10f3b8: 83 ff 02 cmp $0x2,%edi 10f3bb: 75 0a jne 10f3c7 <_POSIX_Thread_Translate_sched_param+0x5b> *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE; 10f3bd: c7 06 02 00 00 00 movl $0x2,(%esi) 10f3c3: 31 c0 xor %eax,%eax return 0; 10f3c5: eb 65 jmp 10f42c <_POSIX_Thread_Translate_sched_param+0xc0> <== ALWAYS TAKEN } if ( policy == SCHED_SPORADIC ) { 10f3c7: 83 ff 03 cmp $0x3,%edi 10f3ca: 75 5b jne 10f427 <_POSIX_Thread_Translate_sched_param+0xbb> if ( (param->ss_replenish_period.tv_sec == 0) && 10f3cc: 83 7b 08 00 cmpl $0x0,0x8(%ebx) 10f3d0: 75 06 jne 10f3d8 <_POSIX_Thread_Translate_sched_param+0x6c> (param->ss_replenish_period.tv_nsec == 0) ) 10f3d2: 83 7b 0c 00 cmpl $0x0,0xc(%ebx) 10f3d6: 74 4f je 10f427 <_POSIX_Thread_Translate_sched_param+0xbb> return EINVAL; if ( (param->ss_initial_budget.tv_sec == 0) && 10f3d8: 83 7b 10 00 cmpl $0x0,0x10(%ebx) 10f3dc: 75 06 jne 10f3e4 <_POSIX_Thread_Translate_sched_param+0x78> (param->ss_initial_budget.tv_nsec == 0) ) 10f3de: 83 7b 14 00 cmpl $0x0,0x14(%ebx) 10f3e2: 74 43 je 10f427 <_POSIX_Thread_Translate_sched_param+0xbb> return EINVAL; if ( _Timespec_To_ticks( ¶m->ss_replenish_period ) < 10f3e4: 83 ec 0c sub $0xc,%esp 10f3e7: 8d 43 08 lea 0x8(%ebx),%eax 10f3ea: 50 push %eax 10f3eb: e8 78 e2 ff ff call 10d668 <_Timespec_To_ticks> 10f3f0: 89 c7 mov %eax,%edi 10f3f2: 8d 43 10 lea 0x10(%ebx),%eax 10f3f5: 89 04 24 mov %eax,(%esp) 10f3f8: e8 6b e2 ff ff call 10d668 <_Timespec_To_ticks> 10f3fd: 83 c4 10 add $0x10,%esp 10f400: 39 c7 cmp %eax,%edi 10f402: 72 23 jb 10f427 <_POSIX_Thread_Translate_sched_param+0xbb> _Timespec_To_ticks( ¶m->ss_initial_budget ) ) return EINVAL; if ( !_POSIX_Priority_Is_valid( param->ss_low_priority ) ) 10f404: 83 ec 0c sub $0xc,%esp 10f407: ff 73 04 pushl 0x4(%ebx) 10f40a: e8 3d ff ff ff call 10f34c <_POSIX_Priority_Is_valid> <== ALWAYS TAKEN 10f40f: 83 c4 10 add $0x10,%esp 10f412: 84 c0 test %al,%al 10f414: 74 11 je 10f427 <_POSIX_Thread_Translate_sched_param+0xbb> return EINVAL; *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_CALLOUT; 10f416: c7 06 03 00 00 00 movl $0x3,(%esi) *budget_callout = _POSIX_Threads_Sporadic_budget_callout; 10f41c: 8b 45 14 mov 0x14(%ebp),%eax 10f41f: c7 00 1b a5 10 00 movl $0x10a51b,(%eax) 10f425: eb 9c jmp 10f3c3 <_POSIX_Thread_Translate_sched_param+0x57> <== ALWAYS TAKEN return 0; 10f427: b8 16 00 00 00 mov $0x16,%eax } return EINVAL; } 10f42c: 8d 65 f4 lea -0xc(%ebp),%esp 10f42f: 5b pop %ebx 10f430: 5e pop %esi 10f431: 5f pop %edi 10f432: c9 leave 10f433: c3 ret 0010e3de <_POSIX_Threads_Create_extension>: bool _POSIX_Threads_Create_extension( Thread_Control *executing __attribute__((unused)), Thread_Control *created ) { 10e3de: 55 push %ebp 10e3df: 89 e5 mov %esp,%ebp 10e3e1: 57 push %edi 10e3e2: 56 push %esi 10e3e3: 53 push %ebx 10e3e4: 83 ec 28 sub $0x28,%esp 10e3e7: 8b 55 0c mov 0xc(%ebp),%edx POSIX_API_Control *api; POSIX_API_Control *executing_api; api = _Workspace_Allocate( sizeof( POSIX_API_Control ) ); 10e3ea: 68 e4 00 00 00 push $0xe4 10e3ef: 89 55 e4 mov %edx,-0x1c(%ebp) 10e3f2: e8 cd e7 ff ff call 10cbc4 <_Workspace_Allocate> <== ALWAYS TAKEN 10e3f7: 89 c3 mov %eax,%ebx if ( !api ) 10e3f9: 83 c4 10 add $0x10,%esp 10e3fc: 31 c0 xor %eax,%eax 10e3fe: 85 db test %ebx,%ebx 10e400: 8b 55 e4 mov -0x1c(%ebp),%edx 10e403: 0f 84 fa 00 00 00 je 10e503 <_POSIX_Threads_Create_extension+0x125> return false; created->API_Extensions[ THREAD_API_POSIX ] = api; 10e409: 89 9a f8 00 00 00 mov %ebx,0xf8(%edx) /* XXX check all fields are touched */ api->Attributes = _POSIX_Threads_Default_attributes; 10e40f: be 14 ee 11 00 mov $0x11ee14,%esi 10e414: b9 0e 00 00 00 mov $0xe,%ecx 10e419: 89 df mov %ebx,%edi 10e41b: f3 a5 rep movsl %ds:(%esi),%es:(%edi) api->detachstate = _POSIX_Threads_Default_attributes.detachstate; 10e41d: c7 43 38 01 00 00 00 movl $0x1,0x38(%ebx) api->schedpolicy = _POSIX_Threads_Default_attributes.schedpolicy; 10e424: c7 43 7c 01 00 00 00 movl $0x1,0x7c(%ebx) api->schedparam = _POSIX_Threads_Default_attributes.schedparam; 10e42b: be 2c ee 11 00 mov $0x11ee2c,%esi 10e430: 8d bb 80 00 00 00 lea 0x80(%ebx),%edi 10e436: b1 06 mov $0x6,%cl 10e438: f3 a5 rep movsl %ds:(%esi),%es:(%edi) api->schedparam.sched_priority = 10e43a: 0f b6 05 f4 01 12 00 movzbl 0x1201f4,%eax 10e441: 2b 42 14 sub 0x14(%edx),%eax 10e444: 89 83 80 00 00 00 mov %eax,0x80(%ebx) _POSIX_Priority_From_core( created->current_priority ); /* * POSIX 1003.1 1996, 18.2.2.2 */ api->cancelation_requested = 0; 10e44a: c7 83 d4 00 00 00 00 movl $0x0,0xd4(%ebx) 10e451: 00 00 00 api->cancelability_state = PTHREAD_CANCEL_ENABLE; 10e454: c7 83 cc 00 00 00 00 movl $0x0,0xcc(%ebx) 10e45b: 00 00 00 api->cancelability_type = PTHREAD_CANCEL_DEFERRED; 10e45e: c7 83 d0 00 00 00 00 movl $0x0,0xd0(%ebx) 10e465: 00 00 00 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 10e468: 8d 83 dc 00 00 00 lea 0xdc(%ebx),%eax 10e46e: 89 83 d8 00 00 00 mov %eax,0xd8(%ebx) the_chain->permanent_null = NULL; 10e474: c7 83 dc 00 00 00 00 movl $0x0,0xdc(%ebx) 10e47b: 00 00 00 the_chain->last = _Chain_Head(the_chain); 10e47e: 8d 83 d8 00 00 00 lea 0xd8(%ebx),%eax 10e484: 89 83 e0 00 00 00 mov %eax,0xe0(%ebx) * * The check for class == 1 is debug. Should never really happen. */ /* XXX use signal constants */ api->signals_pending = 0; 10e48a: c7 83 c8 00 00 00 00 movl $0x0,0xc8(%ebx) 10e491: 00 00 00 if ( _Objects_Get_API( created->Object.id ) == OBJECTS_POSIX_API 10e494: 0f b6 42 0b movzbl 0xb(%edx),%eax 10e498: 83 e0 07 and $0x7,%eax 10e49b: 83 f8 03 cmp $0x3,%eax 10e49e: 75 19 jne 10e4b9 <_POSIX_Threads_Create_extension+0xdb> #if defined(RTEMS_DEBUG) && _Objects_Get_class( created->Object.id ) == 1 #endif ) { executing_api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; api->signals_blocked = executing_api->signals_blocked; 10e4a0: a1 a8 42 12 00 mov 0x1242a8,%eax 10e4a5: 8b 80 f8 00 00 00 mov 0xf8(%eax),%eax 10e4ab: 8b 80 c4 00 00 00 mov 0xc4(%eax),%eax 10e4b1: 89 83 c4 00 00 00 mov %eax,0xc4(%ebx) 10e4b7: eb 0a jmp 10e4c3 <_POSIX_Threads_Create_extension+0xe5> <== ALWAYS TAKEN } else { api->signals_blocked = 0xffffffff; 10e4b9: c7 83 c4 00 00 00 ff movl $0xffffffff,0xc4(%ebx) 10e4c0: ff ff ff } _Thread_queue_Initialize( 10e4c3: 6a 00 push $0x0 10e4c5: 68 00 10 00 00 push $0x1000 10e4ca: 6a 00 push $0x0 10e4cc: 8d 43 3c lea 0x3c(%ebx),%eax 10e4cf: 50 push %eax 10e4d0: 89 55 e4 mov %edx,-0x1c(%ebp) 10e4d3: e8 c4 dd ff ff call 10c29c <_Thread_queue_Initialize> THREAD_QUEUE_DISCIPLINE_FIFO, STATES_WAITING_FOR_JOIN_AT_EXIT, 0 ); _Watchdog_Initialize( 10e4d8: 8b 55 e4 mov -0x1c(%ebp),%edx 10e4db: 8b 42 08 mov 0x8(%edx),%eax Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 10e4de: c7 83 a4 00 00 00 00 movl $0x0,0xa4(%ebx) 10e4e5: 00 00 00 the_watchdog->routine = routine; 10e4e8: c7 83 b8 00 00 00 4b movl $0x10e54b,0xb8(%ebx) 10e4ef: e5 10 00 the_watchdog->id = id; 10e4f2: 89 83 bc 00 00 00 mov %eax,0xbc(%ebx) the_watchdog->user_data = user_data; 10e4f8: 89 93 c0 00 00 00 mov %edx,0xc0(%ebx) 10e4fe: b0 01 mov $0x1,%al _POSIX_Threads_Sporadic_budget_TSR, created->Object.id, created ); return true; 10e500: 83 c4 10 add $0x10,%esp } 10e503: 8d 65 f4 lea -0xc(%ebp),%esp 10e506: 5b pop %ebx 10e507: 5e pop %esi 10e508: 5f pop %edi 10e509: c9 leave 10e50a: c3 ret 0010e367 <_POSIX_Threads_Delete_extension>: */ void _POSIX_Threads_Delete_extension( Thread_Control *executing __attribute__((unused)), Thread_Control *deleted ) { 10e367: 55 push %ebp 10e368: 89 e5 mov %esp,%ebp 10e36a: 57 push %edi 10e36b: 56 push %esi 10e36c: 53 push %ebx 10e36d: 83 ec 28 sub $0x28,%esp 10e370: 8b 5d 0c mov 0xc(%ebp),%ebx Thread_Control *the_thread; POSIX_API_Control *api; void **value_ptr; api = deleted->API_Extensions[ THREAD_API_POSIX ]; 10e373: 8b b3 f8 00 00 00 mov 0xf8(%ebx),%esi /* * Run the POSIX cancellation handlers */ _POSIX_Threads_cancel_run( deleted ); 10e379: 53 push %ebx 10e37a: e8 b9 1f 00 00 call 110338 <_POSIX_Threads_cancel_run> /* * Run all the key destructors */ _POSIX_Keys_Run_destructors( deleted ); 10e37f: 89 1c 24 mov %ebx,(%esp) 10e382: e8 0d 20 00 00 call 110394 <_POSIX_Keys_Run_destructors> /* * Wakeup all the tasks which joined with this one */ value_ptr = (void **) deleted->Wait.return_argument; 10e387: 8b 53 28 mov 0x28(%ebx),%edx while ( (the_thread = _Thread_queue_Dequeue( &api->Join_List )) ) 10e38a: 8d 7e 3c lea 0x3c(%esi),%edi 10e38d: 83 c4 10 add $0x10,%esp 10e390: eb 05 jmp 10e397 <_POSIX_Threads_Delete_extension+0x30> <== ALWAYS TAKEN *(void **)the_thread->Wait.return_argument = value_ptr; 10e392: 8b 40 28 mov 0x28(%eax),%eax 10e395: 89 10 mov %edx,(%eax) /* * Wakeup all the tasks which joined with this one */ value_ptr = (void **) deleted->Wait.return_argument; while ( (the_thread = _Thread_queue_Dequeue( &api->Join_List )) ) 10e397: 83 ec 0c sub $0xc,%esp 10e39a: 57 push %edi 10e39b: 89 55 e4 mov %edx,-0x1c(%ebp) 10e39e: e8 dd db ff ff call 10bf80 <_Thread_queue_Dequeue> 10e3a3: 83 c4 10 add $0x10,%esp 10e3a6: 85 c0 test %eax,%eax 10e3a8: 8b 55 e4 mov -0x1c(%ebp),%edx 10e3ab: 75 e5 jne 10e392 <_POSIX_Threads_Delete_extension+0x2b> *(void **)the_thread->Wait.return_argument = value_ptr; if ( api->schedpolicy == SCHED_SPORADIC ) 10e3ad: 83 7e 7c 03 cmpl $0x3,0x7c(%esi) 10e3b1: 75 12 jne 10e3c5 <_POSIX_Threads_Delete_extension+0x5e> (void) _Watchdog_Remove( &api->Sporadic_timer ); 10e3b3: 83 ec 0c sub $0xc,%esp 10e3b6: 8d 86 9c 00 00 00 lea 0x9c(%esi),%eax 10e3bc: 50 push %eax 10e3bd: e8 06 e7 ff ff call 10cac8 <_Watchdog_Remove> 10e3c2: 83 c4 10 add $0x10,%esp deleted->API_Extensions[ THREAD_API_POSIX ] = NULL; 10e3c5: c7 83 f8 00 00 00 00 movl $0x0,0xf8(%ebx) 10e3cc: 00 00 00 (void) _Workspace_Free( api ); 10e3cf: 89 75 08 mov %esi,0x8(%ebp) } 10e3d2: 8d 65 f4 lea -0xc(%ebp),%esp 10e3d5: 5b pop %ebx 10e3d6: 5e pop %esi 10e3d7: 5f pop %edi 10e3d8: c9 leave if ( api->schedpolicy == SCHED_SPORADIC ) (void) _Watchdog_Remove( &api->Sporadic_timer ); deleted->API_Extensions[ THREAD_API_POSIX ] = NULL; (void) _Workspace_Free( api ); 10e3d9: e9 ff e7 ff ff jmp 10cbdd <_Workspace_Free> 0010e344 <_POSIX_Threads_Exitted_extension>: * This method is invoked each time a thread exits. */ void _POSIX_Threads_Exitted_extension( Thread_Control *executing ) { 10e344: 55 push %ebp 10e345: 89 e5 mov %esp,%ebp 10e347: 83 ec 08 sub $0x8,%esp 10e34a: 8b 55 08 mov 0x8(%ebp),%edx /* * If the executing thread was not created with the POSIX API, then this * API do not get to define its exit behavior. */ if ( _Objects_Get_API( executing->Object.id ) == OBJECTS_POSIX_API ) 10e34d: 0f b6 42 0b movzbl 0xb(%edx),%eax 10e351: 83 e0 07 and $0x7,%eax 10e354: 83 f8 03 cmp $0x3,%eax 10e357: 75 0c jne 10e365 <_POSIX_Threads_Exitted_extension+0x21> pthread_exit( executing->Wait.return_argument ); 10e359: 8b 42 28 mov 0x28(%edx),%eax 10e35c: 89 45 08 mov %eax,0x8(%ebp) } 10e35f: c9 leave /* * If the executing thread was not created with the POSIX API, then this * API do not get to define its exit behavior. */ if ( _Objects_Get_API( executing->Object.id ) == OBJECTS_POSIX_API ) pthread_exit( executing->Wait.return_argument ); 10e360: e9 b7 22 00 00 jmp 11061c <== ALWAYS TAKEN } 10e365: c9 leave 10e366: c3 ret 0010a284 <_POSIX_Threads_Initialize_user_threads_body>: * * Output parameters: NONE */ void _POSIX_Threads_Initialize_user_threads_body(void) { 10a284: 55 push %ebp 10a285: 89 e5 mov %esp,%ebp 10a287: 57 push %edi 10a288: 56 push %esi 10a289: 53 push %ebx 10a28a: 83 ec 5c sub $0x5c,%esp uint32_t maximum; posix_initialization_threads_table *user_threads; pthread_t thread_id; pthread_attr_t attr; user_threads = Configuration_POSIX_API.User_initialization_threads_table; 10a28d: 8b 3d 10 12 12 00 mov 0x121210,%edi maximum = Configuration_POSIX_API.number_of_initialization_threads; 10a293: 8b 15 0c 12 12 00 mov 0x12120c,%edx if ( !user_threads || maximum == 0 ) 10a299: 85 d2 test %edx,%edx 10a29b: 74 54 je 10a2f1 <_POSIX_Threads_Initialize_user_threads_body+0x6d> <== ALWAYS TAKEN 10a29d: 85 ff test %edi,%edi 10a29f: 74 50 je 10a2f1 <_POSIX_Threads_Initialize_user_threads_body+0x6d> <== ALWAYS TAKEN 10a2a1: 31 db xor %ebx,%ebx for ( index=0 ; index < maximum ; index++ ) { /* * There is no way for these calls to fail in this situation. */ (void) pthread_attr_init( &attr ); 10a2a3: 8d 75 ac lea -0x54(%ebp),%esi 10a2a6: 83 ec 0c sub $0xc,%esp 10a2a9: 56 push %esi 10a2aa: 89 55 a4 mov %edx,-0x5c(%ebp) 10a2ad: e8 82 51 00 00 call 10f434 <== ALWAYS TAKEN (void) pthread_attr_setinheritsched( &attr, PTHREAD_EXPLICIT_SCHED ); 10a2b2: 5a pop %edx 10a2b3: 59 pop %ecx 10a2b4: 6a 02 push $0x2 10a2b6: 56 push %esi 10a2b7: e8 a0 51 00 00 call 10f45c <== ALWAYS TAKEN (void) pthread_attr_setstacksize(&attr, user_threads[ index ].stack_size); 10a2bc: 59 pop %ecx 10a2bd: 58 pop %eax 10a2be: ff 74 df 04 pushl 0x4(%edi,%ebx,8) 10a2c2: 56 push %esi 10a2c3: e8 c4 51 00 00 call 10f48c <== ALWAYS TAKEN status = pthread_create( 10a2c8: 6a 00 push $0x0 10a2ca: ff 34 df pushl (%edi,%ebx,8) 10a2cd: 56 push %esi 10a2ce: 8d 45 e4 lea -0x1c(%ebp),%eax 10a2d1: 50 push %eax 10a2d2: e8 f5 fc ff ff call 109fcc <== ALWAYS TAKEN &thread_id, &attr, user_threads[ index ].thread_entry, NULL ); if ( status ) 10a2d7: 83 c4 20 add $0x20,%esp 10a2da: 85 c0 test %eax,%eax 10a2dc: 8b 55 a4 mov -0x5c(%ebp),%edx 10a2df: 74 0b je 10a2ec <_POSIX_Threads_Initialize_user_threads_body+0x68> _Internal_error_Occurred( INTERNAL_ERROR_POSIX_API, true, status ); 10a2e1: 52 push %edx 10a2e2: 50 push %eax 10a2e3: 6a 01 push $0x1 10a2e5: 6a 02 push $0x2 10a2e7: e8 fc 1a 00 00 call 10bde8 <_Internal_error_Occurred> * * Setting the attributes explicitly is critical, since we don't want * to inherit the idle tasks attributes. */ for ( index=0 ; index < maximum ; index++ ) { 10a2ec: 43 inc %ebx 10a2ed: 39 d3 cmp %edx,%ebx 10a2ef: 72 b5 jb 10a2a6 <_POSIX_Threads_Initialize_user_threads_body+0x22> <== ALWAYS TAKEN NULL ); if ( status ) _Internal_error_Occurred( INTERNAL_ERROR_POSIX_API, true, status ); } } 10a2f1: 8d 65 f4 lea -0xc(%ebp),%esp 10a2f4: 5b pop %ebx 10a2f5: 5e pop %esi 10a2f6: 5f pop %edi 10a2f7: c9 leave 10a2f8: c3 ret 0010e54b <_POSIX_Threads_Sporadic_budget_TSR>: */ void _POSIX_Threads_Sporadic_budget_TSR( Objects_Id id __attribute__((unused)), void *argument ) { 10e54b: 55 push %ebp 10e54c: 89 e5 mov %esp,%ebp 10e54e: 56 push %esi 10e54f: 53 push %ebx 10e550: 8b 5d 0c mov 0xc(%ebp),%ebx Thread_Control *the_thread; POSIX_API_Control *api; the_thread = argument; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 10e553: 8b b3 f8 00 00 00 mov 0xf8(%ebx),%esi /* ticks is guaranteed to be at least one */ ticks = _Timespec_To_ticks( &api->schedparam.ss_initial_budget ); 10e559: 83 ec 0c sub $0xc,%esp 10e55c: 8d 86 90 00 00 00 lea 0x90(%esi),%eax 10e562: 50 push %eax 10e563: e8 00 10 00 00 call 10f568 <_Timespec_To_ticks> the_thread->cpu_time_budget = ticks; 10e568: 89 43 78 mov %eax,0x78(%ebx) 10e56b: 0f b6 05 f4 01 12 00 movzbl 0x1201f4,%eax 10e572: 2b 86 98 00 00 00 sub 0x98(%esi),%eax new_priority = _POSIX_Priority_To_core( api->ss_high_priority ); the_thread->real_priority = new_priority; 10e578: 89 43 18 mov %eax,0x18(%ebx) */ #if 0 printk( "TSR %d %d %d\n", the_thread->resource_count, the_thread->current_priority, new_priority ); #endif if ( the_thread->resource_count == 0 ) { 10e57b: 83 c4 10 add $0x10,%esp 10e57e: 83 7b 1c 00 cmpl $0x0,0x1c(%ebx) 10e582: 75 12 jne 10e596 <_POSIX_Threads_Sporadic_budget_TSR+0x4b> <== ALWAYS TAKEN /* * If this would make them less important, then do not change it. */ if ( the_thread->current_priority > new_priority ) { 10e584: 39 43 14 cmp %eax,0x14(%ebx) 10e587: 76 0d jbe 10e596 <_POSIX_Threads_Sporadic_budget_TSR+0x4b> _Thread_Change_priority( the_thread, new_priority, true ); 10e589: 52 push %edx 10e58a: 6a 01 push $0x1 10e58c: 50 push %eax 10e58d: 53 push %ebx 10e58e: e8 c1 d1 ff ff call 10b754 <_Thread_Change_priority> 10e593: 83 c4 10 add $0x10,%esp #endif } } /* ticks is guaranteed to be at least one */ ticks = _Timespec_To_ticks( &api->schedparam.ss_replenish_period ); 10e596: 83 ec 0c sub $0xc,%esp 10e599: 8d 86 88 00 00 00 lea 0x88(%esi),%eax 10e59f: 50 push %eax 10e5a0: e8 c3 0f 00 00 call 10f568 <_Timespec_To_ticks> Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 10e5a5: 89 86 a8 00 00 00 mov %eax,0xa8(%esi) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 10e5ab: 83 c4 10 add $0x10,%esp 10e5ae: 81 c6 9c 00 00 00 add $0x9c,%esi 10e5b4: 89 75 0c mov %esi,0xc(%ebp) 10e5b7: c7 45 08 c8 42 12 00 movl $0x1242c8,0x8(%ebp) _Watchdog_Insert_ticks( &api->Sporadic_timer, ticks ); } 10e5be: 8d 65 f8 lea -0x8(%ebp),%esp 10e5c1: 5b pop %ebx 10e5c2: 5e pop %esi 10e5c3: c9 leave 10e5c4: e9 e7 e3 ff ff jmp 10c9b0 <_Watchdog_Insert> 0010e50b <_POSIX_Threads_Sporadic_budget_callout>: * _POSIX_Threads_Sporadic_budget_callout */ void _POSIX_Threads_Sporadic_budget_callout( Thread_Control *the_thread ) { 10e50b: 55 push %ebp 10e50c: 89 e5 mov %esp,%ebp 10e50e: 83 ec 08 sub $0x8,%esp 10e511: 8b 45 08 mov 0x8(%ebp),%eax POSIX_API_Control *api; uint32_t new_priority; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 10e514: 8b 88 f8 00 00 00 mov 0xf8(%eax),%ecx /* * This will prevent the thread from consuming its entire "budget" * while at low priority. */ the_thread->cpu_time_budget = 0xFFFFFFFF; /* XXX should be based on MAX_U32 */ 10e51a: c7 40 78 ff ff ff ff movl $0xffffffff,0x78(%eax) RTEMS_INLINE_ROUTINE Priority_Control _POSIX_Priority_To_core( int priority ) { return (Priority_Control) (POSIX_SCHEDULER_MAXIMUM_PRIORITY - priority + 1); 10e521: 0f b6 15 f4 01 12 00 movzbl 0x1201f4,%edx 10e528: 2b 91 84 00 00 00 sub 0x84(%ecx),%edx new_priority = _POSIX_Priority_To_core( api->schedparam.ss_low_priority ); the_thread->real_priority = new_priority; 10e52e: 89 50 18 mov %edx,0x18(%eax) */ #if 0 printk( "callout %d %d %d\n", the_thread->resource_count, the_thread->current_priority, new_priority ); #endif if ( the_thread->resource_count == 0 ) { 10e531: 83 78 1c 00 cmpl $0x0,0x1c(%eax) 10e535: 75 12 jne 10e549 <_POSIX_Threads_Sporadic_budget_callout+0x3e> <== ALWAYS TAKEN /* * Make sure we are actually lowering it. If they have lowered it * to logically lower than ss_low_priority, then we do not want to * change it. */ if ( the_thread->current_priority < new_priority ) { 10e537: 39 50 14 cmp %edx,0x14(%eax) 10e53a: 73 0d jae 10e549 <_POSIX_Threads_Sporadic_budget_callout+0x3e> _Thread_Change_priority( the_thread, new_priority, true ); 10e53c: 51 push %ecx 10e53d: 6a 01 push $0x1 10e53f: 52 push %edx 10e540: 50 push %eax 10e541: e8 0e d2 ff ff call 10b754 <_Thread_Change_priority> 10e546: 83 c4 10 add $0x10,%esp #if 0 printk( "lower priority\n" ); #endif } } } 10e549: c9 leave 10e54a: c3 ret 00110338 <_POSIX_Threads_cancel_run>: #include void _POSIX_Threads_cancel_run( Thread_Control *the_thread ) { 110338: 55 push %ebp 110339: 89 e5 mov %esp,%ebp 11033b: 57 push %edi 11033c: 56 push %esi 11033d: 53 push %ebx 11033e: 83 ec 0c sub $0xc,%esp POSIX_Cancel_Handler_control *handler; Chain_Control *handler_stack; POSIX_API_Control *thread_support; ISR_Level level; thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ]; 110341: 8b 45 08 mov 0x8(%ebp),%eax 110344: 8b 98 f8 00 00 00 mov 0xf8(%eax),%ebx handler_stack = &thread_support->Cancellation_Handlers; thread_support->cancelability_state = PTHREAD_CANCEL_DISABLE; 11034a: c7 83 cc 00 00 00 01 movl $0x1,0xcc(%ebx) 110351: 00 00 00 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 110354: 8d b3 dc 00 00 00 lea 0xdc(%ebx),%esi while ( !_Chain_Is_empty( handler_stack ) ) { 11035a: eb 26 jmp 110382 <_POSIX_Threads_cancel_run+0x4a> <== ALWAYS TAKEN _ISR_Disable( level ); 11035c: 9c pushf 11035d: fa cli 11035e: 59 pop %ecx handler = (POSIX_Cancel_Handler_control *) 11035f: 8b 7e 04 mov 0x4(%esi),%edi ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 110362: 8b 17 mov (%edi),%edx previous = the_node->previous; 110364: 8b 47 04 mov 0x4(%edi),%eax next->previous = previous; 110367: 89 42 04 mov %eax,0x4(%edx) previous->next = next; 11036a: 89 10 mov %edx,(%eax) _Chain_Tail( handler_stack )->previous; _Chain_Extract_unprotected( &handler->Node ); _ISR_Enable( level ); 11036c: 51 push %ecx 11036d: 9d popf (*handler->routine)( handler->arg ); 11036e: 83 ec 0c sub $0xc,%esp 110371: ff 77 0c pushl 0xc(%edi) 110374: ff 57 08 call *0x8(%edi) _Workspace_Free( handler ); 110377: 89 3c 24 mov %edi,(%esp) 11037a: e8 5e c8 ff ff call 10cbdd <_Workspace_Free> 11037f: 83 c4 10 add $0x10,%esp POSIX_API_Control *thread_support; ISR_Level level; thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ]; handler_stack = &thread_support->Cancellation_Handlers; 110382: 39 b3 d8 00 00 00 cmp %esi,0xd8(%ebx) 110388: 75 d2 jne 11035c <_POSIX_Threads_cancel_run+0x24> (*handler->routine)( handler->arg ); _Workspace_Free( handler ); } } 11038a: 8d 65 f4 lea -0xc(%ebp),%esp 11038d: 5b pop %ebx 11038e: 5e pop %esi 11038f: 5f pop %edi 110390: c9 leave 110391: c3 ret 0010f118 <_POSIX_Timer_Insert_helper>: Watchdog_Interval ticks, Objects_Id id, Watchdog_Service_routine_entry TSR, void *arg ) { 10f118: 55 push %ebp 10f119: 89 e5 mov %esp,%ebp 10f11b: 56 push %esi 10f11c: 53 push %ebx 10f11d: 8b 5d 08 mov 0x8(%ebp),%ebx ISR_Level level; (void) _Watchdog_Remove( timer ); 10f120: 83 ec 0c sub $0xc,%esp 10f123: 53 push %ebx 10f124: e8 53 e3 ff ff call 10d47c <_Watchdog_Remove> _ISR_Disable( level ); 10f129: 9c pushf 10f12a: fa cli 10f12b: 5e pop %esi /* * Check to see if the watchdog has just been inserted by a * higher priority interrupt. If so, abandon this insert. */ if ( timer->state != WATCHDOG_INACTIVE ) { 10f12c: 83 c4 10 add $0x10,%esp 10f12f: 83 7b 08 00 cmpl $0x0,0x8(%ebx) 10f133: 74 06 je 10f13b <_POSIX_Timer_Insert_helper+0x23> _ISR_Enable( level ); 10f135: 56 push %esi 10f136: 9d popf 10f137: 31 c0 xor %eax,%eax return false; 10f139: eb 33 jmp 10f16e <_POSIX_Timer_Insert_helper+0x56> <== ALWAYS TAKEN Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 10f13b: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx) the_watchdog->routine = routine; 10f142: 8b 45 14 mov 0x14(%ebp),%eax 10f145: 89 43 1c mov %eax,0x1c(%ebx) the_watchdog->id = id; 10f148: 8b 45 10 mov 0x10(%ebp),%eax 10f14b: 89 43 20 mov %eax,0x20(%ebx) the_watchdog->user_data = user_data; 10f14e: 8b 45 18 mov 0x18(%ebp),%eax 10f151: 89 43 24 mov %eax,0x24(%ebx) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 10f154: 8b 45 0c mov 0xc(%ebp),%eax 10f157: 89 43 0c mov %eax,0xc(%ebx) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 10f15a: 50 push %eax 10f15b: 50 push %eax 10f15c: 53 push %ebx 10f15d: 68 1c 63 12 00 push $0x12631c 10f162: e8 fd e1 ff ff call 10d364 <_Watchdog_Insert> * OK. Now we now the timer was not rescheduled by an interrupt * so we can atomically initialize it as in use. */ _Watchdog_Initialize( timer, TSR, id, arg ); _Watchdog_Insert_ticks( timer, ticks ); _ISR_Enable( level ); 10f167: 56 push %esi 10f168: 9d popf 10f169: b0 01 mov $0x1,%al return true; 10f16b: 83 c4 10 add $0x10,%esp } 10f16e: 8d 65 f8 lea -0x8(%ebp),%esp 10f171: 5b pop %ebx 10f172: 5e pop %esi 10f173: c9 leave 10f174: c3 ret 0010a03c <_POSIX_Timer_TSR>: * This is the operation that is run when a timer expires */ void _POSIX_Timer_TSR( Objects_Id timer __attribute__((unused)), void *data) { 10a03c: 55 push %ebp 10a03d: 89 e5 mov %esp,%ebp 10a03f: 53 push %ebx 10a040: 83 ec 04 sub $0x4,%esp 10a043: 8b 5d 0c mov 0xc(%ebp),%ebx bool activated; ptimer = (POSIX_Timer_Control *)data; /* Increment the number of expirations. */ ptimer->overrun = ptimer->overrun + 1; 10a046: ff 43 68 incl 0x68(%ebx) /* The timer must be reprogrammed */ if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) || 10a049: 83 7b 54 00 cmpl $0x0,0x54(%ebx) 10a04d: 75 06 jne 10a055 <_POSIX_Timer_TSR+0x19> ( ptimer->timer_data.it_interval.tv_nsec != 0 ) ) { 10a04f: 83 7b 58 00 cmpl $0x0,0x58(%ebx) 10a053: 74 34 je 10a089 <_POSIX_Timer_TSR+0x4d> <== ALWAYS TAKEN activated = _POSIX_Timer_Insert_helper( 10a055: 83 ec 0c sub $0xc,%esp 10a058: 53 push %ebx 10a059: 68 3c a0 10 00 push $0x10a03c 10a05e: ff 73 08 pushl 0x8(%ebx) 10a061: ff 73 64 pushl 0x64(%ebx) 10a064: 8d 43 10 lea 0x10(%ebx),%eax 10a067: 50 push %eax 10a068: e8 ab 50 00 00 call 10f118 <_POSIX_Timer_Insert_helper> ptimer->ticks, ptimer->Object.id, _POSIX_Timer_TSR, ptimer ); if ( !activated ) 10a06d: 83 c4 20 add $0x20,%esp 10a070: 84 c0 test %al,%al 10a072: 74 30 je 10a0a4 <_POSIX_Timer_TSR+0x68> <== ALWAYS TAKEN return; /* Store the time when the timer was started again */ _TOD_Get( &ptimer->time ); 10a074: 83 ec 0c sub $0xc,%esp 10a077: 8d 43 6c lea 0x6c(%ebx),%eax 10a07a: 50 push %eax 10a07b: e8 34 14 00 00 call 10b4b4 <_TOD_Get> /* The state really did not change but just to be safe */ ptimer->state = POSIX_TIMER_STATE_CREATE_RUN; 10a080: c6 43 3c 03 movb $0x3,0x3c(%ebx) /* Increment the number of expirations. */ ptimer->overrun = ptimer->overrun + 1; /* The timer must be reprogrammed */ if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) || 10a084: 83 c4 10 add $0x10,%esp 10a087: eb 04 jmp 10a08d <_POSIX_Timer_TSR+0x51> <== ALWAYS TAKEN /* The state really did not change but just to be safe */ ptimer->state = POSIX_TIMER_STATE_CREATE_RUN; } else { /* Indicates that the timer is stopped */ ptimer->state = POSIX_TIMER_STATE_CREATE_STOP; 10a089: c6 43 3c 04 movb $0x4,0x3c(%ebx) <== NOT EXECUTED /* * The sending of the signal to the process running the handling function * specified for that signal is simulated */ if ( pthread_kill ( ptimer->thread_id, ptimer->inf.sigev_signo ) ) { 10a08d: 50 push %eax 10a08e: 50 push %eax 10a08f: ff 73 44 pushl 0x44(%ebx) 10a092: ff 73 38 pushl 0x38(%ebx) 10a095: e8 7a 4c 00 00 call 10ed14 } /* After the signal handler returns, the count of expirations of the * timer must be set to 0. */ ptimer->overrun = 0; 10a09a: c7 43 68 00 00 00 00 movl $0x0,0x68(%ebx) 10a0a1: 83 c4 10 add $0x10,%esp } 10a0a4: 8b 5d fc mov -0x4(%ebp),%ebx 10a0a7: c9 leave 10a0a8: c3 ret 0011031c <_POSIX_signals_Alarm_TSR>: void _POSIX_signals_Alarm_TSR( Objects_Id id __attribute__((unused)), void *argument __attribute__((unused)) ) { 11031c: 55 push %ebp 11031d: 89 e5 mov %esp,%ebp 11031f: 83 ec 08 sub $0x8,%esp int status; status = kill( getpid(), SIGALRM ); 110322: e8 3d ff ff ff call 110264 110327: c7 45 0c 0e 00 00 00 movl $0xe,0xc(%ebp) 11032e: 89 45 08 mov %eax,0x8(%ebp) /* XXX can't print from an ISR, should this be fatal? */ } 110331: c9 leave void *argument __attribute__((unused)) ) { int status; status = kill( getpid(), SIGALRM ); 110332: e9 01 01 00 00 jmp 110438 <== ALWAYS TAKEN 00110450 <_POSIX_signals_Check_signal>: bool _POSIX_signals_Check_signal( POSIX_API_Control *api, int signo, bool is_global ) { 110450: 55 push %ebp 110451: 89 e5 mov %esp,%ebp 110453: 57 push %edi 110454: 56 push %esi 110455: 53 push %ebx 110456: 83 ec 38 sub $0x38,%esp 110459: 8b 5d 08 mov 0x8(%ebp),%ebx 11045c: 8b 75 0c mov 0xc(%ebp),%esi siginfo_t siginfo_struct; sigset_t saved_signals_blocked; if ( ! _POSIX_signals_Clear_signals( api, signo, &siginfo_struct, 11045f: 6a 01 push $0x1 110461: 0f b6 45 10 movzbl 0x10(%ebp),%eax 110465: 50 push %eax 110466: 8d 7d dc lea -0x24(%ebp),%edi 110469: 57 push %edi 11046a: 56 push %esi 11046b: 53 push %ebx 11046c: e8 5b 00 00 00 call 1104cc <_POSIX_signals_Clear_signals> <== ALWAYS TAKEN 110471: 83 c4 20 add $0x20,%esp 110474: 84 c0 test %al,%al 110476: 74 48 je 1104c0 <_POSIX_signals_Check_signal+0x70> #endif /* * Just to prevent sending a signal which is currently being ignored. */ if ( _POSIX_signals_Vectors[ signo ].sa_handler == SIG_IGN ) 110478: 6b d6 0c imul $0xc,%esi,%edx 11047b: 8b 82 54 47 12 00 mov 0x124754(%edx),%eax 110481: 83 f8 01 cmp $0x1,%eax 110484: 74 3a je 1104c0 <_POSIX_signals_Check_signal+0x70> <== ALWAYS TAKEN return false; /* * Block the signals requested in sa_mask */ saved_signals_blocked = api->signals_blocked; 110486: 8b 8b c4 00 00 00 mov 0xc4(%ebx),%ecx 11048c: 89 4d d4 mov %ecx,-0x2c(%ebp) api->signals_blocked |= _POSIX_signals_Vectors[ signo ].sa_mask; 11048f: 0b 8a 50 47 12 00 or 0x124750(%edx),%ecx 110495: 89 8b c4 00 00 00 mov %ecx,0xc4(%ebx) /* * Here, the signal handler function executes */ switch ( _POSIX_signals_Vectors[ signo ].sa_flags ) { 11049b: 83 ba 4c 47 12 00 02 cmpl $0x2,0x12474c(%edx) 1104a2: 75 06 jne 1104aa <_POSIX_signals_Check_signal+0x5a> case SA_SIGINFO: (*_POSIX_signals_Vectors[ signo ].sa_sigaction)( 1104a4: 52 push %edx 1104a5: 6a 00 push $0x0 1104a7: 57 push %edi 1104a8: eb 03 jmp 1104ad <_POSIX_signals_Check_signal+0x5d> <== ALWAYS TAKEN &siginfo_struct, NULL /* context is undefined per 1003.1b-1993, p. 66 */ ); break; default: (*_POSIX_signals_Vectors[ signo ].sa_handler)( signo ); 1104aa: 83 ec 0c sub $0xc,%esp 1104ad: 56 push %esi 1104ae: ff d0 call *%eax 1104b0: 83 c4 10 add $0x10,%esp } /* * Restore the previous set of blocked signals */ api->signals_blocked = saved_signals_blocked; 1104b3: 8b 45 d4 mov -0x2c(%ebp),%eax 1104b6: 89 83 c4 00 00 00 mov %eax,0xc4(%ebx) 1104bc: b0 01 mov $0x1,%al return true; 1104be: eb 02 jmp 1104c2 <_POSIX_signals_Check_signal+0x72> <== ALWAYS TAKEN 1104c0: 31 c0 xor %eax,%eax } 1104c2: 8d 65 f4 lea -0xc(%ebp),%esp 1104c5: 5b pop %ebx 1104c6: 5e pop %esi 1104c7: 5f pop %edi 1104c8: c9 leave 1104c9: c3 ret 00111234 <_POSIX_signals_Clear_process_signals>: */ void _POSIX_signals_Clear_process_signals( int signo ) { 111234: 55 push %ebp 111235: 89 e5 mov %esp,%ebp 111237: 53 push %ebx 111238: 8b 4d 08 mov 0x8(%ebp),%ecx clear_signal = true; mask = signo_to_mask( signo ); ISR_Level level; _ISR_Disable( level ); 11123b: 9c pushf 11123c: fa cli 11123d: 5a pop %edx if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) { 11123e: 6b c1 0c imul $0xc,%ecx,%eax 111241: 83 b8 4c 47 12 00 02 cmpl $0x2,0x12474c(%eax) 111248: 75 0e jne 111258 <_POSIX_signals_Clear_process_signals+0x24> 11124a: 8d 98 20 49 12 00 lea 0x124920(%eax),%ebx 111250: 39 98 1c 49 12 00 cmp %ebx,0x12491c(%eax) 111256: 75 1d jne 111275 <_POSIX_signals_Clear_process_signals+0x41> <== ALWAYS TAKEN if ( !_Chain_Is_empty( &_POSIX_signals_Siginfo[ signo ] ) ) clear_signal = false; } if ( clear_signal ) { _POSIX_signals_Pending &= ~mask; 111258: 49 dec %ecx 111259: b8 fe ff ff ff mov $0xfffffffe,%eax 11125e: d3 c0 rol %cl,%eax 111260: 23 05 18 49 12 00 and 0x124918,%eax 111266: a3 18 49 12 00 mov %eax,0x124918 if ( !_POSIX_signals_Pending ) 11126b: 85 c0 test %eax,%eax 11126d: 75 06 jne 111275 <_POSIX_signals_Clear_process_signals+0x41> <== ALWAYS TAKEN _Thread_Do_post_task_switch_extension--; 11126f: ff 0d 8c 42 12 00 decl 0x12428c } _ISR_Enable( level ); 111275: 52 push %edx 111276: 9d popf } 111277: 5b pop %ebx 111278: c9 leave 111279: c3 ret 001104cc <_POSIX_signals_Clear_signals>: int signo, siginfo_t *info, bool is_global, bool check_blocked ) { 1104cc: 55 push %ebp 1104cd: 89 e5 mov %esp,%ebp 1104cf: 57 push %edi 1104d0: 56 push %esi 1104d1: 53 push %ebx 1104d2: 83 ec 1c sub $0x1c,%esp 1104d5: 8b 7d 08 mov 0x8(%ebp),%edi 1104d8: 8b 45 0c mov 0xc(%ebp),%eax 1104db: 8b 75 14 mov 0x14(%ebp),%esi static inline sigset_t signo_to_mask( uint32_t sig ) { return 1u << (sig - 1); 1104de: 8d 48 ff lea -0x1(%eax),%ecx 1104e1: ba 01 00 00 00 mov $0x1,%edx 1104e6: d3 e2 shl %cl,%edx /* set blocked signals based on if checking for them, SIGNAL_ALL_MASK * insures that no signals are blocked and all are checked. */ if ( check_blocked ) 1104e8: 83 c9 ff or $0xffffffff,%ecx 1104eb: 80 7d 18 00 cmpb $0x0,0x18(%ebp) 1104ef: 74 08 je 1104f9 <_POSIX_signals_Clear_signals+0x2d> signals_blocked = ~api->signals_blocked; 1104f1: 8b 8f c4 00 00 00 mov 0xc4(%edi),%ecx 1104f7: f7 d1 not %ecx signals_blocked = SIGNAL_ALL_MASK; /* XXX is this right for siginfo type signals? */ /* XXX are we sure they can be cleared the same way? */ _ISR_Disable( level ); 1104f9: 9c pushf 1104fa: fa cli 1104fb: 8f 45 e4 popl -0x1c(%ebp) if ( is_global ) { 1104fe: 89 f3 mov %esi,%ebx 110500: 84 db test %bl,%bl 110502: 0f 84 86 00 00 00 je 11058e <_POSIX_signals_Clear_signals+0xc2> if ( mask & (_POSIX_signals_Pending & signals_blocked) ) { 110508: 23 15 18 49 12 00 and 0x124918,%edx 11050e: 85 ca test %ecx,%edx 110510: 0f 84 94 00 00 00 je 1105aa <_POSIX_signals_Clear_signals+0xde> if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) { 110516: 6b d0 0c imul $0xc,%eax,%edx 110519: 83 ba 4c 47 12 00 02 cmpl $0x2,0x12474c(%edx) 110520: 75 5c jne 11057e <_POSIX_signals_Clear_signals+0xb2> psiginfo = (POSIX_signals_Siginfo_node *) 110522: 8d b2 1c 49 12 00 lea 0x12491c(%edx),%esi */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 110528: 8b 9a 1c 49 12 00 mov 0x12491c(%edx),%ebx */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 11052e: 8d 4e 04 lea 0x4(%esi),%ecx 110531: 39 cb cmp %ecx,%ebx 110533: 75 04 jne 110539 <_POSIX_signals_Clear_signals+0x6d> 110535: 31 db xor %ebx,%ebx 110537: eb 0b jmp 110544 <_POSIX_signals_Clear_signals+0x78> <== ALWAYS TAKEN { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; 110539: 8b 0b mov (%ebx),%ecx the_chain->first = new_first; 11053b: 89 8a 1c 49 12 00 mov %ecx,0x12491c(%edx) new_first->previous = _Chain_Head(the_chain); 110541: 89 71 04 mov %esi,0x4(%ecx) _Chain_Get_unprotected( &_POSIX_signals_Siginfo[ signo ] ); _POSIX_signals_Clear_process_signals( signo ); 110544: 83 ec 0c sub $0xc,%esp 110547: 50 push %eax 110548: 89 45 e0 mov %eax,-0x20(%ebp) 11054b: e8 e4 0c 00 00 call 111234 <_POSIX_signals_Clear_process_signals> /* * It may be impossible to get here with an empty chain * BUT until that is proven we need to be defensive and * protect against it. */ if ( psiginfo ) { 110550: 83 c4 10 add $0x10,%esp 110553: 85 db test %ebx,%ebx 110555: 8b 45 e0 mov -0x20(%ebp),%eax 110558: 74 24 je 11057e <_POSIX_signals_Clear_signals+0xb2> *info = psiginfo->Info; 11055a: 8d 73 08 lea 0x8(%ebx),%esi 11055d: b9 03 00 00 00 mov $0x3,%ecx 110562: 8b 7d 10 mov 0x10(%ebp),%edi 110565: f3 a5 rep movsl %ds:(%esi),%es:(%edi) Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 110567: c7 03 d0 48 12 00 movl $0x1248d0,(%ebx) old_last_node = the_chain->last; 11056d: 8b 15 d4 48 12 00 mov 0x1248d4,%edx the_chain->last = the_node; 110573: 89 1d d4 48 12 00 mov %ebx,0x1248d4 old_last_node->next = the_node; 110579: 89 1a mov %ebx,(%edx) the_node->previous = old_last_node; 11057b: 89 53 04 mov %edx,0x4(%ebx) &psiginfo->Node ); } else do_callout = false; } _POSIX_signals_Clear_process_signals( signo ); 11057e: 83 ec 0c sub $0xc,%esp 110581: 50 push %eax 110582: e8 ad 0c 00 00 call 111234 <_POSIX_signals_Clear_process_signals> <== ALWAYS TAKEN 110587: b0 01 mov $0x1,%al 110589: 83 c4 10 add $0x10,%esp 11058c: eb 1e jmp 1105ac <_POSIX_signals_Clear_signals+0xe0> <== ALWAYS TAKEN do_callout = true; } } else { if ( mask & (api->signals_pending & signals_blocked) ) { 11058e: 8b 87 c8 00 00 00 mov 0xc8(%edi),%eax 110594: 89 d6 mov %edx,%esi 110596: 21 c6 and %eax,%esi 110598: 85 ce test %ecx,%esi 11059a: 74 0e je 1105aa <_POSIX_signals_Clear_signals+0xde> api->signals_pending &= ~mask; 11059c: f7 d2 not %edx 11059e: 21 c2 and %eax,%edx 1105a0: 89 97 c8 00 00 00 mov %edx,0xc8(%edi) 1105a6: b0 01 mov $0x1,%al 1105a8: eb 02 jmp 1105ac <_POSIX_signals_Clear_signals+0xe0> <== ALWAYS TAKEN 1105aa: 31 c0 xor %eax,%eax do_callout = true; } } _ISR_Enable( level ); 1105ac: ff 75 e4 pushl -0x1c(%ebp) 1105af: 9d popf return do_callout; } 1105b0: 8d 65 f4 lea -0xc(%ebp),%esp 1105b3: 5b pop %ebx 1105b4: 5e pop %esi 1105b5: 5f pop %edi 1105b6: c9 leave 1105b7: c3 ret 0010a8dc <_POSIX_signals_Get_highest>: #include int _POSIX_signals_Get_highest( sigset_t set ) { 10a8dc: 55 push %ebp 10a8dd: 89 e5 mov %esp,%ebp 10a8df: 56 push %esi 10a8e0: 53 push %ebx 10a8e1: 8b 55 08 mov 0x8(%ebp),%edx 10a8e4: b8 1b 00 00 00 mov $0x1b,%eax int signo; for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { if ( set & signo_to_mask( signo ) ) { 10a8e9: bb 01 00 00 00 mov $0x1,%ebx 10a8ee: 8d 48 ff lea -0x1(%eax),%ecx 10a8f1: 89 de mov %ebx,%esi 10a8f3: d3 e6 shl %cl,%esi 10a8f5: 85 d6 test %edx,%esi 10a8f7: 75 1e jne 10a917 <_POSIX_signals_Get_highest+0x3b> <== ALWAYS TAKEN sigset_t set ) { int signo; for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { 10a8f9: 40 inc %eax 10a8fa: 83 f8 20 cmp $0x20,%eax 10a8fd: 75 ef jne 10a8ee <_POSIX_signals_Get_highest+0x12> 10a8ff: b0 01 mov $0x1,%al #if (SIGHUP != 1) #error "Assumption that SIGHUP==1 violated!!" #endif for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) { if ( set & signo_to_mask( signo ) ) { 10a901: bb 01 00 00 00 mov $0x1,%ebx 10a906: 8d 48 ff lea -0x1(%eax),%ecx 10a909: 89 de mov %ebx,%esi 10a90b: d3 e6 shl %cl,%esi 10a90d: 85 d6 test %edx,%esi 10a90f: 75 06 jne 10a917 <_POSIX_signals_Get_highest+0x3b> */ #if (SIGHUP != 1) #error "Assumption that SIGHUP==1 violated!!" #endif for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) { 10a911: 40 inc %eax 10a912: 83 f8 1b cmp $0x1b,%eax 10a915: 75 ef jne 10a906 <_POSIX_signals_Get_highest+0x2a> <== NEVER TAKEN * a return 0. This routine will NOT be called unless a signal * is pending in the set passed in. */ found_it: return signo; } 10a917: 5b pop %ebx 10a918: 5e pop %esi 10a919: c9 leave 10a91a: c3 ret 0010e140 <_POSIX_signals_Manager_Initialization>: * * _POSIX_signals_Manager_Initialization */ void _POSIX_signals_Manager_Initialization(void) { 10e140: 55 push %ebp 10e141: 89 e5 mov %esp,%ebp 10e143: 57 push %edi 10e144: 56 push %esi 10e145: 53 push %ebx 10e146: 83 ec 18 sub $0x18,%esp uint32_t signo; uint32_t maximum_queued_signals; maximum_queued_signals = Configuration_POSIX_API.maximum_queued_signals; 10e149: 8b 1d 30 25 12 00 mov 0x122530,%ebx assert( sizeof(_POSIX_signals_Vectors) == sizeof(_POSIX_signals_Default_vectors) ); #endif memcpy( 10e14f: b8 4c 47 12 00 mov $0x12474c,%eax 10e154: be 94 ec 11 00 mov $0x11ec94,%esi 10e159: b9 60 00 00 00 mov $0x60,%ecx 10e15e: 89 c7 mov %eax,%edi 10e160: f3 a5 rep movsl %ds:(%esi),%es:(%edi) ); /* * Initialize the set of pending signals for the entire process */ sigemptyset( &_POSIX_signals_Pending ); 10e162: 68 18 49 12 00 push $0x124918 10e167: e8 b0 04 00 00 call 10e61c <== ALWAYS TAKEN /* * Initialize the queue we use to block for signals */ _Thread_queue_Initialize( 10e16c: 6a 0b push $0xb 10e16e: 68 00 80 00 10 push $0x10008000 10e173: 6a 00 push $0x0 10e175: 68 d8 48 12 00 push $0x1248d8 10e17a: e8 1d e1 ff ff call 10c29c <_Thread_queue_Initialize> 10e17f: b8 28 49 12 00 mov $0x124928,%eax /*PAGE * * _POSIX_signals_Manager_Initialization */ void _POSIX_signals_Manager_Initialization(void) 10e184: 83 c4 20 add $0x20,%esp */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 10e187: 8d 50 04 lea 0x4(%eax),%edx 10e18a: 89 10 mov %edx,(%eax) the_chain->permanent_null = NULL; 10e18c: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax) the_chain->last = _Chain_Head(the_chain); 10e193: 89 40 08 mov %eax,0x8(%eax) 10e196: 83 c0 0c add $0xc,%eax /* XXX status codes */ /* * Allocate the siginfo pools. */ for ( signo=1 ; signo<= SIGRTMAX ; signo++ ) 10e199: 3d 9c 4a 12 00 cmp $0x124a9c,%eax 10e19e: 75 e7 jne 10e187 <_POSIX_signals_Manager_Initialization+0x47> _Chain_Initialize_empty( &_POSIX_signals_Siginfo[ signo ] ); if ( maximum_queued_signals ) { 10e1a0: 85 db test %ebx,%ebx 10e1a2: 74 1f je 10e1c3 <_POSIX_signals_Manager_Initialization+0x83> _Chain_Initialize( 10e1a4: 83 ec 0c sub $0xc,%esp 10e1a7: 6b c3 14 imul $0x14,%ebx,%eax 10e1aa: 50 push %eax 10e1ab: e8 e8 e9 ff ff call 10cb98 <_Workspace_Allocate_or_fatal_error> 10e1b0: 6a 14 push $0x14 10e1b2: 53 push %ebx 10e1b3: 50 push %eax 10e1b4: 68 cc 48 12 00 push $0x1248cc 10e1b9: e8 02 0a 00 00 call 10ebc0 <_Chain_Initialize> <== ALWAYS TAKEN 10e1be: 83 c4 20 add $0x20,%esp 10e1c1: eb 1e jmp 10e1e1 <_POSIX_signals_Manager_Initialization+0xa1> <== ALWAYS TAKEN */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 10e1c3: c7 05 cc 48 12 00 d0 movl $0x1248d0,0x1248cc 10e1ca: 48 12 00 the_chain->permanent_null = NULL; 10e1cd: c7 05 d0 48 12 00 00 movl $0x0,0x1248d0 10e1d4: 00 00 00 the_chain->last = _Chain_Head(the_chain); 10e1d7: c7 05 d4 48 12 00 cc movl $0x1248cc,0x1248d4 10e1de: 48 12 00 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 10e1e1: c7 05 58 4b 12 00 00 movl $0x0,0x124b58 10e1e8: 00 00 00 the_watchdog->routine = routine; 10e1eb: c7 05 6c 4b 12 00 00 movl $0x0,0x124b6c 10e1f2: 00 00 00 the_watchdog->id = id; 10e1f5: c7 05 70 4b 12 00 00 movl $0x0,0x124b70 10e1fc: 00 00 00 the_watchdog->user_data = user_data; 10e1ff: c7 05 74 4b 12 00 00 movl $0x0,0x124b74 10e206: 00 00 00 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 10e209: c7 05 a4 4a 12 00 00 movl $0x0,0x124aa4 10e210: 00 00 00 the_watchdog->routine = routine; 10e213: c7 05 b8 4a 12 00 00 movl $0x0,0x124ab8 10e21a: 00 00 00 the_watchdog->id = id; 10e21d: c7 05 bc 4a 12 00 00 movl $0x0,0x124abc 10e224: 00 00 00 the_watchdog->user_data = user_data; 10e227: c7 05 c0 4a 12 00 00 movl $0x0,0x124ac0 10e22e: 00 00 00 /* * Initialize the Alarm Timer */ _Watchdog_Initialize( &_POSIX_signals_Alarm_timer, NULL, 0, NULL ); _Watchdog_Initialize( &_POSIX_signals_Ualarm_timer, NULL, 0, NULL ); } 10e231: 8d 65 f4 lea -0xc(%ebp),%esp 10e234: 5b pop %ebx 10e235: 5e pop %esi 10e236: 5f pop %edi 10e237: c9 leave 10e238: c3 ret 0010e239 <_POSIX_signals_Post_switch_extension>: */ void _POSIX_signals_Post_switch_extension( Thread_Control *the_thread ) { 10e239: 55 push %ebp 10e23a: 89 e5 mov %esp,%ebp 10e23c: 56 push %esi 10e23d: 53 push %ebx POSIX_API_Control *api; int signo; ISR_Level level; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 10e23e: 8b 45 08 mov 0x8(%ebp),%eax 10e241: 8b 98 f8 00 00 00 mov 0xf8(%eax),%ebx * * The first thing done is to check there are any signals to be * processed at all. No point in doing this loop otherwise. */ while (1) { _ISR_Disable( level ); 10e247: 9c pushf 10e248: fa cli 10e249: 59 pop %ecx if ( !(~api->signals_blocked & (api->signals_pending | _POSIX_signals_Pending)) ) { 10e24a: 8b 15 18 49 12 00 mov 0x124918,%edx 10e250: 0b 93 c8 00 00 00 or 0xc8(%ebx),%edx * The first thing done is to check there are any signals to be * processed at all. No point in doing this loop otherwise. */ while (1) { _ISR_Disable( level ); if ( !(~api->signals_blocked & 10e256: 8b 83 c4 00 00 00 mov 0xc4(%ebx),%eax 10e25c: f7 d0 not %eax 10e25e: 85 c2 test %eax,%edx 10e260: 75 09 jne 10e26b <_POSIX_signals_Post_switch_extension+0x32> (api->signals_pending | _POSIX_signals_Pending)) ) { _ISR_Enable( level ); 10e262: 51 push %ecx 10e263: 9d popf for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) { _POSIX_signals_Check_signal( api, signo, false ); _POSIX_signals_Check_signal( api, signo, true ); } } } 10e264: 8d 65 f8 lea -0x8(%ebp),%esp 10e267: 5b pop %ebx 10e268: 5e pop %esi 10e269: c9 leave 10e26a: c3 ret if ( !(~api->signals_blocked & (api->signals_pending | _POSIX_signals_Pending)) ) { _ISR_Enable( level ); break; } _ISR_Enable( level ); 10e26b: 51 push %ecx 10e26c: 9d popf 10e26d: be 1b 00 00 00 mov $0x1b,%esi for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { _POSIX_signals_Check_signal( api, signo, false ); 10e272: 52 push %edx 10e273: 6a 00 push $0x0 10e275: 56 push %esi 10e276: 53 push %ebx 10e277: e8 d4 21 00 00 call 110450 <_POSIX_signals_Check_signal> _POSIX_signals_Check_signal( api, signo, true ); 10e27c: 83 c4 0c add $0xc,%esp 10e27f: 6a 01 push $0x1 10e281: 56 push %esi 10e282: 53 push %ebx 10e283: e8 c8 21 00 00 call 110450 <_POSIX_signals_Check_signal> _ISR_Enable( level ); break; } _ISR_Enable( level ); for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { 10e288: 46 inc %esi 10e289: 83 c4 10 add $0x10,%esp 10e28c: 83 fe 20 cmp $0x20,%esi 10e28f: 75 e1 jne 10e272 <_POSIX_signals_Post_switch_extension+0x39> 10e291: 66 be 01 00 mov $0x1,%si _POSIX_signals_Check_signal( api, signo, true ); } /* Unfortunately - nothing like __SIGFIRSTNOTRT in newlib signal .h */ for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) { _POSIX_signals_Check_signal( api, signo, false ); 10e295: 50 push %eax 10e296: 6a 00 push $0x0 10e298: 56 push %esi 10e299: 53 push %ebx 10e29a: e8 b1 21 00 00 call 110450 <_POSIX_signals_Check_signal> _POSIX_signals_Check_signal( api, signo, true ); 10e29f: 83 c4 0c add $0xc,%esp 10e2a2: 6a 01 push $0x1 10e2a4: 56 push %esi 10e2a5: 53 push %ebx 10e2a6: e8 a5 21 00 00 call 110450 <_POSIX_signals_Check_signal> _POSIX_signals_Check_signal( api, signo, false ); _POSIX_signals_Check_signal( api, signo, true ); } /* Unfortunately - nothing like __SIGFIRSTNOTRT in newlib signal .h */ for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) { 10e2ab: 46 inc %esi 10e2ac: 83 c4 10 add $0x10,%esp 10e2af: 83 fe 1b cmp $0x1b,%esi 10e2b2: 75 e1 jne 10e295 <_POSIX_signals_Post_switch_extension+0x5c> 10e2b4: eb 91 jmp 10e247 <_POSIX_signals_Post_switch_extension+0xe> <== ALWAYS TAKEN 0010e726 <_POSIX_signals_Ualarm_TSR>: void _POSIX_signals_Ualarm_TSR( Objects_Id id __attribute__((unused)), void *argument __attribute__((unused)) ) { 10e726: 55 push %ebp 10e727: 89 e5 mov %esp,%ebp 10e729: 83 ec 08 sub $0x8,%esp /* * Send a SIGALRM but if there is a problem, ignore it. * It's OK, there isn't a way this should fail. */ (void) kill( getpid(), SIGALRM ); 10e72c: e8 33 1b 00 00 call 110264 10e731: 52 push %edx 10e732: 52 push %edx 10e733: 6a 0e push $0xe 10e735: 50 push %eax 10e736: e8 fd 1c 00 00 call 110438 <== ALWAYS TAKEN RTEMS_INLINE_ROUTINE void _Watchdog_Reset( Watchdog_Control *the_watchdog ) { (void) _Watchdog_Remove( the_watchdog ); 10e73b: c7 04 24 9c 4a 12 00 movl $0x124a9c,(%esp) 10e742: e8 81 e3 ff ff call 10cac8 <_Watchdog_Remove> _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 10e747: 83 c4 10 add $0x10,%esp 10e74a: c7 45 0c 9c 4a 12 00 movl $0x124a9c,0xc(%ebp) 10e751: c7 45 08 c8 42 12 00 movl $0x1242c8,0x8(%ebp) /* * If the reset interval is non-zero, reschedule ourselves. */ _Watchdog_Reset( &_POSIX_signals_Ualarm_timer ); } 10e758: c9 leave 10e759: e9 52 e2 ff ff jmp 10c9b0 <_Watchdog_Insert> 001112a0 <_POSIX_signals_Unblock_thread>: bool _POSIX_signals_Unblock_thread( Thread_Control *the_thread, int signo, siginfo_t *info ) { 1112a0: 55 push %ebp 1112a1: 89 e5 mov %esp,%ebp 1112a3: 57 push %edi 1112a4: 56 push %esi 1112a5: 53 push %ebx 1112a6: 83 ec 0c sub $0xc,%esp 1112a9: 8b 5d 08 mov 0x8(%ebp),%ebx 1112ac: 8b 55 0c mov 0xc(%ebp),%edx POSIX_API_Control *api; sigset_t mask; siginfo_t *the_info = NULL; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 1112af: 8b b3 f8 00 00 00 mov 0xf8(%ebx),%esi 1112b5: 8d 4a ff lea -0x1(%edx),%ecx 1112b8: b8 01 00 00 00 mov $0x1,%eax 1112bd: d3 e0 shl %cl,%eax /* * Is the thread is specifically waiting for a signal? */ if ( _States_Is_interruptible_signal( the_thread->current_state ) ) { 1112bf: 8b 4b 10 mov 0x10(%ebx),%ecx 1112c2: 89 cf mov %ecx,%edi 1112c4: 81 e7 00 80 00 10 and $0x10008000,%edi 1112ca: 81 ff 00 80 00 10 cmp $0x10008000,%edi 1112d0: 75 50 jne 111322 <_POSIX_signals_Unblock_thread+0x82> if ( (the_thread->Wait.option & mask) || (~api->signals_blocked & mask) ) { 1112d2: 85 43 30 test %eax,0x30(%ebx) 1112d5: 75 10 jne 1112e7 <_POSIX_signals_Unblock_thread+0x47> 1112d7: 8b 8e c4 00 00 00 mov 0xc4(%esi),%ecx 1112dd: f7 d1 not %ecx 1112df: 85 c8 test %ecx,%eax 1112e1: 0f 84 a4 00 00 00 je 11138b <_POSIX_signals_Unblock_thread+0xeb> the_thread->Wait.return_code = EINTR; 1112e7: c7 43 34 04 00 00 00 movl $0x4,0x34(%ebx) the_info = (siginfo_t *) the_thread->Wait.return_argument; 1112ee: 8b 43 28 mov 0x28(%ebx),%eax if ( !info ) { 1112f1: 83 7d 10 00 cmpl $0x0,0x10(%ebp) 1112f5: 75 12 jne 111309 <_POSIX_signals_Unblock_thread+0x69> the_info->si_signo = signo; 1112f7: 89 10 mov %edx,(%eax) the_info->si_code = SI_USER; 1112f9: c7 40 04 01 00 00 00 movl $0x1,0x4(%eax) the_info->si_value.sival_int = 0; 111300: c7 40 08 00 00 00 00 movl $0x0,0x8(%eax) 111307: eb 0c jmp 111315 <_POSIX_signals_Unblock_thread+0x75> <== ALWAYS TAKEN } else { *the_info = *info; 111309: b9 03 00 00 00 mov $0x3,%ecx 11130e: 89 c7 mov %eax,%edi 111310: 8b 75 10 mov 0x10(%ebp),%esi 111313: f3 a5 rep movsl %ds:(%esi),%es:(%edi) } _Thread_queue_Extract_with_proxy( the_thread ); 111315: 83 ec 0c sub $0xc,%esp 111318: 53 push %ebx 111319: e8 2e af ff ff call 10c24c <_Thread_queue_Extract_with_proxy> 11131e: b0 01 mov $0x1,%al 111320: eb 48 jmp 11136a <_POSIX_signals_Unblock_thread+0xca> <== ALWAYS TAKEN } /* * Thread is not waiting due to a sigwait. */ if ( ~api->signals_blocked & mask ) { 111322: 8b 96 c4 00 00 00 mov 0xc4(%esi),%edx 111328: f7 d2 not %edx 11132a: 85 d0 test %edx,%eax 11132c: 74 5d je 11138b <_POSIX_signals_Unblock_thread+0xeb> * it is not blocked, THEN * we need to dispatch at the end of this ISR. * + Any other combination, do nothing. */ the_thread->do_post_task_switch_extension = true; 11132e: c6 43 74 01 movb $0x1,0x74(%ebx) if ( the_thread->current_state & STATES_INTERRUPTIBLE_BY_SIGNAL ) { 111332: f7 c1 00 00 00 10 test $0x10000000,%ecx 111338: 74 35 je 11136f <_POSIX_signals_Unblock_thread+0xcf> the_thread->Wait.return_code = EINTR; 11133a: c7 43 34 04 00 00 00 movl $0x4,0x34(%ebx) #if 0 if ( _States_Is_waiting_on_thread_queue(the_thread->current_state) ) _Thread_queue_Extract_with_proxy( the_thread ); else #endif if ( _States_Is_delaying(the_thread->current_state) ){ 111341: 80 e1 08 and $0x8,%cl 111344: 74 45 je 11138b <_POSIX_signals_Unblock_thread+0xeb> <== ALWAYS TAKEN if ( _Watchdog_Is_active( &the_thread->Timer ) ) 111346: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 11134a: 75 0f jne 11135b <_POSIX_signals_Unblock_thread+0xbb> <== ALWAYS TAKEN (void) _Watchdog_Remove( &the_thread->Timer ); 11134c: 83 ec 0c sub $0xc,%esp 11134f: 8d 43 48 lea 0x48(%ebx),%eax 111352: 50 push %eax 111353: e8 70 b7 ff ff call 10cac8 <_Watchdog_Remove> 111358: 83 c4 10 add $0x10,%esp RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 11135b: 50 push %eax 11135c: 50 push %eax 11135d: 68 f8 ff 03 10 push $0x1003fff8 111362: 53 push %ebx 111363: e8 0c a5 ff ff call 10b874 <_Thread_Clear_state> 111368: 31 c0 xor %eax,%eax 11136a: 83 c4 10 add $0x10,%esp 11136d: eb 1e jmp 11138d <_POSIX_signals_Unblock_thread+0xed> <== ALWAYS TAKEN _Thread_Unblock( the_thread ); } } else if ( the_thread->current_state == STATES_READY ) { 11136f: 85 c9 test %ecx,%ecx 111371: 75 18 jne 11138b <_POSIX_signals_Unblock_thread+0xeb> <== ALWAYS TAKEN if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) 111373: a1 84 42 12 00 mov 0x124284,%eax 111378: 85 c0 test %eax,%eax 11137a: 74 0f je 11138b <_POSIX_signals_Unblock_thread+0xeb> 11137c: 3b 1d a8 42 12 00 cmp 0x1242a8,%ebx 111382: 75 07 jne 11138b <_POSIX_signals_Unblock_thread+0xeb> <== ALWAYS TAKEN _ISR_Signals_to_thread_executing = true; 111384: c6 05 3c 43 12 00 01 movb $0x1,0x12433c 11138b: 31 c0 xor %eax,%eax } } return false; } 11138d: 8d 65 f4 lea -0xc(%ebp),%esp 111390: 5b pop %ebx 111391: 5e pop %esi 111392: 5f pop %edi 111393: c9 leave 111394: c3 ret 0010b690 <_Protected_heap_Allocate_aligned_with_boundary>: Heap_Control *heap, uintptr_t size, uintptr_t alignment, uintptr_t boundary ) { 10b690: 55 push %ebp 10b691: 89 e5 mov %esp,%ebp 10b693: 83 ec 24 sub $0x24,%esp void *p; _RTEMS_Lock_allocator(); 10b696: ff 35 a0 42 12 00 pushl 0x1242a0 10b69c: e8 77 f0 ff ff call 10a718 <_API_Mutex_Lock> <== ALWAYS TAKEN p = _Heap_Allocate_aligned_with_boundary( 10b6a1: ff 75 14 pushl 0x14(%ebp) 10b6a4: ff 75 10 pushl 0x10(%ebp) 10b6a7: ff 75 0c pushl 0xc(%ebp) 10b6aa: ff 75 08 pushl 0x8(%ebp) 10b6ad: e8 76 37 00 00 call 10ee28 <_Heap_Allocate_aligned_with_boundary> <== ALWAYS TAKEN heap, size, alignment, boundary ); _RTEMS_Unlock_allocator(); 10b6b2: 83 c4 14 add $0x14,%esp 10b6b5: ff 35 a0 42 12 00 pushl 0x1242a0 10b6bb: 89 45 f4 mov %eax,-0xc(%ebp) 10b6be: e8 9d f0 ff ff call 10a760 <_API_Mutex_Unlock> <== ALWAYS TAKEN return p; } 10b6c3: 8b 45 f4 mov -0xc(%ebp),%eax 10b6c6: c9 leave 10b6c7: c3 ret 0010b6c8 <_Protected_heap_Free>: bool _Protected_heap_Free( Heap_Control *the_heap, void *start_address ) { 10b6c8: 55 push %ebp 10b6c9: 89 e5 mov %esp,%ebp 10b6cb: 83 ec 24 sub $0x24,%esp bool status; _RTEMS_Lock_allocator(); 10b6ce: ff 35 a0 42 12 00 pushl 0x1242a0 10b6d4: e8 3f f0 ff ff call 10a718 <_API_Mutex_Lock> <== ALWAYS TAKEN status = _Heap_Free( the_heap, start_address ); 10b6d9: 59 pop %ecx 10b6da: 58 pop %eax 10b6db: ff 75 0c pushl 0xc(%ebp) 10b6de: ff 75 08 pushl 0x8(%ebp) 10b6e1: e8 a2 38 00 00 call 10ef88 <_Heap_Free> <== ALWAYS TAKEN _RTEMS_Unlock_allocator(); 10b6e6: 5a pop %edx 10b6e7: ff 35 a0 42 12 00 pushl 0x1242a0 10b6ed: 88 45 f4 mov %al,-0xc(%ebp) 10b6f0: e8 6b f0 ff ff call 10a760 <_API_Mutex_Unlock> <== ALWAYS TAKEN return status; } 10b6f5: 8a 45 f4 mov -0xc(%ebp),%al 10b6f8: c9 leave 10b6f9: c3 ret 00128a24 <_Protected_heap_Get_information>: bool _Protected_heap_Get_information( Heap_Control *the_heap, Heap_Information_block *the_info ) { 128a24: 55 push %ebp 128a25: 89 e5 mov %esp,%ebp 128a27: 56 push %esi 128a28: 53 push %ebx 128a29: 8b 5d 08 mov 0x8(%ebp),%ebx 128a2c: 8b 75 0c mov 0xc(%ebp),%esi if ( !the_heap ) 128a2f: 85 db test %ebx,%ebx 128a31: 74 2e je 128a61 <_Protected_heap_Get_information+0x3d> return false; if ( !the_info ) 128a33: 85 f6 test %esi,%esi 128a35: 74 2a je 128a61 <_Protected_heap_Get_information+0x3d> return false; _RTEMS_Lock_allocator(); 128a37: 83 ec 0c sub $0xc,%esp 128a3a: ff 35 80 3c 16 00 pushl 0x163c80 128a40: e8 47 72 fe ff call 10fc8c <_API_Mutex_Lock> _Heap_Get_information( the_heap, the_info ); 128a45: 5a pop %edx 128a46: 59 pop %ecx 128a47: 56 push %esi 128a48: 53 push %ebx 128a49: e8 ca cb 00 00 call 135618 <_Heap_Get_information> _RTEMS_Unlock_allocator(); 128a4e: 58 pop %eax 128a4f: ff 35 80 3c 16 00 pushl 0x163c80 128a55: e8 7a 72 fe ff call 10fcd4 <_API_Mutex_Unlock> 128a5a: b0 01 mov $0x1,%al return true; 128a5c: 83 c4 10 add $0x10,%esp 128a5f: eb 02 jmp 128a63 <_Protected_heap_Get_information+0x3f> <== ALWAYS TAKEN 128a61: 31 c0 xor %eax,%eax } 128a63: 8d 65 f8 lea -0x8(%ebp),%esp 128a66: 5b pop %ebx 128a67: 5e pop %esi 128a68: c9 leave 128a69: c3 ret 0010eaf8 <_RTEMS_Tasks_Invoke_task_variable_dtor>: void _RTEMS_Tasks_Invoke_task_variable_dtor( Thread_Control *the_thread, rtems_task_variable_t *tvp ) { 10eaf8: 55 push %ebp 10eaf9: 89 e5 mov %esp,%ebp 10eafb: 56 push %esi 10eafc: 53 push %ebx 10eafd: 8b 5d 0c mov 0xc(%ebp),%ebx void (*dtor)(void *); void *value; dtor = tvp->dtor; 10eb00: 8b 43 10 mov 0x10(%ebx),%eax if (_Thread_Is_executing(the_thread)) { 10eb03: 8b 55 08 mov 0x8(%ebp),%edx 10eb06: 3b 15 a8 42 12 00 cmp 0x1242a8,%edx 10eb0c: 75 0c jne 10eb1a <_RTEMS_Tasks_Invoke_task_variable_dtor+0x22> value = *tvp->ptr; 10eb0e: 8b 4b 04 mov 0x4(%ebx),%ecx 10eb11: 8b 11 mov (%ecx),%edx *tvp->ptr = tvp->gval; 10eb13: 8b 73 08 mov 0x8(%ebx),%esi 10eb16: 89 31 mov %esi,(%ecx) 10eb18: eb 03 jmp 10eb1d <_RTEMS_Tasks_Invoke_task_variable_dtor+0x25> <== ALWAYS TAKEN } else { value = tvp->tval; 10eb1a: 8b 53 0c mov 0xc(%ebx),%edx } if ( dtor ) 10eb1d: 85 c0 test %eax,%eax 10eb1f: 74 09 je 10eb2a <_RTEMS_Tasks_Invoke_task_variable_dtor+0x32> (*dtor)(value); 10eb21: 83 ec 0c sub $0xc,%esp 10eb24: 52 push %edx 10eb25: ff d0 call *%eax 10eb27: 83 c4 10 add $0x10,%esp _Workspace_Free(tvp); 10eb2a: 89 5d 08 mov %ebx,0x8(%ebp) } 10eb2d: 8d 65 f8 lea -0x8(%ebp),%esp 10eb30: 5b pop %ebx 10eb31: 5e pop %esi 10eb32: c9 leave } if ( dtor ) (*dtor)(value); _Workspace_Free(tvp); 10eb33: e9 a5 e0 ff ff jmp 10cbdd <_Workspace_Free> 0010ea1d <_RTEMS_tasks_Create_extension>: bool _RTEMS_tasks_Create_extension( Thread_Control *executing, Thread_Control *created ) { 10ea1d: 55 push %ebp 10ea1e: 89 e5 mov %esp,%ebp 10ea20: 53 push %ebx 10ea21: 83 ec 10 sub $0x10,%esp 10ea24: 8b 5d 0c mov 0xc(%ebp),%ebx /* * Notepads must be the last entry in the structure and they * can be left off if disabled in the configuration. */ to_allocate = sizeof( RTEMS_API_Control ); if ( !rtems_configuration_get_notepads_enabled() ) 10ea27: 80 3d c4 01 12 00 01 cmpb $0x1,0x1201c4 10ea2e: 19 c0 sbb %eax,%eax 10ea30: 83 e0 c0 and $0xffffffc0,%eax 10ea33: 83 c0 60 add $0x60,%eax to_allocate -= (RTEMS_NUMBER_NOTEPADS * sizeof(uint32_t)); api = _Workspace_Allocate( to_allocate ); 10ea36: 50 push %eax 10ea37: e8 88 e1 ff ff call 10cbc4 <_Workspace_Allocate> <== ALWAYS TAKEN if ( !api ) 10ea3c: 83 c4 10 add $0x10,%esp 10ea3f: 31 d2 xor %edx,%edx 10ea41: 85 c0 test %eax,%eax 10ea43: 74 5f je 10eaa4 <_RTEMS_tasks_Create_extension+0x87> return false; created->API_Extensions[ THREAD_API_RTEMS ] = api; 10ea45: 89 83 f4 00 00 00 mov %eax,0xf4(%ebx) api->pending_events = EVENT_SETS_NONE_PENDING; 10ea4b: c7 00 00 00 00 00 movl $0x0,(%eax) api->event_condition = 0; 10ea51: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax) */ RTEMS_INLINE_ROUTINE void _ASR_Initialize ( ASR_Information *information ) { information->is_enabled = false; 10ea58: c6 40 08 00 movb $0x0,0x8(%eax) information->handler = NULL; 10ea5c: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax) information->mode_set = RTEMS_DEFAULT_MODES; 10ea63: c7 40 10 00 00 00 00 movl $0x0,0x10(%eax) information->signals_posted = 0; 10ea6a: c7 40 14 00 00 00 00 movl $0x0,0x14(%eax) information->signals_pending = 0; 10ea71: c7 40 18 00 00 00 00 movl $0x0,0x18(%eax) information->nest_level = 0; 10ea78: c7 40 1c 00 00 00 00 movl $0x0,0x1c(%eax) _ASR_Initialize( &api->Signal ); created->task_variables = NULL; 10ea7f: c7 83 04 01 00 00 00 movl $0x0,0x104(%ebx) 10ea86: 00 00 00 if ( rtems_configuration_get_notepads_enabled() ) { 10ea89: 80 3d c4 01 12 00 00 cmpb $0x0,0x1201c4 10ea90: 74 10 je 10eaa2 <_RTEMS_tasks_Create_extension+0x85> 10ea92: 31 d2 xor %edx,%edx for (i=0; i < RTEMS_NUMBER_NOTEPADS; i++) api->Notepads[i] = 0; 10ea94: c7 44 90 20 00 00 00 movl $0x0,0x20(%eax,%edx,4) 10ea9b: 00 api->event_condition = 0; _ASR_Initialize( &api->Signal ); created->task_variables = NULL; if ( rtems_configuration_get_notepads_enabled() ) { for (i=0; i < RTEMS_NUMBER_NOTEPADS; i++) 10ea9c: 42 inc %edx 10ea9d: 83 fa 10 cmp $0x10,%edx 10eaa0: 75 f2 jne 10ea94 <_RTEMS_tasks_Create_extension+0x77> 10eaa2: b2 01 mov $0x1,%dl api->Notepads[i] = 0; } return true; } 10eaa4: 88 d0 mov %dl,%al 10eaa6: 8b 5d fc mov -0x4(%ebp),%ebx 10eaa9: c9 leave 10eaaa: c3 ret 0010e9cd <_RTEMS_tasks_Delete_extension>: void _RTEMS_tasks_Delete_extension( Thread_Control *executing, Thread_Control *deleted ) { 10e9cd: 55 push %ebp 10e9ce: 89 e5 mov %esp,%ebp 10e9d0: 56 push %esi 10e9d1: 53 push %ebx 10e9d2: 8b 5d 0c mov 0xc(%ebp),%ebx /* * Free per task variable memory */ tvp = deleted->task_variables; 10e9d5: 8b 83 04 01 00 00 mov 0x104(%ebx),%eax deleted->task_variables = NULL; 10e9db: c7 83 04 01 00 00 00 movl $0x0,0x104(%ebx) 10e9e2: 00 00 00 while (tvp) { 10e9e5: eb 10 jmp 10e9f7 <_RTEMS_tasks_Delete_extension+0x2a> <== ALWAYS TAKEN next = (rtems_task_variable_t *)tvp->next; 10e9e7: 8b 30 mov (%eax),%esi _RTEMS_Tasks_Invoke_task_variable_dtor( deleted, tvp ); 10e9e9: 52 push %edx 10e9ea: 52 push %edx 10e9eb: 50 push %eax 10e9ec: 53 push %ebx 10e9ed: e8 06 01 00 00 call 10eaf8 <_RTEMS_Tasks_Invoke_task_variable_dtor> 10e9f2: 89 f0 mov %esi,%eax 10e9f4: 83 c4 10 add $0x10,%esp * Free per task variable memory */ tvp = deleted->task_variables; deleted->task_variables = NULL; while (tvp) { 10e9f7: 85 c0 test %eax,%eax 10e9f9: 75 ec jne 10e9e7 <_RTEMS_tasks_Delete_extension+0x1a> /* * Free API specific memory */ (void) _Workspace_Free( deleted->API_Extensions[ THREAD_API_RTEMS ] ); 10e9fb: 83 ec 0c sub $0xc,%esp 10e9fe: ff b3 f4 00 00 00 pushl 0xf4(%ebx) 10ea04: e8 d4 e1 ff ff call 10cbdd <_Workspace_Free> deleted->API_Extensions[ THREAD_API_RTEMS ] = NULL; 10ea09: c7 83 f4 00 00 00 00 movl $0x0,0xf4(%ebx) 10ea10: 00 00 00 10ea13: 83 c4 10 add $0x10,%esp } 10ea16: 8d 65 f8 lea -0x8(%ebp),%esp 10ea19: 5b pop %ebx 10ea1a: 5e pop %esi 10ea1b: c9 leave 10ea1c: 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 ec 01 12 00 mov 0x1201ec,%ebx maximum = Configuration_RTEMS_API.number_of_initialization_tasks; 10a2af: a1 e8 01 12 00 mov 0x1201e8,%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 51 0c 00 00 call 10af54 <_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 0010e929 <_RTEMS_tasks_Manager_initialization>: * * Output parameters: NONE */ void _RTEMS_tasks_Manager_initialization(void) { 10e929: 55 push %ebp 10e92a: 89 e5 mov %esp,%ebp 10e92c: 83 ec 0c sub $0xc,%esp _Objects_Initialize_information( 10e92f: 6a 04 push $0x4 10e931: 6a 00 push $0x0 10e933: 68 08 01 00 00 push $0x108 10e938: ff 35 c0 01 12 00 pushl 0x1201c0 10e93e: 6a 01 push $0x1 10e940: 6a 02 push $0x2 10e942: 68 74 41 12 00 push $0x124174 10e947: e8 0c cb ff ff call 10b458 <_Objects_Initialize_information> RTEMS_INLINE_ROUTINE void _User_extensions_Add_API_set( User_extensions_Control *extension ) { _User_extensions_Add_set( extension ); 10e94c: 83 c4 14 add $0x14,%esp 10e94f: 68 b8 1f 12 00 push $0x121fb8 10e954: e8 4f 0c 00 00 call 10f5a8 <_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 ); 10e959: c7 04 24 a8 1f 12 00 movl $0x121fa8,(%esp) 10e960: e8 43 bd ff ff call 10a6a8 <_API_extensions_Add> 10e965: 83 c4 10 add $0x10,%esp MP_PACKET_TASKS, _RTEMS_tasks_MP_Process_packet ); #endif } 10e968: c9 leave 10e969: c3 ret 0010e96a <_RTEMS_tasks_Post_switch_extension>: */ void _RTEMS_tasks_Post_switch_extension( Thread_Control *executing ) { 10e96a: 55 push %ebp 10e96b: 89 e5 mov %esp,%ebp 10e96d: 57 push %edi 10e96e: 56 push %esi 10e96f: 53 push %ebx 10e970: 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 ]; 10e973: 8b 45 08 mov 0x8(%ebp),%eax 10e976: 8b 98 f4 00 00 00 mov 0xf4(%eax),%ebx if ( !api ) 10e97c: 85 db test %ebx,%ebx 10e97e: 74 45 je 10e9c5 <_RTEMS_tasks_Post_switch_extension+0x5b> <== ALWAYS TAKEN * Signal Processing */ asr = &api->Signal; _ISR_Disable( level ); 10e980: 9c pushf 10e981: fa cli 10e982: 58 pop %eax signal_set = asr->signals_posted; 10e983: 8b 7b 14 mov 0x14(%ebx),%edi asr->signals_posted = 0; 10e986: c7 43 14 00 00 00 00 movl $0x0,0x14(%ebx) _ISR_Enable( level ); 10e98d: 50 push %eax 10e98e: 9d popf if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */ 10e98f: 85 ff test %edi,%edi 10e991: 74 32 je 10e9c5 <_RTEMS_tasks_Post_switch_extension+0x5b> return; asr->nest_level += 1; 10e993: ff 43 1c incl 0x1c(%ebx) rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode ); 10e996: 50 push %eax 10e997: 8d 75 e4 lea -0x1c(%ebp),%esi 10e99a: 56 push %esi 10e99b: 68 ff ff 00 00 push $0xffff 10e9a0: ff 73 10 pushl 0x10(%ebx) 10e9a3: e8 60 1e 00 00 call 110808 (*asr->handler)( signal_set ); 10e9a8: 89 3c 24 mov %edi,(%esp) 10e9ab: ff 53 0c call *0xc(%ebx) asr->nest_level -= 1; 10e9ae: ff 4b 1c decl 0x1c(%ebx) rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode ); 10e9b1: 83 c4 0c add $0xc,%esp 10e9b4: 56 push %esi 10e9b5: 68 ff ff 00 00 push $0xffff 10e9ba: ff 75 e4 pushl -0x1c(%ebp) 10e9bd: e8 46 1e 00 00 call 110808 10e9c2: 83 c4 10 add $0x10,%esp } 10e9c5: 8d 65 f4 lea -0xc(%ebp),%esp 10e9c8: 5b pop %ebx 10e9c9: 5e pop %esi 10e9ca: 5f pop %edi 10e9cb: c9 leave 10e9cc: c3 ret 0010e8d4 <_RTEMS_tasks_Switch_extension>: void _RTEMS_tasks_Switch_extension( Thread_Control *executing, Thread_Control *heir ) { 10e8d4: 55 push %ebp 10e8d5: 89 e5 mov %esp,%ebp /* * Per Task Variables */ tvp = executing->task_variables; 10e8d7: 8b 45 08 mov 0x8(%ebp),%eax 10e8da: 8b 80 04 01 00 00 mov 0x104(%eax),%eax while (tvp) { 10e8e0: eb 0f jmp 10e8f1 <_RTEMS_tasks_Switch_extension+0x1d> <== ALWAYS TAKEN tvp->tval = *tvp->ptr; 10e8e2: 8b 50 04 mov 0x4(%eax),%edx 10e8e5: 8b 0a mov (%edx),%ecx 10e8e7: 89 48 0c mov %ecx,0xc(%eax) *tvp->ptr = tvp->gval; 10e8ea: 8b 48 08 mov 0x8(%eax),%ecx 10e8ed: 89 0a mov %ecx,(%edx) tvp = (rtems_task_variable_t *)tvp->next; 10e8ef: 8b 00 mov (%eax),%eax /* * Per Task Variables */ tvp = executing->task_variables; while (tvp) { 10e8f1: 85 c0 test %eax,%eax 10e8f3: 75 ed jne 10e8e2 <_RTEMS_tasks_Switch_extension+0xe> tvp->tval = *tvp->ptr; *tvp->ptr = tvp->gval; tvp = (rtems_task_variable_t *)tvp->next; } tvp = heir->task_variables; 10e8f5: 8b 45 0c mov 0xc(%ebp),%eax 10e8f8: 8b 80 04 01 00 00 mov 0x104(%eax),%eax while (tvp) { 10e8fe: eb 0f jmp 10e90f <_RTEMS_tasks_Switch_extension+0x3b> <== ALWAYS TAKEN tvp->gval = *tvp->ptr; 10e900: 8b 50 04 mov 0x4(%eax),%edx 10e903: 8b 0a mov (%edx),%ecx 10e905: 89 48 08 mov %ecx,0x8(%eax) *tvp->ptr = tvp->tval; 10e908: 8b 48 0c mov 0xc(%eax),%ecx 10e90b: 89 0a mov %ecx,(%edx) tvp = (rtems_task_variable_t *)tvp->next; 10e90d: 8b 00 mov (%eax),%eax *tvp->ptr = tvp->gval; tvp = (rtems_task_variable_t *)tvp->next; } tvp = heir->task_variables; while (tvp) { 10e90f: 85 c0 test %eax,%eax 10e911: 75 ed jne 10e900 <_RTEMS_tasks_Switch_extension+0x2c> tvp->gval = *tvp->ptr; *tvp->ptr = tvp->tval; tvp = (rtems_task_variable_t *)tvp->next; } } 10e913: c9 leave 10e914: c3 ret 00135488 <_Rate_monotonic_Timeout>: void _Rate_monotonic_Timeout( Objects_Id id, void *ignored ) { 135488: 55 push %ebp 135489: 89 e5 mov %esp,%ebp 13548b: 53 push %ebx 13548c: 83 ec 18 sub $0x18,%esp 13548f: 8d 45 f4 lea -0xc(%ebp),%eax 135492: 50 push %eax 135493: ff 75 08 pushl 0x8(%ebp) 135496: 68 50 47 16 00 push $0x164750 13549b: e8 d0 b8 fd ff call 110d70 <_Objects_Get> 1354a0: 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 ) { 1354a2: 83 c4 10 add $0x10,%esp 1354a5: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 1354a9: 75 64 jne 13550f <_Rate_monotonic_Timeout+0x87> <== ALWAYS TAKEN case OBJECTS_LOCAL: the_thread = the_period->owner; 1354ab: 8b 40 40 mov 0x40(%eax),%eax if ( _States_Is_waiting_for_period( the_thread->current_state ) && 1354ae: f6 40 11 40 testb $0x40,0x11(%eax) 1354b2: 74 18 je 1354cc <_Rate_monotonic_Timeout+0x44> the_thread->Wait.id == the_period->Object.id ) { 1354b4: 8b 50 20 mov 0x20(%eax),%edx 1354b7: 3b 53 08 cmp 0x8(%ebx),%edx 1354ba: 75 10 jne 1354cc <_Rate_monotonic_Timeout+0x44> RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 1354bc: 52 push %edx 1354bd: 52 push %edx 1354be: 68 f8 ff 03 10 push $0x1003fff8 1354c3: 50 push %eax 1354c4: e8 cb bd fd ff call 111294 <_Thread_Clear_state> _Thread_Unblock( the_thread ); _Rate_monotonic_Initiate_statistics( the_period ); 1354c9: 59 pop %ecx 1354ca: eb 10 jmp 1354dc <_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 ) { 1354cc: 83 7b 38 01 cmpl $0x1,0x38(%ebx) 1354d0: 75 2b jne 1354fd <_Rate_monotonic_Timeout+0x75> the_period->state = RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING; 1354d2: c7 43 38 03 00 00 00 movl $0x3,0x38(%ebx) _Rate_monotonic_Initiate_statistics( the_period ); 1354d9: 83 ec 0c sub $0xc,%esp 1354dc: 53 push %ebx 1354dd: e8 52 fc ff ff call 135134 <_Rate_monotonic_Initiate_statistics> <== ALWAYS TAKEN Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 1354e2: 8b 43 3c mov 0x3c(%ebx),%eax 1354e5: 89 43 1c mov %eax,0x1c(%ebx) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 1354e8: 58 pop %eax 1354e9: 5a pop %edx 1354ea: 83 c3 10 add $0x10,%ebx 1354ed: 53 push %ebx 1354ee: 68 a8 3c 16 00 push $0x163ca8 1354f3: e8 d8 ce fd ff call 1123d0 <_Watchdog_Insert> 1354f8: 83 c4 10 add $0x10,%esp 1354fb: eb 07 jmp 135504 <_Rate_monotonic_Timeout+0x7c> <== ALWAYS TAKEN _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); } else the_period->state = RATE_MONOTONIC_EXPIRED; 1354fd: 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; 135504: a1 cc 3b 16 00 mov 0x163bcc,%eax 135509: 48 dec %eax 13550a: a3 cc 3b 16 00 mov %eax,0x163bcc case OBJECTS_REMOTE: /* impossible */ #endif case OBJECTS_ERROR: break; } } 13550f: 8b 5d fc mov -0x4(%ebp),%ebx 135512: c9 leave 135513: c3 ret 0013522e <_Rate_monotonic_Update_statistics>: } void _Rate_monotonic_Update_statistics( Rate_monotonic_Control *the_period ) { 13522e: 55 push %ebp 13522f: 89 e5 mov %esp,%ebp 135231: 56 push %esi 135232: 53 push %ebx 135233: 83 ec 10 sub $0x10,%esp 135236: 8b 5d 08 mov 0x8(%ebp),%ebx /* * Update the counts. */ stats = &the_period->Statistics; stats->count++; 135239: ff 43 54 incl 0x54(%ebx) if ( the_period->state == RATE_MONOTONIC_EXPIRED ) 13523c: 83 7b 38 04 cmpl $0x4,0x38(%ebx) 135240: 75 03 jne 135245 <_Rate_monotonic_Update_statistics+0x17> stats->missed_count++; 135242: ff 43 58 incl 0x58(%ebx) /* * Grab status for time statistics. */ valid_status = _Rate_monotonic_Get_status( the_period, &since_last_period, &executed ); 135245: 52 push %edx 135246: 8d 75 f0 lea -0x10(%ebp),%esi 135249: 56 push %esi 13524a: 8d 45 e8 lea -0x18(%ebp),%eax 13524d: 50 push %eax 13524e: 53 push %ebx 13524f: e8 48 ff ff ff call 13519c <_Rate_monotonic_Get_status> <== ALWAYS TAKEN if (!valid_status) 135254: 83 c4 10 add $0x10,%esp 135257: 84 c0 test %al,%al 135259: 0f 84 a3 00 00 00 je 135302 <_Rate_monotonic_Update_statistics+0xd4> /* * Update CPU time */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_Add_to( &stats->total_cpu_time, &executed ); 13525f: 50 push %eax 135260: 50 push %eax 135261: 56 push %esi 135262: 8d 43 6c lea 0x6c(%ebx),%eax 135265: 50 push %eax 135266: e8 d1 ce fd ff call 11213c <_Timespec_Add_to> if ( _Timestamp_Less_than( &executed, &stats->min_cpu_time ) ) 13526b: 5a pop %edx 13526c: 59 pop %ecx 13526d: 8d 43 5c lea 0x5c(%ebx),%eax 135270: 50 push %eax 135271: 56 push %esi 135272: e8 51 05 00 00 call 1357c8 <_Timespec_Less_than> 135277: 83 c4 10 add $0x10,%esp 13527a: 84 c0 test %al,%al 13527c: 74 0c je 13528a <_Rate_monotonic_Update_statistics+0x5c> stats->min_cpu_time = executed; 13527e: 8b 45 f0 mov -0x10(%ebp),%eax 135281: 8b 55 f4 mov -0xc(%ebp),%edx 135284: 89 43 5c mov %eax,0x5c(%ebx) 135287: 89 53 60 mov %edx,0x60(%ebx) if ( _Timestamp_Greater_than( &executed, &stats->max_cpu_time ) ) 13528a: 50 push %eax 13528b: 50 push %eax 13528c: 8d 43 64 lea 0x64(%ebx),%eax 13528f: 50 push %eax 135290: 8d 45 f0 lea -0x10(%ebp),%eax 135293: 50 push %eax 135294: e8 0b 05 00 00 call 1357a4 <_Timespec_Greater_than> 135299: 83 c4 10 add $0x10,%esp 13529c: 84 c0 test %al,%al 13529e: 74 0c je 1352ac <_Rate_monotonic_Update_statistics+0x7e> stats->max_cpu_time = executed; 1352a0: 8b 45 f0 mov -0x10(%ebp),%eax 1352a3: 8b 55 f4 mov -0xc(%ebp),%edx 1352a6: 89 43 64 mov %eax,0x64(%ebx) 1352a9: 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 ); 1352ac: 56 push %esi 1352ad: 56 push %esi 1352ae: 8d 75 e8 lea -0x18(%ebp),%esi 1352b1: 56 push %esi 1352b2: 8d 83 84 00 00 00 lea 0x84(%ebx),%eax 1352b8: 50 push %eax 1352b9: e8 7e ce fd ff call 11213c <_Timespec_Add_to> if ( _Timestamp_Less_than( &since_last_period, &stats->min_wall_time ) ) 1352be: 5a pop %edx 1352bf: 59 pop %ecx 1352c0: 8d 43 74 lea 0x74(%ebx),%eax 1352c3: 50 push %eax 1352c4: 56 push %esi 1352c5: e8 fe 04 00 00 call 1357c8 <_Timespec_Less_than> 1352ca: 83 c4 10 add $0x10,%esp 1352cd: 84 c0 test %al,%al 1352cf: 74 0c je 1352dd <_Rate_monotonic_Update_statistics+0xaf> stats->min_wall_time = since_last_period; 1352d1: 8b 45 e8 mov -0x18(%ebp),%eax 1352d4: 8b 55 ec mov -0x14(%ebp),%edx 1352d7: 89 43 74 mov %eax,0x74(%ebx) 1352da: 89 53 78 mov %edx,0x78(%ebx) if ( _Timestamp_Greater_than( &since_last_period, &stats->max_wall_time ) ) 1352dd: 50 push %eax 1352de: 50 push %eax 1352df: 8d 43 7c lea 0x7c(%ebx),%eax 1352e2: 50 push %eax 1352e3: 8d 45 e8 lea -0x18(%ebp),%eax 1352e6: 50 push %eax 1352e7: e8 b8 04 00 00 call 1357a4 <_Timespec_Greater_than> 1352ec: 83 c4 10 add $0x10,%esp 1352ef: 84 c0 test %al,%al 1352f1: 74 0f je 135302 <_Rate_monotonic_Update_statistics+0xd4> stats->max_wall_time = since_last_period; 1352f3: 8b 45 e8 mov -0x18(%ebp),%eax 1352f6: 8b 55 ec mov -0x14(%ebp),%edx 1352f9: 89 43 7c mov %eax,0x7c(%ebx) 1352fc: 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 } 135302: 8d 65 f8 lea -0x8(%ebp),%esp 135305: 5b pop %ebx 135306: 5e pop %esi 135307: c9 leave 135308: c3 ret 0011bc6c <_Region_Process_queue>: */ void _Region_Process_queue( Region_Control *the_region ) { 11bc6c: 55 push %ebp 11bc6d: 89 e5 mov %esp,%ebp 11bc6f: 57 push %edi 11bc70: 56 push %esi 11bc71: 53 push %ebx 11bc72: 83 ec 28 sub $0x28,%esp 11bc75: 8b 75 08 mov 0x8(%ebp),%esi 11bc78: a1 c0 d5 13 00 mov 0x13d5c0,%eax 11bc7d: 40 inc %eax 11bc7e: a3 c0 d5 13 00 mov %eax,0x13d5c0 * 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(); 11bc83: ff 35 74 d6 13 00 pushl 0x13d674 11bc89: e8 82 b0 ff ff call 116d10 <_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 ); 11bc8e: 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 ); 11bc91: 8d 46 68 lea 0x68(%esi),%eax 11bc94: 89 45 e4 mov %eax,-0x1c(%ebp) 11bc97: 89 3c 24 mov %edi,(%esp) 11bc9a: e8 95 06 00 00 call 11c334 <_Thread_queue_First> <== ALWAYS TAKEN 11bc9f: 89 c3 mov %eax,%ebx if ( the_thread == NULL ) 11bca1: 83 c4 10 add $0x10,%esp 11bca4: 85 c0 test %eax,%eax 11bca6: 74 30 je 11bcd8 <_Region_Process_queue+0x6c> 11bca8: 6a 00 push $0x0 11bcaa: 6a 00 push $0x0 11bcac: ff 70 24 pushl 0x24(%eax) 11bcaf: ff 75 e4 pushl -0x1c(%ebp) 11bcb2: e8 a9 b9 ff ff call 117660 <_Heap_Allocate_aligned_with_boundary> the_segment = (void **) _Region_Allocate_segment( the_region, the_thread->Wait.count ); if ( the_segment == NULL ) 11bcb7: 83 c4 10 add $0x10,%esp 11bcba: 85 c0 test %eax,%eax 11bcbc: 74 1a je 11bcd8 <_Region_Process_queue+0x6c> break; *(void **)the_thread->Wait.return_argument = the_segment; 11bcbe: 8b 53 28 mov 0x28(%ebx),%edx 11bcc1: 89 02 mov %eax,(%edx) the_region->number_of_used_blocks += 1; 11bcc3: ff 46 64 incl 0x64(%esi) _Thread_queue_Extract( &the_region->Wait_queue, the_thread ); 11bcc6: 50 push %eax 11bcc7: 50 push %eax 11bcc8: 53 push %ebx 11bcc9: 57 push %edi 11bcca: e8 7d 05 00 00 call 11c24c <_Thread_queue_Extract> <== ALWAYS TAKEN the_thread->Wait.return_code = RTEMS_SUCCESSFUL; 11bccf: c7 43 34 00 00 00 00 movl $0x0,0x34(%ebx) 11bcd6: eb bf jmp 11bc97 <_Region_Process_queue+0x2b> <== ALWAYS TAKEN } _Thread_Enable_dispatch(); } 11bcd8: 8d 65 f4 lea -0xc(%ebp),%esp 11bcdb: 5b pop %ebx 11bcdc: 5e pop %esi 11bcdd: 5f pop %edi 11bcde: 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(); 11bcdf: e9 11 cf ff ff jmp 118bf5 <_Thread_Enable_dispatch> 0010bfcc <_TOD_Set>: */ void _TOD_Set( const struct timespec *time ) { 10bfcc: 55 push %ebp 10bfcd: 89 e5 mov %esp,%ebp 10bfcf: 53 push %ebx 10bfd0: 83 ec 04 sub $0x4,%esp 10bfd3: 8b 5d 08 mov 0x8(%ebp),%ebx 10bfd6: a1 d0 ef 12 00 mov 0x12efd0,%eax 10bfdb: 40 inc %eax 10bfdc: a3 d0 ef 12 00 mov %eax,0x12efd0 long seconds; _Thread_Disable_dispatch(); _TOD_Deactivate(); seconds = _TOD_Seconds_since_epoch(); 10bfe1: a1 60 f0 12 00 mov 0x12f060,%eax if ( time->tv_sec < seconds ) 10bfe6: 8b 13 mov (%ebx),%edx 10bfe8: 39 c2 cmp %eax,%edx 10bfea: 7d 08 jge 10bff4 <_TOD_Set+0x28> Watchdog_Adjust_directions direction, Watchdog_Interval units ) { _Watchdog_Adjust( &_Watchdog_Seconds_chain, direction, units ); 10bfec: 51 push %ecx 10bfed: 29 d0 sub %edx,%eax 10bfef: 50 push %eax 10bff0: 6a 01 push $0x1 10bff2: eb 06 jmp 10bffa <_TOD_Set+0x2e> <== ALWAYS TAKEN 10bff4: 51 push %ecx 10bff5: 29 c2 sub %eax,%edx 10bff7: 52 push %edx 10bff8: 6a 00 push $0x0 10bffa: 68 a0 f0 12 00 push $0x12f0a0 10bfff: e8 a4 21 00 00 call 10e1a8 <_Watchdog_Adjust> 10c004: 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 ); 10c007: 8b 03 mov (%ebx),%eax 10c009: a3 60 f0 12 00 mov %eax,0x12f060 10c00e: 8b 43 04 mov 0x4(%ebx),%eax 10c011: a3 64 f0 12 00 mov %eax,0x12f064 _TOD_Is_set = true; 10c016: c6 05 e4 ef 12 00 01 movb $0x1,0x12efe4 _TOD_Activate(); _Thread_Enable_dispatch(); } 10c01d: 8b 5d fc mov -0x4(%ebp),%ebx 10c020: c9 leave _Timestamp_Set( &_TOD_Now, time->tv_sec, time->tv_nsec ); _TOD_Is_set = true; _TOD_Activate(); _Thread_Enable_dispatch(); 10c021: e9 37 11 00 00 jmp 10d15d <_Thread_Enable_dispatch> 0010abf4 <_TOD_Tickle_ticks>: * * Output parameters: NONE */ void _TOD_Tickle_ticks( void ) { 10abf4: 55 push %ebp 10abf5: 89 e5 mov %esp,%ebp 10abf7: 53 push %ebx 10abf8: 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() ); 10abfb: c7 45 f0 00 00 00 00 movl $0x0,-0x10(%ebp) 10ac02: 69 05 04 02 12 00 e8 imul $0x3e8,0x120204,%eax 10ac09: 03 00 00 10ac0c: 89 45 f4 mov %eax,-0xc(%ebp) /* Update the counter of ticks since boot */ _Watchdog_Ticks_since_boot += 1; 10ac0f: a1 38 43 12 00 mov 0x124338,%eax 10ac14: 40 inc %eax 10ac15: a3 38 43 12 00 mov %eax,0x124338 /* Update the timespec format uptime */ _Timestamp_Add_to( &_TOD_Uptime, &tick ); 10ac1a: 8d 5d f0 lea -0x10(%ebp),%ebx 10ac1d: 53 push %ebx 10ac1e: 68 68 42 12 00 push $0x124268 10ac23: e8 f4 1a 00 00 call 10c71c <_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 ); 10ac28: 58 pop %eax 10ac29: 5a pop %edx 10ac2a: 53 push %ebx 10ac2b: 68 7c 42 12 00 push $0x12427c 10ac30: e8 e7 1a 00 00 call 10c71c <_Timespec_Add_to> 10ac35: 89 c3 mov %eax,%ebx 10ac37: eb 0e jmp 10ac47 <_TOD_Tickle_ticks+0x53> <== ALWAYS TAKEN */ RTEMS_INLINE_ROUTINE void _Watchdog_Tickle_seconds( void ) { _Watchdog_Tickle( &_Watchdog_Seconds_chain ); 10ac39: 83 ec 0c sub $0xc,%esp 10ac3c: 68 bc 42 12 00 push $0x1242bc 10ac41: e8 ea 1e 00 00 call 10cb30 <_Watchdog_Tickle> while ( seconds ) { _Watchdog_Tickle_seconds(); seconds--; 10ac46: 4b dec %ebx 10ac47: 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 ) { 10ac4a: 85 db test %ebx,%ebx 10ac4c: 75 eb jne 10ac39 <_TOD_Tickle_ticks+0x45> _Watchdog_Tickle_seconds(); seconds--; } } 10ac4e: 8b 5d fc mov -0x4(%ebp),%ebx 10ac51: c9 leave 10ac52: 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 6e 0f 12 movzwl 0x120f6e(%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 54 0f 12 movzwl 0x120f54(%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 88 0f 12 movzwl 0x120f88(%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 04 32 12 00 mov 0x123204,%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 c4 0f 12 00 mov 0x120fc4(,%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 90 0f 12 00 mov 0x120f90(,%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 0010b754 <_Thread_Change_priority>: void _Thread_Change_priority( Thread_Control *the_thread, Priority_Control new_priority, bool prepend_it ) { 10b754: 55 push %ebp 10b755: 89 e5 mov %esp,%ebp 10b757: 57 push %edi 10b758: 56 push %esi 10b759: 53 push %ebx 10b75a: 83 ec 28 sub $0x28,%esp 10b75d: 8b 5d 08 mov 0x8(%ebp),%ebx 10b760: 8b 7d 0c mov 0xc(%ebp),%edi 10b763: 8a 45 10 mov 0x10(%ebp),%al 10b766: 88 45 e7 mov %al,-0x19(%ebp) */ /* * Save original state */ original_state = the_thread->current_state; 10b769: 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 ); 10b76c: 53 push %ebx 10b76d: e8 3a 0d 00 00 call 10c4ac <_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 ) 10b772: 83 c4 10 add $0x10,%esp 10b775: 39 7b 14 cmp %edi,0x14(%ebx) 10b778: 74 0c je 10b786 <_Thread_Change_priority+0x32> _Thread_Set_priority( the_thread, new_priority ); 10b77a: 50 push %eax 10b77b: 50 push %eax 10b77c: 57 push %edi 10b77d: 53 push %ebx 10b77e: e8 f1 0b 00 00 call 10c374 <_Thread_Set_priority> <== ALWAYS TAKEN 10b783: 83 c4 10 add $0x10,%esp _ISR_Disable( level ); 10b786: 9c pushf 10b787: fa cli 10b788: 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; 10b789: 8b 43 10 mov 0x10(%ebx),%eax if ( state != STATES_TRANSIENT ) { 10b78c: 83 f8 04 cmp $0x4,%eax 10b78f: 74 2f je 10b7c0 <_Thread_Change_priority+0x6c> /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) 10b791: 83 e6 04 and $0x4,%esi 10b794: 75 08 jne 10b79e <_Thread_Change_priority+0x4a> <== ALWAYS TAKEN the_thread->current_state = _States_Clear( STATES_TRANSIENT, state ); 10b796: 89 c2 mov %eax,%edx 10b798: 83 e2 fb and $0xfffffffb,%edx 10b79b: 89 53 10 mov %edx,0x10(%ebx) _ISR_Enable( level ); 10b79e: 51 push %ecx 10b79f: 9d popf if ( _States_Is_waiting_on_thread_queue( state ) ) { 10b7a0: a9 e0 be 03 00 test $0x3bee0,%eax 10b7a5: 0f 84 c0 00 00 00 je 10b86b <_Thread_Change_priority+0x117> _Thread_queue_Requeue( the_thread->Wait.queue, the_thread ); 10b7ab: 89 5d 0c mov %ebx,0xc(%ebp) 10b7ae: 8b 43 44 mov 0x44(%ebx),%eax 10b7b1: 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 ); } 10b7b4: 8d 65 f4 lea -0xc(%ebp),%esp 10b7b7: 5b pop %ebx 10b7b8: 5e pop %esi 10b7b9: 5f pop %edi 10b7ba: 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 ); 10b7bb: e9 2c 0b 00 00 jmp 10c2ec <_Thread_queue_Requeue> <== ALWAYS TAKEN } return; } /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) { 10b7c0: 83 e6 04 and $0x4,%esi 10b7c3: 75 53 jne 10b818 <_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 ); 10b7c5: 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; 10b7cc: 8b 83 90 00 00 00 mov 0x90(%ebx),%eax 10b7d2: 66 8b 93 96 00 00 00 mov 0x96(%ebx),%dx 10b7d9: 66 09 10 or %dx,(%eax) _Priority_Major_bit_map |= the_priority_map->ready_major; 10b7dc: 66 a1 9c 42 12 00 mov 0x12429c,%ax 10b7e2: 0b 83 94 00 00 00 or 0x94(%ebx),%eax 10b7e8: 66 a3 9c 42 12 00 mov %ax,0x12429c _Priority_Add_to_bit_map( &the_thread->Priority_map ); if ( prepend_it ) 10b7ee: 80 7d e7 00 cmpb $0x0,-0x19(%ebp) 10b7f2: 8b 83 8c 00 00 00 mov 0x8c(%ebx),%eax 10b7f8: 74 0e je 10b808 <_Thread_Change_priority+0xb4> Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 10b7fa: 89 43 04 mov %eax,0x4(%ebx) before_node = after_node->next; 10b7fd: 8b 10 mov (%eax),%edx after_node->next = the_node; 10b7ff: 89 18 mov %ebx,(%eax) the_node->next = before_node; 10b801: 89 13 mov %edx,(%ebx) before_node->previous = the_node; 10b803: 89 5a 04 mov %ebx,0x4(%edx) 10b806: eb 10 jmp 10b818 <_Thread_Change_priority+0xc4> <== ALWAYS TAKEN Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 10b808: 8d 50 04 lea 0x4(%eax),%edx 10b80b: 89 13 mov %edx,(%ebx) old_last_node = the_chain->last; 10b80d: 8b 50 08 mov 0x8(%eax),%edx the_chain->last = the_node; 10b810: 89 58 08 mov %ebx,0x8(%eax) old_last_node->next = the_node; 10b813: 89 1a mov %ebx,(%edx) the_node->previous = old_last_node; 10b815: 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 ); 10b818: 51 push %ecx 10b819: 9d popf 10b81a: 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 ); 10b81b: 66 8b 1d 9c 42 12 00 mov 0x12429c,%bx 10b822: 31 c0 xor %eax,%eax 10b824: 89 c2 mov %eax,%edx 10b826: 66 0f bc d3 bsf %bx,%dx _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); 10b82a: 0f b7 d2 movzwl %dx,%edx 10b82d: 66 8b 9c 12 14 43 12 mov 0x124314(%edx,%edx,1),%bx 10b834: 00 10b835: 66 0f bc c3 bsf %bx,%ax * ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) 10b839: c1 e2 04 shl $0x4,%edx 10b83c: 0f b7 c0 movzwl %ax,%eax 10b83f: 01 c2 add %eax,%edx 10b841: 6b d2 0c imul $0xc,%edx,%edx 10b844: 8b 1d b4 41 12 00 mov 0x1241b4,%ebx 10b84a: 8b 14 1a mov (%edx,%ebx,1),%edx 10b84d: 89 15 78 42 12 00 mov %edx,0x124278 * is also the heir thread, and false otherwise. */ RTEMS_INLINE_ROUTINE bool _Thread_Is_executing_also_the_heir( void ) { return ( _Thread_Executing == _Thread_Heir ); 10b853: a1 a8 42 12 00 mov 0x1242a8,%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() && 10b858: 39 d0 cmp %edx,%eax 10b85a: 74 0d je 10b869 <_Thread_Change_priority+0x115> _Thread_Executing->is_preemptible ) 10b85c: 80 78 75 00 cmpb $0x0,0x75(%eax) 10b860: 74 07 je 10b869 <_Thread_Change_priority+0x115> _Context_Switch_necessary = true; 10b862: c6 05 b8 42 12 00 01 movb $0x1,0x1242b8 _ISR_Enable( level ); 10b869: 51 push %ecx 10b86a: 9d popf } 10b86b: 8d 65 f4 lea -0xc(%ebp),%esp 10b86e: 5b pop %ebx 10b86f: 5e pop %esi 10b870: 5f pop %edi 10b871: c9 leave 10b872: c3 ret 0010b874 <_Thread_Clear_state>: void _Thread_Clear_state( Thread_Control *the_thread, States_Control state ) { 10b874: 55 push %ebp 10b875: 89 e5 mov %esp,%ebp 10b877: 53 push %ebx 10b878: 8b 45 08 mov 0x8(%ebp),%eax 10b87b: 8b 55 0c mov 0xc(%ebp),%edx ISR_Level level; States_Control current_state; _ISR_Disable( level ); 10b87e: 9c pushf 10b87f: fa cli 10b880: 59 pop %ecx current_state = the_thread->current_state; 10b881: 8b 58 10 mov 0x10(%eax),%ebx if ( current_state & state ) { 10b884: 85 da test %ebx,%edx 10b886: 74 71 je 10b8f9 <_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); 10b888: f7 d2 not %edx 10b88a: 21 da and %ebx,%edx current_state = 10b88c: 89 50 10 mov %edx,0x10(%eax) the_thread->current_state = _States_Clear( state, current_state ); if ( _States_Is_ready( current_state ) ) { 10b88f: 85 d2 test %edx,%edx 10b891: 75 66 jne 10b8f9 <_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; 10b893: 8b 90 90 00 00 00 mov 0x90(%eax),%edx 10b899: 66 8b 98 96 00 00 00 mov 0x96(%eax),%bx 10b8a0: 66 09 1a or %bx,(%edx) _Priority_Major_bit_map |= the_priority_map->ready_major; 10b8a3: 66 8b 15 9c 42 12 00 mov 0x12429c,%dx 10b8aa: 0b 90 94 00 00 00 or 0x94(%eax),%edx 10b8b0: 66 89 15 9c 42 12 00 mov %dx,0x12429c _Priority_Add_to_bit_map( &the_thread->Priority_map ); _Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node); 10b8b7: 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); 10b8bd: 8d 5a 04 lea 0x4(%edx),%ebx 10b8c0: 89 18 mov %ebx,(%eax) old_last_node = the_chain->last; 10b8c2: 8b 5a 08 mov 0x8(%edx),%ebx the_chain->last = the_node; 10b8c5: 89 42 08 mov %eax,0x8(%edx) old_last_node->next = the_node; 10b8c8: 89 03 mov %eax,(%ebx) the_node->previous = old_last_node; 10b8ca: 89 58 04 mov %ebx,0x4(%eax) _ISR_Flash( level ); 10b8cd: 51 push %ecx 10b8ce: 9d popf 10b8cf: 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 ) { 10b8d0: 8b 50 14 mov 0x14(%eax),%edx 10b8d3: 8b 1d 78 42 12 00 mov 0x124278,%ebx 10b8d9: 3b 53 14 cmp 0x14(%ebx),%edx 10b8dc: 73 1b jae 10b8f9 <_Thread_Clear_state+0x85> _Thread_Heir = the_thread; 10b8de: a3 78 42 12 00 mov %eax,0x124278 if ( _Thread_Executing->is_preemptible || 10b8e3: a1 a8 42 12 00 mov 0x1242a8,%eax 10b8e8: 80 78 75 00 cmpb $0x0,0x75(%eax) 10b8ec: 75 04 jne 10b8f2 <_Thread_Clear_state+0x7e> 10b8ee: 85 d2 test %edx,%edx 10b8f0: 75 07 jne 10b8f9 <_Thread_Clear_state+0x85> <== NEVER TAKEN the_thread->current_priority == 0 ) _Context_Switch_necessary = true; 10b8f2: c6 05 b8 42 12 00 01 movb $0x1,0x1242b8 } } } _ISR_Enable( level ); 10b8f9: 51 push %ecx 10b8fa: 9d popf } 10b8fb: 5b pop %ebx 10b8fc: c9 leave 10b8fd: c3 ret 0010b900 <_Thread_Close>: void _Thread_Close( Objects_Information *information, Thread_Control *the_thread ) { 10b900: 55 push %ebp 10b901: 89 e5 mov %esp,%ebp 10b903: 56 push %esi 10b904: 53 push %ebx 10b905: 8b 75 08 mov 0x8(%ebp),%esi 10b908: 8b 5d 0c mov 0xc(%ebp),%ebx 10b90b: 0f b7 53 08 movzwl 0x8(%ebx),%edx 10b90f: 8b 46 1c mov 0x1c(%esi),%eax 10b912: 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; 10b919: a1 ec 41 12 00 mov 0x1241ec,%eax 10b91e: 48 dec %eax 10b91f: a3 ec 41 12 00 mov %eax,0x1241ec * disappear and set a transient state on it. So we temporarily * unnest dispatching. */ _Thread_Unnest_dispatch(); _User_extensions_Thread_delete( the_thread ); 10b924: 83 ec 0c sub $0xc,%esp 10b927: 53 push %ebx 10b928: e8 df 0f 00 00 call 10c90c <_User_extensions_Thread_delete> rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10b92d: a1 ec 41 12 00 mov 0x1241ec,%eax 10b932: 40 inc %eax 10b933: a3 ec 41 12 00 mov %eax,0x1241ec /* * 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 ); 10b938: 59 pop %ecx 10b939: 58 pop %eax 10b93a: 53 push %ebx 10b93b: 56 push %esi 10b93c: e8 17 f7 ff ff call 10b058 <_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 ); 10b941: 58 pop %eax 10b942: 5a pop %edx 10b943: 6a 01 push $0x1 10b945: 53 push %ebx 10b946: e8 91 0a 00 00 call 10c3dc <_Thread_Set_state> <== ALWAYS TAKEN if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) { 10b94b: 89 1c 24 mov %ebx,(%esp) 10b94e: e8 f9 08 00 00 call 10c24c <_Thread_queue_Extract_with_proxy> <== ALWAYS TAKEN 10b953: 83 c4 10 add $0x10,%esp 10b956: 84 c0 test %al,%al 10b958: 75 15 jne 10b96f <_Thread_Close+0x6f> if ( _Watchdog_Is_active( &the_thread->Timer ) ) 10b95a: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 10b95e: 75 0f jne 10b96f <_Thread_Close+0x6f> (void) _Watchdog_Remove( &the_thread->Timer ); 10b960: 83 ec 0c sub $0xc,%esp 10b963: 8d 43 48 lea 0x48(%ebx),%eax 10b966: 50 push %eax 10b967: e8 5c 11 00 00 call 10cac8 <_Watchdog_Remove> 10b96c: 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 ) ) 10b96f: 3b 1d 70 42 12 00 cmp 0x124270,%ebx 10b975: 75 0a jne 10b981 <_Thread_Close+0x81> */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Deallocate_fp( void ) { _Thread_Allocated_fp = NULL; 10b977: c7 05 70 42 12 00 00 movl $0x0,0x124270 10b97e: 00 00 00 _Thread_Deallocate_fp(); #endif the_thread->fp_context = NULL; 10b981: c7 83 ec 00 00 00 00 movl $0x0,0xec(%ebx) 10b988: 00 00 00 if ( the_thread->Start.fp_context ) 10b98b: 8b 83 cc 00 00 00 mov 0xcc(%ebx),%eax 10b991: 85 c0 test %eax,%eax 10b993: 74 0c je 10b9a1 <_Thread_Close+0xa1> (void) _Workspace_Free( the_thread->Start.fp_context ); 10b995: 83 ec 0c sub $0xc,%esp 10b998: 50 push %eax 10b999: e8 3f 12 00 00 call 10cbdd <_Workspace_Free> 10b99e: 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 ); 10b9a1: 83 ec 0c sub $0xc,%esp 10b9a4: 53 push %ebx 10b9a5: e8 c6 0b 00 00 call 10c570 <_Thread_Stack_Free> <== ALWAYS TAKEN the_thread->Start.stack = NULL; 10b9aa: c7 83 d0 00 00 00 00 movl $0x0,0xd0(%ebx) 10b9b1: 00 00 00 if ( the_thread->extensions ) 10b9b4: 8b 83 00 01 00 00 mov 0x100(%ebx),%eax 10b9ba: 83 c4 10 add $0x10,%esp 10b9bd: 85 c0 test %eax,%eax 10b9bf: 74 0c je 10b9cd <_Thread_Close+0xcd> (void) _Workspace_Free( the_thread->extensions ); 10b9c1: 83 ec 0c sub $0xc,%esp 10b9c4: 50 push %eax 10b9c5: e8 13 12 00 00 call 10cbdd <_Workspace_Free> 10b9ca: 83 c4 10 add $0x10,%esp the_thread->extensions = NULL; 10b9cd: c7 83 00 01 00 00 00 movl $0x0,0x100(%ebx) 10b9d4: 00 00 00 } 10b9d7: 8d 65 f8 lea -0x8(%ebp),%esp 10b9da: 5b pop %ebx 10b9db: 5e pop %esi 10b9dc: c9 leave 10b9dd: c3 ret 0010b9e0 <_Thread_Create_idle>: * * _Thread_Create_idle */ void _Thread_Create_idle( void ) { 10b9e0: 55 push %ebp 10b9e1: 89 e5 mov %esp,%ebp 10b9e3: 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 ); 10b9e6: 68 44 43 12 00 push $0x124344 10b9eb: e8 fc f5 ff ff call 10afec <_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(); 10b9f0: a3 8c 43 12 00 mov %eax,0x12438c rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10b9f5: a1 ec 41 12 00 mov 0x1241ec,%eax 10b9fa: 40 inc %eax 10b9fb: a3 ec 41 12 00 mov %eax,0x1241ec * that when _Thread_Initialize unnests dispatch that we do not * do anything stupid. */ _Thread_Disable_dispatch(); _Thread_Initialize( 10ba00: 8b 15 10 02 12 00 mov 0x120210,%edx 10ba06: 83 c4 0c add $0xc,%esp 10ba09: 68 45 4c 44 49 push $0x49444c45 10ba0e: 6a 00 push $0x0 10ba10: 6a 00 push $0x0 10ba12: 6a 00 push $0x0 10ba14: 6a 01 push $0x1 10ba16: 0f b6 05 f4 01 12 00 movzbl 0x1201f4,%eax 10ba1d: 50 push %eax 10ba1e: 6a 00 push $0x0 10ba20: a1 f0 01 12 00 mov 0x1201f0,%eax 10ba25: 39 d0 cmp %edx,%eax 10ba27: 73 02 jae 10ba2b <_Thread_Create_idle+0x4b> 10ba29: 89 d0 mov %edx,%eax 10ba2b: 50 push %eax 10ba2c: 6a 00 push $0x0 10ba2e: ff 35 8c 43 12 00 pushl 0x12438c 10ba34: 68 44 43 12 00 push $0x124344 10ba39: e8 4a 02 00 00 call 10bc88 <_Thread_Initialize> <== ALWAYS TAKEN */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 10ba3e: a1 ec 41 12 00 mov 0x1241ec,%eax 10ba43: 48 dec %eax 10ba44: a3 ec 41 12 00 mov %eax,0x1241ec /* * WARNING!!! This is necessary to "kick" start the system and * MUST be done before _Thread_Start is invoked. */ _Thread_Heir = _Thread_Executing = _Thread_Idle; 10ba49: a1 8c 43 12 00 mov 0x12438c,%eax /* * WARNING!!! This is necessary to "kick" start the system and * MUST be done before _Thread_Start is invoked. */ _Thread_Heir = 10ba4e: a3 a8 42 12 00 mov %eax,0x1242a8 10ba53: a3 78 42 12 00 mov %eax,0x124278 _Thread_Executing = _Thread_Idle; _Thread_Start( 10ba58: 83 c4 24 add $0x24,%esp 10ba5b: 6a 00 push $0x0 10ba5d: 6a 00 push $0x0 10ba5f: ff 35 0c 02 12 00 pushl 0x12020c 10ba65: 6a 00 push $0x0 10ba67: 50 push %eax 10ba68: e8 8f 0b 00 00 call 10c5fc <_Thread_Start> <== ALWAYS TAKEN 10ba6d: 83 c4 20 add $0x20,%esp Configuration.idle_task, NULL, 0 ); } 10ba70: c9 leave 10ba71: c3 ret 0010ba74 <_Thread_Delay_ended>: void _Thread_Delay_ended( Objects_Id id, void *ignored __attribute__((unused)) ) { 10ba74: 55 push %ebp 10ba75: 89 e5 mov %esp,%ebp 10ba77: 83 ec 20 sub $0x20,%esp Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 10ba7a: 8d 45 f4 lea -0xc(%ebp),%eax 10ba7d: 50 push %eax 10ba7e: ff 75 08 pushl 0x8(%ebp) 10ba81: e8 8e 01 00 00 call 10bc14 <_Thread_Get> <== ALWAYS TAKEN switch ( location ) { 10ba86: 83 c4 10 add $0x10,%esp 10ba89: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 10ba8d: 75 1b jne 10baaa <_Thread_Delay_ended+0x36> <== ALWAYS TAKEN #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_Clear_state( 10ba8f: 52 push %edx 10ba90: 52 push %edx 10ba91: 68 18 00 00 10 push $0x10000018 10ba96: 50 push %eax 10ba97: e8 d8 fd ff ff call 10b874 <_Thread_Clear_state> <== ALWAYS TAKEN 10ba9c: a1 ec 41 12 00 mov 0x1241ec,%eax 10baa1: 48 dec %eax 10baa2: a3 ec 41 12 00 mov %eax,0x1241ec 10baa7: 83 c4 10 add $0x10,%esp | STATES_INTERRUPTIBLE_BY_SIGNAL ); _Thread_Unnest_dispatch(); break; } } 10baaa: c9 leave 10baab: c3 ret 0010baac <_Thread_Dispatch>: * dispatch thread * no dispatch thread */ void _Thread_Dispatch( void ) { 10baac: 55 push %ebp 10baad: 89 e5 mov %esp,%ebp 10baaf: 57 push %edi 10bab0: 56 push %esi 10bab1: 53 push %ebx 10bab2: 83 ec 1c sub $0x1c,%esp Thread_Control *executing; Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; 10bab5: 8b 1d a8 42 12 00 mov 0x1242a8,%ebx _ISR_Disable( level ); 10babb: 9c pushf 10babc: fa cli 10babd: 58 pop %eax #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ { Timestamp_Control uptime, ran; _TOD_Get_uptime( &uptime ); _Timestamp_Subtract( 10babe: 8d 7d d8 lea -0x28(%ebp),%edi Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; _ISR_Disable( level ); while ( _Context_Switch_necessary == true ) { 10bac1: e9 f1 00 00 00 jmp 10bbb7 <_Thread_Dispatch+0x10b> <== ALWAYS TAKEN heir = _Thread_Heir; 10bac6: 8b 35 78 42 12 00 mov 0x124278,%esi _Thread_Dispatch_disable_level = 1; 10bacc: c7 05 ec 41 12 00 01 movl $0x1,0x1241ec 10bad3: 00 00 00 _Context_Switch_necessary = false; 10bad6: c6 05 b8 42 12 00 00 movb $0x0,0x1242b8 _Thread_Executing = heir; 10badd: 89 35 a8 42 12 00 mov %esi,0x1242a8 #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 ) 10bae3: 83 7e 7c 01 cmpl $0x1,0x7c(%esi) 10bae7: 75 09 jne 10baf2 <_Thread_Dispatch+0x46> heir->cpu_time_budget = _Thread_Ticks_per_timeslice; 10bae9: 8b 15 b8 41 12 00 mov 0x1241b8,%edx 10baef: 89 56 78 mov %edx,0x78(%esi) _ISR_Enable( level ); 10baf2: 50 push %eax 10baf3: 9d popf #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ { Timestamp_Control uptime, ran; _TOD_Get_uptime( &uptime ); 10baf4: 83 ec 0c sub $0xc,%esp 10baf7: 8d 45 e0 lea -0x20(%ebp),%eax 10bafa: 50 push %eax 10bafb: e8 cc 32 00 00 call 10edcc <_TOD_Get_uptime> _Timestamp_Subtract( 10bb00: 83 c4 0c add $0xc,%esp 10bb03: 57 push %edi 10bb04: 8d 45 e0 lea -0x20(%ebp),%eax 10bb07: 50 push %eax 10bb08: 68 b0 42 12 00 push $0x1242b0 10bb0d: e8 3a 0c 00 00 call 10c74c <_Timespec_Subtract> <== ALWAYS TAKEN &_Thread_Time_of_last_context_switch, &uptime, &ran ); _Timestamp_Add_to( &executing->cpu_time_used, &ran ); 10bb12: 58 pop %eax 10bb13: 5a pop %edx 10bb14: 57 push %edi 10bb15: 8d 83 84 00 00 00 lea 0x84(%ebx),%eax 10bb1b: 50 push %eax 10bb1c: e8 fb 0b 00 00 call 10c71c <_Timespec_Add_to> <== ALWAYS TAKEN _Thread_Time_of_last_context_switch = uptime; 10bb21: 8b 45 e0 mov -0x20(%ebp),%eax 10bb24: 8b 55 e4 mov -0x1c(%ebp),%edx 10bb27: a3 b0 42 12 00 mov %eax,0x1242b0 10bb2c: 89 15 b4 42 12 00 mov %edx,0x1242b4 #endif /* * Switch libc's task specific data. */ if ( _Thread_libc_reent ) { 10bb32: a1 74 42 12 00 mov 0x124274,%eax 10bb37: 83 c4 10 add $0x10,%esp 10bb3a: 85 c0 test %eax,%eax 10bb3c: 74 10 je 10bb4e <_Thread_Dispatch+0xa2> <== ALWAYS TAKEN executing->libc_reent = *_Thread_libc_reent; 10bb3e: 8b 10 mov (%eax),%edx 10bb40: 89 93 f0 00 00 00 mov %edx,0xf0(%ebx) *_Thread_libc_reent = heir->libc_reent; 10bb46: 8b 96 f0 00 00 00 mov 0xf0(%esi),%edx 10bb4c: 89 10 mov %edx,(%eax) } _User_extensions_Thread_switch( executing, heir ); 10bb4e: 51 push %ecx 10bb4f: 51 push %ecx 10bb50: 56 push %esi 10bb51: 53 push %ebx 10bb52: e8 25 0e 00 00 call 10c97c <_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 ); 10bb57: 58 pop %eax 10bb58: 5a pop %edx 10bb59: 81 c6 d4 00 00 00 add $0xd4,%esi 10bb5f: 56 push %esi 10bb60: 8d 83 d4 00 00 00 lea 0xd4(%ebx),%eax 10bb66: 50 push %eax 10bb67: e8 d4 10 00 00 call 10cc40 <_CPU_Context_switch> #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( (executing->fp_context != NULL) && 10bb6c: 83 c4 10 add $0x10,%esp 10bb6f: 83 bb ec 00 00 00 00 cmpl $0x0,0xec(%ebx) 10bb76: 74 36 je 10bbae <_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 ); 10bb78: a1 70 42 12 00 mov 0x124270,%eax 10bb7d: 39 c3 cmp %eax,%ebx 10bb7f: 74 2d je 10bbae <_Thread_Dispatch+0x102> !_Thread_Is_allocated_fp( executing ) ) { if ( _Thread_Allocated_fp != NULL ) 10bb81: 85 c0 test %eax,%eax 10bb83: 74 11 je 10bb96 <_Thread_Dispatch+0xea> _Context_Save_fp( &_Thread_Allocated_fp->fp_context ); 10bb85: 83 ec 0c sub $0xc,%esp 10bb88: 05 ec 00 00 00 add $0xec,%eax 10bb8d: 50 push %eax 10bb8e: e8 e1 10 00 00 call 10cc74 <_CPU_Context_save_fp> 10bb93: 83 c4 10 add $0x10,%esp _Context_Restore_fp( &executing->fp_context ); 10bb96: 83 ec 0c sub $0xc,%esp 10bb99: 8d 83 ec 00 00 00 lea 0xec(%ebx),%eax 10bb9f: 50 push %eax 10bba0: e8 d9 10 00 00 call 10cc7e <_CPU_Context_restore_fp> _Thread_Allocated_fp = executing; 10bba5: 89 1d 70 42 12 00 mov %ebx,0x124270 10bbab: 83 c4 10 add $0x10,%esp if ( executing->fp_context != NULL ) _Context_Restore_fp( &executing->fp_context ); #endif #endif executing = _Thread_Executing; 10bbae: 8b 1d a8 42 12 00 mov 0x1242a8,%ebx _ISR_Disable( level ); 10bbb4: 9c pushf 10bbb5: fa cli 10bbb6: 58 pop %eax Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; _ISR_Disable( level ); while ( _Context_Switch_necessary == true ) { 10bbb7: 8a 15 b8 42 12 00 mov 0x1242b8,%dl 10bbbd: 84 d2 test %dl,%dl 10bbbf: 0f 85 01 ff ff ff jne 10bac6 <_Thread_Dispatch+0x1a> executing = _Thread_Executing; _ISR_Disable( level ); } _Thread_Dispatch_disable_level = 0; 10bbc5: c7 05 ec 41 12 00 00 movl $0x0,0x1241ec 10bbcc: 00 00 00 _ISR_Enable( level ); 10bbcf: 50 push %eax 10bbd0: 9d popf if ( _Thread_Do_post_task_switch_extension || 10bbd1: 83 3d 8c 42 12 00 00 cmpl $0x0,0x12428c 10bbd8: 75 06 jne 10bbe0 <_Thread_Dispatch+0x134> executing->do_post_task_switch_extension ) { 10bbda: 80 7b 74 00 cmpb $0x0,0x74(%ebx) 10bbde: 74 09 je 10bbe9 <_Thread_Dispatch+0x13d> executing->do_post_task_switch_extension = false; 10bbe0: c6 43 74 00 movb $0x0,0x74(%ebx) _API_extensions_Run_postswitch(); 10bbe4: e8 92 ea ff ff call 10a67b <_API_extensions_Run_postswitch> } } 10bbe9: 8d 65 f4 lea -0xc(%ebp),%esp 10bbec: 5b pop %ebx 10bbed: 5e pop %esi 10bbee: 5f pop %edi 10bbef: c9 leave 10bbf0: c3 ret 0010bbf1 <_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 ) { 10bbf1: 55 push %ebp 10bbf2: 89 e5 mov %esp,%ebp 10bbf4: 83 ec 08 sub $0x8,%esp if ( --_Thread_Dispatch_disable_level ) 10bbf7: a1 ec 41 12 00 mov 0x1241ec,%eax 10bbfc: 48 dec %eax 10bbfd: a3 ec 41 12 00 mov %eax,0x1241ec 10bc02: a1 ec 41 12 00 mov 0x1241ec,%eax 10bc07: 85 c0 test %eax,%eax 10bc09: 75 06 jne 10bc11 <_Thread_Enable_dispatch+0x20> return; _Thread_Dispatch(); } 10bc0b: c9 leave (__RTEMS_DO_NOT_INLINE_THREAD_ENABLE_DISPATCH__ == 1) ) void _Thread_Enable_dispatch( void ) { if ( --_Thread_Dispatch_disable_level ) return; _Thread_Dispatch(); 10bc0c: e9 9b fe ff ff jmp 10baac <_Thread_Dispatch> <== ALWAYS TAKEN } 10bc11: c9 leave 10bc12: c3 ret 00110b0c <_Thread_Evaluate_mode>: * * XXX */ bool _Thread_Evaluate_mode( void ) { 110b0c: 55 push %ebp 110b0d: 89 e5 mov %esp,%ebp Thread_Control *executing; executing = _Thread_Executing; 110b0f: a1 a8 42 12 00 mov 0x1242a8,%eax if ( !_States_Is_ready( executing->current_state ) || 110b14: 83 78 10 00 cmpl $0x0,0x10(%eax) 110b18: 75 0e jne 110b28 <_Thread_Evaluate_mode+0x1c> <== ALWAYS TAKEN 110b1a: 3b 05 78 42 12 00 cmp 0x124278,%eax 110b20: 74 11 je 110b33 <_Thread_Evaluate_mode+0x27> ( !_Thread_Is_heir( executing ) && executing->is_preemptible ) ) { 110b22: 80 78 75 00 cmpb $0x0,0x75(%eax) 110b26: 74 0b je 110b33 <_Thread_Evaluate_mode+0x27> <== ALWAYS TAKEN _Context_Switch_necessary = true; 110b28: c6 05 b8 42 12 00 01 movb $0x1,0x1242b8 110b2f: b0 01 mov $0x1,%al return true; 110b31: eb 02 jmp 110b35 <_Thread_Evaluate_mode+0x29> <== ALWAYS TAKEN 110b33: 31 c0 xor %eax,%eax } return false; } 110b35: c9 leave 110b36: c3 ret 0010bc14 <_Thread_Get>: Thread_Control *_Thread_Get ( Objects_Id id, Objects_Locations *location ) { 10bc14: 55 push %ebp 10bc15: 89 e5 mov %esp,%ebp 10bc17: 53 push %ebx 10bc18: 83 ec 04 sub $0x4,%esp 10bc1b: 8b 55 08 mov 0x8(%ebp),%edx 10bc1e: 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 ) ) { 10bc21: 85 d2 test %edx,%edx 10bc23: 75 1a jne 10bc3f <_Thread_Get+0x2b> rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10bc25: 8b 15 ec 41 12 00 mov 0x1241ec,%edx 10bc2b: 42 inc %edx 10bc2c: 89 15 ec 41 12 00 mov %edx,0x1241ec _Thread_Disable_dispatch(); *location = OBJECTS_LOCAL; 10bc32: c7 00 00 00 00 00 movl $0x0,(%eax) tp = _Thread_Executing; 10bc38: a1 a8 42 12 00 mov 0x1242a8,%eax goto done; 10bc3d: eb 3a jmp 10bc79 <_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); 10bc3f: 89 d1 mov %edx,%ecx 10bc41: c1 e9 18 shr $0x18,%ecx 10bc44: 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 ) 10bc47: 8d 59 ff lea -0x1(%ecx),%ebx 10bc4a: 83 fb 03 cmp $0x3,%ebx 10bc4d: 76 2f jbe 10bc7e <_Thread_Get+0x6a> 10bc4f: eb 12 jmp 10bc63 <_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 ]; 10bc51: 8b 0c 8d c0 41 12 00 mov 0x1241c0(,%ecx,4),%ecx if ( !api_information ) { 10bc58: 85 c9 test %ecx,%ecx 10bc5a: 74 07 je 10bc63 <_Thread_Get+0x4f> *location = OBJECTS_ERROR; goto done; } information = api_information[ the_class ]; 10bc5c: 8b 49 04 mov 0x4(%ecx),%ecx if ( !information ) { 10bc5f: 85 c9 test %ecx,%ecx 10bc61: 75 0a jne 10bc6d <_Thread_Get+0x59> *location = OBJECTS_ERROR; 10bc63: c7 00 01 00 00 00 movl $0x1,(%eax) 10bc69: 31 c0 xor %eax,%eax goto done; 10bc6b: eb 0c jmp 10bc79 <_Thread_Get+0x65> <== ALWAYS TAKEN } tp = (Thread_Control *) _Objects_Get( information, id, location ); 10bc6d: 53 push %ebx 10bc6e: 50 push %eax 10bc6f: 52 push %edx 10bc70: 51 push %ecx 10bc71: e8 8a f7 ff ff call 10b400 <_Objects_Get> <== ALWAYS TAKEN 10bc76: 83 c4 10 add $0x10,%esp done: return tp; } 10bc79: 8b 5d fc mov -0x4(%ebp),%ebx 10bc7c: c9 leave 10bc7d: c3 ret *location = OBJECTS_ERROR; goto done; } the_class = _Objects_Get_class( id ); if ( the_class != 1 ) { /* threads are always first class :) */ 10bc7e: 89 d3 mov %edx,%ebx 10bc80: c1 eb 1b shr $0x1b,%ebx 10bc83: 4b dec %ebx 10bc84: 74 cb je 10bc51 <_Thread_Get+0x3d> 10bc86: eb db jmp 10bc63 <_Thread_Get+0x4f> <== ALWAYS TAKEN 00110b38 <_Thread_Handler>: * * Output parameters: NONE */ void _Thread_Handler( void ) { 110b38: 55 push %ebp 110b39: 89 e5 mov %esp,%ebp 110b3b: 53 push %ebx 110b3c: 83 ec 14 sub $0x14,%esp #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) static char doneConstructors; char doneCons; #endif executing = _Thread_Executing; 110b3f: 8b 1d a8 42 12 00 mov 0x1242a8,%ebx /* * have to put level into a register for those cpu's that use * inline asm here */ level = executing->Start.isr_level; 110b45: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax _ISR_Set_level(level); 110b4b: 85 c0 test %eax,%eax 110b4d: 74 03 je 110b52 <_Thread_Handler+0x1a> 110b4f: fa cli 110b50: eb 01 jmp 110b53 <_Thread_Handler+0x1b> <== ALWAYS TAKEN 110b52: fb sti #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) doneCons = doneConstructors; 110b53: a0 98 3e 12 00 mov 0x123e98,%al 110b58: 88 45 f7 mov %al,-0x9(%ebp) doneConstructors = 1; 110b5b: c6 05 98 3e 12 00 01 movb $0x1,0x123e98 #endif #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( (executing->fp_context != NULL) && 110b62: 83 bb ec 00 00 00 00 cmpl $0x0,0xec(%ebx) 110b69: 74 24 je 110b8f <_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 ); 110b6b: a1 70 42 12 00 mov 0x124270,%eax 110b70: 39 c3 cmp %eax,%ebx 110b72: 74 1b je 110b8f <_Thread_Handler+0x57> !_Thread_Is_allocated_fp( executing ) ) { if ( _Thread_Allocated_fp != NULL ) 110b74: 85 c0 test %eax,%eax 110b76: 74 11 je 110b89 <_Thread_Handler+0x51> _Context_Save_fp( &_Thread_Allocated_fp->fp_context ); 110b78: 83 ec 0c sub $0xc,%esp 110b7b: 05 ec 00 00 00 add $0xec,%eax 110b80: 50 push %eax 110b81: e8 ee c0 ff ff call 10cc74 <_CPU_Context_save_fp> 110b86: 83 c4 10 add $0x10,%esp _Thread_Allocated_fp = executing; 110b89: 89 1d 70 42 12 00 mov %ebx,0x124270 /* * 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 ); 110b8f: 83 ec 0c sub $0xc,%esp 110b92: 53 push %ebx 110b93: e8 98 bc ff ff call 10c830 <_User_extensions_Thread_begin> /* * At this point, the dispatch disable level BETTER be 1. */ _Thread_Enable_dispatch(); 110b98: e8 54 b0 ff ff call 10bbf1 <_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) */ { 110b9d: 83 c4 10 add $0x10,%esp 110ba0: 80 7d f7 00 cmpb $0x0,-0x9(%ebp) 110ba4: 75 05 jne 110bab <_Thread_Handler+0x73> INIT_NAME (); 110ba6: e8 25 c4 00 00 call 11cfd0 <__start_set_sysctl_set> } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { 110bab: 8b 83 a0 00 00 00 mov 0xa0(%ebx),%eax 110bb1: 85 c0 test %eax,%eax 110bb3: 75 0b jne 110bc0 <_Thread_Handler+0x88> executing->Wait.return_argument = (*(Thread_Entry_numeric) executing->Start.entry_point)( 110bb5: 83 ec 0c sub $0xc,%esp 110bb8: ff b3 a8 00 00 00 pushl 0xa8(%ebx) 110bbe: eb 0c jmp 110bcc <_Thread_Handler+0x94> <== ALWAYS TAKEN executing->Start.numeric_argument ); } #if defined(RTEMS_POSIX_API) else if ( executing->Start.prototype == THREAD_START_POINTER ) { 110bc0: 48 dec %eax 110bc1: 75 15 jne 110bd8 <_Thread_Handler+0xa0> <== ALWAYS TAKEN executing->Wait.return_argument = (*(Thread_Entry_pointer) executing->Start.entry_point)( 110bc3: 83 ec 0c sub $0xc,%esp 110bc6: ff b3 a4 00 00 00 pushl 0xa4(%ebx) 110bcc: ff 93 9c 00 00 00 call *0x9c(%ebx) executing->Start.numeric_argument ); } #if defined(RTEMS_POSIX_API) else if ( executing->Start.prototype == THREAD_START_POINTER ) { executing->Wait.return_argument = 110bd2: 89 43 28 mov %eax,0x28(%ebx) 110bd5: 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 ); 110bd8: 83 ec 0c sub $0xc,%esp 110bdb: 53 push %ebx 110bdc: e8 80 bc ff ff call 10c861 <_User_extensions_Thread_exitted> _Internal_error_Occurred( 110be1: 83 c4 0c add $0xc,%esp 110be4: 6a 06 push $0x6 110be6: 6a 01 push $0x1 110be8: 6a 00 push $0x0 110bea: e8 65 a3 ff ff call 10af54 <_Internal_error_Occurred> 0010beb0 <_Thread_Handler_initialization>: * * Output parameters: NONE */ void _Thread_Handler_initialization(void) { 10beb0: 55 push %ebp 10beb1: 89 e5 mov %esp,%ebp 10beb3: 53 push %ebx 10beb4: 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; 10beb7: a1 08 02 12 00 mov 0x120208,%eax maximum_extensions = Configuration.maximum_extensions; 10bebc: 8b 15 00 02 12 00 mov 0x120200,%edx #endif /* * BOTH stacks hooks must be set or both must be NULL. * Do not allow mixture. */ if ( !( (!Configuration.stack_allocate_hook) 10bec2: 83 3d 1c 02 12 00 00 cmpl $0x0,0x12021c 10bec9: 0f 94 c3 sete %bl 10becc: 83 3d 18 02 12 00 00 cmpl $0x0,0x120218 10bed3: 0f 94 c1 sete %cl 10bed6: 38 cb cmp %cl,%bl 10bed8: 74 0c je 10bee6 <_Thread_Handler_initialization+0x36> == (!Configuration.stack_free_hook) ) ) _Internal_error_Occurred( 10beda: 52 push %edx 10bedb: 6a 0f push $0xf 10bedd: 6a 01 push $0x1 10bedf: 6a 00 push $0x0 10bee1: e8 6e f0 ff ff call 10af54 <_Internal_error_Occurred> <== ALWAYS TAKEN INTERNAL_ERROR_CORE, true, INTERNAL_ERROR_BAD_STACK_HOOK ); _Context_Switch_necessary = false; 10bee6: c6 05 b8 42 12 00 00 movb $0x0,0x1242b8 _Thread_Executing = NULL; 10beed: c7 05 a8 42 12 00 00 movl $0x0,0x1242a8 10bef4: 00 00 00 _Thread_Heir = NULL; 10bef7: c7 05 78 42 12 00 00 movl $0x0,0x124278 10befe: 00 00 00 #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) _Thread_Allocated_fp = NULL; 10bf01: c7 05 70 42 12 00 00 movl $0x0,0x124270 10bf08: 00 00 00 #endif _Thread_Do_post_task_switch_extension = 0; 10bf0b: c7 05 8c 42 12 00 00 movl $0x0,0x12428c 10bf12: 00 00 00 _Thread_Maximum_extensions = maximum_extensions; 10bf15: 89 15 88 42 12 00 mov %edx,0x124288 _Thread_Ticks_per_timeslice = ticks_per_timeslice; 10bf1b: a3 b8 41 12 00 mov %eax,0x1241b8 _Thread_Ready_chain = (Chain_Control *) _Workspace_Allocate_or_fatal_error( 10bf20: 83 ec 0c sub $0xc,%esp 10bf23: 0f b6 05 f4 01 12 00 movzbl 0x1201f4,%eax 10bf2a: 40 inc %eax 10bf2b: 6b c0 0c imul $0xc,%eax,%eax 10bf2e: 50 push %eax 10bf2f: e8 64 0c 00 00 call 10cb98 <_Workspace_Allocate_or_fatal_error> <== ALWAYS TAKEN 10bf34: a3 b4 41 12 00 mov %eax,0x1241b4 (PRIORITY_MAXIMUM + 1) * sizeof(Chain_Control) ); for ( index=0; index <= PRIORITY_MAXIMUM ; index++ ) 10bf39: 0f b6 0d f4 01 12 00 movzbl 0x1201f4,%ecx 10bf40: 31 d2 xor %edx,%edx 10bf42: 83 c4 10 add $0x10,%esp */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 10bf45: 8d 58 04 lea 0x4(%eax),%ebx 10bf48: 89 18 mov %ebx,(%eax) the_chain->permanent_null = NULL; 10bf4a: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax) the_chain->last = _Chain_Head(the_chain); 10bf51: 89 40 08 mov %eax,0x8(%eax) 10bf54: 42 inc %edx 10bf55: 83 c0 0c add $0xc,%eax 10bf58: 39 ca cmp %ecx,%edx 10bf5a: 76 e9 jbe 10bf45 <_Thread_Handler_initialization+0x95> /* * Initialize this class of objects. */ _Objects_Initialize_information( 10bf5c: 50 push %eax 10bf5d: 6a 08 push $0x8 10bf5f: 6a 00 push $0x0 10bf61: 68 08 01 00 00 push $0x108 10bf66: 6a 01 push $0x1 10bf68: 6a 01 push $0x1 10bf6a: 6a 01 push $0x1 10bf6c: 68 44 43 12 00 push $0x124344 10bf71: e8 e2 f4 ff ff call 10b458 <_Objects_Initialize_information> <== ALWAYS TAKEN 10bf76: 83 c4 20 add $0x20,%esp false, /* true if this is a global object class */ NULL /* Proxy extraction support callout */ #endif ); } 10bf79: 8b 5d fc mov -0x4(%ebp),%ebx 10bf7c: c9 leave 10bf7d: c3 ret 0010bc88 <_Thread_Initialize>: Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { 10bc88: 55 push %ebp 10bc89: 89 e5 mov %esp,%ebp 10bc8b: 57 push %edi 10bc8c: 56 push %esi 10bc8d: 53 push %ebx 10bc8e: 83 ec 1c sub $0x1c,%esp 10bc91: 8b 5d 0c mov 0xc(%ebp),%ebx 10bc94: 8b 4d 10 mov 0x10(%ebp),%ecx 10bc97: 8b 75 14 mov 0x14(%ebp),%esi 10bc9a: 8a 55 18 mov 0x18(%ebp),%dl 10bc9d: 8a 45 20 mov 0x20(%ebp),%al 10bca0: 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; 10bca3: c7 83 f4 00 00 00 00 movl $0x0,0xf4(%ebx) 10bcaa: 00 00 00 10bcad: c7 83 f8 00 00 00 00 movl $0x0,0xf8(%ebx) 10bcb4: 00 00 00 10bcb7: c7 83 fc 00 00 00 00 movl $0x0,0xfc(%ebx) 10bcbe: 00 00 00 extensions_area = NULL; the_thread->libc_reent = NULL; 10bcc1: c7 83 f0 00 00 00 00 movl $0x0,0xf0(%ebx) 10bcc8: 00 00 00 if ( !actual_stack_size || actual_stack_size < stack_size ) return false; /* stack allocation failed */ stack = the_thread->Start.stack; #else if ( !stack_area ) { 10bccb: 85 c9 test %ecx,%ecx 10bccd: 75 30 jne 10bcff <_Thread_Initialize+0x77> actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size ); 10bccf: 51 push %ecx 10bcd0: 51 push %ecx 10bcd1: 56 push %esi 10bcd2: 53 push %ebx 10bcd3: 88 55 e0 mov %dl,-0x20(%ebp) 10bcd6: e8 45 08 00 00 call 10c520 <_Thread_Stack_Allocate> <== ALWAYS TAKEN if ( !actual_stack_size || actual_stack_size < stack_size ) 10bcdb: 83 c4 10 add $0x10,%esp 10bcde: 39 f0 cmp %esi,%eax 10bce0: 8a 55 e0 mov -0x20(%ebp),%dl 10bce3: 72 04 jb 10bce9 <_Thread_Initialize+0x61> 10bce5: 85 c0 test %eax,%eax 10bce7: 75 07 jne 10bcf0 <_Thread_Initialize+0x68> <== NEVER TAKEN 10bce9: 31 c0 xor %eax,%eax 10bceb: e9 b8 01 00 00 jmp 10bea8 <_Thread_Initialize+0x220> <== ALWAYS TAKEN return false; /* stack allocation failed */ stack = the_thread->Start.stack; 10bcf0: 8b 8b d0 00 00 00 mov 0xd0(%ebx),%ecx the_thread->Start.core_allocated_stack = true; 10bcf6: c6 83 c0 00 00 00 01 movb $0x1,0xc0(%ebx) 10bcfd: eb 09 jmp 10bd08 <_Thread_Initialize+0x80> <== ALWAYS TAKEN } else { stack = stack_area; actual_stack_size = stack_size; the_thread->Start.core_allocated_stack = false; 10bcff: c6 83 c0 00 00 00 00 movb $0x0,0xc0(%ebx) 10bd06: 89 f0 mov %esi,%eax Stack_Control *the_stack, void *starting_address, size_t size ) { the_stack->area = starting_address; 10bd08: 89 8b c8 00 00 00 mov %ecx,0xc8(%ebx) the_stack->size = size; 10bd0e: 89 83 c4 00 00 00 mov %eax,0xc4(%ebx) /* * Allocate the floating point area for this thread */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( is_fp ) { 10bd14: 31 ff xor %edi,%edi 10bd16: 84 d2 test %dl,%dl 10bd18: 74 19 je 10bd33 <_Thread_Initialize+0xab> fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE ); 10bd1a: 83 ec 0c sub $0xc,%esp 10bd1d: 6a 6c push $0x6c 10bd1f: e8 a0 0e 00 00 call 10cbc4 <_Workspace_Allocate> <== ALWAYS TAKEN 10bd24: 89 c7 mov %eax,%edi if ( !fp_area ) 10bd26: 83 c4 10 add $0x10,%esp 10bd29: 31 f6 xor %esi,%esi 10bd2b: 85 c0 test %eax,%eax 10bd2d: 0f 84 0c 01 00 00 je 10be3f <_Thread_Initialize+0x1b7> goto failed; fp_area = _Context_Fp_start( fp_area, 0 ); } the_thread->fp_context = fp_area; 10bd33: 89 bb ec 00 00 00 mov %edi,0xec(%ebx) the_thread->Start.fp_context = fp_area; 10bd39: 89 bb cc 00 00 00 mov %edi,0xcc(%ebx) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 10bd3f: c7 43 50 00 00 00 00 movl $0x0,0x50(%ebx) the_watchdog->routine = routine; 10bd46: c7 43 64 00 00 00 00 movl $0x0,0x64(%ebx) the_watchdog->id = id; 10bd4d: c7 43 68 00 00 00 00 movl $0x0,0x68(%ebx) the_watchdog->user_data = user_data; 10bd54: c7 43 6c 00 00 00 00 movl $0x0,0x6c(%ebx) #endif /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { 10bd5b: a1 88 42 12 00 mov 0x124288,%eax 10bd60: 31 f6 xor %esi,%esi 10bd62: 85 c0 test %eax,%eax 10bd64: 74 1d je 10bd83 <_Thread_Initialize+0xfb> extensions_area = _Workspace_Allocate( 10bd66: 83 ec 0c sub $0xc,%esp 10bd69: 8d 04 85 04 00 00 00 lea 0x4(,%eax,4),%eax 10bd70: 50 push %eax 10bd71: e8 4e 0e 00 00 call 10cbc4 <_Workspace_Allocate> 10bd76: 89 c6 mov %eax,%esi (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) 10bd78: 83 c4 10 add $0x10,%esp 10bd7b: 85 c0 test %eax,%eax 10bd7d: 0f 84 bc 00 00 00 je 10be3f <_Thread_Initialize+0x1b7> goto failed; } the_thread->extensions = (void **) extensions_area; 10bd83: 89 b3 00 01 00 00 mov %esi,0x100(%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 ) { 10bd89: 85 f6 test %esi,%esi 10bd8b: 74 1c je 10bda9 <_Thread_Initialize+0x121> for ( i = 0; i <= _Thread_Maximum_extensions ; i++ ) 10bd8d: 8b 0d 88 42 12 00 mov 0x124288,%ecx 10bd93: 31 c0 xor %eax,%eax 10bd95: eb 0e jmp 10bda5 <_Thread_Initialize+0x11d> <== ALWAYS TAKEN the_thread->extensions[i] = NULL; 10bd97: 8b 93 00 01 00 00 mov 0x100(%ebx),%edx 10bd9d: 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++ ) 10bda4: 40 inc %eax 10bda5: 39 c8 cmp %ecx,%eax 10bda7: 76 ee jbe 10bd97 <_Thread_Initialize+0x10f> /* * General initialization */ the_thread->Start.is_preemptible = is_preemptible; 10bda9: 8a 45 e7 mov -0x19(%ebp),%al 10bdac: 88 83 ac 00 00 00 mov %al,0xac(%ebx) the_thread->Start.budget_algorithm = budget_algorithm; 10bdb2: 8b 45 24 mov 0x24(%ebp),%eax 10bdb5: 89 83 b0 00 00 00 mov %eax,0xb0(%ebx) the_thread->Start.budget_callout = budget_callout; 10bdbb: 8b 45 28 mov 0x28(%ebp),%eax 10bdbe: 89 83 b4 00 00 00 mov %eax,0xb4(%ebx) switch ( budget_algorithm ) { 10bdc4: 83 7d 24 02 cmpl $0x2,0x24(%ebp) 10bdc8: 75 08 jne 10bdd2 <_Thread_Initialize+0x14a> case THREAD_CPU_BUDGET_ALGORITHM_NONE: case THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE: break; #if defined(RTEMS_SCORE_THREAD_ENABLE_EXHAUST_TIMESLICE) case THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE: the_thread->cpu_time_budget = _Thread_Ticks_per_timeslice; 10bdca: a1 b8 41 12 00 mov 0x1241b8,%eax 10bdcf: 89 43 78 mov %eax,0x78(%ebx) case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: break; #endif } the_thread->Start.isr_level = isr_level; 10bdd2: 8b 45 2c mov 0x2c(%ebp),%eax 10bdd5: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) the_thread->current_state = STATES_DORMANT; 10bddb: c7 43 10 01 00 00 00 movl $0x1,0x10(%ebx) the_thread->Wait.queue = NULL; 10bde2: c7 43 44 00 00 00 00 movl $0x0,0x44(%ebx) the_thread->resource_count = 0; 10bde9: 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; 10bdf0: 8b 45 1c mov 0x1c(%ebp),%eax 10bdf3: 89 43 18 mov %eax,0x18(%ebx) the_thread->Start.initial_priority = priority; 10bdf6: 89 83 bc 00 00 00 mov %eax,0xbc(%ebx) _Thread_Set_priority( the_thread, priority ); 10bdfc: 52 push %edx 10bdfd: 52 push %edx 10bdfe: 50 push %eax 10bdff: 53 push %ebx 10be00: e8 6f 05 00 00 call 10c374 <_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 ); 10be05: c7 83 84 00 00 00 00 movl $0x0,0x84(%ebx) 10be0c: 00 00 00 10be0f: c7 83 88 00 00 00 00 movl $0x0,0x88(%ebx) 10be16: 00 00 00 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10be19: 0f b7 53 08 movzwl 0x8(%ebx),%edx 10be1d: 8b 45 08 mov 0x8(%ebp),%eax 10be20: 8b 40 1c mov 0x1c(%eax),%eax 10be23: 89 1c 90 mov %ebx,(%eax,%edx,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 10be26: 8b 45 30 mov 0x30(%ebp),%eax 10be29: 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 ); 10be2c: 89 1c 24 mov %ebx,(%esp) 10be2f: e8 9c 0a 00 00 call 10c8d0 <_User_extensions_Thread_create> <== ALWAYS TAKEN 10be34: 88 c2 mov %al,%dl if ( extension_status ) 10be36: 83 c4 10 add $0x10,%esp 10be39: b0 01 mov $0x1,%al 10be3b: 84 d2 test %dl,%dl 10be3d: 75 69 jne 10bea8 <_Thread_Initialize+0x220> return true; failed: if ( the_thread->libc_reent ) 10be3f: 8b 83 f0 00 00 00 mov 0xf0(%ebx),%eax 10be45: 85 c0 test %eax,%eax 10be47: 74 0c je 10be55 <_Thread_Initialize+0x1cd> _Workspace_Free( the_thread->libc_reent ); 10be49: 83 ec 0c sub $0xc,%esp 10be4c: 50 push %eax 10be4d: e8 8b 0d 00 00 call 10cbdd <_Workspace_Free> 10be52: 83 c4 10 add $0x10,%esp 10be55: 31 d2 xor %edx,%edx for ( i=0 ; i <= THREAD_API_LAST ; i++ ) if ( the_thread->API_Extensions[i] ) 10be57: 8b 84 93 f4 00 00 00 mov 0xf4(%ebx,%edx,4),%eax 10be5e: 85 c0 test %eax,%eax 10be60: 74 12 je 10be74 <_Thread_Initialize+0x1ec> _Workspace_Free( the_thread->API_Extensions[i] ); 10be62: 83 ec 0c sub $0xc,%esp 10be65: 50 push %eax 10be66: 89 55 e0 mov %edx,-0x20(%ebp) 10be69: e8 6f 0d 00 00 call 10cbdd <_Workspace_Free> 10be6e: 83 c4 10 add $0x10,%esp 10be71: 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++ ) 10be74: 42 inc %edx 10be75: 83 fa 03 cmp $0x3,%edx 10be78: 75 dd jne 10be57 <_Thread_Initialize+0x1cf> if ( the_thread->API_Extensions[i] ) _Workspace_Free( the_thread->API_Extensions[i] ); if ( extensions_area ) 10be7a: 85 f6 test %esi,%esi 10be7c: 74 0c je 10be8a <_Thread_Initialize+0x202> (void) _Workspace_Free( extensions_area ); 10be7e: 83 ec 0c sub $0xc,%esp 10be81: 56 push %esi 10be82: e8 56 0d 00 00 call 10cbdd <_Workspace_Free> 10be87: 83 c4 10 add $0x10,%esp #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( fp_area ) 10be8a: 85 ff test %edi,%edi 10be8c: 74 0c je 10be9a <_Thread_Initialize+0x212> (void) _Workspace_Free( fp_area ); 10be8e: 83 ec 0c sub $0xc,%esp 10be91: 57 push %edi 10be92: e8 46 0d 00 00 call 10cbdd <_Workspace_Free> 10be97: 83 c4 10 add $0x10,%esp #endif _Thread_Stack_Free( the_thread ); 10be9a: 83 ec 0c sub $0xc,%esp 10be9d: 53 push %ebx 10be9e: e8 cd 06 00 00 call 10c570 <_Thread_Stack_Free> <== ALWAYS TAKEN 10bea3: 31 c0 xor %eax,%eax return false; 10bea5: 83 c4 10 add $0x10,%esp } 10bea8: 8d 65 f4 lea -0xc(%ebp),%esp 10beab: 5b pop %ebx 10beac: 5e pop %esi 10bead: 5f pop %edi 10beae: c9 leave 10beaf: c3 ret 0010f418 <_Thread_Reset_timeslice>: * ready chain * select heir */ void _Thread_Reset_timeslice( void ) { 10f418: 55 push %ebp 10f419: 89 e5 mov %esp,%ebp 10f41b: 56 push %esi 10f41c: 53 push %ebx ISR_Level level; Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; 10f41d: a1 a8 42 12 00 mov 0x1242a8,%eax ready = executing->ready; 10f422: 8b 90 8c 00 00 00 mov 0x8c(%eax),%edx _ISR_Disable( level ); 10f428: 9c pushf 10f429: fa cli 10f42a: 59 pop %ecx if ( _Chain_Has_only_one_node( ready ) ) { 10f42b: 8b 1a mov (%edx),%ebx 10f42d: 3b 5a 08 cmp 0x8(%edx),%ebx 10f430: 75 04 jne 10f436 <_Thread_Reset_timeslice+0x1e> _ISR_Enable( level ); 10f432: 51 push %ecx 10f433: 9d popf return; 10f434: eb 35 jmp 10f46b <_Thread_Reset_timeslice+0x53> <== ALWAYS TAKEN ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 10f436: 8b 30 mov (%eax),%esi previous = the_node->previous; 10f438: 8b 58 04 mov 0x4(%eax),%ebx next->previous = previous; 10f43b: 89 5e 04 mov %ebx,0x4(%esi) previous->next = next; 10f43e: 89 33 mov %esi,(%ebx) Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 10f440: 8d 5a 04 lea 0x4(%edx),%ebx 10f443: 89 18 mov %ebx,(%eax) old_last_node = the_chain->last; 10f445: 8b 5a 08 mov 0x8(%edx),%ebx the_chain->last = the_node; 10f448: 89 42 08 mov %eax,0x8(%edx) old_last_node->next = the_node; 10f44b: 89 03 mov %eax,(%ebx) the_node->previous = old_last_node; 10f44d: 89 58 04 mov %ebx,0x4(%eax) } _Chain_Extract_unprotected( &executing->Object.Node ); _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); 10f450: 51 push %ecx 10f451: 9d popf 10f452: fa cli if ( _Thread_Is_heir( executing ) ) 10f453: 3b 05 78 42 12 00 cmp 0x124278,%eax 10f459: 75 07 jne 10f462 <_Thread_Reset_timeslice+0x4a> _Thread_Heir = (Thread_Control *) ready->first; 10f45b: 8b 02 mov (%edx),%eax 10f45d: a3 78 42 12 00 mov %eax,0x124278 _Context_Switch_necessary = true; 10f462: c6 05 b8 42 12 00 01 movb $0x1,0x1242b8 _ISR_Enable( level ); 10f469: 51 push %ecx 10f46a: 9d popf } 10f46b: 5b pop %ebx 10f46c: 5e pop %esi 10f46d: c9 leave 10f46e: c3 ret 0010cd74 <_Thread_Restart>: bool _Thread_Restart( Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { 10cd74: 55 push %ebp 10cd75: 89 e5 mov %esp,%ebp 10cd77: 53 push %ebx 10cd78: 83 ec 04 sub $0x4,%esp 10cd7b: 8b 5d 08 mov 0x8(%ebp),%ebx if ( !_States_Is_dormant( the_thread->current_state ) ) { 10cd7e: 31 c0 xor %eax,%eax 10cd80: f6 43 10 01 testb $0x1,0x10(%ebx) 10cd84: 75 6b jne 10cdf1 <_Thread_Restart+0x7d> _Thread_Set_transient( the_thread ); 10cd86: 83 ec 0c sub $0xc,%esp 10cd89: 53 push %ebx 10cd8a: e8 a1 01 00 00 call 10cf30 <_Thread_Set_transient> <== ALWAYS TAKEN _Thread_Reset( the_thread, pointer_argument, numeric_argument ); 10cd8f: 83 c4 0c add $0xc,%esp 10cd92: ff 75 10 pushl 0x10(%ebp) 10cd95: ff 75 0c pushl 0xc(%ebp) 10cd98: 53 push %ebx 10cd99: e8 b2 31 00 00 call 10ff50 <_Thread_Reset> _Thread_Load_environment( the_thread ); 10cd9e: 89 1c 24 mov %ebx,(%esp) 10cda1: e8 a2 2e 00 00 call 10fc48 <_Thread_Load_environment> _Thread_Ready( the_thread ); 10cda6: 89 1c 24 mov %ebx,(%esp) 10cda9: e8 fe 30 00 00 call 10feac <_Thread_Ready> _User_extensions_Thread_restart( the_thread ); 10cdae: 89 1c 24 mov %ebx,(%esp) 10cdb1: e8 12 06 00 00 call 10d3c8 <_User_extensions_Thread_restart> <== ALWAYS TAKEN if ( _Thread_Is_executing ( the_thread ) ) 10cdb6: 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 ); 10cdb9: b0 01 mov $0x1,%al 10cdbb: 3b 1d f4 62 12 00 cmp 0x1262f4,%ebx 10cdc1: 75 2e jne 10cdf1 <_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 ) 10cdc3: 83 bb ec 00 00 00 00 cmpl $0x0,0xec(%ebx) 10cdca: 74 12 je 10cdde <_Thread_Restart+0x6a> _Context_Restore_fp( &_Thread_Executing->fp_context ); 10cdcc: 83 ec 0c sub $0xc,%esp 10cdcf: 81 c3 ec 00 00 00 add $0xec,%ebx 10cdd5: 53 push %ebx 10cdd6: e8 63 09 00 00 call 10d73e <_CPU_Context_restore_fp> 10cddb: 83 c4 10 add $0x10,%esp #endif _CPU_Context_Restart_self( &_Thread_Executing->Registers ); 10cdde: 83 ec 0c sub $0xc,%esp 10cde1: a1 f4 62 12 00 mov 0x1262f4,%eax 10cde6: 05 d4 00 00 00 add $0xd4,%eax 10cdeb: 50 push %eax 10cdec: e8 3c 09 00 00 call 10d72d <_CPU_Context_restore> return true; } return false; } 10cdf1: 8b 5d fc mov -0x4(%ebp),%ebx 10cdf4: c9 leave 10cdf5: c3 ret 0010f5f4 <_Thread_Resume>: void _Thread_Resume( Thread_Control *the_thread, bool force ) { 10f5f4: 55 push %ebp 10f5f5: 89 e5 mov %esp,%ebp 10f5f7: 53 push %ebx 10f5f8: 8b 45 08 mov 0x8(%ebp),%eax ISR_Level level; States_Control current_state; _ISR_Disable( level ); 10f5fb: 9c pushf 10f5fc: fa cli 10f5fd: 59 pop %ecx _ISR_Enable( level ); return; } #endif current_state = the_thread->current_state; 10f5fe: 8b 50 10 mov 0x10(%eax),%edx if ( current_state & STATES_SUSPENDED ) { 10f601: f6 c2 02 test $0x2,%dl 10f604: 74 70 je 10f676 <_Thread_Resume+0x82> <== ALWAYS TAKEN 10f606: 83 e2 fd and $0xfffffffd,%edx current_state = 10f609: 89 50 10 mov %edx,0x10(%eax) the_thread->current_state = _States_Clear(STATES_SUSPENDED, current_state); if ( _States_Is_ready( current_state ) ) { 10f60c: 85 d2 test %edx,%edx 10f60e: 75 66 jne 10f676 <_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; 10f610: 8b 90 90 00 00 00 mov 0x90(%eax),%edx 10f616: 66 8b 98 96 00 00 00 mov 0x96(%eax),%bx 10f61d: 66 09 1a or %bx,(%edx) _Priority_Major_bit_map |= the_priority_map->ready_major; 10f620: 66 8b 15 6c 93 12 00 mov 0x12936c,%dx 10f627: 0b 90 94 00 00 00 or 0x94(%eax),%edx 10f62d: 66 89 15 6c 93 12 00 mov %dx,0x12936c _Priority_Add_to_bit_map( &the_thread->Priority_map ); _Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node); 10f634: 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); 10f63a: 8d 5a 04 lea 0x4(%edx),%ebx 10f63d: 89 18 mov %ebx,(%eax) old_last_node = the_chain->last; 10f63f: 8b 5a 08 mov 0x8(%edx),%ebx the_chain->last = the_node; 10f642: 89 42 08 mov %eax,0x8(%edx) old_last_node->next = the_node; 10f645: 89 03 mov %eax,(%ebx) the_node->previous = old_last_node; 10f647: 89 58 04 mov %ebx,0x4(%eax) _ISR_Flash( level ); 10f64a: 51 push %ecx 10f64b: 9d popf 10f64c: fa cli if ( the_thread->current_priority < _Thread_Heir->current_priority ) { 10f64d: 8b 50 14 mov 0x14(%eax),%edx 10f650: 8b 1d 48 93 12 00 mov 0x129348,%ebx 10f656: 3b 53 14 cmp 0x14(%ebx),%edx 10f659: 73 1b jae 10f676 <_Thread_Resume+0x82> _Thread_Heir = the_thread; 10f65b: a3 48 93 12 00 mov %eax,0x129348 if ( _Thread_Executing->is_preemptible || 10f660: a1 78 93 12 00 mov 0x129378,%eax 10f665: 80 78 75 00 cmpb $0x0,0x75(%eax) 10f669: 75 04 jne 10f66f <_Thread_Resume+0x7b> 10f66b: 85 d2 test %edx,%edx 10f66d: 75 07 jne 10f676 <_Thread_Resume+0x82> <== NEVER TAKEN the_thread->current_priority == 0 ) _Context_Switch_necessary = true; 10f66f: c6 05 88 93 12 00 01 movb $0x1,0x129388 } } } _ISR_Enable( level ); 10f676: 51 push %ecx 10f677: 9d popf } 10f678: 5b pop %ebx 10f679: c9 leave 10f67a: c3 ret 0010c3dc <_Thread_Set_state>: void _Thread_Set_state( Thread_Control *the_thread, States_Control state ) { 10c3dc: 55 push %ebp 10c3dd: 89 e5 mov %esp,%ebp 10c3df: 56 push %esi 10c3e0: 53 push %ebx 10c3e1: 8b 45 08 mov 0x8(%ebp),%eax 10c3e4: 8b 4d 0c mov 0xc(%ebp),%ecx ISR_Level level; Chain_Control *ready; ready = the_thread->ready; 10c3e7: 8b 90 8c 00 00 00 mov 0x8c(%eax),%edx _ISR_Disable( level ); 10c3ed: 9c pushf 10c3ee: fa cli 10c3ef: 5b pop %ebx if ( !_States_Is_ready( the_thread->current_state ) ) { 10c3f0: 8b 70 10 mov 0x10(%eax),%esi 10c3f3: 85 f6 test %esi,%esi 10c3f5: 74 0c je 10c403 <_Thread_Set_state+0x27> the_thread->current_state = 10c3f7: 09 f1 or %esi,%ecx 10c3f9: 89 48 10 mov %ecx,0x10(%eax) _States_Set( state, the_thread->current_state ); _ISR_Enable( level ); 10c3fc: 53 push %ebx 10c3fd: 9d popf return; 10c3fe: e9 a3 00 00 00 jmp 10c4a6 <_Thread_Set_state+0xca> <== ALWAYS TAKEN } the_thread->current_state = state; 10c403: 89 48 10 mov %ecx,0x10(%eax) if ( _Chain_Has_only_one_node( ready ) ) { 10c406: 8b 0a mov (%edx),%ecx 10c408: 3b 4a 08 cmp 0x8(%edx),%ecx 10c40b: 75 3b jne 10c448 <_Thread_Set_state+0x6c> */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 10c40d: 8d 4a 04 lea 0x4(%edx),%ecx 10c410: 89 0a mov %ecx,(%edx) the_chain->permanent_null = NULL; 10c412: c7 42 04 00 00 00 00 movl $0x0,0x4(%edx) the_chain->last = _Chain_Head(the_chain); 10c419: 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; 10c41c: 8b 90 90 00 00 00 mov 0x90(%eax),%edx 10c422: 66 8b 88 9a 00 00 00 mov 0x9a(%eax),%cx 10c429: 66 21 0a and %cx,(%edx) _Chain_Initialize_empty( ready ); _Priority_Remove_from_bit_map( &the_thread->Priority_map ); 10c42c: 66 83 3a 00 cmpw $0x0,(%edx) 10c430: 75 20 jne 10c452 <_Thread_Set_state+0x76> if ( *the_priority_map->minor == 0 ) _Priority_Major_bit_map &= the_priority_map->block_major; 10c432: 66 8b 15 9c 42 12 00 mov 0x12429c,%dx 10c439: 23 90 98 00 00 00 and 0x98(%eax),%edx 10c43f: 66 89 15 9c 42 12 00 mov %dx,0x12429c 10c446: eb 0a jmp 10c452 <_Thread_Set_state+0x76> <== ALWAYS TAKEN ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 10c448: 8b 08 mov (%eax),%ecx previous = the_node->previous; 10c44a: 8b 50 04 mov 0x4(%eax),%edx next->previous = previous; 10c44d: 89 51 04 mov %edx,0x4(%ecx) previous->next = next; 10c450: 89 0a mov %ecx,(%edx) } else _Chain_Extract_unprotected( &the_thread->Object.Node ); _ISR_Flash( level ); 10c452: 53 push %ebx 10c453: 9d popf 10c454: fa cli if ( _Thread_Is_heir( the_thread ) ) 10c455: 3b 05 78 42 12 00 cmp 0x124278,%eax 10c45b: 75 38 jne 10c495 <_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 ); 10c45d: 66 8b 35 9c 42 12 00 mov 0x12429c,%si 10c464: 31 d2 xor %edx,%edx 10c466: 89 d1 mov %edx,%ecx 10c468: 66 0f bc ce bsf %si,%cx _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); 10c46c: 0f b7 c9 movzwl %cx,%ecx 10c46f: 66 8b b4 09 14 43 12 mov 0x124314(%ecx,%ecx,1),%si 10c476: 00 10c477: 66 0f bc d6 bsf %si,%dx * ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) 10c47b: c1 e1 04 shl $0x4,%ecx 10c47e: 0f b7 d2 movzwl %dx,%edx 10c481: 01 d1 add %edx,%ecx 10c483: 6b c9 0c imul $0xc,%ecx,%ecx 10c486: 8b 35 b4 41 12 00 mov 0x1241b4,%esi 10c48c: 8b 14 31 mov (%ecx,%esi,1),%edx 10c48f: 89 15 78 42 12 00 mov %edx,0x124278 _Thread_Calculate_heir(); if ( _Thread_Is_executing( the_thread ) ) 10c495: 3b 05 a8 42 12 00 cmp 0x1242a8,%eax 10c49b: 75 07 jne 10c4a4 <_Thread_Set_state+0xc8> _Context_Switch_necessary = true; 10c49d: c6 05 b8 42 12 00 01 movb $0x1,0x1242b8 _ISR_Enable( level ); 10c4a4: 53 push %ebx 10c4a5: 9d popf } 10c4a6: 5b pop %ebx 10c4a7: 5e pop %esi 10c4a8: c9 leave 10c4a9: c3 ret 0010c4ac <_Thread_Set_transient>: */ void _Thread_Set_transient( Thread_Control *the_thread ) { 10c4ac: 55 push %ebp 10c4ad: 89 e5 mov %esp,%ebp 10c4af: 56 push %esi 10c4b0: 53 push %ebx 10c4b1: 8b 45 08 mov 0x8(%ebp),%eax ISR_Level level; uint32_t old_state; Chain_Control *ready; ready = the_thread->ready; 10c4b4: 8b 90 8c 00 00 00 mov 0x8c(%eax),%edx _ISR_Disable( level ); 10c4ba: 9c pushf 10c4bb: fa cli 10c4bc: 59 pop %ecx old_state = the_thread->current_state; 10c4bd: 8b 58 10 mov 0x10(%eax),%ebx the_thread->current_state = _States_Set( STATES_TRANSIENT, old_state ); 10c4c0: 89 de mov %ebx,%esi 10c4c2: 83 ce 04 or $0x4,%esi 10c4c5: 89 70 10 mov %esi,0x10(%eax) if ( _States_Is_ready( old_state ) ) { 10c4c8: 85 db test %ebx,%ebx 10c4ca: 75 4c jne 10c518 <_Thread_Set_transient+0x6c> if ( _Chain_Has_only_one_node( ready ) ) { 10c4cc: 8b 1a mov (%edx),%ebx 10c4ce: 3b 5a 08 cmp 0x8(%edx),%ebx 10c4d1: 75 3b jne 10c50e <_Thread_Set_transient+0x62> */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 10c4d3: 8d 5a 04 lea 0x4(%edx),%ebx 10c4d6: 89 1a mov %ebx,(%edx) the_chain->permanent_null = NULL; 10c4d8: c7 42 04 00 00 00 00 movl $0x0,0x4(%edx) the_chain->last = _Chain_Head(the_chain); 10c4df: 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; 10c4e2: 8b 90 90 00 00 00 mov 0x90(%eax),%edx 10c4e8: 66 8b 98 9a 00 00 00 mov 0x9a(%eax),%bx 10c4ef: 66 21 1a and %bx,(%edx) _Chain_Initialize_empty( ready ); _Priority_Remove_from_bit_map( &the_thread->Priority_map ); 10c4f2: 66 83 3a 00 cmpw $0x0,(%edx) 10c4f6: 75 20 jne 10c518 <_Thread_Set_transient+0x6c> if ( *the_priority_map->minor == 0 ) _Priority_Major_bit_map &= the_priority_map->block_major; 10c4f8: 66 8b 15 9c 42 12 00 mov 0x12429c,%dx 10c4ff: 23 90 98 00 00 00 and 0x98(%eax),%edx 10c505: 66 89 15 9c 42 12 00 mov %dx,0x12429c 10c50c: eb 0a jmp 10c518 <_Thread_Set_transient+0x6c> <== ALWAYS TAKEN ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 10c50e: 8b 10 mov (%eax),%edx previous = the_node->previous; 10c510: 8b 40 04 mov 0x4(%eax),%eax next->previous = previous; 10c513: 89 42 04 mov %eax,0x4(%edx) previous->next = next; 10c516: 89 10 mov %edx,(%eax) } else _Chain_Extract_unprotected( &the_thread->Object.Node ); } _ISR_Enable( level ); 10c518: 51 push %ecx 10c519: 9d popf } 10c51a: 5b pop %ebx 10c51b: 5e pop %esi 10c51c: c9 leave 10c51d: c3 ret 0010c520 <_Thread_Stack_Allocate>: size_t _Thread_Stack_Allocate( Thread_Control *the_thread, size_t stack_size ) { 10c520: 55 push %ebp 10c521: 89 e5 mov %esp,%ebp 10c523: 53 push %ebx 10c524: 83 ec 04 sub $0x4,%esp 10c527: a1 f0 01 12 00 mov 0x1201f0,%eax 10c52c: 8b 5d 0c mov 0xc(%ebp),%ebx 10c52f: 39 c3 cmp %eax,%ebx 10c531: 73 02 jae 10c535 <_Thread_Stack_Allocate+0x15> 10c533: 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 ) { 10c535: a1 18 02 12 00 mov 0x120218,%eax 10c53a: 85 c0 test %eax,%eax 10c53c: 74 08 je 10c546 <_Thread_Stack_Allocate+0x26> stack_addr = (*Configuration.stack_allocate_hook)( the_stack_size ); 10c53e: 83 ec 0c sub $0xc,%esp 10c541: 53 push %ebx 10c542: ff d0 call *%eax 10c544: eb 0c jmp 10c552 <_Thread_Stack_Allocate+0x32> <== ALWAYS TAKEN RTEMS_INLINE_ROUTINE uint32_t _Stack_Adjust_size ( size_t size ) { return size + CPU_STACK_ALIGNMENT; 10c546: 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 ); 10c549: 83 ec 0c sub $0xc,%esp 10c54c: 53 push %ebx 10c54d: e8 72 06 00 00 call 10cbc4 <_Workspace_Allocate> <== ALWAYS TAKEN 10c552: 83 c4 10 add $0x10,%esp } if ( !stack_addr ) 10c555: 31 d2 xor %edx,%edx 10c557: 85 c0 test %eax,%eax 10c559: 0f 95 c2 setne %dl 10c55c: f7 da neg %edx 10c55e: 21 d3 and %edx,%ebx the_stack_size = 0; the_thread->Start.stack = stack_addr; 10c560: 8b 55 08 mov 0x8(%ebp),%edx 10c563: 89 82 d0 00 00 00 mov %eax,0xd0(%edx) return the_stack_size; } 10c569: 89 d8 mov %ebx,%eax 10c56b: 8b 5d fc mov -0x4(%ebp),%ebx 10c56e: c9 leave 10c56f: c3 ret 0010c570 <_Thread_Stack_Free>: */ void _Thread_Stack_Free( Thread_Control *the_thread ) { 10c570: 55 push %ebp 10c571: 89 e5 mov %esp,%ebp 10c573: 83 ec 08 sub $0x8,%esp 10c576: 8b 45 08 mov 0x8(%ebp),%eax #if defined(RTEMS_SCORE_THREAD_ENABLE_USER_PROVIDED_STACK_VIA_API) /* * If the API provided the stack space, then don't free it. */ if ( !the_thread->Start.core_allocated_stack ) 10c579: 80 b8 c0 00 00 00 00 cmpb $0x0,0xc0(%eax) 10c580: 74 1f je 10c5a1 <_Thread_Stack_Free+0x31> * 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 ) 10c582: 8b 15 1c 02 12 00 mov 0x12021c,%edx 10c588: 85 d2 test %edx,%edx 10c58a: 8b 80 c8 00 00 00 mov 0xc8(%eax),%eax 10c590: 74 06 je 10c598 <_Thread_Stack_Free+0x28> (*Configuration.stack_free_hook)( the_thread->Start.Initial_stack.area ); 10c592: 89 45 08 mov %eax,0x8(%ebp) else _Workspace_Free( the_thread->Start.Initial_stack.area ); } 10c595: 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 ); 10c596: ff e2 jmp *%edx else _Workspace_Free( the_thread->Start.Initial_stack.area ); 10c598: 89 45 08 mov %eax,0x8(%ebp) } 10c59b: 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 ); 10c59c: e9 3c 06 00 00 jmp 10cbdd <_Workspace_Free> <== ALWAYS TAKEN } 10c5a1: c9 leave 10c5a2: c3 ret 0010c5fc <_Thread_Start>: Thread_Start_types the_prototype, void *entry_point, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { 10c5fc: 55 push %ebp 10c5fd: 89 e5 mov %esp,%ebp 10c5ff: 53 push %ebx 10c600: 83 ec 04 sub $0x4,%esp 10c603: 8b 5d 08 mov 0x8(%ebp),%ebx if ( _States_Is_dormant( the_thread->current_state ) ) { 10c606: 31 c0 xor %eax,%eax 10c608: f6 43 10 01 testb $0x1,0x10(%ebx) 10c60c: 74 42 je 10c650 <_Thread_Start+0x54> the_thread->Start.entry_point = (Thread_Entry) entry_point; 10c60e: 8b 45 10 mov 0x10(%ebp),%eax 10c611: 89 83 9c 00 00 00 mov %eax,0x9c(%ebx) the_thread->Start.prototype = the_prototype; 10c617: 8b 45 0c mov 0xc(%ebp),%eax 10c61a: 89 83 a0 00 00 00 mov %eax,0xa0(%ebx) the_thread->Start.pointer_argument = pointer_argument; 10c620: 8b 45 14 mov 0x14(%ebp),%eax 10c623: 89 83 a4 00 00 00 mov %eax,0xa4(%ebx) the_thread->Start.numeric_argument = numeric_argument; 10c629: 8b 45 18 mov 0x18(%ebp),%eax 10c62c: 89 83 a8 00 00 00 mov %eax,0xa8(%ebx) _Thread_Load_environment( the_thread ); 10c632: 83 ec 0c sub $0xc,%esp 10c635: 53 push %ebx 10c636: e8 d5 2a 00 00 call 10f110 <_Thread_Load_environment> _Thread_Ready( the_thread ); 10c63b: 89 1c 24 mov %ebx,(%esp) 10c63e: e8 31 2d 00 00 call 10f374 <_Thread_Ready> <== ALWAYS TAKEN _User_extensions_Thread_start( the_thread ); 10c643: 89 1c 24 mov %ebx,(%esp) 10c646: e8 f9 02 00 00 call 10c944 <_User_extensions_Thread_start> <== ALWAYS TAKEN 10c64b: b0 01 mov $0x1,%al return true; 10c64d: 83 c4 10 add $0x10,%esp } return false; } 10c650: 8b 5d fc mov -0x4(%ebp),%ebx 10c653: c9 leave 10c654: c3 ret 0010c5a4 <_Thread_Start_multitasking>: * ready chain * select heir */ void _Thread_Start_multitasking( void ) { 10c5a4: 55 push %ebp 10c5a5: 89 e5 mov %esp,%ebp 10c5a7: 83 ec 08 sub $0x8,%esp 10c5aa: c7 05 84 43 12 00 03 movl $0x3,0x124384 10c5b1: 00 00 00 * the system is shut down. */ _System_state_Set( SYSTEM_STATE_UP ); _Context_Switch_necessary = false; 10c5b4: c6 05 b8 42 12 00 00 movb $0x0,0x1242b8 _Thread_Executing = _Thread_Heir; 10c5bb: a1 78 42 12 00 mov 0x124278,%eax 10c5c0: a3 a8 42 12 00 mov %eax,0x1242a8 #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 ) 10c5c5: 83 b8 ec 00 00 00 00 cmpl $0x0,0xec(%eax) 10c5cc: 74 11 je 10c5df <_Thread_Start_multitasking+0x3b> _Context_Restore_fp( &_Thread_Heir->fp_context ); 10c5ce: 83 ec 0c sub $0xc,%esp 10c5d1: 05 ec 00 00 00 add $0xec,%eax 10c5d6: 50 push %eax 10c5d7: e8 a2 06 00 00 call 10cc7e <_CPU_Context_restore_fp> <== ALWAYS TAKEN 10c5dc: 83 c4 10 add $0x10,%esp #endif _Context_Switch( &_Thread_BSP_context, &_Thread_Heir->Registers ); 10c5df: 50 push %eax 10c5e0: 50 push %eax 10c5e1: a1 78 42 12 00 mov 0x124278,%eax 10c5e6: 05 d4 00 00 00 add $0xd4,%eax 10c5eb: 50 push %eax 10c5ec: 68 d4 41 12 00 push $0x1241d4 10c5f1: e8 4a 06 00 00 call 10cc40 <_CPU_Context_switch> <== ALWAYS TAKEN 10c5f6: 83 c4 10 add $0x10,%esp } 10c5f9: c9 leave 10c5fa: c3 ret 0010f470 <_Thread_Suspend>: */ void _Thread_Suspend( Thread_Control *the_thread ) { 10f470: 55 push %ebp 10f471: 89 e5 mov %esp,%ebp 10f473: 56 push %esi 10f474: 53 push %ebx 10f475: 8b 45 08 mov 0x8(%ebp),%eax ISR_Level level; Chain_Control *ready; ready = the_thread->ready; 10f478: 8b 90 8c 00 00 00 mov 0x8c(%eax),%edx _ISR_Disable( level ); 10f47e: 9c pushf 10f47f: fa cli 10f480: 5b pop %ebx #if defined(RTEMS_ITRON_API) the_thread->suspend_count++; #endif if ( !_States_Is_ready( the_thread->current_state ) ) { 10f481: 8b 48 10 mov 0x10(%eax),%ecx 10f484: 85 c9 test %ecx,%ecx 10f486: 74 0d je 10f495 <_Thread_Suspend+0x25> the_thread->current_state = 10f488: 83 c9 02 or $0x2,%ecx 10f48b: 89 48 10 mov %ecx,0x10(%eax) _States_Set( STATES_SUSPENDED, the_thread->current_state ); _ISR_Enable( level ); 10f48e: 53 push %ebx 10f48f: 9d popf return; 10f490: e9 a7 00 00 00 jmp 10f53c <_Thread_Suspend+0xcc> <== ALWAYS TAKEN } the_thread->current_state = STATES_SUSPENDED; 10f495: c7 40 10 02 00 00 00 movl $0x2,0x10(%eax) if ( _Chain_Has_only_one_node( ready ) ) { 10f49c: 8b 0a mov (%edx),%ecx 10f49e: 3b 4a 08 cmp 0x8(%edx),%ecx 10f4a1: 75 3b jne 10f4de <_Thread_Suspend+0x6e> */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 10f4a3: 8d 4a 04 lea 0x4(%edx),%ecx 10f4a6: 89 0a mov %ecx,(%edx) the_chain->permanent_null = NULL; 10f4a8: c7 42 04 00 00 00 00 movl $0x0,0x4(%edx) the_chain->last = _Chain_Head(the_chain); 10f4af: 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; 10f4b2: 8b 90 90 00 00 00 mov 0x90(%eax),%edx 10f4b8: 66 8b 88 9a 00 00 00 mov 0x9a(%eax),%cx 10f4bf: 66 21 0a and %cx,(%edx) _Chain_Initialize_empty( ready ); _Priority_Remove_from_bit_map( &the_thread->Priority_map ); 10f4c2: 66 83 3a 00 cmpw $0x0,(%edx) 10f4c6: 75 20 jne 10f4e8 <_Thread_Suspend+0x78> if ( *the_priority_map->minor == 0 ) _Priority_Major_bit_map &= the_priority_map->block_major; 10f4c8: 66 8b 15 9c 42 12 00 mov 0x12429c,%dx 10f4cf: 23 90 98 00 00 00 and 0x98(%eax),%edx 10f4d5: 66 89 15 9c 42 12 00 mov %dx,0x12429c 10f4dc: eb 0a jmp 10f4e8 <_Thread_Suspend+0x78> <== ALWAYS TAKEN ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 10f4de: 8b 08 mov (%eax),%ecx previous = the_node->previous; 10f4e0: 8b 50 04 mov 0x4(%eax),%edx next->previous = previous; 10f4e3: 89 51 04 mov %edx,0x4(%ecx) previous->next = next; 10f4e6: 89 0a mov %ecx,(%edx) } else _Chain_Extract_unprotected( &the_thread->Object.Node ); _ISR_Flash( level ); 10f4e8: 53 push %ebx 10f4e9: 9d popf 10f4ea: fa cli if ( _Thread_Is_heir( the_thread ) ) 10f4eb: 3b 05 78 42 12 00 cmp 0x124278,%eax 10f4f1: 75 38 jne 10f52b <_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 ); 10f4f3: 66 8b 35 9c 42 12 00 mov 0x12429c,%si 10f4fa: 31 d2 xor %edx,%edx 10f4fc: 89 d1 mov %edx,%ecx 10f4fe: 66 0f bc ce bsf %si,%cx _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); 10f502: 0f b7 c9 movzwl %cx,%ecx 10f505: 66 8b b4 09 14 43 12 mov 0x124314(%ecx,%ecx,1),%si 10f50c: 00 10f50d: 66 0f bc d6 bsf %si,%dx * ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) 10f511: c1 e1 04 shl $0x4,%ecx 10f514: 0f b7 d2 movzwl %dx,%edx 10f517: 01 d1 add %edx,%ecx 10f519: 6b c9 0c imul $0xc,%ecx,%ecx 10f51c: 8b 35 b4 41 12 00 mov 0x1241b4,%esi 10f522: 8b 14 31 mov (%ecx,%esi,1),%edx 10f525: 89 15 78 42 12 00 mov %edx,0x124278 _Thread_Calculate_heir(); if ( _Thread_Is_executing( the_thread ) ) 10f52b: 3b 05 a8 42 12 00 cmp 0x1242a8,%eax 10f531: 75 07 jne 10f53a <_Thread_Suspend+0xca> _Context_Switch_necessary = true; 10f533: c6 05 b8 42 12 00 01 movb $0x1,0x1242b8 _ISR_Enable( level ); 10f53a: 53 push %ebx 10f53b: 9d popf } 10f53c: 5b pop %ebx 10f53d: 5e pop %esi 10f53e: c9 leave 10f53f: c3 ret 0010c658 <_Thread_Tickle_timeslice>: * * Output parameters: NONE */ void _Thread_Tickle_timeslice( void ) { 10c658: 55 push %ebp 10c659: 89 e5 mov %esp,%ebp 10c65b: 53 push %ebx 10c65c: 83 ec 04 sub $0x4,%esp Thread_Control *executing; executing = _Thread_Executing; 10c65f: 8b 1d a8 42 12 00 mov 0x1242a8,%ebx /* * If the thread is not preemptible or is not ready, then * just return. */ if ( !executing->is_preemptible ) 10c665: 80 7b 75 00 cmpb $0x0,0x75(%ebx) 10c669: 74 4c je 10c6b7 <_Thread_Tickle_timeslice+0x5f> return; if ( !_States_Is_ready( executing->current_state ) ) 10c66b: 83 7b 10 00 cmpl $0x0,0x10(%ebx) 10c66f: 75 46 jne 10c6b7 <_Thread_Tickle_timeslice+0x5f> /* * The cpu budget algorithm determines what happens next. */ switch ( executing->budget_algorithm ) { 10c671: 8b 43 7c mov 0x7c(%ebx),%eax 10c674: 83 f8 01 cmp $0x1,%eax 10c677: 72 3e jb 10c6b7 <_Thread_Tickle_timeslice+0x5f> 10c679: 83 f8 02 cmp $0x2,%eax 10c67c: 76 07 jbe 10c685 <_Thread_Tickle_timeslice+0x2d> 10c67e: 83 f8 03 cmp $0x3,%eax 10c681: 75 34 jne 10c6b7 <_Thread_Tickle_timeslice+0x5f> <== ALWAYS TAKEN 10c683: eb 1a jmp 10c69f <_Thread_Tickle_timeslice+0x47> <== ALWAYS TAKEN case THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE: #if defined(RTEMS_SCORE_THREAD_ENABLE_EXHAUST_TIMESLICE) case THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE: #endif if ( (int)(--executing->cpu_time_budget) <= 0 ) { 10c685: 8b 43 78 mov 0x78(%ebx),%eax 10c688: 48 dec %eax 10c689: 89 43 78 mov %eax,0x78(%ebx) 10c68c: 85 c0 test %eax,%eax 10c68e: 7f 27 jg 10c6b7 <_Thread_Tickle_timeslice+0x5f> _Thread_Reset_timeslice(); 10c690: e8 83 2d 00 00 call 10f418 <_Thread_Reset_timeslice> executing->cpu_time_budget = _Thread_Ticks_per_timeslice; 10c695: a1 b8 41 12 00 mov 0x1241b8,%eax 10c69a: 89 43 78 mov %eax,0x78(%ebx) 10c69d: eb 18 jmp 10c6b7 <_Thread_Tickle_timeslice+0x5f> <== ALWAYS TAKEN } break; #if defined(RTEMS_SCORE_THREAD_ENABLE_SCHEDULER_CALLOUT) case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: if ( --executing->cpu_time_budget == 0 ) 10c69f: 8b 43 78 mov 0x78(%ebx),%eax 10c6a2: 48 dec %eax 10c6a3: 89 43 78 mov %eax,0x78(%ebx) 10c6a6: 85 c0 test %eax,%eax 10c6a8: 75 0d jne 10c6b7 <_Thread_Tickle_timeslice+0x5f> (*executing->budget_callout)( executing ); 10c6aa: 83 ec 0c sub $0xc,%esp 10c6ad: 53 push %ebx 10c6ae: ff 93 80 00 00 00 call *0x80(%ebx) 10c6b4: 83 c4 10 add $0x10,%esp break; #endif } } 10c6b7: 8b 5d fc mov -0x4(%ebp),%ebx 10c6ba: c9 leave 10c6bb: c3 ret 0010c6bc <_Thread_Yield_processor>: * ready chain * select heir */ void _Thread_Yield_processor( void ) { 10c6bc: 55 push %ebp 10c6bd: 89 e5 mov %esp,%ebp 10c6bf: 56 push %esi 10c6c0: 53 push %ebx ISR_Level level; Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; 10c6c1: a1 a8 42 12 00 mov 0x1242a8,%eax ready = executing->ready; 10c6c6: 8b 90 8c 00 00 00 mov 0x8c(%eax),%edx _ISR_Disable( level ); 10c6cc: 9c pushf 10c6cd: fa cli 10c6ce: 59 pop %ecx if ( !_Chain_Has_only_one_node( ready ) ) { 10c6cf: 8b 1a mov (%edx),%ebx 10c6d1: 3b 5a 08 cmp 0x8(%edx),%ebx 10c6d4: 74 2e je 10c704 <_Thread_Yield_processor+0x48> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 10c6d6: 8b 30 mov (%eax),%esi previous = the_node->previous; 10c6d8: 8b 58 04 mov 0x4(%eax),%ebx next->previous = previous; 10c6db: 89 5e 04 mov %ebx,0x4(%esi) previous->next = next; 10c6de: 89 33 mov %esi,(%ebx) Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 10c6e0: 8d 5a 04 lea 0x4(%edx),%ebx 10c6e3: 89 18 mov %ebx,(%eax) old_last_node = the_chain->last; 10c6e5: 8b 5a 08 mov 0x8(%edx),%ebx the_chain->last = the_node; 10c6e8: 89 42 08 mov %eax,0x8(%edx) old_last_node->next = the_node; 10c6eb: 89 03 mov %eax,(%ebx) the_node->previous = old_last_node; 10c6ed: 89 58 04 mov %ebx,0x4(%eax) _Chain_Extract_unprotected( &executing->Object.Node ); _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); 10c6f0: 51 push %ecx 10c6f1: 9d popf 10c6f2: fa cli if ( _Thread_Is_heir( executing ) ) 10c6f3: 3b 05 78 42 12 00 cmp 0x124278,%eax 10c6f9: 75 11 jne 10c70c <_Thread_Yield_processor+0x50> <== ALWAYS TAKEN _Thread_Heir = (Thread_Control *) ready->first; 10c6fb: 8b 02 mov (%edx),%eax 10c6fd: a3 78 42 12 00 mov %eax,0x124278 10c702: eb 08 jmp 10c70c <_Thread_Yield_processor+0x50> <== ALWAYS TAKEN _Context_Switch_necessary = true; } else if ( !_Thread_Is_heir( executing ) ) 10c704: 3b 05 78 42 12 00 cmp 0x124278,%eax 10c70a: 74 07 je 10c713 <_Thread_Yield_processor+0x57> <== NEVER TAKEN _Context_Switch_necessary = true; 10c70c: c6 05 b8 42 12 00 01 movb $0x1,0x1242b8 _ISR_Enable( level ); 10c713: 51 push %ecx 10c714: 9d popf } 10c715: 5b pop %ebx 10c716: 5e pop %esi 10c717: c9 leave 10c718: c3 ret 0010b708 <_Thread_blocking_operation_Cancel>: Thread_blocking_operation_States sync_state __attribute__((unused)), #endif Thread_Control *the_thread, ISR_Level level ) { 10b708: 55 push %ebp 10b709: 89 e5 mov %esp,%ebp 10b70b: 53 push %ebx 10b70c: 83 ec 04 sub $0x4,%esp 10b70f: 8b 5d 0c mov 0xc(%ebp),%ebx 10b712: 8b 45 10 mov 0x10(%ebp),%eax #endif /* * The thread is not waiting on anything after this completes. */ the_thread->Wait.queue = NULL; 10b715: 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 ) ) { 10b71c: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 10b720: 75 1a jne 10b73c <_Thread_blocking_operation_Cancel+0x34> RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 10b722: c7 43 50 03 00 00 00 movl $0x3,0x50(%ebx) _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 10b729: 50 push %eax 10b72a: 9d popf (void) _Watchdog_Remove( &the_thread->Timer ); 10b72b: 83 ec 0c sub $0xc,%esp 10b72e: 8d 43 48 lea 0x48(%ebx),%eax 10b731: 50 push %eax 10b732: e8 91 13 00 00 call 10cac8 <_Watchdog_Remove> 10b737: 83 c4 10 add $0x10,%esp 10b73a: eb 02 jmp 10b73e <_Thread_blocking_operation_Cancel+0x36> <== ALWAYS TAKEN } else _ISR_Enable( level ); 10b73c: 50 push %eax 10b73d: 9d popf RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 10b73e: c7 45 0c f8 ff 03 10 movl $0x1003fff8,0xc(%ebp) 10b745: 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 } 10b748: 8b 5d fc mov -0x4(%ebp),%ebx 10b74b: c9 leave 10b74c: e9 23 01 00 00 jmp 10b874 <_Thread_Clear_state> <== ALWAYS TAKEN 0010f1a0 <_Thread_queue_Dequeue_fifo>: */ Thread_Control *_Thread_queue_Dequeue_fifo( Thread_queue_Control *the_thread_queue ) { 10f1a0: 55 push %ebp 10f1a1: 89 e5 mov %esp,%ebp 10f1a3: 53 push %ebx 10f1a4: 83 ec 04 sub $0x4,%esp 10f1a7: 8b 45 08 mov 0x8(%ebp),%eax ISR_Level level; Thread_Control *the_thread; _ISR_Disable( level ); 10f1aa: 9c pushf 10f1ab: fa cli 10f1ac: 5a pop %edx */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 10f1ad: 8b 18 mov (%eax),%ebx */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10f1af: 8d 48 04 lea 0x4(%eax),%ecx 10f1b2: 39 cb cmp %ecx,%ebx 10f1b4: 74 41 je 10f1f7 <_Thread_queue_Dequeue_fifo+0x57> { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; 10f1b6: 8b 0b mov (%ebx),%ecx the_chain->first = new_first; 10f1b8: 89 08 mov %ecx,(%eax) new_first->previous = _Chain_Head(the_chain); 10f1ba: 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; 10f1bd: c7 43 44 00 00 00 00 movl $0x0,0x44(%ebx) if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 10f1c4: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 10f1c8: 74 06 je 10f1d0 <_Thread_queue_Dequeue_fifo+0x30> _ISR_Enable( level ); 10f1ca: 52 push %edx 10f1cb: 9d popf RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 10f1cc: 51 push %ecx 10f1cd: 51 push %ecx 10f1ce: eb 17 jmp 10f1e7 <_Thread_queue_Dequeue_fifo+0x47> <== ALWAYS TAKEN RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 10f1d0: c7 43 50 03 00 00 00 movl $0x3,0x50(%ebx) _Thread_Unblock( the_thread ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 10f1d7: 52 push %edx 10f1d8: 9d popf (void) _Watchdog_Remove( &the_thread->Timer ); 10f1d9: 83 ec 0c sub $0xc,%esp 10f1dc: 8d 43 48 lea 0x48(%ebx),%eax 10f1df: 50 push %eax 10f1e0: e8 e3 d8 ff ff call 10cac8 <_Watchdog_Remove> 10f1e5: 58 pop %eax 10f1e6: 5a pop %edx 10f1e7: 68 f8 ff 03 10 push $0x1003fff8 10f1ec: 53 push %ebx 10f1ed: e8 82 c6 ff ff call 10b874 <_Thread_Clear_state> 10f1f2: 83 c4 10 add $0x10,%esp 10f1f5: eb 04 jmp 10f1fb <_Thread_queue_Dequeue_fifo+0x5b> <== ALWAYS TAKEN #endif return the_thread; } _ISR_Enable( level ); 10f1f7: 52 push %edx 10f1f8: 9d popf 10f1f9: 31 db xor %ebx,%ebx return NULL; } 10f1fb: 89 d8 mov %ebx,%eax 10f1fd: 8b 5d fc mov -0x4(%ebp),%ebx 10f200: c9 leave 10f201: c3 ret 0010bfc8 <_Thread_queue_Dequeue_priority>: */ Thread_Control *_Thread_queue_Dequeue_priority( Thread_queue_Control *the_thread_queue ) { 10bfc8: 55 push %ebp 10bfc9: 89 e5 mov %esp,%ebp 10bfcb: 57 push %edi 10bfcc: 56 push %esi 10bfcd: 53 push %ebx 10bfce: 83 ec 1c sub $0x1c,%esp 10bfd1: 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 ); 10bfd4: 9c pushf 10bfd5: fa cli 10bfd6: 8f 45 e4 popl -0x1c(%ebp) 10bfd9: 89 ca mov %ecx,%edx 10bfdb: 31 c0 xor %eax,%eax */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10bfdd: 8d 5a 04 lea 0x4(%edx),%ebx 10bfe0: 39 1a cmp %ebx,(%edx) 10bfe2: 74 1e je 10c002 <_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 *) 10bfe4: 6b c0 0c imul $0xc,%eax,%eax 10bfe7: 8b 1c 08 mov (%eax,%ecx,1),%ebx */ _ISR_Enable( level ); return NULL; dequeue: the_thread->Wait.queue = NULL; 10bfea: c7 43 44 00 00 00 00 movl $0x0,0x44(%ebx) new_first_node = the_thread->Wait.Block2n.first; 10bff1: 8b 43 38 mov 0x38(%ebx),%eax new_first_thread = (Thread_Control *) new_first_node; next_node = the_thread->Object.Node.next; 10bff4: 8b 13 mov (%ebx),%edx previous_node = the_thread->Object.Node.previous; 10bff6: 8b 4b 04 mov 0x4(%ebx),%ecx 10bff9: 8d 73 3c lea 0x3c(%ebx),%esi 10bffc: 39 f0 cmp %esi,%eax 10bffe: 75 13 jne 10c013 <_Thread_queue_Dequeue_priority+0x4b> 10c000: eb 3b jmp 10c03d <_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++ ) { 10c002: 40 inc %eax 10c003: 83 c2 0c add $0xc,%edx Chain_Node *last_node; Chain_Node *next_node; Chain_Node *previous_node; _ISR_Disable( level ); for( index=0 ; 10c006: 83 f8 04 cmp $0x4,%eax 10c009: 75 d2 jne 10bfdd <_Thread_queue_Dequeue_priority+0x15> } /* * We did not find a thread to unblock. */ _ISR_Enable( level ); 10c00b: ff 75 e4 pushl -0x1c(%ebp) 10c00e: 9d popf 10c00f: 31 db xor %ebx,%ebx return NULL; 10c011: eb 64 jmp 10c077 <_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; 10c013: 8b 73 40 mov 0x40(%ebx),%esi new_second_node = new_first_node->next; 10c016: 8b 38 mov (%eax),%edi previous_node->next = new_first_node; 10c018: 89 01 mov %eax,(%ecx) next_node->previous = new_first_node; 10c01a: 89 42 04 mov %eax,0x4(%edx) new_first_node->next = next_node; 10c01d: 89 10 mov %edx,(%eax) new_first_node->previous = previous_node; 10c01f: 89 48 04 mov %ecx,0x4(%eax) if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) { 10c022: 8b 53 38 mov 0x38(%ebx),%edx 10c025: 3b 53 40 cmp 0x40(%ebx),%edx 10c028: 74 18 je 10c042 <_Thread_queue_Dequeue_priority+0x7a> /* > two threads on 2-n */ new_second_node->previous = 10c02a: 8d 50 38 lea 0x38(%eax),%edx 10c02d: 89 57 04 mov %edx,0x4(%edi) _Chain_Head( &new_first_thread->Wait.Block2n ); new_first_thread->Wait.Block2n.first = new_second_node; 10c030: 89 78 38 mov %edi,0x38(%eax) new_first_thread->Wait.Block2n.last = last_node; 10c033: 89 70 40 mov %esi,0x40(%eax) last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n ); 10c036: 83 c0 3c add $0x3c,%eax 10c039: 89 06 mov %eax,(%esi) 10c03b: eb 05 jmp 10c042 <_Thread_queue_Dequeue_priority+0x7a> <== ALWAYS TAKEN } } else { previous_node->next = next_node; 10c03d: 89 11 mov %edx,(%ecx) next_node->previous = previous_node; 10c03f: 89 4a 04 mov %ecx,0x4(%edx) } if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 10c042: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 10c046: 74 08 je 10c050 <_Thread_queue_Dequeue_priority+0x88> _ISR_Enable( level ); 10c048: ff 75 e4 pushl -0x1c(%ebp) 10c04b: 9d popf RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 10c04c: 51 push %ecx 10c04d: 51 push %ecx 10c04e: eb 19 jmp 10c069 <_Thread_queue_Dequeue_priority+0xa1> <== ALWAYS TAKEN RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 10c050: c7 43 50 03 00 00 00 movl $0x3,0x50(%ebx) _Thread_Unblock( the_thread ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 10c057: ff 75 e4 pushl -0x1c(%ebp) 10c05a: 9d popf (void) _Watchdog_Remove( &the_thread->Timer ); 10c05b: 83 ec 0c sub $0xc,%esp 10c05e: 8d 43 48 lea 0x48(%ebx),%eax 10c061: 50 push %eax 10c062: e8 61 0a 00 00 call 10cac8 <_Watchdog_Remove> 10c067: 58 pop %eax 10c068: 5a pop %edx 10c069: 68 f8 ff 03 10 push $0x1003fff8 10c06e: 53 push %ebx 10c06f: e8 00 f8 ff ff call 10b874 <_Thread_Clear_state> <== ALWAYS TAKEN 10c074: 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 ); } 10c077: 89 d8 mov %ebx,%eax 10c079: 8d 65 f4 lea -0xc(%ebp),%esp 10c07c: 5b pop %ebx 10c07d: 5e pop %esi 10c07e: 5f pop %edi 10c07f: c9 leave 10c080: c3 ret 0010f204 <_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 ) { 10f204: 55 push %ebp 10f205: 89 e5 mov %esp,%ebp 10f207: 56 push %esi 10f208: 53 push %ebx 10f209: 8b 55 08 mov 0x8(%ebp),%edx 10f20c: 8b 4d 0c mov 0xc(%ebp),%ecx Thread_blocking_operation_States sync_state; ISR_Level level; _ISR_Disable( level ); 10f20f: 9c pushf 10f210: fa cli 10f211: 5b pop %ebx sync_state = the_thread_queue->sync_state; 10f212: 8b 42 30 mov 0x30(%edx),%eax the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 10f215: c7 42 30 00 00 00 00 movl $0x0,0x30(%edx) if (sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) { 10f21c: 83 f8 01 cmp $0x1,%eax 10f21f: 75 17 jne 10f238 <_Thread_queue_Enqueue_fifo+0x34> Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 10f221: 8d 72 04 lea 0x4(%edx),%esi 10f224: 89 31 mov %esi,(%ecx) old_last_node = the_chain->last; 10f226: 8b 72 08 mov 0x8(%edx),%esi the_chain->last = the_node; 10f229: 89 4a 08 mov %ecx,0x8(%edx) old_last_node->next = the_node; 10f22c: 89 0e mov %ecx,(%esi) the_node->previous = old_last_node; 10f22e: 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; 10f231: 89 51 44 mov %edx,0x44(%ecx) the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; _ISR_Enable( level ); 10f234: 53 push %ebx 10f235: 9d popf return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 10f236: eb 05 jmp 10f23d <_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; 10f238: 8b 55 10 mov 0x10(%ebp),%edx 10f23b: 89 1a mov %ebx,(%edx) return sync_state; } 10f23d: 5b pop %ebx 10f23e: 5e pop %esi 10f23f: c9 leave 10f240: c3 ret 0010c110 <_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 ) { 10c110: 55 push %ebp 10c111: 89 e5 mov %esp,%ebp 10c113: 57 push %edi 10c114: 56 push %esi 10c115: 53 push %ebx 10c116: 83 ec 10 sub $0x10,%esp 10c119: 8b 4d 08 mov 0x8(%ebp),%ecx 10c11c: 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); 10c11f: 8d 50 3c lea 0x3c(%eax),%edx 10c122: 89 50 38 mov %edx,0x38(%eax) the_chain->permanent_null = NULL; 10c125: c7 40 3c 00 00 00 00 movl $0x0,0x3c(%eax) the_chain->last = _Chain_Head(the_chain); 10c12c: 8d 50 38 lea 0x38(%eax),%edx 10c12f: 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; 10c132: 8b 58 14 mov 0x14(%eax),%ebx header_index = _Thread_queue_Header_number( priority ); header = &the_thread_queue->Queues.Priority[ header_index ]; 10c135: 89 de mov %ebx,%esi 10c137: c1 ee 06 shr $0x6,%esi 10c13a: 6b f6 0c imul $0xc,%esi,%esi 10c13d: 8d 34 31 lea (%ecx,%esi,1),%esi block_state = the_thread_queue->state; 10c140: 8b 79 38 mov 0x38(%ecx),%edi if ( _Thread_queue_Is_reverse_search( priority ) ) 10c143: f6 c3 20 test $0x20,%bl 10c146: 75 70 jne 10c1b8 <_Thread_queue_Enqueue_priority+0xa8> */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10c148: 8d 56 04 lea 0x4(%esi),%edx 10c14b: 89 55 e8 mov %edx,-0x18(%ebp) goto restart_reverse_search; restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); 10c14e: 9c pushf 10c14f: fa cli 10c150: 8f 45 f0 popl -0x10(%ebp) search_thread = (Thread_Control *) header->first; 10c153: 8b 16 mov (%esi),%edx 10c155: c7 45 ec ff ff ff ff movl $0xffffffff,-0x14(%ebp) 10c15c: 89 75 e4 mov %esi,-0x1c(%ebp) while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 10c15f: eb 1f jmp 10c180 <_Thread_queue_Enqueue_priority+0x70> <== ALWAYS TAKEN search_priority = search_thread->current_priority; 10c161: 8b 72 14 mov 0x14(%edx),%esi 10c164: 89 75 ec mov %esi,-0x14(%ebp) if ( priority <= search_priority ) 10c167: 39 f3 cmp %esi,%ebx 10c169: 76 1a jbe 10c185 <_Thread_queue_Enqueue_priority+0x75> break; search_priority = search_thread->current_priority; if ( priority <= search_priority ) break; #endif _ISR_Flash( level ); 10c16b: ff 75 f0 pushl -0x10(%ebp) 10c16e: 9d popf 10c16f: fa cli if ( !_States_Are_set( search_thread->current_state, block_state) ) { 10c170: 85 7a 10 test %edi,0x10(%edx) 10c173: 75 09 jne 10c17e <_Thread_queue_Enqueue_priority+0x6e> <== NEVER TAKEN 10c175: 8b 75 e4 mov -0x1c(%ebp),%esi <== NOT EXECUTED _ISR_Enable( level ); 10c178: ff 75 f0 pushl -0x10(%ebp) <== NOT EXECUTED 10c17b: 9d popf <== NOT EXECUTED goto restart_forward_search; 10c17c: eb d0 jmp 10c14e <_Thread_queue_Enqueue_priority+0x3e> <== NOT EXECUTED } search_thread = (Thread_Control *)search_thread->Object.Node.next; 10c17e: 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 ) ) { 10c180: 3b 55 e8 cmp -0x18(%ebp),%edx 10c183: 75 dc jne 10c161 <_Thread_queue_Enqueue_priority+0x51> 10c185: 8b 75 f0 mov -0x10(%ebp),%esi } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != 10c188: 83 79 30 01 cmpl $0x1,0x30(%ecx) 10c18c: 0f 85 a9 00 00 00 jne 10c23b <_Thread_queue_Enqueue_priority+0x12b> THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 10c192: c7 41 30 00 00 00 00 movl $0x0,0x30(%ecx) if ( priority == search_priority ) 10c199: 3b 5d ec cmp -0x14(%ebp),%ebx 10c19c: 0f 84 82 00 00 00 je 10c224 <_Thread_queue_Enqueue_priority+0x114> goto equal_priority; search_node = (Chain_Node *) search_thread; previous_node = search_node->previous; 10c1a2: 8b 5a 04 mov 0x4(%edx),%ebx the_node = (Chain_Node *) the_thread; the_node->next = search_node; 10c1a5: 89 10 mov %edx,(%eax) the_node->previous = previous_node; 10c1a7: 89 58 04 mov %ebx,0x4(%eax) previous_node->next = the_node; 10c1aa: 89 03 mov %eax,(%ebx) search_node->previous = the_node; 10c1ac: 89 42 04 mov %eax,0x4(%edx) the_thread->Wait.queue = the_thread_queue; 10c1af: 89 48 44 mov %ecx,0x44(%eax) _ISR_Enable( level ); 10c1b2: ff 75 f0 pushl -0x10(%ebp) 10c1b5: 9d popf 10c1b6: eb 65 jmp 10c21d <_Thread_queue_Enqueue_priority+0x10d> <== ALWAYS TAKEN return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; 10c1b8: 0f b6 15 f4 01 12 00 movzbl 0x1201f4,%edx 10c1bf: 42 inc %edx 10c1c0: 89 55 ec mov %edx,-0x14(%ebp) _ISR_Disable( level ); 10c1c3: 9c pushf 10c1c4: fa cli 10c1c5: 8f 45 f0 popl -0x10(%ebp) search_thread = (Thread_Control *) header->last; 10c1c8: 8b 56 08 mov 0x8(%esi),%edx 10c1cb: 89 75 e8 mov %esi,-0x18(%ebp) while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { 10c1ce: eb 20 jmp 10c1f0 <_Thread_queue_Enqueue_priority+0xe0> <== ALWAYS TAKEN search_priority = search_thread->current_priority; 10c1d0: 8b 72 14 mov 0x14(%edx),%esi 10c1d3: 89 75 ec mov %esi,-0x14(%ebp) if ( priority >= search_priority ) 10c1d6: 39 f3 cmp %esi,%ebx 10c1d8: 73 1b jae 10c1f5 <_Thread_queue_Enqueue_priority+0xe5> break; search_priority = search_thread->current_priority; if ( priority >= search_priority ) break; #endif _ISR_Flash( level ); 10c1da: ff 75 f0 pushl -0x10(%ebp) 10c1dd: 9d popf 10c1de: fa cli if ( !_States_Are_set( search_thread->current_state, block_state) ) { 10c1df: 85 7a 10 test %edi,0x10(%edx) 10c1e2: 75 09 jne 10c1ed <_Thread_queue_Enqueue_priority+0xdd> 10c1e4: 8b 75 e8 mov -0x18(%ebp),%esi _ISR_Enable( level ); 10c1e7: ff 75 f0 pushl -0x10(%ebp) 10c1ea: 9d popf goto restart_reverse_search; 10c1eb: eb cb jmp 10c1b8 <_Thread_queue_Enqueue_priority+0xa8> <== ALWAYS TAKEN } search_thread = (Thread_Control *) 10c1ed: 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 ) ) { 10c1f0: 3b 55 e8 cmp -0x18(%ebp),%edx 10c1f3: 75 db jne 10c1d0 <_Thread_queue_Enqueue_priority+0xc0> 10c1f5: 8b 75 f0 mov -0x10(%ebp),%esi } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != 10c1f8: 83 79 30 01 cmpl $0x1,0x30(%ecx) 10c1fc: 75 3d jne 10c23b <_Thread_queue_Enqueue_priority+0x12b> THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 10c1fe: c7 41 30 00 00 00 00 movl $0x0,0x30(%ecx) if ( priority == search_priority ) 10c205: 3b 5d ec cmp -0x14(%ebp),%ebx 10c208: 74 1a je 10c224 <_Thread_queue_Enqueue_priority+0x114> goto equal_priority; search_node = (Chain_Node *) search_thread; next_node = search_node->next; 10c20a: 8b 1a mov (%edx),%ebx the_node = (Chain_Node *) the_thread; the_node->next = next_node; 10c20c: 89 18 mov %ebx,(%eax) the_node->previous = search_node; 10c20e: 89 50 04 mov %edx,0x4(%eax) search_node->next = the_node; 10c211: 89 02 mov %eax,(%edx) next_node->previous = the_node; 10c213: 89 43 04 mov %eax,0x4(%ebx) the_thread->Wait.queue = the_thread_queue; 10c216: 89 48 44 mov %ecx,0x44(%eax) _ISR_Enable( level ); 10c219: ff 75 f0 pushl -0x10(%ebp) 10c21c: 9d popf 10c21d: b8 01 00 00 00 mov $0x1,%eax return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 10c222: eb 1f jmp 10c243 <_Thread_queue_Enqueue_priority+0x133> <== ALWAYS TAKEN 10c224: 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; 10c227: 8b 5a 04 mov 0x4(%edx),%ebx the_node = (Chain_Node *) the_thread; the_node->next = search_node; 10c22a: 89 10 mov %edx,(%eax) the_node->previous = previous_node; 10c22c: 89 58 04 mov %ebx,0x4(%eax) previous_node->next = the_node; 10c22f: 89 03 mov %eax,(%ebx) search_node->previous = the_node; 10c231: 89 42 04 mov %eax,0x4(%edx) the_thread->Wait.queue = the_thread_queue; 10c234: 89 48 44 mov %ecx,0x44(%eax) _ISR_Enable( level ); 10c237: 56 push %esi 10c238: 9d popf 10c239: eb e2 jmp 10c21d <_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; 10c23b: 8b 45 10 mov 0x10(%ebp),%eax 10c23e: 89 30 mov %esi,(%eax) return the_thread_queue->sync_state; 10c240: 8b 41 30 mov 0x30(%ecx),%eax } 10c243: 83 c4 10 add $0x10,%esp 10c246: 5b pop %ebx 10c247: 5e pop %esi 10c248: 5f pop %edi 10c249: c9 leave 10c24a: c3 ret 0010c084 <_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 ) { 10c084: 55 push %ebp 10c085: 89 e5 mov %esp,%ebp 10c087: 57 push %edi 10c088: 56 push %esi 10c089: 53 push %ebx 10c08a: 83 ec 24 sub $0x24,%esp 10c08d: 8b 75 08 mov 0x8(%ebp),%esi 10c090: 8b 7d 0c mov 0xc(%ebp),%edi Thread_queue_Control *, Thread_Control *, ISR_Level * ); the_thread = _Thread_Executing; 10c093: 8b 1d a8 42 12 00 mov 0x1242a8,%ebx else #endif /* * Set the blocking state for this thread queue in the thread. */ _Thread_Set_state( the_thread, the_thread_queue->state ); 10c099: ff 76 38 pushl 0x38(%esi) 10c09c: 53 push %ebx 10c09d: e8 3a 03 00 00 call 10c3dc <_Thread_Set_state> <== ALWAYS TAKEN /* * If the thread wants to timeout, then schedule its timer. */ if ( timeout ) { 10c0a2: 83 c4 10 add $0x10,%esp 10c0a5: 85 ff test %edi,%edi 10c0a7: 74 30 je 10c0d9 <_Thread_queue_Enqueue_with_handler+0x55> _Watchdog_Initialize( 10c0a9: 8b 43 08 mov 0x8(%ebx),%eax Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 10c0ac: c7 43 50 00 00 00 00 movl $0x0,0x50(%ebx) the_watchdog->routine = routine; 10c0b3: 8b 55 10 mov 0x10(%ebp),%edx 10c0b6: 89 53 64 mov %edx,0x64(%ebx) the_watchdog->id = id; 10c0b9: 89 43 68 mov %eax,0x68(%ebx) the_watchdog->user_data = user_data; 10c0bc: c7 43 6c 00 00 00 00 movl $0x0,0x6c(%ebx) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 10c0c3: 89 7b 54 mov %edi,0x54(%ebx) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 10c0c6: 57 push %edi 10c0c7: 57 push %edi 10c0c8: 8d 43 48 lea 0x48(%ebx),%eax 10c0cb: 50 push %eax 10c0cc: 68 c8 42 12 00 push $0x1242c8 10c0d1: e8 da 08 00 00 call 10c9b0 <_Watchdog_Insert> <== ALWAYS TAKEN 10c0d6: 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 ) 10c0d9: b8 10 c1 10 00 mov $0x10c110,%eax 10c0de: 83 7e 34 01 cmpl $0x1,0x34(%esi) 10c0e2: 74 05 je 10c0e9 <_Thread_queue_Enqueue_with_handler+0x65> 10c0e4: b8 04 f2 10 00 mov $0x10f204,%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 ); 10c0e9: 51 push %ecx 10c0ea: 8d 55 e4 lea -0x1c(%ebp),%edx 10c0ed: 52 push %edx 10c0ee: 53 push %ebx 10c0ef: 56 push %esi 10c0f0: ff d0 call *%eax if ( sync_state != THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) 10c0f2: 83 c4 10 add $0x10,%esp 10c0f5: 83 f8 01 cmp $0x1,%eax 10c0f8: 74 0e je 10c108 <_Thread_queue_Enqueue_with_handler+0x84> _Thread_blocking_operation_Cancel( sync_state, the_thread, level ); 10c0fa: 52 push %edx 10c0fb: ff 75 e4 pushl -0x1c(%ebp) 10c0fe: 53 push %ebx 10c0ff: 50 push %eax 10c100: e8 03 f6 ff ff call 10b708 <_Thread_blocking_operation_Cancel> 10c105: 83 c4 10 add $0x10,%esp } 10c108: 8d 65 f4 lea -0xc(%ebp),%esp 10c10b: 5b pop %ebx 10c10c: 5e pop %esi 10c10d: 5f pop %edi 10c10e: c9 leave 10c10f: c3 ret 0010f244 <_Thread_queue_Extract>: void _Thread_queue_Extract( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { 10f244: 55 push %ebp 10f245: 89 e5 mov %esp,%ebp 10f247: 83 ec 08 sub $0x8,%esp 10f24a: 8b 45 08 mov 0x8(%ebp),%eax 10f24d: 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 ) 10f250: 83 78 34 01 cmpl $0x1,0x34(%eax) 10f254: 75 0f jne 10f265 <_Thread_queue_Extract+0x21> _Thread_queue_Extract_priority( the_thread_queue, the_thread ); 10f256: 51 push %ecx 10f257: 6a 00 push $0x0 10f259: 52 push %edx 10f25a: 50 push %eax 10f25b: e8 14 00 00 00 call 10f274 <_Thread_queue_Extract_priority_helper> <== ALWAYS TAKEN 10f260: 83 c4 10 add $0x10,%esp else /* must be THREAD_QUEUE_DISCIPLINE_FIFO */ _Thread_queue_Extract_fifo( the_thread_queue, the_thread ); } 10f263: c9 leave 10f264: 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 ); 10f265: 89 55 0c mov %edx,0xc(%ebp) 10f268: 89 45 08 mov %eax,0x8(%ebp) } 10f26b: 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 ); 10f26c: e9 7f 19 00 00 jmp 110bf0 <_Thread_queue_Extract_fifo> 00110bf0 <_Thread_queue_Extract_fifo>: void _Thread_queue_Extract_fifo( Thread_queue_Control *the_thread_queue __attribute__((unused)), Thread_Control *the_thread ) { 110bf0: 55 push %ebp 110bf1: 89 e5 mov %esp,%ebp 110bf3: 53 push %ebx 110bf4: 83 ec 04 sub $0x4,%esp 110bf7: 8b 5d 0c mov 0xc(%ebp),%ebx ISR_Level level; _ISR_Disable( level ); 110bfa: 9c pushf 110bfb: fa cli 110bfc: 58 pop %eax if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 110bfd: f7 43 10 e0 be 03 00 testl $0x3bee0,0x10(%ebx) 110c04: 75 07 jne 110c0d <_Thread_queue_Extract_fifo+0x1d> _ISR_Enable( level ); 110c06: 50 push %eax 110c07: 9d popf #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 110c08: 8b 5d fc mov -0x4(%ebp),%ebx 110c0b: c9 leave 110c0c: c3 ret ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 110c0d: 8b 0b mov (%ebx),%ecx previous = the_node->previous; 110c0f: 8b 53 04 mov 0x4(%ebx),%edx next->previous = previous; 110c12: 89 51 04 mov %edx,0x4(%ecx) previous->next = next; 110c15: 89 0a mov %ecx,(%edx) return; } _Chain_Extract_unprotected( &the_thread->Object.Node ); the_thread->Wait.queue = NULL; 110c17: c7 43 44 00 00 00 00 movl $0x0,0x44(%ebx) if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 110c1e: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 110c22: 74 04 je 110c28 <_Thread_queue_Extract_fifo+0x38> _ISR_Enable( level ); 110c24: 50 push %eax 110c25: 9d popf 110c26: eb 18 jmp 110c40 <_Thread_queue_Extract_fifo+0x50> <== ALWAYS TAKEN 110c28: c7 43 50 03 00 00 00 movl $0x3,0x50(%ebx) } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 110c2f: 50 push %eax 110c30: 9d popf (void) _Watchdog_Remove( &the_thread->Timer ); 110c31: 83 ec 0c sub $0xc,%esp 110c34: 8d 43 48 lea 0x48(%ebx),%eax 110c37: 50 push %eax 110c38: e8 8b be ff ff call 10cac8 <_Watchdog_Remove> 110c3d: 83 c4 10 add $0x10,%esp RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 110c40: c7 45 0c f8 ff 03 10 movl $0x1003fff8,0xc(%ebp) 110c47: 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 } 110c4a: 8b 5d fc mov -0x4(%ebp),%ebx 110c4d: c9 leave 110c4e: e9 21 ac ff ff jmp 10b874 <_Thread_Clear_state> 0010f274 <_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 ) { 10f274: 55 push %ebp 10f275: 89 e5 mov %esp,%ebp 10f277: 57 push %edi 10f278: 56 push %esi 10f279: 53 push %ebx 10f27a: 83 ec 1c sub $0x1c,%esp 10f27d: 8b 5d 0c mov 0xc(%ebp),%ebx 10f280: 8a 45 10 mov 0x10(%ebp),%al 10f283: 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 ); 10f286: 9c pushf 10f287: fa cli 10f288: 8f 45 e4 popl -0x1c(%ebp) if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 10f28b: f7 43 10 e0 be 03 00 testl $0x3bee0,0x10(%ebx) 10f292: 75 09 jne 10f29d <_Thread_queue_Extract_priority_helper+0x29> _ISR_Enable( level ); 10f294: ff 75 e4 pushl -0x1c(%ebp) 10f297: 9d popf return; 10f298: e9 86 00 00 00 jmp 10f323 <_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; 10f29d: 8b 13 mov (%ebx),%edx previous_node = the_node->previous; 10f29f: 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)); 10f2a2: 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; 10f2a5: 8d 73 3c lea 0x3c(%ebx),%esi 10f2a8: 39 f0 cmp %esi,%eax 10f2aa: 74 2a je 10f2d6 <_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; 10f2ac: 8b 73 40 mov 0x40(%ebx),%esi new_second_node = new_first_node->next; 10f2af: 8b 38 mov (%eax),%edi previous_node->next = new_first_node; 10f2b1: 89 01 mov %eax,(%ecx) next_node->previous = new_first_node; 10f2b3: 89 42 04 mov %eax,0x4(%edx) new_first_node->next = next_node; 10f2b6: 89 10 mov %edx,(%eax) new_first_node->previous = previous_node; 10f2b8: 89 48 04 mov %ecx,0x4(%eax) if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) { 10f2bb: 8b 53 38 mov 0x38(%ebx),%edx 10f2be: 3b 53 40 cmp 0x40(%ebx),%edx 10f2c1: 74 18 je 10f2db <_Thread_queue_Extract_priority_helper+0x67> /* > two threads on 2-n */ new_second_node->previous = 10f2c3: 8d 50 38 lea 0x38(%eax),%edx 10f2c6: 89 57 04 mov %edx,0x4(%edi) _Chain_Head( &new_first_thread->Wait.Block2n ); new_first_thread->Wait.Block2n.first = new_second_node; 10f2c9: 89 78 38 mov %edi,0x38(%eax) new_first_thread->Wait.Block2n.last = last_node; 10f2cc: 89 70 40 mov %esi,0x40(%eax) last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n ); 10f2cf: 83 c0 3c add $0x3c,%eax 10f2d2: 89 06 mov %eax,(%esi) 10f2d4: eb 05 jmp 10f2db <_Thread_queue_Extract_priority_helper+0x67> <== ALWAYS TAKEN } } else { previous_node->next = next_node; 10f2d6: 89 11 mov %edx,(%ecx) next_node->previous = previous_node; 10f2d8: 89 4a 04 mov %ecx,0x4(%edx) /* * If we are not supposed to touch timers or the thread's state, return. */ if ( requeuing ) { 10f2db: 80 7d e3 00 cmpb $0x0,-0x1d(%ebp) 10f2df: 74 06 je 10f2e7 <_Thread_queue_Extract_priority_helper+0x73> _ISR_Enable( level ); 10f2e1: ff 75 e4 pushl -0x1c(%ebp) 10f2e4: 9d popf 10f2e5: eb 3c jmp 10f323 <_Thread_queue_Extract_priority_helper+0xaf> <== ALWAYS TAKEN return; } if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 10f2e7: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 10f2eb: 74 06 je 10f2f3 <_Thread_queue_Extract_priority_helper+0x7f> _ISR_Enable( level ); 10f2ed: ff 75 e4 pushl -0x1c(%ebp) 10f2f0: 9d popf 10f2f1: eb 1a jmp 10f30d <_Thread_queue_Extract_priority_helper+0x99> <== ALWAYS TAKEN 10f2f3: c7 43 50 03 00 00 00 movl $0x3,0x50(%ebx) } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 10f2fa: ff 75 e4 pushl -0x1c(%ebp) 10f2fd: 9d popf (void) _Watchdog_Remove( &the_thread->Timer ); 10f2fe: 83 ec 0c sub $0xc,%esp 10f301: 8d 43 48 lea 0x48(%ebx),%eax 10f304: 50 push %eax 10f305: e8 be d7 ff ff call 10cac8 <_Watchdog_Remove> 10f30a: 83 c4 10 add $0x10,%esp 10f30d: c7 45 0c f8 ff 03 10 movl $0x1003fff8,0xc(%ebp) 10f314: 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 } 10f317: 8d 65 f4 lea -0xc(%ebp),%esp 10f31a: 5b pop %ebx 10f31b: 5e pop %esi 10f31c: 5f pop %edi 10f31d: c9 leave 10f31e: e9 51 c5 ff ff jmp 10b874 <_Thread_Clear_state> 10f323: 8d 65 f4 lea -0xc(%ebp),%esp 10f326: 5b pop %ebx 10f327: 5e pop %esi 10f328: 5f pop %edi 10f329: c9 leave 10f32a: c3 ret 0010df40 <_Thread_queue_First_priority>: */ Thread_Control *_Thread_queue_First_priority ( Thread_queue_Control *the_thread_queue ) { 10df40: 55 push %ebp 10df41: 89 e5 mov %esp,%ebp 10df43: 53 push %ebx 10df44: 8b 4d 08 mov 0x8(%ebp),%ecx 10df47: 89 ca mov %ecx,%edx 10df49: 31 c0 xor %eax,%eax 10df4b: 8d 5a 04 lea 0x4(%edx),%ebx 10df4e: 39 1a cmp %ebx,(%edx) 10df50: 74 08 je 10df5a <_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 *) 10df52: 6b c0 0c imul $0xc,%eax,%eax 10df55: 8b 04 08 mov (%eax,%ecx,1),%eax 10df58: eb 0b jmp 10df65 <_Thread_queue_First_priority+0x25> <== ALWAYS TAKEN { uint32_t index; for( index=0 ; index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ; index++ ) { 10df5a: 40 inc %eax 10df5b: 83 c2 0c add $0xc,%edx Thread_queue_Control *the_thread_queue ) { uint32_t index; for( index=0 ; 10df5e: 83 f8 04 cmp $0x4,%eax 10df61: 75 e8 jne 10df4b <_Thread_queue_First_priority+0xb> 10df63: 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; } 10df65: 5b pop %ebx 10df66: c9 leave 10df67: c3 ret 0010c274 <_Thread_queue_Flush>: #else Thread_queue_Flush_callout remote_extract_callout __attribute__((unused)), #endif uint32_t status ) { 10c274: 55 push %ebp 10c275: 89 e5 mov %esp,%ebp 10c277: 56 push %esi 10c278: 53 push %ebx 10c279: 8b 75 08 mov 0x8(%ebp),%esi 10c27c: 8b 5d 10 mov 0x10(%ebp),%ebx Thread_Control *the_thread; while ( (the_thread = _Thread_queue_Dequeue( the_thread_queue )) ) { 10c27f: eb 03 jmp 10c284 <_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; 10c281: 89 58 34 mov %ebx,0x34(%eax) uint32_t status ) { Thread_Control *the_thread; while ( (the_thread = _Thread_queue_Dequeue( the_thread_queue )) ) { 10c284: 83 ec 0c sub $0xc,%esp 10c287: 56 push %esi 10c288: e8 f3 fc ff ff call 10bf80 <_Thread_queue_Dequeue> <== ALWAYS TAKEN 10c28d: 83 c4 10 add $0x10,%esp 10c290: 85 c0 test %eax,%eax 10c292: 75 ed jne 10c281 <_Thread_queue_Flush+0xd> ( *remote_extract_callout )( the_thread ); else #endif the_thread->Wait.return_code = status; } } 10c294: 8d 65 f8 lea -0x8(%ebp),%esp 10c297: 5b pop %ebx 10c298: 5e pop %esi 10c299: c9 leave 10c29a: c3 ret 0010c29c <_Thread_queue_Initialize>: Thread_queue_Control *the_thread_queue, Thread_queue_Disciplines the_discipline, States_Control state, uint32_t timeout_status ) { 10c29c: 55 push %ebp 10c29d: 89 e5 mov %esp,%ebp 10c29f: 8b 45 08 mov 0x8(%ebp),%eax 10c2a2: 8b 55 0c mov 0xc(%ebp),%edx the_thread_queue->state = state; 10c2a5: 8b 4d 10 mov 0x10(%ebp),%ecx 10c2a8: 89 48 38 mov %ecx,0x38(%eax) the_thread_queue->discipline = the_discipline; 10c2ab: 89 50 34 mov %edx,0x34(%eax) the_thread_queue->timeout_status = timeout_status; 10c2ae: 8b 4d 14 mov 0x14(%ebp),%ecx 10c2b1: 89 48 3c mov %ecx,0x3c(%eax) the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 10c2b4: c7 40 30 00 00 00 00 movl $0x0,0x30(%eax) if ( the_discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) { 10c2bb: 4a dec %edx 10c2bc: 75 1b jne 10c2d9 <_Thread_queue_Initialize+0x3d> * timeout_status - return on a timeout * * Output parameters: NONE */ void _Thread_queue_Initialize( 10c2be: 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); 10c2c1: 8d 48 04 lea 0x4(%eax),%ecx 10c2c4: 89 08 mov %ecx,(%eax) the_chain->permanent_null = NULL; 10c2c6: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax) the_chain->last = _Chain_Head(the_chain); 10c2cd: 89 40 08 mov %eax,0x8(%eax) 10c2d0: 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 ; 10c2d3: 39 d0 cmp %edx,%eax 10c2d5: 75 ea jne 10c2c1 <_Thread_queue_Initialize+0x25> 10c2d7: eb 0f jmp 10c2e8 <_Thread_queue_Initialize+0x4c> <== ALWAYS TAKEN */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 10c2d9: 8d 50 04 lea 0x4(%eax),%edx 10c2dc: 89 10 mov %edx,(%eax) the_chain->permanent_null = NULL; 10c2de: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax) the_chain->last = _Chain_Head(the_chain); 10c2e5: 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 ); } } 10c2e8: c9 leave 10c2e9: c3 ret 0010f32c <_Thread_queue_Process_timeout>: #include void _Thread_queue_Process_timeout( Thread_Control *the_thread ) { 10f32c: 55 push %ebp 10f32d: 89 e5 mov %esp,%ebp 10f32f: 83 ec 08 sub $0x8,%esp 10f332: 8b 45 08 mov 0x8(%ebp),%eax Thread_queue_Control *the_thread_queue = the_thread->Wait.queue; 10f335: 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 && 10f338: 8b 4a 30 mov 0x30(%edx),%ecx 10f33b: 85 c9 test %ecx,%ecx 10f33d: 74 1c je 10f35b <_Thread_queue_Process_timeout+0x2f> 10f33f: 3b 05 a8 42 12 00 cmp 0x1242a8,%eax 10f345: 75 14 jne 10f35b <_Thread_queue_Process_timeout+0x2f> _Thread_Is_executing( the_thread ) ) { if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SATISFIED ) { 10f347: 83 f9 03 cmp $0x3,%ecx 10f34a: 74 23 je 10f36f <_Thread_queue_Process_timeout+0x43> the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; 10f34c: 8b 4a 3c mov 0x3c(%edx),%ecx 10f34f: 89 48 34 mov %ecx,0x34(%eax) the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; 10f352: c7 42 30 02 00 00 00 movl $0x2,0x30(%edx) 10f359: eb 14 jmp 10f36f <_Thread_queue_Process_timeout+0x43> <== ALWAYS TAKEN } } else { the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; 10f35b: 8b 52 3c mov 0x3c(%edx),%edx 10f35e: 89 50 34 mov %edx,0x34(%eax) _Thread_queue_Extract( the_thread->Wait.queue, the_thread ); 10f361: 52 push %edx 10f362: 52 push %edx 10f363: 50 push %eax 10f364: ff 70 44 pushl 0x44(%eax) 10f367: e8 d8 fe ff ff call 10f244 <_Thread_queue_Extract> <== ALWAYS TAKEN 10f36c: 83 c4 10 add $0x10,%esp } } 10f36f: c9 leave 10f370: c3 ret 0010c2ec <_Thread_queue_Requeue>: void _Thread_queue_Requeue( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { 10c2ec: 55 push %ebp 10c2ed: 89 e5 mov %esp,%ebp 10c2ef: 57 push %edi 10c2f0: 56 push %esi 10c2f1: 53 push %ebx 10c2f2: 83 ec 1c sub $0x1c,%esp 10c2f5: 8b 75 08 mov 0x8(%ebp),%esi 10c2f8: 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 ) 10c2fb: 85 f6 test %esi,%esi 10c2fd: 74 36 je 10c335 <_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 ) { 10c2ff: 83 7e 34 01 cmpl $0x1,0x34(%esi) 10c303: 75 30 jne 10c335 <_Thread_queue_Requeue+0x49> <== ALWAYS TAKEN Thread_queue_Control *tq = the_thread_queue; ISR_Level level; ISR_Level level_ignored; _ISR_Disable( level ); 10c305: 9c pushf 10c306: fa cli 10c307: 5b pop %ebx if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 10c308: f7 47 10 e0 be 03 00 testl $0x3bee0,0x10(%edi) 10c30f: 74 22 je 10c333 <_Thread_queue_Requeue+0x47> <== ALWAYS TAKEN 10c311: 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 ); 10c318: 50 push %eax 10c319: 6a 01 push $0x1 10c31b: 57 push %edi 10c31c: 56 push %esi 10c31d: e8 52 2f 00 00 call 10f274 <_Thread_queue_Extract_priority_helper> (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); 10c322: 83 c4 0c add $0xc,%esp 10c325: 8d 45 e4 lea -0x1c(%ebp),%eax 10c328: 50 push %eax 10c329: 57 push %edi 10c32a: 56 push %esi 10c32b: e8 e0 fd ff ff call 10c110 <_Thread_queue_Enqueue_priority> <== ALWAYS TAKEN 10c330: 83 c4 10 add $0x10,%esp } _ISR_Enable( level ); 10c333: 53 push %ebx 10c334: 9d popf } } 10c335: 8d 65 f4 lea -0xc(%ebp),%esp 10c338: 5b pop %ebx 10c339: 5e pop %esi 10c33a: 5f pop %edi 10c33b: c9 leave 10c33c: c3 ret 0010c340 <_Thread_queue_Timeout>: void _Thread_queue_Timeout( Objects_Id id, void *ignored __attribute__((unused)) ) { 10c340: 55 push %ebp 10c341: 89 e5 mov %esp,%ebp 10c343: 83 ec 20 sub $0x20,%esp Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 10c346: 8d 45 f4 lea -0xc(%ebp),%eax 10c349: 50 push %eax 10c34a: ff 75 08 pushl 0x8(%ebp) 10c34d: e8 c2 f8 ff ff call 10bc14 <_Thread_Get> <== ALWAYS TAKEN switch ( location ) { 10c352: 83 c4 10 add $0x10,%esp 10c355: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 10c359: 75 17 jne 10c372 <_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 ); 10c35b: 83 ec 0c sub $0xc,%esp 10c35e: 50 push %eax 10c35f: e8 c8 2f 00 00 call 10f32c <_Thread_queue_Process_timeout> <== ALWAYS TAKEN */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 10c364: a1 ec 41 12 00 mov 0x1241ec,%eax 10c369: 48 dec %eax 10c36a: a3 ec 41 12 00 mov %eax,0x1241ec 10c36f: 83 c4 10 add $0x10,%esp _Thread_Unnest_dispatch(); break; } } 10c372: c9 leave 10c373: 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 0c d7 13 00 mov 0x13d70c,%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 ca 36 00 00 call 119ca8 <_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 50 d6 13 00 mov 0x13d650,%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 a6 36 00 00 call 119ca8 <_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 29 36 00 00 call 119c3c <_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 3c 07 00 00 call 116d64 <_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 dd 36 00 00 call 119d30 <_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 c0 d5 13 00 mov 0x13d5c0,%eax 1166bd: 40 inc %eax 1166be: a3 c0 d5 13 00 mov %eax,0x13d5c0 /* * 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 4a 2e 00 00 call 119518 <_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 14 25 00 00 call 118bf5 <_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 5a 37 00 00 call 119e48 <_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 51 37 00 00 call 119e48 <_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 51 39 00 00 call 119e48 <_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 9c d6 13 00 push $0x13d69c 116517: e8 14 38 00 00 call 119d30 <_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 0b 39 00 00 call 119e48 <_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 90 d6 13 00 push $0x13d690 11655d: e8 ce 37 00 00 call 119d30 <_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 c0 d5 13 00 mov 0x13d5c0,%edx 11671f: 42 inc %edx 116720: 89 15 c0 d5 13 00 mov %edx,0x13d5c0 * 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 0c d7 13 00 mov 0x13d70c,%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 bb 35 00 00 call 119d30 <_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 50 d6 13 00 mov 0x13d650,%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 4e 35 00 00 call 119d30 <_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 f6 23 00 00 jmp 118bf5 <_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 2c 05 00 00 jmp 116d40 <_Chain_Append> <== ALWAYS TAKEN 0010c71c <_Timespec_Add_to>: uint32_t _Timespec_Add_to( struct timespec *time, const struct timespec *add ) { 10c71c: 55 push %ebp 10c71d: 89 e5 mov %esp,%ebp 10c71f: 8b 55 08 mov 0x8(%ebp),%edx 10c722: 8b 4d 0c mov 0xc(%ebp),%ecx uint32_t seconds = add->tv_sec; 10c725: 8b 01 mov (%ecx),%eax /* Add the basics */ time->tv_sec += add->tv_sec; 10c727: 01 02 add %eax,(%edx) time->tv_nsec += add->tv_nsec; 10c729: 8b 49 04 mov 0x4(%ecx),%ecx 10c72c: 03 4a 04 add 0x4(%edx),%ecx 10c72f: 89 4a 04 mov %ecx,0x4(%edx) /* Now adjust it so nanoseconds is in range */ while ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { 10c732: eb 09 jmp 10c73d <_Timespec_Add_to+0x21> <== ALWAYS TAKEN time->tv_nsec -= TOD_NANOSECONDS_PER_SECOND; time->tv_sec++; 10c734: ff 02 incl (%edx) seconds++; 10c736: 40 inc %eax 10c737: 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 ) { 10c73d: 81 f9 ff c9 9a 3b cmp $0x3b9ac9ff,%ecx 10c743: 77 ef ja 10c734 <_Timespec_Add_to+0x18> 10c745: 89 4a 04 mov %ecx,0x4(%edx) time->tv_sec++; seconds++; } return seconds; } 10c748: c9 leave 10c749: c3 ret 0010de3c <_Timespec_Divide>: const struct timespec *lhs, const struct timespec *rhs, uint32_t *ival_percentage, uint32_t *fval_percentage ) { 10de3c: 55 push %ebp 10de3d: 89 e5 mov %esp,%ebp 10de3f: 57 push %edi 10de40: 56 push %esi 10de41: 53 push %ebx 10de42: 83 ec 2c sub $0x2c,%esp 10de45: 8b 45 08 mov 0x8(%ebp),%eax 10de48: 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; 10de4b: 8b 10 mov (%eax),%edx 10de4d: 89 55 e0 mov %edx,-0x20(%ebp) left += lhs->tv_nsec; 10de50: 8b 58 04 mov 0x4(%eax),%ebx right = rhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; 10de53: b9 00 ca 9a 3b mov $0x3b9aca00,%ecx 10de58: 8b 06 mov (%esi),%eax 10de5a: f7 e9 imul %ecx 10de5c: 89 45 d0 mov %eax,-0x30(%ebp) 10de5f: 89 55 d4 mov %edx,-0x2c(%ebp) right += rhs->tv_nsec; 10de62: 8b 76 04 mov 0x4(%esi),%esi 10de65: 89 f7 mov %esi,%edi 10de67: c1 ff 1f sar $0x1f,%edi 10de6a: 01 75 d0 add %esi,-0x30(%ebp) 10de6d: 11 7d d4 adc %edi,-0x2c(%ebp) if ( right == 0 ) { 10de70: 8b 55 d4 mov -0x2c(%ebp),%edx 10de73: 0b 55 d0 or -0x30(%ebp),%edx 10de76: 75 14 jne 10de8c <_Timespec_Divide+0x50> *ival_percentage = 0; 10de78: 8b 45 10 mov 0x10(%ebp),%eax 10de7b: c7 00 00 00 00 00 movl $0x0,(%eax) *fval_percentage = 0; 10de81: 8b 55 14 mov 0x14(%ebp),%edx 10de84: c7 02 00 00 00 00 movl $0x0,(%edx) return; 10de8a: eb 73 jmp 10deff <_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; 10de8c: 8b 45 e0 mov -0x20(%ebp),%eax 10de8f: f7 e9 imul %ecx 10de91: 89 45 e0 mov %eax,-0x20(%ebp) 10de94: 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; 10de97: 89 de mov %ebx,%esi 10de99: c1 fe 1f sar $0x1f,%esi 10de9c: 01 5d e0 add %ebx,-0x20(%ebp) 10de9f: 11 75 e4 adc %esi,-0x1c(%ebp) 10dea2: 69 5d e4 a0 86 01 00 imul $0x186a0,-0x1c(%ebp),%ebx 10dea9: b9 a0 86 01 00 mov $0x186a0,%ecx 10deae: 8b 45 e0 mov -0x20(%ebp),%eax 10deb1: f7 e1 mul %ecx 10deb3: 89 45 e0 mov %eax,-0x20(%ebp) 10deb6: 01 da add %ebx,%edx 10deb8: 89 55 e4 mov %edx,-0x1c(%ebp) 10debb: ff 75 d4 pushl -0x2c(%ebp) 10debe: ff 75 d0 pushl -0x30(%ebp) 10dec1: ff 75 e4 pushl -0x1c(%ebp) 10dec4: ff 75 e0 pushl -0x20(%ebp) 10dec7: e8 d0 05 01 00 call 11e49c <__udivdi3> 10decc: 83 c4 10 add $0x10,%esp 10decf: 89 c3 mov %eax,%ebx 10ded1: 89 d6 mov %edx,%esi *ival_percentage = answer / 1000; 10ded3: 6a 00 push $0x0 10ded5: 68 e8 03 00 00 push $0x3e8 10deda: 52 push %edx 10dedb: 50 push %eax 10dedc: e8 bb 05 01 00 call 11e49c <__udivdi3> 10dee1: 83 c4 10 add $0x10,%esp 10dee4: 8b 55 10 mov 0x10(%ebp),%edx 10dee7: 89 02 mov %eax,(%edx) *fval_percentage = answer % 1000; 10dee9: 6a 00 push $0x0 10deeb: 68 e8 03 00 00 push $0x3e8 10def0: 56 push %esi 10def1: 53 push %ebx 10def2: e8 b5 06 01 00 call 11e5ac <__umoddi3> 10def7: 83 c4 10 add $0x10,%esp 10defa: 8b 55 14 mov 0x14(%ebp),%edx 10defd: 89 02 mov %eax,(%edx) } 10deff: 8d 65 f4 lea -0xc(%ebp),%esp 10df02: 5b pop %ebx 10df03: 5e pop %esi 10df04: 5f pop %edi 10df05: c9 leave 10df06: c3 ret 001357a4 <_Timespec_Greater_than>: bool _Timespec_Greater_than( const struct timespec *lhs, const struct timespec *rhs ) { 1357a4: 55 push %ebp 1357a5: 89 e5 mov %esp,%ebp 1357a7: 53 push %ebx 1357a8: 8b 4d 08 mov 0x8(%ebp),%ecx 1357ab: 8b 55 0c mov 0xc(%ebp),%edx if ( lhs->tv_sec > rhs->tv_sec ) 1357ae: 8b 1a mov (%edx),%ebx 1357b0: b0 01 mov $0x1,%al 1357b2: 39 19 cmp %ebx,(%ecx) 1357b4: 7f 0f jg 1357c5 <_Timespec_Greater_than+0x21> return true; if ( lhs->tv_sec < rhs->tv_sec ) 1357b6: 7d 04 jge 1357bc <_Timespec_Greater_than+0x18> 1357b8: 31 c0 xor %eax,%eax 1357ba: eb 09 jmp 1357c5 <_Timespec_Greater_than+0x21> <== ALWAYS TAKEN #include #include #include bool _Timespec_Greater_than( 1357bc: 8b 41 04 mov 0x4(%ecx),%eax 1357bf: 3b 42 04 cmp 0x4(%edx),%eax 1357c2: 0f 9f c0 setg %al /* ASSERT: lhs->tv_sec == rhs->tv_sec */ if ( lhs->tv_nsec > rhs->tv_nsec ) return true; return false; } 1357c5: 5b pop %ebx 1357c6: c9 leave 1357c7: c3 ret 00124f68 <_Timespec_Is_valid>: #include bool _Timespec_Is_valid( const struct timespec *time ) { 124f68: 55 push %ebp 124f69: 89 e5 mov %esp,%ebp 124f6b: 8b 45 08 mov 0x8(%ebp),%eax if ( !time ) 124f6e: 85 c0 test %eax,%eax 124f70: 74 16 je 124f88 <_Timespec_Is_valid+0x20> return false; if ( time->tv_sec < 0 ) 124f72: 83 38 00 cmpl $0x0,(%eax) 124f75: 78 11 js 124f88 <_Timespec_Is_valid+0x20> return false; if ( time->tv_nsec < 0 ) 124f77: 8b 40 04 mov 0x4(%eax),%eax 124f7a: 85 c0 test %eax,%eax 124f7c: 78 0a js 124f88 <_Timespec_Is_valid+0x20> #include #include #include bool _Timespec_Is_valid( 124f7e: 3d ff c9 9a 3b cmp $0x3b9ac9ff,%eax 124f83: 0f 96 c0 setbe %al 124f86: eb 02 jmp 124f8a <_Timespec_Is_valid+0x22> <== ALWAYS TAKEN 124f88: 31 c0 xor %eax,%eax if ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) return false; return true; } 124f8a: c9 leave 124f8b: c3 ret 001357c8 <_Timespec_Less_than>: bool _Timespec_Less_than( const struct timespec *lhs, const struct timespec *rhs ) { 1357c8: 55 push %ebp 1357c9: 89 e5 mov %esp,%ebp 1357cb: 53 push %ebx 1357cc: 8b 4d 08 mov 0x8(%ebp),%ecx 1357cf: 8b 55 0c mov 0xc(%ebp),%edx if ( lhs->tv_sec < rhs->tv_sec ) 1357d2: 8b 1a mov (%edx),%ebx 1357d4: b0 01 mov $0x1,%al 1357d6: 39 19 cmp %ebx,(%ecx) 1357d8: 7c 0f jl 1357e9 <_Timespec_Less_than+0x21> return true; if ( lhs->tv_sec > rhs->tv_sec ) 1357da: 7e 04 jle 1357e0 <_Timespec_Less_than+0x18> 1357dc: 31 c0 xor %eax,%eax 1357de: eb 09 jmp 1357e9 <_Timespec_Less_than+0x21> <== ALWAYS TAKEN #include #include #include bool _Timespec_Less_than( 1357e0: 8b 41 04 mov 0x4(%ecx),%eax 1357e3: 3b 42 04 cmp 0x4(%edx),%eax 1357e6: 0f 9c c0 setl %al /* ASSERT: lhs->tv_sec == rhs->tv_sec */ if ( lhs->tv_nsec < rhs->tv_nsec ) return true; return false; } 1357e9: 5b pop %ebx 1357ea: c9 leave 1357eb: c3 ret 0010c74c <_Timespec_Subtract>: void _Timespec_Subtract( const struct timespec *start, const struct timespec *end, struct timespec *result ) { 10c74c: 55 push %ebp 10c74d: 89 e5 mov %esp,%ebp 10c74f: 53 push %ebx 10c750: 8b 45 08 mov 0x8(%ebp),%eax 10c753: 8b 5d 0c mov 0xc(%ebp),%ebx 10c756: 8b 55 10 mov 0x10(%ebp),%edx if (end->tv_nsec < start->tv_nsec) { 10c759: 8b 4b 04 mov 0x4(%ebx),%ecx 10c75c: 3b 48 04 cmp 0x4(%eax),%ecx 10c75f: 8b 1b mov (%ebx),%ebx 10c761: 7d 0d jge 10c770 <_Timespec_Subtract+0x24> result->tv_sec = end->tv_sec - start->tv_sec - 1; 10c763: 4b dec %ebx 10c764: 2b 18 sub (%eax),%ebx 10c766: 89 1a mov %ebx,(%edx) result->tv_nsec = 10c768: 81 c1 00 ca 9a 3b add $0x3b9aca00,%ecx 10c76e: eb 04 jmp 10c774 <_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; 10c770: 2b 18 sub (%eax),%ebx 10c772: 89 1a mov %ebx,(%edx) result->tv_nsec = end->tv_nsec - start->tv_nsec; 10c774: 2b 48 04 sub 0x4(%eax),%ecx 10c777: 89 4a 04 mov %ecx,0x4(%edx) } } 10c77a: 5b pop %ebx 10c77b: c9 leave 10c77c: c3 ret 0010c893 <_User_extensions_Fatal>: void _User_extensions_Fatal ( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { 10c893: 55 push %ebp 10c894: 89 e5 mov %esp,%ebp 10c896: 57 push %edi 10c897: 56 push %esi 10c898: 53 push %ebx 10c899: 83 ec 0c sub $0xc,%esp 10c89c: 8b 7d 10 mov 0x10(%ebp),%edi Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 10c89f: 8b 1d 04 44 12 00 mov 0x124404,%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 ); 10c8a5: 0f b6 75 0c movzbl 0xc(%ebp),%esi ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 10c8a9: eb 15 jmp 10c8c0 <_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 ) 10c8ab: 8b 43 30 mov 0x30(%ebx),%eax 10c8ae: 85 c0 test %eax,%eax 10c8b0: 74 0b je 10c8bd <_User_extensions_Fatal+0x2a> (*the_extension->Callouts.fatal)( the_source, is_internal, the_error ); 10c8b2: 52 push %edx 10c8b3: 57 push %edi 10c8b4: 56 push %esi 10c8b5: ff 75 08 pushl 0x8(%ebp) 10c8b8: ff d0 call *%eax 10c8ba: 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 ) { 10c8bd: 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 ) ; 10c8c0: 81 fb fc 43 12 00 cmp $0x1243fc,%ebx 10c8c6: 75 e3 jne 10c8ab <_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 ); } } 10c8c8: 8d 65 f4 lea -0xc(%ebp),%esp 10c8cb: 5b pop %ebx 10c8cc: 5e pop %esi 10c8cd: 5f pop %edi 10c8ce: c9 leave 10c8cf: c3 ret 0010c780 <_User_extensions_Handler_initialization>: #include #include #include void _User_extensions_Handler_initialization(void) { 10c780: 55 push %ebp 10c781: 89 e5 mov %esp,%ebp 10c783: 57 push %edi 10c784: 56 push %esi 10c785: 53 push %ebx 10c786: 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; 10c789: a1 30 02 12 00 mov 0x120230,%eax 10c78e: 89 45 e4 mov %eax,-0x1c(%ebp) initial_extensions = Configuration.User_extension_table; 10c791: 8b 35 34 02 12 00 mov 0x120234,%esi */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 10c797: c7 05 fc 43 12 00 00 movl $0x124400,0x1243fc 10c79e: 44 12 00 the_chain->permanent_null = NULL; 10c7a1: c7 05 00 44 12 00 00 movl $0x0,0x124400 10c7a8: 00 00 00 the_chain->last = _Chain_Head(the_chain); 10c7ab: c7 05 04 44 12 00 fc movl $0x1243fc,0x124404 10c7b2: 43 12 00 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 10c7b5: c7 05 f0 41 12 00 f4 movl $0x1241f4,0x1241f0 10c7bc: 41 12 00 the_chain->permanent_null = NULL; 10c7bf: c7 05 f4 41 12 00 00 movl $0x0,0x1241f4 10c7c6: 00 00 00 the_chain->last = _Chain_Head(the_chain); 10c7c9: c7 05 f8 41 12 00 f0 movl $0x1241f0,0x1241f8 10c7d0: 41 12 00 _Chain_Initialize_empty( &_User_extensions_List ); _Chain_Initialize_empty( &_User_extensions_Switches_list ); if ( initial_extensions ) { 10c7d3: 85 f6 test %esi,%esi 10c7d5: 74 50 je 10c827 <_User_extensions_Handler_initialization+0xa7> extension = (User_extensions_Control *) 10c7d7: 6b c8 34 imul $0x34,%eax,%ecx 10c7da: 83 ec 0c sub $0xc,%esp 10c7dd: 51 push %ecx 10c7de: 89 4d e0 mov %ecx,-0x20(%ebp) 10c7e1: e8 b2 03 00 00 call 10cb98 <_Workspace_Allocate_or_fatal_error> <== ALWAYS TAKEN 10c7e6: 89 c3 mov %eax,%ebx _Workspace_Allocate_or_fatal_error( number_of_extensions * sizeof( User_extensions_Control ) ); memset ( 10c7e8: 31 c0 xor %eax,%eax 10c7ea: 8b 4d e0 mov -0x20(%ebp),%ecx 10c7ed: 89 df mov %ebx,%edi 10c7ef: f3 aa rep stos %al,%es:(%edi) 10c7f1: 89 f0 mov %esi,%eax 10c7f3: 31 d2 xor %edx,%edx 10c7f5: eb 28 jmp 10c81f <_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; 10c7f7: 8d 7b 14 lea 0x14(%ebx),%edi 10c7fa: 89 c6 mov %eax,%esi 10c7fc: b9 08 00 00 00 mov $0x8,%ecx 10c801: f3 a5 rep movsl %ds:(%esi),%es:(%edi) _User_extensions_Add_set( extension ); 10c803: 83 ec 0c sub $0xc,%esp 10c806: 53 push %ebx 10c807: 89 45 e0 mov %eax,-0x20(%ebp) 10c80a: 89 55 dc mov %edx,-0x24(%ebp) 10c80d: e8 96 2d 00 00 call 10f5a8 <_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++; 10c812: 83 c3 34 add $0x34,%ebx extension, 0, number_of_extensions * sizeof( User_extensions_Control ) ); for ( i = 0 ; i < number_of_extensions ; i++ ) { 10c815: 8b 55 dc mov -0x24(%ebp),%edx 10c818: 42 inc %edx 10c819: 8b 45 e0 mov -0x20(%ebp),%eax 10c81c: 83 c0 20 add $0x20,%eax 10c81f: 83 c4 10 add $0x10,%esp 10c822: 3b 55 e4 cmp -0x1c(%ebp),%edx 10c825: 72 d0 jb 10c7f7 <_User_extensions_Handler_initialization+0x77> _User_extensions_Add_set_with_table (extension, &initial_extensions[i]); extension++; } } } 10c827: 8d 65 f4 lea -0xc(%ebp),%esp 10c82a: 5b pop %ebx 10c82b: 5e pop %esi 10c82c: 5f pop %edi 10c82d: c9 leave 10c82e: c3 ret 0010c830 <_User_extensions_Thread_begin>: #include void _User_extensions_Thread_begin ( Thread_Control *executing ) { 10c830: 55 push %ebp 10c831: 89 e5 mov %esp,%ebp 10c833: 56 push %esi 10c834: 53 push %ebx 10c835: 8b 75 08 mov 0x8(%ebp),%esi Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 10c838: 8b 1d fc 43 12 00 mov 0x1243fc,%ebx 10c83e: eb 12 jmp 10c852 <_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 ) 10c840: 8b 43 28 mov 0x28(%ebx),%eax 10c843: 85 c0 test %eax,%eax 10c845: 74 09 je 10c850 <_User_extensions_Thread_begin+0x20> (*the_extension->Callouts.thread_begin)( executing ); 10c847: 83 ec 0c sub $0xc,%esp 10c84a: 56 push %esi 10c84b: ff d0 call *%eax 10c84d: 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 ) { 10c850: 8b 1b mov (%ebx),%ebx */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10c852: 81 fb 00 44 12 00 cmp $0x124400,%ebx 10c858: 75 e6 jne 10c840 <_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 ); } } 10c85a: 8d 65 f8 lea -0x8(%ebp),%esp 10c85d: 5b pop %ebx 10c85e: 5e pop %esi 10c85f: c9 leave 10c860: c3 ret 0010c8d0 <_User_extensions_Thread_create>: #include bool _User_extensions_Thread_create ( Thread_Control *the_thread ) { 10c8d0: 55 push %ebp 10c8d1: 89 e5 mov %esp,%ebp 10c8d3: 56 push %esi 10c8d4: 53 push %ebx 10c8d5: 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 ; 10c8d8: 8b 1d fc 43 12 00 mov 0x1243fc,%ebx 10c8de: eb 1b jmp 10c8fb <_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 ) { 10c8e0: 8b 43 14 mov 0x14(%ebx),%eax 10c8e3: 85 c0 test %eax,%eax 10c8e5: 74 12 je 10c8f9 <_User_extensions_Thread_create+0x29> status = (*the_extension->Callouts.thread_create)( 10c8e7: 52 push %edx 10c8e8: 52 push %edx 10c8e9: 56 push %esi 10c8ea: ff 35 a8 42 12 00 pushl 0x1242a8 10c8f0: ff d0 call *%eax _Thread_Executing, the_thread ); if ( !status ) 10c8f2: 83 c4 10 add $0x10,%esp 10c8f5: 84 c0 test %al,%al 10c8f7: 74 0c je 10c905 <_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 ) { 10c8f9: 8b 1b mov (%ebx),%ebx 10c8fb: 81 fb 00 44 12 00 cmp $0x124400,%ebx 10c901: 75 dd jne 10c8e0 <_User_extensions_Thread_create+0x10> 10c903: b0 01 mov $0x1,%al return false; } } return true; } 10c905: 8d 65 f8 lea -0x8(%ebp),%esp 10c908: 5b pop %ebx 10c909: 5e pop %esi 10c90a: c9 leave 10c90b: c3 ret 0010c90c <_User_extensions_Thread_delete>: #include void _User_extensions_Thread_delete ( Thread_Control *the_thread ) { 10c90c: 55 push %ebp 10c90d: 89 e5 mov %esp,%ebp 10c90f: 56 push %esi 10c910: 53 push %ebx 10c911: 8b 75 08 mov 0x8(%ebp),%esi Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 10c914: 8b 1d 04 44 12 00 mov 0x124404,%ebx 10c91a: eb 18 jmp 10c934 <_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 ) 10c91c: 8b 43 20 mov 0x20(%ebx),%eax 10c91f: 85 c0 test %eax,%eax 10c921: 74 0e je 10c931 <_User_extensions_Thread_delete+0x25> (*the_extension->Callouts.thread_delete)( 10c923: 52 push %edx 10c924: 52 push %edx 10c925: 56 push %esi 10c926: ff 35 a8 42 12 00 pushl 0x1242a8 10c92c: ff d0 call *%eax 10c92e: 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 ) { 10c931: 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 ) ; 10c934: 81 fb fc 43 12 00 cmp $0x1243fc,%ebx 10c93a: 75 e0 jne 10c91c <_User_extensions_Thread_delete+0x10> (*the_extension->Callouts.thread_delete)( _Thread_Executing, the_thread ); } } 10c93c: 8d 65 f8 lea -0x8(%ebp),%esp 10c93f: 5b pop %ebx 10c940: 5e pop %esi 10c941: c9 leave 10c942: c3 ret 0010c861 <_User_extensions_Thread_exitted>: void _User_extensions_Thread_exitted ( Thread_Control *executing ) { 10c861: 55 push %ebp 10c862: 89 e5 mov %esp,%ebp 10c864: 56 push %esi 10c865: 53 push %ebx 10c866: 8b 75 08 mov 0x8(%ebp),%esi Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 10c869: 8b 1d 04 44 12 00 mov 0x124404,%ebx 10c86f: eb 13 jmp 10c884 <_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 ) 10c871: 8b 43 2c mov 0x2c(%ebx),%eax 10c874: 85 c0 test %eax,%eax 10c876: 74 09 je 10c881 <_User_extensions_Thread_exitted+0x20> (*the_extension->Callouts.thread_exitted)( executing ); 10c878: 83 ec 0c sub $0xc,%esp 10c87b: 56 push %esi 10c87c: ff d0 call *%eax 10c87e: 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 ) { 10c881: 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 ) ; 10c884: 81 fb fc 43 12 00 cmp $0x1243fc,%ebx 10c88a: 75 e5 jne 10c871 <_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 ); } } 10c88c: 8d 65 f8 lea -0x8(%ebp),%esp 10c88f: 5b pop %ebx 10c890: 5e pop %esi 10c891: c9 leave 10c892: c3 ret 0010d3c8 <_User_extensions_Thread_restart>: #include void _User_extensions_Thread_restart ( Thread_Control *the_thread ) { 10d3c8: 55 push %ebp 10d3c9: 89 e5 mov %esp,%ebp 10d3cb: 56 push %esi 10d3cc: 53 push %ebx 10d3cd: 8b 75 08 mov 0x8(%ebp),%esi Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 10d3d0: 8b 1d 48 64 12 00 mov 0x126448,%ebx 10d3d6: eb 17 jmp 10d3ef <_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 ) 10d3d8: 8b 43 1c mov 0x1c(%ebx),%eax 10d3db: 85 c0 test %eax,%eax 10d3dd: 74 0e je 10d3ed <_User_extensions_Thread_restart+0x25> (*the_extension->Callouts.thread_restart)( 10d3df: 52 push %edx 10d3e0: 52 push %edx 10d3e1: 56 push %esi 10d3e2: ff 35 f4 62 12 00 pushl 0x1262f4 10d3e8: ff d0 call *%eax 10d3ea: 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 ) { 10d3ed: 8b 1b mov (%ebx),%ebx 10d3ef: 81 fb 4c 64 12 00 cmp $0x12644c,%ebx 10d3f5: 75 e1 jne 10d3d8 <_User_extensions_Thread_restart+0x10> (*the_extension->Callouts.thread_restart)( _Thread_Executing, the_thread ); } } 10d3f7: 8d 65 f8 lea -0x8(%ebp),%esp 10d3fa: 5b pop %ebx 10d3fb: 5e pop %esi 10d3fc: c9 leave 10d3fd: c3 ret 0010c944 <_User_extensions_Thread_start>: #include void _User_extensions_Thread_start ( Thread_Control *the_thread ) { 10c944: 55 push %ebp 10c945: 89 e5 mov %esp,%ebp 10c947: 56 push %esi 10c948: 53 push %ebx 10c949: 8b 75 08 mov 0x8(%ebp),%esi Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 10c94c: 8b 1d fc 43 12 00 mov 0x1243fc,%ebx 10c952: eb 17 jmp 10c96b <_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 ) 10c954: 8b 43 18 mov 0x18(%ebx),%eax 10c957: 85 c0 test %eax,%eax 10c959: 74 0e je 10c969 <_User_extensions_Thread_start+0x25> (*the_extension->Callouts.thread_start)( 10c95b: 52 push %edx 10c95c: 52 push %edx 10c95d: 56 push %esi 10c95e: ff 35 a8 42 12 00 pushl 0x1242a8 10c964: ff d0 call *%eax 10c966: 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 ) { 10c969: 8b 1b mov (%ebx),%ebx 10c96b: 81 fb 00 44 12 00 cmp $0x124400,%ebx 10c971: 75 e1 jne 10c954 <_User_extensions_Thread_start+0x10> (*the_extension->Callouts.thread_start)( _Thread_Executing, the_thread ); } } 10c973: 8d 65 f8 lea -0x8(%ebp),%esp 10c976: 5b pop %ebx 10c977: 5e pop %esi 10c978: c9 leave 10c979: c3 ret 0010c97c <_User_extensions_Thread_switch>: void _User_extensions_Thread_switch ( Thread_Control *executing, Thread_Control *heir ) { 10c97c: 55 push %ebp 10c97d: 89 e5 mov %esp,%ebp 10c97f: 57 push %edi 10c980: 56 push %esi 10c981: 53 push %ebx 10c982: 83 ec 0c sub $0xc,%esp 10c985: 8b 7d 08 mov 0x8(%ebp),%edi 10c988: 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 ; 10c98b: 8b 1d f0 41 12 00 mov 0x1241f0,%ebx 10c991: eb 0c jmp 10c99f <_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 ); 10c993: 50 push %eax 10c994: 50 push %eax 10c995: 56 push %esi 10c996: 57 push %edi 10c997: 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 ) { 10c99a: 8b 1b mov (%ebx),%ebx 10c99c: 83 c4 10 add $0x10,%esp 10c99f: 81 fb f4 41 12 00 cmp $0x1241f4,%ebx 10c9a5: 75 ec jne 10c993 <_User_extensions_Thread_switch+0x17> the_extension_switch = (User_extensions_Switch_control *) the_node; (*the_extension_switch->thread_switch)( executing, heir ); } } 10c9a7: 8d 65 f4 lea -0xc(%ebp),%esp 10c9aa: 5b pop %ebx 10c9ab: 5e pop %esi 10c9ac: 5f pop %edi 10c9ad: c9 leave 10c9ae: c3 ret 0010e1a8 <_Watchdog_Adjust>: void _Watchdog_Adjust( Chain_Control *header, Watchdog_Adjust_directions direction, Watchdog_Interval units ) { 10e1a8: 55 push %ebp 10e1a9: 89 e5 mov %esp,%ebp 10e1ab: 57 push %edi 10e1ac: 56 push %esi 10e1ad: 53 push %ebx 10e1ae: 83 ec 1c sub $0x1c,%esp 10e1b1: 8b 75 08 mov 0x8(%ebp),%esi 10e1b4: 8b 7d 0c mov 0xc(%ebp),%edi 10e1b7: 8b 5d 10 mov 0x10(%ebp),%ebx ISR_Level level; _ISR_Disable( level ); 10e1ba: 9c pushf 10e1bb: fa cli 10e1bc: 58 pop %eax */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 10e1bd: 8b 16 mov (%esi),%edx */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10e1bf: 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 ) ) { 10e1c2: 39 ca cmp %ecx,%edx 10e1c4: 74 44 je 10e20a <_Watchdog_Adjust+0x62> switch ( direction ) { 10e1c6: 85 ff test %edi,%edi 10e1c8: 74 3c je 10e206 <_Watchdog_Adjust+0x5e> 10e1ca: 4f dec %edi 10e1cb: 75 3d jne 10e20a <_Watchdog_Adjust+0x62> <== ALWAYS TAKEN case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; 10e1cd: 01 5a 10 add %ebx,0x10(%edx) break; 10e1d0: eb 38 jmp 10e20a <_Watchdog_Adjust+0x62> <== ALWAYS TAKEN RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_First( Chain_Control *header ) { return ( (Watchdog_Control *) header->first ); 10e1d2: 8b 16 mov (%esi),%edx case WATCHDOG_FORWARD: while ( units ) { if ( units < _Watchdog_First( header )->delta_interval ) { 10e1d4: 8b 7a 10 mov 0x10(%edx),%edi 10e1d7: 39 fb cmp %edi,%ebx 10e1d9: 73 07 jae 10e1e2 <_Watchdog_Adjust+0x3a> _Watchdog_First( header )->delta_interval -= units; 10e1db: 29 df sub %ebx,%edi 10e1dd: 89 7a 10 mov %edi,0x10(%edx) break; 10e1e0: eb 28 jmp 10e20a <_Watchdog_Adjust+0x62> <== ALWAYS TAKEN } else { units -= _Watchdog_First( header )->delta_interval; _Watchdog_First( header )->delta_interval = 1; 10e1e2: c7 42 10 01 00 00 00 movl $0x1,0x10(%edx) _ISR_Enable( level ); 10e1e9: 50 push %eax 10e1ea: 9d popf _Watchdog_Tickle( header ); 10e1eb: 83 ec 0c sub $0xc,%esp 10e1ee: 56 push %esi 10e1ef: 89 4d e4 mov %ecx,-0x1c(%ebp) 10e1f2: e8 9d 01 00 00 call 10e394 <_Watchdog_Tickle> <== ALWAYS TAKEN _ISR_Disable( level ); 10e1f7: 9c pushf 10e1f8: fa cli 10e1f9: 58 pop %eax if ( _Chain_Is_empty( header ) ) 10e1fa: 83 c4 10 add $0x10,%esp 10e1fd: 8b 4d e4 mov -0x1c(%ebp),%ecx 10e200: 39 0e cmp %ecx,(%esi) 10e202: 74 06 je 10e20a <_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; 10e204: 29 fb sub %edi,%ebx switch ( direction ) { case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { 10e206: 85 db test %ebx,%ebx 10e208: 75 c8 jne 10e1d2 <_Watchdog_Adjust+0x2a> <== NEVER TAKEN } break; } } _ISR_Enable( level ); 10e20a: 50 push %eax 10e20b: 9d popf } 10e20c: 8d 65 f4 lea -0xc(%ebp),%esp 10e20f: 5b pop %ebx 10e210: 5e pop %esi 10e211: 5f pop %edi 10e212: c9 leave 10e213: c3 ret 00119ca8 <_Watchdog_Adjust_to_chain>: Chain_Control *header, Watchdog_Interval units_arg, Chain_Control *to_fire ) { 119ca8: 55 push %ebp 119ca9: 89 e5 mov %esp,%ebp 119cab: 57 push %edi 119cac: 56 push %esi 119cad: 53 push %ebx 119cae: 83 ec 0c sub $0xc,%esp 119cb1: 8b 7d 08 mov 0x8(%ebp),%edi 119cb4: 8b 4d 0c mov 0xc(%ebp),%ecx 119cb7: 8b 75 10 mov 0x10(%ebp),%esi Watchdog_Interval units = units_arg; ISR_Level level; Watchdog_Control *first; if ( units <= 0 ) { 119cba: 85 c9 test %ecx,%ecx 119cbc: 74 69 je 119d27 <_Watchdog_Adjust_to_chain+0x7f> return; } _ISR_Disable( level ); 119cbe: 9c pushf 119cbf: fa cli 119cc0: 8f 45 ec popl -0x14(%ebp) 119cc3: 8d 47 04 lea 0x4(%edi),%eax 119cc6: 89 45 f0 mov %eax,-0x10(%ebp) 119cc9: 8d 56 04 lea 0x4(%esi),%edx 119ccc: 89 55 e8 mov %edx,-0x18(%ebp) 119ccf: eb 04 jmp 119cd5 <_Watchdog_Adjust_to_chain+0x2d> <== ALWAYS TAKEN while ( 1 ) { if ( units <= 0 ) { 119cd1: 85 c9 test %ecx,%ecx 119cd3: 74 4e je 119d23 <_Watchdog_Adjust_to_chain+0x7b> */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 119cd5: 8b 17 mov (%edi),%edx break; } if ( _Chain_Is_empty( header ) ) { 119cd7: 3b 55 f0 cmp -0x10(%ebp),%edx 119cda: 74 47 je 119d23 <_Watchdog_Adjust_to_chain+0x7b> 119cdc: 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 ) { 119cde: 8b 5a 10 mov 0x10(%edx),%ebx 119ce1: 39 d9 cmp %ebx,%ecx 119ce3: 73 07 jae 119cec <_Watchdog_Adjust_to_chain+0x44> first->delta_interval -= units; 119ce5: 29 cb sub %ecx,%ebx 119ce7: 89 5a 10 mov %ebx,0x10(%edx) break; 119cea: eb 37 jmp 119d23 <_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; 119cec: 29 d9 sub %ebx,%ecx first->delta_interval = 0; 119cee: c7 42 10 00 00 00 00 movl $0x0,0x10(%edx) ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 119cf5: 8b 18 mov (%eax),%ebx previous = the_node->previous; 119cf7: 8b 50 04 mov 0x4(%eax),%edx next->previous = previous; 119cfa: 89 53 04 mov %edx,0x4(%ebx) previous->next = next; 119cfd: 89 1a mov %ebx,(%edx) Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 119cff: 8b 55 e8 mov -0x18(%ebp),%edx 119d02: 89 10 mov %edx,(%eax) old_last_node = the_chain->last; 119d04: 8b 56 08 mov 0x8(%esi),%edx the_chain->last = the_node; 119d07: 89 46 08 mov %eax,0x8(%esi) old_last_node->next = the_node; 119d0a: 89 02 mov %eax,(%edx) the_node->previous = old_last_node; 119d0c: 89 50 04 mov %edx,0x4(%eax) while ( 1 ) { _Chain_Extract_unprotected( &first->Node ); _Chain_Append_unprotected( to_fire, &first->Node ); _ISR_Flash( level ); 119d0f: ff 75 ec pushl -0x14(%ebp) 119d12: 9d popf 119d13: fa cli */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 119d14: 8b 07 mov (%edi),%eax if ( _Chain_Is_empty( header ) ) 119d16: 3b 45 f0 cmp -0x10(%ebp),%eax 119d19: 74 b6 je 119cd1 <_Watchdog_Adjust_to_chain+0x29> break; first = _Watchdog_First( header ); if ( first->delta_interval != 0 ) 119d1b: 83 78 10 00 cmpl $0x0,0x10(%eax) 119d1f: 74 d4 je 119cf5 <_Watchdog_Adjust_to_chain+0x4d> 119d21: eb ae jmp 119cd1 <_Watchdog_Adjust_to_chain+0x29> <== ALWAYS TAKEN break; } } _ISR_Enable( level ); 119d23: ff 75 ec pushl -0x14(%ebp) 119d26: 9d popf } 119d27: 83 c4 0c add $0xc,%esp 119d2a: 5b pop %ebx 119d2b: 5e pop %esi 119d2c: 5f pop %edi 119d2d: c9 leave 119d2e: c3 ret 0010c9b0 <_Watchdog_Insert>: void _Watchdog_Insert( Chain_Control *header, Watchdog_Control *the_watchdog ) { 10c9b0: 55 push %ebp 10c9b1: 89 e5 mov %esp,%ebp 10c9b3: 57 push %edi 10c9b4: 56 push %esi 10c9b5: 53 push %ebx 10c9b6: 83 ec 08 sub $0x8,%esp 10c9b9: 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; 10c9bc: 8b 35 84 42 12 00 mov 0x124284,%esi _ISR_Disable( level ); 10c9c2: 9c pushf 10c9c3: fa cli 10c9c4: 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 ) { 10c9c5: 83 78 08 00 cmpl $0x0,0x8(%eax) 10c9c9: 74 07 je 10c9d2 <_Watchdog_Insert+0x22> _ISR_Enable( level ); 10c9cb: 53 push %ebx 10c9cc: 9d popf return; 10c9cd: e9 8d 00 00 00 jmp 10ca5f <_Watchdog_Insert+0xaf> <== ALWAYS TAKEN } the_watchdog->state = WATCHDOG_BEING_INSERTED; 10c9d2: c7 40 08 01 00 00 00 movl $0x1,0x8(%eax) _Watchdog_Sync_count++; 10c9d9: 8b 15 34 43 12 00 mov 0x124334,%edx 10c9df: 42 inc %edx 10c9e0: 89 15 34 43 12 00 mov %edx,0x124334 restart: delta_interval = the_watchdog->initial; 10c9e6: 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 ; 10c9e9: 8b 7d 08 mov 0x8(%ebp),%edi 10c9ec: 8b 17 mov (%edi),%edx ; after = _Watchdog_Next( after ) ) { if ( delta_interval == 0 || !_Watchdog_Next( after ) ) 10c9ee: 85 c9 test %ecx,%ecx 10c9f0: 74 38 je 10ca2a <_Watchdog_Insert+0x7a> 10c9f2: 83 3a 00 cmpl $0x0,(%edx) 10c9f5: 74 33 je 10ca2a <_Watchdog_Insert+0x7a> break; if ( delta_interval < after->delta_interval ) { 10c9f7: 8b 7a 10 mov 0x10(%edx),%edi 10c9fa: 89 7d ec mov %edi,-0x14(%ebp) 10c9fd: 39 f9 cmp %edi,%ecx 10c9ff: 73 07 jae 10ca08 <_Watchdog_Insert+0x58> after->delta_interval -= delta_interval; 10ca01: 29 cf sub %ecx,%edi 10ca03: 89 7a 10 mov %edi,0x10(%edx) break; 10ca06: eb 22 jmp 10ca2a <_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 ); 10ca08: 53 push %ebx 10ca09: 9d popf 10ca0a: fa cli if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { 10ca0b: 83 78 08 01 cmpl $0x1,0x8(%eax) 10ca0f: 75 3b jne 10ca4c <_Watchdog_Insert+0x9c> goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) { 10ca11: 8b 3d a4 42 12 00 mov 0x1242a4,%edi 10ca17: 39 f7 cmp %esi,%edi 10ca19: 76 08 jbe 10ca23 <_Watchdog_Insert+0x73> _Watchdog_Sync_level = insert_isr_nest_level; 10ca1b: 89 35 a4 42 12 00 mov %esi,0x1242a4 goto restart; 10ca21: eb c3 jmp 10c9e6 <_Watchdog_Insert+0x36> <== ALWAYS TAKEN if ( delta_interval < after->delta_interval ) { after->delta_interval -= delta_interval; break; } delta_interval -= after->delta_interval; 10ca23: 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 ); 10ca26: 8b 12 mov (%edx),%edx if ( _Watchdog_Sync_level > insert_isr_nest_level ) { _Watchdog_Sync_level = insert_isr_nest_level; goto restart; } } 10ca28: eb c4 jmp 10c9ee <_Watchdog_Insert+0x3e> <== ALWAYS TAKEN RTEMS_INLINE_ROUTINE void _Watchdog_Activate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_ACTIVE; 10ca2a: c7 40 08 02 00 00 00 movl $0x2,0x8(%eax) _Watchdog_Activate( the_watchdog ); the_watchdog->delta_interval = delta_interval; 10ca31: 89 48 10 mov %ecx,0x10(%eax) _Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node ); 10ca34: 8b 52 04 mov 0x4(%edx),%edx Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 10ca37: 89 50 04 mov %edx,0x4(%eax) before_node = after_node->next; 10ca3a: 8b 0a mov (%edx),%ecx after_node->next = the_node; 10ca3c: 89 02 mov %eax,(%edx) the_node->next = before_node; 10ca3e: 89 08 mov %ecx,(%eax) before_node->previous = the_node; 10ca40: 89 41 04 mov %eax,0x4(%ecx) the_watchdog->start_time = _Watchdog_Ticks_since_boot; 10ca43: 8b 15 38 43 12 00 mov 0x124338,%edx 10ca49: 89 50 14 mov %edx,0x14(%eax) exit_insert: _Watchdog_Sync_level = insert_isr_nest_level; 10ca4c: 89 35 a4 42 12 00 mov %esi,0x1242a4 _Watchdog_Sync_count--; 10ca52: a1 34 43 12 00 mov 0x124334,%eax 10ca57: 48 dec %eax 10ca58: a3 34 43 12 00 mov %eax,0x124334 _ISR_Enable( level ); 10ca5d: 53 push %ebx 10ca5e: 9d popf } 10ca5f: 58 pop %eax 10ca60: 5a pop %edx 10ca61: 5b pop %ebx 10ca62: 5e pop %esi 10ca63: 5f pop %edi 10ca64: c9 leave 10ca65: c3 ret 0010cac8 <_Watchdog_Remove>: */ Watchdog_States _Watchdog_Remove( Watchdog_Control *the_watchdog ) { 10cac8: 55 push %ebp 10cac9: 89 e5 mov %esp,%ebp 10cacb: 56 push %esi 10cacc: 53 push %ebx 10cacd: 8b 55 08 mov 0x8(%ebp),%edx ISR_Level level; Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); 10cad0: 9c pushf 10cad1: fa cli 10cad2: 5e pop %esi previous_state = the_watchdog->state; 10cad3: 8b 42 08 mov 0x8(%edx),%eax switch ( previous_state ) { 10cad6: 83 f8 01 cmp $0x1,%eax 10cad9: 74 09 je 10cae4 <_Watchdog_Remove+0x1c> 10cadb: 72 44 jb 10cb21 <_Watchdog_Remove+0x59> 10cadd: 83 f8 03 cmp $0x3,%eax 10cae0: 77 3f ja 10cb21 <_Watchdog_Remove+0x59> <== ALWAYS TAKEN 10cae2: eb 09 jmp 10caed <_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; 10cae4: c7 42 08 00 00 00 00 movl $0x0,0x8(%edx) break; 10caeb: eb 34 jmp 10cb21 <_Watchdog_Remove+0x59> <== ALWAYS TAKEN case WATCHDOG_ACTIVE: case WATCHDOG_REMOVE_IT: the_watchdog->state = WATCHDOG_INACTIVE; 10caed: 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 ); 10caf4: 8b 0a mov (%edx),%ecx next_watchdog = _Watchdog_Next( the_watchdog ); if ( _Watchdog_Next(next_watchdog) ) 10caf6: 83 39 00 cmpl $0x0,(%ecx) 10caf9: 74 06 je 10cb01 <_Watchdog_Remove+0x39> next_watchdog->delta_interval += the_watchdog->delta_interval; 10cafb: 8b 5a 10 mov 0x10(%edx),%ebx 10cafe: 01 59 10 add %ebx,0x10(%ecx) if ( _Watchdog_Sync_count ) 10cb01: 8b 0d 34 43 12 00 mov 0x124334,%ecx 10cb07: 85 c9 test %ecx,%ecx 10cb09: 74 0c je 10cb17 <_Watchdog_Remove+0x4f> _Watchdog_Sync_level = _ISR_Nest_level; 10cb0b: 8b 0d 84 42 12 00 mov 0x124284,%ecx 10cb11: 89 0d a4 42 12 00 mov %ecx,0x1242a4 ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 10cb17: 8b 1a mov (%edx),%ebx previous = the_node->previous; 10cb19: 8b 4a 04 mov 0x4(%edx),%ecx next->previous = previous; 10cb1c: 89 4b 04 mov %ecx,0x4(%ebx) previous->next = next; 10cb1f: 89 19 mov %ebx,(%ecx) _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; 10cb21: 8b 0d 38 43 12 00 mov 0x124338,%ecx 10cb27: 89 4a 18 mov %ecx,0x18(%edx) _ISR_Enable( level ); 10cb2a: 56 push %esi 10cb2b: 9d popf return( previous_state ); } 10cb2c: 5b pop %ebx 10cb2d: 5e pop %esi 10cb2e: c9 leave 10cb2f: c3 ret 0010dd2c <_Watchdog_Report_chain>: void _Watchdog_Report_chain( const char *name, Chain_Control *header ) { 10dd2c: 55 push %ebp 10dd2d: 89 e5 mov %esp,%ebp 10dd2f: 57 push %edi 10dd30: 56 push %esi 10dd31: 53 push %ebx 10dd32: 83 ec 20 sub $0x20,%esp 10dd35: 8b 7d 08 mov 0x8(%ebp),%edi 10dd38: 8b 75 0c mov 0xc(%ebp),%esi ISR_Level level; Chain_Node *node; _ISR_Disable( level ); 10dd3b: 9c pushf 10dd3c: fa cli 10dd3d: 8f 45 e4 popl -0x1c(%ebp) printk( "Watchdog Chain: %s %p\n", name, header ); 10dd40: 56 push %esi 10dd41: 57 push %edi 10dd42: 68 44 0b 12 00 push $0x120b44 10dd47: e8 cc aa ff ff call 108818 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 10dd4c: 8b 1e mov (%esi),%ebx */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10dd4e: 83 c6 04 add $0x4,%esi if ( !_Chain_Is_empty( header ) ) { 10dd51: 83 c4 10 add $0x10,%esp 10dd54: 39 f3 cmp %esi,%ebx 10dd56: 74 1d je 10dd75 <_Watchdog_Report_chain+0x49> node != _Chain_Tail(header) ; node = node->next ) { Watchdog_Control *watch = (Watchdog_Control *) node; _Watchdog_Report( NULL, watch ); 10dd58: 52 push %edx 10dd59: 52 push %edx 10dd5a: 53 push %ebx 10dd5b: 6a 00 push $0x0 10dd5d: e8 32 00 00 00 call 10dd94 <_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 ) 10dd62: 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 ; 10dd64: 83 c4 10 add $0x10,%esp 10dd67: 39 f3 cmp %esi,%ebx 10dd69: 75 ed jne 10dd58 <_Watchdog_Report_chain+0x2c> <== ALWAYS TAKEN { Watchdog_Control *watch = (Watchdog_Control *) node; _Watchdog_Report( NULL, watch ); } printk( "== end of %s \n", name ); 10dd6b: 50 push %eax 10dd6c: 50 push %eax 10dd6d: 57 push %edi 10dd6e: 68 5b 0b 12 00 push $0x120b5b 10dd73: eb 08 jmp 10dd7d <_Watchdog_Report_chain+0x51> <== ALWAYS TAKEN } else { printk( "Chain is empty\n" ); 10dd75: 83 ec 0c sub $0xc,%esp 10dd78: 68 6a 0b 12 00 push $0x120b6a 10dd7d: e8 96 aa ff ff call 108818 10dd82: 83 c4 10 add $0x10,%esp } _ISR_Enable( level ); 10dd85: ff 75 e4 pushl -0x1c(%ebp) 10dd88: 9d popf } 10dd89: 8d 65 f4 lea -0xc(%ebp),%esp 10dd8c: 5b pop %ebx 10dd8d: 5e pop %esi 10dd8e: 5f pop %edi 10dd8f: c9 leave 10dd90: c3 ret 0010cb30 <_Watchdog_Tickle>: */ void _Watchdog_Tickle( Chain_Control *header ) { 10cb30: 55 push %ebp 10cb31: 89 e5 mov %esp,%ebp 10cb33: 57 push %edi 10cb34: 56 push %esi 10cb35: 53 push %ebx 10cb36: 83 ec 1c sub $0x1c,%esp 10cb39: 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 ); 10cb3c: 9c pushf 10cb3d: fa cli 10cb3e: 5e pop %esi */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 10cb3f: 8b 1f mov (%edi),%ebx */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10cb41: 8d 47 04 lea 0x4(%edi),%eax 10cb44: 89 45 e4 mov %eax,-0x1c(%ebp) if ( _Chain_Is_empty( header ) ) 10cb47: 39 c3 cmp %eax,%ebx 10cb49: 74 40 je 10cb8b <_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) { 10cb4b: 8b 43 10 mov 0x10(%ebx),%eax 10cb4e: 85 c0 test %eax,%eax 10cb50: 74 08 je 10cb5a <_Watchdog_Tickle+0x2a> the_watchdog->delta_interval--; 10cb52: 48 dec %eax 10cb53: 89 43 10 mov %eax,0x10(%ebx) if ( the_watchdog->delta_interval != 0 ) 10cb56: 85 c0 test %eax,%eax 10cb58: 75 31 jne 10cb8b <_Watchdog_Tickle+0x5b> goto leave; } do { watchdog_state = _Watchdog_Remove( the_watchdog ); 10cb5a: 83 ec 0c sub $0xc,%esp 10cb5d: 53 push %ebx 10cb5e: e8 65 ff ff ff call 10cac8 <_Watchdog_Remove> <== ALWAYS TAKEN _ISR_Enable( level ); 10cb63: 56 push %esi 10cb64: 9d popf switch( watchdog_state ) { 10cb65: 83 c4 10 add $0x10,%esp 10cb68: 83 f8 02 cmp $0x2,%eax 10cb6b: 75 0e jne 10cb7b <_Watchdog_Tickle+0x4b> case WATCHDOG_ACTIVE: (*the_watchdog->routine)( 10cb6d: 50 push %eax 10cb6e: 50 push %eax 10cb6f: ff 73 24 pushl 0x24(%ebx) 10cb72: ff 73 20 pushl 0x20(%ebx) 10cb75: ff 53 1c call *0x1c(%ebx) 10cb78: 83 c4 10 add $0x10,%esp case WATCHDOG_REMOVE_IT: break; } _ISR_Disable( level ); 10cb7b: 9c pushf 10cb7c: fa cli 10cb7d: 5e pop %esi RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_First( Chain_Control *header ) { return ( (Watchdog_Control *) header->first ); 10cb7e: 8b 1f mov (%edi),%ebx the_watchdog = _Watchdog_First( header ); } while ( !_Chain_Is_empty( header ) && (the_watchdog->delta_interval == 0) ); 10cb80: 3b 5d e4 cmp -0x1c(%ebp),%ebx 10cb83: 74 06 je 10cb8b <_Watchdog_Tickle+0x5b> 10cb85: 83 7b 10 00 cmpl $0x0,0x10(%ebx) 10cb89: eb cd jmp 10cb58 <_Watchdog_Tickle+0x28> <== ALWAYS TAKEN leave: _ISR_Enable(level); 10cb8b: 56 push %esi 10cb8c: 9d popf } 10cb8d: 8d 65 f4 lea -0xc(%ebp),%esp 10cb90: 5b pop %ebx 10cb91: 5e pop %esi 10cb92: 5f pop %edi 10cb93: c9 leave 10cb94: c3 ret 0010dc8d <_close_r>: int _close_r( struct _reent *ptr __attribute__((unused)), int fd ) { 10dc8d: 55 push %ebp 10dc8e: 89 e5 mov %esp,%ebp 10dc90: 83 ec 08 sub $0x8,%esp return close( fd ); 10dc93: 8b 45 0c mov 0xc(%ebp),%eax 10dc96: 89 45 08 mov %eax,0x8(%ebp) } 10dc99: c9 leave int _close_r( struct _reent *ptr __attribute__((unused)), int fd ) { return close( fd ); 10dc9a: e9 79 ff ff ff jmp 10dc18 <== ALWAYS TAKEN 0011c960 <_exit>: /* * If the toolset uses init/fini sections, then we need to * run the global destructors now. */ #if defined(__USE_INIT_FINI__) FINI_SYMBOL(); 11c960: 55 push %ebp 11c961: 89 e5 mov %esp,%ebp 11c963: 83 ec 08 sub $0x8,%esp 11c966: e8 72 06 00 00 call 11cfdd <_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(); 11c96b: e8 8c ff ff ff call 11c8fc <== ALWAYS TAKEN rtems_shutdown_executive(status); 11c970: 83 ec 0c sub $0xc,%esp 11c973: ff 75 08 pushl 0x8(%ebp) 11c976: e8 e9 00 00 00 call 11ca64 <== ALWAYS TAKEN 11c97b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 11c97e: eb fe jmp 11c97e <_exit+0x1e> <== NOT EXECUTED 00134806 <_fcntl_r>: struct _reent *ptr __attribute__((unused)), int fd, int cmd, int arg ) { 134806: 55 push %ebp <== NOT EXECUTED 134807: 89 e5 mov %esp,%ebp <== NOT EXECUTED 134809: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 13480c: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED 13480f: 8b 55 10 mov 0x10(%ebp),%edx <== NOT EXECUTED return fcntl( fd, cmd, arg ); 134812: 8b 4d 14 mov 0x14(%ebp),%ecx <== NOT EXECUTED 134815: 89 4d 10 mov %ecx,0x10(%ebp) <== NOT EXECUTED 134818: 89 55 0c mov %edx,0xc(%ebp) <== NOT EXECUTED 13481b: 89 45 08 mov %eax,0x8(%ebp) <== NOT EXECUTED } 13481e: c9 leave <== NOT EXECUTED int fd, int cmd, int arg ) { return fcntl( fd, cmd, arg ); 13481f: e9 98 fe ff ff jmp 1346bc <== NOT EXECUTED 0011c7d0 <_fstat_r>: int _fstat_r( struct _reent *ptr __attribute__((unused)), int fd, struct stat *buf ) { 11c7d0: 55 push %ebp 11c7d1: 89 e5 mov %esp,%ebp 11c7d3: 83 ec 08 sub $0x8,%esp 11c7d6: 8b 45 0c mov 0xc(%ebp),%eax return fstat( fd, buf ); 11c7d9: 8b 55 10 mov 0x10(%ebp),%edx 11c7dc: 89 55 0c mov %edx,0xc(%ebp) 11c7df: 89 45 08 mov %eax,0x8(%ebp) } 11c7e2: c9 leave struct _reent *ptr __attribute__((unused)), int fd, struct stat *buf ) { return fstat( fd, buf ); 11c7e3: e9 68 ff ff ff jmp 11c750 <== ALWAYS TAKEN 0011026e <_getpid_r>: #include pid_t _getpid_r( struct _reent *ptr __attribute__((unused)) ) { 11026e: 55 push %ebp <== NOT EXECUTED 11026f: 89 e5 mov %esp,%ebp <== NOT EXECUTED return getpid(); } 110271: b8 01 00 00 00 mov $0x1,%eax <== NOT EXECUTED 110276: c9 leave <== NOT EXECUTED 110277: c3 ret <== NOT EXECUTED 0010ddbb <_gettimeofday>: int _gettimeofday( struct timeval *tp, struct timezone *tzp ) { 10ddbb: 55 push %ebp <== NOT EXECUTED 10ddbc: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10ddbe: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED return gettimeofday( tp, tzp ); } 10ddc1: c9 leave <== NOT EXECUTED int _gettimeofday( struct timeval *tp, struct timezone *tzp ) { return gettimeofday( tp, tzp ); 10ddc2: e9 a5 ff ff ff jmp 10dd6c <== NOT EXECUTED 0010ddc7 <_gettimeofday_r>: int _gettimeofday_r( struct _reent *ignored_reentrancy_stuff __attribute__((unused)), struct timeval *tp, struct timezone *tzp ) { 10ddc7: 55 push %ebp 10ddc8: 89 e5 mov %esp,%ebp 10ddca: 83 ec 08 sub $0x8,%esp 10ddcd: 8b 45 0c mov 0xc(%ebp),%eax return gettimeofday( tp, tzp ); 10ddd0: 8b 55 10 mov 0x10(%ebp),%edx 10ddd3: 89 55 0c mov %edx,0xc(%ebp) 10ddd6: 89 45 08 mov %eax,0x8(%ebp) } 10ddd9: c9 leave struct _reent *ignored_reentrancy_stuff __attribute__((unused)), struct timeval *tp, struct timezone *tzp ) { return gettimeofday( tp, tzp ); 10ddda: e9 8d ff ff ff jmp 10dd6c <== ALWAYS TAKEN 0011c7e8 <_isatty_r>: int _isatty_r( struct _reent *ptr __attribute__((unused)), int fd ) { 11c7e8: 55 push %ebp 11c7e9: 89 e5 mov %esp,%ebp 11c7eb: 83 ec 08 sub $0x8,%esp return isatty( fd ); 11c7ee: 8b 45 0c mov 0xc(%ebp),%eax 11c7f1: 89 45 08 mov %eax,0x8(%ebp) } 11c7f4: c9 leave int _isatty_r( struct _reent *ptr __attribute__((unused)), int fd ) { return isatty( fd ); 11c7f5: e9 ce 05 00 00 jmp 11cdc8 <== ALWAYS TAKEN 001262ee <_link_r>: int _link_r( struct _reent *ptr __attribute__((unused)), const char *existing, const char *new ) { 1262ee: 55 push %ebp <== NOT EXECUTED 1262ef: 89 e5 mov %esp,%ebp <== NOT EXECUTED 1262f1: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 1262f4: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED return link( existing, new ); 1262f7: 8b 55 10 mov 0x10(%ebp),%edx <== NOT EXECUTED 1262fa: 89 55 0c mov %edx,0xc(%ebp) <== NOT EXECUTED 1262fd: 89 45 08 mov %eax,0x8(%ebp) <== NOT EXECUTED } 126300: c9 leave <== NOT EXECUTED struct _reent *ptr __attribute__((unused)), const char *existing, const char *new ) { return link( existing, new ); 126301: e9 26 fe ff ff jmp 12612c <== NOT EXECUTED 0011c8c9 <_lseek_r>: struct _reent *ptr __attribute__((unused)), int fd, off_t offset, int whence ) { 11c8c9: 55 push %ebp 11c8ca: 89 e5 mov %esp,%ebp 11c8cc: 83 ec 08 sub $0x8,%esp 11c8cf: 8b 45 0c mov 0xc(%ebp),%eax 11c8d2: 8b 55 10 mov 0x10(%ebp),%edx return lseek( fd, offset, whence ); 11c8d5: 8b 4d 14 mov 0x14(%ebp),%ecx 11c8d8: 89 4d 10 mov %ecx,0x10(%ebp) 11c8db: 89 55 0c mov %edx,0xc(%ebp) 11c8de: 89 45 08 mov %eax,0x8(%ebp) } 11c8e1: c9 leave int fd, off_t offset, int whence ) { return lseek( fd, offset, whence ); 11c8e2: e9 15 ff ff ff jmp 11c7fc <== ALWAYS TAKEN 001264a2 <_lstat_r>: int _STAT_R_NAME( struct _reent *ptr __attribute__((unused)), const char *path, struct stat *buf ) { 1264a2: 55 push %ebp <== NOT EXECUTED 1264a3: 89 e5 mov %esp,%ebp <== NOT EXECUTED 1264a5: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 1264a8: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED return _STAT_NAME( path, buf ); 1264ab: 8b 55 10 mov 0x10(%ebp),%edx <== NOT EXECUTED 1264ae: 89 55 0c mov %edx,0xc(%ebp) <== NOT EXECUTED 1264b1: 89 45 08 mov %eax,0x8(%ebp) <== NOT EXECUTED } 1264b4: c9 leave <== NOT EXECUTED struct _reent *ptr __attribute__((unused)), const char *path, struct stat *buf ) { return _STAT_NAME( path, buf ); 1264b5: e9 3a ff ff ff jmp 1263f4 <== 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 0011ca0c <_read_r>: struct _reent *ptr __attribute__((unused)), int fd, void *buf, size_t nbytes ) { 11ca0c: 55 push %ebp 11ca0d: 89 e5 mov %esp,%ebp 11ca0f: 83 ec 08 sub $0x8,%esp 11ca12: 8b 45 0c mov 0xc(%ebp),%eax 11ca15: 8b 55 10 mov 0x10(%ebp),%edx return read( fd, buf, nbytes ); 11ca18: 8b 4d 14 mov 0x14(%ebp),%ecx 11ca1b: 89 4d 10 mov %ecx,0x10(%ebp) 11ca1e: 89 55 0c mov %edx,0xc(%ebp) 11ca21: 89 45 08 mov %eax,0x8(%ebp) } 11ca24: c9 leave int fd, void *buf, size_t nbytes ) { return read( fd, buf, nbytes ); 11ca25: e9 56 ff ff ff jmp 11c980 <== ALWAYS TAKEN 0011ca2c <_realloc_r>: void *_realloc_r( struct _reent *ignored __attribute__((unused)), void *ptr, size_t size ) { 11ca2c: 55 push %ebp <== NOT EXECUTED 11ca2d: 89 e5 mov %esp,%ebp <== NOT EXECUTED 11ca2f: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 11ca32: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED return realloc( ptr, size ); 11ca35: 8b 55 10 mov 0x10(%ebp),%edx <== NOT EXECUTED 11ca38: 89 55 0c mov %edx,0xc(%ebp) <== NOT EXECUTED 11ca3b: 89 45 08 mov %eax,0x8(%ebp) <== NOT EXECUTED } 11ca3e: c9 leave <== NOT EXECUTED struct _reent *ignored __attribute__((unused)), void *ptr, size_t size ) { return realloc( ptr, size ); 11ca3f: e9 48 00 00 00 jmp 11ca8c <== NOT EXECUTED 0014f398 <_rename_r>: int _rename_r( struct _reent *ptr __attribute__((unused)), const char *old, const char *new ) { 14f398: 55 push %ebp <== NOT EXECUTED 14f399: 89 e5 mov %esp,%ebp <== NOT EXECUTED 14f39b: 57 push %edi <== NOT EXECUTED 14f39c: 56 push %esi <== NOT EXECUTED 14f39d: 53 push %ebx <== NOT EXECUTED 14f39e: 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 ); 14f3a1: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED 14f3a4: e8 86 c2 fb ff call 10b62f <== NOT EXECUTED 14f3a9: 89 c2 mov %eax,%edx <== NOT EXECUTED if ( old_parent_pathlen == 0 ) 14f3ab: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 14f3ae: 85 c0 test %eax,%eax <== NOT EXECUTED 14f3b0: 75 36 jne 14f3e8 <_rename_r+0x50> <== NOT EXECUTED rtems_filesystem_get_start_loc( old, &i, &old_parent_loc ); 14f3b2: 8b 4d 0c mov 0xc(%ebp),%ecx <== NOT EXECUTED 14f3b5: 8a 01 mov (%ecx),%al <== NOT EXECUTED 14f3b7: 3c 5c cmp $0x5c,%al <== NOT EXECUTED 14f3b9: 74 08 je 14f3c3 <_rename_r+0x2b> <== NOT EXECUTED 14f3bb: 3c 2f cmp $0x2f,%al <== NOT EXECUTED 14f3bd: 74 04 je 14f3c3 <_rename_r+0x2b> <== NOT EXECUTED 14f3bf: 84 c0 test %al,%al <== NOT EXECUTED 14f3c1: 75 0e jne 14f3d1 <_rename_r+0x39> <== NOT EXECUTED 14f3c3: 8d 7d bc lea -0x44(%ebp),%edi <== NOT EXECUTED 14f3c6: 8b 35 78 e1 15 00 mov 0x15e178,%esi <== NOT EXECUTED 14f3cc: 83 c6 18 add $0x18,%esi <== NOT EXECUTED 14f3cf: eb 0c jmp 14f3dd <_rename_r+0x45> <== NOT EXECUTED 14f3d1: 8d 7d bc lea -0x44(%ebp),%edi <== NOT EXECUTED 14f3d4: 8b 35 78 e1 15 00 mov 0x15e178,%esi <== NOT EXECUTED 14f3da: 83 c6 04 add $0x4,%esi <== NOT EXECUTED 14f3dd: b9 05 00 00 00 mov $0x5,%ecx <== NOT EXECUTED 14f3e2: f3 a5 rep movsl %ds:(%esi),%es:(%edi) <== NOT EXECUTED 14f3e4: 31 db xor %ebx,%ebx <== NOT EXECUTED 14f3e6: eb 2a jmp 14f412 <_rename_r+0x7a> <== NOT EXECUTED else { result = rtems_filesystem_evaluate_path( old, old_parent_pathlen, 14f3e8: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 14f3eb: 6a 00 push $0x0 <== NOT EXECUTED 14f3ed: 8d 45 bc lea -0x44(%ebp),%eax <== NOT EXECUTED 14f3f0: 50 push %eax <== NOT EXECUTED 14f3f1: 6a 02 push $0x2 <== NOT EXECUTED 14f3f3: 52 push %edx <== NOT EXECUTED 14f3f4: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED 14f3f7: 89 55 a4 mov %edx,-0x5c(%ebp) <== NOT EXECUTED 14f3fa: e8 1d c3 fb ff call 10b71c <== NOT EXECUTED RTEMS_LIBIO_PERMS_WRITE, &old_parent_loc, false ); if ( result != 0 ) 14f3ff: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 14f402: b3 01 mov $0x1,%bl <== NOT EXECUTED 14f404: 83 ce ff or $0xffffffff,%esi <== NOT EXECUTED 14f407: 85 c0 test %eax,%eax <== NOT EXECUTED 14f409: 8b 55 a4 mov -0x5c(%ebp),%edx <== NOT EXECUTED 14f40c: 0f 85 6f 02 00 00 jne 14f681 <_rename_r+0x2e9> <== NOT EXECUTED /* * Start from the parent to find the node that should be under it. */ old_loc = old_parent_loc; 14f412: 8d 7d d0 lea -0x30(%ebp),%edi <== NOT EXECUTED 14f415: 8d 75 bc lea -0x44(%ebp),%esi <== NOT EXECUTED 14f418: b9 05 00 00 00 mov $0x5,%ecx <== NOT EXECUTED 14f41d: f3 a5 rep movsl %ds:(%esi),%es:(%edi) <== NOT EXECUTED name = old + old_parent_pathlen; 14f41f: 8b 75 0c mov 0xc(%ebp),%esi <== NOT EXECUTED 14f422: 01 d6 add %edx,%esi <== NOT EXECUTED 14f424: 89 75 e4 mov %esi,-0x1c(%ebp) <== NOT EXECUTED name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 14f427: 83 c9 ff or $0xffffffff,%ecx <== NOT EXECUTED 14f42a: 89 f7 mov %esi,%edi <== NOT EXECUTED 14f42c: 31 c0 xor %eax,%eax <== NOT EXECUTED 14f42e: f2 ae repnz scas %es:(%edi),%al <== NOT EXECUTED 14f430: f7 d1 not %ecx <== NOT EXECUTED 14f432: 49 dec %ecx <== NOT EXECUTED 14f433: 57 push %edi <== NOT EXECUTED 14f434: 57 push %edi <== NOT EXECUTED 14f435: 51 push %ecx <== NOT EXECUTED 14f436: 56 push %esi <== NOT EXECUTED 14f437: e8 cc c1 fb ff call 10b608 <== NOT EXECUTED 14f43c: 01 c6 add %eax,%esi <== NOT EXECUTED 14f43e: 89 75 e4 mov %esi,-0x1c(%ebp) <== NOT EXECUTED result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 14f441: 83 c9 ff or $0xffffffff,%ecx <== NOT EXECUTED 14f444: 89 f7 mov %esi,%edi <== NOT EXECUTED 14f446: 31 c0 xor %eax,%eax <== NOT EXECUTED 14f448: f2 ae repnz scas %es:(%edi),%al <== NOT EXECUTED 14f44a: f7 d1 not %ecx <== NOT EXECUTED 14f44c: 49 dec %ecx <== NOT EXECUTED 14f44d: c7 04 24 00 00 00 00 movl $0x0,(%esp) <== NOT EXECUTED 14f454: 8d 45 d0 lea -0x30(%ebp),%eax <== NOT EXECUTED 14f457: 50 push %eax <== NOT EXECUTED 14f458: 6a 00 push $0x0 <== NOT EXECUTED 14f45a: 51 push %ecx <== NOT EXECUTED 14f45b: 56 push %esi <== NOT EXECUTED 14f45c: e8 01 c2 fb ff call 10b662 <== NOT EXECUTED 14f461: 89 c6 mov %eax,%esi <== NOT EXECUTED 0, &old_loc, false ); if ( result != 0 ) { 14f463: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 14f466: 85 c0 test %eax,%eax <== NOT EXECUTED 14f468: 74 29 je 14f493 <_rename_r+0xfb> <== NOT EXECUTED if ( free_old_parentloc ) 14f46a: 84 db test %bl,%bl <== NOT EXECUTED 14f46c: 0f 84 1d 01 00 00 je 14f58f <_rename_r+0x1f7> <== NOT EXECUTED rtems_filesystem_freenode( &old_parent_loc ); 14f472: 8b 45 c8 mov -0x38(%ebp),%eax <== NOT EXECUTED 14f475: 85 c0 test %eax,%eax <== NOT EXECUTED 14f477: 0f 84 12 01 00 00 je 14f58f <_rename_r+0x1f7> <== NOT EXECUTED 14f47d: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 14f480: 85 c0 test %eax,%eax <== NOT EXECUTED 14f482: 0f 84 07 01 00 00 je 14f58f <_rename_r+0x1f7> <== NOT EXECUTED 14f488: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 14f48b: 8d 55 bc lea -0x44(%ebp),%edx <== NOT EXECUTED 14f48e: e9 f6 00 00 00 jmp 14f589 <_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 ); 14f493: 8b 55 10 mov 0x10(%ebp),%edx <== NOT EXECUTED 14f496: 8a 02 mov (%edx),%al <== NOT EXECUTED 14f498: 3c 5c cmp $0x5c,%al <== NOT EXECUTED 14f49a: 74 08 je 14f4a4 <_rename_r+0x10c> <== NOT EXECUTED 14f49c: 3c 2f cmp $0x2f,%al <== NOT EXECUTED 14f49e: 74 04 je 14f4a4 <_rename_r+0x10c> <== NOT EXECUTED 14f4a0: 84 c0 test %al,%al <== NOT EXECUTED 14f4a2: 75 1a jne 14f4be <_rename_r+0x126> <== NOT EXECUTED 14f4a4: 8d 7d a8 lea -0x58(%ebp),%edi <== NOT EXECUTED 14f4a7: 8b 35 78 e1 15 00 mov 0x15e178,%esi <== NOT EXECUTED 14f4ad: 83 c6 18 add $0x18,%esi <== NOT EXECUTED 14f4b0: b9 05 00 00 00 mov $0x5,%ecx <== NOT EXECUTED 14f4b5: f3 a5 rep movsl %ds:(%esi),%es:(%edi) <== NOT EXECUTED 14f4b7: ba 01 00 00 00 mov $0x1,%edx <== NOT EXECUTED 14f4bc: eb 15 jmp 14f4d3 <_rename_r+0x13b> <== NOT EXECUTED 14f4be: 8d 7d a8 lea -0x58(%ebp),%edi <== NOT EXECUTED 14f4c1: 8b 35 78 e1 15 00 mov 0x15e178,%esi <== NOT EXECUTED 14f4c7: 83 c6 04 add $0x4,%esi <== NOT EXECUTED 14f4ca: b9 05 00 00 00 mov $0x5,%ecx <== NOT EXECUTED 14f4cf: f3 a5 rep movsl %ds:(%esi),%es:(%edi) <== NOT EXECUTED 14f4d1: 31 d2 xor %edx,%edx <== NOT EXECUTED if ( !new_parent_loc.ops->evalformake_h ) { 14f4d3: 8b 45 b4 mov -0x4c(%ebp),%eax <== NOT EXECUTED 14f4d6: 8b 40 04 mov 0x4(%eax),%eax <== NOT EXECUTED 14f4d9: 85 c0 test %eax,%eax <== NOT EXECUTED 14f4db: 75 4b jne 14f528 <_rename_r+0x190> <== NOT EXECUTED if ( free_old_parentloc ) 14f4dd: 84 db test %bl,%bl <== NOT EXECUTED 14f4df: 74 1a je 14f4fb <_rename_r+0x163> <== NOT EXECUTED rtems_filesystem_freenode( &old_parent_loc ); 14f4e1: 8b 45 c8 mov -0x38(%ebp),%eax <== NOT EXECUTED 14f4e4: 85 c0 test %eax,%eax <== NOT EXECUTED 14f4e6: 74 13 je 14f4fb <_rename_r+0x163> <== NOT EXECUTED 14f4e8: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 14f4eb: 85 c0 test %eax,%eax <== NOT EXECUTED 14f4ed: 74 0c je 14f4fb <_rename_r+0x163> <== NOT EXECUTED 14f4ef: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 14f4f2: 8d 55 bc lea -0x44(%ebp),%edx <== NOT EXECUTED 14f4f5: 52 push %edx <== NOT EXECUTED 14f4f6: ff d0 call *%eax <== NOT EXECUTED 14f4f8: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_filesystem_freenode( &old_loc ); 14f4fb: 8b 45 dc mov -0x24(%ebp),%eax <== NOT EXECUTED 14f4fe: 85 c0 test %eax,%eax <== NOT EXECUTED 14f500: 74 13 je 14f515 <_rename_r+0x17d> <== NOT EXECUTED 14f502: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 14f505: 85 c0 test %eax,%eax <== NOT EXECUTED 14f507: 74 0c je 14f515 <_rename_r+0x17d> <== NOT EXECUTED 14f509: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 14f50c: 8d 55 d0 lea -0x30(%ebp),%edx <== NOT EXECUTED 14f50f: 52 push %edx <== NOT EXECUTED 14f510: ff d0 call *%eax <== NOT EXECUTED 14f512: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 14f515: e8 22 a1 fe ff call 13963c <__errno> <== NOT EXECUTED 14f51a: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 14f520: 83 ce ff or $0xffffffff,%esi <== NOT EXECUTED 14f523: e9 59 01 00 00 jmp 14f681 <_rename_r+0x2e9> <== NOT EXECUTED } result = (*new_parent_loc.ops->evalformake_h)( &new[i], &new_parent_loc, &name ); 14f528: 51 push %ecx <== NOT EXECUTED 14f529: 8d 4d e4 lea -0x1c(%ebp),%ecx <== NOT EXECUTED 14f52c: 51 push %ecx <== NOT EXECUTED 14f52d: 8d 7d a8 lea -0x58(%ebp),%edi <== NOT EXECUTED 14f530: 57 push %edi <== NOT EXECUTED 14f531: 03 55 10 add 0x10(%ebp),%edx <== NOT EXECUTED 14f534: 52 push %edx <== NOT EXECUTED 14f535: ff d0 call *%eax <== NOT EXECUTED 14f537: 89 c6 mov %eax,%esi <== NOT EXECUTED if ( result != 0 ) { 14f539: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 14f53c: 85 c0 test %eax,%eax <== NOT EXECUTED 14f53e: 74 58 je 14f598 <_rename_r+0x200> <== NOT EXECUTED rtems_filesystem_freenode( &new_parent_loc ); 14f540: 8b 45 b4 mov -0x4c(%ebp),%eax <== NOT EXECUTED 14f543: 85 c0 test %eax,%eax <== NOT EXECUTED 14f545: 74 10 je 14f557 <_rename_r+0x1bf> <== NOT EXECUTED 14f547: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 14f54a: 85 c0 test %eax,%eax <== NOT EXECUTED 14f54c: 74 09 je 14f557 <_rename_r+0x1bf> <== NOT EXECUTED 14f54e: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 14f551: 57 push %edi <== NOT EXECUTED 14f552: ff d0 call *%eax <== NOT EXECUTED 14f554: 83 c4 10 add $0x10,%esp <== NOT EXECUTED if ( free_old_parentloc ) 14f557: 84 db test %bl,%bl <== NOT EXECUTED 14f559: 74 1a je 14f575 <_rename_r+0x1dd> <== NOT EXECUTED rtems_filesystem_freenode( &old_parent_loc ); 14f55b: 8b 45 c8 mov -0x38(%ebp),%eax <== NOT EXECUTED 14f55e: 85 c0 test %eax,%eax <== NOT EXECUTED 14f560: 74 13 je 14f575 <_rename_r+0x1dd> <== NOT EXECUTED 14f562: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 14f565: 85 c0 test %eax,%eax <== NOT EXECUTED 14f567: 74 0c je 14f575 <_rename_r+0x1dd> <== NOT EXECUTED 14f569: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 14f56c: 8d 55 bc lea -0x44(%ebp),%edx <== NOT EXECUTED 14f56f: 52 push %edx <== NOT EXECUTED 14f570: ff d0 call *%eax <== NOT EXECUTED 14f572: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_filesystem_freenode( &old_loc ); 14f575: 8b 45 dc mov -0x24(%ebp),%eax <== NOT EXECUTED 14f578: 85 c0 test %eax,%eax <== NOT EXECUTED 14f57a: 74 13 je 14f58f <_rename_r+0x1f7> <== NOT EXECUTED 14f57c: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 14f57f: 85 c0 test %eax,%eax <== NOT EXECUTED 14f581: 74 0c je 14f58f <_rename_r+0x1f7> <== NOT EXECUTED 14f583: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 14f586: 8d 55 d0 lea -0x30(%ebp),%edx <== NOT EXECUTED 14f589: 52 push %edx <== NOT EXECUTED 14f58a: ff d0 call *%eax <== NOT EXECUTED 14f58c: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( result ); 14f58f: e8 a8 a0 fe ff call 13963c <__errno> <== NOT EXECUTED 14f594: 89 30 mov %esi,(%eax) <== NOT EXECUTED 14f596: eb 88 jmp 14f520 <_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 ) { 14f598: 8b 45 cc mov -0x34(%ebp),%eax <== NOT EXECUTED 14f59b: 3b 45 b8 cmp -0x48(%ebp),%eax <== NOT EXECUTED 14f59e: 8b 45 b4 mov -0x4c(%ebp),%eax <== NOT EXECUTED 14f5a1: 74 5c je 14f5ff <_rename_r+0x267> <== NOT EXECUTED rtems_filesystem_freenode( &new_parent_loc ); 14f5a3: 85 c0 test %eax,%eax <== NOT EXECUTED 14f5a5: 74 10 je 14f5b7 <_rename_r+0x21f> <== NOT EXECUTED 14f5a7: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 14f5aa: 85 c0 test %eax,%eax <== NOT EXECUTED 14f5ac: 74 09 je 14f5b7 <_rename_r+0x21f> <== NOT EXECUTED 14f5ae: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 14f5b1: 57 push %edi <== NOT EXECUTED 14f5b2: ff d0 call *%eax <== NOT EXECUTED 14f5b4: 83 c4 10 add $0x10,%esp <== NOT EXECUTED if ( free_old_parentloc ) 14f5b7: 84 db test %bl,%bl <== NOT EXECUTED 14f5b9: 74 1a je 14f5d5 <_rename_r+0x23d> <== NOT EXECUTED rtems_filesystem_freenode( &old_parent_loc ); 14f5bb: 8b 45 c8 mov -0x38(%ebp),%eax <== NOT EXECUTED 14f5be: 85 c0 test %eax,%eax <== NOT EXECUTED 14f5c0: 74 13 je 14f5d5 <_rename_r+0x23d> <== NOT EXECUTED 14f5c2: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 14f5c5: 85 c0 test %eax,%eax <== NOT EXECUTED 14f5c7: 74 0c je 14f5d5 <_rename_r+0x23d> <== NOT EXECUTED 14f5c9: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 14f5cc: 8d 55 bc lea -0x44(%ebp),%edx <== NOT EXECUTED 14f5cf: 52 push %edx <== NOT EXECUTED 14f5d0: ff d0 call *%eax <== NOT EXECUTED 14f5d2: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_filesystem_freenode( &old_loc ); 14f5d5: 8b 45 dc mov -0x24(%ebp),%eax <== NOT EXECUTED 14f5d8: 85 c0 test %eax,%eax <== NOT EXECUTED 14f5da: 74 13 je 14f5ef <_rename_r+0x257> <== NOT EXECUTED 14f5dc: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 14f5df: 85 c0 test %eax,%eax <== NOT EXECUTED 14f5e1: 74 0c je 14f5ef <_rename_r+0x257> <== NOT EXECUTED 14f5e3: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 14f5e6: 8d 55 d0 lea -0x30(%ebp),%edx <== NOT EXECUTED 14f5e9: 52 push %edx <== NOT EXECUTED 14f5ea: ff d0 call *%eax <== NOT EXECUTED 14f5ec: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EXDEV ); 14f5ef: e8 48 a0 fe ff call 13963c <__errno> <== NOT EXECUTED 14f5f4: c7 00 12 00 00 00 movl $0x12,(%eax) <== NOT EXECUTED 14f5fa: e9 21 ff ff ff jmp 14f520 <_rename_r+0x188> <== NOT EXECUTED } if ( !new_parent_loc.ops->rename_h ) { 14f5ff: 8b 50 40 mov 0x40(%eax),%edx <== NOT EXECUTED 14f602: 85 d2 test %edx,%edx <== NOT EXECUTED 14f604: 75 19 jne 14f61f <_rename_r+0x287> <== NOT EXECUTED rtems_filesystem_freenode( &new_parent_loc ); 14f606: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 14f609: 85 c0 test %eax,%eax <== NOT EXECUTED 14f60b: 0f 84 cc fe ff ff je 14f4dd <_rename_r+0x145> <== NOT EXECUTED 14f611: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 14f614: 57 push %edi <== NOT EXECUTED 14f615: ff d0 call *%eax <== NOT EXECUTED 14f617: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 14f61a: e9 be fe ff ff jmp 14f4dd <_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 ); 14f61f: ff 75 e4 pushl -0x1c(%ebp) <== NOT EXECUTED 14f622: 57 push %edi <== NOT EXECUTED 14f623: 8d 45 d0 lea -0x30(%ebp),%eax <== NOT EXECUTED 14f626: 50 push %eax <== NOT EXECUTED 14f627: 8d 45 bc lea -0x44(%ebp),%eax <== NOT EXECUTED 14f62a: 50 push %eax <== NOT EXECUTED 14f62b: ff d2 call *%edx <== NOT EXECUTED 14f62d: 89 c6 mov %eax,%esi <== NOT EXECUTED rtems_filesystem_freenode( &new_parent_loc ); 14f62f: 8b 45 b4 mov -0x4c(%ebp),%eax <== NOT EXECUTED 14f632: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 14f635: 85 c0 test %eax,%eax <== NOT EXECUTED 14f637: 74 10 je 14f649 <_rename_r+0x2b1> <== NOT EXECUTED 14f639: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 14f63c: 85 c0 test %eax,%eax <== NOT EXECUTED 14f63e: 74 09 je 14f649 <_rename_r+0x2b1> <== NOT EXECUTED 14f640: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 14f643: 57 push %edi <== NOT EXECUTED 14f644: ff d0 call *%eax <== NOT EXECUTED 14f646: 83 c4 10 add $0x10,%esp <== NOT EXECUTED if ( free_old_parentloc ) 14f649: 84 db test %bl,%bl <== NOT EXECUTED 14f64b: 74 1a je 14f667 <_rename_r+0x2cf> <== NOT EXECUTED rtems_filesystem_freenode( &old_parent_loc ); 14f64d: 8b 45 c8 mov -0x38(%ebp),%eax <== NOT EXECUTED 14f650: 85 c0 test %eax,%eax <== NOT EXECUTED 14f652: 74 13 je 14f667 <_rename_r+0x2cf> <== NOT EXECUTED 14f654: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 14f657: 85 c0 test %eax,%eax <== NOT EXECUTED 14f659: 74 0c je 14f667 <_rename_r+0x2cf> <== NOT EXECUTED 14f65b: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 14f65e: 8d 55 bc lea -0x44(%ebp),%edx <== NOT EXECUTED 14f661: 52 push %edx <== NOT EXECUTED 14f662: ff d0 call *%eax <== NOT EXECUTED 14f664: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_filesystem_freenode( &old_loc ); 14f667: 8b 45 dc mov -0x24(%ebp),%eax <== NOT EXECUTED 14f66a: 85 c0 test %eax,%eax <== NOT EXECUTED 14f66c: 74 13 je 14f681 <_rename_r+0x2e9> <== NOT EXECUTED 14f66e: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 14f671: 85 c0 test %eax,%eax <== NOT EXECUTED 14f673: 74 0c je 14f681 <_rename_r+0x2e9> <== NOT EXECUTED 14f675: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 14f678: 8d 55 d0 lea -0x30(%ebp),%edx <== NOT EXECUTED 14f67b: 52 push %edx <== NOT EXECUTED 14f67c: ff d0 call *%eax <== NOT EXECUTED 14f67e: 83 c4 10 add $0x10,%esp <== NOT EXECUTED return result; } 14f681: 89 f0 mov %esi,%eax <== NOT EXECUTED 14f683: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 14f686: 5b pop %ebx <== NOT EXECUTED 14f687: 5e pop %esi <== NOT EXECUTED 14f688: 5f pop %edi <== NOT EXECUTED 14f689: c9 leave <== NOT EXECUTED 14f68a: 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 00110ff6 <_unlink_r>: int _unlink_r( struct _reent *ptr __attribute__((unused)), const char *path ) { 110ff6: 55 push %ebp <== NOT EXECUTED 110ff7: 89 e5 mov %esp,%ebp <== NOT EXECUTED 110ff9: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED return unlink( path ); 110ffc: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED 110fff: 89 45 08 mov %eax,0x8(%ebp) <== NOT EXECUTED } 111002: c9 leave <== NOT EXECUTED int _unlink_r( struct _reent *ptr __attribute__((unused)), const char *path ) { return unlink( path ); 111003: e9 04 fe ff ff jmp 110e0c <== NOT EXECUTED 0011ca44 <_write_r>: struct _reent *ptr __attribute__((unused)), int fd, const void *buf, size_t nbytes ) { 11ca44: 55 push %ebp 11ca45: 89 e5 mov %esp,%ebp 11ca47: 83 ec 08 sub $0x8,%esp 11ca4a: 8b 45 0c mov 0xc(%ebp),%eax 11ca4d: 8b 55 10 mov 0x10(%ebp),%edx return write( fd, buf, nbytes ); 11ca50: 8b 4d 14 mov 0x14(%ebp),%ecx 11ca53: 89 4d 10 mov %ecx,0x10(%ebp) 11ca56: 89 55 0c mov %edx,0xc(%ebp) 11ca59: 89 45 08 mov %eax,0x8(%ebp) } 11ca5c: c9 leave int fd, const void *buf, size_t nbytes ) { return write( fd, buf, nbytes ); 11ca5d: e9 0a 01 00 00 jmp 11cb6c <== ALWAYS TAKEN 00125120 : int access( const char *path, int amode ) { 125120: 55 push %ebp 125121: 89 e5 mov %esp,%ebp 125123: 53 push %ebx 125124: 83 ec 5c sub $0x5c,%esp 125127: 8b 5d 0c mov 0xc(%ebp),%ebx struct stat statbuf; if ( stat(path, &statbuf) ) 12512a: 8d 45 b4 lea -0x4c(%ebp),%eax 12512d: 50 push %eax 12512e: ff 75 08 pushl 0x8(%ebp) 125131: e8 a6 79 fe ff call 10cadc 125136: 83 c4 10 add $0x10,%esp 125139: 85 c0 test %eax,%eax 12513b: 75 21 jne 12515e return -1; if ( amode & R_OK ) { 12513d: f6 c3 04 test $0x4,%bl 125140: 74 06 je 125148 if (!( statbuf.st_mode & S_IREAD )) 125142: f6 45 c1 01 testb $0x1,-0x3f(%ebp) 125146: 74 16 je 12515e return -1; } if ( amode & W_OK ) { 125148: f6 c3 02 test $0x2,%bl 12514b: 74 06 je 125153 if ( !( statbuf.st_mode & S_IWRITE ) ) 12514d: 80 7d c0 00 cmpb $0x0,-0x40(%ebp) 125151: 79 0b jns 12515e return -1; } if ( amode & X_OK ) { 125153: 80 e3 01 and $0x1,%bl 125156: 74 0b je 125163 if ( !( statbuf.st_mode & S_IEXEC ) ) 125158: f6 45 c0 40 testb $0x40,-0x40(%ebp) 12515c: 75 05 jne 125163 12515e: 83 c8 ff or $0xffffffff,%eax 125161: eb 02 jmp 125165 <== ALWAYS TAKEN 125163: 31 c0 xor %eax,%eax return -1; } return 0; } 125165: 8b 5d fc mov -0x4(%ebp),%ebx 125168: c9 leave 125169: c3 ret 00109e4c : int adjtime( struct timeval *delta, struct timeval *olddelta ) { 109e4c: 55 push %ebp 109e4d: 89 e5 mov %esp,%ebp 109e4f: 56 push %esi 109e50: 53 push %ebx 109e51: 83 ec 10 sub $0x10,%esp 109e54: 8b 5d 08 mov 0x8(%ebp),%ebx 109e57: 8b 75 0c mov 0xc(%ebp),%esi long adjustment; /* * Simple validations */ if ( !delta ) 109e5a: 85 db test %ebx,%ebx 109e5c: 74 09 je 109e67 rtems_set_errno_and_return_minus_one( EINVAL ); if ( delta->tv_usec >= TOD_MICROSECONDS_PER_SECOND ) 109e5e: 81 7b 04 3f 42 0f 00 cmpl $0xf423f,0x4(%ebx) 109e65: 76 13 jbe 109e7a rtems_set_errno_and_return_minus_one( EINVAL ); 109e67: e8 fc 7e 00 00 call 111d68 <__errno> 109e6c: c7 00 16 00 00 00 movl $0x16,(%eax) 109e72: 83 c8 ff or $0xffffffff,%eax 109e75: e9 9a 00 00 00 jmp 109f14 <== ALWAYS TAKEN if ( olddelta ) { 109e7a: 85 f6 test %esi,%esi 109e7c: 74 0d je 109e8b olddelta->tv_sec = 0; 109e7e: c7 06 00 00 00 00 movl $0x0,(%esi) olddelta->tv_usec = 0; 109e84: c7 46 04 00 00 00 00 movl $0x0,0x4(%esi) } /* convert delta to microseconds */ adjustment = (delta->tv_sec * TOD_MICROSECONDS_PER_SECOND); 109e8b: 69 03 40 42 0f 00 imul $0xf4240,(%ebx),%eax adjustment += delta->tv_usec; 109e91: 03 43 04 add 0x4(%ebx),%eax /* too small to account for */ if ( adjustment < rtems_configuration_get_microseconds_per_tick() ) 109e94: 3b 05 04 12 12 00 cmp 0x121204,%eax 109e9a: 72 76 jb 109f12 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 109e9c: a1 14 53 12 00 mov 0x125314,%eax 109ea1: 40 inc %eax 109ea2: a3 14 53 12 00 mov %eax,0x125314 * This prevents context switches while we are adjusting the TOD */ _Thread_Disable_dispatch(); _TOD_Get( &ts ); 109ea7: 83 ec 0c sub $0xc,%esp 109eaa: 8d 45 f0 lea -0x10(%ebp),%eax 109ead: 50 push %eax 109eae: e8 dd 14 00 00 call 10b390 <_TOD_Get> ts.tv_sec += delta->tv_sec; 109eb3: 8b 03 mov (%ebx),%eax 109eb5: 01 45 f0 add %eax,-0x10(%ebp) ts.tv_nsec += delta->tv_usec * TOD_NANOSECONDS_PER_MICROSECOND; 109eb8: 69 43 04 e8 03 00 00 imul $0x3e8,0x4(%ebx),%eax 109ebf: 8b 4d f0 mov -0x10(%ebp),%ecx 109ec2: 03 45 f4 add -0xc(%ebp),%eax /* if adjustment is too much positive */ while ( ts.tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { 109ec5: 83 c4 10 add $0x10,%esp 109ec8: eb 05 jmp 109ecf <== ALWAYS TAKEN 109eca: 2d 00 ca 9a 3b sub $0x3b9aca00,%eax 109ecf: 89 ca mov %ecx,%edx 109ed1: 41 inc %ecx 109ed2: 3d ff c9 9a 3b cmp $0x3b9ac9ff,%eax 109ed7: 77 f1 ja 109eca 109ed9: eb 05 jmp 109ee0 <== ALWAYS TAKEN 109edb: 05 00 ca 9a 3b add $0x3b9aca00,%eax 109ee0: 89 d1 mov %edx,%ecx 109ee2: 4a dec %edx ts.tv_nsec -= TOD_NANOSECONDS_PER_SECOND; ts.tv_sec++; } /* if adjustment is too much negative */ while ( ts.tv_nsec <= (-1 * TOD_NANOSECONDS_PER_SECOND) ) { 109ee3: 3d 00 36 65 c4 cmp $0xc4653600,%eax 109ee8: 76 f1 jbe 109edb 109eea: 89 45 f4 mov %eax,-0xc(%ebp) 109eed: 89 4d f0 mov %ecx,-0x10(%ebp) ts.tv_nsec += TOD_NANOSECONDS_PER_SECOND; ts.tv_sec--; } _TOD_Set( &ts ); 109ef0: 83 ec 0c sub $0xc,%esp 109ef3: 8d 45 f0 lea -0x10(%ebp),%eax 109ef6: 50 push %eax 109ef7: e8 24 15 00 00 call 10b420 <_TOD_Set> _Thread_Enable_dispatch(); 109efc: e8 78 25 00 00 call 10c479 <_Thread_Enable_dispatch> /* set the user's output */ if ( olddelta ) 109f01: 83 c4 10 add $0x10,%esp 109f04: 85 f6 test %esi,%esi 109f06: 74 0a je 109f12 <== ALWAYS TAKEN *olddelta = *delta; 109f08: 8b 03 mov (%ebx),%eax 109f0a: 8b 53 04 mov 0x4(%ebx),%edx 109f0d: 89 06 mov %eax,(%esi) 109f0f: 89 56 04 mov %edx,0x4(%esi) 109f12: 31 c0 xor %eax,%eax return 0; } 109f14: 8d 65 f8 lea -0x8(%ebp),%esp 109f17: 5b pop %ebx 109f18: 5e pop %esi 109f19: c9 leave 109f1a: c3 ret 00110278 : } unsigned int alarm( unsigned int seconds ) { 110278: 55 push %ebp 110279: 89 e5 mov %esp,%ebp 11027b: 57 push %edi 11027c: 56 push %esi 11027d: 53 push %ebx 11027e: 83 ec 0c sub $0xc,%esp 110281: 8b 75 08 mov 0x8(%ebp),%esi /* * Initialize the timer used to implement alarm(). */ if ( !the_timer->routine ) { 110284: 83 3d 6c 4b 12 00 00 cmpl $0x0,0x124b6c 11028b: 75 2c jne 1102b9 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 11028d: c7 05 58 4b 12 00 00 movl $0x0,0x124b58 110294: 00 00 00 the_watchdog->routine = routine; 110297: c7 05 6c 4b 12 00 1c movl $0x11031c,0x124b6c 11029e: 03 11 00 the_watchdog->id = id; 1102a1: c7 05 70 4b 12 00 00 movl $0x0,0x124b70 1102a8: 00 00 00 the_watchdog->user_data = user_data; 1102ab: c7 05 74 4b 12 00 00 movl $0x0,0x124b74 1102b2: 00 00 00 1102b5: 31 db xor %ebx,%ebx 1102b7: eb 3b jmp 1102f4 <== ALWAYS TAKEN _Watchdog_Initialize( the_timer, _POSIX_signals_Alarm_TSR, 0, NULL ); } else { Watchdog_States state; state = _Watchdog_Remove( the_timer ); 1102b9: 83 ec 0c sub $0xc,%esp 1102bc: 68 50 4b 12 00 push $0x124b50 1102c1: e8 02 c8 ff ff call 10cac8 <_Watchdog_Remove> if ( (state == WATCHDOG_ACTIVE) || (state == WATCHDOG_REMOVE_IT) ) { 1102c6: 83 e8 02 sub $0x2,%eax 1102c9: 83 c4 10 add $0x10,%esp 1102cc: 31 db xor %ebx,%ebx 1102ce: 83 f8 01 cmp $0x1,%eax 1102d1: 77 21 ja 1102f4 * The stop_time and start_time fields are snapshots of ticks since * boot. Since alarm() is dealing in seconds, we must account for * this. */ remaining = the_timer->initial - 1102d3: 8b 1d 5c 4b 12 00 mov 0x124b5c,%ebx ((the_timer->stop_time - the_timer->start_time) / TOD_TICKS_PER_SECOND); 1102d9: 8b 3d 68 4b 12 00 mov 0x124b68,%edi 1102df: 2b 3d 64 4b 12 00 sub 0x124b64,%edi 1102e5: e8 0e 08 00 00 call 110af8 1102ea: 89 c1 mov %eax,%ecx * The stop_time and start_time fields are snapshots of ticks since * boot. Since alarm() is dealing in seconds, we must account for * this. */ remaining = the_timer->initial - 1102ec: 89 f8 mov %edi,%eax 1102ee: 31 d2 xor %edx,%edx 1102f0: f7 f1 div %ecx 1102f2: 29 c3 sub %eax,%ebx ((the_timer->stop_time - the_timer->start_time) / TOD_TICKS_PER_SECOND); } } if ( seconds ) 1102f4: 85 f6 test %esi,%esi 1102f6: 74 1a je 110312 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 1102f8: 89 35 5c 4b 12 00 mov %esi,0x124b5c _Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog ); 1102fe: 50 push %eax 1102ff: 50 push %eax 110300: 68 50 4b 12 00 push $0x124b50 110305: 68 bc 42 12 00 push $0x1242bc 11030a: e8 a1 c6 ff ff call 10c9b0 <_Watchdog_Insert> 11030f: 83 c4 10 add $0x10,%esp _Watchdog_Insert_seconds( the_timer, seconds ); return remaining; } 110312: 89 d8 mov %ebx,%eax 110314: 8d 65 f4 lea -0xc(%ebp),%esp 110317: 5b pop %ebx 110318: 5e pop %esi 110319: 5f pop %edi 11031a: c9 leave 11031b: c3 ret 0010dbdc : ) { register char *cptr; size_t length; MSBUMP(calloc_calls, 1); 10dbdc: 55 push %ebp 10dbdd: 89 e5 mov %esp,%ebp 10dbdf: 57 push %edi 10dbe0: 53 push %ebx 10dbe1: 8b 5d 0c mov 0xc(%ebp),%ebx 10dbe4: ff 05 bc 40 12 00 incl 0x1240bc length = nelem * elsize; 10dbea: 0f af 5d 08 imul 0x8(%ebp),%ebx cptr = malloc( length ); 10dbee: 83 ec 0c sub $0xc,%esp 10dbf1: 53 push %ebx 10dbf2: e8 65 97 ff ff call 10735c <== ALWAYS TAKEN 10dbf7: 89 c2 mov %eax,%edx if ( cptr ) 10dbf9: 83 c4 10 add $0x10,%esp 10dbfc: 85 c0 test %eax,%eax 10dbfe: 74 08 je 10dc08 <== ALWAYS TAKEN memset( cptr, '\0', length ); 10dc00: 31 c0 xor %eax,%eax 10dc02: 89 d7 mov %edx,%edi 10dc04: 89 d9 mov %ebx,%ecx 10dc06: f3 aa rep stos %al,%es:(%edi) MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */ 10dc08: ff 0d ac 40 12 00 decl 0x1240ac return cptr; } 10dc0e: 89 d0 mov %edx,%eax 10dc10: 8d 65 f8 lea -0x8(%ebp),%esp 10dc13: 5b pop %ebx 10dc14: 5f pop %edi 10dc15: c9 leave 10dc16: c3 ret 00125214 : #include int chdir( const char *pathname ) { 125214: 55 push %ebp 125215: 89 e5 mov %esp,%ebp 125217: 57 push %edi 125218: 56 push %esi 125219: 83 ec 2c sub $0x2c,%esp 12521c: 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 ); 12521f: 31 c0 xor %eax,%eax 125221: 83 c9 ff or $0xffffffff,%ecx 125224: 89 d7 mov %edx,%edi 125226: f2 ae repnz scas %es:(%edi),%al 125228: f7 d1 not %ecx 12522a: 49 dec %ecx /* * Get the node where we wish to go. */ result = rtems_filesystem_evaluate_path( 12522b: 6a 01 push $0x1 12522d: 8d 75 e4 lea -0x1c(%ebp),%esi 125230: 56 push %esi 125231: 6a 01 push $0x1 125233: 51 push %ecx 125234: 52 push %edx 125235: e8 e2 64 fe ff call 10b71c <== ALWAYS TAKEN 12523a: 89 c2 mov %eax,%edx pathname, strlen( pathname ), RTEMS_LIBIO_PERMS_SEARCH, &loc, true ); if ( result != 0 ) 12523c: 83 c4 20 add $0x20,%esp 12523f: 83 c8 ff or $0xffffffff,%eax 125242: 85 d2 test %edx,%edx 125244: 0f 85 8f 00 00 00 jne 1252d9 /* * Verify you can change directory into this node. */ if ( !loc.ops->node_type_h ) { 12524a: 8b 55 f0 mov -0x10(%ebp),%edx 12524d: 8b 42 10 mov 0x10(%edx),%eax 125250: 85 c0 test %eax,%eax 125252: 75 1d jne 125271 <== NEVER TAKEN rtems_filesystem_freenode( &loc ); 125254: 8b 42 1c mov 0x1c(%edx),%eax <== NOT EXECUTED 125257: 85 c0 test %eax,%eax <== NOT EXECUTED 125259: 74 09 je 125264 <== NOT EXECUTED 12525b: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12525e: 56 push %esi <== NOT EXECUTED 12525f: ff d0 call *%eax <== NOT EXECUTED 125261: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 125264: e8 d3 43 01 00 call 13963c <__errno> <== NOT EXECUTED 125269: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 12526f: eb 2e jmp 12529f <== NOT EXECUTED } if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { 125271: 83 ec 0c sub $0xc,%esp 125274: 56 push %esi 125275: ff d0 call *%eax 125277: 83 c4 10 add $0x10,%esp 12527a: 48 dec %eax 12527b: 74 27 je 1252a4 rtems_filesystem_freenode( &loc ); 12527d: 8b 45 f0 mov -0x10(%ebp),%eax 125280: 85 c0 test %eax,%eax 125282: 74 10 je 125294 <== ALWAYS TAKEN 125284: 8b 40 1c mov 0x1c(%eax),%eax 125287: 85 c0 test %eax,%eax 125289: 74 09 je 125294 <== ALWAYS TAKEN 12528b: 83 ec 0c sub $0xc,%esp 12528e: 56 push %esi 12528f: ff d0 call *%eax 125291: 83 c4 10 add $0x10,%esp rtems_set_errno_and_return_minus_one( ENOTDIR ); 125294: e8 a3 43 01 00 call 13963c <__errno> 125299: c7 00 14 00 00 00 movl $0x14,(%eax) 12529f: 83 c8 ff or $0xffffffff,%eax 1252a2: eb 35 jmp 1252d9 <== ALWAYS TAKEN } rtems_filesystem_freenode( &rtems_filesystem_current ); 1252a4: 8b 15 78 e1 15 00 mov 0x15e178,%edx 1252aa: 8b 42 10 mov 0x10(%edx),%eax 1252ad: 85 c0 test %eax,%eax 1252af: 74 13 je 1252c4 <== ALWAYS TAKEN 1252b1: 8b 40 1c mov 0x1c(%eax),%eax 1252b4: 85 c0 test %eax,%eax 1252b6: 74 0c je 1252c4 <== ALWAYS TAKEN 1252b8: 83 ec 0c sub $0xc,%esp 1252bb: 83 c2 04 add $0x4,%edx 1252be: 52 push %edx 1252bf: ff d0 call *%eax 1252c1: 83 c4 10 add $0x10,%esp rtems_filesystem_current = loc; 1252c4: 8b 3d 78 e1 15 00 mov 0x15e178,%edi 1252ca: 83 c7 04 add $0x4,%edi 1252cd: 8d 75 e4 lea -0x1c(%ebp),%esi 1252d0: b9 05 00 00 00 mov $0x5,%ecx 1252d5: f3 a5 rep movsl %ds:(%esi),%es:(%edi) 1252d7: 31 c0 xor %eax,%eax return 0; } 1252d9: 8d 65 f8 lea -0x8(%ebp),%esp 1252dc: 5e pop %esi 1252dd: 5f pop %edi 1252de: c9 leave 1252df: 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 20 e1 02 00 call 13963c <__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 f5 e0 02 00 call 13963c <__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 001252e0 : int chown( const char *path, uid_t owner, gid_t group ) { 1252e0: 55 push %ebp 1252e1: 89 e5 mov %esp,%ebp 1252e3: 57 push %edi 1252e4: 56 push %esi 1252e5: 53 push %ebx 1252e6: 83 ec 48 sub $0x48,%esp 1252e9: 8b 55 08 mov 0x8(%ebp),%edx 1252ec: 8b 75 0c mov 0xc(%ebp),%esi 1252ef: 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 ) ) 1252f2: 31 c0 xor %eax,%eax 1252f4: 83 c9 ff or $0xffffffff,%ecx 1252f7: 89 d7 mov %edx,%edi 1252f9: f2 ae repnz scas %es:(%edi),%al 1252fb: f7 d1 not %ecx 1252fd: 49 dec %ecx 1252fe: 6a 01 push $0x1 125300: 8d 7d d4 lea -0x2c(%ebp),%edi 125303: 57 push %edi 125304: 6a 00 push $0x0 125306: 51 push %ecx 125307: 52 push %edx 125308: e8 0f 64 fe ff call 10b71c <== ALWAYS TAKEN 12530d: 83 c4 20 add $0x20,%esp 125310: 83 ca ff or $0xffffffff,%edx 125313: 85 c0 test %eax,%eax 125315: 75 58 jne 12536f return -1; if ( !loc.ops->chown_h ) { 125317: 8b 55 e0 mov -0x20(%ebp),%edx 12531a: 8b 42 18 mov 0x18(%edx),%eax 12531d: 85 c0 test %eax,%eax 12531f: 75 20 jne 125341 <== NEVER TAKEN rtems_filesystem_freenode( &loc ); 125321: 8b 42 1c mov 0x1c(%edx),%eax <== NOT EXECUTED 125324: 85 c0 test %eax,%eax <== NOT EXECUTED 125326: 74 09 je 125331 <== NOT EXECUTED 125328: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12532b: 57 push %edi <== NOT EXECUTED 12532c: ff d0 call *%eax <== NOT EXECUTED 12532e: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 125331: e8 06 43 01 00 call 13963c <__errno> <== NOT EXECUTED 125336: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 12533c: 83 ca ff or $0xffffffff,%edx <== NOT EXECUTED 12533f: eb 2e jmp 12536f <== NOT EXECUTED } result = (*loc.ops->chown_h)( &loc, owner, group ); 125341: 52 push %edx 125342: 0f b7 db movzwl %bx,%ebx 125345: 53 push %ebx 125346: 0f b7 f6 movzwl %si,%esi 125349: 56 push %esi 12534a: 57 push %edi 12534b: ff d0 call *%eax 12534d: 89 c2 mov %eax,%edx rtems_filesystem_freenode( &loc ); 12534f: 8b 45 e0 mov -0x20(%ebp),%eax 125352: 83 c4 10 add $0x10,%esp 125355: 85 c0 test %eax,%eax 125357: 74 16 je 12536f <== ALWAYS TAKEN 125359: 8b 40 1c mov 0x1c(%eax),%eax 12535c: 85 c0 test %eax,%eax 12535e: 74 0f je 12536f <== ALWAYS TAKEN 125360: 83 ec 0c sub $0xc,%esp 125363: 57 push %edi 125364: 89 55 c4 mov %edx,-0x3c(%ebp) 125367: ff d0 call *%eax 125369: 83 c4 10 add $0x10,%esp 12536c: 8b 55 c4 mov -0x3c(%ebp),%edx return result; } 12536f: 89 d0 mov %edx,%eax 125371: 8d 65 f4 lea -0xc(%ebp),%esp 125374: 5b pop %ebx 125375: 5e pop %esi 125376: 5f pop %edi 125377: c9 leave 125378: c3 ret 0012537c : #include int chroot( const char *pathname ) { 12537c: 55 push %ebp 12537d: 89 e5 mov %esp,%ebp 12537f: 57 push %edi 125380: 56 push %esi 125381: 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) { 125384: 81 3d 78 e1 15 00 cc cmpl $0x163acc,0x15e178 12538b: 3a 16 00 12538e: 75 1e jne 1253ae <== ALWAYS TAKEN rtems_libio_set_private_env(); /* try to set a new private env*/ 125390: e8 c3 13 00 00 call 126758 if (rtems_current_user_env == &rtems_global_user_env) /* not ok */ 125395: 81 3d 78 e1 15 00 cc cmpl $0x163acc,0x15e178 12539c: 3a 16 00 12539f: 75 0d jne 1253ae <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); 1253a1: e8 96 42 01 00 call 13963c <__errno> <== NOT EXECUTED 1253a6: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 1253ac: eb 22 jmp 1253d0 <== NOT EXECUTED } result = chdir(pathname); 1253ae: 83 ec 0c sub $0xc,%esp 1253b1: ff 75 08 pushl 0x8(%ebp) 1253b4: e8 5b fe ff ff call 125214 if (result) { 1253b9: 83 c4 10 add $0x10,%esp 1253bc: 85 c0 test %eax,%eax 1253be: 74 15 je 1253d5 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( errno ); 1253c0: e8 77 42 01 00 call 13963c <__errno> <== NOT EXECUTED 1253c5: 89 c6 mov %eax,%esi <== NOT EXECUTED 1253c7: e8 70 42 01 00 call 13963c <__errno> <== NOT EXECUTED 1253cc: 8b 00 mov (%eax),%eax <== NOT EXECUTED 1253ce: 89 06 mov %eax,(%esi) <== NOT EXECUTED 1253d0: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 1253d3: eb 53 jmp 125428 <== NOT EXECUTED } /* clone the new root location */ if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) { 1253d5: 83 ec 0c sub $0xc,%esp 1253d8: 6a 00 push $0x0 1253da: 8d 45 e4 lea -0x1c(%ebp),%eax 1253dd: 50 push %eax 1253de: 6a 00 push $0x0 1253e0: 6a 01 push $0x1 1253e2: 68 96 32 15 00 push $0x153296 1253e7: e8 30 63 fe ff call 10b71c <== ALWAYS TAKEN 1253ec: 83 c4 20 add $0x20,%esp 1253ef: 85 c0 test %eax,%eax 1253f1: 75 cd jne 1253c0 <== 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); 1253f3: 8b 15 78 e1 15 00 mov 0x15e178,%edx 1253f9: 8b 42 24 mov 0x24(%edx),%eax 1253fc: 85 c0 test %eax,%eax 1253fe: 74 13 je 125413 <== ALWAYS TAKEN 125400: 8b 40 1c mov 0x1c(%eax),%eax 125403: 85 c0 test %eax,%eax 125405: 74 0c je 125413 <== ALWAYS TAKEN 125407: 83 ec 0c sub $0xc,%esp 12540a: 83 c2 18 add $0x18,%edx 12540d: 52 push %edx 12540e: ff d0 call *%eax 125410: 83 c4 10 add $0x10,%esp rtems_filesystem_root = loc; 125413: 8b 3d 78 e1 15 00 mov 0x15e178,%edi 125419: 83 c7 18 add $0x18,%edi 12541c: 8d 75 e4 lea -0x1c(%ebp),%esi 12541f: b9 05 00 00 00 mov $0x5,%ecx 125424: f3 a5 rep movsl %ds:(%esi),%es:(%edi) 125426: 31 c0 xor %eax,%eax return 0; } 125428: 8d 65 f8 lea -0x8(%ebp),%esp 12542b: 5e pop %esi 12542c: 5f pop %edi 12542d: c9 leave 12542e: c3 ret 0010a218 : int clock_getres( clockid_t clock_id, struct timespec *res ) { 10a218: 55 push %ebp 10a219: 89 e5 mov %esp,%ebp 10a21b: 56 push %esi 10a21c: 53 push %ebx 10a21d: 8b 4d 0c mov 0xc(%ebp),%ecx if ( !res ) 10a220: 85 c9 test %ecx,%ecx 10a222: 74 29 je 10a24d rtems_set_errno_and_return_minus_one( EINVAL ); switch ( clock_id ) { 10a224: 8b 45 08 mov 0x8(%ebp),%eax 10a227: 48 dec %eax 10a228: 83 f8 02 cmp $0x2,%eax 10a22b: 77 20 ja 10a24d case CLOCK_REALTIME: case CLOCK_PROCESS_CPUTIME: case CLOCK_THREAD_CPUTIME: if ( res ) { res->tv_sec = rtems_configuration_get_microseconds_per_tick() / 10a22d: 8b 1d 04 22 12 00 mov 0x122204,%ebx 10a233: be 40 42 0f 00 mov $0xf4240,%esi 10a238: 89 d8 mov %ebx,%eax 10a23a: 31 d2 xor %edx,%edx 10a23c: f7 f6 div %esi 10a23e: 89 01 mov %eax,(%ecx) TOD_MICROSECONDS_PER_SECOND; res->tv_nsec = rtems_configuration_get_nanoseconds_per_tick(); 10a240: 69 db e8 03 00 00 imul $0x3e8,%ebx,%ebx 10a246: 89 59 04 mov %ebx,0x4(%ecx) 10a249: 31 c0 xor %eax,%eax 10a24b: eb 0e jmp 10a25b <== ALWAYS TAKEN } break; default: rtems_set_errno_and_return_minus_one( EINVAL ); 10a24d: e8 02 7f 00 00 call 112154 <__errno> 10a252: c7 00 16 00 00 00 movl $0x16,(%eax) 10a258: 83 c8 ff or $0xffffffff,%eax } return 0; } 10a25b: 5b pop %ebx 10a25c: 5e pop %esi 10a25d: c9 leave 10a25e: c3 ret 00109d58 : int clock_gettime( clockid_t clock_id, struct timespec *tp ) { 109d58: 55 push %ebp 109d59: 89 e5 mov %esp,%ebp 109d5b: 83 ec 08 sub $0x8,%esp 109d5e: 8b 45 08 mov 0x8(%ebp),%eax 109d61: 8b 55 0c mov 0xc(%ebp),%edx if ( !tp ) 109d64: 85 d2 test %edx,%edx 109d66: 74 3c je 109da4 rtems_set_errno_and_return_minus_one( EINVAL ); if ( clock_id == CLOCK_REALTIME ) { 109d68: 83 f8 01 cmp $0x1,%eax 109d6b: 75 0b jne 109d78 _TOD_Get(tp); 109d6d: 83 ec 0c sub $0xc,%esp 109d70: 52 push %edx 109d71: e8 4e 1b 00 00 call 10b8c4 <_TOD_Get> 109d76: eb 13 jmp 109d8b <== ALWAYS TAKEN return 0; } #ifdef CLOCK_MONOTONIC if ( clock_id == CLOCK_MONOTONIC ) { 109d78: 83 f8 04 cmp $0x4,%eax 109d7b: 74 05 je 109d82 <== ALWAYS TAKEN return 0; } #endif #ifdef _POSIX_CPUTIME if ( clock_id == CLOCK_PROCESS_CPUTIME ) { 109d7d: 83 f8 02 cmp $0x2,%eax 109d80: 75 10 jne 109d92 _TOD_Get_uptime_as_timespec( tp ); 109d82: 83 ec 0c sub $0xc,%esp 109d85: 52 push %edx 109d86: e8 95 1b 00 00 call 10b920 <_TOD_Get_uptime_as_timespec> 109d8b: 31 c0 xor %eax,%eax return 0; 109d8d: 83 c4 10 add $0x10,%esp 109d90: eb 20 jmp 109db2 <== ALWAYS TAKEN } #endif #ifdef _POSIX_THREAD_CPUTIME if ( clock_id == CLOCK_THREAD_CPUTIME ) 109d92: 83 f8 03 cmp $0x3,%eax 109d95: 75 0d jne 109da4 rtems_set_errno_and_return_minus_one( ENOSYS ); 109d97: e8 b4 83 00 00 call 112150 <__errno> 109d9c: c7 00 58 00 00 00 movl $0x58,(%eax) 109da2: eb 0b jmp 109daf <== ALWAYS TAKEN #endif rtems_set_errno_and_return_minus_one( EINVAL ); 109da4: e8 a7 83 00 00 call 112150 <__errno> 109da9: c7 00 16 00 00 00 movl $0x16,(%eax) 109daf: 83 c8 ff or $0xffffffff,%eax return 0; } 109db2: c9 leave 109db3: c3 ret 00126c2c : int clock_settime( clockid_t clock_id, const struct timespec *tp ) { 126c2c: 55 push %ebp 126c2d: 89 e5 mov %esp,%ebp 126c2f: 83 ec 08 sub $0x8,%esp 126c32: 8b 45 08 mov 0x8(%ebp),%eax 126c35: 8b 55 0c mov 0xc(%ebp),%edx if ( !tp ) 126c38: 85 d2 test %edx,%edx 126c3a: 74 44 je 126c80 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); if ( clock_id == CLOCK_REALTIME ) { 126c3c: 83 f8 01 cmp $0x1,%eax 126c3f: 75 28 jne 126c69 if ( tp->tv_sec < TOD_SECONDS_1970_THROUGH_1988 ) 126c41: 81 3a ff e4 da 21 cmpl $0x21dae4ff,(%edx) 126c47: 76 37 jbe 126c80 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 126c49: a1 cc 3b 16 00 mov 0x163bcc,%eax 126c4e: 40 inc %eax 126c4f: a3 cc 3b 16 00 mov %eax,0x163bcc rtems_set_errno_and_return_minus_one( EINVAL ); _Thread_Disable_dispatch(); _TOD_Set( tp ); 126c54: 83 ec 0c sub $0xc,%esp 126c57: 52 push %edx 126c58: e8 f3 18 00 00 call 128550 <_TOD_Set> _Thread_Enable_dispatch(); 126c5d: e8 af a9 fe ff call 111611 <_Thread_Enable_dispatch> 126c62: 31 c0 xor %eax,%eax rtems_set_errno_and_return_minus_one( ENOSYS ); #endif else rtems_set_errno_and_return_minus_one( EINVAL ); return 0; 126c64: 83 c4 10 add $0x10,%esp 126c67: eb 25 jmp 126c8e <== ALWAYS TAKEN _Thread_Disable_dispatch(); _TOD_Set( tp ); _Thread_Enable_dispatch(); } #ifdef _POSIX_CPUTIME else if ( clock_id == CLOCK_PROCESS_CPUTIME ) 126c69: 83 f8 02 cmp $0x2,%eax 126c6c: 74 05 je 126c73 rtems_set_errno_and_return_minus_one( ENOSYS ); #endif #ifdef _POSIX_THREAD_CPUTIME else if ( clock_id == CLOCK_THREAD_CPUTIME ) 126c6e: 83 f8 03 cmp $0x3,%eax 126c71: 75 0d jne 126c80 rtems_set_errno_and_return_minus_one( ENOSYS ); 126c73: e8 c4 29 01 00 call 13963c <__errno> 126c78: c7 00 58 00 00 00 movl $0x58,(%eax) 126c7e: eb 0b jmp 126c8b <== ALWAYS TAKEN #endif else rtems_set_errno_and_return_minus_one( EINVAL ); 126c80: e8 b7 29 01 00 call 13963c <__errno> 126c85: c7 00 16 00 00 00 movl $0x16,(%eax) 126c8b: 83 c8 ff or $0xffffffff,%eax return 0; } 126c8e: c9 leave 126c8f: c3 ret 0010dc18 : #include int close( int fd ) { 10dc18: 55 push %ebp 10dc19: 89 e5 mov %esp,%ebp 10dc1b: 56 push %esi 10dc1c: 53 push %ebx 10dc1d: 8b 5d 08 mov 0x8(%ebp),%ebx rtems_libio_t *iop; rtems_status_code rc; rtems_libio_check_fd(fd); 10dc20: 3b 1d 44 01 12 00 cmp 0x120144,%ebx 10dc26: 73 0f jae 10dc37 iop = rtems_libio_iop(fd); 10dc28: c1 e3 06 shl $0x6,%ebx 10dc2b: 03 1d 90 40 12 00 add 0x124090,%ebx rtems_libio_check_is_open(iop); 10dc31: f6 43 15 01 testb $0x1,0x15(%ebx) 10dc35: 75 10 jne 10dc47 10dc37: e8 88 38 00 00 call 1114c4 <__errno> 10dc3c: c7 00 09 00 00 00 movl $0x9,(%eax) 10dc42: 83 c8 ff or $0xffffffff,%eax 10dc45: eb 3f jmp 10dc86 <== ALWAYS TAKEN rc = RTEMS_SUCCESSFUL; if ( iop->handlers->close_h ) 10dc47: 8b 43 3c mov 0x3c(%ebx),%eax 10dc4a: 8b 40 04 mov 0x4(%eax),%eax 10dc4d: 31 f6 xor %esi,%esi 10dc4f: 85 c0 test %eax,%eax 10dc51: 74 0b je 10dc5e <== ALWAYS TAKEN rc = (*iop->handlers->close_h)( iop ); 10dc53: 83 ec 0c sub $0xc,%esp 10dc56: 53 push %ebx 10dc57: ff d0 call *%eax 10dc59: 89 c6 mov %eax,%esi 10dc5b: 83 c4 10 add $0x10,%esp rtems_filesystem_freenode( &iop->pathinfo ); 10dc5e: 8b 43 24 mov 0x24(%ebx),%eax 10dc61: 85 c0 test %eax,%eax 10dc63: 74 13 je 10dc78 <== ALWAYS TAKEN 10dc65: 8b 40 1c mov 0x1c(%eax),%eax 10dc68: 85 c0 test %eax,%eax 10dc6a: 74 0c je 10dc78 10dc6c: 83 ec 0c sub $0xc,%esp 10dc6f: 8d 53 18 lea 0x18(%ebx),%edx 10dc72: 52 push %edx 10dc73: ff d0 call *%eax 10dc75: 83 c4 10 add $0x10,%esp rtems_libio_free( iop ); 10dc78: 83 ec 0c sub $0xc,%esp 10dc7b: 53 push %ebx 10dc7c: e8 55 02 00 00 call 10ded6 <== ALWAYS TAKEN return rc; 10dc81: 89 f0 mov %esi,%eax 10dc83: 83 c4 10 add $0x10,%esp } 10dc86: 8d 65 f8 lea -0x8(%ebp),%esp 10dc89: 5b pop %ebx 10dc8a: 5e pop %esi 10dc8b: c9 leave 10dc8c: c3 ret 0010d2f0 : #include "devfs.h" int devFS_close( rtems_libio_t *iop ) { 10d2f0: 55 push %ebp 10d2f1: 89 e5 mov %esp,%ebp 10d2f3: 83 ec 1c sub $0x1c,%esp 10d2f6: 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; 10d2f9: 8b 42 38 mov 0x38(%edx),%eax args.iop = iop; 10d2fc: 89 55 ec mov %edx,-0x14(%ebp) args.flags = 0; 10d2ff: c7 45 f0 00 00 00 00 movl $0x0,-0x10(%ebp) args.mode = 0; 10d306: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp) status = rtems_io_close( 10d30d: 8d 55 ec lea -0x14(%ebp),%edx 10d310: 52 push %edx 10d311: ff 70 0c pushl 0xc(%eax) 10d314: ff 70 08 pushl 0x8(%eax) 10d317: e8 14 10 00 00 call 10e330 10d31c: 89 c2 mov %eax,%edx np->major, np->minor, (void *) &args ); if ( status ) { 10d31e: 83 c4 10 add $0x10,%esp 10d321: 31 c0 xor %eax,%eax 10d323: 85 d2 test %edx,%edx 10d325: 74 0c je 10d333 <== NEVER TAKEN return rtems_deviceio_errno(status); 10d327: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10d32a: 52 push %edx <== NOT EXECUTED 10d32b: e8 a8 00 00 00 call 10d3d8 <== NOT EXECUTED 10d330: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } return 0; } 10d333: c9 leave 10d334: c3 ret 0010d347 : const char *pathname, int pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc ) { 10d347: 55 push %ebp 10d348: 89 e5 mov %esp,%ebp 10d34a: 57 push %edi 10d34b: 56 push %esi 10d34c: 53 push %ebx 10d34d: 83 ec 1c sub $0x1c,%esp 10d350: 8b 4d 0c mov 0xc(%ebp),%ecx 10d353: 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; 10d356: 8b 33 mov (%ebx),%esi if (!device_name_table) 10d358: 85 f6 test %esi,%esi 10d35a: 74 04 je 10d360 <== ALWAYS TAKEN 10d35c: 31 ff xor %edi,%edi 10d35e: eb 5a jmp 10d3ba <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EFAULT ); 10d360: e8 a7 25 00 00 call 10f90c <__errno> <== NOT EXECUTED 10d365: c7 00 0e 00 00 00 movl $0xe,(%eax) <== NOT EXECUTED 10d36b: eb 60 jmp 10d3cd <== NOT EXECUTED for (i = 0; i < rtems_device_table_size; i++) { if (!device_name_table[i].device_name) 10d36d: 8b 16 mov (%esi),%edx 10d36f: 85 d2 test %edx,%edx 10d371: 74 43 je 10d3b6 continue; if (strncmp(pathname, device_name_table[i].device_name, pathnamelen) != 0) 10d373: 50 push %eax 10d374: 51 push %ecx 10d375: 52 push %edx 10d376: ff 75 08 pushl 0x8(%ebp) 10d379: 89 55 e4 mov %edx,-0x1c(%ebp) 10d37c: 89 4d e0 mov %ecx,-0x20(%ebp) 10d37f: e8 68 31 00 00 call 1104ec 10d384: 83 c4 10 add $0x10,%esp 10d387: 85 c0 test %eax,%eax 10d389: 8b 55 e4 mov -0x1c(%ebp),%edx 10d38c: 8b 4d e0 mov -0x20(%ebp),%ecx 10d38f: 75 25 jne 10d3b6 <== ALWAYS TAKEN continue; if (device_name_table[i].device_name[pathnamelen] != '\0') 10d391: 80 3c 0a 00 cmpb $0x0,(%edx,%ecx,1) 10d395: 75 1f jne 10d3b6 <== ALWAYS TAKEN continue; /* find the device, set proper values */ pathloc->node_access = (void *)&device_name_table[i]; 10d397: 89 33 mov %esi,(%ebx) pathloc->handlers = &devFS_file_handlers; 10d399: c7 43 08 60 ff 11 00 movl $0x11ff60,0x8(%ebx) pathloc->ops = &devFS_ops; 10d3a0: c7 43 0c 18 ff 11 00 movl $0x11ff18,0xc(%ebx) pathloc->mt_entry = rtems_filesystem_root.mt_entry; 10d3a7: a1 ac ff 11 00 mov 0x11ffac,%eax 10d3ac: 8b 40 28 mov 0x28(%eax),%eax 10d3af: 89 43 10 mov %eax,0x10(%ebx) 10d3b2: 31 c0 xor %eax,%eax return 0; 10d3b4: eb 1a jmp 10d3d0 <== 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++) { 10d3b6: 47 inc %edi 10d3b7: 83 c6 14 add $0x14,%esi 10d3ba: 3b 3d 48 e1 11 00 cmp 0x11e148,%edi 10d3c0: 72 ab jb 10d36d pathloc->mt_entry = rtems_filesystem_root.mt_entry; return 0; } /* no such file or directory */ rtems_set_errno_and_return_minus_one( ENOENT ); 10d3c2: e8 45 25 00 00 call 10f90c <__errno> 10d3c7: c7 00 02 00 00 00 movl $0x2,(%eax) 10d3cd: 83 c8 ff or $0xffffffff,%eax } 10d3d0: 8d 65 f4 lea -0xc(%ebp),%esp 10d3d3: 5b pop %ebx 10d3d4: 5e pop %esi 10d3d5: 5f pop %edi 10d3d6: c9 leave 10d3d7: 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 48 e1 11 00 14 imul $0x14,0x11e148,%eax 106cc2: 50 push %eax 106cc3: e8 e8 61 00 00 call 10ceb0 <_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 36 8c 00 00 call 10f90c <__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 48 e1 11 00 14 imul $0x14,0x11e148,%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 60 ff 11 00 movl $0x11ff60,0x24(%ebx) temp_mt_entry->mt_fs_root.ops = &devFS_ops; 106cf5: c7 43 28 18 ff 11 00 movl $0x11ff18,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 ee 38 00 00 call 10a72c 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 8a 65 00 00 call 10d3d8 <== 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 ba 8b 00 00 call 10f90c <__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: 83 ce ff or $0xffffffff,%esi 106d6e: 31 db xor %ebx,%ebx 106d70: eb 46 jmp 106db8 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EFAULT ); 106d72: e8 95 8b 00 00 call 10f90c <__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 24 96 00 00 call 1103bc <== 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 62 8b 00 00 call 10f90c <__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 48 e1 11 00 cmp 0x11e148,%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 42 8b 00 00 call 10f90c <__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 82 39 00 00 call 10a804 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 42 65 00 00 call 10d3d8 <== 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 54 39 00 00 call 10a834 <== 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 e8 64 00 00 call 10d3d8 <== 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 f4 89 00 00 call 10f90c <__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 e4 38 00 00 call 10a864 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 48 64 00 00 call 10d3d8 <== 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 0010f6fc : */ int device_close( rtems_libio_t *iop ) { 10f6fc: 55 push %ebp 10f6fd: 89 e5 mov %esp,%ebp 10f6ff: 83 ec 1c sub $0x1c,%esp 10f702: 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; 10f705: 8b 42 38 mov 0x38(%edx),%eax args.iop = iop; 10f708: 89 55 ec mov %edx,-0x14(%ebp) args.flags = 0; 10f70b: c7 45 f0 00 00 00 00 movl $0x0,-0x10(%ebp) args.mode = 0; 10f712: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp) status = rtems_io_close( 10f719: 8d 55 ec lea -0x14(%ebp),%edx 10f71c: 52 push %edx 10f71d: ff 70 54 pushl 0x54(%eax) 10f720: ff 70 50 pushl 0x50(%eax) 10f723: e8 f8 11 00 00 call 110920 <== ALWAYS TAKEN 10f728: 89 c2 mov %eax,%edx the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) { 10f72a: 83 c4 10 add $0x10,%esp 10f72d: 31 c0 xor %eax,%eax 10f72f: 85 d2 test %edx,%edx 10f731: 74 0c je 10f73f <== NEVER TAKEN return rtems_deviceio_errno(status); 10f733: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10f736: 52 push %edx <== NOT EXECUTED 10f737: e8 64 16 00 00 call 110da0 <== NOT EXECUTED 10f73c: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } return 0; } 10f73f: c9 leave 10f740: c3 ret 0010f5f6 : int device_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) { 10f5f6: 55 push %ebp 10f5f7: 89 e5 mov %esp,%ebp 10f5f9: 83 ec 1c sub $0x1c,%esp 10f5fc: 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; 10f5ff: 89 45 e8 mov %eax,-0x18(%ebp) args.command = command; 10f602: 8b 55 0c mov 0xc(%ebp),%edx 10f605: 89 55 ec mov %edx,-0x14(%ebp) args.buffer = buffer; 10f608: 8b 55 10 mov 0x10(%ebp),%edx 10f60b: 89 55 f0 mov %edx,-0x10(%ebp) the_jnode = iop->file_info; 10f60e: 8b 40 38 mov 0x38(%eax),%eax status = rtems_io_control( 10f611: 8d 55 e8 lea -0x18(%ebp),%edx 10f614: 52 push %edx 10f615: ff 70 54 pushl 0x54(%eax) 10f618: ff 70 50 pushl 0x50(%eax) 10f61b: e8 30 13 00 00 call 110950 the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 10f620: 83 c4 10 add $0x10,%esp 10f623: 85 c0 test %eax,%eax 10f625: 74 0e je 10f635 <== NEVER TAKEN return rtems_deviceio_errno(status); 10f627: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10f62a: 50 push %eax <== NOT EXECUTED 10f62b: e8 70 17 00 00 call 110da0 <== NOT EXECUTED 10f630: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10f633: eb 03 jmp 10f638 <== NOT EXECUTED return args.ioctl_return; 10f635: 8b 45 f4 mov -0xc(%ebp),%eax } 10f638: c9 leave 10f639: c3 ret 0010f741 : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 10f741: 55 push %ebp 10f742: 89 e5 mov %esp,%ebp 10f744: 83 ec 1c sub $0x1c,%esp 10f747: 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; 10f74a: 8b 50 38 mov 0x38(%eax),%edx args.iop = iop; 10f74d: 89 45 ec mov %eax,-0x14(%ebp) args.flags = iop->flags; 10f750: 8b 40 14 mov 0x14(%eax),%eax 10f753: 89 45 f0 mov %eax,-0x10(%ebp) args.mode = mode; 10f756: 8b 45 14 mov 0x14(%ebp),%eax 10f759: 89 45 f4 mov %eax,-0xc(%ebp) status = rtems_io_open( 10f75c: 8d 45 ec lea -0x14(%ebp),%eax 10f75f: 50 push %eax 10f760: ff 72 54 pushl 0x54(%edx) 10f763: ff 72 50 pushl 0x50(%edx) 10f766: e8 15 12 00 00 call 110980 <== ALWAYS TAKEN 10f76b: 89 c2 mov %eax,%edx the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 10f76d: 83 c4 10 add $0x10,%esp 10f770: 31 c0 xor %eax,%eax 10f772: 85 d2 test %edx,%edx 10f774: 74 0c je 10f782 <== NEVER TAKEN return rtems_deviceio_errno(status); 10f776: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10f779: 52 push %edx <== NOT EXECUTED 10f77a: e8 21 16 00 00 call 110da0 <== NOT EXECUTED 10f77f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED return 0; } 10f782: c9 leave 10f783: c3 ret 0010f69b : ssize_t device_read( rtems_libio_t *iop, void *buffer, size_t count ) { 10f69b: 55 push %ebp <== NOT EXECUTED 10f69c: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10f69e: 53 push %ebx <== NOT EXECUTED 10f69f: 83 ec 28 sub $0x28,%esp <== NOT EXECUTED 10f6a2: 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; 10f6a5: 8b 50 38 mov 0x38(%eax),%edx <== NOT EXECUTED args.iop = iop; 10f6a8: 89 45 dc mov %eax,-0x24(%ebp) <== NOT EXECUTED args.offset = iop->offset; 10f6ab: 8b 48 0c mov 0xc(%eax),%ecx <== NOT EXECUTED 10f6ae: 8b 58 10 mov 0x10(%eax),%ebx <== NOT EXECUTED 10f6b1: 89 4d e0 mov %ecx,-0x20(%ebp) <== NOT EXECUTED 10f6b4: 89 5d e4 mov %ebx,-0x1c(%ebp) <== NOT EXECUTED args.buffer = buffer; 10f6b7: 8b 4d 0c mov 0xc(%ebp),%ecx <== NOT EXECUTED 10f6ba: 89 4d e8 mov %ecx,-0x18(%ebp) <== NOT EXECUTED args.count = count; 10f6bd: 8b 4d 10 mov 0x10(%ebp),%ecx <== NOT EXECUTED 10f6c0: 89 4d ec mov %ecx,-0x14(%ebp) <== NOT EXECUTED args.flags = iop->flags; 10f6c3: 8b 40 14 mov 0x14(%eax),%eax <== NOT EXECUTED 10f6c6: 89 45 f0 mov %eax,-0x10(%ebp) <== NOT EXECUTED args.bytes_moved = 0; 10f6c9: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp) <== NOT EXECUTED status = rtems_io_read( 10f6d0: 8d 45 dc lea -0x24(%ebp),%eax <== NOT EXECUTED 10f6d3: 50 push %eax <== NOT EXECUTED 10f6d4: ff 72 54 pushl 0x54(%edx) <== NOT EXECUTED 10f6d7: ff 72 50 pushl 0x50(%edx) <== NOT EXECUTED 10f6da: e8 d1 12 00 00 call 1109b0 <== NOT EXECUTED the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 10f6df: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10f6e2: 85 c0 test %eax,%eax <== NOT EXECUTED 10f6e4: 74 0e je 10f6f4 <== NOT EXECUTED return rtems_deviceio_errno(status); 10f6e6: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10f6e9: 50 push %eax <== NOT EXECUTED 10f6ea: e8 b1 16 00 00 call 110da0 <== NOT EXECUTED 10f6ef: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10f6f2: eb 03 jmp 10f6f7 <== NOT EXECUTED return (ssize_t) args.bytes_moved; 10f6f4: 8b 45 f4 mov -0xc(%ebp),%eax <== NOT EXECUTED } 10f6f7: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 10f6fa: c9 leave <== NOT EXECUTED 10f6fb: c3 ret <== NOT EXECUTED 0010f63a : ssize_t device_write( rtems_libio_t *iop, const void *buffer, size_t count ) { 10f63a: 55 push %ebp 10f63b: 89 e5 mov %esp,%ebp 10f63d: 53 push %ebx 10f63e: 83 ec 28 sub $0x28,%esp 10f641: 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; 10f644: 8b 50 38 mov 0x38(%eax),%edx args.iop = iop; 10f647: 89 45 dc mov %eax,-0x24(%ebp) args.offset = iop->offset; 10f64a: 8b 48 0c mov 0xc(%eax),%ecx 10f64d: 8b 58 10 mov 0x10(%eax),%ebx 10f650: 89 4d e0 mov %ecx,-0x20(%ebp) 10f653: 89 5d e4 mov %ebx,-0x1c(%ebp) args.buffer = (void *) buffer; 10f656: 8b 4d 0c mov 0xc(%ebp),%ecx 10f659: 89 4d e8 mov %ecx,-0x18(%ebp) args.count = count; 10f65c: 8b 4d 10 mov 0x10(%ebp),%ecx 10f65f: 89 4d ec mov %ecx,-0x14(%ebp) args.flags = iop->flags; 10f662: 8b 40 14 mov 0x14(%eax),%eax 10f665: 89 45 f0 mov %eax,-0x10(%ebp) args.bytes_moved = 0; 10f668: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp) status = rtems_io_write( 10f66f: 8d 45 dc lea -0x24(%ebp),%eax 10f672: 50 push %eax 10f673: ff 72 54 pushl 0x54(%edx) 10f676: ff 72 50 pushl 0x50(%edx) 10f679: e8 62 13 00 00 call 1109e0 the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 10f67e: 83 c4 10 add $0x10,%esp 10f681: 85 c0 test %eax,%eax 10f683: 74 0e je 10f693 <== NEVER TAKEN return rtems_deviceio_errno(status); 10f685: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10f688: 50 push %eax <== NOT EXECUTED 10f689: e8 12 17 00 00 call 110da0 <== NOT EXECUTED 10f68e: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10f691: eb 03 jmp 10f696 <== NOT EXECUTED return (ssize_t) args.bytes_moved; 10f693: 8b 45 f4 mov -0xc(%ebp),%eax } 10f696: 8b 5d fc mov -0x4(%ebp),%ebx 10f699: c9 leave 10f69a: 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 27 1b 00 00 call 10a4ec <== 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 00 20 12 00 mov 0x122000,%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 001258d4 : fclose(group_fp); group_fp = fopen("/etc/group", "r"); } void endgrent(void) { 1258d4: 55 push %ebp <== NOT EXECUTED 1258d5: 89 e5 mov %esp,%ebp <== NOT EXECUTED 1258d7: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED if (group_fp != NULL) 1258da: a1 a4 36 16 00 mov 0x1636a4,%eax <== NOT EXECUTED 1258df: 85 c0 test %eax,%eax <== NOT EXECUTED 1258e1: 74 0c je 1258ef <== NOT EXECUTED fclose(group_fp); 1258e3: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1258e6: 50 push %eax <== NOT EXECUTED 1258e7: e8 9c 3e 01 00 call 139788 <== NOT EXECUTED 1258ec: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } 1258ef: c9 leave <== NOT EXECUTED 1258f0: c3 ret <== NOT EXECUTED 001258f1 : fclose(passwd_fp); passwd_fp = fopen("/etc/passwd", "r"); } void endpwent(void) { 1258f1: 55 push %ebp <== NOT EXECUTED 1258f2: 89 e5 mov %esp,%ebp <== NOT EXECUTED 1258f4: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED if (passwd_fp != NULL) 1258f7: a1 bc 35 16 00 mov 0x1635bc,%eax <== NOT EXECUTED 1258fc: 85 c0 test %eax,%eax <== NOT EXECUTED 1258fe: 74 0c je 12590c <== NOT EXECUTED fclose(passwd_fp); 125900: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 125903: 50 push %eax <== NOT EXECUTED 125904: e8 7f 3e 01 00 call 139788 <== NOT EXECUTED 125909: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } 12590c: c9 leave <== NOT EXECUTED 12590d: 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 00 20 12 00 mov 0x122000,%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 1c e7 11 00 push $0x11e71c <== 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 1a e7 11 00 push $0x11e71a <== 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 00 20 12 00 mov 0x122000,%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 1a e7 11 00 push $0x11e71a <== 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 001345b4 : #include int fchdir( int fd ) { 1345b4: 55 push %ebp <== NOT EXECUTED 1345b5: 89 e5 mov %esp,%ebp <== NOT EXECUTED 1345b7: 57 push %edi <== NOT EXECUTED 1345b8: 56 push %esi <== NOT EXECUTED 1345b9: 53 push %ebx <== NOT EXECUTED 1345ba: 83 ec 3c sub $0x3c,%esp <== NOT EXECUTED 1345bd: 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 ); 1345c0: 3b 1d 44 c1 15 00 cmp 0x15c144,%ebx <== NOT EXECUTED 1345c6: 73 11 jae 1345d9 <== NOT EXECUTED iop = rtems_libio_iop( fd ); 1345c8: c1 e3 06 shl $0x6,%ebx <== NOT EXECUTED 1345cb: 03 1d 70 3a 16 00 add 0x163a70,%ebx <== NOT EXECUTED rtems_libio_check_is_open(iop); 1345d1: 8b 43 14 mov 0x14(%ebx),%eax <== NOT EXECUTED 1345d4: f6 c4 01 test $0x1,%ah <== NOT EXECUTED 1345d7: 75 10 jne 1345e9 <== NOT EXECUTED 1345d9: e8 5e 50 00 00 call 13963c <__errno> <== NOT EXECUTED 1345de: c7 00 09 00 00 00 movl $0x9,(%eax) <== NOT EXECUTED 1345e4: e9 97 00 00 00 jmp 134680 <== NOT EXECUTED /* * Now process the fchmod(). */ rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); 1345e9: a8 02 test $0x2,%al <== NOT EXECUTED 1345eb: 75 10 jne 1345fd <== NOT EXECUTED 1345ed: e8 4a 50 00 00 call 13963c <__errno> <== NOT EXECUTED 1345f2: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 1345f8: e9 83 00 00 00 jmp 134680 <== NOT EXECUTED /* * Verify you can change directory into this node. */ if ( !iop->pathinfo.ops ) { 1345fd: 8b 43 24 mov 0x24(%ebx),%eax <== NOT EXECUTED 134600: 85 c0 test %eax,%eax <== NOT EXECUTED 134602: 74 07 je 13460b <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( !iop->pathinfo.ops->node_type_h ) { 134604: 8b 40 10 mov 0x10(%eax),%eax <== NOT EXECUTED 134607: 85 c0 test %eax,%eax <== NOT EXECUTED 134609: 75 0d jne 134618 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 13460b: e8 2c 50 00 00 call 13963c <__errno> <== NOT EXECUTED 134610: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 134616: eb 68 jmp 134680 <== NOT EXECUTED } if ( (*iop->pathinfo.ops->node_type_h)( &iop->pathinfo ) != 134618: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 13461b: 83 c3 18 add $0x18,%ebx <== NOT EXECUTED 13461e: 53 push %ebx <== NOT EXECUTED 13461f: ff d0 call *%eax <== NOT EXECUTED 134621: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 134624: 48 dec %eax <== NOT EXECUTED 134625: 74 0d je 134634 <== NOT EXECUTED RTEMS_FILESYSTEM_DIRECTORY ) { rtems_set_errno_and_return_minus_one( ENOTDIR ); 134627: e8 10 50 00 00 call 13963c <__errno> <== NOT EXECUTED 13462c: c7 00 14 00 00 00 movl $0x14,(%eax) <== NOT EXECUTED 134632: eb 4c jmp 134680 <== NOT EXECUTED * but note the race condition. Threads who * share their rtems_filesystem_current better * be synchronized! */ saved = rtems_filesystem_current; 134634: a1 78 e1 15 00 mov 0x15e178,%eax <== NOT EXECUTED 134639: 8d 7d c0 lea -0x40(%ebp),%edi <== NOT EXECUTED 13463c: 8d 70 04 lea 0x4(%eax),%esi <== NOT EXECUTED 13463f: b9 05 00 00 00 mov $0x5,%ecx <== NOT EXECUTED 134644: f3 a5 rep movsl %ds:(%esi),%es:(%edi) <== NOT EXECUTED rtems_filesystem_current = iop->pathinfo; 134646: 8d 78 04 lea 0x4(%eax),%edi <== NOT EXECUTED 134649: b1 05 mov $0x5,%cl <== NOT EXECUTED 13464b: 89 de mov %ebx,%esi <== NOT EXECUTED 13464d: f3 a5 rep movsl %ds:(%esi),%es:(%edi) <== NOT EXECUTED /* clone the current node */ if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) { 13464f: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 134652: 6a 00 push $0x0 <== NOT EXECUTED 134654: 8d 45 d4 lea -0x2c(%ebp),%eax <== NOT EXECUTED 134657: 50 push %eax <== NOT EXECUTED 134658: 6a 00 push $0x0 <== NOT EXECUTED 13465a: 6a 01 push $0x1 <== NOT EXECUTED 13465c: 68 96 32 15 00 push $0x153296 <== NOT EXECUTED 134661: e8 b6 70 fd ff call 10b71c <== NOT EXECUTED 134666: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 134669: 85 c0 test %eax,%eax <== NOT EXECUTED 13466b: 74 18 je 134685 <== NOT EXECUTED /* cloning failed; restore original and bail out */ rtems_filesystem_current = saved; 13466d: 8b 3d 78 e1 15 00 mov 0x15e178,%edi <== NOT EXECUTED 134673: 83 c7 04 add $0x4,%edi <== NOT EXECUTED 134676: 8d 75 c0 lea -0x40(%ebp),%esi <== NOT EXECUTED 134679: b9 05 00 00 00 mov $0x5,%ecx <== NOT EXECUTED 13467e: f3 a5 rep movsl %ds:(%esi),%es:(%edi) <== NOT EXECUTED 134680: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED return -1; 134683: eb 2f jmp 1346b4 <== NOT EXECUTED } /* release the old one */ rtems_filesystem_freenode( &saved ); 134685: 8b 45 cc mov -0x34(%ebp),%eax <== NOT EXECUTED 134688: 85 c0 test %eax,%eax <== NOT EXECUTED 13468a: 74 13 je 13469f <== NOT EXECUTED 13468c: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 13468f: 85 c0 test %eax,%eax <== NOT EXECUTED 134691: 74 0c je 13469f <== NOT EXECUTED 134693: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 134696: 8d 55 c0 lea -0x40(%ebp),%edx <== NOT EXECUTED 134699: 52 push %edx <== NOT EXECUTED 13469a: ff d0 call *%eax <== NOT EXECUTED 13469c: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_filesystem_current = loc; 13469f: 8b 3d 78 e1 15 00 mov 0x15e178,%edi <== NOT EXECUTED 1346a5: 83 c7 04 add $0x4,%edi <== NOT EXECUTED 1346a8: 8d 75 d4 lea -0x2c(%ebp),%esi <== NOT EXECUTED 1346ab: b9 05 00 00 00 mov $0x5,%ecx <== NOT EXECUTED 1346b0: f3 a5 rep movsl %ds:(%esi),%es:(%edi) <== NOT EXECUTED 1346b2: 31 c0 xor %eax,%eax <== NOT EXECUTED return 0; } 1346b4: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 1346b7: 5b pop %ebx <== NOT EXECUTED 1346b8: 5e pop %esi <== NOT EXECUTED 1346b9: 5f pop %edi <== NOT EXECUTED 1346ba: c9 leave <== NOT EXECUTED 1346bb: c3 ret <== NOT EXECUTED 001255e0 : int fchmod( int fd, mode_t mode ) { 1255e0: 55 push %ebp <== NOT EXECUTED 1255e1: 89 e5 mov %esp,%ebp <== NOT EXECUTED 1255e3: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 1255e6: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 1255e9: 8b 4d 0c mov 0xc(%ebp),%ecx <== NOT EXECUTED rtems_libio_t *iop; rtems_libio_check_fd( fd ); 1255ec: 3b 05 44 c1 15 00 cmp 0x15c144,%eax <== NOT EXECUTED 1255f2: 73 11 jae 125605 <== NOT EXECUTED iop = rtems_libio_iop( fd ); 1255f4: c1 e0 06 shl $0x6,%eax <== NOT EXECUTED 1255f7: 03 05 70 3a 16 00 add 0x163a70,%eax <== NOT EXECUTED rtems_libio_check_is_open(iop); 1255fd: 8b 50 14 mov 0x14(%eax),%edx <== NOT EXECUTED 125600: f6 c6 01 test $0x1,%dh <== NOT EXECUTED 125603: 75 0d jne 125612 <== NOT EXECUTED 125605: e8 32 40 01 00 call 13963c <__errno> <== NOT EXECUTED 12560a: c7 00 09 00 00 00 movl $0x9,(%eax) <== NOT EXECUTED 125610: eb 3a jmp 12564c <== NOT EXECUTED /* * Now process the fchmod(). */ rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 125612: 80 e2 04 and $0x4,%dl <== NOT EXECUTED 125615: 75 0d jne 125624 <== NOT EXECUTED 125617: e8 20 40 01 00 call 13963c <__errno> <== NOT EXECUTED 12561c: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 125622: eb 28 jmp 12564c <== NOT EXECUTED if ( !iop->handlers->fchmod_h ) 125624: 8b 50 3c mov 0x3c(%eax),%edx <== NOT EXECUTED 125627: 83 7a 1c 00 cmpl $0x0,0x1c(%edx) <== NOT EXECUTED 12562b: 75 0d jne 12563a <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 12562d: e8 0a 40 01 00 call 13963c <__errno> <== NOT EXECUTED 125632: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 125638: eb 12 jmp 12564c <== NOT EXECUTED return (*iop->pathinfo.handlers->fchmod_h)( &iop->pathinfo, mode ); 12563a: 8b 50 20 mov 0x20(%eax),%edx <== NOT EXECUTED 12563d: 89 4d 0c mov %ecx,0xc(%ebp) <== NOT EXECUTED 125640: 83 c0 18 add $0x18,%eax <== NOT EXECUTED 125643: 89 45 08 mov %eax,0x8(%ebp) <== NOT EXECUTED 125646: 8b 42 1c mov 0x1c(%edx),%eax <== NOT EXECUTED } 125649: 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 ); 12564a: ff e0 jmp *%eax <== NOT EXECUTED } 12564c: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 12564f: c9 leave <== NOT EXECUTED 125650: c3 ret <== NOT EXECUTED 00125654 : int fchown( int fd, uid_t owner, gid_t group ) { 125654: 55 push %ebp <== NOT EXECUTED 125655: 89 e5 mov %esp,%ebp <== NOT EXECUTED 125657: 53 push %ebx <== NOT EXECUTED 125658: 83 ec 04 sub $0x4,%esp <== NOT EXECUTED 12565b: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 12565e: 8b 4d 0c mov 0xc(%ebp),%ecx <== NOT EXECUTED 125661: 8b 5d 10 mov 0x10(%ebp),%ebx <== NOT EXECUTED rtems_libio_t *iop; rtems_libio_check_fd( fd ); 125664: 3b 05 44 c1 15 00 cmp 0x15c144,%eax <== NOT EXECUTED 12566a: 73 11 jae 12567d <== NOT EXECUTED iop = rtems_libio_iop( fd ); 12566c: c1 e0 06 shl $0x6,%eax <== NOT EXECUTED 12566f: 03 05 70 3a 16 00 add 0x163a70,%eax <== NOT EXECUTED rtems_libio_check_is_open(iop); 125675: 8b 50 14 mov 0x14(%eax),%edx <== NOT EXECUTED 125678: f6 c6 01 test $0x1,%dh <== NOT EXECUTED 12567b: 75 0d jne 12568a <== NOT EXECUTED 12567d: e8 ba 3f 01 00 call 13963c <__errno> <== NOT EXECUTED 125682: c7 00 09 00 00 00 movl $0x9,(%eax) <== NOT EXECUTED 125688: eb 40 jmp 1256ca <== NOT EXECUTED rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 12568a: 80 e2 04 and $0x4,%dl <== NOT EXECUTED 12568d: 75 0d jne 12569c <== NOT EXECUTED 12568f: e8 a8 3f 01 00 call 13963c <__errno> <== NOT EXECUTED 125694: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 12569a: eb 2e jmp 1256ca <== NOT EXECUTED if ( !iop->pathinfo.ops->chown_h ) 12569c: 8b 50 24 mov 0x24(%eax),%edx <== NOT EXECUTED 12569f: 8b 52 18 mov 0x18(%edx),%edx <== NOT EXECUTED 1256a2: 85 d2 test %edx,%edx <== NOT EXECUTED 1256a4: 75 0d jne 1256b3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 1256a6: e8 91 3f 01 00 call 13963c <__errno> <== NOT EXECUTED 1256ab: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 1256b1: eb 17 jmp 1256ca <== NOT EXECUTED return (*iop->pathinfo.ops->chown_h)( &iop->pathinfo, owner, group ); 1256b3: 0f b7 db movzwl %bx,%ebx <== NOT EXECUTED 1256b6: 89 5d 10 mov %ebx,0x10(%ebp) <== NOT EXECUTED 1256b9: 0f b7 c9 movzwl %cx,%ecx <== NOT EXECUTED 1256bc: 89 4d 0c mov %ecx,0xc(%ebp) <== NOT EXECUTED 1256bf: 83 c0 18 add $0x18,%eax <== NOT EXECUTED 1256c2: 89 45 08 mov %eax,0x8(%ebp) <== NOT EXECUTED } 1256c5: 59 pop %ecx <== NOT EXECUTED 1256c6: 5b pop %ebx <== NOT EXECUTED 1256c7: 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 ); 1256c8: ff e2 jmp *%edx <== NOT EXECUTED } 1256ca: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 1256cd: 5a pop %edx <== NOT EXECUTED 1256ce: 5b pop %ebx <== NOT EXECUTED 1256cf: c9 leave <== NOT EXECUTED 1256d0: c3 ret <== NOT EXECUTED 001346bc : int fcntl( int fd, int cmd, ... ) { 1346bc: 55 push %ebp 1346bd: 89 e5 mov %esp,%ebp 1346bf: 57 push %edi 1346c0: 56 push %esi 1346c1: 53 push %ebx 1346c2: 83 ec 0c sub $0xc,%esp 1346c5: 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, ...)); 1346c8: 8d 55 10 lea 0x10(%ebp),%edx int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); 1346cb: 8b 0d 44 c1 15 00 mov 0x15c144,%ecx 1346d1: 39 cb cmp %ecx,%ebx 1346d3: 73 16 jae 1346eb <== ALWAYS TAKEN iop = rtems_libio_iop( fd ); 1346d5: a1 70 3a 16 00 mov 0x163a70,%eax 1346da: c1 e3 06 shl $0x6,%ebx 1346dd: 8d 1c 18 lea (%eax,%ebx,1),%ebx rtems_libio_check_is_open(iop); 1346e0: 8b 73 14 mov 0x14(%ebx),%esi 1346e3: f7 c6 00 01 00 00 test $0x100,%esi 1346e9: 75 10 jne 1346fb <== NEVER TAKEN 1346eb: e8 4c 4f 00 00 call 13963c <__errno> <== NOT EXECUTED 1346f0: c7 00 09 00 00 00 movl $0x9,(%eax) <== NOT EXECUTED 1346f6: e9 fe 00 00 00 jmp 1347f9 <== NOT EXECUTED /* * This switch should contain all the cases from POSIX. */ switch ( cmd ) { 1346fb: 83 7d 0c 09 cmpl $0x9,0xc(%ebp) 1346ff: 0f 87 c1 00 00 00 ja 1347c6 134705: 8b 7d 0c mov 0xc(%ebp),%edi 134708: ff 24 bd 00 97 15 00 jmp *0x159700(,%edi,4) case F_DUPFD: /* dup */ fd2 = va_arg( ap, int ); 13470f: 8b 32 mov (%edx),%esi if ( fd2 ) 134711: 85 f6 test %esi,%esi 134713: 74 10 je 134725 <== NEVER TAKEN diop = rtems_libio_iop( fd2 ); 134715: 31 d2 xor %edx,%edx <== NOT EXECUTED 134717: 39 ce cmp %ecx,%esi <== NOT EXECUTED 134719: 73 1c jae 134737 <== NOT EXECUTED 13471b: 89 f2 mov %esi,%edx <== NOT EXECUTED 13471d: c1 e2 06 shl $0x6,%edx <== NOT EXECUTED 134720: 8d 14 10 lea (%eax,%edx,1),%edx <== NOT EXECUTED 134723: eb 12 jmp 134737 <== NOT EXECUTED else { /* allocate a file control block */ diop = rtems_libio_allocate(); 134725: e8 81 73 fd ff call 10baab 13472a: 89 c2 mov %eax,%edx if ( diop == 0 ) { 13472c: 83 ce ff or $0xffffffff,%esi 13472f: 85 c0 test %eax,%eax 134731: 0f 84 c5 00 00 00 je 1347fc <== ALWAYS TAKEN ret = -1; break; } } diop->handlers = iop->handlers; 134737: 8b 43 3c mov 0x3c(%ebx),%eax 13473a: 89 42 3c mov %eax,0x3c(%edx) diop->file_info = iop->file_info; 13473d: 8b 43 38 mov 0x38(%ebx),%eax 134740: 89 42 38 mov %eax,0x38(%edx) diop->flags = iop->flags; 134743: 8b 43 14 mov 0x14(%ebx),%eax 134746: 89 42 14 mov %eax,0x14(%edx) diop->pathinfo = iop->pathinfo; 134749: 8d 7a 18 lea 0x18(%edx),%edi 13474c: 8d 73 18 lea 0x18(%ebx),%esi 13474f: b9 05 00 00 00 mov $0x5,%ecx 134754: f3 a5 rep movsl %ds:(%esi),%es:(%edi) ret = (int) (diop - rtems_libio_iops); 134756: 89 d6 mov %edx,%esi 134758: 2b 35 70 3a 16 00 sub 0x163a70,%esi 13475e: c1 fe 06 sar $0x6,%esi 134761: eb 70 jmp 1347d3 <== ALWAYS TAKEN break; case F_GETFD: /* get f_flags */ ret = ((iop->flags & LIBIO_FLAGS_CLOSE_ON_EXEC) != 0); 134763: c1 ee 0b shr $0xb,%esi 134766: 83 e6 01 and $0x1,%esi 134769: eb 6c jmp 1347d7 <== 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 ) ) 13476b: 83 3a 00 cmpl $0x0,(%edx) 13476e: 74 08 je 134778 <== ALWAYS TAKEN iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC; 134770: 81 ce 00 08 00 00 or $0x800,%esi 134776: eb 06 jmp 13477e <== ALWAYS TAKEN else iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC; 134778: 81 e6 ff f7 ff ff and $0xfffff7ff,%esi <== NOT EXECUTED 13477e: 89 73 14 mov %esi,0x14(%ebx) 134781: 31 f6 xor %esi,%esi 134783: eb 52 jmp 1347d7 <== ALWAYS TAKEN break; case F_GETFL: /* more flags (cloexec) */ ret = rtems_libio_to_fcntl_flags( iop->flags ); 134785: 83 ec 0c sub $0xc,%esp 134788: 56 push %esi 134789: e8 d2 71 fd ff call 10b960 <== ALWAYS TAKEN 13478e: 89 c6 mov %eax,%esi 134790: 83 c4 10 add $0x10,%esp 134793: eb 3e jmp 1347d3 <== ALWAYS TAKEN break; case F_SETFL: flags = rtems_libio_fcntl_flags( va_arg( ap, int ) ); 134795: 83 ec 0c sub $0xc,%esp 134798: ff 32 pushl (%edx) 13479a: e8 97 73 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); 13479f: 25 01 02 00 00 and $0x201,%eax 1347a4: 8b 53 14 mov 0x14(%ebx),%edx 1347a7: 81 e2 fe fd ff ff and $0xfffffdfe,%edx 1347ad: 09 d0 or %edx,%eax 1347af: 89 43 14 mov %eax,0x14(%ebx) 1347b2: 31 f6 xor %esi,%esi 1347b4: 83 c4 10 add $0x10,%esp 1347b7: eb 1e jmp 1347d7 <== ALWAYS TAKEN errno = ENOTSUP; ret = -1; break; case F_GETOWN: /* for sockets. */ errno = ENOTSUP; 1347b9: e8 7e 4e 00 00 call 13963c <__errno> 1347be: c7 00 86 00 00 00 movl $0x86,(%eax) 1347c4: eb 33 jmp 1347f9 <== ALWAYS TAKEN ret = -1; break; default: errno = EINVAL; 1347c6: e8 71 4e 00 00 call 13963c <__errno> 1347cb: c7 00 16 00 00 00 movl $0x16,(%eax) 1347d1: eb 26 jmp 1347f9 <== ALWAYS TAKEN /* * If we got this far successfully, then we give the optional * filesystem specific handler a chance to process this. */ if (ret >= 0) { 1347d3: 85 f6 test %esi,%esi 1347d5: 78 25 js 1347fc <== ALWAYS TAKEN if (iop->handlers->fcntl_h) { 1347d7: 8b 43 3c mov 0x3c(%ebx),%eax 1347da: 8b 40 30 mov 0x30(%eax),%eax 1347dd: 85 c0 test %eax,%eax 1347df: 74 1b je 1347fc <== ALWAYS TAKEN int err = (*iop->handlers->fcntl_h)( cmd, iop ); 1347e1: 52 push %edx 1347e2: 52 push %edx 1347e3: 53 push %ebx 1347e4: ff 75 0c pushl 0xc(%ebp) 1347e7: ff d0 call *%eax 1347e9: 89 c3 mov %eax,%ebx if (err) { 1347eb: 83 c4 10 add $0x10,%esp 1347ee: 85 c0 test %eax,%eax 1347f0: 74 0a je 1347fc <== NEVER TAKEN errno = err; 1347f2: e8 45 4e 00 00 call 13963c <__errno> <== NOT EXECUTED 1347f7: 89 18 mov %ebx,(%eax) <== NOT EXECUTED 1347f9: 83 ce ff or $0xffffffff,%esi va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; } 1347fc: 89 f0 mov %esi,%eax 1347fe: 8d 65 f4 lea -0xc(%ebp),%esp 134801: 5b pop %ebx 134802: 5e pop %esi 134803: 5f pop %edi 134804: c9 leave 134805: 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 44 31 12 00 cmp 0x123144,%eax 107fc7: 73 11 jae 107fda iop = rtems_libio_iop( fd ); 107fc9: c1 e0 06 shl $0x6,%eax 107fcc: 03 05 98 70 12 00 add 0x127098,%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 c1 b5 00 00 call 1135a0 <__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 af b5 00 00 call 1135a0 <__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 98 b5 00 00 call 1135a0 <__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 0010fc47 : */ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { 10fc47: 55 push %ebp 10fc48: 89 e5 mov %esp,%ebp 10fc4a: 57 push %edi 10fc4b: 56 push %esi 10fc4c: 53 push %ebx 10fc4d: 83 ec 30 sub $0x30,%esp ) { pipe_control_t *pipe; int err = 0; if (rtems_semaphore_obtain(rtems_pipe_semaphore, 10fc50: 6a 00 push $0x0 10fc52: 6a 00 push $0x0 10fc54: ff 35 94 3e 12 00 pushl 0x123e94 10fc5a: e8 cd a2 ff ff call 109f2c 10fc5f: 89 c2 mov %eax,%edx 10fc61: 83 c4 10 add $0x10,%esp 10fc64: bf fc ff ff ff mov $0xfffffffc,%edi 10fc69: 85 c0 test %eax,%eax 10fc6b: 0f 85 39 03 00 00 jne 10ffaa RTEMS_WAIT, RTEMS_NO_TIMEOUT) != RTEMS_SUCCESSFUL) return -EINTR; pipe = *pipep; 10fc71: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 10fc74: 8b 18 mov (%eax),%ebx <== NOT EXECUTED if (pipe == NULL) { 10fc76: 85 db test %ebx,%ebx <== NOT EXECUTED 10fc78: 0f 85 59 01 00 00 jne 10fdd7 <== NOT EXECUTED { static char c = 'a'; pipe_control_t *pipe; int err = -ENOMEM; pipe = malloc(sizeof(pipe_control_t)); 10fc7e: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10fc81: 6a 34 push $0x34 <== NOT EXECUTED 10fc83: 89 55 d4 mov %edx,-0x2c(%ebp) <== NOT EXECUTED 10fc86: e8 d1 76 ff ff call 10735c <== NOT EXECUTED 10fc8b: 89 c6 mov %eax,%esi <== NOT EXECUTED 10fc8d: 89 c3 mov %eax,%ebx <== NOT EXECUTED if (pipe == NULL) 10fc8f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10fc92: 66 bf f4 ff mov $0xfff4,%di <== NOT EXECUTED 10fc96: 85 c0 test %eax,%eax <== NOT EXECUTED 10fc98: 8b 55 d4 mov -0x2c(%ebp),%edx <== NOT EXECUTED 10fc9b: 0f 84 6a 01 00 00 je 10fe0b <== NOT EXECUTED return err; memset(pipe, 0, sizeof(pipe_control_t)); 10fca1: b9 0d 00 00 00 mov $0xd,%ecx <== NOT EXECUTED 10fca6: 89 c7 mov %eax,%edi <== NOT EXECUTED 10fca8: 89 d0 mov %edx,%eax <== NOT EXECUTED 10fcaa: f3 ab rep stos %eax,%es:(%edi) <== NOT EXECUTED pipe->Size = PIPE_BUF; 10fcac: c7 46 04 00 02 00 00 movl $0x200,0x4(%esi) <== NOT EXECUTED pipe->Buffer = malloc(pipe->Size); 10fcb3: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10fcb6: 68 00 02 00 00 push $0x200 <== NOT EXECUTED 10fcbb: e8 9c 76 ff ff call 10735c <== NOT EXECUTED 10fcc0: 89 06 mov %eax,(%esi) <== NOT EXECUTED if (! pipe->Buffer) 10fcc2: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10fcc5: bf f4 ff ff ff mov $0xfffffff4,%edi <== NOT EXECUTED 10fcca: 85 c0 test %eax,%eax <== NOT EXECUTED 10fccc: 0f 84 f7 00 00 00 je 10fdc9 <== NOT EXECUTED goto err_buf; err = -EINTR; if (rtems_barrier_create( 10fcd2: 8d 46 2c lea 0x2c(%esi),%eax <== NOT EXECUTED 10fcd5: 50 push %eax <== NOT EXECUTED 10fcd6: 6a 00 push $0x0 <== NOT EXECUTED 10fcd8: 6a 00 push $0x0 <== NOT EXECUTED 10fcda: 0f be 05 ec 1f 12 00 movsbl 0x121fec,%eax <== NOT EXECUTED 10fce1: 0d 00 72 49 50 or $0x50497200,%eax <== NOT EXECUTED 10fce6: 50 push %eax <== NOT EXECUTED 10fce7: e8 4c 09 00 00 call 110638 <== NOT EXECUTED 10fcec: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10fcef: 85 c0 test %eax,%eax <== NOT EXECUTED 10fcf1: 0f 85 c0 00 00 00 jne 10fdb7 <== 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( 10fcf7: 8d 46 30 lea 0x30(%esi),%eax <== NOT EXECUTED 10fcfa: 50 push %eax <== NOT EXECUTED 10fcfb: 6a 00 push $0x0 <== NOT EXECUTED 10fcfd: 6a 00 push $0x0 <== NOT EXECUTED 10fcff: 0f be 05 ec 1f 12 00 movsbl 0x121fec,%eax <== NOT EXECUTED 10fd06: 0d 00 77 49 50 or $0x50497700,%eax <== NOT EXECUTED 10fd0b: 50 push %eax <== NOT EXECUTED 10fd0c: e8 27 09 00 00 call 110638 <== NOT EXECUTED 10fd11: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10fd14: 85 c0 test %eax,%eax <== NOT EXECUTED 10fd16: 0f 85 8d 00 00 00 jne 10fda9 <== 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( 10fd1c: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10fd1f: 8d 46 28 lea 0x28(%esi),%eax <== NOT EXECUTED 10fd22: 50 push %eax <== NOT EXECUTED 10fd23: 6a 00 push $0x0 <== NOT EXECUTED 10fd25: 6a 10 push $0x10 <== NOT EXECUTED 10fd27: 6a 01 push $0x1 <== NOT EXECUTED 10fd29: 0f be 05 ec 1f 12 00 movsbl 0x121fec,%eax <== NOT EXECUTED 10fd30: 0d 00 73 49 50 or $0x50497300,%eax <== NOT EXECUTED 10fd35: 50 push %eax <== NOT EXECUTED 10fd36: e8 c5 9f ff ff call 109d00 <== NOT EXECUTED 10fd3b: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 10fd3e: 85 c0 test %eax,%eax <== NOT EXECUTED 10fd40: 75 59 jne 10fd9b <== NOT EXECUTED RTEMS_INLINE_ROUTINE Barrier_Control *_Barrier_Get ( Objects_Id id, Objects_Locations *location ) { return (Barrier_Control *) 10fd42: 50 push %eax <== NOT EXECUTED 10fd43: 8d 75 e0 lea -0x20(%ebp),%esi <== NOT EXECUTED 10fd46: 56 push %esi <== NOT EXECUTED 10fd47: ff 73 2c pushl 0x2c(%ebx) <== NOT EXECUTED 10fd4a: 68 78 4b 12 00 push $0x124b78 <== NOT EXECUTED 10fd4f: e8 ac b6 ff ff call 10b400 <_Objects_Get> <== NOT EXECUTED /* Set barriers to be interruptible by signals. */ static void pipe_interruptible(pipe_control_t *pipe) { Objects_Locations location; _Barrier_Get(pipe->readBarrier, &location)->Barrier.Wait_queue.state 10fd54: 81 48 4c 00 00 00 10 orl $0x10000000,0x4c(%eax) <== NOT EXECUTED |= STATES_INTERRUPTIBLE_BY_SIGNAL; _Thread_Enable_dispatch(); 10fd5b: e8 91 be ff ff call 10bbf1 <_Thread_Enable_dispatch> <== NOT EXECUTED 10fd60: 83 c4 0c add $0xc,%esp <== NOT EXECUTED 10fd63: 56 push %esi <== NOT EXECUTED 10fd64: ff 73 30 pushl 0x30(%ebx) <== NOT EXECUTED 10fd67: 68 78 4b 12 00 push $0x124b78 <== NOT EXECUTED 10fd6c: e8 8f b6 ff ff call 10b400 <_Objects_Get> <== NOT EXECUTED _Barrier_Get(pipe->writeBarrier, &location)->Barrier.Wait_queue.state 10fd71: 81 48 4c 00 00 00 10 orl $0x10000000,0x4c(%eax) <== NOT EXECUTED |= STATES_INTERRUPTIBLE_BY_SIGNAL; _Thread_Enable_dispatch(); 10fd78: e8 74 be ff ff call 10bbf1 <_Thread_Enable_dispatch> <== NOT EXECUTED #ifdef RTEMS_POSIX_API pipe_interruptible(pipe); #endif *pipep = pipe; if (c ++ == 'z') 10fd7d: a0 ec 1f 12 00 mov 0x121fec,%al <== NOT EXECUTED 10fd82: 8d 50 01 lea 0x1(%eax),%edx <== NOT EXECUTED 10fd85: 88 15 ec 1f 12 00 mov %dl,0x121fec <== NOT EXECUTED 10fd8b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10fd8e: 3c 7a cmp $0x7a,%al <== NOT EXECUTED 10fd90: 75 45 jne 10fdd7 <== NOT EXECUTED c = 'a'; 10fd92: c6 05 ec 1f 12 00 61 movb $0x61,0x121fec <== NOT EXECUTED 10fd99: eb 3c jmp 10fdd7 <== NOT EXECUTED return 0; err_sem: rtems_barrier_delete(pipe->writeBarrier); 10fd9b: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10fd9e: ff 76 30 pushl 0x30(%esi) <== NOT EXECUTED 10fda1: e8 4a 09 00 00 call 1106f0 <== NOT EXECUTED 10fda6: 83 c4 10 add $0x10,%esp <== NOT EXECUTED err_wbar: rtems_barrier_delete(pipe->readBarrier); 10fda9: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10fdac: ff 76 2c pushl 0x2c(%esi) <== NOT EXECUTED 10fdaf: e8 3c 09 00 00 call 1106f0 <== NOT EXECUTED 10fdb4: 83 c4 10 add $0x10,%esp <== NOT EXECUTED err_rbar: free(pipe->Buffer); 10fdb7: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10fdba: ff 36 pushl (%esi) <== NOT EXECUTED 10fdbc: e8 6f 73 ff ff call 107130 <== NOT EXECUTED 10fdc1: bf fc ff ff ff mov $0xfffffffc,%edi <== NOT EXECUTED 10fdc6: 83 c4 10 add $0x10,%esp <== NOT EXECUTED err_buf: free(pipe); 10fdc9: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10fdcc: 56 push %esi <== NOT EXECUTED 10fdcd: e8 5e 73 ff ff call 107130 <== NOT EXECUTED 10fdd2: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10fdd5: eb 34 jmp 10fe0b <== NOT EXECUTED err = pipe_alloc(&pipe); if (err) goto out; } if (! PIPE_LOCK(pipe)) 10fdd7: 57 push %edi <== NOT EXECUTED 10fdd8: 6a 00 push $0x0 <== NOT EXECUTED 10fdda: 6a 00 push $0x0 <== NOT EXECUTED 10fddc: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED 10fddf: e8 48 a1 ff ff call 109f2c <== NOT EXECUTED 10fde4: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10fde7: 83 f8 01 cmp $0x1,%eax <== NOT EXECUTED 10fdea: 19 ff sbb %edi,%edi <== NOT EXECUTED 10fdec: f7 d7 not %edi <== NOT EXECUTED 10fdee: 83 e7 fc and $0xfffffffc,%edi <== NOT EXECUTED err = -EINTR; if (*pipep == NULL) { 10fdf1: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 10fdf4: 83 38 00 cmpl $0x0,(%eax) <== NOT EXECUTED 10fdf7: 75 12 jne 10fe0b <== NOT EXECUTED if (err) 10fdf9: 85 ff test %edi,%edi <== NOT EXECUTED 10fdfb: 74 09 je 10fe06 <== NOT EXECUTED pipe_free(pipe); 10fdfd: 89 d8 mov %ebx,%eax <== NOT EXECUTED 10fdff: e8 38 fd ff ff call 10fb3c <== NOT EXECUTED 10fe04: eb 05 jmp 10fe0b <== NOT EXECUTED else *pipep = pipe; 10fe06: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 10fe09: 89 18 mov %ebx,(%eax) <== NOT EXECUTED } out: rtems_semaphore_release(rtems_pipe_semaphore); 10fe0b: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10fe0e: ff 35 94 3e 12 00 pushl 0x123e94 <== NOT EXECUTED 10fe14: e8 ff a1 ff ff call 10a018 <== NOT EXECUTED pipe_control_t *pipe; uint prevCounter; int err; err = pipe_new(pipep); if (err) 10fe19: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10fe1c: 85 ff test %edi,%edi <== NOT EXECUTED 10fe1e: 0f 85 86 01 00 00 jne 10ffaa <== NOT EXECUTED return err; pipe = *pipep; 10fe24: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 10fe27: 8b 18 mov (%eax),%ebx <== NOT EXECUTED switch (LIBIO_ACCMODE(iop)) { 10fe29: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED 10fe2c: 8b 50 14 mov 0x14(%eax),%edx <== NOT EXECUTED 10fe2f: 89 d0 mov %edx,%eax <== NOT EXECUTED 10fe31: 83 e0 06 and $0x6,%eax <== NOT EXECUTED 10fe34: 83 f8 04 cmp $0x4,%eax <== NOT EXECUTED 10fe37: 0f 84 91 00 00 00 je 10fece <== NOT EXECUTED 10fe3d: 83 f8 06 cmp $0x6,%eax <== NOT EXECUTED 10fe40: 0f 84 00 01 00 00 je 10ff46 <== NOT EXECUTED 10fe46: 83 f8 02 cmp $0x2,%eax <== NOT EXECUTED 10fe49: 0f 85 39 01 00 00 jne 10ff88 <== NOT EXECUTED case LIBIO_FLAGS_READ: pipe->readerCounter ++; 10fe4f: ff 43 20 incl 0x20(%ebx) <== NOT EXECUTED if (pipe->Readers ++ == 0) 10fe52: 8b 43 10 mov 0x10(%ebx),%eax <== NOT EXECUTED 10fe55: 8d 50 01 lea 0x1(%eax),%edx <== NOT EXECUTED 10fe58: 89 53 10 mov %edx,0x10(%ebx) <== NOT EXECUTED 10fe5b: 85 c0 test %eax,%eax <== NOT EXECUTED 10fe5d: 75 11 jne 10fe70 <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); 10fe5f: 56 push %esi <== NOT EXECUTED 10fe60: 56 push %esi <== NOT EXECUTED 10fe61: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED 10fe64: 50 push %eax <== NOT EXECUTED 10fe65: ff 73 30 pushl 0x30(%ebx) <== NOT EXECUTED 10fe68: e8 e3 08 00 00 call 110750 <== NOT EXECUTED 10fe6d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED if (pipe->Writers == 0) { 10fe70: 83 7b 14 00 cmpl $0x0,0x14(%ebx) <== NOT EXECUTED 10fe74: 0f 85 0e 01 00 00 jne 10ff88 <== NOT EXECUTED /* Not an error */ if (LIBIO_NODELAY(iop)) 10fe7a: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED 10fe7d: f6 40 14 01 testb $0x1,0x14(%eax) <== NOT EXECUTED 10fe81: 0f 85 01 01 00 00 jne 10ff88 <== NOT EXECUTED break; prevCounter = pipe->writerCounter; 10fe87: 8b 73 24 mov 0x24(%ebx),%esi <== NOT EXECUTED err = -EINTR; /* Wait until a writer opens the pipe */ do { PIPE_UNLOCK(pipe); 10fe8a: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10fe8d: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED 10fe90: e8 83 a1 ff ff call 10a018 <== NOT EXECUTED if (! PIPE_READWAIT(pipe)) 10fe95: 5a pop %edx <== NOT EXECUTED 10fe96: 59 pop %ecx <== NOT EXECUTED 10fe97: 6a 00 push $0x0 <== NOT EXECUTED 10fe99: ff 73 2c pushl 0x2c(%ebx) <== NOT EXECUTED 10fe9c: e8 07 09 00 00 call 1107a8 <== NOT EXECUTED 10fea1: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10fea4: 85 c0 test %eax,%eax <== NOT EXECUTED 10fea6: 0f 85 e9 00 00 00 jne 10ff95 <== NOT EXECUTED goto out_error; if (! PIPE_LOCK(pipe)) 10feac: 50 push %eax <== NOT EXECUTED 10fead: 6a 00 push $0x0 <== NOT EXECUTED 10feaf: 6a 00 push $0x0 <== NOT EXECUTED 10feb1: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED 10feb4: e8 73 a0 ff ff call 109f2c <== NOT EXECUTED 10feb9: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10febc: 85 c0 test %eax,%eax <== NOT EXECUTED 10febe: 0f 85 d1 00 00 00 jne 10ff95 <== NOT EXECUTED goto out_error; } while (prevCounter == pipe->writerCounter); 10fec4: 3b 73 24 cmp 0x24(%ebx),%esi <== NOT EXECUTED 10fec7: 74 c1 je 10fe8a <== NOT EXECUTED 10fec9: e9 ba 00 00 00 jmp 10ff88 <== NOT EXECUTED } break; case LIBIO_FLAGS_WRITE: if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { 10fece: 83 7b 10 00 cmpl $0x0,0x10(%ebx) <== NOT EXECUTED 10fed2: 75 0f jne 10fee3 <== NOT EXECUTED 10fed4: 80 e2 01 and $0x1,%dl <== NOT EXECUTED 10fed7: 74 0a je 10fee3 <== NOT EXECUTED 10fed9: bf fa ff ff ff mov $0xfffffffa,%edi <== NOT EXECUTED 10fede: e9 b7 00 00 00 jmp 10ff9a <== NOT EXECUTED err = -ENXIO; goto out_error; } pipe->writerCounter ++; 10fee3: ff 43 24 incl 0x24(%ebx) <== NOT EXECUTED if (pipe->Writers ++ == 0) 10fee6: 8b 43 14 mov 0x14(%ebx),%eax <== NOT EXECUTED 10fee9: 8d 50 01 lea 0x1(%eax),%edx <== NOT EXECUTED 10feec: 89 53 14 mov %edx,0x14(%ebx) <== NOT EXECUTED 10feef: 85 c0 test %eax,%eax <== NOT EXECUTED 10fef1: 75 11 jne 10ff04 <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); 10fef3: 56 push %esi <== NOT EXECUTED 10fef4: 56 push %esi <== NOT EXECUTED 10fef5: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED 10fef8: 50 push %eax <== NOT EXECUTED 10fef9: ff 73 2c pushl 0x2c(%ebx) <== NOT EXECUTED 10fefc: e8 4f 08 00 00 call 110750 <== NOT EXECUTED 10ff01: 83 c4 10 add $0x10,%esp <== NOT EXECUTED if (pipe->Readers == 0) { 10ff04: 83 7b 10 00 cmpl $0x0,0x10(%ebx) <== NOT EXECUTED 10ff08: 75 7e jne 10ff88 <== NOT EXECUTED prevCounter = pipe->readerCounter; 10ff0a: 8b 73 20 mov 0x20(%ebx),%esi <== NOT EXECUTED err = -EINTR; do { PIPE_UNLOCK(pipe); 10ff0d: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10ff10: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED 10ff13: e8 00 a1 ff ff call 10a018 <== NOT EXECUTED if (! PIPE_WRITEWAIT(pipe)) 10ff18: 5a pop %edx <== NOT EXECUTED 10ff19: 59 pop %ecx <== NOT EXECUTED 10ff1a: 6a 00 push $0x0 <== NOT EXECUTED 10ff1c: ff 73 30 pushl 0x30(%ebx) <== NOT EXECUTED 10ff1f: e8 84 08 00 00 call 1107a8 <== NOT EXECUTED 10ff24: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10ff27: 85 c0 test %eax,%eax <== NOT EXECUTED 10ff29: 75 6a jne 10ff95 <== NOT EXECUTED goto out_error; if (! PIPE_LOCK(pipe)) 10ff2b: 50 push %eax <== NOT EXECUTED 10ff2c: 6a 00 push $0x0 <== NOT EXECUTED 10ff2e: 6a 00 push $0x0 <== NOT EXECUTED 10ff30: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED 10ff33: e8 f4 9f ff ff call 109f2c <== NOT EXECUTED 10ff38: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10ff3b: 85 c0 test %eax,%eax <== NOT EXECUTED 10ff3d: 75 56 jne 10ff95 <== NOT EXECUTED goto out_error; } while (prevCounter == pipe->readerCounter); 10ff3f: 3b 73 20 cmp 0x20(%ebx),%esi <== NOT EXECUTED 10ff42: 74 c9 je 10ff0d <== NOT EXECUTED 10ff44: eb 42 jmp 10ff88 <== NOT EXECUTED } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; 10ff46: ff 43 20 incl 0x20(%ebx) <== NOT EXECUTED if (pipe->Readers ++ == 0) 10ff49: 8b 43 10 mov 0x10(%ebx),%eax <== NOT EXECUTED 10ff4c: 8d 50 01 lea 0x1(%eax),%edx <== NOT EXECUTED 10ff4f: 89 53 10 mov %edx,0x10(%ebx) <== NOT EXECUTED 10ff52: 85 c0 test %eax,%eax <== NOT EXECUTED 10ff54: 75 11 jne 10ff67 <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); 10ff56: 56 push %esi <== NOT EXECUTED 10ff57: 56 push %esi <== NOT EXECUTED 10ff58: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED 10ff5b: 50 push %eax <== NOT EXECUTED 10ff5c: ff 73 30 pushl 0x30(%ebx) <== NOT EXECUTED 10ff5f: e8 ec 07 00 00 call 110750 <== NOT EXECUTED 10ff64: 83 c4 10 add $0x10,%esp <== NOT EXECUTED pipe->writerCounter ++; 10ff67: ff 43 24 incl 0x24(%ebx) <== NOT EXECUTED if (pipe->Writers ++ == 0) 10ff6a: 8b 43 14 mov 0x14(%ebx),%eax <== NOT EXECUTED 10ff6d: 8d 50 01 lea 0x1(%eax),%edx <== NOT EXECUTED 10ff70: 89 53 14 mov %edx,0x14(%ebx) <== NOT EXECUTED 10ff73: 85 c0 test %eax,%eax <== NOT EXECUTED 10ff75: 75 11 jne 10ff88 <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); 10ff77: 51 push %ecx <== NOT EXECUTED 10ff78: 51 push %ecx <== NOT EXECUTED 10ff79: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED 10ff7c: 50 push %eax <== NOT EXECUTED 10ff7d: ff 73 2c pushl 0x2c(%ebx) <== NOT EXECUTED 10ff80: e8 cb 07 00 00 call 110750 <== NOT EXECUTED 10ff85: 83 c4 10 add $0x10,%esp <== NOT EXECUTED break; } PIPE_UNLOCK(pipe); 10ff88: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10ff8b: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED 10ff8e: e8 85 a0 ff ff call 10a018 <== NOT EXECUTED 10ff93: eb 12 jmp 10ffa7 <== NOT EXECUTED return 0; 10ff95: bf fc ff ff ff mov $0xfffffffc,%edi <== NOT EXECUTED out_error: pipe_release(pipep, iop); 10ff9a: 52 push %edx <== NOT EXECUTED 10ff9b: 52 push %edx <== NOT EXECUTED 10ff9c: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED 10ff9f: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED 10ffa2: e8 d0 fb ff ff call 10fb77 <== NOT EXECUTED return err; 10ffa7: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } 10ffaa: 89 f8 mov %edi,%eax 10ffac: 8d 65 f4 lea -0xc(%ebp),%esp 10ffaf: 5b pop %ebx 10ffb0: 5e pop %esi 10ffb1: 5f pop %edi 10ffb2: c9 leave 10ffb3: 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 b4 3a 16 00 mov 0x163ab4,%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 b8 3a 16 00 cmp $0x163ab8,%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 44 31 12 00 cmp 0x123144,%eax 10802e: 73 11 jae 108041 iop = rtems_libio_iop(fd); 108030: c1 e0 06 shl $0x6,%eax 108033: 03 05 98 70 12 00 add 0x127098,%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 5a b5 00 00 call 1135a0 <__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 dc 12 12 00 jmp *0x1212dc(,%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 fd b4 00 00 call 1135a0 <__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 b4 40 12 00 incl 0x1240b4 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 84 43 12 00 03 cmpl $0x3,0x124384 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 10 25 12 00 mov 0x122510,%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 50 01 12 00 pushl 0x120150 10717e: e8 45 45 00 00 call 10b6c8 <_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 50 01 12 00 mov 0x120150,%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 de e6 11 00 push $0x11e6de <== 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 0012666c : * NOTE: this must be called with * thread dispatching disabled! */ static void free_user_env(void *venv) { 12666c: 55 push %ebp <== NOT EXECUTED 12666d: 89 e5 mov %esp,%ebp <== NOT EXECUTED 12666f: 53 push %ebx <== NOT EXECUTED 126670: 83 ec 04 sub $0x4,%esp <== NOT EXECUTED 126673: 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 126676: 81 fb cc 3a 16 00 cmp $0x163acc,%ebx <== NOT EXECUTED 12667c: 74 40 je 1266be <== NOT EXECUTED #ifdef HAVE_USERENV_REFCNT && --env->refcnt <= 0 #endif ) { rtems_filesystem_freenode( &env->current_directory); 12667e: 8b 43 10 mov 0x10(%ebx),%eax <== NOT EXECUTED 126681: 85 c0 test %eax,%eax <== NOT EXECUTED 126683: 74 13 je 126698 <== NOT EXECUTED 126685: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 126688: 85 c0 test %eax,%eax <== NOT EXECUTED 12668a: 74 0c je 126698 <== NOT EXECUTED 12668c: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12668f: 8d 53 04 lea 0x4(%ebx),%edx <== NOT EXECUTED 126692: 52 push %edx <== NOT EXECUTED 126693: ff d0 call *%eax <== NOT EXECUTED 126695: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_filesystem_freenode( &env->root_directory); 126698: 8b 43 24 mov 0x24(%ebx),%eax <== NOT EXECUTED 12669b: 85 c0 test %eax,%eax <== NOT EXECUTED 12669d: 74 13 je 1266b2 <== NOT EXECUTED 12669f: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 1266a2: 85 c0 test %eax,%eax <== NOT EXECUTED 1266a4: 74 0c je 1266b2 <== NOT EXECUTED 1266a6: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1266a9: 8d 53 18 lea 0x18(%ebx),%edx <== NOT EXECUTED 1266ac: 52 push %edx <== NOT EXECUTED 1266ad: ff d0 call *%eax <== NOT EXECUTED 1266af: 83 c4 10 add $0x10,%esp <== NOT EXECUTED free(env); 1266b2: 89 5d 08 mov %ebx,0x8(%ebp) <== NOT EXECUTED } } 1266b5: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 1266b8: c9 leave <== NOT EXECUTED && --env->refcnt <= 0 #endif ) { rtems_filesystem_freenode( &env->current_directory); rtems_filesystem_freenode( &env->root_directory); free(env); 1266b9: e9 06 51 fe ff jmp 10b7c4 <== NOT EXECUTED } } 1266be: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 1266c1: c9 leave <== NOT EXECUTED 1266c2: c3 ret <== NOT EXECUTED 0011c750 : int fstat( int fd, struct stat *sbuf ) { 11c750: 55 push %ebp 11c751: 89 e5 mov %esp,%ebp 11c753: 57 push %edi 11c754: 53 push %ebx 11c755: 8b 55 08 mov 0x8(%ebp),%edx 11c758: 8b 5d 0c mov 0xc(%ebp),%ebx /* * Check to see if we were passed a valid pointer. */ if ( !sbuf ) 11c75b: 85 db test %ebx,%ebx 11c75d: 75 0d jne 11c76c rtems_set_errno_and_return_minus_one( EFAULT ); 11c75f: e8 60 4d ff ff call 1114c4 <__errno> 11c764: c7 00 0e 00 00 00 movl $0xe,(%eax) 11c76a: eb 5d jmp 11c7c9 <== ALWAYS TAKEN /* * Now process the stat() request. */ iop = rtems_libio_iop( fd ); 11c76c: 3b 15 44 01 12 00 cmp 0x120144,%edx 11c772: 73 16 jae 11c78a 11c774: c1 e2 06 shl $0x6,%edx 11c777: 03 15 90 40 12 00 add 0x124090,%edx rtems_libio_check_fd( fd ); rtems_libio_check_is_open(iop); 11c77d: f6 42 15 01 testb $0x1,0x15(%edx) 11c781: 74 07 je 11c78a <== ALWAYS TAKEN if ( !iop->handlers ) 11c783: 8b 42 3c mov 0x3c(%edx),%eax 11c786: 85 c0 test %eax,%eax 11c788: 75 0d jne 11c797 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EBADF ); 11c78a: e8 35 4d ff ff call 1114c4 <__errno> 11c78f: c7 00 09 00 00 00 movl $0x9,(%eax) 11c795: eb 32 jmp 11c7c9 <== ALWAYS TAKEN if ( !iop->handlers->fstat_h ) 11c797: 83 78 18 00 cmpl $0x0,0x18(%eax) 11c79b: 75 0d jne 11c7aa <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); 11c79d: e8 22 4d ff ff call 1114c4 <__errno> <== NOT EXECUTED 11c7a2: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 11c7a8: eb 1f jmp 11c7c9 <== NOT EXECUTED /* * Zero out the stat structure so the various support * versions of stat don't have to. */ memset( sbuf, 0, sizeof(struct stat) ); 11c7aa: b9 11 00 00 00 mov $0x11,%ecx 11c7af: 31 c0 xor %eax,%eax 11c7b1: 89 df mov %ebx,%edi 11c7b3: f3 ab rep stos %eax,%es:(%edi) return (*iop->handlers->fstat_h)( &iop->pathinfo, sbuf ); 11c7b5: 8b 42 3c mov 0x3c(%edx),%eax 11c7b8: 89 5d 0c mov %ebx,0xc(%ebp) 11c7bb: 83 c2 18 add $0x18,%edx 11c7be: 89 55 08 mov %edx,0x8(%ebp) 11c7c1: 8b 40 18 mov 0x18(%eax),%eax } 11c7c4: 5b pop %ebx 11c7c5: 5f pop %edi 11c7c6: 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 ); 11c7c7: ff e0 jmp *%eax } 11c7c9: 83 c8 ff or $0xffffffff,%eax 11c7cc: 5b pop %ebx 11c7cd: 5f pop %edi 11c7ce: c9 leave 11c7cf: c3 ret 0012576c : #include int fsync( int fd ) { 12576c: 55 push %ebp 12576d: 89 e5 mov %esp,%ebp 12576f: 83 ec 08 sub $0x8,%esp 125772: 8b 45 08 mov 0x8(%ebp),%eax rtems_libio_t *iop; rtems_libio_check_fd( fd ); 125775: 3b 05 44 c1 15 00 cmp 0x15c144,%eax 12577b: 73 2a jae 1257a7 <== ALWAYS TAKEN iop = rtems_libio_iop( fd ); 12577d: c1 e0 06 shl $0x6,%eax 125780: 03 05 70 3a 16 00 add 0x163a70,%eax rtems_libio_check_is_open(iop); 125786: 8b 50 14 mov 0x14(%eax),%edx 125789: f6 c6 01 test $0x1,%dh 12578c: 74 19 je 1257a7 <== ALWAYS TAKEN rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 12578e: 80 e2 04 and $0x4,%dl 125791: 75 0d jne 1257a0 125793: e8 a4 3e 01 00 call 13963c <__errno> 125798: c7 00 16 00 00 00 movl $0x16,(%eax) 12579e: eb 2e jmp 1257ce <== ALWAYS TAKEN /* * Now process the fsync(). */ if ( !iop->handlers ) 1257a0: 8b 50 3c mov 0x3c(%eax),%edx 1257a3: 85 d2 test %edx,%edx 1257a5: 75 0d jne 1257b4 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EBADF ); 1257a7: e8 90 3e 01 00 call 13963c <__errno> <== NOT EXECUTED 1257ac: c7 00 09 00 00 00 movl $0x9,(%eax) <== NOT EXECUTED 1257b2: eb 1a jmp 1257ce <== NOT EXECUTED if ( !iop->handlers->fsync_h ) 1257b4: 8b 52 28 mov 0x28(%edx),%edx 1257b7: 85 d2 test %edx,%edx 1257b9: 75 0d jne 1257c8 rtems_set_errno_and_return_minus_one( ENOTSUP ); 1257bb: e8 7c 3e 01 00 call 13963c <__errno> 1257c0: c7 00 86 00 00 00 movl $0x86,(%eax) 1257c6: eb 06 jmp 1257ce <== ALWAYS TAKEN return (*iop->handlers->fsync_h)( iop ); 1257c8: 89 45 08 mov %eax,0x8(%ebp) } 1257cb: 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 ); 1257cc: ff e2 jmp *%edx } 1257ce: 83 c8 ff or $0xffffffff,%eax 1257d1: c9 leave 1257d2: c3 ret 0010dca0 : int ftruncate( int fd, off_t length ) { 10dca0: 55 push %ebp 10dca1: 89 e5 mov %esp,%ebp 10dca3: 57 push %edi 10dca4: 56 push %esi 10dca5: 53 push %ebx 10dca6: 83 ec 2c sub $0x2c,%esp 10dca9: 8b 5d 08 mov 0x8(%ebp),%ebx rtems_libio_t *iop; rtems_filesystem_location_info_t loc; rtems_libio_check_fd( fd ); 10dcac: 3b 1d 44 01 12 00 cmp 0x120144,%ebx 10dcb2: 73 0f jae 10dcc3 <== ALWAYS TAKEN iop = rtems_libio_iop( fd ); 10dcb4: c1 e3 06 shl $0x6,%ebx 10dcb7: 03 1d 90 40 12 00 add 0x124090,%ebx rtems_libio_check_is_open(iop); 10dcbd: f6 43 15 01 testb $0x1,0x15(%ebx) 10dcc1: 75 0d jne 10dcd0 <== NEVER TAKEN 10dcc3: e8 fc 37 00 00 call 1114c4 <__errno> <== NOT EXECUTED 10dcc8: c7 00 09 00 00 00 movl $0x9,(%eax) <== NOT EXECUTED 10dcce: eb 5b jmp 10dd2b <== NOT EXECUTED /* * Make sure we are not working on a directory */ loc = iop->pathinfo; 10dcd0: 8d 7d d4 lea -0x2c(%ebp),%edi 10dcd3: 8d 73 18 lea 0x18(%ebx),%esi 10dcd6: b9 05 00 00 00 mov $0x5,%ecx 10dcdb: f3 a5 rep movsl %ds:(%esi),%es:(%edi) if ( !loc.ops->node_type_h ) 10dcdd: 8b 45 e0 mov -0x20(%ebp),%eax 10dce0: 8b 40 10 mov 0x10(%eax),%eax 10dce3: 85 c0 test %eax,%eax 10dce5: 74 39 je 10dd20 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) 10dce7: 83 ec 0c sub $0xc,%esp 10dcea: 8d 55 d4 lea -0x2c(%ebp),%edx 10dced: 52 push %edx 10dcee: ff d0 call *%eax 10dcf0: 83 c4 10 add $0x10,%esp 10dcf3: 48 dec %eax 10dcf4: 75 0d jne 10dd03 rtems_set_errno_and_return_minus_one( EISDIR ); 10dcf6: e8 c9 37 00 00 call 1114c4 <__errno> 10dcfb: c7 00 15 00 00 00 movl $0x15,(%eax) 10dd01: eb 28 jmp 10dd2b <== ALWAYS TAKEN rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 10dd03: f6 43 14 04 testb $0x4,0x14(%ebx) 10dd07: 75 0d jne 10dd16 <== NEVER TAKEN 10dd09: e8 b6 37 00 00 call 1114c4 <__errno> <== NOT EXECUTED 10dd0e: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 10dd14: eb 15 jmp 10dd2b <== NOT EXECUTED if ( !iop->handlers->ftruncate_h ) 10dd16: 8b 43 3c mov 0x3c(%ebx),%eax 10dd19: 8b 40 20 mov 0x20(%eax),%eax 10dd1c: 85 c0 test %eax,%eax 10dd1e: 75 10 jne 10dd30 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); 10dd20: e8 9f 37 00 00 call 1114c4 <__errno> <== NOT EXECUTED 10dd25: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 10dd2b: 83 c8 ff or $0xffffffff,%eax 10dd2e: eb 11 jmp 10dd41 <== ALWAYS TAKEN return (*iop->handlers->ftruncate_h)( iop, length ); 10dd30: 52 push %edx 10dd31: 8b 55 0c mov 0xc(%ebp),%edx 10dd34: 89 d1 mov %edx,%ecx 10dd36: c1 f9 1f sar $0x1f,%ecx 10dd39: 51 push %ecx 10dd3a: 52 push %edx 10dd3b: 53 push %ebx 10dd3c: ff d0 call *%eax 10dd3e: 83 c4 10 add $0x10,%esp } 10dd41: 8d 65 f4 lea -0xc(%ebp),%esp 10dd44: 5b pop %ebx 10dd45: 5e pop %esi 10dd46: 5f pop %edi 10dd47: c9 leave 10dd48: c3 ret 0014f2d4 : int getdents( int dd_fd, char *dd_buf, int dd_len ) { 14f2d4: 55 push %ebp 14f2d5: 89 e5 mov %esp,%ebp 14f2d7: 57 push %edi 14f2d8: 56 push %esi 14f2d9: 53 push %ebx 14f2da: 83 ec 2c sub $0x2c,%esp 14f2dd: 8b 45 08 mov 0x8(%ebp),%eax /* * Get the file control block structure associated with the file descriptor */ iop = rtems_libio_iop( dd_fd ); 14f2e0: 31 db xor %ebx,%ebx 14f2e2: 3b 05 44 c1 15 00 cmp 0x15c144,%eax 14f2e8: 73 0b jae 14f2f5 <== ALWAYS TAKEN 14f2ea: 89 c3 mov %eax,%ebx 14f2ec: c1 e3 06 shl $0x6,%ebx 14f2ef: 03 1d 70 3a 16 00 add 0x163a70,%ebx /* * Make sure we are working on a directory */ loc = iop->pathinfo; 14f2f5: 8d 7d d4 lea -0x2c(%ebp),%edi 14f2f8: 8d 73 18 lea 0x18(%ebx),%esi 14f2fb: b9 05 00 00 00 mov $0x5,%ecx 14f300: f3 a5 rep movsl %ds:(%esi),%es:(%edi) if ( !loc.ops->node_type_h ) 14f302: 8b 45 e0 mov -0x20(%ebp),%eax 14f305: 8b 40 10 mov 0x10(%eax),%eax 14f308: 85 c0 test %eax,%eax 14f30a: 74 29 je 14f335 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) 14f30c: 83 ec 0c sub $0xc,%esp 14f30f: 8d 55 d4 lea -0x2c(%ebp),%edx 14f312: 52 push %edx 14f313: ff d0 call *%eax 14f315: 83 c4 10 add $0x10,%esp 14f318: 48 dec %eax 14f319: 74 10 je 14f32b rtems_set_errno_and_return_minus_one( ENOTDIR ); 14f31b: e8 1c a3 fe ff call 13963c <__errno> 14f320: c7 00 14 00 00 00 movl $0x14,(%eax) 14f326: 83 c8 ff or $0xffffffff,%eax 14f329: eb 24 jmp 14f34f <== ALWAYS TAKEN /* * Return the number of bytes that were actually transfered as a result * of the read attempt. */ if ( !iop->handlers->read_h ) 14f32b: 8b 43 3c mov 0x3c(%ebx),%eax 14f32e: 8b 40 08 mov 0x8(%eax),%eax 14f331: 85 c0 test %eax,%eax 14f333: 75 0d jne 14f342 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); 14f335: e8 02 a3 fe ff call 13963c <__errno> <== NOT EXECUTED 14f33a: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 14f340: eb e4 jmp 14f326 <== NOT EXECUTED return (*iop->handlers->read_h)( iop, dd_buf, dd_len ); 14f342: 52 push %edx 14f343: ff 75 10 pushl 0x10(%ebp) 14f346: ff 75 0c pushl 0xc(%ebp) 14f349: 53 push %ebx 14f34a: ff d0 call *%eax 14f34c: 83 c4 10 add $0x10,%esp } 14f34f: 8d 65 f4 lea -0xc(%ebp),%esp 14f352: 5b pop %ebx 14f353: 5e pop %esi 14f354: 5f pop %edi 14f355: c9 leave 14f356: c3 ret 001258a0 : * 4.2.1 Get Real User, Effective User, Ral Group, and Effective Group IDs, * P1003.1b-1993, p. 84 */ gid_t getgid( void ) { 1258a0: 55 push %ebp <== NOT EXECUTED 1258a1: 89 e5 mov %esp,%ebp <== NOT EXECUTED 1258a3: a1 78 e1 15 00 mov 0x15e178,%eax <== NOT EXECUTED 1258a8: 8b 40 34 mov 0x34(%eax),%eax <== NOT EXECUTED return _POSIX_types_Gid; } 1258ab: c9 leave <== NOT EXECUTED 1258ac: c3 ret <== NOT EXECUTED 00125dbe : struct group *grp, char *buffer, size_t bufsize, struct group **result ) { 125dbe: 55 push %ebp 125dbf: 89 e5 mov %esp,%ebp 125dc1: 57 push %edi 125dc2: 56 push %esi 125dc3: 53 push %ebx 125dc4: 83 ec 1c sub $0x1c,%esp 125dc7: 89 c7 mov %eax,%edi 125dc9: 89 55 e4 mov %edx,-0x1c(%ebp) 125dcc: 89 ce mov %ecx,%esi FILE *fp; int match; init_etc_passwd_group(); 125dce: e8 df fe ff ff call 125cb2 <== ALWAYS TAKEN if ((fp = fopen("/etc/group", "r")) == NULL) { 125dd3: 53 push %ebx 125dd4: 53 push %ebx 125dd5: 68 a3 28 15 00 push $0x1528a3 125dda: 68 65 ff 14 00 push $0x14ff65 125ddf: e8 94 41 01 00 call 139f78 125de4: 89 c3 mov %eax,%ebx 125de6: 83 c4 10 add $0x10,%esp 125de9: 85 c0 test %eax,%eax 125deb: 75 10 jne 125dfd <== NEVER TAKEN errno = EINVAL; 125ded: e8 4a 38 01 00 call 13963c <__errno> <== NOT EXECUTED 125df2: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 125df8: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED return -1; 125dfb: eb 6b jmp 125e68 <== NOT EXECUTED } for(;;) { if (!scangr(fp, grp, buffer, bufsize)) { 125dfd: 83 ec 0c sub $0xc,%esp 125e00: ff 75 0c pushl 0xc(%ebp) 125e03: 8b 4d 08 mov 0x8(%ebp),%ecx 125e06: 89 f2 mov %esi,%edx 125e08: 89 d8 mov %ebx,%eax 125e0a: e8 39 fc ff ff call 125a48 <== ALWAYS TAKEN 125e0f: 83 c4 10 add $0x10,%esp 125e12: 85 c0 test %eax,%eax 125e14: 75 19 jne 125e2f <== NEVER TAKEN errno = EINVAL; 125e16: e8 21 38 01 00 call 13963c <__errno> <== NOT EXECUTED 125e1b: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED fclose(fp); 125e21: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 125e24: 53 push %ebx <== NOT EXECUTED 125e25: e8 5e 39 01 00 call 139788 <== NOT EXECUTED 125e2a: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 125e2d: eb 36 jmp 125e65 <== NOT EXECUTED return -1; } if (name) { 125e2f: 85 ff test %edi,%edi 125e31: 74 11 je 125e44 <== ALWAYS TAKEN match = (strcmp(grp->gr_name, name) == 0); 125e33: 51 push %ecx 125e34: 51 push %ecx 125e35: 57 push %edi 125e36: ff 36 pushl (%esi) 125e38: e8 ff 8c 01 00 call 13eb3c 125e3d: 83 c4 10 add $0x10,%esp 125e40: 85 c0 test %eax,%eax 125e42: eb 07 jmp 125e4b <== ALWAYS TAKEN } else { match = (grp->gr_gid == gid); 125e44: 0f b7 46 08 movzwl 0x8(%esi),%eax <== NOT EXECUTED 125e48: 3b 45 e4 cmp -0x1c(%ebp),%eax <== NOT EXECUTED 125e4b: 0f 94 c0 sete %al 125e4e: 0f b6 c0 movzbl %al,%eax } if (match) { 125e51: 85 c0 test %eax,%eax 125e53: 74 a8 je 125dfd fclose(fp); 125e55: 83 ec 0c sub $0xc,%esp 125e58: 53 push %ebx 125e59: e8 2a 39 01 00 call 139788 *result = grp; 125e5e: 8b 45 10 mov 0x10(%ebp),%eax 125e61: 89 30 mov %esi,(%eax) 125e63: 31 c0 xor %eax,%eax return 0; 125e65: 83 c4 10 add $0x10,%esp } } fclose(fp); errno = EINVAL; return -1; } 125e68: 8d 65 f4 lea -0xc(%ebp),%esp 125e6b: 5b pop %ebx 125e6c: 5e pop %esi 125e6d: 5f pop %edi 125e6e: c9 leave 125e6f: c3 ret 00125b47 : return NULL; return p; } struct group *getgrent(void) { 125b47: 55 push %ebp <== NOT EXECUTED 125b48: 89 e5 mov %esp,%ebp <== NOT EXECUTED 125b4a: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED if (group_fp == NULL) 125b4d: a1 a4 36 16 00 mov 0x1636a4,%eax <== NOT EXECUTED 125b52: 85 c0 test %eax,%eax <== NOT EXECUTED 125b54: 74 25 je 125b7b <== NOT EXECUTED return NULL; if (!scangr(group_fp, &grent, grbuf, sizeof grbuf)) 125b56: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 125b59: 68 c8 00 00 00 push $0xc8 <== NOT EXECUTED 125b5e: b9 a8 36 16 00 mov $0x1636a8,%ecx <== NOT EXECUTED 125b63: ba 70 37 16 00 mov $0x163770,%edx <== NOT EXECUTED 125b68: e8 db fe ff ff call 125a48 <== NOT EXECUTED 125b6d: 89 c2 mov %eax,%edx <== NOT EXECUTED 125b6f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 125b72: b8 70 37 16 00 mov $0x163770,%eax <== NOT EXECUTED 125b77: 85 d2 test %edx,%edx <== NOT EXECUTED 125b79: 75 02 jne 125b7d <== NOT EXECUTED 125b7b: 31 c0 xor %eax,%eax <== NOT EXECUTED return NULL; return &grent; } 125b7d: c9 leave <== NOT EXECUTED 125b7e: c3 ret <== NOT EXECUTED 00125e9a : } struct group *getgrgid( gid_t gid ) { 125e9a: 55 push %ebp <== NOT EXECUTED 125e9b: 89 e5 mov %esp,%ebp <== NOT EXECUTED 125e9d: 83 ec 24 sub $0x24,%esp <== NOT EXECUTED struct group *p; if(getgrgid_r(gid, &grent, grbuf, sizeof grbuf, &p)) 125ea0: 8d 45 f4 lea -0xc(%ebp),%eax <== NOT EXECUTED 125ea3: 50 push %eax <== NOT EXECUTED 125ea4: 68 c8 00 00 00 push $0xc8 <== NOT EXECUTED 125ea9: 68 a8 36 16 00 push $0x1636a8 <== NOT EXECUTED 125eae: 68 70 37 16 00 push $0x163770 <== NOT EXECUTED 125eb3: 0f b7 45 08 movzwl 0x8(%ebp),%eax <== NOT EXECUTED 125eb7: 50 push %eax <== NOT EXECUTED 125eb8: e8 b3 ff ff ff call 125e70 <== NOT EXECUTED 125ebd: 89 c2 mov %eax,%edx <== NOT EXECUTED 125ebf: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 125ec2: 31 c0 xor %eax,%eax <== NOT EXECUTED 125ec4: 85 d2 test %edx,%edx <== NOT EXECUTED 125ec6: 75 03 jne 125ecb <== NOT EXECUTED return NULL; return p; 125ec8: 8b 45 f4 mov -0xc(%ebp),%eax <== NOT EXECUTED } 125ecb: c9 leave <== NOT EXECUTED 125ecc: c3 ret <== NOT EXECUTED 00125e70 : struct group *grp, char *buffer, size_t bufsize, struct group **result ) { 125e70: 55 push %ebp <== NOT EXECUTED 125e71: 89 e5 mov %esp,%ebp <== NOT EXECUTED 125e73: 53 push %ebx <== NOT EXECUTED 125e74: 83 ec 04 sub $0x4,%esp <== NOT EXECUTED 125e77: 8b 4d 0c mov 0xc(%ebp),%ecx <== NOT EXECUTED 125e7a: 8b 45 10 mov 0x10(%ebp),%eax <== NOT EXECUTED return getgr_r(NULL, gid, grp, buffer, bufsize, result); 125e7d: 0f b7 55 08 movzwl 0x8(%ebp),%edx <== NOT EXECUTED 125e81: 8b 5d 18 mov 0x18(%ebp),%ebx <== NOT EXECUTED 125e84: 89 5d 10 mov %ebx,0x10(%ebp) <== NOT EXECUTED 125e87: 8b 5d 14 mov 0x14(%ebp),%ebx <== NOT EXECUTED 125e8a: 89 5d 0c mov %ebx,0xc(%ebp) <== NOT EXECUTED 125e8d: 89 45 08 mov %eax,0x8(%ebp) <== NOT EXECUTED 125e90: 31 c0 xor %eax,%eax <== NOT EXECUTED } 125e92: 5b pop %ebx <== NOT EXECUTED 125e93: 5b pop %ebx <== NOT EXECUTED 125e94: c9 leave <== NOT EXECUTED char *buffer, size_t bufsize, struct group **result ) { return getgr_r(NULL, gid, grp, buffer, bufsize, result); 125e95: e9 24 ff ff ff jmp 125dbe <== NOT EXECUTED 00125ef6 : } struct group *getgrnam( const char *name ) { 125ef6: 55 push %ebp 125ef7: 89 e5 mov %esp,%ebp 125ef9: 83 ec 24 sub $0x24,%esp struct group *p; if(getgrnam_r(name, &grent, grbuf, sizeof grbuf, &p)) 125efc: 8d 45 f4 lea -0xc(%ebp),%eax 125eff: 50 push %eax 125f00: 68 c8 00 00 00 push $0xc8 125f05: 68 a8 36 16 00 push $0x1636a8 125f0a: 68 70 37 16 00 push $0x163770 125f0f: ff 75 08 pushl 0x8(%ebp) 125f12: e8 b6 ff ff ff call 125ecd <== ALWAYS TAKEN 125f17: 89 c2 mov %eax,%edx 125f19: 83 c4 20 add $0x20,%esp 125f1c: 31 c0 xor %eax,%eax 125f1e: 85 d2 test %edx,%edx 125f20: 75 03 jne 125f25 <== ALWAYS TAKEN return NULL; return p; 125f22: 8b 45 f4 mov -0xc(%ebp),%eax } 125f25: c9 leave 125f26: c3 ret 00125ecd : struct group *grp, char *buffer, size_t bufsize, struct group **result ) { 125ecd: 55 push %ebp 125ece: 89 e5 mov %esp,%ebp 125ed0: 53 push %ebx 125ed1: 83 ec 04 sub $0x4,%esp 125ed4: 8b 45 08 mov 0x8(%ebp),%eax 125ed7: 8b 4d 0c mov 0xc(%ebp),%ecx 125eda: 8b 55 10 mov 0x10(%ebp),%edx return getgr_r(name, 0, grp, buffer, bufsize, result); 125edd: 8b 5d 18 mov 0x18(%ebp),%ebx 125ee0: 89 5d 10 mov %ebx,0x10(%ebp) 125ee3: 8b 5d 14 mov 0x14(%ebp),%ebx 125ee6: 89 5d 0c mov %ebx,0xc(%ebp) 125ee9: 89 55 08 mov %edx,0x8(%ebp) 125eec: 31 d2 xor %edx,%edx } 125eee: 5b pop %ebx 125eef: 5b pop %ebx 125ef0: c9 leave char *buffer, size_t bufsize, struct group **result ) { return getgr_r(name, 0, grp, buffer, bufsize, result); 125ef1: e9 c8 fe ff ff jmp 125dbe <== ALWAYS TAKEN 00109b78 : int getitimer( int which, struct itimerval *value ) { 109b78: 55 push %ebp 109b79: 89 e5 mov %esp,%ebp 109b7b: 83 ec 08 sub $0x8,%esp if ( !value ) 109b7e: 83 7d 0c 00 cmpl $0x0,0xc(%ebp) 109b82: 75 0d jne 109b91 rtems_set_errno_and_return_minus_one( EFAULT ); 109b84: e8 a3 7f 00 00 call 111b2c <__errno> 109b89: c7 00 0e 00 00 00 movl $0xe,(%eax) 109b8f: eb 1e jmp 109baf <== ALWAYS TAKEN switch ( which ) { 109b91: 83 7d 08 02 cmpl $0x2,0x8(%ebp) 109b95: 77 0d ja 109ba4 case ITIMER_REAL: case ITIMER_VIRTUAL: case ITIMER_PROF: rtems_set_errno_and_return_minus_one( ENOSYS ); 109b97: e8 90 7f 00 00 call 111b2c <__errno> 109b9c: c7 00 58 00 00 00 movl $0x58,(%eax) 109ba2: eb 0b jmp 109baf <== ALWAYS TAKEN default: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 109ba4: e8 83 7f 00 00 call 111b2c <__errno> 109ba9: c7 00 16 00 00 00 movl $0x16,(%eax) } 109baf: 83 c8 ff or $0xffffffff,%eax 109bb2: c9 leave 109bb3: c3 ret 00125f62 : struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) { 125f62: 55 push %ebp 125f63: 89 e5 mov %esp,%ebp 125f65: 57 push %edi 125f66: 56 push %esi 125f67: 53 push %ebx 125f68: 83 ec 1c sub $0x1c,%esp 125f6b: 89 c7 mov %eax,%edi 125f6d: 89 55 e4 mov %edx,-0x1c(%ebp) 125f70: 89 ce mov %ecx,%esi FILE *fp; int match; init_etc_passwd_group(); 125f72: e8 3b fd ff ff call 125cb2 <== ALWAYS TAKEN if ((fp = fopen("/etc/passwd", "r")) == NULL) { 125f77: 51 push %ecx 125f78: 51 push %ecx 125f79: 68 a3 28 15 00 push $0x1528a3 125f7e: 68 20 ff 14 00 push $0x14ff20 125f83: e8 f0 3f 01 00 call 139f78 125f88: 89 c3 mov %eax,%ebx 125f8a: 83 c4 10 add $0x10,%esp 125f8d: 85 c0 test %eax,%eax 125f8f: 75 10 jne 125fa1 <== NEVER TAKEN errno = EINVAL; 125f91: e8 a6 36 01 00 call 13963c <__errno> <== NOT EXECUTED 125f96: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 125f9c: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED return -1; 125f9f: eb 6b jmp 12600c <== NOT EXECUTED } for(;;) { if (!scanpw(fp, pwd, buffer, bufsize)) { 125fa1: 83 ec 0c sub $0xc,%esp 125fa4: ff 75 0c pushl 0xc(%ebp) 125fa7: 8b 4d 08 mov 0x8(%ebp),%ecx 125faa: 89 f2 mov %esi,%edx 125fac: 89 d8 mov %ebx,%eax 125fae: e8 cc fb ff ff call 125b7f <== ALWAYS TAKEN 125fb3: 83 c4 10 add $0x10,%esp 125fb6: 85 c0 test %eax,%eax 125fb8: 75 19 jne 125fd3 <== NEVER TAKEN errno = EINVAL; 125fba: e8 7d 36 01 00 call 13963c <__errno> <== NOT EXECUTED 125fbf: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED fclose(fp); 125fc5: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 125fc8: 53 push %ebx <== NOT EXECUTED 125fc9: e8 ba 37 01 00 call 139788 <== NOT EXECUTED 125fce: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 125fd1: eb 36 jmp 126009 <== NOT EXECUTED return -1; } if (name) { 125fd3: 85 ff test %edi,%edi 125fd5: 74 11 je 125fe8 <== ALWAYS TAKEN match = (strcmp(pwd->pw_name, name) == 0); 125fd7: 52 push %edx 125fd8: 52 push %edx 125fd9: 57 push %edi 125fda: ff 36 pushl (%esi) 125fdc: e8 5b 8b 01 00 call 13eb3c 125fe1: 83 c4 10 add $0x10,%esp 125fe4: 85 c0 test %eax,%eax 125fe6: eb 07 jmp 125fef <== ALWAYS TAKEN } else { match = (pwd->pw_uid == uid); 125fe8: 0f b7 46 08 movzwl 0x8(%esi),%eax <== NOT EXECUTED 125fec: 3b 45 e4 cmp -0x1c(%ebp),%eax <== NOT EXECUTED 125fef: 0f 94 c0 sete %al 125ff2: 0f b6 c0 movzbl %al,%eax } if (match) { 125ff5: 85 c0 test %eax,%eax 125ff7: 74 a8 je 125fa1 fclose(fp); 125ff9: 83 ec 0c sub $0xc,%esp 125ffc: 53 push %ebx 125ffd: e8 86 37 01 00 call 139788 *result = pwd; 126002: 8b 45 10 mov 0x10(%ebp),%eax 126005: 89 30 mov %esi,(%eax) 126007: 31 c0 xor %eax,%eax return 0; 126009: 83 c4 10 add $0x10,%esp } } fclose(fp); errno = EINVAL; return -1; } 12600c: 8d 65 f4 lea -0xc(%ebp),%esp 12600f: 5b pop %ebx 126010: 5e pop %esi 126011: 5f pop %edi 126012: c9 leave 126013: c3 ret 00125c7a : return NULL; return p; } struct passwd *getpwent(void) { 125c7a: 55 push %ebp <== NOT EXECUTED 125c7b: 89 e5 mov %esp,%ebp <== NOT EXECUTED 125c7d: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED if (passwd_fp == NULL) 125c80: a1 bc 35 16 00 mov 0x1635bc,%eax <== NOT EXECUTED 125c85: 85 c0 test %eax,%eax <== NOT EXECUTED 125c87: 74 25 je 125cae <== NOT EXECUTED return NULL; if (!scanpw(passwd_fp, &pwent, pwbuf, sizeof pwbuf)) 125c89: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 125c8c: 68 c8 00 00 00 push $0xc8 <== NOT EXECUTED 125c91: b9 c0 35 16 00 mov $0x1635c0,%ecx <== NOT EXECUTED 125c96: ba 88 36 16 00 mov $0x163688,%edx <== NOT EXECUTED 125c9b: e8 df fe ff ff call 125b7f <== NOT EXECUTED 125ca0: 89 c2 mov %eax,%edx <== NOT EXECUTED 125ca2: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 125ca5: b8 88 36 16 00 mov $0x163688,%eax <== NOT EXECUTED 125caa: 85 d2 test %edx,%edx <== NOT EXECUTED 125cac: 75 02 jne 125cb0 <== NOT EXECUTED 125cae: 31 c0 xor %eax,%eax <== NOT EXECUTED return NULL; return &pwent; } 125cb0: c9 leave <== NOT EXECUTED 125cb1: c3 ret <== NOT EXECUTED 0012609a : } struct passwd *getpwnam( const char *name ) { 12609a: 55 push %ebp 12609b: 89 e5 mov %esp,%ebp 12609d: 83 ec 24 sub $0x24,%esp struct passwd *p; if(getpwnam_r(name, &pwent, pwbuf, sizeof pwbuf, &p)) 1260a0: 8d 45 f4 lea -0xc(%ebp),%eax 1260a3: 50 push %eax 1260a4: 68 c8 00 00 00 push $0xc8 1260a9: 68 c0 35 16 00 push $0x1635c0 1260ae: 68 88 36 16 00 push $0x163688 1260b3: ff 75 08 pushl 0x8(%ebp) 1260b6: e8 b6 ff ff ff call 126071 <== ALWAYS TAKEN 1260bb: 89 c2 mov %eax,%edx 1260bd: 83 c4 20 add $0x20,%esp 1260c0: 31 c0 xor %eax,%eax 1260c2: 85 d2 test %edx,%edx 1260c4: 75 03 jne 1260c9 <== ALWAYS TAKEN return NULL; return p; 1260c6: 8b 45 f4 mov -0xc(%ebp),%eax } 1260c9: c9 leave 1260ca: c3 ret 00126071 : struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) { 126071: 55 push %ebp 126072: 89 e5 mov %esp,%ebp 126074: 53 push %ebx 126075: 83 ec 04 sub $0x4,%esp 126078: 8b 45 08 mov 0x8(%ebp),%eax 12607b: 8b 4d 0c mov 0xc(%ebp),%ecx 12607e: 8b 55 10 mov 0x10(%ebp),%edx return getpw_r(name, 0, pwd, buffer, bufsize, result); 126081: 8b 5d 18 mov 0x18(%ebp),%ebx 126084: 89 5d 10 mov %ebx,0x10(%ebp) 126087: 8b 5d 14 mov 0x14(%ebp),%ebx 12608a: 89 5d 0c mov %ebx,0xc(%ebp) 12608d: 89 55 08 mov %edx,0x8(%ebp) 126090: 31 d2 xor %edx,%edx } 126092: 5b pop %ebx 126093: 5b pop %ebx 126094: c9 leave char *buffer, size_t bufsize, struct passwd **result ) { return getpw_r(name, 0, pwd, buffer, bufsize, result); 126095: e9 c8 fe ff ff jmp 125f62 <== ALWAYS TAKEN 0012603e : } struct passwd *getpwuid( uid_t uid ) { 12603e: 55 push %ebp <== NOT EXECUTED 12603f: 89 e5 mov %esp,%ebp <== NOT EXECUTED 126041: 83 ec 24 sub $0x24,%esp <== NOT EXECUTED struct passwd *p; if(getpwuid_r(uid, &pwent, pwbuf, sizeof pwbuf, &p)) 126044: 8d 45 f4 lea -0xc(%ebp),%eax <== NOT EXECUTED 126047: 50 push %eax <== NOT EXECUTED 126048: 68 c8 00 00 00 push $0xc8 <== NOT EXECUTED 12604d: 68 c0 35 16 00 push $0x1635c0 <== NOT EXECUTED 126052: 68 88 36 16 00 push $0x163688 <== NOT EXECUTED 126057: 0f b7 45 08 movzwl 0x8(%ebp),%eax <== NOT EXECUTED 12605b: 50 push %eax <== NOT EXECUTED 12605c: e8 b3 ff ff ff call 126014 <== NOT EXECUTED 126061: 89 c2 mov %eax,%edx <== NOT EXECUTED 126063: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 126066: 31 c0 xor %eax,%eax <== NOT EXECUTED 126068: 85 d2 test %edx,%edx <== NOT EXECUTED 12606a: 75 03 jne 12606f <== NOT EXECUTED return NULL; return p; 12606c: 8b 45 f4 mov -0xc(%ebp),%eax <== NOT EXECUTED } 12606f: c9 leave <== NOT EXECUTED 126070: c3 ret <== NOT EXECUTED 00126014 : struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) { 126014: 55 push %ebp <== NOT EXECUTED 126015: 89 e5 mov %esp,%ebp <== NOT EXECUTED 126017: 53 push %ebx <== NOT EXECUTED 126018: 83 ec 04 sub $0x4,%esp <== NOT EXECUTED 12601b: 8b 4d 0c mov 0xc(%ebp),%ecx <== NOT EXECUTED 12601e: 8b 45 10 mov 0x10(%ebp),%eax <== NOT EXECUTED return getpw_r(NULL, uid, pwd, buffer, bufsize, result); 126021: 0f b7 55 08 movzwl 0x8(%ebp),%edx <== NOT EXECUTED 126025: 8b 5d 18 mov 0x18(%ebp),%ebx <== NOT EXECUTED 126028: 89 5d 10 mov %ebx,0x10(%ebp) <== NOT EXECUTED 12602b: 8b 5d 14 mov 0x14(%ebp),%ebx <== NOT EXECUTED 12602e: 89 5d 0c mov %ebx,0xc(%ebp) <== NOT EXECUTED 126031: 89 45 08 mov %eax,0x8(%ebp) <== NOT EXECUTED 126034: 31 c0 xor %eax,%eax <== NOT EXECUTED } 126036: 5b pop %ebx <== NOT EXECUTED 126037: 5b pop %ebx <== NOT EXECUTED 126038: c9 leave <== NOT EXECUTED char *buffer, size_t bufsize, struct passwd **result ) { return getpw_r(NULL, uid, pwd, buffer, bufsize, result); 126039: e9 24 ff ff ff jmp 125f62 <== NOT EXECUTED 0010dd6c : */ int gettimeofday( struct timeval *tp, void * __tz __attribute__((unused)) ) { 10dd6c: 55 push %ebp 10dd6d: 89 e5 mov %esp,%ebp 10dd6f: 56 push %esi 10dd70: 53 push %ebx 10dd71: 83 ec 10 sub $0x10,%esp 10dd74: 8b 5d 08 mov 0x8(%ebp),%ebx /* struct timezone* tzp = (struct timezone*) __tz; */ if ( !tp ) { 10dd77: 85 db test %ebx,%ebx 10dd79: 75 10 jne 10dd8b <== NEVER TAKEN errno = EFAULT; 10dd7b: e8 44 37 00 00 call 1114c4 <__errno> <== NOT EXECUTED 10dd80: c7 00 0e 00 00 00 movl $0xe,(%eax) <== NOT EXECUTED 10dd86: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED return -1; 10dd89: eb 29 jmp 10ddb4 <== NOT EXECUTED { ISR_Level level; struct timespec now; suseconds_t useconds; _ISR_Disable(level); 10dd8b: 9c pushf 10dd8c: fa cli 10dd8d: 5e pop %esi _TOD_Get( &now ); 10dd8e: 83 ec 0c sub $0xc,%esp 10dd91: 8d 45 f0 lea -0x10(%ebp),%eax 10dd94: 50 push %eax 10dd95: e8 d6 0f 00 00 call 10ed70 <_TOD_Get> <== ALWAYS TAKEN _ISR_Enable(level); 10dd9a: 56 push %esi 10dd9b: 9d popf useconds = (suseconds_t)now.tv_nsec; 10dd9c: 8b 45 f4 mov -0xc(%ebp),%eax useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND; time->tv_sec = now.tv_sec; 10dd9f: 8b 55 f0 mov -0x10(%ebp),%edx 10dda2: 89 13 mov %edx,(%ebx) time->tv_usec = useconds; 10dda4: b9 e8 03 00 00 mov $0x3e8,%ecx 10dda9: 99 cltd 10ddaa: f7 f9 idiv %ecx 10ddac: 89 43 04 mov %eax,0x4(%ebx) 10ddaf: 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; 10ddb1: 83 c4 10 add $0x10,%esp } 10ddb4: 8d 65 f8 lea -0x8(%ebp),%esp 10ddb7: 5b pop %ebx 10ddb8: 5e pop %esi 10ddb9: c9 leave 10ddba: 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 e1 15 00 mov 0x15e178,%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 00114ce3 : int imfs_dir_fstat( rtems_filesystem_location_info_t *loc, struct stat *buf ) { 114ce3: 55 push %ebp 114ce4: 89 e5 mov %esp,%ebp 114ce6: 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; 114ce9: 8b 55 08 mov 0x8(%ebp),%edx 114cec: 8b 12 mov (%edx),%edx buf->st_dev = 0ll; 114cee: c7 00 00 00 00 00 movl $0x0,(%eax) 114cf4: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax) buf->st_ino = the_jnode->st_ino; 114cfb: 8b 4a 38 mov 0x38(%edx),%ecx 114cfe: 89 48 08 mov %ecx,0x8(%eax) buf->st_mode = the_jnode->st_mode; 114d01: 8b 4a 30 mov 0x30(%edx),%ecx 114d04: 89 48 0c mov %ecx,0xc(%eax) buf->st_nlink = the_jnode->st_nlink; 114d07: 8b 4a 34 mov 0x34(%edx),%ecx 114d0a: 66 89 48 10 mov %cx,0x10(%eax) buf->st_uid = the_jnode->st_uid; 114d0e: 8b 4a 3c mov 0x3c(%edx),%ecx 114d11: 66 89 48 12 mov %cx,0x12(%eax) buf->st_gid = the_jnode->st_gid; 114d15: 66 8b 4a 3e mov 0x3e(%edx),%cx 114d19: 66 89 48 14 mov %cx,0x14(%eax) buf->st_rdev = 0ll; 114d1d: c7 40 18 00 00 00 00 movl $0x0,0x18(%eax) 114d24: c7 40 1c 00 00 00 00 movl $0x0,0x1c(%eax) buf->st_blksize = 0; 114d2b: c7 40 3c 00 00 00 00 movl $0x0,0x3c(%eax) buf->st_blocks = 0; 114d32: c7 40 40 00 00 00 00 movl $0x0,0x40(%eax) buf->st_atime = the_jnode->stat_atime; 114d39: 8b 4a 40 mov 0x40(%edx),%ecx 114d3c: 89 48 24 mov %ecx,0x24(%eax) buf->st_mtime = the_jnode->stat_mtime; 114d3f: 8b 4a 44 mov 0x44(%edx),%ecx 114d42: 89 48 2c mov %ecx,0x2c(%eax) buf->st_ctime = the_jnode->stat_ctime; 114d45: 8b 4a 48 mov 0x48(%edx),%ecx 114d48: 89 48 34 mov %ecx,0x34(%eax) buf->st_size = 0; 114d4b: 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 ; 114d52: 8b 4a 50 mov 0x50(%edx),%ecx 114d55: 83 c2 54 add $0x54,%edx 114d58: eb 09 jmp 114d63 <== ALWAYS TAKEN !rtems_chain_is_tail( the_chain, the_node ) ; the_node = the_node->next ) { buf->st_size = buf->st_size + sizeof( struct dirent ); 114d5a: 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 ) { 114d61: 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 ; 114d63: 39 d1 cmp %edx,%ecx 114d65: 75 f3 jne 114d5a buf->st_size = buf->st_size + sizeof( struct dirent ); } return 0; } 114d67: 31 c0 xor %eax,%eax 114d69: c9 leave 114d6a: c3 ret 00114d6b : rtems_off64_t imfs_dir_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { 114d6b: 55 push %ebp 114d6c: 89 e5 mov %esp,%ebp 114d6e: 57 push %edi 114d6f: 56 push %esi 114d70: 53 push %ebx 114d71: 83 ec 1c sub $0x1c,%esp 114d74: 8b 5d 08 mov 0x8(%ebp),%ebx switch( whence ) { 114d77: 83 7d 14 01 cmpl $0x1,0x14(%ebp) 114d7b: 77 3c ja 114db9 case SEEK_SET: /* absolute move from the start of the file */ case SEEK_CUR: /* relative move */ iop->offset = (iop->offset/sizeof(struct dirent)) * 114d7d: 6a 00 push $0x0 114d7f: 68 0c 01 00 00 push $0x10c 114d84: ff 73 10 pushl 0x10(%ebx) 114d87: ff 73 0c pushl 0xc(%ebx) 114d8a: e8 3d be 00 00 call 120bcc <__divdi3> 114d8f: 83 c4 10 add $0x10,%esp 114d92: 69 f2 0c 01 00 00 imul $0x10c,%edx,%esi 114d98: b9 0c 01 00 00 mov $0x10c,%ecx 114d9d: f7 e1 mul %ecx 114d9f: 89 45 e0 mov %eax,-0x20(%ebp) 114da2: 01 f2 add %esi,%edx 114da4: 89 55 e4 mov %edx,-0x1c(%ebp) 114da7: 8b 45 e0 mov -0x20(%ebp),%eax 114daa: 8b 55 e4 mov -0x1c(%ebp),%edx 114dad: 89 43 0c mov %eax,0xc(%ebx) 114db0: 89 53 10 mov %edx,0x10(%ebx) 114db3: 31 c0 xor %eax,%eax 114db5: 31 d2 xor %edx,%edx default: rtems_set_errno_and_return_minus_one( EINVAL ); break; } return 0; 114db7: eb 10 jmp 114dc9 <== 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 ); 114db9: e8 02 0e 00 00 call 115bc0 <__errno> 114dbe: c7 00 16 00 00 00 movl $0x16,(%eax) 114dc4: 83 c8 ff or $0xffffffff,%eax 114dc7: 89 c2 mov %eax,%edx break; } return 0; } 114dc9: 8d 65 f4 lea -0xc(%ebp),%esp 114dcc: 5b pop %ebx 114dcd: 5e pop %esi 114dce: 5f pop %edi 114dcf: c9 leave 114dd0: c3 ret 00114cb8 : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 114cb8: 55 push %ebp 114cb9: 89 e5 mov %esp,%ebp 114cbb: 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; 114cbe: 8b 4a 38 mov 0x38(%edx),%ecx 114cc1: 83 c8 ff or $0xffffffff,%eax 114cc4: 83 79 4c 01 cmpl $0x1,0x4c(%ecx) 114cc8: 75 10 jne 114cda <== ALWAYS TAKEN if ( the_jnode->type != IMFS_DIRECTORY ) return -1; /* It wasn't a directory --> return error */ iop->offset = 0; 114cca: c7 42 0c 00 00 00 00 movl $0x0,0xc(%edx) 114cd1: c7 42 10 00 00 00 00 movl $0x0,0x10(%edx) 114cd8: 31 c0 xor %eax,%eax return 0; } 114cda: c9 leave 114cdb: c3 ret 00114e83 : ssize_t imfs_dir_read( rtems_libio_t *iop, void *buffer, size_t count ) { 114e83: 55 push %ebp 114e84: 89 e5 mov %esp,%ebp 114e86: 57 push %edi 114e87: 56 push %esi 114e88: 53 push %ebx 114e89: 81 ec 4c 01 00 00 sub $0x14c,%esp 114e8f: 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; 114e92: 8b 4d 08 mov 0x8(%ebp),%ecx 114e95: 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)); 114e98: 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; 114e9b: 83 c2 54 add $0x54,%edx 114e9e: 89 95 cc fe ff ff mov %edx,-0x134(%ebp) the_chain = &the_jnode->info.directory.Entries; if ( rtems_chain_is_empty( the_chain ) ) 114ea4: 31 d2 xor %edx,%edx 114ea6: 3b 9d cc fe ff ff cmp -0x134(%ebp),%ebx 114eac: 0f 84 fb 00 00 00 je 114fad /* Move to the first of the desired directory entries */ the_node = the_chain->first; bytes_transferred = 0; first_entry = iop->offset; 114eb2: 8b 51 0c mov 0xc(%ecx),%edx 114eb5: 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); 114ebb: b9 0c 01 00 00 mov $0x10c,%ecx 114ec0: 31 d2 xor %edx,%edx 114ec2: f7 f1 div %ecx 114ec4: 69 c0 0c 01 00 00 imul $0x10c,%eax,%eax 114eca: 03 85 c8 fe ff ff add -0x138(%ebp),%eax 114ed0: 89 85 c4 fe ff ff mov %eax,-0x13c(%ebp) 114ed6: c7 85 d4 fe ff ff 00 movl $0x0,-0x12c(%ebp) 114edd: 00 00 00 114ee0: 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 ); 114ee2: 8d 8d dc fe ff ff lea -0x124(%ebp),%ecx 114ee8: 89 8d b4 fe ff ff mov %ecx,-0x14c(%ebp) 114eee: 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 ( 114ef4: e9 9c 00 00 00 jmp 114f95 <== 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 ) ){ 114ef9: 3b 9d cc fe ff ff cmp -0x134(%ebp),%ebx 114eff: 0f 84 a2 00 00 00 je 114fa7 /* entry in the read */ return bytes_transferred; /* Indicate that there are no more */ /* entries to return */ } if( current_entry >= first_entry ) { 114f05: 8b 85 c8 fe ff ff mov -0x138(%ebp),%eax 114f0b: 39 85 d4 fe ff ff cmp %eax,-0x12c(%ebp) 114f11: 7c 76 jl 114f89 /* Move the entry to the return buffer */ tmp_dirent.d_off = current_entry; 114f13: 8b 95 d4 fe ff ff mov -0x12c(%ebp),%edx 114f19: 89 95 e0 fe ff ff mov %edx,-0x120(%ebp) tmp_dirent.d_reclen = sizeof( struct dirent ); 114f1f: 66 c7 85 e4 fe ff ff movw $0x10c,-0x11c(%ebp) 114f26: 0c 01 the_jnode = (IMFS_jnode_t *) the_node; tmp_dirent.d_ino = the_jnode->st_ino; 114f28: 8b 43 38 mov 0x38(%ebx),%eax 114f2b: 89 85 dc fe ff ff mov %eax,-0x124(%ebp) tmp_dirent.d_namlen = strlen( the_jnode->name ); 114f31: 8d 53 0c lea 0xc(%ebx),%edx 114f34: 31 c0 xor %eax,%eax 114f36: 83 c9 ff or $0xffffffff,%ecx 114f39: 89 d7 mov %edx,%edi 114f3b: f2 ae repnz scas %es:(%edi),%al 114f3d: f7 d1 not %ecx 114f3f: 49 dec %ecx 114f40: 66 89 8d e6 fe ff ff mov %cx,-0x11a(%ebp) strcpy( tmp_dirent.d_name, the_jnode->name ); 114f47: 51 push %ecx 114f48: 51 push %ecx 114f49: 52 push %edx 114f4a: 8d 8d e8 fe ff ff lea -0x118(%ebp),%ecx 114f50: 51 push %ecx 114f51: e8 16 17 00 00 call 11666c memcpy( 114f56: 8b 45 0c mov 0xc(%ebp),%eax 114f59: 03 85 d0 fe ff ff add -0x130(%ebp),%eax 114f5f: b9 43 00 00 00 mov $0x43,%ecx 114f64: 89 c7 mov %eax,%edi 114f66: 8b b5 b4 fe ff ff mov -0x14c(%ebp),%esi 114f6c: f3 a5 rep movsl %ds:(%esi),%es:(%edi) buffer + bytes_transferred, (void *)&tmp_dirent, sizeof( struct dirent ) ); iop->offset = iop->offset + sizeof(struct dirent); 114f6e: 8b 45 08 mov 0x8(%ebp),%eax 114f71: 81 40 0c 0c 01 00 00 addl $0x10c,0xc(%eax) 114f78: 83 50 10 00 adcl $0x0,0x10(%eax) bytes_transferred = bytes_transferred + sizeof( struct dirent ); 114f7c: 81 85 d0 fe ff ff 0c addl $0x10c,-0x130(%ebp) 114f83: 01 00 00 114f86: 83 c4 10 add $0x10,%esp } the_node = the_node->next; 114f89: 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( 114f8b: 81 85 d4 fe ff ff 0c addl $0x10c,-0x12c(%ebp) 114f92: 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 ( 114f95: 8b 95 c4 fe ff ff mov -0x13c(%ebp),%edx 114f9b: 39 95 d4 fe ff ff cmp %edx,-0x12c(%ebp) 114fa1: 0f 8c 52 ff ff ff jl 114ef9 114fa7: 8b 95 d0 fe ff ff mov -0x130(%ebp),%edx the_node = the_node->next; } /* Success */ return bytes_transferred; } 114fad: 89 d0 mov %edx,%eax 114faf: 8d 65 f4 lea -0xc(%ebp),%esp 114fb2: 5b pop %ebx 114fb3: 5e pop %esi 114fb4: 5f pop %edi 114fb5: c9 leave 114fb6: c3 ret 00114dd1 : int imfs_dir_rmnod( rtems_filesystem_location_info_t *parent_pathloc, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN */ ) { 114dd1: 55 push %ebp 114dd2: 89 e5 mov %esp,%ebp 114dd4: 56 push %esi 114dd5: 53 push %ebx 114dd6: 83 ec 10 sub $0x10,%esp 114dd9: 8b 75 0c mov 0xc(%ebp),%esi IMFS_jnode_t *the_jnode; the_jnode = (IMFS_jnode_t *) pathloc->node_access; 114ddc: 8b 1e mov (%esi),%ebx 114dde: 8d 43 54 lea 0x54(%ebx),%eax 114de1: 39 43 50 cmp %eax,0x50(%ebx) 114de4: 74 0d je 114df3 /* * 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 ); 114de6: e8 d5 0d 00 00 call 115bc0 <__errno> 114deb: c7 00 5a 00 00 00 movl $0x5a,(%eax) 114df1: eb 19 jmp 114e0c <== ALWAYS TAKEN /* * You cannot remove the file system root node. */ if ( pathloc->mt_entry->mt_fs_root.node_access == pathloc->node_access ) 114df3: 8b 46 10 mov 0x10(%esi),%eax 114df6: 39 58 1c cmp %ebx,0x1c(%eax) 114df9: 74 06 je 114e01 /* * You cannot remove a mountpoint. */ if ( the_jnode->info.directory.mt_fs != NULL ) 114dfb: 83 7b 5c 00 cmpl $0x0,0x5c(%ebx) 114dff: 74 10 je 114e11 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EBUSY ); 114e01: e8 ba 0d 00 00 call 115bc0 <__errno> 114e06: c7 00 10 00 00 00 movl $0x10,(%eax) 114e0c: 83 c8 ff or $0xffffffff,%eax 114e0f: eb 6b jmp 114e7c <== ALWAYS TAKEN /* * Take the node out of the parent's chain that contains this node */ if ( the_jnode->Parent != NULL ) { 114e11: 83 7b 08 00 cmpl $0x0,0x8(%ebx) 114e15: 74 13 je 114e2a 114e17: 83 ec 0c sub $0xc,%esp 114e1a: 53 push %ebx 114e1b: e8 80 6f ff ff call 10bda0 <_Chain_Extract> rtems_chain_extract( (rtems_chain_node *) the_jnode ); the_jnode->Parent = NULL; 114e20: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx) 114e27: 83 c4 10 add $0x10,%esp /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; 114e2a: 66 ff 4b 34 decw 0x34(%ebx) IMFS_update_ctime( the_jnode ); 114e2e: 50 push %eax 114e2f: 50 push %eax 114e30: 6a 00 push $0x0 114e32: 8d 45 f0 lea -0x10(%ebp),%eax 114e35: 50 push %eax 114e36: e8 d9 34 ff ff call 108314 114e3b: 8b 45 f0 mov -0x10(%ebp),%eax 114e3e: 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) ) { 114e41: 89 1c 24 mov %ebx,(%esp) 114e44: e8 79 d2 ff ff call 1120c2 114e49: 83 c4 10 add $0x10,%esp 114e4c: 85 c0 test %eax,%eax 114e4e: 75 2a jne 114e7a 114e50: 66 83 7b 34 00 cmpw $0x0,0x34(%ebx) 114e55: 75 23 jne 114e7a /* * Is the rtems_filesystem_current is this node? */ if ( rtems_filesystem_current.node_access == pathloc->node_access ) 114e57: a1 2c 6f 12 00 mov 0x126f2c,%eax 114e5c: 8b 50 04 mov 0x4(%eax),%edx 114e5f: 3b 16 cmp (%esi),%edx 114e61: 75 07 jne 114e6a <== NEVER TAKEN rtems_filesystem_current.node_access = NULL; 114e63: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax) <== NOT EXECUTED /* * Free memory associated with a memory file. */ free( the_jnode ); 114e6a: 83 ec 0c sub $0xc,%esp 114e6d: 53 push %ebx 114e6e: e8 29 34 ff ff call 10829c 114e73: 31 c0 xor %eax,%eax 114e75: 83 c4 10 add $0x10,%esp 114e78: eb 02 jmp 114e7c <== ALWAYS TAKEN 114e7a: 31 c0 xor %eax,%eax } return 0; } 114e7c: 8d 65 f8 lea -0x8(%ebp),%esp 114e7f: 5b pop %ebx 114e80: 5e pop %esi 114e81: c9 leave 114e82: c3 ret 00125cb2 : /* * Initialize useable but dummy databases */ void init_etc_passwd_group(void) { 125cb2: 55 push %ebp 125cb3: 89 e5 mov %esp,%ebp 125cb5: 53 push %ebx 125cb6: 83 ec 04 sub $0x4,%esp FILE *fp; static char etc_passwd_initted = 0; if (etc_passwd_initted) 125cb9: 80 3d b8 35 16 00 00 cmpb $0x0,0x1635b8 125cc0: 0f 85 b8 00 00 00 jne 125d7e return; etc_passwd_initted = 1; 125cc6: c6 05 b8 35 16 00 01 movb $0x1,0x1635b8 mkdir("/etc", 0777); 125ccd: 50 push %eax 125cce: 50 push %eax 125ccf: 68 ff 01 00 00 push $0x1ff 125cd4: 68 06 fe 14 00 push $0x14fe06 125cd9: e8 1a 61 fe ff call 10bdf8 /* * Initialize /etc/passwd */ if ((fp = fopen("/etc/passwd", "r")) != NULL) { 125cde: 59 pop %ecx 125cdf: 5b pop %ebx 125ce0: 68 a3 28 15 00 push $0x1528a3 125ce5: 68 20 ff 14 00 push $0x14ff20 125cea: e8 89 42 01 00 call 139f78 125cef: 83 c4 10 add $0x10,%esp 125cf2: 85 c0 test %eax,%eax 125cf4: 74 06 je 125cfc <== NEVER TAKEN fclose(fp); 125cf6: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 125cf9: 50 push %eax <== NOT EXECUTED 125cfa: eb 2a jmp 125d26 <== NOT EXECUTED } else if ((fp = fopen("/etc/passwd", "w")) != NULL) { 125cfc: 52 push %edx 125cfd: 52 push %edx 125cfe: 68 14 25 15 00 push $0x152514 125d03: 68 20 ff 14 00 push $0x14ff20 125d08: e8 6b 42 01 00 call 139f78 125d0d: 89 c3 mov %eax,%ebx 125d0f: 83 c4 10 add $0x10,%esp 125d12: 85 c0 test %eax,%eax 125d14: 74 18 je 125d2e <== ALWAYS TAKEN fprintf(fp, "root:*:0:0:root::/:/bin/sh\n" 125d16: 50 push %eax 125d17: 50 push %eax 125d18: 53 push %ebx 125d19: 68 7c 5d 15 00 push $0x155d7c 125d1e: e8 99 43 01 00 call 13a0bc "rtems:*:1:1:RTEMS Application::/:/bin/sh\n" "tty:!:2:2:tty owner::/:/bin/false\n" ); fclose(fp); 125d23: 89 1c 24 mov %ebx,(%esp) 125d26: e8 5d 3a 01 00 call 139788 125d2b: 83 c4 10 add $0x10,%esp } /* * Initialize /etc/group */ if ((fp = fopen("/etc/group", "r")) != NULL) { 125d2e: 51 push %ecx 125d2f: 51 push %ecx 125d30: 68 a3 28 15 00 push $0x1528a3 125d35: 68 65 ff 14 00 push $0x14ff65 125d3a: e8 39 42 01 00 call 139f78 125d3f: 83 c4 10 add $0x10,%esp 125d42: 85 c0 test %eax,%eax 125d44: 74 06 je 125d4c <== NEVER TAKEN fclose(fp); 125d46: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 125d49: 50 push %eax <== NOT EXECUTED 125d4a: eb 2a jmp 125d76 <== NOT EXECUTED } else if ((fp = fopen("/etc/group", "w")) != NULL) { 125d4c: 52 push %edx 125d4d: 52 push %edx 125d4e: 68 14 25 15 00 push $0x152514 125d53: 68 65 ff 14 00 push $0x14ff65 125d58: e8 1b 42 01 00 call 139f78 125d5d: 89 c3 mov %eax,%ebx 125d5f: 83 c4 10 add $0x10,%esp 125d62: 85 c0 test %eax,%eax 125d64: 74 18 je 125d7e <== ALWAYS TAKEN fprintf( fp, "root:x:0:root\n" 125d66: 50 push %eax 125d67: 50 push %eax 125d68: 53 push %ebx 125d69: 68 e3 5d 15 00 push $0x155de3 125d6e: e8 49 43 01 00 call 13a0bc "rtems:x:1:rtems\n" "tty:x:2:tty\n" ); fclose(fp); 125d73: 89 1c 24 mov %ebx,(%esp) 125d76: e8 0d 3a 01 00 call 139788 125d7b: 83 c4 10 add $0x10,%esp } } 125d7e: 8b 5d fc mov -0x4(%ebp),%ebx 125d81: c9 leave 125d82: 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 44 51 12 00 cmp 0x125144,%eax 10a1e3: 73 19 jae 10a1fe iop = rtems_libio_iop( fd ); 10a1e5: c1 e0 06 shl $0x6,%eax 10a1e8: 03 05 68 91 12 00 add 0x129168,%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 e5 bb 00 00 call 115de8 <__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 d1 bb 00 00 call 115de8 <__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 00 20 12 00 mov 0x122000,%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 30 1f 12 00 mov 0x121f30,%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 00111008 : int killinfo( pid_t pid, int sig, const union sigval *value ) { 111008: 55 push %ebp 111009: 89 e5 mov %esp,%ebp 11100b: 57 push %edi 11100c: 56 push %esi 11100d: 53 push %ebx 11100e: 83 ec 3c sub $0x3c,%esp 111011: 8b 5d 0c mov 0xc(%ebp),%ebx 111014: 8b 7d 10 mov 0x10(%ebp),%edi POSIX_signals_Siginfo_node *psiginfo; /* * Only supported for the "calling process" (i.e. this node). */ if ( pid != getpid() ) 111017: e8 48 f2 ff ff call 110264 <== ALWAYS TAKEN 11101c: 39 45 08 cmp %eax,0x8(%ebp) 11101f: 74 0d je 11102e rtems_set_errno_and_return_minus_one( ESRCH ); 111021: e8 9e 04 00 00 call 1114c4 <__errno> 111026: c7 00 03 00 00 00 movl $0x3,(%eax) 11102c: eb 0f jmp 11103d <== ALWAYS TAKEN /* * Validate the signal passed. */ if ( !sig ) 11102e: 85 db test %ebx,%ebx 111030: 75 13 jne 111045 rtems_set_errno_and_return_minus_one( EINVAL ); 111032: e8 8d 04 00 00 call 1114c4 <__errno> 111037: c7 00 16 00 00 00 movl $0x16,(%eax) 11103d: 83 c8 ff or $0xffffffff,%eax 111040: e9 e7 01 00 00 jmp 11122c <== ALWAYS TAKEN static inline bool is_valid_signo( int signo ) { return ((signo) >= 1 && (signo) <= 32 ); 111045: 8d 4b ff lea -0x1(%ebx),%ecx if ( !is_valid_signo(sig) ) 111048: 83 f9 1f cmp $0x1f,%ecx 11104b: 77 e5 ja 111032 rtems_set_errno_and_return_minus_one( EINVAL ); /* * If the signal is being ignored, then we are out of here. */ if ( _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN ) 11104d: 6b d3 0c imul $0xc,%ebx,%edx 111050: 31 c0 xor %eax,%eax 111052: 83 ba 54 47 12 00 01 cmpl $0x1,0x124754(%edx) 111059: 0f 84 cd 01 00 00 je 11122c <== ALWAYS TAKEN /* * P1003.1c/Draft 10, p. 33 says that certain signals should always * be directed to the executing thread such as those caused by hardware * faults. */ if ( (sig == SIGFPE) || (sig == SIGILL) || (sig == SIGSEGV ) ) 11105f: 83 fb 04 cmp $0x4,%ebx 111062: 74 0a je 11106e 111064: 83 fb 08 cmp $0x8,%ebx 111067: 74 05 je 11106e 111069: 83 fb 0b cmp $0xb,%ebx 11106c: 75 16 jne 111084 return pthread_kill( pthread_self(), sig ); 11106e: e8 d1 03 00 00 call 111444 111073: 56 push %esi 111074: 56 push %esi 111075: 53 push %ebx 111076: 50 push %eax 111077: e8 1c 03 00 00 call 111398 11107c: 83 c4 10 add $0x10,%esp 11107f: e9 a8 01 00 00 jmp 11122c <== ALWAYS TAKEN static inline sigset_t signo_to_mask( uint32_t sig ) { return 1u << (sig - 1); 111084: be 01 00 00 00 mov $0x1,%esi 111089: d3 e6 shl %cl,%esi /* * Build up a siginfo structure */ siginfo = &siginfo_struct; siginfo->si_signo = sig; 11108b: 89 5d dc mov %ebx,-0x24(%ebp) siginfo->si_code = SI_USER; 11108e: c7 45 e0 01 00 00 00 movl $0x1,-0x20(%ebp) if ( !value ) { 111095: 85 ff test %edi,%edi 111097: 75 09 jne 1110a2 siginfo->si_value.sival_int = 0; 111099: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) 1110a0: eb 05 jmp 1110a7 <== ALWAYS TAKEN } else { siginfo->si_value = *value; 1110a2: 8b 07 mov (%edi),%eax 1110a4: 89 45 e4 mov %eax,-0x1c(%ebp) 1110a7: a1 ec 41 12 00 mov 0x1241ec,%eax 1110ac: 40 inc %eax 1110ad: a3 ec 41 12 00 mov %eax,0x1241ec /* * Is the currently executing thread interested? If so then it will * get it an execute it as soon as the dispatcher executes. */ the_thread = _Thread_Executing; 1110b2: 8b 15 a8 42 12 00 mov 0x1242a8,%edx api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 1110b8: 8b 82 f8 00 00 00 mov 0xf8(%edx),%eax 1110be: 8b 80 c4 00 00 00 mov 0xc4(%eax),%eax 1110c4: f7 d0 not %eax 1110c6: 85 c6 test %eax,%esi 1110c8: 0f 85 e0 00 00 00 jne 1111ae /* XXX violation of visibility -- need to define thread queue support */ the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo; for ( the_node = the_chain->first ; 1110ce: a1 d8 48 12 00 mov 0x1248d8,%eax 1110d3: eb 23 jmp 1110f8 <== ALWAYS TAKEN !_Chain_Is_tail( the_chain, the_node ) ; the_node = the_node->next ) { the_thread = (Thread_Control *)the_node; 1110d5: 89 c2 mov %eax,%edx api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 1110d7: 8b 88 f8 00 00 00 mov 0xf8(%eax),%ecx #endif /* * Is this thread is actually blocked waiting for the signal? */ if (the_thread->Wait.option & mask) 1110dd: 85 70 30 test %esi,0x30(%eax) 1110e0: 0f 85 c8 00 00 00 jne 1111ae /* * Is this thread is blocked waiting for another signal but has * not blocked this one? */ if (~api->signals_blocked & mask) 1110e6: 8b 89 c4 00 00 00 mov 0xc4(%ecx),%ecx 1110ec: f7 d1 not %ecx 1110ee: 85 ce test %ecx,%esi 1110f0: 0f 85 b8 00 00 00 jne 1111ae the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo; for ( the_node = the_chain->first ; !_Chain_Is_tail( the_chain, the_node ) ; the_node = the_node->next ) { 1110f6: 8b 00 mov (%eax),%eax */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 1110f8: 3d dc 48 12 00 cmp $0x1248dc,%eax 1110fd: 75 d6 jne 1110d5 * NOTES: * * + rtems internal threads do not receive signals. */ interested = NULL; interested_priority = PRIORITY_MAXIMUM + 1; 1110ff: 0f b6 05 f4 01 12 00 movzbl 0x1201f4,%eax 111106: 40 inc %eax 111107: 89 45 d4 mov %eax,-0x2c(%ebp) 11110a: 31 d2 xor %edx,%edx 11110c: c7 45 cc 02 00 00 00 movl $0x2,-0x34(%ebp) for (the_api = OBJECTS_CLASSIC_API; the_api <= OBJECTS_APIS_LAST; the_api++) { /* * This can occur when no one is interested and ITRON is not configured. */ if ( !_Objects_Information_table[ the_api ] ) 111113: 8b 4d cc mov -0x34(%ebp),%ecx 111116: 8b 04 8d c0 41 12 00 mov 0x1241c0(,%ecx,4),%eax 11111d: 85 c0 test %eax,%eax 11111f: 74 7c je 11119d continue; the_info = _Objects_Information_table[ the_api ][ 1 ]; 111121: 8b 40 04 mov 0x4(%eax),%eax */ if ( !the_info ) continue; #endif maximum = the_info->maximum; 111124: 0f b7 78 10 movzwl 0x10(%eax),%edi 111128: 89 7d c0 mov %edi,-0x40(%ebp) object_table = the_info->local_table; 11112b: 8b 40 1c mov 0x1c(%eax),%eax 11112e: 89 45 c4 mov %eax,-0x3c(%ebp) 111131: c7 45 d0 01 00 00 00 movl $0x1,-0x30(%ebp) for ( index = 1 ; index <= maximum ; index++ ) { 111138: eb 5b jmp 111195 <== ALWAYS TAKEN the_thread = (Thread_Control *) object_table[ index ]; 11113a: 8b 4d d0 mov -0x30(%ebp),%ecx 11113d: 8b 7d c4 mov -0x3c(%ebp),%edi 111140: 8b 04 8f mov (%edi,%ecx,4),%eax if ( !the_thread ) 111143: 85 c0 test %eax,%eax 111145: 74 41 je 111188 /* * If this thread is of lower priority than the interested thread, * go on to the next thread. */ if ( the_thread->current_priority > interested_priority ) 111147: 8b 48 14 mov 0x14(%eax),%ecx 11114a: 3b 4d d4 cmp -0x2c(%ebp),%ecx 11114d: 77 39 ja 111188 DEBUG_STEP("2"); /* * If this thread is not interested, then go on to the next thread. */ api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 11114f: 8b b8 f8 00 00 00 mov 0xf8(%eax),%edi 111155: 8b bf c4 00 00 00 mov 0xc4(%edi),%edi 11115b: f7 d7 not %edi 11115d: 85 fe test %edi,%esi 11115f: 74 27 je 111188 * * NOTE: We initialized interested_priority to PRIORITY_MAXIMUM + 1 * so we never have to worry about deferencing a NULL * interested thread. */ if ( the_thread->current_priority < interested_priority ) { 111161: 3b 4d d4 cmp -0x2c(%ebp),%ecx 111164: 72 27 jb 11118d * and blocking interruptibutable by signal. * * If the interested thread is ready, don't think about changing. */ if ( !_States_Is_ready( interested->current_state ) ) { 111166: 8b 7a 10 mov 0x10(%edx),%edi 111169: 89 7d c8 mov %edi,-0x38(%ebp) 11116c: 85 ff test %edi,%edi 11116e: 74 18 je 111188 <== ALWAYS TAKEN /* preferred ready over blocked */ DEBUG_STEP("5"); if ( _States_Is_ready( the_thread->current_state ) ) { 111170: 8b 78 10 mov 0x10(%eax),%edi 111173: 85 ff test %edi,%edi 111175: 74 16 je 11118d continue; } DEBUG_STEP("6"); /* prefer blocked/interruptible over blocked/not interruptible */ if ( !_States_Is_interruptible_by_signal(interested->current_state) ) { 111177: f7 45 c8 00 00 00 10 testl $0x10000000,-0x38(%ebp) 11117e: 75 08 jne 111188 DEBUG_STEP("7"); if ( _States_Is_interruptible_by_signal(the_thread->current_state) ) { 111180: 81 e7 00 00 00 10 and $0x10000000,%edi 111186: 75 05 jne 11118d 111188: 8b 4d d4 mov -0x2c(%ebp),%ecx 11118b: eb 02 jmp 11118f <== ALWAYS TAKEN 11118d: 89 c2 mov %eax,%edx #endif maximum = the_info->maximum; object_table = the_info->local_table; for ( index = 1 ; index <= maximum ; index++ ) { 11118f: ff 45 d0 incl -0x30(%ebp) 111192: 89 4d d4 mov %ecx,-0x2c(%ebp) 111195: 8b 45 c0 mov -0x40(%ebp),%eax 111198: 39 45 d0 cmp %eax,-0x30(%ebp) 11119b: 76 9d jbe 11113a * + rtems internal threads do not receive signals. */ interested = NULL; interested_priority = PRIORITY_MAXIMUM + 1; for (the_api = OBJECTS_CLASSIC_API; the_api <= OBJECTS_APIS_LAST; the_api++) { 11119d: ff 45 cc incl -0x34(%ebp) 1111a0: 83 7d cc 05 cmpl $0x5,-0x34(%ebp) 1111a4: 0f 85 69 ff ff ff jne 111113 } } } } if ( interested ) { 1111aa: 85 d2 test %edx,%edx 1111ac: 74 17 je 1111c5 * thread needs to do the post context switch extension so it can * evaluate the signals pending. */ process_it: the_thread->do_post_task_switch_extension = true; 1111ae: c6 42 74 01 movb $0x1,0x74(%edx) /* * Returns true if the signal was synchronously given to a thread * blocked waiting for the signal. */ if ( _POSIX_signals_Unblock_thread( the_thread, sig, siginfo ) ) { 1111b2: 51 push %ecx 1111b3: 8d 45 dc lea -0x24(%ebp),%eax 1111b6: 50 push %eax 1111b7: 53 push %ebx 1111b8: 52 push %edx 1111b9: e8 e2 00 00 00 call 1112a0 <_POSIX_signals_Unblock_thread> <== ALWAYS TAKEN 1111be: 83 c4 10 add $0x10,%esp 1111c1: 84 c0 test %al,%al 1111c3: 75 60 jne 111225 /* * We may have woken up a thread but we definitely need to post the * signal to the process wide information set. */ _POSIX_signals_Set_process_signals( mask ); 1111c5: 83 ec 0c sub $0xc,%esp 1111c8: 56 push %esi 1111c9: e8 ae 00 00 00 call 11127c <_POSIX_signals_Set_process_signals> <== ALWAYS TAKEN if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) { 1111ce: 6b db 0c imul $0xc,%ebx,%ebx 1111d1: 83 c4 10 add $0x10,%esp 1111d4: 83 bb 4c 47 12 00 02 cmpl $0x2,0x12474c(%ebx) 1111db: 75 48 jne 111225 psiginfo = (POSIX_signals_Siginfo_node *) 1111dd: 83 ec 0c sub $0xc,%esp 1111e0: 68 cc 48 12 00 push $0x1248cc 1111e5: e8 ca 95 ff ff call 10a7b4 <_Chain_Get> _Chain_Get( &_POSIX_signals_Inactive_siginfo ); if ( !psiginfo ) { 1111ea: 83 c4 10 add $0x10,%esp 1111ed: 85 c0 test %eax,%eax 1111ef: 75 15 jne 111206 _Thread_Enable_dispatch(); 1111f1: e8 fb a9 ff ff call 10bbf1 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EAGAIN ); 1111f6: e8 c9 02 00 00 call 1114c4 <__errno> 1111fb: c7 00 0b 00 00 00 movl $0xb,(%eax) 111201: e9 37 fe ff ff jmp 11103d } psiginfo->Info = *siginfo; 111206: 8d 78 08 lea 0x8(%eax),%edi 111209: 8d 75 dc lea -0x24(%ebp),%esi 11120c: b9 03 00 00 00 mov $0x3,%ecx 111211: f3 a5 rep movsl %ds:(%esi),%es:(%edi) _Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node ); 111213: 52 push %edx 111214: 52 push %edx 111215: 50 push %eax 111216: 81 c3 1c 49 12 00 add $0x12491c,%ebx 11121c: 53 push %ebx 11121d: e8 6e 95 ff ff call 10a790 <_Chain_Append> 111222: 83 c4 10 add $0x10,%esp } DEBUG_STEP("\n"); _Thread_Enable_dispatch(); 111225: e8 c7 a9 ff ff call 10bbf1 <_Thread_Enable_dispatch> 11122a: 31 c0 xor %eax,%eax return 0; } 11122c: 8d 65 f4 lea -0xc(%ebp),%esp 11122f: 5b pop %ebx 111230: 5e pop %esi 111231: 5f pop %edi 111232: c9 leave 111233: c3 ret 0011c8fc : extern void _wrapup_reent(struct _reent *); extern void _reclaim_reent(struct _reent *); void libc_wrapup(void) { 11c8fc: 55 push %ebp 11c8fd: 89 e5 mov %esp,%ebp 11c8ff: 53 push %ebx 11c900: 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())) 11c903: 83 3d 84 43 12 00 03 cmpl $0x3,0x124384 11c90a: 75 4f jne 11c95b /* * This was already done if the user called exit() directly . _wrapup_reent(0); */ if (_REENT != _global_impure_ptr) { 11c90c: 8b 1d c0 f2 11 00 mov 0x11f2c0,%ebx 11c912: 39 1d 20 20 12 00 cmp %ebx,0x122020 11c918: 74 12 je 11c92c _wrapup_reent(_global_impure_ptr); 11c91a: 83 ec 0c sub $0xc,%esp 11c91d: 53 push %ebx 11c91e: e8 b1 04 00 00 call 11cdd4 <_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; 11c923: 89 1d 20 20 12 00 mov %ebx,0x122020 11c929: 83 c4 10 add $0x10,%esp * * Should this be changed to do *all* file streams? * _fwalk (_REENT, fclose); */ fclose (stdin); 11c92c: 83 ec 0c sub $0xc,%esp 11c92f: a1 20 20 12 00 mov 0x122020,%eax 11c934: ff 70 04 pushl 0x4(%eax) 11c937: e8 d4 4c ff ff call 111610 fclose (stdout); 11c93c: 5a pop %edx 11c93d: a1 20 20 12 00 mov 0x122020,%eax 11c942: ff 70 08 pushl 0x8(%eax) 11c945: e8 c6 4c ff ff call 111610 fclose (stderr); 11c94a: 58 pop %eax 11c94b: a1 20 20 12 00 mov 0x122020,%eax 11c950: ff 70 0c pushl 0xc(%eax) 11c953: e8 b8 4c ff ff call 111610 11c958: 83 c4 10 add $0x10,%esp } 11c95b: 8b 5d fc mov -0x4(%ebp),%ebx 11c95e: c9 leave 11c95f: c3 ret 0012612c : int link( const char *existing, const char *new ) { 12612c: 55 push %ebp 12612d: 89 e5 mov %esp,%ebp 12612f: 57 push %edi 126130: 56 push %esi 126131: 53 push %ebx 126132: 83 ec 48 sub $0x48,%esp 126135: 8b 55 08 mov 0x8(%ebp),%edx 126138: 8b 5d 0c mov 0xc(%ebp),%ebx /* * Get the node we are linking to. */ result = rtems_filesystem_evaluate_path( existing, strlen( existing ), 12613b: 31 c0 xor %eax,%eax 12613d: 83 c9 ff or $0xffffffff,%ecx 126140: 89 d7 mov %edx,%edi 126142: f2 ae repnz scas %es:(%edi),%al 126144: f7 d1 not %ecx 126146: 49 dec %ecx 126147: 6a 01 push $0x1 126149: 8d 45 d0 lea -0x30(%ebp),%eax 12614c: 50 push %eax 12614d: 6a 00 push $0x0 12614f: 51 push %ecx 126150: 52 push %edx 126151: e8 c6 55 fe ff call 10b71c <== ALWAYS TAKEN 0, &existing_loc, true ); if ( result != 0 ) 126156: 83 c4 20 add $0x20,%esp 126159: 83 ce ff or $0xffffffff,%esi 12615c: 85 c0 test %eax,%eax 12615e: 0f 85 80 01 00 00 jne 1262e4 /* * Get the parent of the node we are creating. */ rtems_filesystem_get_start_loc( new, &i, &parent_loc ); 126164: 8a 03 mov (%ebx),%al 126166: 3c 5c cmp $0x5c,%al 126168: 74 08 je 126172 <== ALWAYS TAKEN 12616a: 3c 2f cmp $0x2f,%al 12616c: 74 04 je 126172 12616e: 84 c0 test %al,%al 126170: 75 1a jne 12618c <== NEVER TAKEN 126172: 8d 7d bc lea -0x44(%ebp),%edi 126175: 8b 35 78 e1 15 00 mov 0x15e178,%esi 12617b: 83 c6 18 add $0x18,%esi 12617e: b9 05 00 00 00 mov $0x5,%ecx 126183: f3 a5 rep movsl %ds:(%esi),%es:(%edi) 126185: ba 01 00 00 00 mov $0x1,%edx 12618a: eb 15 jmp 1261a1 <== ALWAYS TAKEN 12618c: 8d 7d bc lea -0x44(%ebp),%edi 12618f: 8b 35 78 e1 15 00 mov 0x15e178,%esi 126195: 83 c6 04 add $0x4,%esi 126198: b9 05 00 00 00 mov $0x5,%ecx 12619d: f3 a5 rep movsl %ds:(%esi),%es:(%edi) 12619f: 31 d2 xor %edx,%edx if ( !parent_loc.ops->evalformake_h ) { 1261a1: 8b 45 c8 mov -0x38(%ebp),%eax 1261a4: 8b 40 04 mov 0x4(%eax),%eax 1261a7: 85 c0 test %eax,%eax 1261a9: 75 21 jne 1261cc <== NEVER TAKEN rtems_filesystem_freenode( &existing_loc ); 1261ab: 8b 45 dc mov -0x24(%ebp),%eax <== NOT EXECUTED 1261ae: 85 c0 test %eax,%eax <== NOT EXECUTED 1261b0: 0f 84 dd 00 00 00 je 126293 <== NOT EXECUTED 1261b6: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 1261b9: 85 c0 test %eax,%eax <== NOT EXECUTED 1261bb: 0f 84 d2 00 00 00 je 126293 <== NOT EXECUTED 1261c1: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1261c4: 8d 55 d0 lea -0x30(%ebp),%edx <== NOT EXECUTED 1261c7: e9 c1 00 00 00 jmp 12628d <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*parent_loc.ops->evalformake_h)( &new[i], &parent_loc, &name_start ); 1261cc: 51 push %ecx 1261cd: 8d 4d e4 lea -0x1c(%ebp),%ecx 1261d0: 51 push %ecx 1261d1: 8d 75 bc lea -0x44(%ebp),%esi 1261d4: 56 push %esi 1261d5: 01 d3 add %edx,%ebx 1261d7: 53 push %ebx 1261d8: ff d0 call *%eax 1261da: 89 c3 mov %eax,%ebx if ( result != 0 ) { 1261dc: 83 c4 10 add $0x10,%esp 1261df: 85 c0 test %eax,%eax 1261e1: 74 29 je 12620c rtems_filesystem_freenode( &existing_loc ); 1261e3: 8b 45 dc mov -0x24(%ebp),%eax 1261e6: 85 c0 test %eax,%eax 1261e8: 74 13 je 1261fd <== ALWAYS TAKEN 1261ea: 8b 40 1c mov 0x1c(%eax),%eax 1261ed: 85 c0 test %eax,%eax 1261ef: 74 0c je 1261fd <== ALWAYS TAKEN 1261f1: 83 ec 0c sub $0xc,%esp 1261f4: 8d 55 d0 lea -0x30(%ebp),%edx 1261f7: 52 push %edx 1261f8: ff d0 call *%eax 1261fa: 83 c4 10 add $0x10,%esp rtems_set_errno_and_return_minus_one( result ); 1261fd: e8 3a 34 01 00 call 13963c <__errno> 126202: 89 18 mov %ebx,(%eax) 126204: 83 ce ff or $0xffffffff,%esi 126207: e9 d8 00 00 00 jmp 1262e4 <== 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 ) { 12620c: 8b 45 cc mov -0x34(%ebp),%eax 12620f: 3b 45 e0 cmp -0x20(%ebp),%eax 126212: 74 41 je 126255 rtems_filesystem_freenode( &existing_loc ); 126214: 8b 45 dc mov -0x24(%ebp),%eax 126217: 85 c0 test %eax,%eax 126219: 74 13 je 12622e <== ALWAYS TAKEN 12621b: 8b 40 1c mov 0x1c(%eax),%eax 12621e: 85 c0 test %eax,%eax 126220: 74 0c je 12622e <== ALWAYS TAKEN 126222: 83 ec 0c sub $0xc,%esp 126225: 8d 55 d0 lea -0x30(%ebp),%edx 126228: 52 push %edx 126229: ff d0 call *%eax 12622b: 83 c4 10 add $0x10,%esp rtems_filesystem_freenode( &parent_loc ); 12622e: 8b 45 c8 mov -0x38(%ebp),%eax 126231: 85 c0 test %eax,%eax 126233: 74 13 je 126248 <== ALWAYS TAKEN 126235: 8b 40 1c mov 0x1c(%eax),%eax 126238: 85 c0 test %eax,%eax 12623a: 74 0c je 126248 <== ALWAYS TAKEN 12623c: 83 ec 0c sub $0xc,%esp 12623f: 8d 55 bc lea -0x44(%ebp),%edx 126242: 52 push %edx 126243: ff d0 call *%eax 126245: 83 c4 10 add $0x10,%esp rtems_set_errno_and_return_minus_one( EXDEV ); 126248: e8 ef 33 01 00 call 13963c <__errno> 12624d: c7 00 12 00 00 00 movl $0x12,(%eax) 126253: eb af jmp 126204 <== ALWAYS TAKEN } if ( !parent_loc.ops->link_h ) { 126255: 8b 45 c8 mov -0x38(%ebp),%eax 126258: 8b 40 08 mov 0x8(%eax),%eax 12625b: 85 c0 test %eax,%eax 12625d: 75 44 jne 1262a3 <== NEVER TAKEN rtems_filesystem_freenode( &existing_loc ); 12625f: 8b 45 dc mov -0x24(%ebp),%eax <== NOT EXECUTED 126262: 85 c0 test %eax,%eax <== NOT EXECUTED 126264: 74 13 je 126279 <== NOT EXECUTED 126266: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 126269: 85 c0 test %eax,%eax <== NOT EXECUTED 12626b: 74 0c je 126279 <== NOT EXECUTED 12626d: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 126270: 8d 55 d0 lea -0x30(%ebp),%edx <== NOT EXECUTED 126273: 52 push %edx <== NOT EXECUTED 126274: ff d0 call *%eax <== NOT EXECUTED 126276: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_filesystem_freenode( &parent_loc ); 126279: 8b 45 c8 mov -0x38(%ebp),%eax <== NOT EXECUTED 12627c: 85 c0 test %eax,%eax <== NOT EXECUTED 12627e: 74 13 je 126293 <== NOT EXECUTED 126280: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 126283: 85 c0 test %eax,%eax <== NOT EXECUTED 126285: 74 0c je 126293 <== NOT EXECUTED 126287: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12628a: 8d 55 bc lea -0x44(%ebp),%edx <== NOT EXECUTED 12628d: 52 push %edx <== NOT EXECUTED 12628e: ff d0 call *%eax <== NOT EXECUTED 126290: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 126293: e8 a4 33 01 00 call 13963c <__errno> <== NOT EXECUTED 126298: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 12629e: e9 61 ff ff ff jmp 126204 <== NOT EXECUTED } result = (*parent_loc.ops->link_h)( &existing_loc, &parent_loc, name_start ); 1262a3: 52 push %edx 1262a4: ff 75 e4 pushl -0x1c(%ebp) 1262a7: 56 push %esi 1262a8: 8d 5d d0 lea -0x30(%ebp),%ebx 1262ab: 53 push %ebx 1262ac: ff d0 call *%eax 1262ae: 89 c6 mov %eax,%esi rtems_filesystem_freenode( &existing_loc ); 1262b0: 8b 45 dc mov -0x24(%ebp),%eax 1262b3: 83 c4 10 add $0x10,%esp 1262b6: 85 c0 test %eax,%eax 1262b8: 74 10 je 1262ca <== ALWAYS TAKEN 1262ba: 8b 40 1c mov 0x1c(%eax),%eax 1262bd: 85 c0 test %eax,%eax 1262bf: 74 09 je 1262ca <== ALWAYS TAKEN 1262c1: 83 ec 0c sub $0xc,%esp 1262c4: 53 push %ebx 1262c5: ff d0 call *%eax 1262c7: 83 c4 10 add $0x10,%esp rtems_filesystem_freenode( &parent_loc ); 1262ca: 8b 45 c8 mov -0x38(%ebp),%eax 1262cd: 85 c0 test %eax,%eax 1262cf: 74 13 je 1262e4 <== ALWAYS TAKEN 1262d1: 8b 40 1c mov 0x1c(%eax),%eax 1262d4: 85 c0 test %eax,%eax 1262d6: 74 0c je 1262e4 <== ALWAYS TAKEN 1262d8: 83 ec 0c sub $0xc,%esp 1262db: 8d 55 bc lea -0x44(%ebp),%edx 1262de: 52 push %edx 1262df: ff d0 call *%eax 1262e1: 83 c4 10 add $0x10,%esp return result; } 1262e4: 89 f0 mov %esi,%eax 1262e6: 8d 65 f4 lea -0xc(%ebp),%esp 1262e9: 5b pop %ebx 1262ea: 5e pop %esi 1262eb: 5f pop %edi 1262ec: c9 leave 1262ed: c3 ret 0011c7fc : off_t lseek( int fd, off_t offset, int whence ) { 11c7fc: 55 push %ebp 11c7fd: 89 e5 mov %esp,%ebp 11c7ff: 57 push %edi 11c800: 56 push %esi 11c801: 53 push %ebx 11c802: 83 ec 1c sub $0x1c,%esp 11c805: 8b 5d 08 mov 0x8(%ebp),%ebx 11c808: 8b 45 0c mov 0xc(%ebp),%eax 11c80b: 8b 55 10 mov 0x10(%ebp),%edx rtems_libio_t *iop; off_t old_offset; off_t status; rtems_libio_check_fd( fd ); 11c80e: 3b 1d 44 01 12 00 cmp 0x120144,%ebx 11c814: 73 0f jae 11c825 iop = rtems_libio_iop( fd ); 11c816: c1 e3 06 shl $0x6,%ebx 11c819: 03 1d 90 40 12 00 add 0x124090,%ebx rtems_libio_check_is_open(iop); 11c81f: f6 43 15 01 testb $0x1,0x15(%ebx) 11c823: 75 0d jne 11c832 <== NEVER TAKEN 11c825: e8 9a 4c ff ff call 1114c4 <__errno> 11c82a: c7 00 09 00 00 00 movl $0x9,(%eax) 11c830: eb 7c jmp 11c8ae <== ALWAYS TAKEN /* * Check as many errors as possible before touching iop->offset. */ if ( !iop->handlers->lseek_h ) 11c832: 8b 4b 3c mov 0x3c(%ebx),%ecx 11c835: 83 79 14 00 cmpl $0x0,0x14(%ecx) 11c839: 75 0d jne 11c848 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); 11c83b: e8 84 4c ff ff call 1114c4 <__errno> <== NOT EXECUTED 11c840: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 11c846: eb 66 jmp 11c8ae <== NOT EXECUTED /* * Now process the lseek(). */ old_offset = iop->offset; 11c848: 8b 73 0c mov 0xc(%ebx),%esi 11c84b: 8b 7b 10 mov 0x10(%ebx),%edi 11c84e: 89 75 e0 mov %esi,-0x20(%ebp) 11c851: 89 7d e4 mov %edi,-0x1c(%ebp) switch ( whence ) { 11c854: 83 fa 01 cmp $0x1,%edx 11c857: 74 13 je 11c86c 11c859: 83 fa 02 cmp $0x2,%edx 11c85c: 74 1d je 11c87b 11c85e: 85 d2 test %edx,%edx 11c860: 75 41 jne 11c8a3 case SEEK_SET: iop->offset = offset; 11c862: 89 43 0c mov %eax,0xc(%ebx) 11c865: 89 c7 mov %eax,%edi 11c867: c1 ff 1f sar $0x1f,%edi 11c86a: eb 1f jmp 11c88b <== ALWAYS TAKEN break; case SEEK_CUR: iop->offset += offset; 11c86c: 89 c6 mov %eax,%esi 11c86e: 89 c7 mov %eax,%edi 11c870: c1 ff 1f sar $0x1f,%edi 11c873: 03 75 e0 add -0x20(%ebp),%esi 11c876: 13 7d e4 adc -0x1c(%ebp),%edi 11c879: eb 0d jmp 11c888 <== ALWAYS TAKEN break; case SEEK_END: iop->offset = iop->size + offset; 11c87b: 89 c6 mov %eax,%esi 11c87d: 89 c7 mov %eax,%edi 11c87f: c1 ff 1f sar $0x1f,%edi 11c882: 03 73 04 add 0x4(%ebx),%esi 11c885: 13 7b 08 adc 0x8(%ebx),%edi 11c888: 89 73 0c mov %esi,0xc(%ebx) 11c88b: 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 ); 11c88e: 8b 4b 3c mov 0x3c(%ebx),%ecx 11c891: 52 push %edx 11c892: 99 cltd 11c893: 52 push %edx 11c894: 50 push %eax 11c895: 53 push %ebx 11c896: ff 51 14 call *0x14(%ecx) if ( status == (off_t) -1 ) 11c899: 83 c4 10 add $0x10,%esp 11c89c: 83 f8 ff cmp $0xffffffff,%eax 11c89f: 75 20 jne 11c8c1 11c8a1: eb 10 jmp 11c8b3 <== ALWAYS TAKEN case SEEK_END: iop->offset = iop->size + offset; break; default: rtems_set_errno_and_return_minus_one( EINVAL ); 11c8a3: e8 1c 4c ff ff call 1114c4 <__errno> 11c8a8: c7 00 16 00 00 00 movl $0x16,(%eax) 11c8ae: 83 c8 ff or $0xffffffff,%eax 11c8b1: eb 0e jmp 11c8c1 <== ALWAYS TAKEN * new offset. */ status = (*iop->handlers->lseek_h)( iop, offset, whence ); if ( status == (off_t) -1 ) iop->offset = old_offset; 11c8b3: 8b 55 e0 mov -0x20(%ebp),%edx 11c8b6: 89 53 0c mov %edx,0xc(%ebx) 11c8b9: 89 d1 mov %edx,%ecx 11c8bb: c1 f9 1f sar $0x1f,%ecx 11c8be: 89 4b 10 mov %ecx,0x10(%ebx) /* * So if the operation failed, we have to restore iop->offset. */ return status; } 11c8c1: 8d 65 f4 lea -0xc(%ebp),%esp 11c8c4: 5b pop %ebx 11c8c5: 5e pop %esi 11c8c6: 5f pop %edi 11c8c7: c9 leave 11c8c8: c3 ret 001263f4 : int _STAT_NAME( const char *path, struct stat *buf ) { 1263f4: 55 push %ebp <== NOT EXECUTED 1263f5: 89 e5 mov %esp,%ebp <== NOT EXECUTED 1263f7: 57 push %edi <== NOT EXECUTED 1263f8: 56 push %esi <== NOT EXECUTED 1263f9: 53 push %ebx <== NOT EXECUTED 1263fa: 83 ec 2c sub $0x2c,%esp <== NOT EXECUTED 1263fd: 8b 55 08 mov 0x8(%ebp),%edx <== NOT EXECUTED 126400: 8b 75 0c mov 0xc(%ebp),%esi <== NOT EXECUTED /* * Check to see if we were passed a valid pointer. */ if ( !buf ) 126403: 85 f6 test %esi,%esi <== NOT EXECUTED 126405: 75 0d jne 126414 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EFAULT ); 126407: e8 30 32 01 00 call 13963c <__errno> <== NOT EXECUTED 12640c: c7 00 0e 00 00 00 movl $0xe,(%eax) <== NOT EXECUTED 126412: eb 53 jmp 126467 <== NOT EXECUTED status = rtems_filesystem_evaluate_path( path, strlen( path ), 126414: 31 c0 xor %eax,%eax <== NOT EXECUTED 126416: 83 c9 ff or $0xffffffff,%ecx <== NOT EXECUTED 126419: 89 d7 mov %edx,%edi <== NOT EXECUTED 12641b: f2 ae repnz scas %es:(%edi),%al <== NOT EXECUTED 12641d: f7 d1 not %ecx <== NOT EXECUTED 12641f: 49 dec %ecx <== NOT EXECUTED 126420: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 126423: 6a 00 push $0x0 <== NOT EXECUTED 126425: 8d 5d d4 lea -0x2c(%ebp),%ebx <== NOT EXECUTED 126428: 53 push %ebx <== NOT EXECUTED 126429: 6a 00 push $0x0 <== NOT EXECUTED 12642b: 51 push %ecx <== NOT EXECUTED 12642c: 52 push %edx <== NOT EXECUTED 12642d: e8 ea 52 fe ff call 10b71c <== NOT EXECUTED 0, &loc, _STAT_FOLLOW_LINKS ); if ( status != 0 ) 126432: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 126435: 83 cf ff or $0xffffffff,%edi <== NOT EXECUTED 126438: 85 c0 test %eax,%eax <== NOT EXECUTED 12643a: 75 5c jne 126498 <== NOT EXECUTED return -1; if ( !loc.handlers->fstat_h ){ 12643c: 8b 55 dc mov -0x24(%ebp),%edx <== NOT EXECUTED 12643f: 83 7a 18 00 cmpl $0x0,0x18(%edx) <== NOT EXECUTED 126443: 75 27 jne 12646c <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 126445: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED 126448: 85 c0 test %eax,%eax <== NOT EXECUTED 12644a: 74 10 je 12645c <== NOT EXECUTED 12644c: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 12644f: 85 c0 test %eax,%eax <== NOT EXECUTED 126451: 74 09 je 12645c <== NOT EXECUTED 126453: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 126456: 53 push %ebx <== NOT EXECUTED 126457: ff d0 call *%eax <== NOT EXECUTED 126459: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 12645c: e8 db 31 01 00 call 13963c <__errno> <== NOT EXECUTED 126461: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 126467: 83 cf ff or $0xffffffff,%edi <== NOT EXECUTED 12646a: eb 2c jmp 126498 <== NOT EXECUTED /* * Zero out the stat structure so the various support * versions of stat don't have to. */ memset( buf, 0, sizeof(struct stat) ); 12646c: b9 11 00 00 00 mov $0x11,%ecx <== NOT EXECUTED 126471: 89 f7 mov %esi,%edi <== NOT EXECUTED 126473: f3 ab rep stos %eax,%es:(%edi) <== NOT EXECUTED status = (*loc.handlers->fstat_h)( &loc, buf ); 126475: 50 push %eax <== NOT EXECUTED 126476: 50 push %eax <== NOT EXECUTED 126477: 56 push %esi <== NOT EXECUTED 126478: 53 push %ebx <== NOT EXECUTED 126479: ff 52 18 call *0x18(%edx) <== NOT EXECUTED 12647c: 89 c7 mov %eax,%edi <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 12647e: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED 126481: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 126484: 85 c0 test %eax,%eax <== NOT EXECUTED 126486: 74 10 je 126498 <== NOT EXECUTED 126488: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 12648b: 85 c0 test %eax,%eax <== NOT EXECUTED 12648d: 74 09 je 126498 <== NOT EXECUTED 12648f: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 126492: 53 push %ebx <== NOT EXECUTED 126493: ff d0 call *%eax <== NOT EXECUTED 126495: 83 c4 10 add $0x10,%esp <== NOT EXECUTED return status; } 126498: 89 f8 mov %edi,%eax <== NOT EXECUTED 12649a: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 12649d: 5b pop %ebx <== NOT EXECUTED 12649e: 5e pop %esi <== NOT EXECUTED 12649f: 5f pop %edi <== NOT EXECUTED 1264a0: c9 leave <== NOT EXECUTED 1264a1: 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 ac 40 12 00 incl 0x1240ac /* * 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 84 43 12 00 03 cmpl $0x3,0x124384 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 50 01 12 00 pushl 0x120150 107394: e8 f7 42 00 00 call 10b690 <_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 14 25 12 00 mov 0x122514,%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 02 a1 00 00 call 1114c4 <__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 18 25 12 00 mov 0x122518,%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 10 25 12 00 mov 0x122510,%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 9c 40 12 00 push $0x12409c <== NOT EXECUTED 107280: e8 0b 35 00 00 call 10a790 <_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 9c 40 12 00 push $0x12409c 1072a6: e8 09 35 00 00 call 10a7b4 <_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 ec 41 12 00 mov 0x1241ec,%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 84 42 12 00 mov 0x124284,%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 00113e8c : */ int memfile_blocks_allocated = 0; void *memfile_alloc_block(void) { 113e8c: 55 push %ebp 113e8d: 89 e5 mov %esp,%ebp 113e8f: 83 ec 10 sub $0x10,%esp void *memory; memory = (void *)calloc(1, IMFS_MEMFILE_BYTES_PER_BLOCK); 113e92: ff 35 b8 8d 12 00 pushl 0x128db8 113e98: 6a 01 push $0x1 113e9a: e8 05 42 ff ff call 1080a4 if ( memory ) 113e9f: 83 c4 10 add $0x10,%esp 113ea2: 85 c0 test %eax,%eax 113ea4: 74 06 je 113eac <== ALWAYS TAKEN memfile_blocks_allocated++; 113ea6: ff 05 54 8f 12 00 incl 0x128f54 return memory; } 113eac: c9 leave 113ead: c3 ret 00114214 : return memfile_check_rmnod( the_jnode ); } int memfile_check_rmnod( IMFS_jnode_t *the_jnode ){ 114214: 55 push %ebp 114215: 89 e5 mov %esp,%ebp 114217: 53 push %ebx 114218: 83 ec 10 sub $0x10,%esp 11421b: 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) ) { 11421e: 53 push %ebx 11421f: e8 9e de ff ff call 1120c2 114224: 83 c4 10 add $0x10,%esp 114227: 85 c0 test %eax,%eax 114229: 75 36 jne 114261 11422b: 66 83 7b 34 00 cmpw $0x0,0x34(%ebx) 114230: 75 2f jne 114261 <== ALWAYS TAKEN /* * Is the rtems_filesystem_current is this node? */ if ( rtems_filesystem_current.node_access == the_jnode ) 114232: a1 2c 6f 12 00 mov 0x126f2c,%eax 114237: 39 58 04 cmp %ebx,0x4(%eax) 11423a: 75 07 jne 114243 <== NEVER TAKEN rtems_filesystem_current.node_access = NULL; 11423c: 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) 114243: 83 7b 4c 06 cmpl $0x6,0x4c(%ebx) 114247: 74 0c je 114255 <== ALWAYS TAKEN IMFS_memfile_remove( the_jnode ); 114249: 83 ec 0c sub $0xc,%esp 11424c: 53 push %ebx 11424d: e8 98 fe ff ff call 1140ea <== ALWAYS TAKEN 114252: 83 c4 10 add $0x10,%esp free( the_jnode ); 114255: 83 ec 0c sub $0xc,%esp 114258: 53 push %ebx 114259: e8 3e 40 ff ff call 10829c 11425e: 83 c4 10 add $0x10,%esp } return 0; } 114261: 31 c0 xor %eax,%eax 114263: 8b 5d fc mov -0x4(%ebp),%ebx 114266: c9 leave 114267: c3 ret 001142b1 : */ int memfile_close( rtems_libio_t *iop ) { 1142b1: 55 push %ebp 1142b2: 89 e5 mov %esp,%ebp 1142b4: 53 push %ebx 1142b5: 83 ec 04 sub $0x4,%esp 1142b8: 8b 45 08 mov 0x8(%ebp),%eax IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 1142bb: 8b 50 38 mov 0x38(%eax),%edx if (iop->flags & LIBIO_FLAGS_APPEND) 1142be: f6 40 15 02 testb $0x2,0x15(%eax) 1142c2: 74 0c je 1142d0 iop->offset = the_jnode->info.file.size; 1142c4: 8b 4a 50 mov 0x50(%edx),%ecx 1142c7: 8b 5a 54 mov 0x54(%edx),%ebx 1142ca: 89 48 0c mov %ecx,0xc(%eax) 1142cd: 89 58 10 mov %ebx,0x10(%eax) memfile_check_rmnod( the_jnode ); 1142d0: 83 ec 0c sub $0xc,%esp 1142d3: 52 push %edx 1142d4: e8 3b ff ff ff call 114214 <== ALWAYS TAKEN return 0; } 1142d9: 31 c0 xor %eax,%eax 1142db: 8b 5d fc mov -0x4(%ebp),%ebx 1142de: c9 leave 1142df: c3 ret 00114035 : void memfile_free_blocks_in_table( block_p **block_table, int entries ) { 114035: 55 push %ebp 114036: 89 e5 mov %esp,%ebp 114038: 57 push %edi 114039: 56 push %esi 11403a: 53 push %ebx 11403b: 83 ec 0c sub $0xc,%esp 11403e: 8b 75 08 mov 0x8(%ebp),%esi /* * Perform internal consistency checks */ assert( block_table ); 114041: 85 f6 test %esi,%esi 114043: 75 19 jne 11405e <== NEVER TAKEN 114045: 68 38 38 12 00 push $0x123838 <== NOT EXECUTED 11404a: 68 2c 39 12 00 push $0x12392c <== NOT EXECUTED 11404f: 68 b3 01 00 00 push $0x1b3 <== NOT EXECUTED 114054: 68 ce 37 12 00 push $0x1237ce <== NOT EXECUTED 114059: e8 12 3f ff ff call 107f70 <__assert_func> <== NOT EXECUTED /* * Now go through all the slots in the table and free the memory. */ b = *block_table; 11405e: 8b 3e mov (%esi),%edi 114060: 31 db xor %ebx,%ebx for ( i=0 ; i <== ALWAYS TAKEN if ( b[i] ) { 114064: 8b 04 9f mov (%edi,%ebx,4),%eax 114067: 85 c0 test %eax,%eax 114069: 74 13 je 11407e memfile_free_block( b[i] ); 11406b: 83 ec 0c sub $0xc,%esp 11406e: 50 push %eax 11406f: e8 ff fd ff ff call 113e73 <== ALWAYS TAKEN b[i] = 0; 114074: c7 04 9f 00 00 00 00 movl $0x0,(%edi,%ebx,4) 11407b: 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 ); 114084: 83 ec 0c sub $0xc,%esp 114087: ff 36 pushl (%esi) 114089: e8 e5 fd ff ff call 113e73 <== ALWAYS TAKEN *block_table = 0; 11408e: c7 06 00 00 00 00 movl $0x0,(%esi) 114094: 83 c4 10 add $0x10,%esp } 114097: 8d 65 f4 lea -0xc(%ebp),%esp 11409a: 5b pop %ebx 11409b: 5e pop %esi 11409c: 5f pop %edi 11409d: c9 leave 11409e: c3 ret 00114441 : int memfile_ftruncate( rtems_libio_t *iop, rtems_off64_t length ) { 114441: 55 push %ebp 114442: 89 e5 mov %esp,%ebp 114444: 53 push %ebx 114445: 83 ec 14 sub $0x14,%esp 114448: 8b 55 08 mov 0x8(%ebp),%edx 11444b: 8b 45 0c mov 0xc(%ebp),%eax 11444e: 8b 4d 10 mov 0x10(%ebp),%ecx IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 114451: 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 ) 114454: 3b 4b 54 cmp 0x54(%ebx),%ecx 114457: 7c 12 jl 11446b <== ALWAYS TAKEN 114459: 7f 05 jg 114460 <== ALWAYS TAKEN 11445b: 3b 43 50 cmp 0x50(%ebx),%eax 11445e: 76 0b jbe 11446b <== NEVER TAKEN return IMFS_memfile_extend( the_jnode, length ); 114460: 51 push %ecx <== NOT EXECUTED 114461: 51 push %ecx <== NOT EXECUTED 114462: 50 push %eax <== NOT EXECUTED 114463: 53 push %ebx <== NOT EXECUTED 114464: e8 e6 fe ff ff call 11434f <== NOT EXECUTED 114469: eb 21 jmp 11448c <== 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; 11446b: 89 43 50 mov %eax,0x50(%ebx) 11446e: 89 4b 54 mov %ecx,0x54(%ebx) iop->size = the_jnode->info.file.size; 114471: 89 42 04 mov %eax,0x4(%edx) 114474: 89 4a 08 mov %ecx,0x8(%edx) IMFS_update_atime( the_jnode ); 114477: 52 push %edx 114478: 52 push %edx 114479: 6a 00 push $0x0 11447b: 8d 45 f0 lea -0x10(%ebp),%eax 11447e: 50 push %eax 11447f: e8 90 3e ff ff call 108314 114484: 8b 45 f0 mov -0x10(%ebp),%eax 114487: 89 43 40 mov %eax,0x40(%ebx) 11448a: 31 c0 xor %eax,%eax return 0; 11448c: 83 c4 10 add $0x10,%esp } 11448f: 8b 5d fc mov -0x4(%ebp),%ebx 114492: c9 leave 114493: c3 ret 00114494 : rtems_off64_t memfile_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { 114494: 55 push %ebp 114495: 89 e5 mov %esp,%ebp 114497: 56 push %esi 114498: 53 push %ebx 114499: 8b 5d 08 mov 0x8(%ebp),%ebx IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 11449c: 8b 73 38 mov 0x38(%ebx),%esi if (the_jnode->type == IMFS_LINEAR_FILE) { 11449f: 83 7e 4c 06 cmpl $0x6,0x4c(%esi) 1144a3: 75 1a jne 1144bf <== NEVER TAKEN if (iop->offset > the_jnode->info.linearfile.size) 1144a5: 8b 56 50 mov 0x50(%esi),%edx <== NOT EXECUTED 1144a8: 8b 46 54 mov 0x54(%esi),%eax <== NOT EXECUTED 1144ab: 39 43 10 cmp %eax,0x10(%ebx) <== NOT EXECUTED 1144ae: 7c 3f jl 1144ef <== NOT EXECUTED 1144b0: 7f 05 jg 1144b7 <== NOT EXECUTED 1144b2: 39 53 0c cmp %edx,0xc(%ebx) <== NOT EXECUTED 1144b5: 76 38 jbe 1144ef <== NOT EXECUTED iop->offset = the_jnode->info.linearfile.size; 1144b7: 89 53 0c mov %edx,0xc(%ebx) <== NOT EXECUTED 1144ba: 89 43 10 mov %eax,0x10(%ebx) <== NOT EXECUTED 1144bd: eb 30 jmp 1144ef <== NOT EXECUTED } else { /* Must be a block file (IMFS_MEMORY_FILE). */ if (IMFS_memfile_extend( the_jnode, iop->offset )) 1144bf: 50 push %eax 1144c0: 50 push %eax 1144c1: ff 73 0c pushl 0xc(%ebx) 1144c4: 56 push %esi 1144c5: e8 85 fe ff ff call 11434f <== ALWAYS TAKEN 1144ca: 83 c4 10 add $0x10,%esp 1144cd: 85 c0 test %eax,%eax 1144cf: 74 12 je 1144e3 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOSPC ); 1144d1: e8 ea 16 00 00 call 115bc0 <__errno> <== NOT EXECUTED 1144d6: c7 00 1c 00 00 00 movl $0x1c,(%eax) <== NOT EXECUTED 1144dc: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 1144df: 89 c2 mov %eax,%edx <== NOT EXECUTED 1144e1: eb 12 jmp 1144f5 <== NOT EXECUTED iop->size = the_jnode->info.file.size; 1144e3: 8b 46 50 mov 0x50(%esi),%eax 1144e6: 8b 56 54 mov 0x54(%esi),%edx 1144e9: 89 43 04 mov %eax,0x4(%ebx) 1144ec: 89 53 08 mov %edx,0x8(%ebx) } return iop->offset; 1144ef: 8b 43 0c mov 0xc(%ebx),%eax 1144f2: 8b 53 10 mov 0x10(%ebx),%edx } 1144f5: 8d 65 f8 lea -0x8(%ebp),%esp 1144f8: 5b pop %ebx 1144f9: 5e pop %esi 1144fa: c9 leave 1144fb: c3 ret 001146ff : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 1146ff: 55 push %ebp 114700: 89 e5 mov %esp,%ebp 114702: 56 push %esi 114703: 53 push %ebx 114704: 8b 75 08 mov 0x8(%ebp),%esi IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 114707: 8b 5e 38 mov 0x38(%esi),%ebx /* * Perform 'copy on write' for linear files */ if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) 11470a: f7 46 14 04 02 00 00 testl $0x204,0x14(%esi) 114711: 74 4f je 114762 && (the_jnode->type == IMFS_LINEAR_FILE)) { 114713: 83 7b 4c 06 cmpl $0x6,0x4c(%ebx) 114717: 75 49 jne 114762 <== NEVER TAKEN uint32_t count = the_jnode->info.linearfile.size; 114719: 8b 43 50 mov 0x50(%ebx),%eax <== NOT EXECUTED const unsigned char *buffer = the_jnode->info.linearfile.direct; 11471c: 8b 53 58 mov 0x58(%ebx),%edx <== NOT EXECUTED the_jnode->type = IMFS_MEMORY_FILE; 11471f: c7 43 4c 05 00 00 00 movl $0x5,0x4c(%ebx) <== NOT EXECUTED the_jnode->info.file.size = 0; 114726: c7 43 50 00 00 00 00 movl $0x0,0x50(%ebx) <== NOT EXECUTED 11472d: c7 43 54 00 00 00 00 movl $0x0,0x54(%ebx) <== NOT EXECUTED the_jnode->info.file.indirect = 0; 114734: c7 43 58 00 00 00 00 movl $0x0,0x58(%ebx) <== NOT EXECUTED the_jnode->info.file.doubly_indirect = 0; 11473b: c7 43 5c 00 00 00 00 movl $0x0,0x5c(%ebx) <== NOT EXECUTED the_jnode->info.file.triply_indirect = 0; 114742: c7 43 60 00 00 00 00 movl $0x0,0x60(%ebx) <== NOT EXECUTED if ((count != 0) 114749: 85 c0 test %eax,%eax <== NOT EXECUTED 11474b: 74 15 je 114762 <== NOT EXECUTED && (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) 11474d: 50 push %eax <== NOT EXECUTED 11474e: 52 push %edx <== NOT EXECUTED 11474f: 6a 00 push $0x0 <== NOT EXECUTED 114751: 53 push %ebx <== NOT EXECUTED 114752: e8 a5 fd ff ff call 1144fc <== NOT EXECUTED 114757: 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) 114759: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 11475c: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 11475f: 42 inc %edx <== NOT EXECUTED 114760: 74 20 je 114782 <== NOT EXECUTED && (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) return -1; } if (iop->flags & LIBIO_FLAGS_APPEND) 114762: f6 46 15 02 testb $0x2,0x15(%esi) 114766: 74 0c je 114774 iop->offset = the_jnode->info.file.size; 114768: 8b 43 50 mov 0x50(%ebx),%eax 11476b: 8b 53 54 mov 0x54(%ebx),%edx 11476e: 89 46 0c mov %eax,0xc(%esi) 114771: 89 56 10 mov %edx,0x10(%esi) iop->size = the_jnode->info.file.size; 114774: 8b 43 50 mov 0x50(%ebx),%eax 114777: 8b 53 54 mov 0x54(%ebx),%edx 11477a: 89 46 04 mov %eax,0x4(%esi) 11477d: 89 56 08 mov %edx,0x8(%esi) 114780: 31 c0 xor %eax,%eax return 0; } 114782: 8d 65 f8 lea -0x8(%ebp),%esp 114785: 5b pop %ebx 114786: 5e pop %esi 114787: c9 leave 114788: c3 ret 001149ad : ssize_t memfile_read( rtems_libio_t *iop, void *buffer, size_t count ) { 1149ad: 55 push %ebp 1149ae: 89 e5 mov %esp,%ebp 1149b0: 83 ec 08 sub $0x8,%esp 1149b3: 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 ); 1149b6: ff 75 10 pushl 0x10(%ebp) 1149b9: ff 75 0c pushl 0xc(%ebp) 1149bc: ff 70 0c pushl 0xc(%eax) 1149bf: ff 70 38 pushl 0x38(%eax) 1149c2: e8 c2 fd ff ff call 114789 <== ALWAYS TAKEN } 1149c7: c9 leave 1149c8: c3 ret 00114268 : int memfile_rmnod( rtems_filesystem_location_info_t *parent_pathloc, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN */ ) { 114268: 55 push %ebp 114269: 89 e5 mov %esp,%ebp 11426b: 53 push %ebx 11426c: 83 ec 14 sub $0x14,%esp IMFS_jnode_t *the_jnode; the_jnode = (IMFS_jnode_t *) pathloc->node_access; 11426f: 8b 45 0c mov 0xc(%ebp),%eax 114272: 8b 18 mov (%eax),%ebx /* * Take the node out of the parent's chain that contains this node */ if ( the_jnode->Parent != NULL ) { 114274: 83 7b 08 00 cmpl $0x0,0x8(%ebx) 114278: 74 13 je 11428d <== ALWAYS TAKEN 11427a: 83 ec 0c sub $0xc,%esp 11427d: 53 push %ebx 11427e: e8 1d 7b ff ff call 10bda0 <_Chain_Extract> rtems_chain_extract( (rtems_chain_node *) the_jnode ); the_jnode->Parent = NULL; 114283: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx) 11428a: 83 c4 10 add $0x10,%esp /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; 11428d: 66 ff 4b 34 decw 0x34(%ebx) IMFS_update_ctime( the_jnode ); 114291: 50 push %eax 114292: 50 push %eax 114293: 6a 00 push $0x0 114295: 8d 45 f0 lea -0x10(%ebp),%eax 114298: 50 push %eax 114299: e8 76 40 ff ff call 108314 11429e: 8b 45 f0 mov -0x10(%ebp),%eax 1142a1: 89 43 48 mov %eax,0x48(%ebx) return memfile_check_rmnod( the_jnode ); 1142a4: 89 1c 24 mov %ebx,(%esp) 1142a7: e8 68 ff ff ff call 114214 <== ALWAYS TAKEN } 1142ac: 8b 5d fc mov -0x4(%ebp),%ebx 1142af: c9 leave 1142b0: c3 ret 001146d2 : ssize_t memfile_write( rtems_libio_t *iop, const void *buffer, size_t count ) { 1146d2: 55 push %ebp 1146d3: 89 e5 mov %esp,%ebp 1146d5: 56 push %esi 1146d6: 53 push %ebx 1146d7: 8b 5d 08 mov 0x8(%ebp),%ebx IMFS_jnode_t *the_jnode; ssize_t status; the_jnode = iop->file_info; 1146da: 8b 73 38 mov 0x38(%ebx),%esi status = IMFS_memfile_write( the_jnode, iop->offset, buffer, count ); 1146dd: ff 75 10 pushl 0x10(%ebp) 1146e0: ff 75 0c pushl 0xc(%ebp) 1146e3: ff 73 0c pushl 0xc(%ebx) 1146e6: 56 push %esi 1146e7: e8 10 fe ff ff call 1144fc <== ALWAYS TAKEN iop->size = the_jnode->info.file.size; 1146ec: 8b 56 50 mov 0x50(%esi),%edx 1146ef: 8b 4e 54 mov 0x54(%esi),%ecx 1146f2: 89 53 04 mov %edx,0x4(%ebx) 1146f5: 89 4b 08 mov %ecx,0x8(%ebx) return status; } 1146f8: 8d 65 f8 lea -0x8(%ebp),%esp 1146fb: 5b pop %ebx 1146fc: 5e pop %esi 1146fd: c9 leave 1146fe: c3 ret 0010d000 : */ int miniIMFS_initialize( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { 10d000: 55 push %ebp 10d001: 89 e5 mov %esp,%ebp 10d003: 83 ec 08 sub $0x8,%esp return IMFS_initialize_support( 10d006: 68 d4 eb 11 00 push $0x11ebd4 10d00b: 68 d4 eb 11 00 push $0x11ebd4 10d010: 68 34 ea 11 00 push $0x11ea34 10d015: ff 75 08 pushl 0x8(%ebp) 10d018: e8 23 09 00 00 call 10d940 <== ALWAYS TAKEN temp_mt_entry, &miniIMFS_ops, &rtems_filesystem_null_handlers, /* for memfiles */ &rtems_filesystem_null_handlers /* for directories */ ); } 10d01d: c9 leave 10d01e: 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 00110df0 : int mkfifo( const char *path, mode_t mode ) { 110df0: 55 push %ebp 110df1: 89 e5 mov %esp,%ebp 110df3: 83 ec 08 sub $0x8,%esp 110df6: 8b 45 0c mov 0xc(%ebp),%eax return mknod( path, mode | S_IFIFO, 0LL ); 110df9: 6a 00 push $0x0 110dfb: 6a 00 push $0x0 110dfd: 80 cc 10 or $0x10,%ah 110e00: 50 push %eax 110e01: ff 75 08 pushl 0x8(%ebp) 110e04: e8 13 66 ff ff call 10741c <== ALWAYS TAKEN } 110e09: c9 leave 110e0a: 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 81 a0 00 00 call 1114c4 <__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 40 1f 12 00 mov 0x121f40,%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 40 1f 12 00 mov 0x121f40,%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 30 a0 00 00 call 1114c4 <__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 76 9f 00 00 call 1114c4 <__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 5d 9f 00 00 call 1114c4 <__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 18 9f 00 00 call 1114c4 <__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 35 aa 00 00 call 112008 <== 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 a1 9e 00 00 call 1114c4 <__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 85 9e 00 00 call 1114c4 <__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 d4 40 12 00 mov 0x1240d4,%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 d8 40 12 00 cmp $0x1240d8,%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 58 9e 00 00 call 1114c4 <__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 4b 9e 00 00 call 1114c4 <__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 d4 40 12 00 push $0x1240d4 1076fa: e8 91 30 00 00 call 10a790 <_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 0010db78 : */ int mq_close( mqd_t mqdes ) { 10db78: 55 push %ebp 10db79: 89 e5 mov %esp,%ebp 10db7b: 53 push %ebx 10db7c: 83 ec 18 sub $0x18,%esp RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control_fd *_POSIX_Message_queue_Get_fd ( mqd_t id, Objects_Locations *location ) { return (POSIX_Message_queue_Control_fd *) _Objects_Get( 10db7f: 8d 45 f4 lea -0xc(%ebp),%eax 10db82: 50 push %eax 10db83: ff 75 08 pushl 0x8(%ebp) 10db86: 68 20 d3 12 00 push $0x12d320 10db8b: e8 d4 2d 00 00 call 110964 <_Objects_Get> 10db90: 89 c3 mov %eax,%ebx POSIX_Message_queue_Control *the_mq; POSIX_Message_queue_Control_fd *the_mq_fd; Objects_Locations location; the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); if ( location == OBJECTS_LOCAL ) { 10db92: 83 c4 10 add $0x10,%esp 10db95: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 10db99: 75 35 jne 10dbd0 * First update the actual message queue to reflect this descriptor * being disassociated. This may result in the queue being really * deleted. */ the_mq = the_mq_fd->Queue; 10db9b: 8b 40 10 mov 0x10(%eax),%eax the_mq->open_count -= 1; 10db9e: ff 48 18 decl 0x18(%eax) _POSIX_Message_queue_Delete( the_mq ); 10dba1: 83 ec 0c sub $0xc,%esp 10dba4: 50 push %eax 10dba5: e8 3a 00 00 00 call 10dbe4 <_POSIX_Message_queue_Delete> <== ALWAYS TAKEN /* * Now close this file descriptor. */ _Objects_Close( 10dbaa: 59 pop %ecx 10dbab: 58 pop %eax 10dbac: 53 push %ebx 10dbad: 68 20 d3 12 00 push $0x12d320 10dbb2: e8 05 2a 00 00 call 1105bc <_Objects_Close> RTEMS_INLINE_ROUTINE void _POSIX_Message_queue_Free_fd ( POSIX_Message_queue_Control_fd *the_mq_fd ) { _Objects_Free( &_POSIX_Message_queue_Information_fds, &the_mq_fd->Object ); 10dbb7: 58 pop %eax 10dbb8: 5a pop %edx 10dbb9: 53 push %ebx 10dbba: 68 20 d3 12 00 push $0x12d320 10dbbf: e8 78 2c 00 00 call 11083c <_Objects_Free> &_POSIX_Message_queue_Information_fds, &the_mq_fd->Object ); _POSIX_Message_queue_Free_fd( the_mq_fd ); _Thread_Enable_dispatch(); 10dbc4: e8 d4 35 00 00 call 11119d <_Thread_Enable_dispatch> 10dbc9: 31 c0 xor %eax,%eax return 0; 10dbcb: 83 c4 10 add $0x10,%esp 10dbce: eb 0e jmp 10dbde <== ALWAYS TAKEN /* * OBJECTS_REMOTE: * OBJECTS_ERROR: */ rtems_set_errno_and_return_minus_one( EBADF ); 10dbd0: e8 83 8f 00 00 call 116b58 <__errno> 10dbd5: c7 00 09 00 00 00 movl $0x9,(%eax) 10dbdb: 83 c8 ff or $0xffffffff,%eax } 10dbde: 8b 5d fc mov -0x4(%ebp),%ebx 10dbe1: c9 leave 10dbe2: c3 ret 0010dc2c : int mq_getattr( mqd_t mqdes, struct mq_attr *mqstat ) { 10dc2c: 55 push %ebp 10dc2d: 89 e5 mov %esp,%ebp 10dc2f: 53 push %ebx 10dc30: 83 ec 14 sub $0x14,%esp 10dc33: 8b 5d 0c mov 0xc(%ebp),%ebx POSIX_Message_queue_Control *the_mq; POSIX_Message_queue_Control_fd *the_mq_fd; Objects_Locations location; CORE_message_queue_Attributes *the_mq_attr; if ( !mqstat ) 10dc36: 85 db test %ebx,%ebx 10dc38: 75 0d jne 10dc47 rtems_set_errno_and_return_minus_one( EINVAL ); 10dc3a: e8 19 8f 00 00 call 116b58 <__errno> 10dc3f: c7 00 16 00 00 00 movl $0x16,(%eax) 10dc45: eb 49 jmp 10dc90 <== ALWAYS TAKEN RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control_fd *_POSIX_Message_queue_Get_fd ( mqd_t id, Objects_Locations *location ) { return (POSIX_Message_queue_Control_fd *) _Objects_Get( 10dc47: 50 push %eax 10dc48: 8d 45 f4 lea -0xc(%ebp),%eax 10dc4b: 50 push %eax 10dc4c: ff 75 08 pushl 0x8(%ebp) 10dc4f: 68 20 d3 12 00 push $0x12d320 10dc54: e8 0b 2d 00 00 call 110964 <_Objects_Get> the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { 10dc59: 83 c4 10 add $0x10,%esp 10dc5c: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 10dc60: 75 23 jne 10dc85 case OBJECTS_LOCAL: the_mq = the_mq_fd->Queue; 10dc62: 8b 50 10 mov 0x10(%eax),%edx * Return the old values. */ the_mq_attr = &the_mq->Message_queue.Attributes; mqstat->mq_flags = the_mq_fd->oflag; 10dc65: 8b 40 14 mov 0x14(%eax),%eax 10dc68: 89 03 mov %eax,(%ebx) mqstat->mq_msgsize = the_mq->Message_queue.maximum_message_size; 10dc6a: 8b 42 68 mov 0x68(%edx),%eax 10dc6d: 89 43 08 mov %eax,0x8(%ebx) mqstat->mq_maxmsg = the_mq->Message_queue.maximum_pending_messages; 10dc70: 8b 42 60 mov 0x60(%edx),%eax 10dc73: 89 43 04 mov %eax,0x4(%ebx) mqstat->mq_curmsgs = the_mq->Message_queue.number_of_pending_messages; 10dc76: 8b 42 64 mov 0x64(%edx),%eax 10dc79: 89 43 0c mov %eax,0xc(%ebx) _Thread_Enable_dispatch(); 10dc7c: e8 1c 35 00 00 call 11119d <_Thread_Enable_dispatch> 10dc81: 31 c0 xor %eax,%eax return 0; 10dc83: eb 0e jmp 10dc93 <== ALWAYS TAKEN #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); 10dc85: e8 ce 8e 00 00 call 116b58 <__errno> 10dc8a: c7 00 09 00 00 00 movl $0x9,(%eax) 10dc90: 83 c8 ff or $0xffffffff,%eax } 10dc93: 8b 5d fc mov -0x4(%ebp),%ebx 10dc96: c9 leave 10dc97: c3 ret 0010dc98 : int mq_notify( mqd_t mqdes, const struct sigevent *notification ) { 10dc98: 55 push %ebp 10dc99: 89 e5 mov %esp,%ebp 10dc9b: 57 push %edi 10dc9c: 56 push %esi 10dc9d: 83 ec 14 sub $0x14,%esp 10dca0: 8b 75 0c mov 0xc(%ebp),%esi 10dca3: 8d 45 f4 lea -0xc(%ebp),%eax 10dca6: 50 push %eax 10dca7: ff 75 08 pushl 0x8(%ebp) 10dcaa: 68 20 d3 12 00 push $0x12d320 10dcaf: e8 b0 2c 00 00 call 110964 <_Objects_Get> POSIX_Message_queue_Control *the_mq; POSIX_Message_queue_Control_fd *the_mq_fd; Objects_Locations location; the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { 10dcb4: 83 c4 10 add $0x10,%esp 10dcb7: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 10dcbb: 75 5f jne 10dd1c case OBJECTS_LOCAL: the_mq = the_mq_fd->Queue; 10dcbd: 8b 40 10 mov 0x10(%eax),%eax if ( notification ) { 10dcc0: 85 f6 test %esi,%esi 10dcc2: 74 3e je 10dd02 if ( _CORE_message_queue_Is_notify_enabled( &the_mq->Message_queue ) ) { 10dcc4: 83 78 7c 00 cmpl $0x0,0x7c(%eax) 10dcc8: 74 12 je 10dcdc _Thread_Enable_dispatch(); 10dcca: e8 ce 34 00 00 call 11119d <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EBUSY ); 10dccf: e8 84 8e 00 00 call 116b58 <__errno> 10dcd4: c7 00 10 00 00 00 movl $0x10,(%eax) 10dcda: eb 4b jmp 10dd27 <== ALWAYS TAKEN CORE_message_queue_Notify_Handler the_handler, void *the_argument ) { the_message_queue->notify_handler = the_handler; the_message_queue->notify_argument = the_argument; 10dcdc: c7 80 80 00 00 00 00 movl $0x0,0x80(%eax) 10dce3: 00 00 00 } _CORE_message_queue_Set_notify( &the_mq->Message_queue, NULL, NULL ); the_mq->notification = *notification; 10dce6: 8d b8 90 00 00 00 lea 0x90(%eax),%edi 10dcec: b9 05 00 00 00 mov $0x5,%ecx 10dcf1: f3 a5 rep movsl %ds:(%esi),%es:(%edi) CORE_message_queue_Control *the_message_queue, CORE_message_queue_Notify_Handler the_handler, void *the_argument ) { the_message_queue->notify_handler = the_handler; 10dcf3: c7 40 7c 31 dd 10 00 movl $0x10dd31,0x7c(%eax) the_message_queue->notify_argument = the_argument; 10dcfa: 89 80 80 00 00 00 mov %eax,0x80(%eax) 10dd00: eb 11 jmp 10dd13 <== ALWAYS TAKEN CORE_message_queue_Control *the_message_queue, CORE_message_queue_Notify_Handler the_handler, void *the_argument ) { the_message_queue->notify_handler = the_handler; 10dd02: c7 40 7c 00 00 00 00 movl $0x0,0x7c(%eax) the_message_queue->notify_argument = the_argument; 10dd09: c7 80 80 00 00 00 00 movl $0x0,0x80(%eax) 10dd10: 00 00 00 _CORE_message_queue_Set_notify( &the_mq->Message_queue, NULL, NULL ); } _Thread_Enable_dispatch(); 10dd13: e8 85 34 00 00 call 11119d <_Thread_Enable_dispatch> 10dd18: 31 c0 xor %eax,%eax return 0; 10dd1a: eb 0e jmp 10dd2a <== ALWAYS TAKEN #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); 10dd1c: e8 37 8e 00 00 call 116b58 <__errno> 10dd21: c7 00 09 00 00 00 movl $0x9,(%eax) 10dd27: 83 c8 ff or $0xffffffff,%eax } 10dd2a: 8d 65 f8 lea -0x8(%ebp),%esp 10dd2d: 5e pop %esi 10dd2e: 5f pop %edi 10dd2f: c9 leave 10dd30: c3 ret 0010dd68 : int oflag, ... /* mode_t mode, */ /* struct mq_attr attr */ ) { 10dd68: 55 push %ebp 10dd69: 89 e5 mov %esp,%ebp 10dd6b: 57 push %edi 10dd6c: 56 push %esi 10dd6d: 53 push %ebx 10dd6e: 83 ec 2c sub $0x2c,%esp 10dd71: 8b 75 0c mov 0xc(%ebp),%esi rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10dd74: a1 2c ce 12 00 mov 0x12ce2c,%eax 10dd79: 40 inc %eax 10dd7a: a3 2c ce 12 00 mov %eax,0x12ce2c POSIX_Message_queue_Control_fd *the_mq_fd; Objects_Locations location; _Thread_Disable_dispatch(); if ( oflag & O_CREAT ) { 10dd7f: 89 f0 mov %esi,%eax 10dd81: 25 00 02 00 00 and $0x200,%eax 10dd86: 89 45 d0 mov %eax,-0x30(%ebp) 10dd89: 75 09 jne 10dd94 10dd8b: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp) 10dd92: eb 06 jmp 10dd9a <== ALWAYS TAKEN va_start(arg, oflag); mode = (mode_t) va_arg( arg, unsigned int ); attr = (struct mq_attr *) va_arg( arg, struct mq_attr * ); 10dd94: 8b 45 14 mov 0x14(%ebp),%eax 10dd97: 89 45 d4 mov %eax,-0x2c(%ebp) */ RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control_fd * _POSIX_Message_queue_Allocate_fd( void ) { return (POSIX_Message_queue_Control_fd *) 10dd9a: 83 ec 0c sub $0xc,%esp 10dd9d: 68 20 d3 12 00 push $0x12d320 10dda2: e8 a9 27 00 00 call 110550 <_Objects_Allocate> 10dda7: 89 c3 mov %eax,%ebx va_end(arg); } the_mq_fd = _POSIX_Message_queue_Allocate_fd(); if ( !the_mq_fd ) { 10dda9: 83 c4 10 add $0x10,%esp 10ddac: 85 c0 test %eax,%eax 10ddae: 75 18 jne 10ddc8 _Thread_Enable_dispatch(); 10ddb0: e8 e8 33 00 00 call 11119d <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( ENFILE ); 10ddb5: e8 9e 8d 00 00 call 116b58 <__errno> 10ddba: c7 00 17 00 00 00 movl $0x17,(%eax) 10ddc0: 83 c8 ff or $0xffffffff,%eax 10ddc3: e9 03 01 00 00 jmp 10decb <== ALWAYS TAKEN } the_mq_fd->oflag = oflag; 10ddc8: 89 70 14 mov %esi,0x14(%eax) status = _POSIX_Message_queue_Name_to_id( name, &the_mq_id ); 10ddcb: 57 push %edi 10ddcc: 57 push %edi 10ddcd: 8d 45 e4 lea -0x1c(%ebp),%eax 10ddd0: 50 push %eax 10ddd1: ff 75 08 pushl 0x8(%ebp) 10ddd4: e8 f3 5a 00 00 call 1138cc <_POSIX_Message_queue_Name_to_id> 10ddd9: 89 c7 mov %eax,%edi * If the name to id translation worked, then the message queue exists * and we can just return a pointer to the id. Otherwise we may * need to check to see if this is a "message queue does not exist" * or some other miscellaneous error on the name. */ if ( status ) { 10dddb: 83 c4 10 add $0x10,%esp 10ddde: 85 c0 test %eax,%eax 10dde0: 74 2a je 10de0c /* * Unless provided a valid name that did not already exist * and we are willing to create then it is an error. */ if ( !( status == ENOENT && (oflag & O_CREAT) ) ) { 10dde2: 83 f8 02 cmp $0x2,%eax 10dde5: 75 0a jne 10ddf1 10dde7: 83 7d d0 00 cmpl $0x0,-0x30(%ebp) 10ddeb: 0f 85 8e 00 00 00 jne 10de7f RTEMS_INLINE_ROUTINE void _POSIX_Message_queue_Free_fd ( POSIX_Message_queue_Control_fd *the_mq_fd ) { _Objects_Free( &_POSIX_Message_queue_Information_fds, &the_mq_fd->Object ); 10ddf1: 56 push %esi 10ddf2: 56 push %esi 10ddf3: 53 push %ebx 10ddf4: 68 20 d3 12 00 push $0x12d320 10ddf9: e8 3e 2a 00 00 call 11083c <_Objects_Free> _POSIX_Message_queue_Free_fd( the_mq_fd ); _Thread_Enable_dispatch(); 10ddfe: e8 9a 33 00 00 call 11119d <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one_cast( status, mqd_t ); 10de03: e8 50 8d 00 00 call 116b58 <__errno> 10de08: 89 38 mov %edi,(%eax) 10de0a: eb 2b jmp 10de37 <== ALWAYS TAKEN } else { /* name -> ID translation succeeded */ /* * Check for existence with creation. */ if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) { 10de0c: 81 e6 00 0a 00 00 and $0xa00,%esi 10de12: 81 fe 00 0a 00 00 cmp $0xa00,%esi 10de18: 75 28 jne 10de42 10de1a: 51 push %ecx 10de1b: 51 push %ecx 10de1c: 53 push %ebx 10de1d: 68 20 d3 12 00 push $0x12d320 10de22: e8 15 2a 00 00 call 11083c <_Objects_Free> _POSIX_Message_queue_Free_fd( the_mq_fd ); _Thread_Enable_dispatch(); 10de27: e8 71 33 00 00 call 11119d <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one_cast( EEXIST, mqd_t ); 10de2c: e8 27 8d 00 00 call 116b58 <__errno> 10de31: c7 00 11 00 00 00 movl $0x11,(%eax) 10de37: 83 c8 ff or $0xffffffff,%eax 10de3a: 83 c4 10 add $0x10,%esp 10de3d: e9 89 00 00 00 jmp 10decb <== ALWAYS TAKEN RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control *_POSIX_Message_queue_Get ( Objects_Id id, Objects_Locations *location ) { return (POSIX_Message_queue_Control *) 10de42: 52 push %edx 10de43: 8d 45 dc lea -0x24(%ebp),%eax 10de46: 50 push %eax 10de47: ff 75 e4 pushl -0x1c(%ebp) 10de4a: 68 94 d1 12 00 push $0x12d194 10de4f: e8 10 2b 00 00 call 110964 <_Objects_Get> /* * In this case we need to do an ID->pointer conversion to * check the mode. */ the_mq = _POSIX_Message_queue_Get( the_mq_id, &location ); 10de54: 89 45 e0 mov %eax,-0x20(%ebp) the_mq->open_count += 1; 10de57: ff 40 18 incl 0x18(%eax) the_mq_fd->Queue = the_mq; 10de5a: 89 43 10 mov %eax,0x10(%ebx) #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10de5d: 0f b7 53 08 movzwl 0x8(%ebx),%edx 10de61: a1 3c d3 12 00 mov 0x12d33c,%eax 10de66: 89 1c 90 mov %ebx,(%eax,%edx,4) the_object ); #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) /* ASSERT: information->is_string */ the_object->name.name_p = name; 10de69: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx) _Objects_Open_string( &_POSIX_Message_queue_Information_fds, &the_mq_fd->Object, NULL ); _Thread_Enable_dispatch(); 10de70: e8 28 33 00 00 call 11119d <_Thread_Enable_dispatch> _Thread_Enable_dispatch(); 10de75: e8 23 33 00 00 call 11119d <_Thread_Enable_dispatch> return (mqd_t)the_mq_fd->Object.id; 10de7a: 8b 43 08 mov 0x8(%ebx),%eax 10de7d: eb bb jmp 10de3a <== ALWAYS TAKEN /* * At this point, the message queue does not exist and everything has been * checked. We should go ahead and create a message queue. */ status = _POSIX_Message_queue_Create_support( 10de7f: 8d 45 e0 lea -0x20(%ebp),%eax 10de82: 50 push %eax 10de83: ff 75 d4 pushl -0x2c(%ebp) 10de86: 6a 01 push $0x1 10de88: ff 75 08 pushl 0x8(%ebp) 10de8b: e8 d4 58 00 00 call 113764 <_POSIX_Message_queue_Create_support> ); /* * errno was set by Create_support, so don't set it again. */ if ( status == -1 ) { 10de90: 83 c4 10 add $0x10,%esp 10de93: 40 inc %eax 10de94: 75 14 jne 10deaa RTEMS_INLINE_ROUTINE void _POSIX_Message_queue_Free_fd ( POSIX_Message_queue_Control_fd *the_mq_fd ) { _Objects_Free( &_POSIX_Message_queue_Information_fds, &the_mq_fd->Object ); 10de96: 50 push %eax 10de97: 50 push %eax 10de98: 53 push %ebx 10de99: 68 20 d3 12 00 push $0x12d320 10de9e: e8 99 29 00 00 call 11083c <_Objects_Free> _POSIX_Message_queue_Free_fd( the_mq_fd ); _Thread_Enable_dispatch(); 10dea3: e8 f5 32 00 00 call 11119d <_Thread_Enable_dispatch> 10dea8: eb 8d jmp 10de37 <== ALWAYS TAKEN return (mqd_t) -1; } the_mq_fd->Queue = the_mq; 10deaa: 8b 45 e0 mov -0x20(%ebp),%eax 10dead: 89 43 10 mov %eax,0x10(%ebx) #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10deb0: 0f b7 53 08 movzwl 0x8(%ebx),%edx 10deb4: a1 3c d3 12 00 mov 0x12d33c,%eax 10deb9: 89 1c 90 mov %ebx,(%eax,%edx,4) the_object ); #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) /* ASSERT: information->is_string */ the_object->name.name_p = name; 10debc: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx) &_POSIX_Message_queue_Information_fds, &the_mq_fd->Object, NULL ); _Thread_Enable_dispatch(); 10dec3: e8 d5 32 00 00 call 11119d <_Thread_Enable_dispatch> return (mqd_t) the_mq_fd->Object.id; 10dec8: 8b 43 08 mov 0x8(%ebx),%eax } 10decb: 8d 65 f4 lea -0xc(%ebp),%esp 10dece: 5b pop %ebx 10decf: 5e pop %esi 10ded0: 5f pop %edi 10ded1: c9 leave 10ded2: c3 ret 0010ded4 : mqd_t mqdes, char *msg_ptr, size_t msg_len, unsigned int *msg_prio ) { 10ded4: 55 push %ebp 10ded5: 89 e5 mov %esp,%ebp 10ded7: 83 ec 10 sub $0x10,%esp return _POSIX_Message_queue_Receive_support( 10deda: 6a 00 push $0x0 10dedc: 6a 01 push $0x1 10dede: ff 75 14 pushl 0x14(%ebp) 10dee1: ff 75 10 pushl 0x10(%ebp) 10dee4: ff 75 0c pushl 0xc(%ebp) 10dee7: ff 75 08 pushl 0x8(%ebp) 10deea: e8 05 00 00 00 call 10def4 <_POSIX_Message_queue_Receive_support> <== ALWAYS TAKEN msg_len, msg_prio, true, THREAD_QUEUE_WAIT_FOREVER ); } 10deef: c9 leave 10def0: c3 ret 0010dff0 : mqd_t mqdes, const char *msg_ptr, size_t msg_len, unsigned int msg_prio ) { 10dff0: 55 push %ebp 10dff1: 89 e5 mov %esp,%ebp 10dff3: 83 ec 10 sub $0x10,%esp return _POSIX_Message_queue_Send_support( 10dff6: 6a 00 push $0x0 10dff8: 6a 01 push $0x1 10dffa: ff 75 14 pushl 0x14(%ebp) 10dffd: ff 75 10 pushl 0x10(%ebp) 10e000: ff 75 0c pushl 0xc(%ebp) 10e003: ff 75 08 pushl 0x8(%ebp) 10e006: e8 05 00 00 00 call 10e010 <_POSIX_Message_queue_Send_support> <== ALWAYS TAKEN msg_len, msg_prio, true, THREAD_QUEUE_WAIT_FOREVER ); } 10e00b: c9 leave 10e00c: c3 ret 0010e0e8 : int mq_setattr( mqd_t mqdes, const struct mq_attr *mqstat, struct mq_attr *omqstat ) { 10e0e8: 55 push %ebp 10e0e9: 89 e5 mov %esp,%ebp 10e0eb: 56 push %esi 10e0ec: 53 push %ebx 10e0ed: 83 ec 10 sub $0x10,%esp 10e0f0: 8b 75 0c mov 0xc(%ebp),%esi 10e0f3: 8b 5d 10 mov 0x10(%ebp),%ebx POSIX_Message_queue_Control_fd *the_mq_fd; CORE_message_queue_Control *the_core_mq; Objects_Locations location; if ( !mqstat ) 10e0f6: 85 f6 test %esi,%esi 10e0f8: 75 0d jne 10e107 rtems_set_errno_and_return_minus_one( EINVAL ); 10e0fa: e8 59 8a 00 00 call 116b58 <__errno> 10e0ff: c7 00 16 00 00 00 movl $0x16,(%eax) 10e105: eb 52 jmp 10e159 <== ALWAYS TAKEN 10e107: 50 push %eax 10e108: 8d 45 f4 lea -0xc(%ebp),%eax 10e10b: 50 push %eax 10e10c: ff 75 08 pushl 0x8(%ebp) 10e10f: 68 20 d3 12 00 push $0x12d320 10e114: e8 4b 28 00 00 call 110964 <_Objects_Get> the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { 10e119: 83 c4 10 add $0x10,%esp 10e11c: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 10e120: 75 2c jne 10e14e case OBJECTS_LOCAL: the_core_mq = &the_mq_fd->Queue->Message_queue; 10e122: 8b 50 10 mov 0x10(%eax),%edx /* * Return the old values. */ if ( omqstat ) { 10e125: 85 db test %ebx,%ebx 10e127: 74 17 je 10e140 omqstat->mq_flags = the_mq_fd->oflag; 10e129: 8b 48 14 mov 0x14(%eax),%ecx 10e12c: 89 0b mov %ecx,(%ebx) omqstat->mq_msgsize = the_core_mq->maximum_message_size; 10e12e: 8b 4a 68 mov 0x68(%edx),%ecx 10e131: 89 4b 08 mov %ecx,0x8(%ebx) omqstat->mq_maxmsg = the_core_mq->maximum_pending_messages; 10e134: 8b 4a 60 mov 0x60(%edx),%ecx 10e137: 89 4b 04 mov %ecx,0x4(%ebx) omqstat->mq_curmsgs = the_core_mq->number_of_pending_messages; 10e13a: 8b 52 64 mov 0x64(%edx),%edx 10e13d: 89 53 0c mov %edx,0xc(%ebx) } the_mq_fd->oflag = mqstat->mq_flags; 10e140: 8b 16 mov (%esi),%edx 10e142: 89 50 14 mov %edx,0x14(%eax) _Thread_Enable_dispatch(); 10e145: e8 53 30 00 00 call 11119d <_Thread_Enable_dispatch> 10e14a: 31 c0 xor %eax,%eax return 0; 10e14c: eb 0e jmp 10e15c <== ALWAYS TAKEN #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); 10e14e: e8 05 8a 00 00 call 116b58 <__errno> 10e153: c7 00 09 00 00 00 movl $0x9,(%eax) 10e159: 83 c8 ff or $0xffffffff,%eax } 10e15c: 8d 65 f8 lea -0x8(%ebp),%esp 10e15f: 5b pop %ebx 10e160: 5e pop %esi 10e161: c9 leave 10e162: c3 ret 0010e164 : char *msg_ptr, size_t msg_len, unsigned int *msg_prio, const struct timespec *abstime ) { 10e164: 55 push %ebp 10e165: 89 e5 mov %esp,%ebp 10e167: 83 ec 20 sub $0x20,%esp * * If the status is POSIX_ABSOLUTE_TIMEOUT_INVALID, * POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST, or POSIX_ABSOLUTE_TIMEOUT_IS_NOW, * then we should not wait. */ status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks ); 10e16a: 8d 45 f4 lea -0xc(%ebp),%eax 10e16d: 50 push %eax 10e16e: ff 75 18 pushl 0x18(%ebp) 10e171: e8 d2 00 00 00 call 10e248 <_POSIX_Absolute_timeout_to_ticks> <== ALWAYS TAKEN if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE ) do_wait = false; return _POSIX_Message_queue_Receive_support( 10e176: 5a pop %edx 10e177: 59 pop %ecx 10e178: ff 75 f4 pushl -0xc(%ebp) 10e17b: 83 f8 03 cmp $0x3,%eax 10e17e: 0f 94 c0 sete %al 10e181: 0f b6 c0 movzbl %al,%eax 10e184: 50 push %eax 10e185: ff 75 14 pushl 0x14(%ebp) 10e188: ff 75 10 pushl 0x10(%ebp) 10e18b: ff 75 0c pushl 0xc(%ebp) 10e18e: ff 75 08 pushl 0x8(%ebp) 10e191: e8 5e fd ff ff call 10def4 <_POSIX_Message_queue_Receive_support> msg_len, msg_prio, do_wait, ticks ); } 10e196: c9 leave 10e197: c3 ret 0010e198 : const char *msg_ptr, size_t msg_len, unsigned int msg_prio, const struct timespec *abstime ) { 10e198: 55 push %ebp 10e199: 89 e5 mov %esp,%ebp 10e19b: 83 ec 20 sub $0x20,%esp * * If the status is POSIX_ABSOLUTE_TIMEOUT_INVALID, * POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST, or POSIX_ABSOLUTE_TIMEOUT_IS_NOW, * then we should not wait. */ status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks ); 10e19e: 8d 45 f4 lea -0xc(%ebp),%eax 10e1a1: 50 push %eax 10e1a2: ff 75 18 pushl 0x18(%ebp) 10e1a5: e8 9e 00 00 00 call 10e248 <_POSIX_Absolute_timeout_to_ticks> <== ALWAYS TAKEN if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE ) do_wait = false; return _POSIX_Message_queue_Send_support( 10e1aa: 5a pop %edx 10e1ab: 59 pop %ecx 10e1ac: ff 75 f4 pushl -0xc(%ebp) 10e1af: 83 f8 03 cmp $0x3,%eax 10e1b2: 0f 94 c0 sete %al 10e1b5: 0f b6 c0 movzbl %al,%eax 10e1b8: 50 push %eax 10e1b9: ff 75 14 pushl 0x14(%ebp) 10e1bc: ff 75 10 pushl 0x10(%ebp) 10e1bf: ff 75 0c pushl 0xc(%ebp) 10e1c2: ff 75 08 pushl 0x8(%ebp) 10e1c5: e8 46 fe ff ff call 10e010 <_POSIX_Message_queue_Send_support> <== ALWAYS TAKEN msg_len, msg_prio, do_wait, ticks ); } 10e1ca: c9 leave 10e1cb: c3 ret 0010e1dc : */ int mq_unlink( const char *name ) { 10e1dc: 55 push %ebp 10e1dd: 89 e5 mov %esp,%ebp 10e1df: 53 push %ebx 10e1e0: 83 ec 1c sub $0x1c,%esp 10e1e3: a1 2c ce 12 00 mov 0x12ce2c,%eax 10e1e8: 40 inc %eax 10e1e9: a3 2c ce 12 00 mov %eax,0x12ce2c register POSIX_Message_queue_Control *the_mq; Objects_Id the_mq_id; _Thread_Disable_dispatch(); status = _POSIX_Message_queue_Name_to_id( name, &the_mq_id ); 10e1ee: 8d 45 f4 lea -0xc(%ebp),%eax 10e1f1: 50 push %eax 10e1f2: ff 75 08 pushl 0x8(%ebp) 10e1f5: e8 d2 56 00 00 call 1138cc <_POSIX_Message_queue_Name_to_id> 10e1fa: 89 c3 mov %eax,%ebx if ( status != 0 ) { 10e1fc: 83 c4 10 add $0x10,%esp 10e1ff: 85 c0 test %eax,%eax 10e201: 74 11 je 10e214 _Thread_Enable_dispatch(); 10e203: e8 95 2f 00 00 call 11119d <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( status ); 10e208: e8 4b 89 00 00 call 116b58 <__errno> 10e20d: 89 18 mov %ebx,(%eax) 10e20f: 83 c8 ff or $0xffffffff,%eax 10e212: eb 2f jmp 10e243 <== ALWAYS TAKEN } the_mq = (POSIX_Message_queue_Control *) _Objects_Get_local_object( 10e214: 0f b7 55 f4 movzwl -0xc(%ebp),%edx 10e218: a1 b0 d1 12 00 mov 0x12d1b0,%eax 10e21d: 8b 1c 90 mov (%eax,%edx,4),%ebx &_POSIX_Message_queue_Information, _Objects_Get_index( the_mq_id ) ); the_mq->linked = false; 10e220: c6 43 15 00 movb $0x0,0x15(%ebx) RTEMS_INLINE_ROUTINE void _POSIX_Message_queue_Namespace_remove ( POSIX_Message_queue_Control *the_mq ) { _Objects_Namespace_remove( 10e224: 50 push %eax 10e225: 50 push %eax 10e226: 53 push %ebx 10e227: 68 94 d1 12 00 push $0x12d194 10e22c: e8 77 28 00 00 call 110aa8 <_Objects_Namespace_remove> _POSIX_Message_queue_Namespace_remove( the_mq ); _POSIX_Message_queue_Delete( the_mq ); 10e231: 89 1c 24 mov %ebx,(%esp) 10e234: e8 ab f9 ff ff call 10dbe4 <_POSIX_Message_queue_Delete> <== ALWAYS TAKEN _Thread_Enable_dispatch(); 10e239: e8 5f 2f 00 00 call 11119d <_Thread_Enable_dispatch> 10e23e: 31 c0 xor %eax,%eax return 0; 10e240: 83 c4 10 add $0x10,%esp } 10e243: 8b 5d fc mov -0x4(%ebp),%ebx 10e246: c9 leave 10e247: c3 ret 00124e60 : int nanosleep( const struct timespec *rqtp, struct timespec *rmtp ) { 124e60: 55 push %ebp 124e61: 89 e5 mov %esp,%ebp 124e63: 56 push %esi 124e64: 53 push %ebx 124e65: 8b 75 08 mov 0x8(%ebp),%esi 124e68: 8b 5d 0c mov 0xc(%ebp),%ebx Watchdog_Interval ticks; if ( !_Timespec_Is_valid( rqtp ) ) 124e6b: 83 ec 0c sub $0xc,%esp 124e6e: 56 push %esi 124e6f: e8 f4 00 00 00 call 124f68 <_Timespec_Is_valid> <== ALWAYS TAKEN 124e74: 83 c4 10 add $0x10,%esp 124e77: 84 c0 test %al,%al 124e79: 74 0b je 124e86 * Return EINVAL if the delay interval is negative. * * NOTE: This behavior is beyond the POSIX specification. * FSU and GNU/Linux pthreads shares this behavior. */ if ( rqtp->tv_sec < 0 || rqtp->tv_nsec < 0 ) 124e7b: 83 3e 00 cmpl $0x0,(%esi) 124e7e: 78 06 js 124e86 <== ALWAYS TAKEN 124e80: 83 7e 04 00 cmpl $0x0,0x4(%esi) 124e84: 79 10 jns 124e96 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); 124e86: e8 01 2f ff ff call 117d8c <__errno> 124e8b: c7 00 16 00 00 00 movl $0x16,(%eax) 124e91: e9 c4 00 00 00 jmp 124f5a <== ALWAYS TAKEN ticks = _Timespec_To_ticks( rqtp ); 124e96: 83 ec 0c sub $0xc,%esp 124e99: 56 push %esi 124e9a: e8 d5 03 ff ff call 115274 <_Timespec_To_ticks> 124e9f: 89 c6 mov %eax,%esi * A nanosleep for zero time is implemented as a yield. * This behavior is also beyond the POSIX specification but is * consistent with the RTEMS API and yields desirable behavior. */ if ( !ticks ) { 124ea1: 83 c4 10 add $0x10,%esp 124ea4: 85 c0 test %eax,%eax 124ea6: 75 2f jne 124ed7 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 124ea8: a1 d0 fa 12 00 mov 0x12fad0,%eax 124ead: 40 inc %eax 124eae: a3 d0 fa 12 00 mov %eax,0x12fad0 _Thread_Disable_dispatch(); _Thread_Yield_processor(); 124eb3: e8 94 ae fe ff call 10fd4c <_Thread_Yield_processor> _Thread_Enable_dispatch(); 124eb8: e8 98 a3 fe ff call 10f255 <_Thread_Enable_dispatch> if ( rmtp ) { 124ebd: 85 db test %ebx,%ebx 124ebf: 0f 84 9a 00 00 00 je 124f5f rmtp->tv_sec = 0; 124ec5: c7 03 00 00 00 00 movl $0x0,(%ebx) rmtp->tv_nsec = 0; 124ecb: c7 43 04 00 00 00 00 movl $0x0,0x4(%ebx) 124ed2: e9 88 00 00 00 jmp 124f5f <== ALWAYS TAKEN 124ed7: a1 d0 fa 12 00 mov 0x12fad0,%eax 124edc: 40 inc %eax 124edd: a3 d0 fa 12 00 mov %eax,0x12fad0 /* * Block for the desired amount of time */ _Thread_Disable_dispatch(); _Thread_Set_state( 124ee2: 52 push %edx 124ee3: 52 push %edx 124ee4: 68 08 00 00 10 push $0x10000008 124ee9: ff 35 8c fb 12 00 pushl 0x12fb8c 124eef: e8 78 ab fe ff call 10fa6c <_Thread_Set_state> STATES_DELAYING | STATES_INTERRUPTIBLE_BY_SIGNAL ); _Watchdog_Initialize( &_Thread_Executing->Timer, _Thread_Delay_ended, _Thread_Executing->Object.id, 124ef4: 8b 15 8c fb 12 00 mov 0x12fb8c,%edx _Thread_Disable_dispatch(); _Thread_Set_state( _Thread_Executing, STATES_DELAYING | STATES_INTERRUPTIBLE_BY_SIGNAL ); _Watchdog_Initialize( 124efa: 8b 42 08 mov 0x8(%edx),%eax Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 124efd: c7 42 50 00 00 00 00 movl $0x0,0x50(%edx) the_watchdog->routine = routine; 124f04: c7 42 64 d8 f0 10 00 movl $0x10f0d8,0x64(%edx) the_watchdog->id = id; 124f0b: 89 42 68 mov %eax,0x68(%edx) the_watchdog->user_data = user_data; 124f0e: c7 42 6c 00 00 00 00 movl $0x0,0x6c(%edx) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 124f15: 89 72 54 mov %esi,0x54(%edx) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 124f18: 59 pop %ecx 124f19: 58 pop %eax 124f1a: 83 c2 48 add $0x48,%edx 124f1d: 52 push %edx 124f1e: 68 ac fb 12 00 push $0x12fbac 124f23: e8 84 b1 fe ff call 1100ac <_Watchdog_Insert> _Thread_Delay_ended, _Thread_Executing->Object.id, NULL ); _Watchdog_Insert_ticks( &_Thread_Executing->Timer, ticks ); _Thread_Enable_dispatch(); 124f28: e8 28 a3 fe ff call 10f255 <_Thread_Enable_dispatch> /* calculate time remaining */ if ( rmtp ) { 124f2d: 83 c4 10 add $0x10,%esp 124f30: 85 db test %ebx,%ebx 124f32: 74 2b je 124f5f ticks -= _Thread_Executing->Timer.stop_time - _Thread_Executing->Timer.start_time; 124f34: a1 8c fb 12 00 mov 0x12fb8c,%eax _Thread_Enable_dispatch(); /* calculate time remaining */ if ( rmtp ) { ticks -= 124f39: 03 70 5c add 0x5c(%eax),%esi 124f3c: 2b 70 60 sub 0x60(%eax),%esi _Thread_Executing->Timer.stop_time - _Thread_Executing->Timer.start_time; _Timespec_From_ticks( ticks, rmtp ); 124f3f: 50 push %eax 124f40: 50 push %eax 124f41: 53 push %ebx 124f42: 56 push %esi 124f43: e8 04 03 ff ff call 11524c <_Timespec_From_ticks> */ #if defined(RTEMS_POSIX_API) /* * If there is time remaining, then we were interrupted by a signal. */ if ( ticks ) 124f48: 83 c4 10 add $0x10,%esp 124f4b: 85 f6 test %esi,%esi 124f4d: 74 10 je 124f5f rtems_set_errno_and_return_minus_one( EINTR ); 124f4f: e8 38 2e ff ff call 117d8c <__errno> 124f54: c7 00 04 00 00 00 movl $0x4,(%eax) 124f5a: 83 c8 ff or $0xffffffff,%eax 124f5d: eb 02 jmp 124f61 <== ALWAYS TAKEN 124f5f: 31 c0 xor %eax,%eax #endif } return 0; } 124f61: 8d 65 f8 lea -0x8(%ebp),%esp 124f64: 5b pop %ebx 124f65: 5e pop %esi 124f66: c9 leave 124f67: c3 ret 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 20 20 12 00 mov 0x122020,%ebx 107795: eb 06 jmp 10779d <== ALWAYS TAKEN } else { ptr = deleted_task->libc_reent; 107797: 8b 9e f0 00 00 00 mov 0xf0(%esi),%ebx } if (ptr && ptr != _global_impure_ptr) { 10779d: 85 db test %ebx,%ebx 10779f: 74 20 je 1077c1 <== ALWAYS TAKEN 1077a1: 3b 1d c0 f2 11 00 cmp 0x11f2c0,%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 96 a4 00 00 call 111c4c <_fwalk> #if REENT_MALLOCED free(ptr); #else _Workspace_Free(ptr); 1077b6: 89 1c 24 mov %ebx,(%esp) 1077b9: e8 1f 54 00 00 call 10cbdd <_Workspace_Free> 1077be: 83 c4 10 add $0x10,%esp #endif } deleted_task->libc_reent = NULL; 1077c1: c7 86 f0 00 00 00 00 movl $0x0,0xf0(%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 20 20 12 00 00 movl $0x0,0x122020 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 63 a0 00 00 call 111854 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 e8 9d 00 00 call 111610 <== 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 00 5e 12 00 00 cmpb $0x0,0x125e00 1077b1: 75 2b jne 1077de initialized = 1; 1077b3: c6 05 00 5e 12 00 01 movb $0x1,0x125e00 status = rtems_io_register_name( 1077ba: 50 push %eax 1077bb: 6a 00 push $0x0 1077bd: 53 push %ebx 1077be: 68 9c fd 11 00 push $0x11fd9c 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 e4 39 00 00 call 10b1bc <== NOT EXECUTED NULL_major = major; 1077d8: 89 1d 30 61 12 00 mov %ebx,0x126130 } 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 f6 63 00 00 call 10df2b <== 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 51 99 00 00 call 1114c4 <__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 18 99 00 00 call 1114c4 <__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 98 63 00 00 call 10dfb6 <== 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 64 98 00 00 call 1114c4 <__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 90 40 12 00 sub 0x124090,%eax 107c80: c1 f8 06 sar $0x6,%eax 107c83: 50 push %eax 107c84: e8 17 60 00 00 call 10dca0 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 2d 98 00 00 call 1114c4 <__errno> <== NOT EXECUTED 107c97: 83 38 00 cmpl $0x0,(%eax) <== NOT EXECUTED 107c9a: 74 07 je 107ca3 <== NOT EXECUTED 107c9c: e8 23 98 00 00 call 1114c4 <__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 90 40 12 00 sub 0x124090,%ebx <== NOT EXECUTED 107cac: c1 fb 06 sar $0x6,%ebx <== NOT EXECUTED 107caf: 53 push %ebx <== NOT EXECUTED 107cb0: e8 63 5f 00 00 call 10dc18 <== 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 09 62 00 00 call 10ded6 <== 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 d4 97 00 00 call 1114c4 <__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 90 40 12 00 sub 0x124090,%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 d2 d1 11 00 push $0x11d1d2 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 d2 d1 11 00 push $0x11d1d2 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 d2 d1 11 00 push $0x11d1d2 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 e5 29 00 00 call 10a4ec <== 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 18 e7 11 00 push $0x11e718 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 2c e4 11 00 push $0x11e42c 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 00 20 12 00 mov 0x122000,%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 00 20 12 00 mov 0x122000,%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 00110c54 : * Called by pipe() to create an anonymous pipe. */ int pipe_create( int filsdes[2] ) { 110c54: 55 push %ebp 110c55: 89 e5 mov %esp,%ebp 110c57: 57 push %edi 110c58: 56 push %esi 110c59: 53 push %ebx 110c5a: 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) 110c5d: 6a 01 push $0x1 110c5f: 8d 5d c4 lea -0x3c(%ebp),%ebx 110c62: 53 push %ebx 110c63: 6a 07 push $0x7 110c65: 6a 03 push $0x3 110c67: 68 0f ef 11 00 push $0x11ef0f 110c6c: e8 17 64 ff ff call 107088 110c71: 83 c4 20 add $0x20,%esp 110c74: 85 c0 test %eax,%eax 110c76: 74 2b je 110ca3 <== ALWAYS TAKEN != 0) { if (errno != ENOENT) 110c78: e8 47 08 00 00 call 1114c4 <__errno> 110c7d: 83 38 02 cmpl $0x2,(%eax) 110c80: 0f 85 0c 01 00 00 jne 110d92 <== ALWAYS TAKEN return -1; if (mkdir("/tmp", S_IRWXU|S_IRWXG|S_IRWXO|S_ISVTX) != 0) 110c86: 50 push %eax 110c87: 50 push %eax 110c88: 68 ff 03 00 00 push $0x3ff 110c8d: 68 0f ef 11 00 push $0x11ef0f 110c92: e8 69 67 ff ff call 107400 110c97: 83 c4 10 add $0x10,%esp 110c9a: 85 c0 test %eax,%eax 110c9c: 74 1c je 110cba <== NEVER TAKEN 110c9e: e9 ef 00 00 00 jmp 110d92 <== NOT EXECUTED return -1; } else rtems_filesystem_freenode(&loc); 110ca3: 8b 45 d0 mov -0x30(%ebp),%eax <== NOT EXECUTED 110ca6: 85 c0 test %eax,%eax <== NOT EXECUTED 110ca8: 74 10 je 110cba <== NOT EXECUTED 110caa: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 110cad: 85 c0 test %eax,%eax <== NOT EXECUTED 110caf: 74 09 je 110cba <== NOT EXECUTED 110cb1: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 110cb4: 53 push %ebx <== NOT EXECUTED 110cb5: ff d0 call *%eax <== NOT EXECUTED 110cb7: 83 c4 10 add $0x10,%esp <== NOT EXECUTED /* /tmp/.fifoXXXX */ char fifopath[15]; memcpy(fifopath, "/tmp/.fifo", 10); 110cba: 8d 5d d9 lea -0x27(%ebp),%ebx 110cbd: be 14 ef 11 00 mov $0x11ef14,%esi 110cc2: b9 0a 00 00 00 mov $0xa,%ecx 110cc7: 89 df mov %ebx,%edi 110cc9: f3 a4 rep movsb %ds:(%esi),%es:(%edi) sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); 110ccb: 0f b7 05 9c 3e 12 00 movzwl 0x123e9c,%eax 110cd2: 8d 50 01 lea 0x1(%eax),%edx 110cd5: 66 89 15 9c 3e 12 00 mov %dx,0x123e9c 110cdc: 57 push %edi 110cdd: 50 push %eax 110cde: 68 1f ef 11 00 push $0x11ef1f 110ce3: 8d 45 e3 lea -0x1d(%ebp),%eax 110ce6: 50 push %eax 110ce7: e8 44 11 00 00 call 111e30 /* Try creating FIFO file until find an available file name */ while (mkfifo(fifopath, S_IRUSR|S_IWUSR) != 0) { 110cec: 59 pop %ecx 110ced: 5e pop %esi 110cee: 68 80 01 00 00 push $0x180 110cf3: 53 push %ebx 110cf4: e8 f7 00 00 00 call 110df0 110cf9: 83 c4 10 add $0x10,%esp 110cfc: 85 c0 test %eax,%eax 110cfe: 74 0a je 110d0a <== NEVER TAKEN if (errno != EEXIST){ 110d00: e8 bf 07 00 00 call 1114c4 <__errno> <== NOT EXECUTED 110d05: e9 88 00 00 00 jmp 110d92 <== 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); 110d0a: 52 push %edx 110d0b: 52 push %edx 110d0c: 68 00 40 00 00 push $0x4000 110d11: 53 push %ebx 110d12: e8 f5 6d ff ff call 107b0c 110d17: 8b 55 08 mov 0x8(%ebp),%edx 110d1a: 89 02 mov %eax,(%edx) if (filsdes[0] < 0) { 110d1c: 83 c4 10 add $0x10,%esp 110d1f: 85 c0 test %eax,%eax 110d21: 79 0d jns 110d30 <== ALWAYS TAKEN err = errno; 110d23: e8 9c 07 00 00 call 1114c4 <__errno> 110d28: 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); 110d2a: 83 ec 0c sub $0xc,%esp 110d2d: 53 push %ebx 110d2e: eb 53 jmp 110d83 <== ALWAYS TAKEN } else { /* Reset open file to blocking mode */ iop = rtems_libio_iop(filsdes[0]); 110d30: 31 d2 xor %edx,%edx <== NOT EXECUTED 110d32: 3b 05 44 01 12 00 cmp 0x120144,%eax <== NOT EXECUTED 110d38: 73 0b jae 110d45 <== NOT EXECUTED 110d3a: 89 c2 mov %eax,%edx <== NOT EXECUTED 110d3c: c1 e2 06 shl $0x6,%edx <== NOT EXECUTED 110d3f: 03 15 90 40 12 00 add 0x124090,%edx <== NOT EXECUTED iop->flags &= ~LIBIO_FLAGS_NO_DELAY; 110d45: 83 62 14 fe andl $0xfffffffe,0x14(%edx) <== NOT EXECUTED filsdes[1] = open(fifopath, O_WRONLY); 110d49: 50 push %eax <== NOT EXECUTED 110d4a: 50 push %eax <== NOT EXECUTED 110d4b: 6a 01 push $0x1 <== NOT EXECUTED 110d4d: 8d 45 d9 lea -0x27(%ebp),%eax <== NOT EXECUTED 110d50: 50 push %eax <== NOT EXECUTED 110d51: e8 b6 6d ff ff call 107b0c <== NOT EXECUTED 110d56: 8b 55 08 mov 0x8(%ebp),%edx <== NOT EXECUTED 110d59: 89 42 04 mov %eax,0x4(%edx) <== NOT EXECUTED if (filsdes[1] < 0) { 110d5c: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 110d5f: 31 f6 xor %esi,%esi <== NOT EXECUTED 110d61: 85 c0 test %eax,%eax <== NOT EXECUTED 110d63: 79 17 jns 110d7c <== NOT EXECUTED err = errno; 110d65: e8 5a 07 00 00 call 1114c4 <__errno> <== NOT EXECUTED 110d6a: 8b 30 mov (%eax),%esi <== NOT EXECUTED close(filsdes[0]); 110d6c: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 110d6f: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 110d72: ff 30 pushl (%eax) <== NOT EXECUTED 110d74: e8 9f ce ff ff call 10dc18 <== NOT EXECUTED 110d79: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } unlink(fifopath); 110d7c: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 110d7f: 8d 45 d9 lea -0x27(%ebp),%eax <== NOT EXECUTED 110d82: 50 push %eax <== NOT EXECUTED 110d83: e8 84 00 00 00 call 110e0c 110d88: 83 c4 10 add $0x10,%esp } rtems_set_errno_and_return_minus_one(err); 110d8b: e8 34 07 00 00 call 1114c4 <__errno> 110d90: 89 30 mov %esi,(%eax) } 110d92: 83 c8 ff or $0xffffffff,%eax 110d95: 8d 65 f4 lea -0xc(%ebp),%esp 110d98: 5b pop %ebx 110d99: 5e pop %esi 110d9a: 5f pop %edi 110d9b: c9 leave 110d9c: c3 ret 0010fb3c : /* Called with rtems_pipe_semaphore held. */ static inline void pipe_free( pipe_control_t *pipe ) { 10fb3c: 55 push %ebp <== NOT EXECUTED 10fb3d: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10fb3f: 53 push %ebx <== NOT EXECUTED 10fb40: 83 ec 10 sub $0x10,%esp <== NOT EXECUTED 10fb43: 89 c3 mov %eax,%ebx <== NOT EXECUTED rtems_barrier_delete(pipe->readBarrier); 10fb45: ff 70 2c pushl 0x2c(%eax) <== NOT EXECUTED 10fb48: e8 a3 0b 00 00 call 1106f0 <== NOT EXECUTED rtems_barrier_delete(pipe->writeBarrier); 10fb4d: 59 pop %ecx <== NOT EXECUTED 10fb4e: ff 73 30 pushl 0x30(%ebx) <== NOT EXECUTED 10fb51: e8 9a 0b 00 00 call 1106f0 <== NOT EXECUTED rtems_semaphore_delete(pipe->Semaphore); 10fb56: 5a pop %edx <== NOT EXECUTED 10fb57: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED 10fb5a: e8 3d a3 ff ff call 109e9c <== NOT EXECUTED free(pipe->Buffer); 10fb5f: 58 pop %eax <== NOT EXECUTED 10fb60: ff 33 pushl (%ebx) <== NOT EXECUTED 10fb62: e8 c9 75 ff ff call 107130 <== NOT EXECUTED free(pipe); 10fb67: 89 1c 24 mov %ebx,(%esp) <== NOT EXECUTED 10fb6a: e8 c1 75 ff ff call 107130 <== NOT EXECUTED 10fb6f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } 10fb72: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 10fb75: c9 leave <== NOT EXECUTED 10fb76: c3 ret <== NOT EXECUTED 0010f7db : pipe_control_t *pipe, uint32_t cmd, void *buffer, rtems_libio_t *iop ) { 10f7db: 55 push %ebp <== NOT EXECUTED 10f7dc: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10f7de: 56 push %esi <== NOT EXECUTED 10f7df: 53 push %ebx <== NOT EXECUTED 10f7e0: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED 10f7e3: 8b 75 10 mov 0x10(%ebp),%esi <== NOT EXECUTED if (cmd == FIONREAD) { 10f7e6: b8 ea ff ff ff mov $0xffffffea,%eax <== NOT EXECUTED 10f7eb: 81 7d 0c 7f 66 04 40 cmpl $0x4004667f,0xc(%ebp) <== NOT EXECUTED 10f7f2: 75 36 jne 10f82a <== NOT EXECUTED if (buffer == NULL) 10f7f4: b0 f2 mov $0xf2,%al <== NOT EXECUTED 10f7f6: 85 f6 test %esi,%esi <== NOT EXECUTED 10f7f8: 74 30 je 10f82a <== NOT EXECUTED return -EFAULT; if (! PIPE_LOCK(pipe)) 10f7fa: 50 push %eax <== NOT EXECUTED 10f7fb: 6a 00 push $0x0 <== NOT EXECUTED 10f7fd: 6a 00 push $0x0 <== NOT EXECUTED 10f7ff: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED 10f802: e8 25 a7 ff ff call 109f2c <== NOT EXECUTED 10f807: 89 c2 mov %eax,%edx <== NOT EXECUTED 10f809: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10f80c: b8 fc ff ff ff mov $0xfffffffc,%eax <== NOT EXECUTED 10f811: 85 d2 test %edx,%edx <== NOT EXECUTED 10f813: 75 15 jne 10f82a <== NOT EXECUTED return -EINTR; /* Return length of pipe */ *(uint *)buffer = pipe->Length; 10f815: 8b 43 0c mov 0xc(%ebx),%eax <== NOT EXECUTED 10f818: 89 06 mov %eax,(%esi) <== NOT EXECUTED PIPE_UNLOCK(pipe); 10f81a: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10f81d: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED 10f820: e8 f3 a7 ff ff call 10a018 <== NOT EXECUTED 10f825: 31 c0 xor %eax,%eax <== NOT EXECUTED return 0; 10f827: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } return -EINVAL; } 10f82a: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED 10f82d: 5b pop %ebx <== NOT EXECUTED 10f82e: 5e pop %esi <== NOT EXECUTED 10f82f: c9 leave <== NOT EXECUTED 10f830: c3 ret <== NOT EXECUTED 0010f784 : pipe_control_t *pipe, off_t offset, int whence, rtems_libio_t *iop ) { 10f784: 55 push %ebp <== NOT EXECUTED 10f785: 89 e5 mov %esp,%ebp <== NOT EXECUTED /* Seek on pipe is not supported */ return -ESPIPE; } 10f787: b8 e3 ff ff ff mov $0xffffffe3,%eax <== NOT EXECUTED 10f78c: c9 leave <== NOT EXECUTED 10f78d: c3 ret <== NOT EXECUTED 0010f831 : pipe_control_t *pipe, void *buffer, size_t count, rtems_libio_t *iop ) { 10f831: 55 push %ebp <== NOT EXECUTED 10f832: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10f834: 57 push %edi <== NOT EXECUTED 10f835: 56 push %esi <== NOT EXECUTED 10f836: 53 push %ebx <== NOT EXECUTED 10f837: 83 ec 30 sub $0x30,%esp <== NOT EXECUTED 10f83a: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) 10f83d: 6a 00 push $0x0 <== NOT EXECUTED 10f83f: 6a 00 push $0x0 <== NOT EXECUTED 10f841: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED 10f844: e8 e3 a6 ff ff call 109f2c <== NOT EXECUTED 10f849: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10f84c: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp) <== NOT EXECUTED 10f853: 85 c0 test %eax,%eax <== NOT EXECUTED 10f855: 0f 84 08 01 00 00 je 10f963 <== NOT EXECUTED 10f85b: c7 45 d4 fc ff ff ff movl $0xfffffffc,-0x2c(%ebp) <== NOT EXECUTED 10f862: e9 21 01 00 00 jmp 10f988 <== NOT EXECUTED return -EINTR; while (read < count) { while (PIPE_EMPTY(pipe)) { /* Not an error */ if (pipe->Writers == 0) 10f867: 83 7b 14 00 cmpl $0x0,0x14(%ebx) <== NOT EXECUTED 10f86b: 0f 84 fe 00 00 00 je 10f96f <== NOT EXECUTED goto out_locked; if (LIBIO_NODELAY(iop)) { 10f871: 8b 45 14 mov 0x14(%ebp),%eax <== NOT EXECUTED 10f874: f6 40 14 01 testb $0x1,0x14(%eax) <== NOT EXECUTED 10f878: 74 0a je 10f884 <== NOT EXECUTED 10f87a: be f5 ff ff ff mov $0xfffffff5,%esi <== NOT EXECUTED 10f87f: e9 ed 00 00 00 jmp 10f971 <== NOT EXECUTED ret = -EAGAIN; goto out_locked; } /* Wait until pipe is no more empty or no writer exists */ pipe->waitingReaders ++; 10f884: ff 43 18 incl 0x18(%ebx) <== NOT EXECUTED PIPE_UNLOCK(pipe); 10f887: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10f88a: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED 10f88d: e8 86 a7 ff ff call 10a018 <== NOT EXECUTED if (! PIPE_READWAIT(pipe)) 10f892: 59 pop %ecx <== NOT EXECUTED 10f893: 5e pop %esi <== NOT EXECUTED 10f894: 6a 00 push $0x0 <== NOT EXECUTED 10f896: ff 73 2c pushl 0x2c(%ebx) <== NOT EXECUTED 10f899: e8 0a 0f 00 00 call 1107a8 <== NOT EXECUTED 10f89e: 83 c4 0c add $0xc,%esp <== NOT EXECUTED 10f8a1: 83 f8 01 cmp $0x1,%eax <== NOT EXECUTED 10f8a4: 19 f6 sbb %esi,%esi <== NOT EXECUTED 10f8a6: f7 d6 not %esi <== NOT EXECUTED 10f8a8: 83 e6 fc and $0xfffffffc,%esi <== NOT EXECUTED ret = -EINTR; if (! PIPE_LOCK(pipe)) { 10f8ab: 6a 00 push $0x0 <== NOT EXECUTED 10f8ad: 6a 00 push $0x0 <== NOT EXECUTED 10f8af: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED 10f8b2: e8 75 a6 ff ff call 109f2c <== NOT EXECUTED 10f8b7: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10f8ba: 85 c0 test %eax,%eax <== NOT EXECUTED 10f8bc: 74 0a je 10f8c8 <== NOT EXECUTED 10f8be: be fc ff ff ff mov $0xfffffffc,%esi <== NOT EXECUTED 10f8c3: e9 b7 00 00 00 jmp 10f97f <== NOT EXECUTED /* WARN waitingReaders not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingReaders --; 10f8c8: ff 4b 18 decl 0x18(%ebx) <== NOT EXECUTED if (ret != 0) 10f8cb: 85 f6 test %esi,%esi <== NOT EXECUTED 10f8cd: 0f 85 9e 00 00 00 jne 10f971 <== NOT EXECUTED if (! PIPE_LOCK(pipe)) return -EINTR; while (read < count) { while (PIPE_EMPTY(pipe)) { 10f8d3: 8b 53 0c mov 0xc(%ebx),%edx <== NOT EXECUTED 10f8d6: 85 d2 test %edx,%edx <== NOT EXECUTED 10f8d8: 74 8d je 10f867 <== NOT EXECUTED if (ret != 0) goto out_locked; } /* Read chunk bytes */ chunk = MIN(count - read, pipe->Length); 10f8da: 8b 45 10 mov 0x10(%ebp),%eax <== NOT EXECUTED 10f8dd: 2b 45 d4 sub -0x2c(%ebp),%eax <== NOT EXECUTED 10f8e0: 89 55 d0 mov %edx,-0x30(%ebp) <== NOT EXECUTED 10f8e3: 39 c2 cmp %eax,%edx <== NOT EXECUTED 10f8e5: 76 03 jbe 10f8ea <== NOT EXECUTED 10f8e7: 89 45 d0 mov %eax,-0x30(%ebp) <== NOT EXECUTED chunk1 = pipe->Size - pipe->Start; 10f8ea: 8b 73 08 mov 0x8(%ebx),%esi <== NOT EXECUTED 10f8ed: 8b 43 04 mov 0x4(%ebx),%eax <== NOT EXECUTED 10f8f0: 29 f0 sub %esi,%eax <== NOT EXECUTED if (chunk > chunk1) { 10f8f2: 39 45 d0 cmp %eax,-0x30(%ebp) <== NOT EXECUTED 10f8f5: 8b 7d 0c mov 0xc(%ebp),%edi <== NOT EXECUTED 10f8f8: 8b 4d d4 mov -0x2c(%ebp),%ecx <== NOT EXECUTED 10f8fb: 8d 14 0f lea (%edi,%ecx,1),%edx <== NOT EXECUTED 10f8fe: 7e 1b jle 10f91b <== NOT EXECUTED memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk1); 10f900: 03 33 add (%ebx),%esi <== NOT EXECUTED 10f902: 89 d7 mov %edx,%edi <== NOT EXECUTED 10f904: 89 c1 mov %eax,%ecx <== NOT EXECUTED 10f906: f3 a4 rep movsb %ds:(%esi),%es:(%edi) <== NOT EXECUTED memcpy(buffer + read + chunk1, pipe->Buffer, chunk - chunk1); 10f908: 8b 55 d4 mov -0x2c(%ebp),%edx <== NOT EXECUTED 10f90b: 01 c2 add %eax,%edx <== NOT EXECUTED 10f90d: 03 55 0c add 0xc(%ebp),%edx <== NOT EXECUTED 10f910: 8b 4d d0 mov -0x30(%ebp),%ecx <== NOT EXECUTED 10f913: 29 c1 sub %eax,%ecx <== NOT EXECUTED 10f915: 8b 33 mov (%ebx),%esi <== NOT EXECUTED 10f917: 89 d7 mov %edx,%edi <== NOT EXECUTED 10f919: eb 07 jmp 10f922 <== NOT EXECUTED } else memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk); 10f91b: 03 33 add (%ebx),%esi <== NOT EXECUTED 10f91d: 89 d7 mov %edx,%edi <== NOT EXECUTED 10f91f: 8b 4d d0 mov -0x30(%ebp),%ecx <== NOT EXECUTED 10f922: f3 a4 rep movsb %ds:(%esi),%es:(%edi) <== NOT EXECUTED pipe->Start += chunk; 10f924: 8b 45 d0 mov -0x30(%ebp),%eax <== NOT EXECUTED 10f927: 03 43 08 add 0x8(%ebx),%eax <== NOT EXECUTED pipe->Start %= pipe->Size; 10f92a: 31 d2 xor %edx,%edx <== NOT EXECUTED 10f92c: f7 73 04 divl 0x4(%ebx) <== NOT EXECUTED 10f92f: 89 53 08 mov %edx,0x8(%ebx) <== NOT EXECUTED pipe->Length -= chunk; 10f932: 8b 43 0c mov 0xc(%ebx),%eax <== NOT EXECUTED 10f935: 2b 45 d0 sub -0x30(%ebp),%eax <== NOT EXECUTED 10f938: 89 43 0c mov %eax,0xc(%ebx) <== NOT EXECUTED /* For buffering optimization */ if (PIPE_EMPTY(pipe)) 10f93b: 85 c0 test %eax,%eax <== NOT EXECUTED 10f93d: 75 07 jne 10f946 <== NOT EXECUTED pipe->Start = 0; 10f93f: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx) <== NOT EXECUTED if (pipe->waitingWriters > 0) 10f946: 83 7b 1c 00 cmpl $0x0,0x1c(%ebx) <== NOT EXECUTED 10f94a: 74 11 je 10f95d <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); 10f94c: 52 push %edx <== NOT EXECUTED 10f94d: 52 push %edx <== NOT EXECUTED 10f94e: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED 10f951: 50 push %eax <== NOT EXECUTED 10f952: ff 73 30 pushl 0x30(%ebx) <== NOT EXECUTED 10f955: e8 f6 0d 00 00 call 110750 <== NOT EXECUTED 10f95a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED read += chunk; 10f95d: 8b 4d d0 mov -0x30(%ebp),%ecx <== NOT EXECUTED 10f960: 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) { 10f963: 8b 7d 10 mov 0x10(%ebp),%edi <== NOT EXECUTED 10f966: 39 7d d4 cmp %edi,-0x2c(%ebp) <== NOT EXECUTED 10f969: 0f 82 64 ff ff ff jb 10f8d3 <== NOT EXECUTED 10f96f: 31 f6 xor %esi,%esi <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); read += chunk; } out_locked: PIPE_UNLOCK(pipe); 10f971: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10f974: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED 10f977: e8 9c a6 ff ff call 10a018 <== NOT EXECUTED 10f97c: 83 c4 10 add $0x10,%esp <== NOT EXECUTED out_nolock: if (read > 0) 10f97f: 83 7d d4 00 cmpl $0x0,-0x2c(%ebp) <== NOT EXECUTED 10f983: 7f 03 jg 10f988 <== NOT EXECUTED 10f985: 89 75 d4 mov %esi,-0x2c(%ebp) <== NOT EXECUTED return read; return ret; } 10f988: 8b 45 d4 mov -0x2c(%ebp),%eax <== NOT EXECUTED 10f98b: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 10f98e: 5b pop %ebx <== NOT EXECUTED 10f98f: 5e pop %esi <== NOT EXECUTED 10f990: 5f pop %edi <== NOT EXECUTED 10f991: c9 leave <== NOT EXECUTED 10f992: c3 ret <== NOT EXECUTED 0010fb77 : */ int pipe_release( pipe_control_t **pipep, rtems_libio_t *iop ) { 10fb77: 55 push %ebp <== NOT EXECUTED 10fb78: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10fb7a: 57 push %edi <== NOT EXECUTED 10fb7b: 56 push %esi <== NOT EXECUTED 10fb7c: 53 push %ebx <== NOT EXECUTED 10fb7d: 83 ec 20 sub $0x20,%esp <== NOT EXECUTED 10fb80: 8b 7d 08 mov 0x8(%ebp),%edi <== NOT EXECUTED pipe_control_t *pipe = *pipep; 10fb83: 8b 1f mov (%edi),%ebx <== NOT EXECUTED uint32_t mode; rtems_status_code sc; sc = rtems_semaphore_obtain(pipe->Semaphore, 10fb85: 6a 00 push $0x0 <== NOT EXECUTED 10fb87: 6a 00 push $0x0 <== NOT EXECUTED 10fb89: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED 10fb8c: e8 9b a3 ff ff call 109f2c <== NOT EXECUTED RTEMS_WAIT, RTEMS_NO_TIMEOUT); /* WARN pipe not released! */ if(sc != RTEMS_SUCCESSFUL) 10fb91: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10fb94: 85 c0 test %eax,%eax <== NOT EXECUTED 10fb96: 75 34 jne 10fbcc <== NOT EXECUTED rtems_fatal_error_occurred(sc); mode = LIBIO_ACCMODE(iop); 10fb98: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED 10fb9b: 8b 40 14 mov 0x14(%eax),%eax <== NOT EXECUTED 10fb9e: 89 c6 mov %eax,%esi <== NOT EXECUTED 10fba0: 83 e6 06 and $0x6,%esi <== NOT EXECUTED if (mode & LIBIO_FLAGS_READ) 10fba3: a8 02 test $0x2,%al <== NOT EXECUTED 10fba5: 74 03 je 10fbaa <== NOT EXECUTED pipe->Readers --; 10fba7: ff 4b 10 decl 0x10(%ebx) <== NOT EXECUTED if (mode & LIBIO_FLAGS_WRITE) 10fbaa: f7 c6 04 00 00 00 test $0x4,%esi <== NOT EXECUTED 10fbb0: 74 03 je 10fbb5 <== NOT EXECUTED pipe->Writers --; 10fbb2: ff 4b 14 decl 0x14(%ebx) <== NOT EXECUTED sc = rtems_semaphore_obtain(rtems_pipe_semaphore, 10fbb5: 50 push %eax <== NOT EXECUTED 10fbb6: 6a 00 push $0x0 <== NOT EXECUTED 10fbb8: 6a 00 push $0x0 <== NOT EXECUTED 10fbba: ff 35 94 3e 12 00 pushl 0x123e94 <== NOT EXECUTED 10fbc0: e8 67 a3 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) 10fbc5: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10fbc8: 85 c0 test %eax,%eax <== NOT EXECUTED 10fbca: 74 09 je 10fbd5 <== NOT EXECUTED rtems_fatal_error_occurred(sc); 10fbcc: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10fbcf: 50 push %eax <== NOT EXECUTED 10fbd0: e8 17 a9 ff ff call 10a4ec <== NOT EXECUTED PIPE_UNLOCK(pipe); 10fbd5: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10fbd8: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED 10fbdb: e8 38 a4 ff ff call 10a018 <== NOT EXECUTED if (pipe->Readers == 0 && pipe->Writers == 0) { 10fbe0: 8b 43 10 mov 0x10(%ebx),%eax <== NOT EXECUTED 10fbe3: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10fbe6: 85 c0 test %eax,%eax <== NOT EXECUTED 10fbe8: 75 15 jne 10fbff <== NOT EXECUTED 10fbea: 83 7b 14 00 cmpl $0x0,0x14(%ebx) <== NOT EXECUTED 10fbee: 75 0f jne 10fbff <== NOT EXECUTED #if 0 /* To delete an anonymous pipe file when all users closed it */ if (pipe->Anonymous) delfile = TRUE; #endif pipe_free(pipe); 10fbf0: 89 d8 mov %ebx,%eax <== NOT EXECUTED 10fbf2: e8 45 ff ff ff call 10fb3c <== NOT EXECUTED *pipep = NULL; 10fbf7: 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) { 10fbfd: eb 30 jmp 10fc2f <== NOT EXECUTED delfile = TRUE; #endif pipe_free(pipe); *pipep = NULL; } else if (pipe->Readers == 0 && mode != LIBIO_FLAGS_WRITE) 10fbff: 83 fe 04 cmp $0x4,%esi <== NOT EXECUTED 10fc02: 74 0f je 10fc13 <== NOT EXECUTED 10fc04: 85 c0 test %eax,%eax <== NOT EXECUTED 10fc06: 75 0b jne 10fc13 <== NOT EXECUTED /* Notify waiting Writers that all their partners left */ PIPE_WAKEUPWRITERS(pipe); 10fc08: 57 push %edi <== NOT EXECUTED 10fc09: 57 push %edi <== NOT EXECUTED 10fc0a: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED 10fc0d: 50 push %eax <== NOT EXECUTED 10fc0e: ff 73 30 pushl 0x30(%ebx) <== NOT EXECUTED 10fc11: eb 14 jmp 10fc27 <== NOT EXECUTED else if (pipe->Writers == 0 && mode != LIBIO_FLAGS_READ) 10fc13: 83 fe 02 cmp $0x2,%esi <== NOT EXECUTED 10fc16: 74 17 je 10fc2f <== NOT EXECUTED 10fc18: 83 7b 14 00 cmpl $0x0,0x14(%ebx) <== NOT EXECUTED 10fc1c: 75 11 jne 10fc2f <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); 10fc1e: 56 push %esi <== NOT EXECUTED 10fc1f: 56 push %esi <== NOT EXECUTED 10fc20: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED 10fc23: 50 push %eax <== NOT EXECUTED 10fc24: ff 73 2c pushl 0x2c(%ebx) <== NOT EXECUTED 10fc27: e8 24 0b 00 00 call 110750 <== NOT EXECUTED 10fc2c: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_semaphore_release(rtems_pipe_semaphore); 10fc2f: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10fc32: ff 35 94 3e 12 00 pushl 0x123e94 <== NOT EXECUTED 10fc38: e8 db a3 ff ff call 10a018 <== NOT EXECUTED if(iop->pathinfo.ops->unlink_h(&iop->pathinfo)) return -errno; #endif return 0; } 10fc3d: 31 c0 xor %eax,%eax <== NOT EXECUTED 10fc3f: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 10fc42: 5b pop %ebx <== NOT EXECUTED 10fc43: 5e pop %esi <== NOT EXECUTED 10fc44: 5f pop %edi <== NOT EXECUTED 10fc45: c9 leave <== NOT EXECUTED 10fc46: c3 ret <== NOT EXECUTED 0010f993 : pipe_control_t *pipe, const void *buffer, size_t count, rtems_libio_t *iop ) { 10f993: 55 push %ebp <== NOT EXECUTED 10f994: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10f996: 57 push %edi <== NOT EXECUTED 10f997: 56 push %esi <== NOT EXECUTED 10f998: 53 push %ebx <== NOT EXECUTED 10f999: 83 ec 2c sub $0x2c,%esp <== NOT EXECUTED 10f99c: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED int chunk, chunk1, written = 0, ret = 0; /* Write nothing */ if (count == 0) 10f99f: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp) <== NOT EXECUTED 10f9a6: 83 7d 10 00 cmpl $0x0,0x10(%ebp) <== NOT EXECUTED 10f9aa: 0f 84 81 01 00 00 je 10fb31 <== NOT EXECUTED return 0; if (! PIPE_LOCK(pipe)) 10f9b0: 56 push %esi <== NOT EXECUTED 10f9b1: 6a 00 push $0x0 <== NOT EXECUTED 10f9b3: 6a 00 push $0x0 <== NOT EXECUTED 10f9b5: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED 10f9b8: e8 6f a5 ff ff call 109f2c <== NOT EXECUTED 10f9bd: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10f9c0: c7 45 d4 fc ff ff ff movl $0xfffffffc,-0x2c(%ebp) <== NOT EXECUTED 10f9c7: 85 c0 test %eax,%eax <== NOT EXECUTED 10f9c9: 0f 85 62 01 00 00 jne 10fb31 <== NOT EXECUTED return -EINTR; if (pipe->Readers == 0) { 10f9cf: 83 7b 10 00 cmpl $0x0,0x10(%ebx) <== NOT EXECUTED 10f9d3: 75 11 jne 10f9e6 <== NOT EXECUTED 10f9d5: be e0 ff ff ff mov $0xffffffe0,%esi <== NOT EXECUTED 10f9da: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp) <== NOT EXECUTED 10f9e1: e9 1d 01 00 00 jmp 10fb03 <== NOT EXECUTED ret = -EPIPE; goto out_locked; } /* Write of PIPE_BUF bytes or less shall not be interleaved */ chunk = count <= pipe->Size ? count : 1; 10f9e6: 8b 7d 10 mov 0x10(%ebp),%edi <== NOT EXECUTED 10f9e9: 3b 7b 04 cmp 0x4(%ebx),%edi <== NOT EXECUTED 10f9ec: 76 05 jbe 10f9f3 <== NOT EXECUTED 10f9ee: bf 01 00 00 00 mov $0x1,%edi <== NOT EXECUTED 10f9f3: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp) <== NOT EXECUTED 10f9fa: e9 f6 00 00 00 jmp 10faf5 <== NOT EXECUTED while (written < count) { while (PIPE_SPACE(pipe) < chunk) { if (LIBIO_NODELAY(iop)) { 10f9ff: 8b 45 14 mov 0x14(%ebp),%eax <== NOT EXECUTED 10fa02: f6 40 14 01 testb $0x1,0x14(%eax) <== NOT EXECUTED 10fa06: 74 0a je 10fa12 <== NOT EXECUTED 10fa08: be f5 ff ff ff mov $0xfffffff5,%esi <== NOT EXECUTED 10fa0d: e9 f1 00 00 00 jmp 10fb03 <== NOT EXECUTED ret = -EAGAIN; goto out_locked; } /* Wait until there is chunk bytes space or no reader exists */ pipe->waitingWriters ++; 10fa12: ff 43 1c incl 0x1c(%ebx) <== NOT EXECUTED PIPE_UNLOCK(pipe); 10fa15: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10fa18: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED 10fa1b: e8 f8 a5 ff ff call 10a018 <== NOT EXECUTED if (! PIPE_WRITEWAIT(pipe)) 10fa20: 5a pop %edx <== NOT EXECUTED 10fa21: 59 pop %ecx <== NOT EXECUTED 10fa22: 6a 00 push $0x0 <== NOT EXECUTED 10fa24: ff 73 30 pushl 0x30(%ebx) <== NOT EXECUTED 10fa27: e8 7c 0d 00 00 call 1107a8 <== NOT EXECUTED 10fa2c: 83 c4 0c add $0xc,%esp <== NOT EXECUTED 10fa2f: 83 f8 01 cmp $0x1,%eax <== NOT EXECUTED 10fa32: 19 f6 sbb %esi,%esi <== NOT EXECUTED 10fa34: f7 d6 not %esi <== NOT EXECUTED 10fa36: 83 e6 fc and $0xfffffffc,%esi <== NOT EXECUTED ret = -EINTR; if (! PIPE_LOCK(pipe)) { 10fa39: 6a 00 push $0x0 <== NOT EXECUTED 10fa3b: 6a 00 push $0x0 <== NOT EXECUTED 10fa3d: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED 10fa40: e8 e7 a4 ff ff call 109f2c <== NOT EXECUTED 10fa45: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10fa48: 85 c0 test %eax,%eax <== NOT EXECUTED 10fa4a: 74 0a je 10fa56 <== NOT EXECUTED 10fa4c: be fc ff ff ff mov $0xfffffffc,%esi <== NOT EXECUTED 10fa51: e9 d2 00 00 00 jmp 10fb28 <== NOT EXECUTED /* WARN waitingWriters not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingWriters --; 10fa56: ff 4b 1c decl 0x1c(%ebx) <== NOT EXECUTED if (ret != 0) 10fa59: 85 f6 test %esi,%esi <== NOT EXECUTED 10fa5b: 0f 85 a2 00 00 00 jne 10fb03 <== NOT EXECUTED goto out_locked; if (pipe->Readers == 0) { 10fa61: 83 7b 10 00 cmpl $0x0,0x10(%ebx) <== NOT EXECUTED 10fa65: 75 0a jne 10fa71 <== NOT EXECUTED 10fa67: be e0 ff ff ff mov $0xffffffe0,%esi <== NOT EXECUTED 10fa6c: e9 92 00 00 00 jmp 10fb03 <== 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) { 10fa71: 8b 73 04 mov 0x4(%ebx),%esi <== NOT EXECUTED 10fa74: 8b 43 0c mov 0xc(%ebx),%eax <== NOT EXECUTED 10fa77: 89 f1 mov %esi,%ecx <== NOT EXECUTED 10fa79: 29 c1 sub %eax,%ecx <== NOT EXECUTED 10fa7b: 39 f9 cmp %edi,%ecx <== NOT EXECUTED 10fa7d: 72 80 jb 10f9ff <== NOT EXECUTED ret = -EPIPE; goto out_locked; } } chunk = MIN(count - written, PIPE_SPACE(pipe)); 10fa7f: 8b 55 10 mov 0x10(%ebp),%edx <== NOT EXECUTED 10fa82: 2b 55 d4 sub -0x2c(%ebp),%edx <== NOT EXECUTED 10fa85: 89 4d d0 mov %ecx,-0x30(%ebp) <== NOT EXECUTED 10fa88: 39 d1 cmp %edx,%ecx <== NOT EXECUTED 10fa8a: 76 03 jbe 10fa8f <== NOT EXECUTED 10fa8c: 89 55 d0 mov %edx,-0x30(%ebp) <== NOT EXECUTED chunk1 = pipe->Size - PIPE_WSTART(pipe); 10fa8f: 03 43 08 add 0x8(%ebx),%eax <== NOT EXECUTED 10fa92: 31 d2 xor %edx,%edx <== NOT EXECUTED 10fa94: f7 f6 div %esi <== NOT EXECUTED 10fa96: 89 f0 mov %esi,%eax <== NOT EXECUTED 10fa98: 29 d0 sub %edx,%eax <== NOT EXECUTED if (chunk > chunk1) { 10fa9a: 39 45 d0 cmp %eax,-0x30(%ebp) <== NOT EXECUTED 10fa9d: 8b 7d 0c mov 0xc(%ebp),%edi <== NOT EXECUTED 10faa0: 8b 4d d4 mov -0x2c(%ebp),%ecx <== NOT EXECUTED 10faa3: 8d 34 0f lea (%edi,%ecx,1),%esi <== NOT EXECUTED 10faa6: 7e 1c jle 10fac4 <== NOT EXECUTED memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk1); 10faa8: 03 13 add (%ebx),%edx <== NOT EXECUTED 10faaa: 89 d7 mov %edx,%edi <== NOT EXECUTED 10faac: 89 c1 mov %eax,%ecx <== NOT EXECUTED 10faae: f3 a4 rep movsb %ds:(%esi),%es:(%edi) <== NOT EXECUTED memcpy(pipe->Buffer, buffer + written + chunk1, chunk - chunk1); 10fab0: 8b 13 mov (%ebx),%edx <== NOT EXECUTED 10fab2: 8b 4d d0 mov -0x30(%ebp),%ecx <== NOT EXECUTED 10fab5: 29 c1 sub %eax,%ecx <== NOT EXECUTED 10fab7: 8b 7d d4 mov -0x2c(%ebp),%edi <== NOT EXECUTED 10faba: 8d 34 38 lea (%eax,%edi,1),%esi <== NOT EXECUTED 10fabd: 03 75 0c add 0xc(%ebp),%esi <== NOT EXECUTED 10fac0: 89 d7 mov %edx,%edi <== NOT EXECUTED 10fac2: eb 07 jmp 10facb <== NOT EXECUTED } else memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk); 10fac4: 03 13 add (%ebx),%edx <== NOT EXECUTED 10fac6: 89 d7 mov %edx,%edi <== NOT EXECUTED 10fac8: 8b 4d d0 mov -0x30(%ebp),%ecx <== NOT EXECUTED 10facb: f3 a4 rep movsb %ds:(%esi),%es:(%edi) <== NOT EXECUTED pipe->Length += chunk; 10facd: 8b 45 d0 mov -0x30(%ebp),%eax <== NOT EXECUTED 10fad0: 01 43 0c add %eax,0xc(%ebx) <== NOT EXECUTED if (pipe->waitingReaders > 0) 10fad3: 83 7b 18 00 cmpl $0x0,0x18(%ebx) <== NOT EXECUTED 10fad7: 74 11 je 10faea <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); 10fad9: 50 push %eax <== NOT EXECUTED 10fada: 50 push %eax <== NOT EXECUTED 10fadb: 8d 4d e4 lea -0x1c(%ebp),%ecx <== NOT EXECUTED 10fade: 51 push %ecx <== NOT EXECUTED 10fadf: ff 73 2c pushl 0x2c(%ebx) <== NOT EXECUTED 10fae2: e8 69 0c 00 00 call 110750 <== NOT EXECUTED 10fae7: 83 c4 10 add $0x10,%esp <== NOT EXECUTED written += chunk; 10faea: 8b 7d d0 mov -0x30(%ebp),%edi <== NOT EXECUTED 10faed: 01 7d d4 add %edi,-0x2c(%ebp) <== NOT EXECUTED 10faf0: 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) { 10faf5: 8b 45 10 mov 0x10(%ebp),%eax <== NOT EXECUTED 10faf8: 39 45 d4 cmp %eax,-0x2c(%ebp) <== NOT EXECUTED 10fafb: 0f 82 70 ff ff ff jb 10fa71 <== NOT EXECUTED 10fb01: 31 f6 xor %esi,%esi <== NOT EXECUTED /* Write of more than PIPE_BUF bytes can be interleaved */ chunk = 1; } out_locked: PIPE_UNLOCK(pipe); 10fb03: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10fb06: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED 10fb09: e8 0a a5 ff ff call 10a018 <== NOT EXECUTED 10fb0e: 83 c4 10 add $0x10,%esp <== NOT EXECUTED out_nolock: #ifdef RTEMS_POSIX_API /* Signal SIGPIPE */ if (ret == -EPIPE) 10fb11: 83 fe e0 cmp $0xffffffe0,%esi <== NOT EXECUTED 10fb14: 75 12 jne 10fb28 <== NOT EXECUTED kill(getpid(), SIGPIPE); 10fb16: e8 49 07 00 00 call 110264 <== NOT EXECUTED 10fb1b: 57 push %edi <== NOT EXECUTED 10fb1c: 57 push %edi <== NOT EXECUTED 10fb1d: 6a 0d push $0xd <== NOT EXECUTED 10fb1f: 50 push %eax <== NOT EXECUTED 10fb20: e8 13 09 00 00 call 110438 <== NOT EXECUTED 10fb25: 83 c4 10 add $0x10,%esp <== NOT EXECUTED #endif if (written > 0) 10fb28: 83 7d d4 00 cmpl $0x0,-0x2c(%ebp) <== NOT EXECUTED 10fb2c: 7f 03 jg 10fb31 <== NOT EXECUTED 10fb2e: 89 75 d4 mov %esi,-0x2c(%ebp) <== NOT EXECUTED return written; return ret; } 10fb31: 8b 45 d4 mov -0x2c(%ebp),%eax <== NOT EXECUTED 10fb34: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 10fb37: 5b pop %ebx <== NOT EXECUTED 10fb38: 5e pop %esi <== NOT EXECUTED 10fb39: 5f pop %edi <== NOT EXECUTED 10fb3a: c9 leave <== NOT EXECUTED 10fb3b: 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 84 b0 12 00 incl 0x12b084 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 0010e170 : #include int pthread_attr_destroy( pthread_attr_t *attr ) { 10e170: 55 push %ebp 10e171: 89 e5 mov %esp,%ebp 10e173: 8b 45 08 mov 0x8(%ebp),%eax if ( !attr || !attr->is_initialized ) 10e176: 85 c0 test %eax,%eax 10e178: 74 0f je 10e189 10e17a: 83 38 00 cmpl $0x0,(%eax) 10e17d: 74 0a je 10e189 return EINVAL; attr->is_initialized = false; 10e17f: c7 00 00 00 00 00 movl $0x0,(%eax) 10e185: 31 c0 xor %eax,%eax return 0; 10e187: eb 05 jmp 10e18e <== ALWAYS TAKEN 10e189: b8 16 00 00 00 mov $0x16,%eax } 10e18e: c9 leave 10e18f: c3 ret 0010e6bc : int pthread_attr_getcputime( pthread_attr_t *attr, int *clock_allowed ) { 10e6bc: 55 push %ebp 10e6bd: 89 e5 mov %esp,%ebp 10e6bf: 8b 45 08 mov 0x8(%ebp),%eax 10e6c2: 8b 55 0c mov 0xc(%ebp),%edx if ( !attr || !attr->is_initialized || !clock_allowed ) 10e6c5: 85 c0 test %eax,%eax 10e6c7: 74 12 je 10e6db 10e6c9: 85 d2 test %edx,%edx 10e6cb: 74 0e je 10e6db 10e6cd: 83 38 00 cmpl $0x0,(%eax) 10e6d0: 74 09 je 10e6db return EINVAL; *clock_allowed = attr->cputime_clock_allowed; 10e6d2: 8b 40 30 mov 0x30(%eax),%eax 10e6d5: 89 02 mov %eax,(%edx) 10e6d7: 31 c0 xor %eax,%eax return 0; 10e6d9: eb 05 jmp 10e6e0 <== ALWAYS TAKEN 10e6db: b8 16 00 00 00 mov $0x16,%eax } 10e6e0: c9 leave 10e6e1: c3 ret 0010e190 : int pthread_attr_getdetachstate( const pthread_attr_t *attr, int *detachstate ) { 10e190: 55 push %ebp 10e191: 89 e5 mov %esp,%ebp 10e193: 8b 45 08 mov 0x8(%ebp),%eax 10e196: 8b 55 0c mov 0xc(%ebp),%edx if ( !attr || !attr->is_initialized || !detachstate ) 10e199: 85 c0 test %eax,%eax 10e19b: 74 12 je 10e1af 10e19d: 85 d2 test %edx,%edx 10e19f: 74 0e je 10e1af 10e1a1: 83 38 00 cmpl $0x0,(%eax) 10e1a4: 74 09 je 10e1af return EINVAL; *detachstate = attr->detachstate; 10e1a6: 8b 40 34 mov 0x34(%eax),%eax 10e1a9: 89 02 mov %eax,(%edx) 10e1ab: 31 c0 xor %eax,%eax return 0; 10e1ad: eb 05 jmp 10e1b4 <== ALWAYS TAKEN 10e1af: b8 16 00 00 00 mov $0x16,%eax } 10e1b4: c9 leave 10e1b5: c3 ret 0010e1b8 : int pthread_attr_getinheritsched( const pthread_attr_t *attr, int *inheritsched ) { 10e1b8: 55 push %ebp 10e1b9: 89 e5 mov %esp,%ebp 10e1bb: 8b 45 08 mov 0x8(%ebp),%eax 10e1be: 8b 55 0c mov 0xc(%ebp),%edx if ( !attr || !attr->is_initialized || !inheritsched ) 10e1c1: 85 c0 test %eax,%eax 10e1c3: 74 12 je 10e1d7 10e1c5: 85 d2 test %edx,%edx 10e1c7: 74 0e je 10e1d7 10e1c9: 83 38 00 cmpl $0x0,(%eax) 10e1cc: 74 09 je 10e1d7 return EINVAL; *inheritsched = attr->inheritsched; 10e1ce: 8b 40 10 mov 0x10(%eax),%eax 10e1d1: 89 02 mov %eax,(%edx) 10e1d3: 31 c0 xor %eax,%eax return 0; 10e1d5: eb 05 jmp 10e1dc <== ALWAYS TAKEN 10e1d7: b8 16 00 00 00 mov $0x16,%eax } 10e1dc: c9 leave 10e1dd: c3 ret 0010e1e0 : int pthread_attr_getschedparam( const pthread_attr_t *attr, struct sched_param *param ) { 10e1e0: 55 push %ebp 10e1e1: 89 e5 mov %esp,%ebp 10e1e3: 57 push %edi 10e1e4: 56 push %esi 10e1e5: 8b 75 08 mov 0x8(%ebp),%esi 10e1e8: 8b 45 0c mov 0xc(%ebp),%eax if ( !attr || !attr->is_initialized || !param ) 10e1eb: 85 f6 test %esi,%esi 10e1ed: 74 19 je 10e208 10e1ef: 85 c0 test %eax,%eax 10e1f1: 74 15 je 10e208 10e1f3: 83 3e 00 cmpl $0x0,(%esi) 10e1f6: 74 10 je 10e208 return EINVAL; *param = attr->schedparam; 10e1f8: 83 c6 18 add $0x18,%esi 10e1fb: b9 06 00 00 00 mov $0x6,%ecx 10e200: 89 c7 mov %eax,%edi 10e202: f3 a5 rep movsl %ds:(%esi),%es:(%edi) 10e204: 31 c0 xor %eax,%eax return 0; 10e206: eb 05 jmp 10e20d <== ALWAYS TAKEN 10e208: b8 16 00 00 00 mov $0x16,%eax } 10e20d: 5e pop %esi 10e20e: 5f pop %edi 10e20f: c9 leave 10e210: c3 ret 0010e214 : int pthread_attr_getschedpolicy( const pthread_attr_t *attr, int *policy ) { 10e214: 55 push %ebp 10e215: 89 e5 mov %esp,%ebp 10e217: 8b 45 08 mov 0x8(%ebp),%eax 10e21a: 8b 55 0c mov 0xc(%ebp),%edx if ( !attr || !attr->is_initialized || !policy ) 10e21d: 85 c0 test %eax,%eax 10e21f: 74 12 je 10e233 10e221: 85 d2 test %edx,%edx 10e223: 74 0e je 10e233 10e225: 83 38 00 cmpl $0x0,(%eax) 10e228: 74 09 je 10e233 return EINVAL; *policy = attr->schedpolicy; 10e22a: 8b 40 14 mov 0x14(%eax),%eax 10e22d: 89 02 mov %eax,(%edx) 10e22f: 31 c0 xor %eax,%eax return 0; 10e231: eb 05 jmp 10e238 <== ALWAYS TAKEN 10e233: b8 16 00 00 00 mov $0x16,%eax } 10e238: c9 leave 10e239: c3 ret 0010e23c : int pthread_attr_getscope( const pthread_attr_t *attr, int *contentionscope ) { 10e23c: 55 push %ebp 10e23d: 89 e5 mov %esp,%ebp 10e23f: 8b 45 08 mov 0x8(%ebp),%eax 10e242: 8b 55 0c mov 0xc(%ebp),%edx if ( !attr || !attr->is_initialized || !contentionscope ) 10e245: 85 c0 test %eax,%eax 10e247: 74 12 je 10e25b 10e249: 85 d2 test %edx,%edx 10e24b: 74 0e je 10e25b 10e24d: 83 38 00 cmpl $0x0,(%eax) 10e250: 74 09 je 10e25b return EINVAL; *contentionscope = attr->contentionscope; 10e252: 8b 40 0c mov 0xc(%eax),%eax 10e255: 89 02 mov %eax,(%edx) 10e257: 31 c0 xor %eax,%eax return 0; 10e259: eb 05 jmp 10e260 <== ALWAYS TAKEN 10e25b: b8 16 00 00 00 mov $0x16,%eax } 10e260: c9 leave 10e261: c3 ret 0010e264 : int pthread_attr_getstackaddr( const pthread_attr_t *attr, void **stackaddr ) { 10e264: 55 push %ebp 10e265: 89 e5 mov %esp,%ebp 10e267: 8b 45 08 mov 0x8(%ebp),%eax 10e26a: 8b 55 0c mov 0xc(%ebp),%edx if ( !attr || !attr->is_initialized || !stackaddr ) 10e26d: 85 c0 test %eax,%eax 10e26f: 74 12 je 10e283 10e271: 85 d2 test %edx,%edx 10e273: 74 0e je 10e283 10e275: 83 38 00 cmpl $0x0,(%eax) 10e278: 74 09 je 10e283 return EINVAL; *stackaddr = attr->stackaddr; 10e27a: 8b 40 04 mov 0x4(%eax),%eax 10e27d: 89 02 mov %eax,(%edx) 10e27f: 31 c0 xor %eax,%eax return 0; 10e281: eb 05 jmp 10e288 <== ALWAYS TAKEN 10e283: b8 16 00 00 00 mov $0x16,%eax } 10e288: c9 leave 10e289: c3 ret 0010e28c : int pthread_attr_getstacksize( const pthread_attr_t *attr, size_t *stacksize ) { 10e28c: 55 push %ebp 10e28d: 89 e5 mov %esp,%ebp 10e28f: 8b 45 08 mov 0x8(%ebp),%eax 10e292: 8b 55 0c mov 0xc(%ebp),%edx if ( !attr || !attr->is_initialized || !stacksize ) 10e295: 85 c0 test %eax,%eax 10e297: 74 12 je 10e2ab 10e299: 85 d2 test %edx,%edx 10e29b: 74 0e je 10e2ab 10e29d: 83 38 00 cmpl $0x0,(%eax) 10e2a0: 74 09 je 10e2ab return EINVAL; *stacksize = attr->stacksize; 10e2a2: 8b 40 08 mov 0x8(%eax),%eax 10e2a5: 89 02 mov %eax,(%edx) 10e2a7: 31 c0 xor %eax,%eax return 0; 10e2a9: eb 05 jmp 10e2b0 <== ALWAYS TAKEN 10e2ab: b8 16 00 00 00 mov $0x16,%eax } 10e2b0: c9 leave 10e2b1: c3 ret 0010eb54 : int pthread_attr_setcputime( pthread_attr_t *attr, int clock_allowed ) { 10eb54: 55 push %ebp 10eb55: 89 e5 mov %esp,%ebp 10eb57: 8b 45 08 mov 0x8(%ebp),%eax 10eb5a: 8b 55 0c mov 0xc(%ebp),%edx if ( !attr || !attr->is_initialized ) 10eb5d: 85 c0 test %eax,%eax 10eb5f: 74 11 je 10eb72 10eb61: 83 38 00 cmpl $0x0,(%eax) 10eb64: 74 0c je 10eb72 return EINVAL; switch ( clock_allowed ) { 10eb66: 83 fa 01 cmp $0x1,%edx 10eb69: 77 07 ja 10eb72 case CLOCK_ENABLED: case CLOCK_DISABLED: attr->cputime_clock_allowed = clock_allowed; 10eb6b: 89 50 30 mov %edx,0x30(%eax) 10eb6e: 31 c0 xor %eax,%eax return 0; 10eb70: eb 05 jmp 10eb77 <== ALWAYS TAKEN 10eb72: b8 16 00 00 00 mov $0x16,%eax default: return EINVAL; } } 10eb77: c9 leave 10eb78: c3 ret 0010e2dc : int pthread_attr_setdetachstate( pthread_attr_t *attr, int detachstate ) { 10e2dc: 55 push %ebp 10e2dd: 89 e5 mov %esp,%ebp 10e2df: 8b 45 08 mov 0x8(%ebp),%eax 10e2e2: 8b 55 0c mov 0xc(%ebp),%edx if ( !attr || !attr->is_initialized ) 10e2e5: 85 c0 test %eax,%eax 10e2e7: 74 11 je 10e2fa 10e2e9: 83 38 00 cmpl $0x0,(%eax) 10e2ec: 74 0c je 10e2fa return EINVAL; switch ( detachstate ) { 10e2ee: 83 fa 01 cmp $0x1,%edx 10e2f1: 77 07 ja 10e2fa case PTHREAD_CREATE_DETACHED: case PTHREAD_CREATE_JOINABLE: attr->detachstate = detachstate; 10e2f3: 89 50 34 mov %edx,0x34(%eax) 10e2f6: 31 c0 xor %eax,%eax return 0; 10e2f8: eb 05 jmp 10e2ff <== ALWAYS TAKEN 10e2fa: b8 16 00 00 00 mov $0x16,%eax default: return EINVAL; } } 10e2ff: c9 leave 10e300: c3 ret 0010f45c : int pthread_attr_setinheritsched( pthread_attr_t *attr, int inheritsched ) { 10f45c: 55 push %ebp 10f45d: 89 e5 mov %esp,%ebp 10f45f: 53 push %ebx 10f460: 8b 55 08 mov 0x8(%ebp),%edx 10f463: 8b 4d 0c mov 0xc(%ebp),%ecx if ( !attr || !attr->is_initialized ) 10f466: 85 d2 test %edx,%edx 10f468: 74 19 je 10f483 10f46a: 83 3a 00 cmpl $0x0,(%edx) 10f46d: 74 14 je 10f483 return EINVAL; switch ( inheritsched ) { 10f46f: 8d 59 ff lea -0x1(%ecx),%ebx 10f472: b8 86 00 00 00 mov $0x86,%eax 10f477: 83 fb 01 cmp $0x1,%ebx 10f47a: 77 0c ja 10f488 case PTHREAD_INHERIT_SCHED: case PTHREAD_EXPLICIT_SCHED: attr->inheritsched = inheritsched; 10f47c: 89 4a 10 mov %ecx,0x10(%edx) 10f47f: 30 c0 xor %al,%al return 0; 10f481: eb 05 jmp 10f488 <== ALWAYS TAKEN 10f483: b8 16 00 00 00 mov $0x16,%eax default: return ENOTSUP; } } 10f488: 5b pop %ebx 10f489: c9 leave 10f48a: c3 ret 0010e334 : int pthread_attr_setschedparam( pthread_attr_t *attr, const struct sched_param *param ) { 10e334: 55 push %ebp 10e335: 89 e5 mov %esp,%ebp 10e337: 57 push %edi 10e338: 56 push %esi 10e339: 8b 7d 08 mov 0x8(%ebp),%edi 10e33c: 8b 75 0c mov 0xc(%ebp),%esi if ( !attr || !attr->is_initialized || !param ) 10e33f: 85 ff test %edi,%edi 10e341: 74 17 je 10e35a 10e343: 85 f6 test %esi,%esi 10e345: 74 13 je 10e35a 10e347: 83 3f 00 cmpl $0x0,(%edi) 10e34a: 74 0e je 10e35a return EINVAL; attr->schedparam = *param; 10e34c: 83 c7 18 add $0x18,%edi 10e34f: b9 06 00 00 00 mov $0x6,%ecx 10e354: f3 a5 rep movsl %ds:(%esi),%es:(%edi) 10e356: 31 c0 xor %eax,%eax return 0; 10e358: eb 05 jmp 10e35f <== ALWAYS TAKEN 10e35a: b8 16 00 00 00 mov $0x16,%eax } 10e35f: 5e pop %esi 10e360: 5f pop %edi 10e361: c9 leave 10e362: c3 ret 0010e364 : int pthread_attr_setschedpolicy( pthread_attr_t *attr, int policy ) { 10e364: 55 push %ebp 10e365: 89 e5 mov %esp,%ebp 10e367: 8b 55 08 mov 0x8(%ebp),%edx 10e36a: 8b 4d 0c mov 0xc(%ebp),%ecx if ( !attr || !attr->is_initialized ) 10e36d: 85 d2 test %edx,%edx 10e36f: 74 16 je 10e387 10e371: 83 3a 00 cmpl $0x0,(%edx) 10e374: 74 11 je 10e387 return EINVAL; switch ( policy ) { 10e376: b8 86 00 00 00 mov $0x86,%eax 10e37b: 83 f9 03 cmp $0x3,%ecx 10e37e: 77 0c ja 10e38c case SCHED_OTHER: case SCHED_FIFO: case SCHED_RR: case SCHED_SPORADIC: attr->schedpolicy = policy; 10e380: 89 4a 14 mov %ecx,0x14(%edx) 10e383: 30 c0 xor %al,%al return 0; 10e385: eb 05 jmp 10e38c <== ALWAYS TAKEN 10e387: b8 16 00 00 00 mov $0x16,%eax default: return ENOTSUP; } } 10e38c: c9 leave 10e38d: c3 ret 0010e390 : int pthread_attr_setscope( pthread_attr_t *attr, int contentionscope ) { 10e390: 55 push %ebp 10e391: 89 e5 mov %esp,%ebp 10e393: 8b 45 08 mov 0x8(%ebp),%eax 10e396: 8b 55 0c mov 0xc(%ebp),%edx if ( !attr || !attr->is_initialized ) 10e399: 85 c0 test %eax,%eax 10e39b: 74 1e je 10e3bb 10e39d: 83 38 00 cmpl $0x0,(%eax) 10e3a0: 74 19 je 10e3bb return EINVAL; switch ( contentionscope ) { 10e3a2: 85 d2 test %edx,%edx 10e3a4: 74 0a je 10e3b0 10e3a6: b8 86 00 00 00 mov $0x86,%eax 10e3ab: 4a dec %edx 10e3ac: 75 0d jne 10e3bb 10e3ae: eb 10 jmp 10e3c0 <== ALWAYS TAKEN case PTHREAD_SCOPE_PROCESS: attr->contentionscope = contentionscope; 10e3b0: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax) 10e3b7: 31 c0 xor %eax,%eax return 0; 10e3b9: eb 05 jmp 10e3c0 <== ALWAYS TAKEN 10e3bb: b8 16 00 00 00 mov $0x16,%eax return ENOTSUP; default: return EINVAL; } } 10e3c0: c9 leave 10e3c1: c3 ret 0010e3c4 : int pthread_attr_setstackaddr( pthread_attr_t *attr, void *stackaddr ) { 10e3c4: 55 push %ebp 10e3c5: 89 e5 mov %esp,%ebp 10e3c7: 8b 45 08 mov 0x8(%ebp),%eax if ( !attr || !attr->is_initialized ) 10e3ca: 85 c0 test %eax,%eax 10e3cc: 74 0f je 10e3dd 10e3ce: 83 38 00 cmpl $0x0,(%eax) 10e3d1: 74 0a je 10e3dd return EINVAL; attr->stackaddr = stackaddr; 10e3d3: 8b 55 0c mov 0xc(%ebp),%edx 10e3d6: 89 50 04 mov %edx,0x4(%eax) 10e3d9: 31 c0 xor %eax,%eax return 0; 10e3db: eb 05 jmp 10e3e2 <== ALWAYS TAKEN 10e3dd: b8 16 00 00 00 mov $0x16,%eax } 10e3e2: c9 leave 10e3e3: c3 ret 0010f48c : int pthread_attr_setstacksize( pthread_attr_t *attr, size_t stacksize ) { 10f48c: 55 push %ebp 10f48d: 89 e5 mov %esp,%ebp 10f48f: 8b 45 08 mov 0x8(%ebp),%eax 10f492: 8b 55 0c mov 0xc(%ebp),%edx if ( !attr || !attr->is_initialized ) 10f495: 85 c0 test %eax,%eax 10f497: 74 1d je 10f4b6 10f499: 83 38 00 cmpl $0x0,(%eax) 10f49c: 74 18 je 10f4b6 return EINVAL; if (stacksize < PTHREAD_MINIMUM_STACK_SIZE) 10f49e: 8b 0d 14 12 12 00 mov 0x121214,%ecx 10f4a4: d1 e1 shl %ecx 10f4a6: 39 ca cmp %ecx,%edx 10f4a8: 73 05 jae 10f4af attr->stacksize = PTHREAD_MINIMUM_STACK_SIZE; 10f4aa: 89 48 08 mov %ecx,0x8(%eax) 10f4ad: eb 03 jmp 10f4b2 <== ALWAYS TAKEN else attr->stacksize = stacksize; 10f4af: 89 50 08 mov %edx,0x8(%eax) 10f4b2: 31 c0 xor %eax,%eax 10f4b4: eb 05 jmp 10f4bb <== ALWAYS TAKEN 10f4b6: b8 16 00 00 00 mov $0x16,%eax return 0; } 10f4bb: c9 leave 10f4bc: c3 ret 0010a234 : */ int pthread_barrier_destroy( pthread_barrier_t *barrier ) { 10a234: 55 push %ebp 10a235: 89 e5 mov %esp,%ebp 10a237: 53 push %ebx 10a238: 83 ec 14 sub $0x14,%esp 10a23b: 8b 45 08 mov 0x8(%ebp),%eax POSIX_Barrier_Control *the_barrier = NULL; Objects_Locations location; if ( !barrier ) 10a23e: 85 c0 test %eax,%eax 10a240: 74 54 je 10a296 RTEMS_INLINE_ROUTINE POSIX_Barrier_Control *_POSIX_Barrier_Get ( pthread_barrier_t *barrier, Objects_Locations *location ) { return (POSIX_Barrier_Control *) _Objects_Get( 10a242: 53 push %ebx 10a243: 8d 55 f4 lea -0xc(%ebp),%edx 10a246: 52 push %edx 10a247: ff 30 pushl (%eax) 10a249: 68 6c 66 12 00 push $0x12666c 10a24e: e8 f5 21 00 00 call 10c448 <_Objects_Get> 10a253: 89 c3 mov %eax,%ebx return EINVAL; the_barrier = _POSIX_Barrier_Get( barrier, &location ); switch ( location ) { 10a255: 83 c4 10 add $0x10,%esp 10a258: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 10a25c: 75 38 jne 10a296 case OBJECTS_LOCAL: if ( the_barrier->Barrier.number_of_waiting_threads != 0 ) { 10a25e: 83 78 58 00 cmpl $0x0,0x58(%eax) 10a262: 74 0c je 10a270 _Thread_Enable_dispatch(); 10a264: e8 d0 29 00 00 call 10cc39 <_Thread_Enable_dispatch> 10a269: b8 10 00 00 00 mov $0x10,%eax return EBUSY; 10a26e: eb 2b jmp 10a29b <== ALWAYS TAKEN } _Objects_Close( &_POSIX_Barrier_Information, &the_barrier->Object ); 10a270: 51 push %ecx 10a271: 51 push %ecx 10a272: 50 push %eax 10a273: 68 6c 66 12 00 push $0x12666c 10a278: e8 23 1e 00 00 call 10c0a0 <_Objects_Close> */ RTEMS_INLINE_ROUTINE void _POSIX_Barrier_Free ( POSIX_Barrier_Control *the_barrier ) { _Objects_Free( &_POSIX_Barrier_Information, &the_barrier->Object ); 10a27d: 58 pop %eax 10a27e: 5a pop %edx 10a27f: 53 push %ebx 10a280: 68 6c 66 12 00 push $0x12666c 10a285: e8 96 20 00 00 call 10c320 <_Objects_Free> _POSIX_Barrier_Free( the_barrier ); _Thread_Enable_dispatch(); 10a28a: e8 aa 29 00 00 call 10cc39 <_Thread_Enable_dispatch> 10a28f: 31 c0 xor %eax,%eax return 0; 10a291: 83 c4 10 add $0x10,%esp 10a294: eb 05 jmp 10a29b <== ALWAYS TAKEN 10a296: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10a29b: 8b 5d fc mov -0x4(%ebp),%ebx 10a29e: c9 leave 10a29f: c3 ret 0010a2a0 : int pthread_barrier_init( pthread_barrier_t *barrier, const pthread_barrierattr_t *attr, unsigned int count ) { 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 1c sub $0x1c,%esp 10a2a9: 8b 5d 08 mov 0x8(%ebp),%ebx 10a2ac: 8b 75 10 mov 0x10(%ebp),%esi const pthread_barrierattr_t *the_attr; /* * Error check parameters */ if ( !barrier ) 10a2af: 85 db test %ebx,%ebx 10a2b1: 0f 84 93 00 00 00 je 10a34a return EINVAL; if ( count == 0 ) 10a2b7: 85 f6 test %esi,%esi 10a2b9: 0f 84 8b 00 00 00 je 10a34a return EINVAL; /* * If the user passed in NULL, use the default attributes */ if ( attr ) { 10a2bf: 8b 7d 0c mov 0xc(%ebp),%edi 10a2c2: 85 ff test %edi,%edi 10a2c4: 75 0f jne 10a2d5 the_attr = attr; } else { (void) pthread_barrierattr_init( &my_attr ); 10a2c6: 83 ec 0c sub $0xc,%esp 10a2c9: 8d 7d d8 lea -0x28(%ebp),%edi 10a2cc: 57 push %edi 10a2cd: e8 1a ff ff ff call 10a1ec <== ALWAYS TAKEN 10a2d2: 83 c4 10 add $0x10,%esp } /* * Now start error checking the attributes that we are going to use */ if ( !the_attr->is_initialized ) 10a2d5: 83 3f 00 cmpl $0x0,(%edi) 10a2d8: 74 70 je 10a34a return EINVAL; switch ( the_attr->process_shared ) { 10a2da: 83 7f 04 00 cmpl $0x0,0x4(%edi) 10a2de: 75 6a jne 10a34a <== ALWAYS TAKEN } /* * Convert from POSIX attributes to Core Barrier attributes */ the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE; 10a2e0: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) the_attributes.maximum_count = count; 10a2e7: 89 75 e4 mov %esi,-0x1c(%ebp) rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10a2ea: a1 84 62 12 00 mov 0x126284,%eax 10a2ef: 40 inc %eax 10a2f0: a3 84 62 12 00 mov %eax,0x126284 * This function allocates a barrier control block from * the inactive chain of free barrier control blocks. */ RTEMS_INLINE_ROUTINE POSIX_Barrier_Control *_POSIX_Barrier_Allocate( void ) { return (POSIX_Barrier_Control *) 10a2f5: 83 ec 0c sub $0xc,%esp 10a2f8: 68 6c 66 12 00 push $0x12666c 10a2fd: e8 32 1d 00 00 call 10c034 <_Objects_Allocate> 10a302: 89 c6 mov %eax,%esi */ _Thread_Disable_dispatch(); /* prevents deletion */ the_barrier = _POSIX_Barrier_Allocate(); if ( !the_barrier ) { 10a304: 83 c4 10 add $0x10,%esp 10a307: 85 c0 test %eax,%eax 10a309: 75 0c jne 10a317 _Thread_Enable_dispatch(); 10a30b: e8 29 29 00 00 call 10cc39 <_Thread_Enable_dispatch> 10a310: b8 0b 00 00 00 mov $0xb,%eax return EAGAIN; 10a315: eb 38 jmp 10a34f <== ALWAYS TAKEN } _CORE_barrier_Initialize( &the_barrier->Barrier, &the_attributes ); 10a317: 50 push %eax 10a318: 50 push %eax 10a319: 8d 45 e0 lea -0x20(%ebp),%eax 10a31c: 50 push %eax 10a31d: 8d 46 10 lea 0x10(%esi),%eax 10a320: 50 push %eax 10a321: e8 42 14 00 00 call 10b768 <_CORE_barrier_Initialize> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10a326: 8b 46 08 mov 0x8(%esi),%eax 10a329: 0f b7 c8 movzwl %ax,%ecx 10a32c: 8b 15 88 66 12 00 mov 0x126688,%edx 10a332: 89 34 8a mov %esi,(%edx,%ecx,4) _Objects_Get_index( the_object->id ), the_object ); /* ASSERT: information->is_string == false */ the_object->name.name_u32 = name; 10a335: c7 46 0c 00 00 00 00 movl $0x0,0xc(%esi) ); /* * Exit the critical section and return the user an operational barrier */ *barrier = the_barrier->Object.id; 10a33c: 89 03 mov %eax,(%ebx) _Thread_Enable_dispatch(); 10a33e: e8 f6 28 00 00 call 10cc39 <_Thread_Enable_dispatch> 10a343: 31 c0 xor %eax,%eax return 0; 10a345: 83 c4 10 add $0x10,%esp 10a348: eb 05 jmp 10a34f <== ALWAYS TAKEN 10a34a: b8 16 00 00 00 mov $0x16,%eax } 10a34f: 8d 65 f4 lea -0xc(%ebp),%esp 10a352: 5b pop %ebx 10a353: 5e pop %esi 10a354: 5f pop %edi 10a355: c9 leave 10a356: c3 ret 0010a358 : */ int pthread_barrier_wait( pthread_barrier_t *barrier ) { 10a358: 55 push %ebp 10a359: 89 e5 mov %esp,%ebp 10a35b: 83 ec 18 sub $0x18,%esp 10a35e: 8b 45 08 mov 0x8(%ebp),%eax POSIX_Barrier_Control *the_barrier = NULL; Objects_Locations location; if ( !barrier ) 10a361: 85 c0 test %eax,%eax 10a363: 74 4c je 10a3b1 RTEMS_INLINE_ROUTINE POSIX_Barrier_Control *_POSIX_Barrier_Get ( pthread_barrier_t *barrier, Objects_Locations *location ) { return (POSIX_Barrier_Control *) _Objects_Get( 10a365: 52 push %edx 10a366: 8d 55 f4 lea -0xc(%ebp),%edx 10a369: 52 push %edx 10a36a: ff 30 pushl (%eax) 10a36c: 68 6c 66 12 00 push $0x12666c 10a371: e8 d2 20 00 00 call 10c448 <_Objects_Get> return EINVAL; the_barrier = _POSIX_Barrier_Get( barrier, &location ); switch ( location ) { 10a376: 83 c4 10 add $0x10,%esp 10a379: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 10a37d: 75 32 jne 10a3b1 case OBJECTS_LOCAL: _CORE_barrier_Wait( 10a37f: 83 ec 0c sub $0xc,%esp 10a382: 6a 00 push $0x0 10a384: 6a 00 push $0x0 10a386: 6a 01 push $0x1 10a388: ff 70 08 pushl 0x8(%eax) 10a38b: 83 c0 10 add $0x10,%eax 10a38e: 50 push %eax 10a38f: e8 08 14 00 00 call 10b79c <_CORE_barrier_Wait> the_barrier->Object.id, true, 0, NULL ); _Thread_Enable_dispatch(); 10a394: 83 c4 20 add $0x20,%esp 10a397: e8 9d 28 00 00 call 10cc39 <_Thread_Enable_dispatch> return _POSIX_Barrier_Translate_core_barrier_return_code( 10a39c: 83 ec 0c sub $0xc,%esp 10a39f: a1 40 63 12 00 mov 0x126340,%eax 10a3a4: ff 70 34 pushl 0x34(%eax) 10a3a7: e8 2c 4f 00 00 call 10f2d8 <_POSIX_Barrier_Translate_core_barrier_return_code> 10a3ac: 83 c4 10 add $0x10,%esp 10a3af: eb 05 jmp 10a3b6 <== ALWAYS TAKEN 10a3b1: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10a3b6: c9 leave 10a3b7: c3 ret 0010a1a8 : */ int pthread_barrierattr_destroy( pthread_barrierattr_t *attr ) { 10a1a8: 55 push %ebp 10a1a9: 89 e5 mov %esp,%ebp 10a1ab: 8b 45 08 mov 0x8(%ebp),%eax if ( !attr || attr->is_initialized == false ) 10a1ae: 85 c0 test %eax,%eax 10a1b0: 74 0f je 10a1c1 10a1b2: 83 38 00 cmpl $0x0,(%eax) 10a1b5: 74 0a je 10a1c1 return EINVAL; attr->is_initialized = false; 10a1b7: c7 00 00 00 00 00 movl $0x0,(%eax) 10a1bd: 31 c0 xor %eax,%eax return 0; 10a1bf: eb 05 jmp 10a1c6 <== ALWAYS TAKEN 10a1c1: b8 16 00 00 00 mov $0x16,%eax } 10a1c6: c9 leave 10a1c7: c3 ret 0010a1c8 : int pthread_barrierattr_getpshared( const pthread_barrierattr_t *attr, int *pshared ) { 10a1c8: 55 push %ebp 10a1c9: 89 e5 mov %esp,%ebp 10a1cb: 8b 45 08 mov 0x8(%ebp),%eax if ( !attr ) 10a1ce: 85 c0 test %eax,%eax 10a1d0: 74 11 je 10a1e3 return EINVAL; if ( !attr->is_initialized ) 10a1d2: 83 38 00 cmpl $0x0,(%eax) 10a1d5: 74 0c je 10a1e3 return EINVAL; *pshared = attr->process_shared; 10a1d7: 8b 50 04 mov 0x4(%eax),%edx 10a1da: 8b 45 0c mov 0xc(%ebp),%eax 10a1dd: 89 10 mov %edx,(%eax) 10a1df: 31 c0 xor %eax,%eax return 0; 10a1e1: eb 05 jmp 10a1e8 <== ALWAYS TAKEN 10a1e3: b8 16 00 00 00 mov $0x16,%eax } 10a1e8: c9 leave 10a1e9: c3 ret 0010a20c : int pthread_barrierattr_setpshared( pthread_barrierattr_t *attr, int pshared ) { 10a20c: 55 push %ebp 10a20d: 89 e5 mov %esp,%ebp 10a20f: 8b 45 08 mov 0x8(%ebp),%eax 10a212: 8b 55 0c mov 0xc(%ebp),%edx if ( !attr ) 10a215: 85 c0 test %eax,%eax 10a217: 74 11 je 10a22a return EINVAL; if ( !attr->is_initialized ) 10a219: 83 38 00 cmpl $0x0,(%eax) 10a21c: 74 0c je 10a22a return EINVAL; switch ( pshared ) { 10a21e: 83 fa 01 cmp $0x1,%edx 10a221: 77 07 ja 10a22a case PTHREAD_PROCESS_SHARED: case PTHREAD_PROCESS_PRIVATE: attr->process_shared = pshared; 10a223: 89 50 04 mov %edx,0x4(%eax) 10a226: 31 c0 xor %eax,%eax return 0; 10a228: eb 05 jmp 10a22f <== ALWAYS TAKEN 10a22a: b8 16 00 00 00 mov $0x16,%eax default: return EINVAL; } } 10a22f: c9 leave 10a230: c3 ret 001098f8 : */ void pthread_cleanup_pop( int execute ) { 1098f8: 55 push %ebp 1098f9: 89 e5 mov %esp,%ebp 1098fb: 57 push %edi 1098fc: 56 push %esi 1098fd: 53 push %ebx 1098fe: 83 ec 1c sub $0x1c,%esp 109901: 8b 5d 08 mov 0x8(%ebp),%ebx POSIX_Cancel_Handler_control tmp_handler; Chain_Control *handler_stack; POSIX_API_Control *thread_support; ISR_Level level; thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; 109904: a1 70 42 12 00 mov 0x124270,%eax 109909: 8b 90 f8 00 00 00 mov 0xf8(%eax),%edx rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10990f: a1 b4 41 12 00 mov 0x1241b4,%eax 109914: 40 inc %eax 109915: a3 b4 41 12 00 mov %eax,0x1241b4 * ensure that we do not get prempted and deleted while we are holding * memory that needs to be freed. */ _Thread_Disable_dispatch(); _ISR_Disable( level ); 10991a: 9c pushf 10991b: fa cli 10991c: 5e pop %esi */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10991d: 8d 82 dc 00 00 00 lea 0xdc(%edx),%eax POSIX_API_Control *thread_support; ISR_Level level; thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; handler_stack = &thread_support->Cancellation_Handlers; 109923: 39 82 d8 00 00 00 cmp %eax,0xd8(%edx) 109929: 75 09 jne 109934 _Thread_Disable_dispatch(); _ISR_Disable( level ); if ( _Chain_Is_empty( handler_stack ) ) { _Thread_Enable_dispatch(); 10992b: e8 7d 23 00 00 call 10bcad <_Thread_Enable_dispatch> _ISR_Enable( level ); 109930: 56 push %esi 109931: 9d popf return; 109932: eb 44 jmp 109978 <== ALWAYS TAKEN } handler = (POSIX_Cancel_Handler_control *) 109934: 8b 40 04 mov 0x4(%eax),%eax ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 109937: 8b 08 mov (%eax),%ecx previous = the_node->previous; 109939: 8b 50 04 mov 0x4(%eax),%edx next->previous = previous; 10993c: 89 51 04 mov %edx,0x4(%ecx) previous->next = next; 10993f: 89 0a mov %ecx,(%edx) _Chain_Tail( handler_stack )->previous; _Chain_Extract_unprotected( &handler->Node ); _ISR_Enable( level ); 109941: 56 push %esi 109942: 9d popf tmp_handler = *handler; 109943: 8d 7d d8 lea -0x28(%ebp),%edi 109946: b9 04 00 00 00 mov $0x4,%ecx 10994b: 89 c6 mov %eax,%esi 10994d: f3 a5 rep movsl %ds:(%esi),%es:(%edi) 10994f: 8b 75 e0 mov -0x20(%ebp),%esi 109952: 8b 7d e4 mov -0x1c(%ebp),%edi _Workspace_Free( handler ); 109955: 83 ec 0c sub $0xc,%esp 109958: 50 push %eax 109959: e8 3b 33 00 00 call 10cc99 <_Workspace_Free> _Thread_Enable_dispatch(); 10995e: e8 4a 23 00 00 call 10bcad <_Thread_Enable_dispatch> if ( execute ) 109963: 83 c4 10 add $0x10,%esp 109966: 85 db test %ebx,%ebx 109968: 74 0e je 109978 (*tmp_handler.routine)( tmp_handler.arg ); 10996a: 89 7d 08 mov %edi,0x8(%ebp) 10996d: 89 f0 mov %esi,%eax } 10996f: 8d 65 f4 lea -0xc(%ebp),%esp 109972: 5b pop %ebx 109973: 5e pop %esi 109974: 5f pop %edi 109975: c9 leave _Workspace_Free( handler ); _Thread_Enable_dispatch(); if ( execute ) (*tmp_handler.routine)( tmp_handler.arg ); 109976: ff e0 jmp *%eax } 109978: 8d 65 f4 lea -0xc(%ebp),%esp 10997b: 5b pop %ebx 10997c: 5e pop %esi 10997d: 5f pop %edi 10997e: c9 leave 10997f: c3 ret 00109c60 : void pthread_cleanup_push( void (*routine)( void * ), void *arg ) { 109c60: 55 push %ebp 109c61: 89 e5 mov %esp,%ebp 109c63: 56 push %esi 109c64: 53 push %ebx 109c65: 8b 5d 08 mov 0x8(%ebp),%ebx 109c68: 8b 75 0c mov 0xc(%ebp),%esi /* * The POSIX standard does not address what to do when the routine * is NULL. It also does not address what happens when we cannot * allocate memory or anything else bad happens. */ if ( !routine ) 109c6b: 85 db test %ebx,%ebx 109c6d: 74 4b je 109cba rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 109c6f: a1 dc 61 12 00 mov 0x1261dc,%eax 109c74: 40 inc %eax 109c75: a3 dc 61 12 00 mov %eax,0x1261dc return; _Thread_Disable_dispatch(); handler = _Workspace_Allocate( sizeof( POSIX_Cancel_Handler_control ) ); 109c7a: 83 ec 0c sub $0xc,%esp 109c7d: 6a 10 push $0x10 109c7f: e8 28 3a 00 00 call 10d6ac <_Workspace_Allocate> if ( handler ) { 109c84: 83 c4 10 add $0x10,%esp 109c87: 85 c0 test %eax,%eax 109c89: 74 24 je 109caf <== ALWAYS TAKEN thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; handler_stack = &thread_support->Cancellation_Handlers; 109c8b: 8b 15 98 62 12 00 mov 0x126298,%edx 109c91: 8b 92 f8 00 00 00 mov 0xf8(%edx),%edx 109c97: 81 c2 d8 00 00 00 add $0xd8,%edx handler->routine = routine; 109c9d: 89 58 08 mov %ebx,0x8(%eax) handler->arg = arg; 109ca0: 89 70 0c mov %esi,0xc(%eax) _Chain_Append( handler_stack, &handler->Node ); 109ca3: 51 push %ecx 109ca4: 51 push %ecx 109ca5: 50 push %eax 109ca6: 52 push %edx 109ca7: e8 50 15 00 00 call 10b1fc <_Chain_Append> 109cac: 83 c4 10 add $0x10,%esp } _Thread_Enable_dispatch(); } 109caf: 8d 65 f8 lea -0x8(%ebp),%esp 109cb2: 5b pop %ebx 109cb3: 5e pop %esi 109cb4: c9 leave handler->routine = routine; handler->arg = arg; _Chain_Append( handler_stack, &handler->Node ); } _Thread_Enable_dispatch(); 109cb5: e9 a3 29 00 00 jmp 10c65d <_Thread_Enable_dispatch> } 109cba: 8d 65 f8 lea -0x8(%ebp),%esp 109cbd: 5b pop %ebx 109cbe: 5e pop %esi 109cbf: c9 leave 109cc0: c3 ret 0010a928 : */ int pthread_cond_broadcast( pthread_cond_t *cond ) { 10a928: 55 push %ebp 10a929: 89 e5 mov %esp,%ebp 10a92b: 83 ec 10 sub $0x10,%esp return _POSIX_Condition_variables_Signal_support( cond, true ); 10a92e: 6a 01 push $0x1 10a930: ff 75 08 pushl 0x8(%ebp) 10a933: e8 6c 01 00 00 call 10aaa4 <_POSIX_Condition_variables_Signal_support> <== ALWAYS TAKEN } 10a938: c9 leave 10a939: c3 ret 0010a93c : */ int pthread_cond_destroy( pthread_cond_t *cond ) { 10a93c: 55 push %ebp 10a93d: 89 e5 mov %esp,%ebp 10a93f: 53 push %ebx 10a940: 83 ec 1c sub $0x1c,%esp POSIX_Condition_variables_Control *the_cond; Objects_Locations location; the_cond = _POSIX_Condition_variables_Get( cond, &location ); 10a943: 8d 45 f4 lea -0xc(%ebp),%eax 10a946: 50 push %eax 10a947: ff 75 08 pushl 0x8(%ebp) 10a94a: e8 59 00 00 00 call 10a9a8 <_POSIX_Condition_variables_Get> <== ALWAYS TAKEN 10a94f: 89 c3 mov %eax,%ebx switch ( location ) { 10a951: 83 c4 10 add $0x10,%esp 10a954: b8 16 00 00 00 mov $0x16,%eax 10a959: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 10a95d: 75 43 jne 10a9a2 case OBJECTS_LOCAL: if ( _Thread_queue_First( &the_cond->Wait_queue ) ) { 10a95f: 83 ec 0c sub $0xc,%esp 10a962: 8d 43 18 lea 0x18(%ebx),%eax 10a965: 50 push %eax 10a966: e8 b5 35 00 00 call 10df20 <_Thread_queue_First> 10a96b: 83 c4 10 add $0x10,%esp 10a96e: 85 c0 test %eax,%eax 10a970: 74 0c je 10a97e _Thread_Enable_dispatch(); 10a972: e8 26 2f 00 00 call 10d89d <_Thread_Enable_dispatch> 10a977: b8 10 00 00 00 mov $0x10,%eax return EBUSY; 10a97c: eb 24 jmp 10a9a2 <== ALWAYS TAKEN } _Objects_Close( 10a97e: 51 push %ecx 10a97f: 51 push %ecx 10a980: 53 push %ebx 10a981: 68 ac 76 12 00 push $0x1276ac 10a986: e8 79 23 00 00 call 10cd04 <_Objects_Close> RTEMS_INLINE_ROUTINE void _POSIX_Condition_variables_Free ( POSIX_Condition_variables_Control *the_condition_variable ) { _Objects_Free( 10a98b: 58 pop %eax 10a98c: 5a pop %edx 10a98d: 53 push %ebx 10a98e: 68 ac 76 12 00 push $0x1276ac 10a993: e8 ec 25 00 00 call 10cf84 <_Objects_Free> &_POSIX_Condition_variables_Information, &the_cond->Object ); _POSIX_Condition_variables_Free( the_cond ); _Thread_Enable_dispatch(); 10a998: e8 00 2f 00 00 call 10d89d <_Thread_Enable_dispatch> 10a99d: 31 c0 xor %eax,%eax return 0; 10a99f: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return EINVAL; } 10a9a2: 8b 5d fc mov -0x4(%ebp),%ebx 10a9a5: c9 leave 10a9a6: c3 ret 0010a9f0 : int pthread_cond_init( pthread_cond_t *cond, const pthread_condattr_t *attr ) { 10a9f0: 55 push %ebp 10a9f1: 89 e5 mov %esp,%ebp 10a9f3: 56 push %esi 10a9f4: 53 push %ebx 10a9f5: 8b 45 0c mov 0xc(%ebp),%eax POSIX_Condition_variables_Control *the_cond; const pthread_condattr_t *the_attr; if ( attr ) the_attr = attr; 10a9f8: bb e8 0b 12 00 mov $0x120be8,%ebx 10a9fd: 85 c0 test %eax,%eax 10a9ff: 74 02 je 10aa03 10aa01: 89 c3 mov %eax,%ebx /* * Be careful about attributes when global!!! */ if ( the_attr->process_shared == PTHREAD_PROCESS_SHARED ) 10aa03: 83 7b 04 01 cmpl $0x1,0x4(%ebx) 10aa07: 74 78 je 10aa81 <== ALWAYS TAKEN return EINVAL; if ( !the_attr->is_initialized ) 10aa09: 83 3b 00 cmpl $0x0,(%ebx) 10aa0c: 74 73 je 10aa81 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10aa0e: a1 2c 72 12 00 mov 0x12722c,%eax 10aa13: 40 inc %eax 10aa14: a3 2c 72 12 00 mov %eax,0x12722c */ RTEMS_INLINE_ROUTINE POSIX_Condition_variables_Control *_POSIX_Condition_variables_Allocate( void ) { return (POSIX_Condition_variables_Control *) 10aa19: 83 ec 0c sub $0xc,%esp 10aa1c: 68 ac 76 12 00 push $0x1276ac 10aa21: e8 72 22 00 00 call 10cc98 <_Objects_Allocate> 10aa26: 89 c6 mov %eax,%esi _Thread_Disable_dispatch(); the_cond = _POSIX_Condition_variables_Allocate(); if ( !the_cond ) { 10aa28: 83 c4 10 add $0x10,%esp 10aa2b: 85 c0 test %eax,%eax 10aa2d: 75 0c jne 10aa3b _Thread_Enable_dispatch(); 10aa2f: e8 69 2e 00 00 call 10d89d <_Thread_Enable_dispatch> 10aa34: b8 0c 00 00 00 mov $0xc,%eax return ENOMEM; 10aa39: eb 4b jmp 10aa86 <== ALWAYS TAKEN } the_cond->process_shared = the_attr->process_shared; 10aa3b: 8b 43 04 mov 0x4(%ebx),%eax 10aa3e: 89 46 10 mov %eax,0x10(%esi) the_cond->Mutex = POSIX_CONDITION_VARIABLES_NO_MUTEX; 10aa41: c7 46 14 00 00 00 00 movl $0x0,0x14(%esi) /* XXX some more initialization might need to go here */ _Thread_queue_Initialize( 10aa48: 6a 74 push $0x74 10aa4a: 68 00 08 00 00 push $0x800 10aa4f: 6a 00 push $0x0 10aa51: 8d 46 18 lea 0x18(%esi),%eax 10aa54: 50 push %eax 10aa55: e8 36 35 00 00 call 10df90 <_Thread_queue_Initialize> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10aa5a: 8b 46 08 mov 0x8(%esi),%eax 10aa5d: 0f b7 c8 movzwl %ax,%ecx 10aa60: 8b 15 c8 76 12 00 mov 0x1276c8,%edx 10aa66: 89 34 8a mov %esi,(%edx,%ecx,4) _Objects_Get_index( the_object->id ), the_object ); /* ASSERT: information->is_string == false */ the_object->name.name_u32 = name; 10aa69: c7 46 0c 00 00 00 00 movl $0x0,0xc(%esi) &_POSIX_Condition_variables_Information, &the_cond->Object, 0 ); *cond = the_cond->Object.id; 10aa70: 8b 55 08 mov 0x8(%ebp),%edx 10aa73: 89 02 mov %eax,(%edx) _Thread_Enable_dispatch(); 10aa75: e8 23 2e 00 00 call 10d89d <_Thread_Enable_dispatch> 10aa7a: 31 c0 xor %eax,%eax return 0; 10aa7c: 83 c4 10 add $0x10,%esp 10aa7f: eb 05 jmp 10aa86 <== ALWAYS TAKEN 10aa81: b8 16 00 00 00 mov $0x16,%eax } 10aa86: 8d 65 f8 lea -0x8(%ebp),%esp 10aa89: 5b pop %ebx 10aa8a: 5e pop %esi 10aa8b: c9 leave 10aa8c: c3 ret 0010aa90 : */ int pthread_cond_signal( pthread_cond_t *cond ) { 10aa90: 55 push %ebp 10aa91: 89 e5 mov %esp,%ebp 10aa93: 83 ec 10 sub $0x10,%esp return _POSIX_Condition_variables_Signal_support( cond, false ); 10aa96: 6a 00 push $0x0 10aa98: ff 75 08 pushl 0x8(%ebp) 10aa9b: e8 04 00 00 00 call 10aaa4 <_POSIX_Condition_variables_Signal_support> <== ALWAYS TAKEN } 10aaa0: c9 leave 10aaa1: c3 ret 0010ab00 : int pthread_cond_timedwait( pthread_cond_t *cond, pthread_mutex_t *mutex, const struct timespec *abstime ) { 10ab00: 55 push %ebp 10ab01: 89 e5 mov %esp,%ebp 10ab03: 83 ec 20 sub $0x20,%esp * So we check the abstime provided, and hold on to whether it * is valid or not. If it isn't correct and in the future, * then we do a polling operation and convert the UNSATISFIED * status into the appropriate error. */ switch ( _POSIX_Absolute_timeout_to_ticks(abstime, &ticks) ) { 10ab06: 8d 45 f4 lea -0xc(%ebp),%eax 10ab09: 50 push %eax 10ab0a: ff 75 10 pushl 0x10(%ebp) 10ab0d: e8 16 04 00 00 call 10af28 <_POSIX_Absolute_timeout_to_ticks> <== ALWAYS TAKEN 10ab12: 89 c2 mov %eax,%edx 10ab14: 83 c4 10 add $0x10,%esp 10ab17: b8 16 00 00 00 mov $0x16,%eax 10ab1c: 85 d2 test %edx,%edx 10ab1e: 74 1a je 10ab3a default: /* only to silence warnings */ already_timedout = false; break; } return _POSIX_Condition_variables_Wait_support( 10ab20: 31 c0 xor %eax,%eax 10ab22: 83 fa 02 cmp $0x2,%edx 10ab25: 0f 96 c0 setbe %al 10ab28: 50 push %eax 10ab29: ff 75 f4 pushl -0xc(%ebp) 10ab2c: ff 75 0c pushl 0xc(%ebp) 10ab2f: ff 75 08 pushl 0x8(%ebp) 10ab32: e8 1d 00 00 00 call 10ab54 <_POSIX_Condition_variables_Wait_support> <== ALWAYS TAKEN 10ab37: 83 c4 10 add $0x10,%esp cond, mutex, ticks, already_timedout ); } 10ab3a: c9 leave 10ab3b: c3 ret 0010ab3c : int pthread_cond_wait( pthread_cond_t *cond, pthread_mutex_t *mutex ) { 10ab3c: 55 push %ebp 10ab3d: 89 e5 mov %esp,%ebp 10ab3f: 83 ec 08 sub $0x8,%esp return _POSIX_Condition_variables_Wait_support( 10ab42: 6a 00 push $0x0 10ab44: 6a 00 push $0x0 10ab46: ff 75 0c pushl 0xc(%ebp) 10ab49: ff 75 08 pushl 0x8(%ebp) 10ab4c: e8 03 00 00 00 call 10ab54 <_POSIX_Condition_variables_Wait_support> <== ALWAYS TAKEN cond, mutex, THREAD_QUEUE_WAIT_FOREVER, false ); } 10ab51: c9 leave 10ab52: c3 ret 0010a8a4 : */ int pthread_condattr_destroy( pthread_condattr_t *attr ) { 10a8a4: 55 push %ebp 10a8a5: 89 e5 mov %esp,%ebp 10a8a7: 8b 45 08 mov 0x8(%ebp),%eax if ( !attr || attr->is_initialized == false ) 10a8aa: 85 c0 test %eax,%eax 10a8ac: 74 0f je 10a8bd 10a8ae: 83 38 00 cmpl $0x0,(%eax) 10a8b1: 74 0a je 10a8bd <== ALWAYS TAKEN return EINVAL; attr->is_initialized = false; 10a8b3: c7 00 00 00 00 00 movl $0x0,(%eax) 10a8b9: 31 c0 xor %eax,%eax return 0; 10a8bb: eb 05 jmp 10a8c2 <== ALWAYS TAKEN 10a8bd: b8 16 00 00 00 mov $0x16,%eax } 10a8c2: c9 leave 10a8c3: c3 ret 0010a908 : int pthread_condattr_setpshared( pthread_condattr_t *attr, int pshared ) { 10a908: 55 push %ebp 10a909: 89 e5 mov %esp,%ebp 10a90b: 8b 45 08 mov 0x8(%ebp),%eax 10a90e: 8b 55 0c mov 0xc(%ebp),%edx if ( !attr ) 10a911: 85 c0 test %eax,%eax 10a913: 74 0c je 10a921 return EINVAL; switch ( pshared ) { 10a915: 83 fa 01 cmp $0x1,%edx 10a918: 77 07 ja 10a921 case PTHREAD_PROCESS_SHARED: case PTHREAD_PROCESS_PRIVATE: attr->process_shared = pshared; 10a91a: 89 50 04 mov %edx,0x4(%eax) 10a91d: 31 c0 xor %eax,%eax return 0; 10a91f: eb 05 jmp 10a926 <== ALWAYS TAKEN 10a921: b8 16 00 00 00 mov $0x16,%eax default: return EINVAL; } } 10a926: c9 leave 10a927: c3 ret 00109fcc : pthread_t *thread, const pthread_attr_t *attr, void *(*start_routine)( void * ), void *arg ) { 109fcc: 55 push %ebp 109fcd: 89 e5 mov %esp,%ebp 109fcf: 57 push %edi 109fd0: 56 push %esi 109fd1: 53 push %ebx 109fd2: 83 ec 3c sub $0x3c,%esp 109fd5: 8b 45 0c mov 0xc(%ebp),%eax int schedpolicy = SCHED_RR; struct sched_param schedparam; Objects_Name name; int rc; if ( !start_routine ) 109fd8: c7 45 c0 0e 00 00 00 movl $0xe,-0x40(%ebp) 109fdf: 83 7d 10 00 cmpl $0x0,0x10(%ebp) 109fe3: 0f 84 fc 01 00 00 je 10a1e5 return EFAULT; the_attr = (attr) ? attr : &_POSIX_Threads_Default_attributes; 109fe9: bb 34 f7 11 00 mov $0x11f734,%ebx 109fee: 85 c0 test %eax,%eax 109ff0: 74 02 je 109ff4 109ff2: 89 c3 mov %eax,%ebx if ( !the_attr->is_initialized ) 109ff4: 83 3b 00 cmpl $0x0,(%ebx) 109ff7: 0f 84 e1 01 00 00 je 10a1de * stack space if it is allowed to allocate it itself. * * NOTE: If the user provides the stack we will let it drop below * twice the minimum. */ if ( the_attr->stackaddr && !_Stack_Is_enough(the_attr->stacksize) ) 109ffd: 83 7b 04 00 cmpl $0x0,0x4(%ebx) 10a001: 74 0f je 10a012 10a003: 8b 43 08 mov 0x8(%ebx),%eax 10a006: 3b 05 14 12 12 00 cmp 0x121214,%eax 10a00c: 0f 82 cc 01 00 00 jb 10a1de * If inheritsched is set to PTHREAD_INHERIT_SCHED, then this thread * inherits scheduling attributes from the creating thread. If it is * PTHREAD_EXPLICIT_SCHED, then scheduling parameters come from the * attributes structure. */ switch ( the_attr->inheritsched ) { 10a012: 8b 43 10 mov 0x10(%ebx),%eax 10a015: 83 f8 01 cmp $0x1,%eax 10a018: 74 0b je 10a025 10a01a: 83 f8 02 cmp $0x2,%eax 10a01d: 0f 85 bb 01 00 00 jne 10a1de 10a023: eb 19 jmp 10a03e <== ALWAYS TAKEN case PTHREAD_INHERIT_SCHED: api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; 10a025: a1 98 52 12 00 mov 0x125298,%eax 10a02a: 8b b0 f8 00 00 00 mov 0xf8(%eax),%esi schedpolicy = api->schedpolicy; 10a030: 8b 46 7c mov 0x7c(%esi),%eax 10a033: 89 45 bc mov %eax,-0x44(%ebp) schedparam = api->schedparam; 10a036: 8d 7d c8 lea -0x38(%ebp),%edi 10a039: 83 ee 80 sub $0xffffff80,%esi 10a03c: eb 0c jmp 10a04a <== ALWAYS TAKEN break; case PTHREAD_EXPLICIT_SCHED: schedpolicy = the_attr->schedpolicy; 10a03e: 8b 53 14 mov 0x14(%ebx),%edx 10a041: 89 55 bc mov %edx,-0x44(%ebp) schedparam = the_attr->schedparam; 10a044: 8d 7d c8 lea -0x38(%ebp),%edi 10a047: 8d 73 18 lea 0x18(%ebx),%esi 10a04a: b9 06 00 00 00 mov $0x6,%ecx 10a04f: f3 a5 rep movsl %ds:(%esi),%es:(%edi) /* * Check the contentionscope since rtems only supports PROCESS wide * contention (i.e. no system wide contention). */ if ( the_attr->contentionscope != PTHREAD_SCOPE_PROCESS ) 10a051: c7 45 c0 86 00 00 00 movl $0x86,-0x40(%ebp) 10a058: 83 7b 0c 00 cmpl $0x0,0xc(%ebx) 10a05c: 0f 85 83 01 00 00 jne 10a1e5 return ENOTSUP; /* * Interpret the scheduling parameters. */ if ( !_POSIX_Priority_Is_valid( schedparam.sched_priority ) ) 10a062: 83 ec 0c sub $0xc,%esp 10a065: ff 75 c8 pushl -0x38(%ebp) 10a068: e8 df 52 00 00 call 10f34c <_POSIX_Priority_Is_valid> <== ALWAYS TAKEN 10a06d: 83 c4 10 add $0x10,%esp 10a070: 84 c0 test %al,%al 10a072: 0f 84 66 01 00 00 je 10a1de <== ALWAYS TAKEN return EINVAL; core_priority = _POSIX_Priority_To_core( schedparam.sched_priority ); 10a078: 8b 7d c8 mov -0x38(%ebp),%edi RTEMS_INLINE_ROUTINE Priority_Control _POSIX_Priority_To_core( int priority ) { return (Priority_Control) (POSIX_SCHEDULER_MAXIMUM_PRIORITY - priority + 1); 10a07b: 0f b6 35 18 12 12 00 movzbl 0x121218,%esi /* * Set the core scheduling policy information. */ rc = _POSIX_Thread_Translate_sched_param( 10a082: 8d 45 e0 lea -0x20(%ebp),%eax 10a085: 50 push %eax 10a086: 8d 45 e4 lea -0x1c(%ebp),%eax 10a089: 50 push %eax 10a08a: 8d 45 c8 lea -0x38(%ebp),%eax 10a08d: 50 push %eax 10a08e: ff 75 bc pushl -0x44(%ebp) 10a091: e8 d6 52 00 00 call 10f36c <_POSIX_Thread_Translate_sched_param> <== ALWAYS TAKEN 10a096: 89 45 c0 mov %eax,-0x40(%ebp) schedpolicy, &schedparam, &budget_algorithm, &budget_callout ); if ( rc ) 10a099: 83 c4 10 add $0x10,%esp 10a09c: 85 c0 test %eax,%eax 10a09e: 0f 85 41 01 00 00 jne 10a1e5 <== ALWAYS TAKEN #endif /* * Lock the allocator mutex for protection */ _RTEMS_Lock_allocator(); 10a0a4: 83 ec 0c sub $0xc,%esp 10a0a7: ff 35 90 52 12 00 pushl 0x125290 10a0ad: e8 fa 14 00 00 call 10b5ac <_API_Mutex_Lock> * _POSIX_Threads_Allocate */ RTEMS_INLINE_ROUTINE Thread_Control *_POSIX_Threads_Allocate( void ) { return (Thread_Control *) _Objects_Allocate( &_POSIX_Threads_Information ); 10a0b2: c7 04 24 44 54 12 00 movl $0x125444,(%esp) 10a0b9: e8 c2 1d 00 00 call 10be80 <_Objects_Allocate> 10a0be: 89 c2 mov %eax,%edx * Allocate the thread control block. * * NOTE: Global threads are not currently supported. */ the_thread = _POSIX_Threads_Allocate(); if ( !the_thread ) { 10a0c0: 83 c4 10 add $0x10,%esp 10a0c3: 85 c0 test %eax,%eax 10a0c5: 75 05 jne 10a0cc _RTEMS_Unlock_allocator(); 10a0c7: 83 ec 0c sub $0xc,%esp 10a0ca: eb 53 jmp 10a11f <== ALWAYS TAKEN /* * Initialize the core thread for this task. */ name.name_p = NULL; /* posix threads don't have a name by default */ status = _Thread_Initialize( 10a0cc: 8b 43 08 mov 0x8(%ebx),%eax 10a0cf: 51 push %ecx 10a0d0: 6a 00 push $0x0 10a0d2: 6a 00 push $0x0 10a0d4: ff 75 e0 pushl -0x20(%ebp) 10a0d7: ff 75 e4 pushl -0x1c(%ebp) 10a0da: 6a 01 push $0x1 10a0dc: 81 e6 ff 00 00 00 and $0xff,%esi 10a0e2: 29 fe sub %edi,%esi 10a0e4: 56 push %esi 10a0e5: 6a 01 push $0x1 10a0e7: 8b 0d 14 12 12 00 mov 0x121214,%ecx 10a0ed: d1 e1 shl %ecx 10a0ef: 39 c1 cmp %eax,%ecx 10a0f1: 73 02 jae 10a0f5 10a0f3: 89 c1 mov %eax,%ecx 10a0f5: 51 push %ecx 10a0f6: ff 73 04 pushl 0x4(%ebx) 10a0f9: 52 push %edx 10a0fa: 68 44 54 12 00 push $0x125444 10a0ff: 89 55 b8 mov %edx,-0x48(%ebp) 10a102: e8 41 2a 00 00 call 10cb48 <_Thread_Initialize> budget_callout, 0, /* isr level */ name /* posix threads don't have a name */ ); if ( !status ) { 10a107: 83 c4 30 add $0x30,%esp 10a10a: 84 c0 test %al,%al 10a10c: 8b 55 b8 mov -0x48(%ebp),%edx 10a10f: 75 25 jne 10a136 RTEMS_INLINE_ROUTINE void _POSIX_Threads_Free ( Thread_Control *the_pthread ) { _Objects_Free( &_POSIX_Threads_Information, &the_pthread->Object ); 10a111: 53 push %ebx 10a112: 53 push %ebx 10a113: 52 push %edx 10a114: 68 44 54 12 00 push $0x125444 10a119: e8 4e 20 00 00 call 10c16c <_Objects_Free> _POSIX_Threads_Free( the_thread ); _RTEMS_Unlock_allocator(); 10a11e: 59 pop %ecx 10a11f: ff 35 90 52 12 00 pushl 0x125290 10a125: e8 ca 14 00 00 call 10b5f4 <_API_Mutex_Unlock> 10a12a: c7 45 c0 0b 00 00 00 movl $0xb,-0x40(%ebp) 10a131: e9 a3 00 00 00 jmp 10a1d9 <== ALWAYS TAKEN } /* * finish initializing the per API structure */ api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 10a136: 8b 8a f8 00 00 00 mov 0xf8(%edx),%ecx 10a13c: 89 4d c4 mov %ecx,-0x3c(%ebp) api->Attributes = *the_attr; 10a13f: b9 0e 00 00 00 mov $0xe,%ecx 10a144: 8b 7d c4 mov -0x3c(%ebp),%edi 10a147: 89 de mov %ebx,%esi 10a149: f3 a5 rep movsl %ds:(%esi),%es:(%edi) api->detachstate = the_attr->detachstate; 10a14b: 8b 43 34 mov 0x34(%ebx),%eax 10a14e: 8b 4d c4 mov -0x3c(%ebp),%ecx 10a151: 89 41 38 mov %eax,0x38(%ecx) api->schedpolicy = schedpolicy; 10a154: 8b 45 bc mov -0x44(%ebp),%eax 10a157: 89 41 7c mov %eax,0x7c(%ecx) api->schedparam = schedparam; 10a15a: 89 cf mov %ecx,%edi 10a15c: 83 ef 80 sub $0xffffff80,%edi 10a15f: 8d 75 c8 lea -0x38(%ebp),%esi 10a162: b9 06 00 00 00 mov $0x6,%ecx 10a167: f3 a5 rep movsl %ds:(%esi),%es:(%edi) * This insures we evaluate the process-wide signals pending when we * first run. * * NOTE: Since the thread starts with all unblocked, this is necessary. */ the_thread->do_post_task_switch_extension = true; 10a169: c6 42 74 01 movb $0x1,0x74(%edx) /* * POSIX threads are allocated and started in one operation. */ status = _Thread_Start( 10a16d: 83 ec 0c sub $0xc,%esp 10a170: 6a 00 push $0x0 10a172: ff 75 14 pushl 0x14(%ebp) 10a175: ff 75 10 pushl 0x10(%ebp) 10a178: 6a 01 push $0x1 10a17a: 52 push %edx 10a17b: 89 55 b8 mov %edx,-0x48(%ebp) 10a17e: e8 39 33 00 00 call 10d4bc <_Thread_Start> _RTEMS_Unlock_allocator(); return EINVAL; } #endif if ( schedpolicy == SCHED_SPORADIC ) { 10a183: 83 c4 20 add $0x20,%esp 10a186: 83 7d bc 03 cmpl $0x3,-0x44(%ebp) 10a18a: 8b 55 b8 mov -0x48(%ebp),%edx 10a18d: 75 34 jne 10a1c3 _Watchdog_Insert_ticks( 10a18f: 83 ec 0c sub $0xc,%esp 10a192: 8b 45 c4 mov -0x3c(%ebp),%eax 10a195: 05 88 00 00 00 add $0x88,%eax 10a19a: 50 push %eax 10a19b: e8 c8 34 00 00 call 10d668 <_Timespec_To_ticks> Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 10a1a0: 8b 4d c4 mov -0x3c(%ebp),%ecx 10a1a3: 89 81 a8 00 00 00 mov %eax,0xa8(%ecx) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 10a1a9: 58 pop %eax 10a1aa: 5a pop %edx 10a1ab: 89 c8 mov %ecx,%eax 10a1ad: 05 9c 00 00 00 add $0x9c,%eax 10a1b2: 50 push %eax 10a1b3: 68 b8 52 12 00 push $0x1252b8 10a1b8: e8 57 37 00 00 call 10d914 <_Watchdog_Insert> 10a1bd: 83 c4 10 add $0x10,%esp 10a1c0: 8b 55 b8 mov -0x48(%ebp),%edx } /* * Return the id and indicate we successfully created the thread */ *thread = the_thread->Object.id; 10a1c3: 8b 52 08 mov 0x8(%edx),%edx 10a1c6: 8b 45 08 mov 0x8(%ebp),%eax 10a1c9: 89 10 mov %edx,(%eax) _RTEMS_Unlock_allocator(); 10a1cb: 83 ec 0c sub $0xc,%esp 10a1ce: ff 35 90 52 12 00 pushl 0x125290 10a1d4: e8 1b 14 00 00 call 10b5f4 <_API_Mutex_Unlock> return 0; 10a1d9: 83 c4 10 add $0x10,%esp 10a1dc: eb 07 jmp 10a1e5 <== ALWAYS TAKEN 10a1de: c7 45 c0 16 00 00 00 movl $0x16,-0x40(%ebp) } 10a1e5: 8b 45 c0 mov -0x40(%ebp),%eax 10a1e8: 8d 65 f4 lea -0xc(%ebp),%esp 10a1eb: 5b pop %ebx 10a1ec: 5e pop %esi 10a1ed: 5f pop %edi 10a1ee: c9 leave 10a1ef: c3 ret 0011061c : } void pthread_exit( void *value_ptr ) { 11061c: 55 push %ebp 11061d: 89 e5 mov %esp,%ebp 11061f: 83 ec 10 sub $0x10,%esp _POSIX_Thread_Exit( _Thread_Executing, value_ptr ); 110622: ff 75 08 pushl 0x8(%ebp) 110625: ff 35 a8 42 12 00 pushl 0x1242a8 11062b: e8 88 ff ff ff call 1105b8 <_POSIX_Thread_Exit> <== ALWAYS TAKEN 110630: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } 110633: c9 leave <== NOT EXECUTED 110634: c3 ret <== NOT EXECUTED 0010c120 : int pthread_getschedparam( pthread_t thread, int *policy, struct sched_param *param ) { 10c120: 55 push %ebp 10c121: 89 e5 mov %esp,%ebp 10c123: 57 push %edi 10c124: 56 push %esi 10c125: 53 push %ebx 10c126: 83 ec 1c sub $0x1c,%esp 10c129: 8b 7d 0c mov 0xc(%ebp),%edi 10c12c: 8b 5d 10 mov 0x10(%ebp),%ebx Objects_Locations location; POSIX_API_Control *api; register Thread_Control *the_thread; if ( !policy || !param ) 10c12f: 85 db test %ebx,%ebx 10c131: 74 04 je 10c137 10c133: 85 ff test %edi,%edi 10c135: 75 07 jne 10c13e 10c137: ba 16 00 00 00 mov $0x16,%edx 10c13c: eb 4a jmp 10c188 <== ALWAYS TAKEN RTEMS_INLINE_ROUTINE Thread_Control *_POSIX_Threads_Get ( pthread_t id, Objects_Locations *location ) { return (Thread_Control *) 10c13e: 50 push %eax 10c13f: 8d 45 e4 lea -0x1c(%ebp),%eax 10c142: 50 push %eax 10c143: ff 75 08 pushl 0x8(%ebp) 10c146: 68 a4 94 12 00 push $0x1294a4 10c14b: e8 0c 20 00 00 call 10e15c <_Objects_Get> return EINVAL; the_thread = _POSIX_Threads_Get( thread, &location ); switch ( location ) { 10c150: 83 c4 10 add $0x10,%esp 10c153: ba 03 00 00 00 mov $0x3,%edx 10c158: 83 7d e4 00 cmpl $0x0,-0x1c(%ebp) 10c15c: 75 2a jne 10c188 case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 10c15e: 8b b0 f8 00 00 00 mov 0xf8(%eax),%esi if ( policy ) *policy = api->schedpolicy; 10c164: 8b 56 7c mov 0x7c(%esi),%edx 10c167: 89 17 mov %edx,(%edi) if ( param ) { *param = api->schedparam; 10c169: 83 ee 80 sub $0xffffff80,%esi 10c16c: b9 06 00 00 00 mov $0x6,%ecx 10c171: 89 df mov %ebx,%edi 10c173: f3 a5 rep movsl %ds:(%esi),%es:(%edi) param->sched_priority = 10c175: 0f b6 15 18 52 12 00 movzbl 0x125218,%edx 10c17c: 2b 50 14 sub 0x14(%eax),%edx 10c17f: 89 13 mov %edx,(%ebx) _POSIX_Priority_From_core( the_thread->current_priority ); } _Thread_Enable_dispatch(); 10c181: e8 c7 27 00 00 call 10e94d <_Thread_Enable_dispatch> 10c186: 31 d2 xor %edx,%edx break; } return ESRCH; } 10c188: 89 d0 mov %edx,%eax 10c18a: 8d 65 f4 lea -0xc(%ebp),%esp 10c18d: 5b pop %ebx 10c18e: 5e pop %esi 10c18f: 5f pop %edi 10c190: c9 leave 10c191: c3 ret 0010e7d0 : int pthread_join( pthread_t thread, void **value_ptr ) { 10e7d0: 55 push %ebp 10e7d1: 89 e5 mov %esp,%ebp 10e7d3: 56 push %esi 10e7d4: 53 push %ebx 10e7d5: 83 ec 14 sub $0x14,%esp 10e7d8: 8b 5d 0c mov 0xc(%ebp),%ebx 10e7db: 8d 45 f4 lea -0xc(%ebp),%eax 10e7de: 50 push %eax 10e7df: ff 75 08 pushl 0x8(%ebp) 10e7e2: 68 b8 d4 12 00 push $0x12d4b8 10e7e7: e8 bc 1f 00 00 call 1107a8 <_Objects_Get> 10e7ec: 89 c6 mov %eax,%esi POSIX_API_Control *api; Objects_Locations location; void *return_pointer; the_thread = _POSIX_Threads_Get( thread, &location ); switch ( location ) { 10e7ee: 83 c4 10 add $0x10,%esp 10e7f1: b8 03 00 00 00 mov $0x3,%eax 10e7f6: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 10e7fa: 75 61 jne 10e85d case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 10e7fc: 8b 96 f8 00 00 00 mov 0xf8(%esi),%edx if ( api->detachstate == PTHREAD_CREATE_DETACHED ) { 10e802: 83 7a 38 00 cmpl $0x0,0x38(%edx) 10e806: 75 0c jne 10e814 _Thread_Enable_dispatch(); 10e808: e8 8c 27 00 00 call 110f99 <_Thread_Enable_dispatch> 10e80d: b8 16 00 00 00 mov $0x16,%eax return EINVAL; 10e812: eb 49 jmp 10e85d <== ALWAYS TAKEN RTEMS_INLINE_ROUTINE bool _Thread_Is_executing ( const Thread_Control *the_thread ) { return ( the_thread == _Thread_Executing ); 10e814: 8b 0d 0c d3 12 00 mov 0x12d30c,%ecx } if ( _Thread_Is_executing( the_thread ) ) { 10e81a: 39 ce cmp %ecx,%esi 10e81c: 75 0c jne 10e82a _Thread_Enable_dispatch(); 10e81e: e8 76 27 00 00 call 110f99 <_Thread_Enable_dispatch> 10e823: b8 2d 00 00 00 mov $0x2d,%eax return EDEADLK; 10e828: eb 33 jmp 10e85d <== ALWAYS TAKEN /* * Put ourself on the threads join list */ _Thread_Executing->Wait.return_argument = &return_pointer; 10e82a: 8d 45 f0 lea -0x10(%ebp),%eax 10e82d: 89 41 28 mov %eax,0x28(%ecx) 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; 10e830: c7 42 6c 01 00 00 00 movl $0x1,0x6c(%edx) _Thread_queue_Enter_critical_section( &api->Join_List ); _Thread_queue_Enqueue( &api->Join_List, WATCHDOG_NO_TIMEOUT ); 10e837: 50 push %eax 10e838: 68 e8 16 11 00 push $0x1116e8 10e83d: 6a 00 push $0x0 10e83f: 83 c2 3c add $0x3c,%edx 10e842: 52 push %edx 10e843: e8 e4 2b 00 00 call 11142c <_Thread_queue_Enqueue_with_handler> _Thread_Enable_dispatch(); 10e848: e8 4c 27 00 00 call 110f99 <_Thread_Enable_dispatch> if ( value_ptr ) 10e84d: 83 c4 10 add $0x10,%esp 10e850: 31 c0 xor %eax,%eax 10e852: 85 db test %ebx,%ebx 10e854: 74 07 je 10e85d *value_ptr = return_pointer; 10e856: 8b 45 f0 mov -0x10(%ebp),%eax 10e859: 89 03 mov %eax,(%ebx) 10e85b: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return ESRCH; } 10e85d: 8d 65 f8 lea -0x8(%ebp),%esp 10e860: 5b pop %ebx 10e861: 5e pop %esi 10e862: c9 leave 10e863: c3 ret 00109e4c : int pthread_key_create( pthread_key_t *key, void (*destructor)( void * ) ) { 109e4c: 55 push %ebp 109e4d: 89 e5 mov %esp,%ebp 109e4f: 57 push %edi 109e50: 56 push %esi 109e51: 53 push %ebx 109e52: 83 ec 28 sub $0x28,%esp 109e55: a1 3c 62 12 00 mov 0x12623c,%eax 109e5a: 40 inc %eax 109e5b: a3 3c 62 12 00 mov %eax,0x12623c * the inactive chain of free keys control blocks. */ RTEMS_INLINE_ROUTINE POSIX_Keys_Control *_POSIX_Keys_Allocate( void ) { return (POSIX_Keys_Control *) _Objects_Allocate( &_POSIX_Keys_Information ); 109e60: 68 7c 66 12 00 push $0x12667c 109e65: e8 a2 1e 00 00 call 10bd0c <_Objects_Allocate> 109e6a: 89 c3 mov %eax,%ebx _Thread_Disable_dispatch(); the_key = _POSIX_Keys_Allocate(); if ( !the_key ) { 109e6c: 83 c4 10 add $0x10,%esp 109e6f: 85 c0 test %eax,%eax 109e71: 75 0f jne 109e82 _Thread_Enable_dispatch(); 109e73: e8 99 2a 00 00 call 10c911 <_Thread_Enable_dispatch> 109e78: b8 0b 00 00 00 mov $0xb,%eax return EAGAIN; 109e7d: e9 b4 00 00 00 jmp 109f36 <== ALWAYS TAKEN } the_key->destructor = destructor; 109e82: 8b 45 0c mov 0xc(%ebp),%eax 109e85: 89 43 10 mov %eax,0x10(%ebx) 109e88: be 01 00 00 00 mov $0x1,%esi for ( the_api = 1; the_api <= OBJECTS_APIS_LAST; the_api++ ) { if ( _Objects_Information_table[ the_api ] ) { 109e8d: 8b 04 b5 10 62 12 00 mov 0x126210(,%esi,4),%eax 109e94: 85 c0 test %eax,%eax 109e96: 74 6a je 109f02 INTERNAL_ERROR_CORE, true, INTERNAL_ERROR_IMPLEMENTATION_KEY_CREATE_INCONSISTENCY ); #endif bytes_to_allocate = sizeof( void * ) * 109e98: 8b 40 04 mov 0x4(%eax),%eax 109e9b: 0f b7 40 10 movzwl 0x10(%eax),%eax 109e9f: 8d 0c 85 04 00 00 00 lea 0x4(,%eax,4),%ecx (_Objects_Information_table[ the_api ][ 1 ]->maximum + 1); table = _Workspace_Allocate( bytes_to_allocate ); 109ea6: 83 ec 0c sub $0xc,%esp 109ea9: 51 push %ecx 109eaa: 89 4d e4 mov %ecx,-0x1c(%ebp) 109ead: e8 1a 3b 00 00 call 10d9cc <_Workspace_Allocate> if ( !table ) { 109eb2: 83 c4 10 add $0x10,%esp 109eb5: 85 c0 test %eax,%eax 109eb7: 8b 4d e4 mov -0x1c(%ebp),%ecx 109eba: 75 3a jne 109ef6 for ( --the_api; 109ebc: 8d 7e ff lea -0x1(%esi),%edi 109ebf: 8d 74 b3 10 lea 0x10(%ebx,%esi,4),%esi 109ec3: eb 11 jmp 109ed6 <== ALWAYS TAKEN the_api >= 1; the_api-- ) _Workspace_Free( the_key->Values[ the_api ] ); 109ec5: 83 ec 0c sub $0xc,%esp 109ec8: ff 36 pushl (%esi) 109eca: e8 16 3b 00 00 call 10d9e5 <_Workspace_Free> (_Objects_Information_table[ the_api ][ 1 ]->maximum + 1); table = _Workspace_Allocate( bytes_to_allocate ); if ( !table ) { for ( --the_api; the_api >= 1; the_api-- ) 109ecf: 4f dec %edi 109ed0: 83 ee 04 sub $0x4,%esi 109ed3: 83 c4 10 add $0x10,%esp #endif bytes_to_allocate = sizeof( void * ) * (_Objects_Information_table[ the_api ][ 1 ]->maximum + 1); table = _Workspace_Allocate( bytes_to_allocate ); if ( !table ) { for ( --the_api; 109ed6: 85 ff test %edi,%edi 109ed8: 75 eb jne 109ec5 */ RTEMS_INLINE_ROUTINE void _POSIX_Keys_Free ( POSIX_Keys_Control *the_key ) { _Objects_Free( &_POSIX_Keys_Information, &the_key->Object ); 109eda: 50 push %eax 109edb: 50 push %eax 109edc: 53 push %ebx 109edd: 68 7c 66 12 00 push $0x12667c 109ee2: e8 11 21 00 00 call 10bff8 <_Objects_Free> the_api >= 1; the_api-- ) _Workspace_Free( the_key->Values[ the_api ] ); _POSIX_Keys_Free( the_key ); _Thread_Enable_dispatch(); 109ee7: e8 25 2a 00 00 call 10c911 <_Thread_Enable_dispatch> 109eec: b8 0c 00 00 00 mov $0xc,%eax return ENOMEM; 109ef1: 83 c4 10 add $0x10,%esp 109ef4: eb 40 jmp 109f36 <== ALWAYS TAKEN } the_key->Values[ the_api ] = table; 109ef6: 89 44 b3 14 mov %eax,0x14(%ebx,%esi,4) memset( table, '\0', bytes_to_allocate ); 109efa: 89 c7 mov %eax,%edi 109efc: 31 c0 xor %eax,%eax 109efe: f3 aa rep stos %al,%es:(%edi) 109f00: eb 08 jmp 109f0a <== ALWAYS TAKEN } else { the_key->Values[ the_api ] = NULL; 109f02: c7 44 b3 14 00 00 00 movl $0x0,0x14(%ebx,%esi,4) 109f09: 00 * for. [NOTE: Currently RTEMS Classic API tasks are always enabled.] */ for ( the_api = 1; the_api <= OBJECTS_APIS_LAST; the_api++ ) { 109f0a: 46 inc %esi * This is a bit more complex than one might initially expect because * APIs are optional. Thus there may be no ITRON tasks to have keys * for. [NOTE: Currently RTEMS Classic API tasks are always enabled.] */ for ( the_api = 1; 109f0b: 83 fe 05 cmp $0x5,%esi 109f0e: 0f 85 79 ff ff ff jne 109e8d #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 109f14: 8b 43 08 mov 0x8(%ebx),%eax 109f17: 0f b7 c8 movzwl %ax,%ecx 109f1a: 8b 15 98 66 12 00 mov 0x126698,%edx 109f20: 89 1c 8a mov %ebx,(%edx,%ecx,4) _Objects_Get_index( the_object->id ), the_object ); /* ASSERT: information->is_string == false */ the_object->name.name_u32 = name; 109f23: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx) } _Objects_Open_u32( &_POSIX_Keys_Information, &the_key->Object, 0 ); *key = the_key->Object.id; 109f2a: 8b 55 08 mov 0x8(%ebp),%edx 109f2d: 89 02 mov %eax,(%edx) _Thread_Enable_dispatch(); 109f2f: e8 dd 29 00 00 call 10c911 <_Thread_Enable_dispatch> 109f34: 31 c0 xor %eax,%eax return 0; } 109f36: 8d 65 f4 lea -0xc(%ebp),%esp 109f39: 5b pop %ebx 109f3a: 5e pop %esi 109f3b: 5f pop %edi 109f3c: c9 leave 109f3d: c3 ret 00111398 : int pthread_kill( pthread_t thread, int sig ) { 111398: 55 push %ebp 111399: 89 e5 mov %esp,%ebp 11139b: 57 push %edi 11139c: 56 push %esi 11139d: 53 push %ebx 11139e: 83 ec 1c sub $0x1c,%esp 1113a1: 8b 75 0c mov 0xc(%ebp),%esi POSIX_API_Control *api; Thread_Control *the_thread; Objects_Locations location; if ( !sig ) 1113a4: 85 f6 test %esi,%esi 1113a6: 74 08 je 1113b0 static inline bool is_valid_signo( int signo ) { return ((signo) >= 1 && (signo) <= 32 ); 1113a8: 8d 7e ff lea -0x1(%esi),%edi rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) ) 1113ab: 83 ff 1f cmp $0x1f,%edi 1113ae: 76 0d jbe 1113bd rtems_set_errno_and_return_minus_one( EINVAL ); 1113b0: e8 0f 01 00 00 call 1114c4 <__errno> 1113b5: c7 00 16 00 00 00 movl $0x16,(%eax) 1113bb: eb 7b jmp 111438 <== ALWAYS TAKEN RTEMS_INLINE_ROUTINE Thread_Control *_POSIX_Threads_Get ( pthread_t id, Objects_Locations *location ) { return (Thread_Control *) 1113bd: 52 push %edx 1113be: 8d 45 e4 lea -0x1c(%ebp),%eax 1113c1: 50 push %eax 1113c2: ff 75 08 pushl 0x8(%ebp) 1113c5: 68 54 44 12 00 push $0x124454 1113ca: e8 31 a0 ff ff call 10b400 <_Objects_Get> 1113cf: 89 c3 mov %eax,%ebx the_thread = _POSIX_Threads_Get( thread, &location ); switch ( location ) { 1113d1: 83 c4 10 add $0x10,%esp 1113d4: 83 7d e4 00 cmpl $0x0,-0x1c(%ebp) 1113d8: 75 53 jne 11142d case OBJECTS_LOCAL: /* * If sig == 0 then just validate arguments */ api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 1113da: 8b 90 f8 00 00 00 mov 0xf8(%eax),%edx if ( sig ) { if ( _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN ) { 1113e0: 6b c6 0c imul $0xc,%esi,%eax 1113e3: 83 b8 54 47 12 00 01 cmpl $0x1,0x124754(%eax) 1113ea: 74 38 je 111424 return 0; } /* XXX critical section */ api->signals_pending |= signo_to_mask( sig ); 1113ec: b8 01 00 00 00 mov $0x1,%eax 1113f1: 89 f9 mov %edi,%ecx 1113f3: d3 e0 shl %cl,%eax 1113f5: 09 82 c8 00 00 00 or %eax,0xc8(%edx) (void) _POSIX_signals_Unblock_thread( the_thread, sig, NULL ); 1113fb: 50 push %eax 1113fc: 6a 00 push $0x0 1113fe: 56 push %esi 1113ff: 53 push %ebx 111400: e8 9b fe ff ff call 1112a0 <_POSIX_signals_Unblock_thread> the_thread->do_post_task_switch_extension = true; 111405: c6 43 74 01 movb $0x1,0x74(%ebx) if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) 111409: a1 84 42 12 00 mov 0x124284,%eax 11140e: 83 c4 10 add $0x10,%esp 111411: 85 c0 test %eax,%eax 111413: 74 0f je 111424 111415: 3b 1d a8 42 12 00 cmp 0x1242a8,%ebx 11141b: 75 07 jne 111424 _ISR_Signals_to_thread_executing = true; 11141d: c6 05 3c 43 12 00 01 movb $0x1,0x12433c } _Thread_Enable_dispatch(); 111424: e8 c8 a7 ff ff call 10bbf1 <_Thread_Enable_dispatch> 111429: 31 c0 xor %eax,%eax return 0; 11142b: eb 0e jmp 11143b <== ALWAYS TAKEN #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( ESRCH ); 11142d: e8 92 00 00 00 call 1114c4 <__errno> 111432: c7 00 03 00 00 00 movl $0x3,(%eax) 111438: 83 c8 ff or $0xffffffff,%eax } 11143b: 8d 65 f4 lea -0xc(%ebp),%esp 11143e: 5b pop %ebx 11143f: 5e pop %esi 111440: 5f pop %edi 111441: c9 leave 111442: c3 ret 0010b9e8 : */ int pthread_mutex_destroy( pthread_mutex_t *mutex ) { 10b9e8: 55 push %ebp 10b9e9: 89 e5 mov %esp,%ebp 10b9eb: 53 push %ebx 10b9ec: 83 ec 1c sub $0x1c,%esp register POSIX_Mutex_Control *the_mutex; Objects_Locations location; the_mutex = _POSIX_Mutex_Get( mutex, &location ); 10b9ef: 8d 45 f4 lea -0xc(%ebp),%eax 10b9f2: 50 push %eax 10b9f3: ff 75 08 pushl 0x8(%ebp) 10b9f6: e8 a6 00 00 00 call 10baa1 <_POSIX_Mutex_Get> <== ALWAYS TAKEN 10b9fb: 89 c3 mov %eax,%ebx switch ( location ) { 10b9fd: 83 c4 10 add $0x10,%esp 10ba00: b8 16 00 00 00 mov $0x16,%eax 10ba05: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 10ba09: 75 46 jne 10ba51 /* * XXX: There is an error for the mutex being locked * or being in use by a condition variable. */ if ( _CORE_mutex_Is_locked( &the_mutex->Mutex ) ) { 10ba0b: 83 7b 64 00 cmpl $0x0,0x64(%ebx) 10ba0f: 75 0c jne 10ba1d _Thread_Enable_dispatch(); 10ba11: e8 37 2f 00 00 call 10e94d <_Thread_Enable_dispatch> 10ba16: b8 10 00 00 00 mov $0x10,%eax return EBUSY; 10ba1b: eb 34 jmp 10ba51 <== ALWAYS TAKEN } _Objects_Close( &_POSIX_Mutex_Information, &the_mutex->Object ); 10ba1d: 51 push %ecx 10ba1e: 51 push %ecx 10ba1f: 53 push %ebx 10ba20: 68 e4 95 12 00 push $0x1295e4 10ba25: e8 8a 23 00 00 call 10ddb4 <_Objects_Close> _CORE_mutex_Flush( &the_mutex->Mutex, NULL, EINVAL ); 10ba2a: 83 c4 0c add $0xc,%esp 10ba2d: 6a 16 push $0x16 10ba2f: 6a 00 push $0x0 10ba31: 8d 43 14 lea 0x14(%ebx),%eax 10ba34: 50 push %eax 10ba35: e8 3a 1b 00 00 call 10d574 <_CORE_mutex_Flush> RTEMS_INLINE_ROUTINE void _POSIX_Mutex_Free ( POSIX_Mutex_Control *the_mutex ) { _Objects_Free( &_POSIX_Mutex_Information, &the_mutex->Object ); 10ba3a: 58 pop %eax 10ba3b: 5a pop %edx 10ba3c: 53 push %ebx 10ba3d: 68 e4 95 12 00 push $0x1295e4 10ba42: e8 ed 25 00 00 call 10e034 <_Objects_Free> _POSIX_Mutex_Free( the_mutex ); _Thread_Enable_dispatch(); 10ba47: e8 01 2f 00 00 call 10e94d <_Thread_Enable_dispatch> 10ba4c: 31 c0 xor %eax,%eax return 0; 10ba4e: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return EINVAL; } 10ba51: 8b 5d fc mov -0x4(%ebp),%ebx 10ba54: c9 leave 10ba55: c3 ret 0010bae8 : int pthread_mutex_getprioceiling( pthread_mutex_t *mutex, int *prioceiling ) { 10bae8: 55 push %ebp 10bae9: 89 e5 mov %esp,%ebp 10baeb: 53 push %ebx 10baec: 83 ec 14 sub $0x14,%esp 10baef: 8b 5d 0c mov 0xc(%ebp),%ebx register POSIX_Mutex_Control *the_mutex; Objects_Locations location; if ( !prioceiling ) 10baf2: 85 db test %ebx,%ebx 10baf4: 74 2c je 10bb22 return EINVAL; the_mutex = _POSIX_Mutex_Get( mutex, &location ); 10baf6: 50 push %eax 10baf7: 50 push %eax 10baf8: 8d 45 f4 lea -0xc(%ebp),%eax 10bafb: 50 push %eax 10bafc: ff 75 08 pushl 0x8(%ebp) 10baff: e8 9d ff ff ff call 10baa1 <_POSIX_Mutex_Get> <== ALWAYS TAKEN switch ( location ) { 10bb04: 83 c4 10 add $0x10,%esp 10bb07: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 10bb0b: 75 15 jne 10bb22 case OBJECTS_LOCAL: *prioceiling = _POSIX_Priority_From_core( 10bb0d: 0f b6 15 18 52 12 00 movzbl 0x125218,%edx 10bb14: 2b 50 60 sub 0x60(%eax),%edx 10bb17: 89 13 mov %edx,(%ebx) the_mutex->Mutex.Attributes.priority_ceiling ); _Thread_Enable_dispatch(); 10bb19: e8 2f 2e 00 00 call 10e94d <_Thread_Enable_dispatch> 10bb1e: 31 c0 xor %eax,%eax return 0; 10bb20: eb 05 jmp 10bb27 <== ALWAYS TAKEN 10bb22: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10bb27: 8b 5d fc mov -0x4(%ebp),%ebx 10bb2a: c9 leave 10bb2b: c3 ret 0010bb2c : int pthread_mutex_init( pthread_mutex_t *mutex, const pthread_mutexattr_t *attr ) { 10bb2c: 55 push %ebp 10bb2d: 89 e5 mov %esp,%ebp 10bb2f: 57 push %edi 10bb30: 56 push %esi 10bb31: 53 push %ebx 10bb32: 83 ec 0c sub $0xc,%esp 10bb35: 8b 45 0c mov 0xc(%ebp),%eax POSIX_Mutex_Control *the_mutex; CORE_mutex_Attributes *the_mutex_attr; const pthread_mutexattr_t *the_attr; CORE_mutex_Disciplines the_discipline; if ( attr ) the_attr = attr; 10bb38: be 64 96 12 00 mov $0x129664,%esi 10bb3d: 85 c0 test %eax,%eax 10bb3f: 74 02 je 10bb43 10bb41: 89 c6 mov %eax,%esi else the_attr = &_POSIX_Mutex_Default_attributes; /* Check for NULL mutex */ if ( !mutex ) 10bb43: 83 7d 08 00 cmpl $0x0,0x8(%ebp) 10bb47: 0f 84 f0 00 00 00 je 10bc3d } } } #endif if ( !the_attr->is_initialized ) 10bb4d: 83 3e 00 cmpl $0x0,(%esi) 10bb50: 0f 84 e7 00 00 00 je 10bc3d return EINVAL; /* * We only support process private mutexes. */ if ( the_attr->process_shared == PTHREAD_PROCESS_SHARED ) 10bb56: 8b 56 04 mov 0x4(%esi),%edx 10bb59: b8 58 00 00 00 mov $0x58,%eax 10bb5e: 83 fa 01 cmp $0x1,%edx 10bb61: 0f 84 db 00 00 00 je 10bc42 return ENOSYS; if ( the_attr->process_shared != PTHREAD_PROCESS_PRIVATE ) 10bb67: 85 d2 test %edx,%edx 10bb69: 0f 85 ce 00 00 00 jne 10bc3d return EINVAL; /* * Determine the discipline of the mutex */ switch ( the_attr->protocol ) { 10bb6f: 8b 46 0c mov 0xc(%esi),%eax 10bb72: 83 f8 01 cmp $0x1,%eax 10bb75: 74 10 je 10bb87 10bb77: 83 f8 02 cmp $0x2,%eax 10bb7a: 74 12 je 10bb8e 10bb7c: 31 ff xor %edi,%edi 10bb7e: 85 c0 test %eax,%eax 10bb80: 74 11 je 10bb93 10bb82: e9 b6 00 00 00 jmp 10bc3d <== ALWAYS TAKEN 10bb87: bf 02 00 00 00 mov $0x2,%edi 10bb8c: eb 05 jmp 10bb93 <== ALWAYS TAKEN 10bb8e: bf 03 00 00 00 mov $0x3,%edi } /* * Validate the priority ceiling field -- should always be valid. */ if ( !_POSIX_Priority_Is_valid( the_attr->prio_ceiling ) ) 10bb93: 83 ec 0c sub $0xc,%esp 10bb96: ff 76 08 pushl 0x8(%esi) 10bb99: e8 be 02 00 00 call 10be5c <_POSIX_Priority_Is_valid> <== ALWAYS TAKEN 10bb9e: 83 c4 10 add $0x10,%esp 10bba1: 84 c0 test %al,%al 10bba3: 0f 84 94 00 00 00 je 10bc3d #if defined(_UNIX98_THREAD_MUTEX_ATTRIBUTES) /* * Validate the mutex type and set appropriate SuperCore mutex * attributes. */ switch ( the_attr->type ) { 10bba9: 83 7e 10 03 cmpl $0x3,0x10(%esi) 10bbad: 0f 87 8a 00 00 00 ja 10bc3d 10bbb3: a1 3c 92 12 00 mov 0x12923c,%eax 10bbb8: 40 inc %eax 10bbb9: a3 3c 92 12 00 mov %eax,0x12923c * _POSIX_Mutex_Allocate */ RTEMS_INLINE_ROUTINE POSIX_Mutex_Control *_POSIX_Mutex_Allocate( void ) { return (POSIX_Mutex_Control *) _Objects_Allocate( &_POSIX_Mutex_Information ); 10bbbe: 83 ec 0c sub $0xc,%esp 10bbc1: 68 e4 95 12 00 push $0x1295e4 10bbc6: e8 7d 21 00 00 call 10dd48 <_Objects_Allocate> 10bbcb: 89 c3 mov %eax,%ebx */ _Thread_Disable_dispatch(); the_mutex = _POSIX_Mutex_Allocate(); if ( !the_mutex ) { 10bbcd: 83 c4 10 add $0x10,%esp 10bbd0: 85 c0 test %eax,%eax 10bbd2: 75 0c jne 10bbe0 _Thread_Enable_dispatch(); 10bbd4: e8 74 2d 00 00 call 10e94d <_Thread_Enable_dispatch> 10bbd9: b8 0b 00 00 00 mov $0xb,%eax return EAGAIN; 10bbde: eb 62 jmp 10bc42 <== ALWAYS TAKEN } the_mutex->process_shared = the_attr->process_shared; 10bbe0: 8b 46 04 mov 0x4(%esi),%eax 10bbe3: 89 43 10 mov %eax,0x10(%ebx) the_mutex_attr = &the_mutex->Mutex.Attributes; if ( the_attr->recursive ) the_mutex_attr->lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; 10bbe6: 31 c0 xor %eax,%eax 10bbe8: 83 7e 14 00 cmpl $0x0,0x14(%esi) 10bbec: 0f 94 c0 sete %al 10bbef: 89 43 54 mov %eax,0x54(%ebx) else the_mutex_attr->lock_nesting_behavior = CORE_MUTEX_NESTING_IS_ERROR; the_mutex_attr->only_owner_release = true; 10bbf2: c6 43 58 01 movb $0x1,0x58(%ebx) the_mutex_attr->priority_ceiling = 10bbf6: 0f b6 05 18 52 12 00 movzbl 0x125218,%eax 10bbfd: 2b 46 08 sub 0x8(%esi),%eax 10bc00: 89 43 60 mov %eax,0x60(%ebx) _POSIX_Priority_To_core( the_attr->prio_ceiling ); the_mutex_attr->discipline = the_discipline; 10bc03: 89 7b 5c mov %edi,0x5c(%ebx) /* * Must be initialized to unlocked. */ _CORE_mutex_Initialize( 10bc06: 50 push %eax 10bc07: 6a 01 push $0x1 10bc09: 8d 43 54 lea 0x54(%ebx),%eax 10bc0c: 50 push %eax 10bc0d: 8d 43 14 lea 0x14(%ebx),%eax 10bc10: 50 push %eax 10bc11: e8 6a 19 00 00 call 10d580 <_CORE_mutex_Initialize> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10bc16: 8b 43 08 mov 0x8(%ebx),%eax 10bc19: 0f b7 c8 movzwl %ax,%ecx 10bc1c: 8b 15 00 96 12 00 mov 0x129600,%edx 10bc22: 89 1c 8a mov %ebx,(%edx,%ecx,4) _Objects_Get_index( the_object->id ), the_object ); /* ASSERT: information->is_string == false */ the_object->name.name_u32 = name; 10bc25: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx) CORE_MUTEX_UNLOCKED ); _Objects_Open_u32( &_POSIX_Mutex_Information, &the_mutex->Object, 0 ); *mutex = the_mutex->Object.id; 10bc2c: 8b 55 08 mov 0x8(%ebp),%edx 10bc2f: 89 02 mov %eax,(%edx) _Thread_Enable_dispatch(); 10bc31: e8 17 2d 00 00 call 10e94d <_Thread_Enable_dispatch> 10bc36: 31 c0 xor %eax,%eax return 0; 10bc38: 83 c4 10 add $0x10,%esp 10bc3b: eb 05 jmp 10bc42 <== ALWAYS TAKEN 10bc3d: b8 16 00 00 00 mov $0x16,%eax } 10bc42: 8d 65 f4 lea -0xc(%ebp),%esp 10bc45: 5b pop %ebx 10bc46: 5e pop %esi 10bc47: 5f pop %edi 10bc48: c9 leave 10bc49: c3 ret 0010bc4c : */ int pthread_mutex_lock( pthread_mutex_t *mutex ) { 10bc4c: 55 push %ebp 10bc4d: 89 e5 mov %esp,%ebp 10bc4f: 83 ec 0c sub $0xc,%esp return _POSIX_Mutex_Lock_support( mutex, true, THREAD_QUEUE_WAIT_FOREVER ); 10bc52: 6a 00 push $0x0 10bc54: 6a 01 push $0x1 10bc56: ff 75 08 pushl 0x8(%ebp) 10bc59: e8 02 00 00 00 call 10bc60 <_POSIX_Mutex_Lock_support> <== ALWAYS TAKEN } 10bc5e: c9 leave 10bc5f: c3 ret 0010bcbc : int pthread_mutex_setprioceiling( pthread_mutex_t *mutex, int prioceiling, int *old_ceiling ) { 10bcbc: 55 push %ebp 10bcbd: 89 e5 mov %esp,%ebp 10bcbf: 57 push %edi 10bcc0: 56 push %esi 10bcc1: 53 push %ebx 10bcc2: 83 ec 2c sub $0x2c,%esp 10bcc5: 8b 7d 08 mov 0x8(%ebp),%edi 10bcc8: 8b 5d 0c mov 0xc(%ebp),%ebx 10bccb: 8b 75 10 mov 0x10(%ebp),%esi register POSIX_Mutex_Control *the_mutex; Objects_Locations location; Priority_Control the_priority; if ( !old_ceiling ) 10bcce: 85 f6 test %esi,%esi 10bcd0: 74 66 je 10bd38 return EINVAL; if ( !_POSIX_Priority_Is_valid( prioceiling ) ) 10bcd2: 83 ec 0c sub $0xc,%esp 10bcd5: 53 push %ebx 10bcd6: e8 81 01 00 00 call 10be5c <_POSIX_Priority_Is_valid> <== ALWAYS TAKEN 10bcdb: 83 c4 10 add $0x10,%esp 10bcde: 84 c0 test %al,%al 10bce0: 74 56 je 10bd38 RTEMS_INLINE_ROUTINE Priority_Control _POSIX_Priority_To_core( int priority ) { return (Priority_Control) (POSIX_SCHEDULER_MAXIMUM_PRIORITY - priority + 1); 10bce2: a0 18 52 12 00 mov 0x125218,%al 10bce7: 88 45 d7 mov %al,-0x29(%ebp) /* * Must acquire the mutex before we can change it's ceiling. * POSIX says block until we acquire it. */ (void) pthread_mutex_lock( mutex ); 10bcea: 83 ec 0c sub $0xc,%esp 10bced: 57 push %edi 10bcee: e8 59 ff ff ff call 10bc4c <== ALWAYS TAKEN * operations. * * NOTE: This makes it easier to get 100% binary coverage since the * bad Id case is handled by the switch. */ the_mutex = _POSIX_Mutex_Get( mutex, &location ); 10bcf3: 59 pop %ecx 10bcf4: 58 pop %eax 10bcf5: 8d 45 e4 lea -0x1c(%ebp),%eax 10bcf8: 50 push %eax 10bcf9: 57 push %edi 10bcfa: e8 a2 fd ff ff call 10baa1 <_POSIX_Mutex_Get> <== ALWAYS TAKEN switch ( location ) { 10bcff: 83 c4 10 add $0x10,%esp 10bd02: 83 7d e4 00 cmpl $0x0,-0x1c(%ebp) 10bd06: 75 30 jne 10bd38 case OBJECTS_LOCAL: *old_ceiling = _POSIX_Priority_From_core( 10bd08: 0f b6 15 18 52 12 00 movzbl 0x125218,%edx 10bd0f: 2b 50 60 sub 0x60(%eax),%edx 10bd12: 89 16 mov %edx,(%esi) the_mutex->Mutex.Attributes.priority_ceiling ); the_mutex->Mutex.Attributes.priority_ceiling = the_priority; 10bd14: 0f b6 55 d7 movzbl -0x29(%ebp),%edx 10bd18: 29 da sub %ebx,%edx 10bd1a: 89 50 60 mov %edx,0x60(%eax) /* * We are required to unlock the mutex before we return. */ _CORE_mutex_Surrender( 10bd1d: 52 push %edx 10bd1e: 6a 00 push $0x0 10bd20: ff 70 08 pushl 0x8(%eax) 10bd23: 83 c0 14 add $0x14,%eax 10bd26: 50 push %eax 10bd27: e8 d4 19 00 00 call 10d700 <_CORE_mutex_Surrender> &the_mutex->Mutex, the_mutex->Object.id, NULL ); _Thread_Enable_dispatch(); 10bd2c: e8 1c 2c 00 00 call 10e94d <_Thread_Enable_dispatch> 10bd31: 31 c0 xor %eax,%eax return 0; 10bd33: 83 c4 10 add $0x10,%esp 10bd36: eb 05 jmp 10bd3d <== ALWAYS TAKEN 10bd38: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10bd3d: 8d 65 f4 lea -0xc(%ebp),%esp 10bd40: 5b pop %ebx 10bd41: 5e pop %esi 10bd42: 5f pop %edi 10bd43: c9 leave 10bd44: c3 ret 0010bd48 : int pthread_mutex_timedlock( pthread_mutex_t *mutex, const struct timespec *abstime ) { 10bd48: 55 push %ebp 10bd49: 89 e5 mov %esp,%ebp 10bd4b: 83 ec 20 sub $0x20,%esp * * If the status is POSIX_ABSOLUTE_TIMEOUT_INVALID, * POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST, or POSIX_ABSOLUTE_TIMEOUT_IS_NOW, * then we should not wait. */ status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks ); 10bd4e: 8d 45 f4 lea -0xc(%ebp),%eax 10bd51: 50 push %eax 10bd52: ff 75 0c pushl 0xc(%ebp) 10bd55: e8 8a 00 00 00 call 10bde4 <_POSIX_Absolute_timeout_to_ticks> <== ALWAYS TAKEN if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE ) do_wait = false; lock_status = _POSIX_Mutex_Lock_support( mutex, do_wait, ticks ); 10bd5a: 83 c4 0c add $0xc,%esp 10bd5d: ff 75 f4 pushl -0xc(%ebp) 10bd60: 83 f8 03 cmp $0x3,%eax 10bd63: 0f 94 c0 sete %al 10bd66: 0f b6 c0 movzbl %al,%eax 10bd69: 50 push %eax 10bd6a: ff 75 08 pushl 0x8(%ebp) 10bd6d: e8 ee fe ff ff call 10bc60 <_POSIX_Mutex_Lock_support> <== ALWAYS TAKEN break; } } return lock_status; } 10bd72: c9 leave 10bd73: c3 ret 0010bd84 : */ int pthread_mutex_trylock( pthread_mutex_t *mutex ) { 10bd84: 55 push %ebp 10bd85: 89 e5 mov %esp,%ebp 10bd87: 83 ec 0c sub $0xc,%esp return _POSIX_Mutex_Lock_support( mutex, false, THREAD_QUEUE_WAIT_FOREVER ); 10bd8a: 6a 00 push $0x0 10bd8c: 6a 00 push $0x0 10bd8e: ff 75 08 pushl 0x8(%ebp) 10bd91: e8 ca fe ff ff call 10bc60 <_POSIX_Mutex_Lock_support> <== ALWAYS TAKEN } 10bd96: c9 leave 10bd97: c3 ret 0010bd98 : */ int pthread_mutex_unlock( pthread_mutex_t *mutex ) { 10bd98: 55 push %ebp 10bd99: 89 e5 mov %esp,%ebp 10bd9b: 53 push %ebx 10bd9c: 83 ec 1c sub $0x1c,%esp register POSIX_Mutex_Control *the_mutex; Objects_Locations location; CORE_mutex_Status status; the_mutex = _POSIX_Mutex_Get( mutex, &location ); 10bd9f: 8d 45 f4 lea -0xc(%ebp),%eax 10bda2: 50 push %eax 10bda3: ff 75 08 pushl 0x8(%ebp) 10bda6: e8 f6 fc ff ff call 10baa1 <_POSIX_Mutex_Get> <== ALWAYS TAKEN 10bdab: 89 c2 mov %eax,%edx switch ( location ) { 10bdad: 83 c4 10 add $0x10,%esp 10bdb0: b8 16 00 00 00 mov $0x16,%eax 10bdb5: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 10bdb9: 75 21 jne 10bddc case OBJECTS_LOCAL: status = _CORE_mutex_Surrender( 10bdbb: 50 push %eax 10bdbc: 6a 00 push $0x0 10bdbe: ff 72 08 pushl 0x8(%edx) 10bdc1: 83 c2 14 add $0x14,%edx 10bdc4: 52 push %edx 10bdc5: e8 36 19 00 00 call 10d700 <_CORE_mutex_Surrender> 10bdca: 89 c3 mov %eax,%ebx &the_mutex->Mutex, the_mutex->Object.id, NULL ); _Thread_Enable_dispatch(); 10bdcc: e8 7c 2b 00 00 call 10e94d <_Thread_Enable_dispatch> return _POSIX_Mutex_Translate_core_mutex_return_code( status ); 10bdd1: 89 1c 24 mov %ebx,(%esp) 10bdd4: e8 9b ff ff ff call 10bd74 <_POSIX_Mutex_Translate_core_mutex_return_code> <== ALWAYS TAKEN 10bdd9: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return EINVAL; } 10bddc: 8b 5d fc mov -0x4(%ebp),%ebx 10bddf: c9 leave 10bde0: c3 ret 0010b8a0 : */ int pthread_mutexattr_destroy( pthread_mutexattr_t *attr ) { 10b8a0: 55 push %ebp 10b8a1: 89 e5 mov %esp,%ebp 10b8a3: 8b 45 08 mov 0x8(%ebp),%eax if ( !attr || !attr->is_initialized ) 10b8a6: 85 c0 test %eax,%eax 10b8a8: 74 0f je 10b8b9 10b8aa: 83 38 00 cmpl $0x0,(%eax) 10b8ad: 74 0a je 10b8b9 return EINVAL; attr->is_initialized = false; 10b8af: c7 00 00 00 00 00 movl $0x0,(%eax) 10b8b5: 31 c0 xor %eax,%eax return 0; 10b8b7: eb 05 jmp 10b8be <== ALWAYS TAKEN 10b8b9: b8 16 00 00 00 mov $0x16,%eax } 10b8be: c9 leave 10b8bf: c3 ret 0010b8c0 : int pthread_mutexattr_getprioceiling( const pthread_mutexattr_t *attr, int *prioceiling ) { 10b8c0: 55 push %ebp 10b8c1: 89 e5 mov %esp,%ebp 10b8c3: 8b 45 08 mov 0x8(%ebp),%eax 10b8c6: 8b 55 0c mov 0xc(%ebp),%edx if ( !attr || !attr->is_initialized || !prioceiling ) 10b8c9: 85 c0 test %eax,%eax 10b8cb: 74 12 je 10b8df 10b8cd: 85 d2 test %edx,%edx 10b8cf: 74 0e je 10b8df 10b8d1: 83 38 00 cmpl $0x0,(%eax) 10b8d4: 74 09 je 10b8df return EINVAL; *prioceiling = attr->prio_ceiling; 10b8d6: 8b 40 08 mov 0x8(%eax),%eax 10b8d9: 89 02 mov %eax,(%edx) 10b8db: 31 c0 xor %eax,%eax return 0; 10b8dd: eb 05 jmp 10b8e4 <== ALWAYS TAKEN 10b8df: b8 16 00 00 00 mov $0x16,%eax } 10b8e4: c9 leave 10b8e5: c3 ret 0010b8e8 : int pthread_mutexattr_getprotocol( const pthread_mutexattr_t *attr, int *protocol ) { 10b8e8: 55 push %ebp 10b8e9: 89 e5 mov %esp,%ebp 10b8eb: 8b 45 08 mov 0x8(%ebp),%eax 10b8ee: 8b 55 0c mov 0xc(%ebp),%edx if ( !attr || !attr->is_initialized || !protocol ) 10b8f1: 85 c0 test %eax,%eax 10b8f3: 74 12 je 10b907 10b8f5: 85 d2 test %edx,%edx 10b8f7: 74 0e je 10b907 10b8f9: 83 38 00 cmpl $0x0,(%eax) 10b8fc: 74 09 je 10b907 return EINVAL; *protocol = attr->protocol; 10b8fe: 8b 40 0c mov 0xc(%eax),%eax 10b901: 89 02 mov %eax,(%edx) 10b903: 31 c0 xor %eax,%eax return 0; 10b905: eb 05 jmp 10b90c <== ALWAYS TAKEN 10b907: b8 16 00 00 00 mov $0x16,%eax } 10b90c: c9 leave 10b90d: c3 ret 0010b910 : int pthread_mutexattr_getpshared( const pthread_mutexattr_t *attr, int *pshared ) { 10b910: 55 push %ebp 10b911: 89 e5 mov %esp,%ebp 10b913: 8b 45 08 mov 0x8(%ebp),%eax 10b916: 8b 55 0c mov 0xc(%ebp),%edx if ( !attr || !attr->is_initialized || !pshared ) 10b919: 85 c0 test %eax,%eax 10b91b: 74 12 je 10b92f 10b91d: 85 d2 test %edx,%edx 10b91f: 74 0e je 10b92f 10b921: 83 38 00 cmpl $0x0,(%eax) 10b924: 74 09 je 10b92f return EINVAL; *pshared = attr->process_shared; 10b926: 8b 40 04 mov 0x4(%eax),%eax 10b929: 89 02 mov %eax,(%edx) 10b92b: 31 c0 xor %eax,%eax return 0; 10b92d: eb 05 jmp 10b934 <== ALWAYS TAKEN 10b92f: b8 16 00 00 00 mov $0x16,%eax } 10b934: c9 leave 10b935: c3 ret 00109b28 : #if defined(_UNIX98_THREAD_MUTEX_ATTRIBUTES) int pthread_mutexattr_gettype( const pthread_mutexattr_t *attr, int *type ) { 109b28: 55 push %ebp 109b29: 89 e5 mov %esp,%ebp 109b2b: 8b 45 08 mov 0x8(%ebp),%eax 109b2e: 8b 55 0c mov 0xc(%ebp),%edx if ( !attr ) 109b31: 85 c0 test %eax,%eax 109b33: 74 12 je 109b47 return EINVAL; if ( !attr->is_initialized ) 109b35: 83 38 00 cmpl $0x0,(%eax) 109b38: 74 0d je 109b47 return EINVAL; if ( !type ) 109b3a: 85 d2 test %edx,%edx 109b3c: 74 09 je 109b47 <== ALWAYS TAKEN return EINVAL; *type = attr->type; 109b3e: 8b 40 10 mov 0x10(%eax),%eax 109b41: 89 02 mov %eax,(%edx) 109b43: 31 c0 xor %eax,%eax return 0; 109b45: eb 05 jmp 109b4c <== ALWAYS TAKEN 109b47: b8 16 00 00 00 mov $0x16,%eax } 109b4c: c9 leave 109b4d: c3 ret 0010b960 : int pthread_mutexattr_setprioceiling( pthread_mutexattr_t *attr, int prioceiling ) { 10b960: 55 push %ebp 10b961: 89 e5 mov %esp,%ebp 10b963: 56 push %esi 10b964: 53 push %ebx 10b965: 8b 5d 08 mov 0x8(%ebp),%ebx 10b968: 8b 75 0c mov 0xc(%ebp),%esi if ( !attr || !attr->is_initialized ) 10b96b: 85 db test %ebx,%ebx 10b96d: 74 1c je 10b98b 10b96f: 83 3b 00 cmpl $0x0,(%ebx) 10b972: 74 17 je 10b98b return EINVAL; if ( !_POSIX_Priority_Is_valid( prioceiling ) ) 10b974: 83 ec 0c sub $0xc,%esp 10b977: 56 push %esi 10b978: e8 df 04 00 00 call 10be5c <_POSIX_Priority_Is_valid> <== ALWAYS TAKEN 10b97d: 83 c4 10 add $0x10,%esp 10b980: 84 c0 test %al,%al 10b982: 74 07 je 10b98b return EINVAL; attr->prio_ceiling = prioceiling; 10b984: 89 73 08 mov %esi,0x8(%ebx) 10b987: 31 c0 xor %eax,%eax return 0; 10b989: eb 05 jmp 10b990 <== ALWAYS TAKEN 10b98b: b8 16 00 00 00 mov $0x16,%eax } 10b990: 8d 65 f8 lea -0x8(%ebp),%esp 10b993: 5b pop %ebx 10b994: 5e pop %esi 10b995: c9 leave 10b996: c3 ret 0010b998 : int pthread_mutexattr_setprotocol( pthread_mutexattr_t *attr, int protocol ) { 10b998: 55 push %ebp 10b999: 89 e5 mov %esp,%ebp 10b99b: 8b 45 08 mov 0x8(%ebp),%eax 10b99e: 8b 55 0c mov 0xc(%ebp),%edx if ( !attr || !attr->is_initialized ) 10b9a1: 85 c0 test %eax,%eax 10b9a3: 74 11 je 10b9b6 10b9a5: 83 38 00 cmpl $0x0,(%eax) 10b9a8: 74 0c je 10b9b6 return EINVAL; switch ( protocol ) { 10b9aa: 83 fa 02 cmp $0x2,%edx 10b9ad: 77 07 ja 10b9b6 case PTHREAD_PRIO_NONE: case PTHREAD_PRIO_INHERIT: case PTHREAD_PRIO_PROTECT: attr->protocol = protocol; 10b9af: 89 50 0c mov %edx,0xc(%eax) 10b9b2: 31 c0 xor %eax,%eax return 0; 10b9b4: eb 05 jmp 10b9bb <== ALWAYS TAKEN 10b9b6: b8 16 00 00 00 mov $0x16,%eax default: return EINVAL; } } 10b9bb: c9 leave 10b9bc: c3 ret 0010b9c0 : int pthread_mutexattr_setpshared( pthread_mutexattr_t *attr, int pshared ) { 10b9c0: 55 push %ebp 10b9c1: 89 e5 mov %esp,%ebp 10b9c3: 8b 45 08 mov 0x8(%ebp),%eax 10b9c6: 8b 55 0c mov 0xc(%ebp),%edx if ( !attr || !attr->is_initialized ) 10b9c9: 85 c0 test %eax,%eax 10b9cb: 74 11 je 10b9de 10b9cd: 83 38 00 cmpl $0x0,(%eax) 10b9d0: 74 0c je 10b9de return EINVAL; switch ( pshared ) { 10b9d2: 83 fa 01 cmp $0x1,%edx 10b9d5: 77 07 ja 10b9de <== ALWAYS TAKEN case PTHREAD_PROCESS_SHARED: case PTHREAD_PROCESS_PRIVATE: attr->process_shared = pshared; 10b9d7: 89 50 04 mov %edx,0x4(%eax) 10b9da: 31 c0 xor %eax,%eax return 0; 10b9dc: eb 05 jmp 10b9e3 <== ALWAYS TAKEN 10b9de: b8 16 00 00 00 mov $0x16,%eax default: return EINVAL; } } 10b9e3: c9 leave 10b9e4: c3 ret 00109b78 : #if defined(_UNIX98_THREAD_MUTEX_ATTRIBUTES) int pthread_mutexattr_settype( pthread_mutexattr_t *attr, int type ) { 109b78: 55 push %ebp 109b79: 89 e5 mov %esp,%ebp 109b7b: 8b 45 08 mov 0x8(%ebp),%eax 109b7e: 8b 55 0c mov 0xc(%ebp),%edx if ( !attr || !attr->is_initialized ) 109b81: 85 c0 test %eax,%eax 109b83: 74 11 je 109b96 109b85: 83 38 00 cmpl $0x0,(%eax) 109b88: 74 0c je 109b96 <== ALWAYS TAKEN return EINVAL; switch ( type ) { 109b8a: 83 fa 03 cmp $0x3,%edx 109b8d: 77 07 ja 109b96 case PTHREAD_MUTEX_NORMAL: case PTHREAD_MUTEX_RECURSIVE: case PTHREAD_MUTEX_ERRORCHECK: case PTHREAD_MUTEX_DEFAULT: attr->type = type; 109b8f: 89 50 10 mov %edx,0x10(%eax) 109b92: 31 c0 xor %eax,%eax return 0; 109b94: eb 05 jmp 109b9b <== ALWAYS TAKEN 109b96: b8 16 00 00 00 mov $0x16,%eax default: return EINVAL; } } 109b9b: c9 leave 109b9c: c3 ret 0010a5dc : int pthread_once( pthread_once_t *once_control, void (*init_routine)(void) ) { 10a5dc: 55 push %ebp 10a5dd: 89 e5 mov %esp,%ebp 10a5df: 56 push %esi 10a5e0: 53 push %ebx 10a5e1: 83 ec 10 sub $0x10,%esp 10a5e4: 8b 5d 08 mov 0x8(%ebp),%ebx 10a5e7: 8b 75 0c mov 0xc(%ebp),%esi if ( !once_control || !init_routine ) 10a5ea: 85 f6 test %esi,%esi 10a5ec: 74 04 je 10a5f2 10a5ee: 85 db test %ebx,%ebx 10a5f0: 75 07 jne 10a5f9 10a5f2: b8 16 00 00 00 mov $0x16,%eax 10a5f7: eb 4b jmp 10a644 <== ALWAYS TAKEN return EINVAL; if ( !once_control->init_executed ) { 10a5f9: 31 c0 xor %eax,%eax 10a5fb: 83 7b 04 00 cmpl $0x0,0x4(%ebx) 10a5ff: 75 43 jne 10a644 rtems_mode saveMode; rtems_task_mode(RTEMS_NO_PREEMPT, RTEMS_PREEMPT_MASK, &saveMode); 10a601: 52 push %edx 10a602: 8d 45 f4 lea -0xc(%ebp),%eax 10a605: 50 push %eax 10a606: 68 00 01 00 00 push $0x100 10a60b: 68 00 01 00 00 push $0x100 10a610: e8 7b 0a 00 00 call 10b090 if ( !once_control->init_executed ) { 10a615: 83 c4 10 add $0x10,%esp 10a618: 83 7b 04 00 cmpl $0x0,0x4(%ebx) 10a61c: 75 0f jne 10a62d <== ALWAYS TAKEN once_control->is_initialized = true; 10a61e: c7 03 01 00 00 00 movl $0x1,(%ebx) once_control->init_executed = true; 10a624: c7 43 04 01 00 00 00 movl $0x1,0x4(%ebx) (*init_routine)(); 10a62b: ff d6 call *%esi } rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode); 10a62d: 50 push %eax 10a62e: 8d 45 f4 lea -0xc(%ebp),%eax 10a631: 50 push %eax 10a632: 68 00 01 00 00 push $0x100 10a637: ff 75 f4 pushl -0xc(%ebp) 10a63a: e8 51 0a 00 00 call 10b090 10a63f: 31 c0 xor %eax,%eax 10a641: 83 c4 10 add $0x10,%esp } return 0; } 10a644: 8d 65 f8 lea -0x8(%ebp),%esp 10a647: 5b pop %ebx 10a648: 5e pop %esi 10a649: c9 leave 10a64a: c3 ret 0010ab64 : */ int pthread_rwlock_destroy( pthread_rwlock_t *rwlock ) { 10ab64: 55 push %ebp 10ab65: 89 e5 mov %esp,%ebp 10ab67: 53 push %ebx 10ab68: 83 ec 14 sub $0x14,%esp 10ab6b: 8b 45 08 mov 0x8(%ebp),%eax POSIX_RWLock_Control *the_rwlock = NULL; Objects_Locations location; if ( !rwlock ) 10ab6e: 85 c0 test %eax,%eax 10ab70: 74 61 je 10abd3 RTEMS_INLINE_ROUTINE POSIX_RWLock_Control *_POSIX_RWLock_Get ( pthread_rwlock_t *RWLock, Objects_Locations *location ) { return (POSIX_RWLock_Control *) _Objects_Get( 10ab72: 53 push %ebx 10ab73: 8d 55 f4 lea -0xc(%ebp),%edx 10ab76: 52 push %edx 10ab77: ff 30 pushl (%eax) 10ab79: 68 2c 74 12 00 push $0x12742c 10ab7e: e8 69 27 00 00 call 10d2ec <_Objects_Get> 10ab83: 89 c3 mov %eax,%ebx return EINVAL; the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { 10ab85: 83 c4 10 add $0x10,%esp 10ab88: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 10ab8c: 75 45 jne 10abd3 case OBJECTS_LOCAL: /* * If there is at least one thread waiting, then do not delete it. */ if ( _Thread_queue_First( &the_rwlock->RWLock.Wait_queue ) != NULL ) { 10ab8e: 83 ec 0c sub $0xc,%esp 10ab91: 8d 40 10 lea 0x10(%eax),%eax 10ab94: 50 push %eax 10ab95: e8 ae 36 00 00 call 10e248 <_Thread_queue_First> 10ab9a: 83 c4 10 add $0x10,%esp 10ab9d: 85 c0 test %eax,%eax 10ab9f: 74 0c je 10abad _Thread_Enable_dispatch(); 10aba1: e8 37 2f 00 00 call 10dadd <_Thread_Enable_dispatch> 10aba6: b8 10 00 00 00 mov $0x10,%eax return EBUSY; 10abab: eb 2b jmp 10abd8 <== ALWAYS TAKEN /* * POSIX doesn't require behavior when it is locked. */ _Objects_Close( &_POSIX_RWLock_Information, &the_rwlock->Object ); 10abad: 51 push %ecx 10abae: 51 push %ecx 10abaf: 53 push %ebx 10abb0: 68 2c 74 12 00 push $0x12742c 10abb5: e8 8a 23 00 00 call 10cf44 <_Objects_Close> */ RTEMS_INLINE_ROUTINE void _POSIX_RWLock_Free ( POSIX_RWLock_Control *the_RWLock ) { _Objects_Free( &_POSIX_RWLock_Information, &the_RWLock->Object ); 10abba: 58 pop %eax 10abbb: 5a pop %edx 10abbc: 53 push %ebx 10abbd: 68 2c 74 12 00 push $0x12742c 10abc2: e8 fd 25 00 00 call 10d1c4 <_Objects_Free> _POSIX_RWLock_Free( the_rwlock ); _Thread_Enable_dispatch(); 10abc7: e8 11 2f 00 00 call 10dadd <_Thread_Enable_dispatch> 10abcc: 31 c0 xor %eax,%eax return 0; 10abce: 83 c4 10 add $0x10,%esp 10abd1: eb 05 jmp 10abd8 <== ALWAYS TAKEN 10abd3: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10abd8: 8b 5d fc mov -0x4(%ebp),%ebx 10abdb: c9 leave 10abdc: c3 ret 0010abe0 : int pthread_rwlock_init( pthread_rwlock_t *rwlock, const pthread_rwlockattr_t *attr ) { 10abe0: 55 push %ebp 10abe1: 89 e5 mov %esp,%ebp 10abe3: 56 push %esi 10abe4: 53 push %ebx 10abe5: 83 ec 10 sub $0x10,%esp 10abe8: 8b 5d 08 mov 0x8(%ebp),%ebx const pthread_rwlockattr_t *the_attr; /* * Error check parameters */ if ( !rwlock ) 10abeb: 85 db test %ebx,%ebx 10abed: 0f 84 81 00 00 00 je 10ac74 return EINVAL; /* * If the user passed in NULL, use the default attributes */ if ( attr ) { 10abf3: 8b 75 0c mov 0xc(%ebp),%esi 10abf6: 85 f6 test %esi,%esi 10abf8: 75 0f jne 10ac09 the_attr = attr; } else { (void) pthread_rwlockattr_init( &default_attr ); 10abfa: 83 ec 0c sub $0xc,%esp 10abfd: 8d 75 ec lea -0x14(%ebp),%esi 10ac00: 56 push %esi 10ac01: e8 06 09 00 00 call 10b50c 10ac06: 83 c4 10 add $0x10,%esp } /* * Now start error checking the attributes that we are going to use */ if ( !the_attr->is_initialized ) 10ac09: 83 3e 00 cmpl $0x0,(%esi) 10ac0c: 74 66 je 10ac74 <== ALWAYS TAKEN return EINVAL; switch ( the_attr->process_shared ) { 10ac0e: 83 7e 04 00 cmpl $0x0,0x4(%esi) 10ac12: 75 60 jne 10ac74 <== ALWAYS TAKEN rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10ac14: a1 04 72 12 00 mov 0x127204,%eax 10ac19: 40 inc %eax 10ac1a: a3 04 72 12 00 mov %eax,0x127204 * This function allocates a RWLock control block from * the inactive chain of free RWLock control blocks. */ RTEMS_INLINE_ROUTINE POSIX_RWLock_Control *_POSIX_RWLock_Allocate( void ) { return (POSIX_RWLock_Control *) 10ac1f: 83 ec 0c sub $0xc,%esp 10ac22: 68 2c 74 12 00 push $0x12742c 10ac27: e8 ac 22 00 00 call 10ced8 <_Objects_Allocate> 10ac2c: 89 c6 mov %eax,%esi */ _Thread_Disable_dispatch(); /* prevents deletion */ the_rwlock = _POSIX_RWLock_Allocate(); if ( !the_rwlock ) { 10ac2e: 83 c4 10 add $0x10,%esp 10ac31: 85 c0 test %eax,%eax 10ac33: 75 0c jne 10ac41 _Thread_Enable_dispatch(); 10ac35: e8 a3 2e 00 00 call 10dadd <_Thread_Enable_dispatch> 10ac3a: b8 0b 00 00 00 mov $0xb,%eax return EAGAIN; 10ac3f: eb 38 jmp 10ac79 <== ALWAYS TAKEN } _CORE_RWLock_Initialize( &the_rwlock->RWLock, &the_attributes ); 10ac41: 50 push %eax 10ac42: 50 push %eax 10ac43: 8d 45 f4 lea -0xc(%ebp),%eax 10ac46: 50 push %eax 10ac47: 8d 46 10 lea 0x10(%esi),%eax 10ac4a: 50 push %eax 10ac4b: e8 14 1b 00 00 call 10c764 <_CORE_RWLock_Initialize> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10ac50: 8b 46 08 mov 0x8(%esi),%eax 10ac53: 0f b7 c8 movzwl %ax,%ecx 10ac56: 8b 15 48 74 12 00 mov 0x127448,%edx 10ac5c: 89 34 8a mov %esi,(%edx,%ecx,4) _Objects_Get_index( the_object->id ), the_object ); /* ASSERT: information->is_string == false */ the_object->name.name_u32 = name; 10ac5f: c7 46 0c 00 00 00 00 movl $0x0,0xc(%esi) &_POSIX_RWLock_Information, &the_rwlock->Object, 0 ); *rwlock = the_rwlock->Object.id; 10ac66: 89 03 mov %eax,(%ebx) _Thread_Enable_dispatch(); 10ac68: e8 70 2e 00 00 call 10dadd <_Thread_Enable_dispatch> 10ac6d: 31 c0 xor %eax,%eax return 0; 10ac6f: 83 c4 10 add $0x10,%esp 10ac72: eb 05 jmp 10ac79 <== ALWAYS TAKEN 10ac74: b8 16 00 00 00 mov $0x16,%eax } 10ac79: 8d 65 f8 lea -0x8(%ebp),%esp 10ac7c: 5b pop %ebx 10ac7d: 5e pop %esi 10ac7e: c9 leave 10ac7f: c3 ret 0010ac80 : */ int pthread_rwlock_rdlock( pthread_rwlock_t *rwlock ) { 10ac80: 55 push %ebp 10ac81: 89 e5 mov %esp,%ebp 10ac83: 53 push %ebx 10ac84: 83 ec 14 sub $0x14,%esp 10ac87: 8b 5d 08 mov 0x8(%ebp),%ebx POSIX_RWLock_Control *the_rwlock; Objects_Locations location; if ( !rwlock ) 10ac8a: 85 db test %ebx,%ebx 10ac8c: 74 4b je 10acd9 RTEMS_INLINE_ROUTINE POSIX_RWLock_Control *_POSIX_RWLock_Get ( pthread_rwlock_t *RWLock, Objects_Locations *location ) { return (POSIX_RWLock_Control *) _Objects_Get( 10ac8e: 50 push %eax 10ac8f: 8d 45 f4 lea -0xc(%ebp),%eax 10ac92: 50 push %eax 10ac93: ff 33 pushl (%ebx) 10ac95: 68 2c 74 12 00 push $0x12742c 10ac9a: e8 4d 26 00 00 call 10d2ec <_Objects_Get> return EINVAL; the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { 10ac9f: 83 c4 10 add $0x10,%esp 10aca2: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 10aca6: 75 31 jne 10acd9 case OBJECTS_LOCAL: _CORE_RWLock_Obtain_for_reading( 10aca8: 83 ec 0c sub $0xc,%esp 10acab: 6a 00 push $0x0 10acad: 6a 00 push $0x0 10acaf: 6a 01 push $0x1 10acb1: ff 33 pushl (%ebx) 10acb3: 83 c0 10 add $0x10,%eax 10acb6: 50 push %eax 10acb7: e8 dc 1a 00 00 call 10c798 <_CORE_RWLock_Obtain_for_reading> true, /* we are willing to wait forever */ 0, NULL ); _Thread_Enable_dispatch(); 10acbc: 83 c4 20 add $0x20,%esp 10acbf: e8 19 2e 00 00 call 10dadd <_Thread_Enable_dispatch> return _POSIX_RWLock_Translate_core_RWLock_return_code( 10acc4: 83 ec 0c sub $0xc,%esp 10acc7: a1 c0 72 12 00 mov 0x1272c0,%eax 10accc: ff 70 34 pushl 0x34(%eax) 10accf: e8 60 01 00 00 call 10ae34 <_POSIX_RWLock_Translate_core_RWLock_return_code> <== ALWAYS TAKEN 10acd4: 83 c4 10 add $0x10,%esp 10acd7: eb 05 jmp 10acde <== ALWAYS TAKEN 10acd9: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10acde: 8b 5d fc mov -0x4(%ebp),%ebx 10ace1: c9 leave 10ace2: c3 ret 0010ace4 : int pthread_rwlock_timedrdlock( pthread_rwlock_t *rwlock, const struct timespec *abstime ) { 10ace4: 55 push %ebp 10ace5: 89 e5 mov %esp,%ebp 10ace7: 56 push %esi 10ace8: 53 push %ebx 10ace9: 83 ec 20 sub $0x20,%esp 10acec: 8b 75 08 mov 0x8(%ebp),%esi Objects_Locations location; Watchdog_Interval ticks; bool do_wait = true; POSIX_Absolute_timeout_conversion_results_t status; if ( !rwlock ) 10acef: 85 f6 test %esi,%esi 10acf1: 0f 84 89 00 00 00 je 10ad80 * * If the status is POSIX_ABSOLUTE_TIMEOUT_INVALID, * POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST, or POSIX_ABSOLUTE_TIMEOUT_IS_NOW, * then we should not wait. */ status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks ); 10acf7: 50 push %eax 10acf8: 50 push %eax 10acf9: 8d 45 f0 lea -0x10(%ebp),%eax 10acfc: 50 push %eax 10acfd: ff 75 0c pushl 0xc(%ebp) 10ad00: e8 f3 55 00 00 call 1102f8 <_POSIX_Absolute_timeout_to_ticks> 10ad05: 89 c3 mov %eax,%ebx 10ad07: 83 c4 0c add $0xc,%esp 10ad0a: 8d 45 f4 lea -0xc(%ebp),%eax 10ad0d: 50 push %eax 10ad0e: ff 36 pushl (%esi) 10ad10: 68 2c 74 12 00 push $0x12742c 10ad15: e8 d2 25 00 00 call 10d2ec <_Objects_Get> if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE ) do_wait = false; the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { 10ad1a: 83 c4 10 add $0x10,%esp 10ad1d: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 10ad21: 75 5d jne 10ad80 int _EXFUN(pthread_rwlock_init, (pthread_rwlock_t *__rwlock, _CONST pthread_rwlockattr_t *__attr)); int _EXFUN(pthread_rwlock_destroy, (pthread_rwlock_t *__rwlock)); int _EXFUN(pthread_rwlock_rdlock,(pthread_rwlock_t *__rwlock)); int _EXFUN(pthread_rwlock_tryrdlock,(pthread_rwlock_t *__rwlock)); int _EXFUN(pthread_rwlock_timedrdlock, 10ad23: 83 fb 03 cmp $0x3,%ebx 10ad26: 0f 94 c2 sete %dl case OBJECTS_LOCAL: _CORE_RWLock_Obtain_for_reading( 10ad29: 83 ec 0c sub $0xc,%esp 10ad2c: 6a 00 push $0x0 10ad2e: ff 75 f0 pushl -0x10(%ebp) 10ad31: 0f b6 ca movzbl %dl,%ecx 10ad34: 51 push %ecx 10ad35: ff 36 pushl (%esi) 10ad37: 83 c0 10 add $0x10,%eax 10ad3a: 50 push %eax 10ad3b: 88 55 e4 mov %dl,-0x1c(%ebp) 10ad3e: e8 55 1a 00 00 call 10c798 <_CORE_RWLock_Obtain_for_reading> do_wait, ticks, NULL ); _Thread_Enable_dispatch(); 10ad43: 83 c4 20 add $0x20,%esp 10ad46: e8 92 2d 00 00 call 10dadd <_Thread_Enable_dispatch> if ( !do_wait ) { 10ad4b: 8a 55 e4 mov -0x1c(%ebp),%dl 10ad4e: 84 d2 test %dl,%dl 10ad50: 75 19 jne 10ad6b if ( _Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE ) { 10ad52: a1 c0 72 12 00 mov 0x1272c0,%eax 10ad57: 83 78 34 02 cmpl $0x2,0x34(%eax) 10ad5b: 75 0e jne 10ad6b switch (status) { 10ad5d: 85 db test %ebx,%ebx 10ad5f: 74 1f je 10ad80 <== ALWAYS TAKEN 10ad61: b8 74 00 00 00 mov $0x74,%eax 10ad66: 83 fb 02 cmp $0x2,%ebx 10ad69: 76 1a jbe 10ad85 <== NEVER TAKEN break; } } } return _POSIX_RWLock_Translate_core_RWLock_return_code( 10ad6b: 83 ec 0c sub $0xc,%esp 10ad6e: a1 c0 72 12 00 mov 0x1272c0,%eax 10ad73: ff 70 34 pushl 0x34(%eax) 10ad76: e8 b9 00 00 00 call 10ae34 <_POSIX_RWLock_Translate_core_RWLock_return_code> <== ALWAYS TAKEN 10ad7b: 83 c4 10 add $0x10,%esp 10ad7e: eb 05 jmp 10ad85 <== ALWAYS TAKEN 10ad80: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10ad85: 8d 65 f8 lea -0x8(%ebp),%esp 10ad88: 5b pop %ebx 10ad89: 5e pop %esi 10ad8a: c9 leave 10ad8b: c3 ret 0010ad8c : int pthread_rwlock_timedwrlock( pthread_rwlock_t *rwlock, const struct timespec *abstime ) { 10ad8c: 55 push %ebp 10ad8d: 89 e5 mov %esp,%ebp 10ad8f: 56 push %esi 10ad90: 53 push %ebx 10ad91: 83 ec 20 sub $0x20,%esp 10ad94: 8b 75 08 mov 0x8(%ebp),%esi Objects_Locations location; Watchdog_Interval ticks; bool do_wait = true; POSIX_Absolute_timeout_conversion_results_t status; if ( !rwlock ) 10ad97: 85 f6 test %esi,%esi 10ad99: 0f 84 89 00 00 00 je 10ae28 * * If the status is POSIX_ABSOLUTE_TIMEOUT_INVALID, * POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST, or POSIX_ABSOLUTE_TIMEOUT_IS_NOW, * then we should not wait. */ status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks ); 10ad9f: 50 push %eax 10ada0: 50 push %eax 10ada1: 8d 45 f0 lea -0x10(%ebp),%eax 10ada4: 50 push %eax 10ada5: ff 75 0c pushl 0xc(%ebp) 10ada8: e8 4b 55 00 00 call 1102f8 <_POSIX_Absolute_timeout_to_ticks> 10adad: 89 c3 mov %eax,%ebx 10adaf: 83 c4 0c add $0xc,%esp 10adb2: 8d 45 f4 lea -0xc(%ebp),%eax 10adb5: 50 push %eax 10adb6: ff 36 pushl (%esi) 10adb8: 68 2c 74 12 00 push $0x12742c 10adbd: e8 2a 25 00 00 call 10d2ec <_Objects_Get> if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE ) do_wait = false; the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { 10adc2: 83 c4 10 add $0x10,%esp 10adc5: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 10adc9: 75 5d jne 10ae28 (pthread_rwlock_t *__rwlock, _CONST struct timespec *__abstime)); int _EXFUN(pthread_rwlock_unlock,(pthread_rwlock_t *__rwlock)); int _EXFUN(pthread_rwlock_wrlock,(pthread_rwlock_t *__rwlock)); int _EXFUN(pthread_rwlock_trywrlock,(pthread_rwlock_t *__rwlock)); int _EXFUN(pthread_rwlock_timedwrlock, 10adcb: 83 fb 03 cmp $0x3,%ebx 10adce: 0f 94 c2 sete %dl case OBJECTS_LOCAL: _CORE_RWLock_Obtain_for_writing( 10add1: 83 ec 0c sub $0xc,%esp 10add4: 6a 00 push $0x0 10add6: ff 75 f0 pushl -0x10(%ebp) 10add9: 0f b6 ca movzbl %dl,%ecx 10addc: 51 push %ecx 10addd: ff 36 pushl (%esi) 10addf: 83 c0 10 add $0x10,%eax 10ade2: 50 push %eax 10ade3: 88 55 e4 mov %dl,-0x1c(%ebp) 10ade6: e8 65 1a 00 00 call 10c850 <_CORE_RWLock_Obtain_for_writing> do_wait, ticks, NULL ); _Thread_Enable_dispatch(); 10adeb: 83 c4 20 add $0x20,%esp 10adee: e8 ea 2c 00 00 call 10dadd <_Thread_Enable_dispatch> if ( !do_wait && 10adf3: 8a 55 e4 mov -0x1c(%ebp),%dl 10adf6: 84 d2 test %dl,%dl 10adf8: 75 19 jne 10ae13 (_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) { 10adfa: a1 c0 72 12 00 mov 0x1272c0,%eax 10adff: 83 78 34 02 cmpl $0x2,0x34(%eax) 10ae03: 75 0e jne 10ae13 switch (status) { 10ae05: 85 db test %ebx,%ebx 10ae07: 74 1f je 10ae28 <== ALWAYS TAKEN 10ae09: b8 74 00 00 00 mov $0x74,%eax 10ae0e: 83 fb 02 cmp $0x2,%ebx 10ae11: 76 1a jbe 10ae2d <== NEVER TAKEN case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE: break; } } return _POSIX_RWLock_Translate_core_RWLock_return_code( 10ae13: 83 ec 0c sub $0xc,%esp 10ae16: a1 c0 72 12 00 mov 0x1272c0,%eax 10ae1b: ff 70 34 pushl 0x34(%eax) 10ae1e: e8 11 00 00 00 call 10ae34 <_POSIX_RWLock_Translate_core_RWLock_return_code> <== ALWAYS TAKEN 10ae23: 83 c4 10 add $0x10,%esp 10ae26: eb 05 jmp 10ae2d <== ALWAYS TAKEN 10ae28: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10ae2d: 8d 65 f8 lea -0x8(%ebp),%esp 10ae30: 5b pop %ebx 10ae31: 5e pop %esi 10ae32: c9 leave 10ae33: c3 ret 0010ae44 : */ int pthread_rwlock_tryrdlock( pthread_rwlock_t *rwlock ) { 10ae44: 55 push %ebp 10ae45: 89 e5 mov %esp,%ebp 10ae47: 53 push %ebx 10ae48: 83 ec 14 sub $0x14,%esp 10ae4b: 8b 5d 08 mov 0x8(%ebp),%ebx POSIX_RWLock_Control *the_rwlock; Objects_Locations location; if ( !rwlock ) 10ae4e: 85 db test %ebx,%ebx 10ae50: 74 4b je 10ae9d 10ae52: 50 push %eax 10ae53: 8d 45 f4 lea -0xc(%ebp),%eax 10ae56: 50 push %eax 10ae57: ff 33 pushl (%ebx) 10ae59: 68 2c 74 12 00 push $0x12742c 10ae5e: e8 89 24 00 00 call 10d2ec <_Objects_Get> return EINVAL; the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { 10ae63: 83 c4 10 add $0x10,%esp 10ae66: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 10ae6a: 75 31 jne 10ae9d case OBJECTS_LOCAL: _CORE_RWLock_Obtain_for_reading( 10ae6c: 83 ec 0c sub $0xc,%esp 10ae6f: 6a 00 push $0x0 10ae71: 6a 00 push $0x0 10ae73: 6a 00 push $0x0 10ae75: ff 33 pushl (%ebx) 10ae77: 83 c0 10 add $0x10,%eax 10ae7a: 50 push %eax 10ae7b: e8 18 19 00 00 call 10c798 <_CORE_RWLock_Obtain_for_reading> 0, NULL ); _Thread_Enable_dispatch(); 10ae80: 83 c4 20 add $0x20,%esp 10ae83: e8 55 2c 00 00 call 10dadd <_Thread_Enable_dispatch> return _POSIX_RWLock_Translate_core_RWLock_return_code( 10ae88: 83 ec 0c sub $0xc,%esp 10ae8b: a1 c0 72 12 00 mov 0x1272c0,%eax 10ae90: ff 70 34 pushl 0x34(%eax) 10ae93: e8 9c ff ff ff call 10ae34 <_POSIX_RWLock_Translate_core_RWLock_return_code> <== ALWAYS TAKEN 10ae98: 83 c4 10 add $0x10,%esp 10ae9b: eb 05 jmp 10aea2 <== ALWAYS TAKEN 10ae9d: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10aea2: 8b 5d fc mov -0x4(%ebp),%ebx 10aea5: c9 leave 10aea6: c3 ret 0010aea8 : */ int pthread_rwlock_trywrlock( pthread_rwlock_t *rwlock ) { 10aea8: 55 push %ebp 10aea9: 89 e5 mov %esp,%ebp 10aeab: 53 push %ebx 10aeac: 83 ec 14 sub $0x14,%esp 10aeaf: 8b 5d 08 mov 0x8(%ebp),%ebx POSIX_RWLock_Control *the_rwlock; Objects_Locations location; if ( !rwlock ) 10aeb2: 85 db test %ebx,%ebx 10aeb4: 74 4b je 10af01 10aeb6: 50 push %eax 10aeb7: 8d 45 f4 lea -0xc(%ebp),%eax 10aeba: 50 push %eax 10aebb: ff 33 pushl (%ebx) 10aebd: 68 2c 74 12 00 push $0x12742c 10aec2: e8 25 24 00 00 call 10d2ec <_Objects_Get> return EINVAL; the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { 10aec7: 83 c4 10 add $0x10,%esp 10aeca: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 10aece: 75 31 jne 10af01 case OBJECTS_LOCAL: _CORE_RWLock_Obtain_for_writing( 10aed0: 83 ec 0c sub $0xc,%esp 10aed3: 6a 00 push $0x0 10aed5: 6a 00 push $0x0 10aed7: 6a 00 push $0x0 10aed9: ff 33 pushl (%ebx) 10aedb: 83 c0 10 add $0x10,%eax 10aede: 50 push %eax 10aedf: e8 6c 19 00 00 call 10c850 <_CORE_RWLock_Obtain_for_writing> false, /* we are not willing to wait */ 0, NULL ); _Thread_Enable_dispatch(); 10aee4: 83 c4 20 add $0x20,%esp 10aee7: e8 f1 2b 00 00 call 10dadd <_Thread_Enable_dispatch> return _POSIX_RWLock_Translate_core_RWLock_return_code( 10aeec: 83 ec 0c sub $0xc,%esp 10aeef: a1 c0 72 12 00 mov 0x1272c0,%eax 10aef4: ff 70 34 pushl 0x34(%eax) 10aef7: e8 38 ff ff ff call 10ae34 <_POSIX_RWLock_Translate_core_RWLock_return_code> <== ALWAYS TAKEN 10aefc: 83 c4 10 add $0x10,%esp 10aeff: eb 05 jmp 10af06 <== ALWAYS TAKEN 10af01: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10af06: 8b 5d fc mov -0x4(%ebp),%ebx 10af09: c9 leave 10af0a: c3 ret 0010af0c : */ int pthread_rwlock_unlock( pthread_rwlock_t *rwlock ) { 10af0c: 55 push %ebp 10af0d: 89 e5 mov %esp,%ebp 10af0f: 53 push %ebx 10af10: 83 ec 14 sub $0x14,%esp 10af13: 8b 45 08 mov 0x8(%ebp),%eax POSIX_RWLock_Control *the_rwlock; Objects_Locations location; CORE_RWLock_Status status; if ( !rwlock ) 10af16: 85 c0 test %eax,%eax 10af18: 74 3a je 10af54 10af1a: 52 push %edx 10af1b: 8d 55 f4 lea -0xc(%ebp),%edx 10af1e: 52 push %edx 10af1f: ff 30 pushl (%eax) 10af21: 68 2c 74 12 00 push $0x12742c 10af26: e8 c1 23 00 00 call 10d2ec <_Objects_Get> return EINVAL; the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { 10af2b: 83 c4 10 add $0x10,%esp 10af2e: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 10af32: 75 20 jne 10af54 case OBJECTS_LOCAL: status = _CORE_RWLock_Release( &the_rwlock->RWLock ); 10af34: 83 ec 0c sub $0xc,%esp 10af37: 83 c0 10 add $0x10,%eax 10af3a: 50 push %eax 10af3b: e8 94 19 00 00 call 10c8d4 <_CORE_RWLock_Release> 10af40: 89 c3 mov %eax,%ebx _Thread_Enable_dispatch(); 10af42: e8 96 2b 00 00 call 10dadd <_Thread_Enable_dispatch> return _POSIX_RWLock_Translate_core_RWLock_return_code( status ); 10af47: 89 1c 24 mov %ebx,(%esp) 10af4a: e8 e5 fe ff ff call 10ae34 <_POSIX_RWLock_Translate_core_RWLock_return_code> <== ALWAYS TAKEN 10af4f: 83 c4 10 add $0x10,%esp 10af52: eb 05 jmp 10af59 <== ALWAYS TAKEN 10af54: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10af59: 8b 5d fc mov -0x4(%ebp),%ebx 10af5c: c9 leave 10af5d: c3 ret 0010af60 : */ int pthread_rwlock_wrlock( pthread_rwlock_t *rwlock ) { 10af60: 55 push %ebp 10af61: 89 e5 mov %esp,%ebp 10af63: 53 push %ebx 10af64: 83 ec 14 sub $0x14,%esp 10af67: 8b 5d 08 mov 0x8(%ebp),%ebx POSIX_RWLock_Control *the_rwlock; Objects_Locations location; if ( !rwlock ) 10af6a: 85 db test %ebx,%ebx 10af6c: 74 4b je 10afb9 10af6e: 50 push %eax 10af6f: 8d 45 f4 lea -0xc(%ebp),%eax 10af72: 50 push %eax 10af73: ff 33 pushl (%ebx) 10af75: 68 2c 74 12 00 push $0x12742c 10af7a: e8 6d 23 00 00 call 10d2ec <_Objects_Get> return EINVAL; the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { 10af7f: 83 c4 10 add $0x10,%esp 10af82: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 10af86: 75 31 jne 10afb9 case OBJECTS_LOCAL: _CORE_RWLock_Obtain_for_writing( 10af88: 83 ec 0c sub $0xc,%esp 10af8b: 6a 00 push $0x0 10af8d: 6a 00 push $0x0 10af8f: 6a 01 push $0x1 10af91: ff 33 pushl (%ebx) 10af93: 83 c0 10 add $0x10,%eax 10af96: 50 push %eax 10af97: e8 b4 18 00 00 call 10c850 <_CORE_RWLock_Obtain_for_writing> true, /* do not timeout -- wait forever */ 0, NULL ); _Thread_Enable_dispatch(); 10af9c: 83 c4 20 add $0x20,%esp 10af9f: e8 39 2b 00 00 call 10dadd <_Thread_Enable_dispatch> return _POSIX_RWLock_Translate_core_RWLock_return_code( 10afa4: 83 ec 0c sub $0xc,%esp 10afa7: a1 c0 72 12 00 mov 0x1272c0,%eax 10afac: ff 70 34 pushl 0x34(%eax) 10afaf: e8 80 fe ff ff call 10ae34 <_POSIX_RWLock_Translate_core_RWLock_return_code> <== ALWAYS TAKEN 10afb4: 83 c4 10 add $0x10,%esp 10afb7: eb 05 jmp 10afbe <== ALWAYS TAKEN 10afb9: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10afbe: 8b 5d fc mov -0x4(%ebp),%ebx 10afc1: c9 leave 10afc2: c3 ret 0010b4c8 : */ int pthread_rwlockattr_destroy( pthread_rwlockattr_t *attr ) { 10b4c8: 55 push %ebp 10b4c9: 89 e5 mov %esp,%ebp 10b4cb: 8b 45 08 mov 0x8(%ebp),%eax if ( !attr || attr->is_initialized == false ) 10b4ce: 85 c0 test %eax,%eax 10b4d0: 74 0f je 10b4e1 10b4d2: 83 38 00 cmpl $0x0,(%eax) 10b4d5: 74 0a je 10b4e1 return EINVAL; attr->is_initialized = false; 10b4d7: c7 00 00 00 00 00 movl $0x0,(%eax) 10b4dd: 31 c0 xor %eax,%eax return 0; 10b4df: eb 05 jmp 10b4e6 <== ALWAYS TAKEN 10b4e1: b8 16 00 00 00 mov $0x16,%eax } 10b4e6: c9 leave 10b4e7: c3 ret 0010b4e8 : int pthread_rwlockattr_getpshared( const pthread_rwlockattr_t *attr, int *pshared ) { 10b4e8: 55 push %ebp 10b4e9: 89 e5 mov %esp,%ebp 10b4eb: 8b 45 08 mov 0x8(%ebp),%eax if ( !attr ) 10b4ee: 85 c0 test %eax,%eax 10b4f0: 74 11 je 10b503 return EINVAL; if ( !attr->is_initialized ) 10b4f2: 83 38 00 cmpl $0x0,(%eax) 10b4f5: 74 0c je 10b503 return EINVAL; *pshared = attr->process_shared; 10b4f7: 8b 50 04 mov 0x4(%eax),%edx 10b4fa: 8b 45 0c mov 0xc(%ebp),%eax 10b4fd: 89 10 mov %edx,(%eax) 10b4ff: 31 c0 xor %eax,%eax return 0; 10b501: eb 05 jmp 10b508 <== ALWAYS TAKEN 10b503: b8 16 00 00 00 mov $0x16,%eax } 10b508: c9 leave 10b509: c3 ret 0010b52c : int pthread_rwlockattr_setpshared( pthread_rwlockattr_t *attr, int pshared ) { 10b52c: 55 push %ebp 10b52d: 89 e5 mov %esp,%ebp 10b52f: 8b 45 08 mov 0x8(%ebp),%eax 10b532: 8b 55 0c mov 0xc(%ebp),%edx if ( !attr ) 10b535: 85 c0 test %eax,%eax 10b537: 74 11 je 10b54a return EINVAL; if ( !attr->is_initialized ) 10b539: 83 38 00 cmpl $0x0,(%eax) 10b53c: 74 0c je 10b54a return EINVAL; switch ( pshared ) { 10b53e: 83 fa 01 cmp $0x1,%edx 10b541: 77 07 ja 10b54a <== ALWAYS TAKEN case PTHREAD_PROCESS_SHARED: case PTHREAD_PROCESS_PRIVATE: attr->process_shared = pshared; 10b543: 89 50 04 mov %edx,0x4(%eax) 10b546: 31 c0 xor %eax,%eax return 0; 10b548: eb 05 jmp 10b54f <== ALWAYS TAKEN 10b54a: b8 16 00 00 00 mov $0x16,%eax default: return EINVAL; } } 10b54f: c9 leave 10b550: c3 ret 00109b38 : int pthread_setcancelstate( int state, int *oldstate ) { 109b38: 55 push %ebp 109b39: 89 e5 mov %esp,%ebp 109b3b: 53 push %ebx 109b3c: 83 ec 04 sub $0x4,%esp 109b3f: 8b 55 08 mov 0x8(%ebp),%edx 109b42: 8b 4d 0c mov 0xc(%ebp),%ecx * Don't even think about deleting a resource from an ISR. * Besides this request is supposed to be for _Thread_Executing * and the ISR context is not a thread. */ if ( _ISR_Is_in_progress() ) 109b45: 8b 1d 7c 52 12 00 mov 0x12527c,%ebx 109b4b: b8 47 00 00 00 mov $0x47,%eax 109b50: 85 db test %ebx,%ebx 109b52: 75 49 jne 109b9d return EPROTO; if ( !oldstate ) 109b54: 85 c9 test %ecx,%ecx 109b56: 74 40 je 109b98 return EINVAL; if ( state != PTHREAD_CANCEL_ENABLE && state != PTHREAD_CANCEL_DISABLE ) 109b58: 83 fa 01 cmp $0x1,%edx 109b5b: 77 3b ja 109b98 return EINVAL; thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; 109b5d: a1 a0 52 12 00 mov 0x1252a0,%eax 109b62: 8b 80 f8 00 00 00 mov 0xf8(%eax),%eax rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 109b68: 8b 1d e4 51 12 00 mov 0x1251e4,%ebx 109b6e: 43 inc %ebx 109b6f: 89 1d e4 51 12 00 mov %ebx,0x1251e4 _Thread_Disable_dispatch(); *oldstate = thread_support->cancelability_state; 109b75: 8b 98 cc 00 00 00 mov 0xcc(%eax),%ebx 109b7b: 89 19 mov %ebx,(%ecx) thread_support->cancelability_state = state; 109b7d: 89 90 cc 00 00 00 mov %edx,0xcc(%eax) _POSIX_Thread_Evaluate_cancellation_and_enable_dispatch(_Thread_Executing); 109b83: 83 ec 0c sub $0xc,%esp 109b86: ff 35 a0 52 12 00 pushl 0x1252a0 109b8c: e8 0b 48 00 00 call 10e39c <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch> 109b91: 31 c0 xor %eax,%eax /* * _Thread_Enable_dispatch is invoked by above call. */ return 0; 109b93: 83 c4 10 add $0x10,%esp 109b96: eb 05 jmp 109b9d <== ALWAYS TAKEN 109b98: b8 16 00 00 00 mov $0x16,%eax } 109b9d: 8b 5d fc mov -0x4(%ebp),%ebx 109ba0: c9 leave 109ba1: c3 ret 00109ba4 : int pthread_setcanceltype( int type, int *oldtype ) { 109ba4: 55 push %ebp 109ba5: 89 e5 mov %esp,%ebp 109ba7: 53 push %ebx 109ba8: 83 ec 04 sub $0x4,%esp 109bab: 8b 55 08 mov 0x8(%ebp),%edx 109bae: 8b 4d 0c mov 0xc(%ebp),%ecx * Don't even think about deleting a resource from an ISR. * Besides this request is supposed to be for _Thread_Executing * and the ISR context is not a thread. */ if ( _ISR_Is_in_progress() ) 109bb1: 8b 1d 7c 52 12 00 mov 0x12527c,%ebx 109bb7: b8 47 00 00 00 mov $0x47,%eax 109bbc: 85 db test %ebx,%ebx 109bbe: 75 49 jne 109c09 return EPROTO; if ( !oldtype ) 109bc0: 85 c9 test %ecx,%ecx 109bc2: 74 40 je 109c04 return EINVAL; if ( type != PTHREAD_CANCEL_DEFERRED && type != PTHREAD_CANCEL_ASYNCHRONOUS ) 109bc4: 83 fa 01 cmp $0x1,%edx 109bc7: 77 3b ja 109c04 return EINVAL; thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; 109bc9: a1 a0 52 12 00 mov 0x1252a0,%eax 109bce: 8b 80 f8 00 00 00 mov 0xf8(%eax),%eax 109bd4: 8b 1d e4 51 12 00 mov 0x1251e4,%ebx 109bda: 43 inc %ebx 109bdb: 89 1d e4 51 12 00 mov %ebx,0x1251e4 _Thread_Disable_dispatch(); *oldtype = thread_support->cancelability_type; 109be1: 8b 98 d0 00 00 00 mov 0xd0(%eax),%ebx 109be7: 89 19 mov %ebx,(%ecx) thread_support->cancelability_type = type; 109be9: 89 90 d0 00 00 00 mov %edx,0xd0(%eax) _POSIX_Thread_Evaluate_cancellation_and_enable_dispatch(_Thread_Executing); 109bef: 83 ec 0c sub $0xc,%esp 109bf2: ff 35 a0 52 12 00 pushl 0x1252a0 109bf8: e8 9f 47 00 00 call 10e39c <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch> 109bfd: 31 c0 xor %eax,%eax /* * _Thread_Enable_dispatch is invoked by above call. */ return 0; 109bff: 83 c4 10 add $0x10,%esp 109c02: eb 05 jmp 109c09 <== ALWAYS TAKEN 109c04: b8 16 00 00 00 mov $0x16,%eax } 109c09: 8b 5d fc mov -0x4(%ebp),%ebx 109c0c: c9 leave 109c0d: c3 ret 0010c4fc : int pthread_setschedparam( pthread_t thread, int policy, struct sched_param *param ) { 10c4fc: 55 push %ebp 10c4fd: 89 e5 mov %esp,%ebp 10c4ff: 57 push %edi 10c500: 56 push %esi 10c501: 53 push %ebx 10c502: 83 ec 2c sub $0x2c,%esp 10c505: 8b 75 10 mov 0x10(%ebp),%esi int rc; /* * Check all the parameters */ if ( !param ) 10c508: c7 45 d4 16 00 00 00 movl $0x16,-0x2c(%ebp) 10c50f: 85 f6 test %esi,%esi 10c511: 0f 84 f9 00 00 00 je 10c610 return EINVAL; rc = _POSIX_Thread_Translate_sched_param( 10c517: 8d 45 e0 lea -0x20(%ebp),%eax 10c51a: 50 push %eax 10c51b: 8d 45 e4 lea -0x1c(%ebp),%eax 10c51e: 50 push %eax 10c51f: 56 push %esi 10c520: ff 75 0c pushl 0xc(%ebp) 10c523: e8 e0 4c 00 00 call 111208 <_POSIX_Thread_Translate_sched_param> 10c528: 89 45 d4 mov %eax,-0x2c(%ebp) policy, param, &budget_algorithm, &budget_callout ); if ( rc ) 10c52b: 83 c4 10 add $0x10,%esp 10c52e: 85 c0 test %eax,%eax 10c530: 0f 85 da 00 00 00 jne 10c610 10c536: 53 push %ebx 10c537: 8d 45 dc lea -0x24(%ebp),%eax 10c53a: 50 push %eax 10c53b: ff 75 08 pushl 0x8(%ebp) 10c53e: 68 a4 94 12 00 push $0x1294a4 10c543: e8 14 1c 00 00 call 10e15c <_Objects_Get> 10c548: 89 c2 mov %eax,%edx /* * Actually change the scheduling policy and parameters */ the_thread = _POSIX_Threads_Get( thread, &location ); switch ( location ) { 10c54a: 83 c4 10 add $0x10,%esp 10c54d: 83 7d dc 00 cmpl $0x0,-0x24(%ebp) 10c551: 74 0c je 10c55f 10c553: c7 45 d4 03 00 00 00 movl $0x3,-0x2c(%ebp) 10c55a: e9 b1 00 00 00 jmp 10c610 <== ALWAYS TAKEN case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 10c55f: 8b 98 f8 00 00 00 mov 0xf8(%eax),%ebx if ( api->schedpolicy == SCHED_SPORADIC ) 10c565: 83 7b 7c 03 cmpl $0x3,0x7c(%ebx) 10c569: 75 18 jne 10c583 (void) _Watchdog_Remove( &api->Sporadic_timer ); 10c56b: 83 ec 0c sub $0xc,%esp 10c56e: 8d 83 9c 00 00 00 lea 0x9c(%ebx),%eax 10c574: 50 push %eax 10c575: 89 55 d0 mov %edx,-0x30(%ebp) 10c578: e8 d7 33 00 00 call 10f954 <_Watchdog_Remove> 10c57d: 83 c4 10 add $0x10,%esp 10c580: 8b 55 d0 mov -0x30(%ebp),%edx api->schedpolicy = policy; 10c583: 8b 45 0c mov 0xc(%ebp),%eax 10c586: 89 43 7c mov %eax,0x7c(%ebx) api->schedparam = *param; 10c589: 8d bb 80 00 00 00 lea 0x80(%ebx),%edi 10c58f: b9 06 00 00 00 mov $0x6,%ecx 10c594: f3 a5 rep movsl %ds:(%esi),%es:(%edi) the_thread->budget_algorithm = budget_algorithm; 10c596: 8b 45 e4 mov -0x1c(%ebp),%eax 10c599: 89 42 7c mov %eax,0x7c(%edx) the_thread->budget_callout = budget_callout; 10c59c: 8b 45 e0 mov -0x20(%ebp),%eax 10c59f: 89 82 80 00 00 00 mov %eax,0x80(%edx) switch ( api->schedpolicy ) { 10c5a5: 83 7d 0c 00 cmpl $0x0,0xc(%ebp) 10c5a9: 78 60 js 10c60b <== ALWAYS TAKEN 10c5ab: 83 7d 0c 02 cmpl $0x2,0xc(%ebp) 10c5af: 7e 08 jle 10c5b9 10c5b1: 83 7d 0c 03 cmpl $0x3,0xc(%ebp) 10c5b5: 75 54 jne 10c60b <== ALWAYS TAKEN 10c5b7: eb 24 jmp 10c5dd <== ALWAYS TAKEN case SCHED_OTHER: case SCHED_FIFO: case SCHED_RR: the_thread->cpu_time_budget = _Thread_Ticks_per_timeslice; 10c5b9: a1 08 92 12 00 mov 0x129208,%eax 10c5be: 89 42 78 mov %eax,0x78(%edx) 10c5c1: 0f b6 05 18 52 12 00 movzbl 0x125218,%eax 10c5c8: 2b 83 80 00 00 00 sub 0x80(%ebx),%eax the_thread->real_priority = 10c5ce: 89 42 18 mov %eax,0x18(%edx) _POSIX_Priority_To_core( api->schedparam.sched_priority ); _Thread_Change_priority( 10c5d1: 51 push %ecx 10c5d2: 6a 01 push $0x1 10c5d4: 50 push %eax 10c5d5: 52 push %edx 10c5d6: e8 d5 1e 00 00 call 10e4b0 <_Thread_Change_priority> 10c5db: eb 2b jmp 10c608 <== ALWAYS TAKEN true ); break; case SCHED_SPORADIC: api->ss_high_priority = api->schedparam.sched_priority; 10c5dd: 8b 83 80 00 00 00 mov 0x80(%ebx),%eax 10c5e3: 89 83 98 00 00 00 mov %eax,0x98(%ebx) _Watchdog_Remove( &api->Sporadic_timer ); 10c5e9: 83 ec 0c sub $0xc,%esp 10c5ec: 81 c3 9c 00 00 00 add $0x9c,%ebx 10c5f2: 53 push %ebx 10c5f3: 89 55 d0 mov %edx,-0x30(%ebp) 10c5f6: e8 59 33 00 00 call 10f954 <_Watchdog_Remove> _POSIX_Threads_Sporadic_budget_TSR( 0, the_thread ); 10c5fb: 58 pop %eax 10c5fc: 5a pop %edx 10c5fd: 8b 55 d0 mov -0x30(%ebp),%edx 10c600: 52 push %edx 10c601: 6a 00 push $0x0 10c603: e8 63 fe ff ff call 10c46b <_POSIX_Threads_Sporadic_budget_TSR> 10c608: 83 c4 10 add $0x10,%esp break; } _Thread_Enable_dispatch(); 10c60b: e8 3d 23 00 00 call 10e94d <_Thread_Enable_dispatch> case OBJECTS_ERROR: break; } return ESRCH; } 10c610: 8b 45 d4 mov -0x2c(%ebp),%eax 10c613: 8d 65 f4 lea -0xc(%ebp),%esp 10c616: 5b pop %ebx 10c617: 5e pop %esi 10c618: 5f pop %edi 10c619: c9 leave 10c61a: c3 ret 0010f630 : int pthread_sigmask( int how, const sigset_t *set, sigset_t *oset ) { 10f630: 55 push %ebp 10f631: 89 e5 mov %esp,%ebp 10f633: 57 push %edi 10f634: 56 push %esi 10f635: 53 push %ebx 10f636: 83 ec 1c sub $0x1c,%esp 10f639: 8b 4d 08 mov 0x8(%ebp),%ecx 10f63c: 8b 55 0c mov 0xc(%ebp),%edx 10f63f: 8b 5d 10 mov 0x10(%ebp),%ebx POSIX_API_Control *api; if ( !set && !oset ) 10f642: 85 d2 test %edx,%edx 10f644: 0f 94 45 e7 sete -0x19(%ebp) 10f648: 85 db test %ebx,%ebx 10f64a: 75 06 jne 10f652 10f64c: 80 7d e7 00 cmpb $0x0,-0x19(%ebp) 10f650: 75 4e jne 10f6a0 rtems_set_errno_and_return_minus_one( EINVAL ); api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; 10f652: 8b 35 e8 62 12 00 mov 0x1262e8,%esi 10f658: 8b 86 f8 00 00 00 mov 0xf8(%esi),%eax if ( oset ) 10f65e: 85 db test %ebx,%ebx 10f660: 74 08 je 10f66a *oset = api->signals_blocked; 10f662: 8b b8 c4 00 00 00 mov 0xc4(%eax),%edi 10f668: 89 3b mov %edi,(%ebx) if ( !set ) 10f66a: 80 7d e7 00 cmpb $0x0,-0x19(%ebp) 10f66e: 75 61 jne 10f6d1 return 0; switch ( how ) { 10f670: 83 f9 01 cmp $0x1,%ecx 10f673: 74 0b je 10f680 10f675: 83 f9 02 cmp $0x2,%ecx 10f678: 74 10 je 10f68a 10f67a: 85 c9 test %ecx,%ecx 10f67c: 74 18 je 10f696 10f67e: eb 20 jmp 10f6a0 <== ALWAYS TAKEN case SIG_BLOCK: api->signals_blocked |= *set; 10f680: 8b 12 mov (%edx),%edx 10f682: 09 90 c4 00 00 00 or %edx,0xc4(%eax) break; 10f688: eb 26 jmp 10f6b0 <== ALWAYS TAKEN case SIG_UNBLOCK: api->signals_blocked &= ~*set; 10f68a: 8b 12 mov (%edx),%edx 10f68c: f7 d2 not %edx 10f68e: 21 90 c4 00 00 00 and %edx,0xc4(%eax) break; 10f694: eb 1a jmp 10f6b0 <== ALWAYS TAKEN case SIG_SETMASK: api->signals_blocked = *set; 10f696: 8b 12 mov (%edx),%edx 10f698: 89 90 c4 00 00 00 mov %edx,0xc4(%eax) break; 10f69e: eb 10 jmp 10f6b0 <== ALWAYS TAKEN default: rtems_set_errno_and_return_minus_one( EINVAL ); 10f6a0: e8 ab 2a 00 00 call 112150 <__errno> 10f6a5: c7 00 16 00 00 00 movl $0x16,(%eax) 10f6ab: 83 c8 ff or $0xffffffff,%eax 10f6ae: eb 23 jmp 10f6d3 <== ALWAYS TAKEN /* XXX are there critical section problems here? */ /* XXX evaluate the new set */ if ( ~api->signals_blocked & (api->signals_pending | _POSIX_signals_Pending) ) { 10f6b0: 8b 15 58 69 12 00 mov 0x126958,%edx 10f6b6: 0b 90 c8 00 00 00 or 0xc8(%eax),%edx /* XXX are there critical section problems here? */ /* XXX evaluate the new set */ if ( ~api->signals_blocked & 10f6bc: 8b 80 c4 00 00 00 mov 0xc4(%eax),%eax 10f6c2: f7 d0 not %eax 10f6c4: 85 c2 test %eax,%edx 10f6c6: 74 09 je 10f6d1 (api->signals_pending | _POSIX_signals_Pending) ) { _Thread_Executing->do_post_task_switch_extension = true; 10f6c8: c6 46 74 01 movb $0x1,0x74(%esi) _Thread_Dispatch(); 10f6cc: e8 bb d1 ff ff call 10c88c <_Thread_Dispatch> 10f6d1: 31 c0 xor %eax,%eax } return 0; } 10f6d3: 83 c4 1c add $0x1c,%esp 10f6d6: 5b pop %ebx 10f6d7: 5e pop %esi 10f6d8: 5f pop %edi 10f6d9: c9 leave 10f6da: c3 ret 0010a038 : */ int pthread_spin_destroy( pthread_spinlock_t *spinlock ) { 10a038: 55 push %ebp 10a039: 89 e5 mov %esp,%ebp 10a03b: 53 push %ebx 10a03c: 83 ec 14 sub $0x14,%esp 10a03f: 8b 45 08 mov 0x8(%ebp),%eax POSIX_Spinlock_Control *the_spinlock = NULL; Objects_Locations location; if ( !spinlock ) 10a042: 85 c0 test %eax,%eax 10a044: 74 55 je 10a09b RTEMS_INLINE_ROUTINE POSIX_Spinlock_Control *_POSIX_Spinlock_Get ( pthread_spinlock_t *spinlock, Objects_Locations *location ) { return (POSIX_Spinlock_Control *) _Objects_Get( 10a046: 53 push %ebx 10a047: 8d 55 f4 lea -0xc(%ebp),%edx 10a04a: 52 push %edx 10a04b: ff 30 pushl (%eax) 10a04d: 68 a4 54 12 00 push $0x1254a4 10a052: e8 b9 1d 00 00 call 10be10 <_Objects_Get> 10a057: 89 c3 mov %eax,%ebx return EINVAL; the_spinlock = _POSIX_Spinlock_Get( spinlock, &location ); switch ( location ) { 10a059: 83 c4 10 add $0x10,%esp 10a05c: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 10a060: 75 39 jne 10a09b */ RTEMS_INLINE_ROUTINE bool _CORE_spinlock_Is_busy( CORE_spinlock_Control *the_spinlock ) { return (the_spinlock->users != 0); 10a062: 8b 40 18 mov 0x18(%eax),%eax case OBJECTS_LOCAL: if ( _CORE_spinlock_Is_busy( &the_spinlock->Spinlock ) ) { 10a065: 85 c0 test %eax,%eax 10a067: 74 0c je 10a075 _Thread_Enable_dispatch(); 10a069: e8 93 25 00 00 call 10c601 <_Thread_Enable_dispatch> 10a06e: b8 10 00 00 00 mov $0x10,%eax return EBUSY; 10a073: eb 2b jmp 10a0a0 <== ALWAYS TAKEN } _Objects_Close( &_POSIX_Spinlock_Information, &the_spinlock->Object ); 10a075: 51 push %ecx 10a076: 51 push %ecx 10a077: 53 push %ebx 10a078: 68 a4 54 12 00 push $0x1254a4 10a07d: e8 e6 19 00 00 call 10ba68 <_Objects_Close> */ RTEMS_INLINE_ROUTINE void _POSIX_Spinlock_Free ( POSIX_Spinlock_Control *the_spinlock ) { _Objects_Free( &_POSIX_Spinlock_Information, &the_spinlock->Object ); 10a082: 58 pop %eax 10a083: 5a pop %edx 10a084: 53 push %ebx 10a085: 68 a4 54 12 00 push $0x1254a4 10a08a: e8 59 1c 00 00 call 10bce8 <_Objects_Free> _POSIX_Spinlock_Free( the_spinlock ); _Thread_Enable_dispatch(); 10a08f: e8 6d 25 00 00 call 10c601 <_Thread_Enable_dispatch> 10a094: 31 c0 xor %eax,%eax return 0; 10a096: 83 c4 10 add $0x10,%esp 10a099: eb 05 jmp 10a0a0 <== ALWAYS TAKEN 10a09b: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10a0a0: 8b 5d fc mov -0x4(%ebp),%ebx 10a0a3: c9 leave 10a0a4: c3 ret 0010a0a8 : int pthread_spin_init( pthread_spinlock_t *spinlock, int pshared ) { 10a0a8: 55 push %ebp 10a0a9: 89 e5 mov %esp,%ebp 10a0ab: 56 push %esi 10a0ac: 53 push %ebx 10a0ad: 83 ec 10 sub $0x10,%esp 10a0b0: 8b 5d 08 mov 0x8(%ebp),%ebx POSIX_Spinlock_Control *the_spinlock; CORE_spinlock_Attributes attributes; if ( !spinlock ) 10a0b3: 85 db test %ebx,%ebx 10a0b5: 74 66 je 10a11d return EINVAL; switch ( pshared ) { 10a0b7: 83 7d 0c 00 cmpl $0x0,0xc(%ebp) 10a0bb: 75 60 jne 10a11d rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10a0bd: a1 fc 51 12 00 mov 0x1251fc,%eax 10a0c2: 40 inc %eax 10a0c3: a3 fc 51 12 00 mov %eax,0x1251fc * This function allocates a spinlock control block from * the inactive chain of free spinlock control blocks. */ RTEMS_INLINE_ROUTINE POSIX_Spinlock_Control *_POSIX_Spinlock_Allocate( void ) { return (POSIX_Spinlock_Control *) 10a0c8: 83 ec 0c sub $0xc,%esp 10a0cb: 68 a4 54 12 00 push $0x1254a4 10a0d0: e8 27 19 00 00 call 10b9fc <_Objects_Allocate> 10a0d5: 89 c6 mov %eax,%esi _Thread_Disable_dispatch(); /* prevents deletion */ the_spinlock = _POSIX_Spinlock_Allocate(); if ( !the_spinlock ) { 10a0d7: 83 c4 10 add $0x10,%esp 10a0da: 85 c0 test %eax,%eax 10a0dc: 75 0c jne 10a0ea _Thread_Enable_dispatch(); 10a0de: e8 1e 25 00 00 call 10c601 <_Thread_Enable_dispatch> 10a0e3: b8 0b 00 00 00 mov $0xb,%eax return EAGAIN; 10a0e8: eb 38 jmp 10a122 <== ALWAYS TAKEN } _CORE_spinlock_Initialize( &the_spinlock->Spinlock, &attributes ); 10a0ea: 50 push %eax 10a0eb: 50 push %eax 10a0ec: 8d 45 f4 lea -0xc(%ebp),%eax 10a0ef: 50 push %eax 10a0f0: 8d 46 10 lea 0x10(%esi),%eax 10a0f3: 50 push %eax 10a0f4: e8 d3 13 00 00 call 10b4cc <_CORE_spinlock_Initialize> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10a0f9: 8b 46 08 mov 0x8(%esi),%eax 10a0fc: 0f b7 c8 movzwl %ax,%ecx 10a0ff: 8b 15 c0 54 12 00 mov 0x1254c0,%edx 10a105: 89 34 8a mov %esi,(%edx,%ecx,4) _Objects_Get_index( the_object->id ), the_object ); /* ASSERT: information->is_string == false */ the_object->name.name_u32 = name; 10a108: c7 46 0c 00 00 00 00 movl $0x0,0xc(%esi) _Objects_Open_u32( &_POSIX_Spinlock_Information, &the_spinlock->Object, 0 ); *spinlock = the_spinlock->Object.id; 10a10f: 89 03 mov %eax,(%ebx) _Thread_Enable_dispatch(); 10a111: e8 eb 24 00 00 call 10c601 <_Thread_Enable_dispatch> 10a116: 31 c0 xor %eax,%eax return 0; 10a118: 83 c4 10 add $0x10,%esp 10a11b: eb 05 jmp 10a122 <== ALWAYS TAKEN 10a11d: b8 16 00 00 00 mov $0x16,%eax } 10a122: 8d 65 f8 lea -0x8(%ebp),%esp 10a125: 5b pop %ebx 10a126: 5e pop %esi 10a127: c9 leave 10a128: c3 ret 0010a12c : */ int pthread_spin_lock( pthread_spinlock_t *spinlock ) { 10a12c: 55 push %ebp 10a12d: 89 e5 mov %esp,%ebp 10a12f: 53 push %ebx 10a130: 83 ec 14 sub $0x14,%esp 10a133: 8b 45 08 mov 0x8(%ebp),%eax POSIX_Spinlock_Control *the_spinlock = NULL; Objects_Locations location; CORE_spinlock_Status status; if ( !spinlock ) 10a136: 85 c0 test %eax,%eax 10a138: 74 3c je 10a176 RTEMS_INLINE_ROUTINE POSIX_Spinlock_Control *_POSIX_Spinlock_Get ( pthread_spinlock_t *spinlock, Objects_Locations *location ) { return (POSIX_Spinlock_Control *) _Objects_Get( 10a13a: 51 push %ecx 10a13b: 8d 55 f4 lea -0xc(%ebp),%edx 10a13e: 52 push %edx 10a13f: ff 30 pushl (%eax) 10a141: 68 a4 54 12 00 push $0x1254a4 10a146: e8 c5 1c 00 00 call 10be10 <_Objects_Get> return EINVAL; the_spinlock = _POSIX_Spinlock_Get( spinlock, &location ); switch ( location ) { 10a14b: 83 c4 10 add $0x10,%esp 10a14e: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 10a152: 75 22 jne 10a176 case OBJECTS_LOCAL: status = _CORE_spinlock_Wait( &the_spinlock->Spinlock, true, 0 ); 10a154: 52 push %edx 10a155: 6a 00 push $0x0 10a157: 6a 01 push $0x1 10a159: 83 c0 10 add $0x10,%eax 10a15c: 50 push %eax 10a15d: e8 de 13 00 00 call 10b540 <_CORE_spinlock_Wait> 10a162: 89 c3 mov %eax,%ebx _Thread_Enable_dispatch(); 10a164: e8 98 24 00 00 call 10c601 <_Thread_Enable_dispatch> return _POSIX_Spinlock_Translate_core_spinlock_return_code( status ); 10a169: 89 1c 24 mov %ebx,(%esp) 10a16c: e8 0f 00 00 00 call 10a180 <_POSIX_Spinlock_Translate_core_spinlock_return_code> <== ALWAYS TAKEN 10a171: 83 c4 10 add $0x10,%esp 10a174: eb 05 jmp 10a17b <== ALWAYS TAKEN 10a176: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10a17b: 8b 5d fc mov -0x4(%ebp),%ebx 10a17e: c9 leave 10a17f: c3 ret 0010a190 : */ int pthread_spin_trylock( pthread_spinlock_t *spinlock ) { 10a190: 55 push %ebp 10a191: 89 e5 mov %esp,%ebp 10a193: 53 push %ebx 10a194: 83 ec 14 sub $0x14,%esp 10a197: 8b 45 08 mov 0x8(%ebp),%eax POSIX_Spinlock_Control *the_spinlock = NULL; Objects_Locations location; CORE_spinlock_Status status; if ( !spinlock ) 10a19a: 85 c0 test %eax,%eax 10a19c: 74 3c je 10a1da 10a19e: 51 push %ecx 10a19f: 8d 55 f4 lea -0xc(%ebp),%edx 10a1a2: 52 push %edx 10a1a3: ff 30 pushl (%eax) 10a1a5: 68 a4 54 12 00 push $0x1254a4 10a1aa: e8 61 1c 00 00 call 10be10 <_Objects_Get> return EINVAL; the_spinlock = _POSIX_Spinlock_Get( spinlock, &location ); switch ( location ) { 10a1af: 83 c4 10 add $0x10,%esp 10a1b2: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 10a1b6: 75 22 jne 10a1da case OBJECTS_LOCAL: status = _CORE_spinlock_Wait( &the_spinlock->Spinlock, false, 0 ); 10a1b8: 52 push %edx 10a1b9: 6a 00 push $0x0 10a1bb: 6a 00 push $0x0 10a1bd: 83 c0 10 add $0x10,%eax 10a1c0: 50 push %eax 10a1c1: e8 7a 13 00 00 call 10b540 <_CORE_spinlock_Wait> 10a1c6: 89 c3 mov %eax,%ebx _Thread_Enable_dispatch(); 10a1c8: e8 34 24 00 00 call 10c601 <_Thread_Enable_dispatch> return _POSIX_Spinlock_Translate_core_spinlock_return_code( status ); 10a1cd: 89 1c 24 mov %ebx,(%esp) 10a1d0: e8 ab ff ff ff call 10a180 <_POSIX_Spinlock_Translate_core_spinlock_return_code> <== ALWAYS TAKEN 10a1d5: 83 c4 10 add $0x10,%esp 10a1d8: eb 05 jmp 10a1df <== ALWAYS TAKEN 10a1da: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10a1df: 8b 5d fc mov -0x4(%ebp),%ebx 10a1e2: c9 leave 10a1e3: c3 ret 0010a1e4 : */ int pthread_spin_unlock( pthread_spinlock_t *spinlock ) { 10a1e4: 55 push %ebp 10a1e5: 89 e5 mov %esp,%ebp 10a1e7: 53 push %ebx 10a1e8: 83 ec 14 sub $0x14,%esp 10a1eb: 8b 45 08 mov 0x8(%ebp),%eax POSIX_Spinlock_Control *the_spinlock = NULL; Objects_Locations location; CORE_spinlock_Status status; if ( !spinlock ) 10a1ee: 85 c0 test %eax,%eax 10a1f0: 74 3a je 10a22c 10a1f2: 52 push %edx 10a1f3: 8d 55 f4 lea -0xc(%ebp),%edx 10a1f6: 52 push %edx 10a1f7: ff 30 pushl (%eax) 10a1f9: 68 a4 54 12 00 push $0x1254a4 10a1fe: e8 0d 1c 00 00 call 10be10 <_Objects_Get> return EINVAL; the_spinlock = _POSIX_Spinlock_Get( spinlock, &location ); switch ( location ) { 10a203: 83 c4 10 add $0x10,%esp 10a206: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 10a20a: 75 20 jne 10a22c case OBJECTS_LOCAL: status = _CORE_spinlock_Release( &the_spinlock->Spinlock ); 10a20c: 83 ec 0c sub $0xc,%esp 10a20f: 83 c0 10 add $0x10,%eax 10a212: 50 push %eax 10a213: e8 d8 12 00 00 call 10b4f0 <_CORE_spinlock_Release> 10a218: 89 c3 mov %eax,%ebx _Thread_Enable_dispatch(); 10a21a: e8 e2 23 00 00 call 10c601 <_Thread_Enable_dispatch> return _POSIX_Spinlock_Translate_core_spinlock_return_code( status ); 10a21f: 89 1c 24 mov %ebx,(%esp) 10a222: e8 59 ff ff ff call 10a180 <_POSIX_Spinlock_Translate_core_spinlock_return_code> <== ALWAYS TAKEN 10a227: 83 c4 10 add $0x10,%esp 10a22a: eb 05 jmp 10a231 <== ALWAYS TAKEN 10a22c: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10a231: 8b 5d fc mov -0x4(%ebp),%ebx 10a234: c9 leave 10a235: c3 ret 0010a3ac : * * 18.2.2 Setting Cancelability State, P1003.1c/Draft 10, p. 183 */ void pthread_testcancel( void ) { 10a3ac: 55 push %ebp 10a3ad: 89 e5 mov %esp,%ebp 10a3af: 53 push %ebx 10a3b0: 83 ec 04 sub $0x4,%esp * Don't even think about deleting a resource from an ISR. * Besides this request is supposed to be for _Thread_Executing * and the ISR context is not a thread. */ if ( _ISR_Is_in_progress() ) 10a3b3: a1 74 62 12 00 mov 0x126274,%eax 10a3b8: 85 c0 test %eax,%eax 10a3ba: 75 48 jne 10a404 <== ALWAYS TAKEN return; thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; 10a3bc: a1 98 62 12 00 mov 0x126298,%eax 10a3c1: 8b 80 f8 00 00 00 mov 0xf8(%eax),%eax 10a3c7: 8b 15 dc 61 12 00 mov 0x1261dc,%edx 10a3cd: 42 inc %edx 10a3ce: 89 15 dc 61 12 00 mov %edx,0x1261dc _Thread_Disable_dispatch(); if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && 10a3d4: 31 db xor %ebx,%ebx 10a3d6: 83 b8 cc 00 00 00 00 cmpl $0x0,0xcc(%eax) 10a3dd: 75 0a jne 10a3e9 <== ALWAYS TAKEN /* Setting Cancelability State, P1003.1c/Draft 10, p. 183 */ int _EXFUN(pthread_setcancelstate, (int __state, int *__oldstate)); int _EXFUN(pthread_setcanceltype, (int __type, int *__oldtype)); void _EXFUN(pthread_testcancel, (void)); 10a3df: 83 b8 d4 00 00 00 00 cmpl $0x0,0xd4(%eax) 10a3e6: 0f 95 c3 setne %bl thread_support->cancelation_requested ) cancel = true; _Thread_Enable_dispatch(); 10a3e9: e8 6f 22 00 00 call 10c65d <_Thread_Enable_dispatch> if ( cancel ) 10a3ee: 84 db test %bl,%bl 10a3f0: 74 12 je 10a404 _POSIX_Thread_Exit( _Thread_Executing, PTHREAD_CANCELED ); 10a3f2: 50 push %eax 10a3f3: 50 push %eax 10a3f4: 6a ff push $0xffffffff 10a3f6: ff 35 98 62 12 00 pushl 0x126298 10a3fc: e8 9b 4c 00 00 call 10f09c <_POSIX_Thread_Exit> 10a401: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } 10a404: 8b 5d fc mov -0x4(%ebp),%ebx 10a407: c9 leave 10a408: c3 ret 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 02 12 00 mov 0x120210,%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 0011c980 : ssize_t read( int fd, void *buffer, size_t count ) { 11c980: 55 push %ebp 11c981: 89 e5 mov %esp,%ebp 11c983: 56 push %esi 11c984: 53 push %ebx 11c985: 8b 5d 08 mov 0x8(%ebp),%ebx 11c988: 8b 55 0c mov 0xc(%ebp),%edx 11c98b: 8b 4d 10 mov 0x10(%ebp),%ecx ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 11c98e: 3b 1d 44 01 12 00 cmp 0x120144,%ebx 11c994: 73 14 jae 11c9aa <== ALWAYS TAKEN iop = rtems_libio_iop( fd ); 11c996: c1 e3 06 shl $0x6,%ebx 11c999: 03 1d 90 40 12 00 add 0x124090,%ebx rtems_libio_check_is_open( iop ); 11c99f: 8b 73 14 mov 0x14(%ebx),%esi 11c9a2: f7 c6 00 01 00 00 test $0x100,%esi 11c9a8: 75 0d jne 11c9b7 11c9aa: e8 15 4b ff ff call 1114c4 <__errno> 11c9af: c7 00 09 00 00 00 movl $0x9,(%eax) 11c9b5: eb 31 jmp 11c9e8 <== ALWAYS TAKEN rtems_libio_check_buffer( buffer ); 11c9b7: 85 d2 test %edx,%edx 11c9b9: 74 0b je 11c9c6 <== ALWAYS TAKEN rtems_libio_check_count( count ); 11c9bb: 31 c0 xor %eax,%eax 11c9bd: 85 c9 test %ecx,%ecx 11c9bf: 74 44 je 11ca05 <== ALWAYS TAKEN rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); 11c9c1: 83 e6 02 and $0x2,%esi 11c9c4: 75 0d jne 11c9d3 <== NEVER TAKEN 11c9c6: e8 f9 4a ff ff call 1114c4 <__errno> <== NOT EXECUTED 11c9cb: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 11c9d1: eb 15 jmp 11c9e8 <== NOT EXECUTED /* * Now process the read(). */ if ( !iop->handlers->read_h ) 11c9d3: 8b 43 3c mov 0x3c(%ebx),%eax 11c9d6: 8b 40 08 mov 0x8(%eax),%eax 11c9d9: 85 c0 test %eax,%eax 11c9db: 75 10 jne 11c9ed <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); 11c9dd: e8 e2 4a ff ff call 1114c4 <__errno> <== NOT EXECUTED 11c9e2: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 11c9e8: 83 c8 ff or $0xffffffff,%eax 11c9eb: eb 18 jmp 11ca05 <== ALWAYS TAKEN rc = (*iop->handlers->read_h)( iop, buffer, count ); 11c9ed: 56 push %esi 11c9ee: 51 push %ecx 11c9ef: 52 push %edx 11c9f0: 53 push %ebx 11c9f1: ff d0 call *%eax if ( rc > 0 ) 11c9f3: 83 c4 10 add $0x10,%esp 11c9f6: 85 c0 test %eax,%eax 11c9f8: 7e 0b jle 11ca05 iop->offset += rc; 11c9fa: 89 c1 mov %eax,%ecx 11c9fc: c1 f9 1f sar $0x1f,%ecx 11c9ff: 01 43 0c add %eax,0xc(%ebx) 11ca02: 11 4b 10 adc %ecx,0x10(%ebx) return rc; } 11ca05: 8d 65 f8 lea -0x8(%ebp),%esp 11ca08: 5b pop %ebx 11ca09: 5e pop %esi 11ca0a: c9 leave 11ca0b: c3 ret 00126864 : ssize_t readlink( const char *pathname, char *buf, size_t bufsize ) { 126864: 55 push %ebp 126865: 89 e5 mov %esp,%ebp 126867: 57 push %edi 126868: 56 push %esi 126869: 53 push %ebx 12686a: 83 ec 2c sub $0x2c,%esp 12686d: 8b 55 08 mov 0x8(%ebp),%edx 126870: 8b 5d 0c mov 0xc(%ebp),%ebx rtems_filesystem_location_info_t loc; int result; if (!buf) 126873: 85 db test %ebx,%ebx 126875: 75 0d jne 126884 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EFAULT ); 126877: e8 c0 2d 01 00 call 13963c <__errno> <== NOT EXECUTED 12687c: c7 00 0e 00 00 00 movl $0xe,(%eax) <== NOT EXECUTED 126882: eb 51 jmp 1268d5 <== NOT EXECUTED result = rtems_filesystem_evaluate_path( pathname, strlen( pathname ), 126884: 31 c0 xor %eax,%eax 126886: 83 c9 ff or $0xffffffff,%ecx 126889: 89 d7 mov %edx,%edi 12688b: f2 ae repnz scas %es:(%edi),%al 12688d: f7 d1 not %ecx 12688f: 49 dec %ecx 126890: 83 ec 0c sub $0xc,%esp 126893: 6a 00 push $0x0 126895: 8d 75 d4 lea -0x2c(%ebp),%esi 126898: 56 push %esi 126899: 6a 00 push $0x0 12689b: 51 push %ecx 12689c: 52 push %edx 12689d: e8 7a 4e fe ff call 10b71c 0, &loc, false ); if ( result != 0 ) 1268a2: 83 c4 20 add $0x20,%esp 1268a5: 83 cf ff or $0xffffffff,%edi 1268a8: 85 c0 test %eax,%eax 1268aa: 0f 85 8c 00 00 00 jne 12693c <== ALWAYS TAKEN return -1; if ( !loc.ops->node_type_h ){ 1268b0: 8b 55 e0 mov -0x20(%ebp),%edx 1268b3: 8b 42 10 mov 0x10(%edx),%eax 1268b6: 85 c0 test %eax,%eax 1268b8: 75 20 jne 1268da <== NEVER TAKEN rtems_filesystem_freenode( &loc ); 1268ba: 8b 42 1c mov 0x1c(%edx),%eax <== NOT EXECUTED 1268bd: 85 c0 test %eax,%eax <== NOT EXECUTED 1268bf: 74 09 je 1268ca <== NOT EXECUTED 1268c1: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1268c4: 56 push %esi <== NOT EXECUTED 1268c5: ff d0 call *%eax <== NOT EXECUTED 1268c7: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 1268ca: e8 6d 2d 01 00 call 13963c <__errno> <== NOT EXECUTED 1268cf: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 1268d5: 83 cf ff or $0xffffffff,%edi 1268d8: eb 62 jmp 12693c } if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_SYM_LINK ){ 1268da: 83 ec 0c sub $0xc,%esp 1268dd: 56 push %esi 1268de: ff d0 call *%eax 1268e0: 83 c4 10 add $0x10,%esp 1268e3: 83 f8 04 cmp $0x4,%eax 1268e6: 8b 45 e0 mov -0x20(%ebp),%eax 1268e9: 74 21 je 12690c rtems_filesystem_freenode( &loc ); 1268eb: 85 c0 test %eax,%eax 1268ed: 74 10 je 1268ff <== ALWAYS TAKEN 1268ef: 8b 40 1c mov 0x1c(%eax),%eax 1268f2: 85 c0 test %eax,%eax 1268f4: 74 09 je 1268ff <== ALWAYS TAKEN 1268f6: 83 ec 0c sub $0xc,%esp 1268f9: 56 push %esi 1268fa: ff d0 call *%eax 1268fc: 83 c4 10 add $0x10,%esp rtems_set_errno_and_return_minus_one( EINVAL ); 1268ff: e8 38 2d 01 00 call 13963c <__errno> 126904: c7 00 16 00 00 00 movl $0x16,(%eax) 12690a: eb c9 jmp 1268d5 <== ALWAYS TAKEN } if ( !loc.ops->readlink_h ){ 12690c: 8b 50 3c mov 0x3c(%eax),%edx 12690f: 85 d2 test %edx,%edx 126911: 75 05 jne 126918 rtems_filesystem_freenode( &loc ); 126913: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 126916: eb a5 jmp 1268bd <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.ops->readlink_h)( &loc, buf, bufsize ); 126918: 50 push %eax 126919: ff 75 10 pushl 0x10(%ebp) 12691c: 53 push %ebx 12691d: 56 push %esi 12691e: ff d2 call *%edx 126920: 89 c7 mov %eax,%edi rtems_filesystem_freenode( &loc ); 126922: 8b 45 e0 mov -0x20(%ebp),%eax 126925: 83 c4 10 add $0x10,%esp 126928: 85 c0 test %eax,%eax 12692a: 74 10 je 12693c <== ALWAYS TAKEN 12692c: 8b 40 1c mov 0x1c(%eax),%eax 12692f: 85 c0 test %eax,%eax 126931: 74 09 je 12693c <== ALWAYS TAKEN 126933: 83 ec 0c sub $0xc,%esp 126936: 56 push %esi 126937: ff d0 call *%eax 126939: 83 c4 10 add $0x10,%esp return result; } 12693c: 89 f8 mov %edi,%eax 12693e: 8d 65 f4 lea -0xc(%ebp),%esp 126941: 5b pop %ebx 126942: 5e pop %esi 126943: 5f pop %edi 126944: c9 leave 126945: 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 e4 42 12 00 cmp 0x1242e4,%esi 108c7d: 73 11 jae 108c90 <== ALWAYS TAKEN iop = rtems_libio_iop( fd ); 108c7f: c1 e6 06 shl $0x6,%esi 108c82: 03 35 08 8a 12 00 add 0x128a08,%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 03 a6 00 00 call 113298 <__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 d3 a5 00 00 call 113298 <__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 ad a5 00 00 call 113298 <__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 0011ca8c : { uintptr_t old_size; char *new_area; uintptr_t resize; MSBUMP(realloc_calls, 1); 11ca8c: 55 push %ebp 11ca8d: 89 e5 mov %esp,%ebp 11ca8f: 57 push %edi 11ca90: 56 push %esi 11ca91: 53 push %ebx 11ca92: 83 ec 2c sub $0x2c,%esp 11ca95: 8b 5d 08 mov 0x8(%ebp),%ebx 11ca98: 8b 75 0c mov 0xc(%ebp),%esi 11ca9b: ff 05 b8 40 12 00 incl 0x1240b8 /* * Do not attempt to allocate memory if in a critical section or ISR. */ if (_System_state_Is_up(_System_state_Get())) { 11caa1: 83 3d 84 43 12 00 03 cmpl $0x3,0x124384 11caa8: 75 1a jne 11cac4 <== ALWAYS TAKEN if (_Thread_Dispatch_disable_level > 0) 11caaa: a1 ec 41 12 00 mov 0x1241ec,%eax 11caaf: 85 c0 test %eax,%eax 11cab1: 0f 85 a7 00 00 00 jne 11cb5e <== ALWAYS TAKEN return (void *) 0; if (_ISR_Nest_level > 0) 11cab7: a1 84 42 12 00 mov 0x124284,%eax 11cabc: 85 c0 test %eax,%eax 11cabe: 0f 85 9a 00 00 00 jne 11cb5e <== ALWAYS TAKEN } /* * Continue with realloc(). */ if ( !ptr ) 11cac4: 85 db test %ebx,%ebx 11cac6: 75 0e jne 11cad6 return malloc( size ); 11cac8: 83 ec 0c sub $0xc,%esp 11cacb: 56 push %esi 11cacc: e8 8b a8 fe ff call 10735c <== ALWAYS TAKEN 11cad1: e9 81 00 00 00 jmp 11cb57 <== ALWAYS TAKEN if ( !size ) { 11cad6: 85 f6 test %esi,%esi 11cad8: 75 0d jne 11cae7 <== NEVER TAKEN free( ptr ); 11cada: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 11cadd: 53 push %ebx <== NOT EXECUTED 11cade: e8 4d a6 fe ff call 107130 <== NOT EXECUTED 11cae3: 31 db xor %ebx,%ebx <== NOT EXECUTED 11cae5: eb 72 jmp 11cb59 <== NOT EXECUTED return (void *) 0; } if ( !_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, ptr, &old_size) ) { 11cae7: 52 push %edx 11cae8: 8d 45 e4 lea -0x1c(%ebp),%eax 11caeb: 50 push %eax 11caec: 53 push %ebx 11caed: ff 35 50 01 12 00 pushl 0x120150 11caf3: e8 00 01 00 00 call 11cbf8 <_Protected_heap_Get_block_size> 11caf8: 83 c4 10 add $0x10,%esp 11cafb: 84 c0 test %al,%al 11cafd: 75 0d jne 11cb0c errno = EINVAL; 11caff: e8 c0 49 ff ff call 1114c4 <__errno> 11cb04: c7 00 16 00 00 00 movl $0x16,(%eax) 11cb0a: eb 52 jmp 11cb5e <== 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 ) ) { 11cb0c: 50 push %eax 11cb0d: 56 push %esi 11cb0e: 53 push %ebx 11cb0f: ff 35 50 01 12 00 pushl 0x120150 11cb15: e8 16 01 00 00 call 11cc30 <_Protected_heap_Resize_block> 11cb1a: 83 c4 10 add $0x10,%esp 11cb1d: 84 c0 test %al,%al 11cb1f: 75 3f jne 11cb60 * 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 ); 11cb21: 83 ec 0c sub $0xc,%esp 11cb24: 56 push %esi 11cb25: e8 32 a8 fe ff call 10735c <== ALWAYS TAKEN MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */ 11cb2a: ff 0d ac 40 12 00 decl 0x1240ac if ( !new_area ) { 11cb30: 83 c4 10 add $0x10,%esp 11cb33: 85 c0 test %eax,%eax 11cb35: 74 27 je 11cb5e return (void *) 0; } memcpy( new_area, ptr, (size < old_size) ? size : old_size ); 11cb37: 8b 55 e4 mov -0x1c(%ebp),%edx 11cb3a: 89 f1 mov %esi,%ecx 11cb3c: 39 d6 cmp %edx,%esi 11cb3e: 76 02 jbe 11cb42 <== ALWAYS TAKEN 11cb40: 89 d1 mov %edx,%ecx 11cb42: 89 c7 mov %eax,%edi 11cb44: 89 de mov %ebx,%esi 11cb46: f3 a4 rep movsb %ds:(%esi),%es:(%edi) free( ptr ); 11cb48: 83 ec 0c sub $0xc,%esp 11cb4b: 53 push %ebx 11cb4c: 89 45 d4 mov %eax,-0x2c(%ebp) 11cb4f: e8 dc a5 fe ff call 107130 11cb54: 8b 45 d4 mov -0x2c(%ebp),%eax 11cb57: 89 c3 mov %eax,%ebx return new_area; 11cb59: 83 c4 10 add $0x10,%esp 11cb5c: eb 02 jmp 11cb60 <== ALWAYS TAKEN 11cb5e: 31 db xor %ebx,%ebx } 11cb60: 89 d8 mov %ebx,%eax 11cb62: 8d 65 f4 lea -0xc(%ebp),%esp 11cb65: 5b pop %ebx 11cb66: 5e pop %esi 11cb67: 5f pop %edi 11cb68: c9 leave 11cb69: 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 e1 15 00 mov 0x15e178,%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 e1 15 00 mov 0x15e178,%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 09 cc 02 00 call 13963c <__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 ba cb 02 00 call 13963c <__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 001101f8 : uint32_t rtems_assoc_local_by_remote( const rtems_assoc_t *ap, uint32_t remote_value ) { 1101f8: 55 push %ebp 1101f9: 89 e5 mov %esp,%ebp 1101fb: 83 ec 10 sub $0x10,%esp const rtems_assoc_t *nap; nap = rtems_assoc_ptr_by_remote(ap, remote_value); 1101fe: ff 75 0c pushl 0xc(%ebp) 110201: ff 75 08 pushl 0x8(%ebp) 110204: e8 13 00 00 00 call 11021c <== ALWAYS TAKEN 110209: 89 c2 mov %eax,%edx if (nap) 11020b: 83 c4 10 add $0x10,%esp 11020e: 31 c0 xor %eax,%eax 110210: 85 d2 test %edx,%edx 110212: 74 03 je 110217 return nap->local_value; 110214: 8b 42 04 mov 0x4(%edx),%eax return 0; } 110217: c9 leave 110218: c3 ret 001101bc : uint32_t rtems_assoc_local_by_remote_bitfield( const rtems_assoc_t *ap, uint32_t remote_value ) { 1101bc: 55 push %ebp 1101bd: 89 e5 mov %esp,%ebp 1101bf: 57 push %edi 1101c0: 56 push %esi 1101c1: 53 push %ebx 1101c2: 83 ec 0c sub $0xc,%esp 1101c5: 31 ff xor %edi,%edi 1101c7: 31 f6 xor %esi,%esi 1101c9: 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) 1101ce: 85 5d 0c test %ebx,0xc(%ebp) 1101d1: 74 10 je 1101e3 local_value |= rtems_assoc_local_by_remote(ap, b); 1101d3: 50 push %eax 1101d4: 50 push %eax 1101d5: 53 push %ebx 1101d6: ff 75 08 pushl 0x8(%ebp) 1101d9: e8 1a 00 00 00 call 1101f8 <== ALWAYS TAKEN 1101de: 09 c6 or %eax,%esi 1101e0: 83 c4 10 add $0x10,%esp ) { uint32_t b; uint32_t local_value = 0; for (b = 1; b; b <<= 1) { 1101e3: d1 e3 shl %ebx 1101e5: 47 inc %edi 1101e6: 83 ff 20 cmp $0x20,%edi 1101e9: 75 e3 jne 1101ce if (b & remote_value) local_value |= rtems_assoc_local_by_remote(ap, b); } return local_value; } 1101eb: 89 f0 mov %esi,%eax 1101ed: 8d 65 f4 lea -0xc(%ebp),%esp 1101f0: 5b pop %ebx 1101f1: 5e pop %esi 1101f2: 5f pop %edi 1101f3: c9 leave 1101f4: c3 ret 001162d4 : uint32_t bad_value #else uint32_t bad_value __attribute((unused)) #endif ) { 1162d4: 55 push %ebp <== NOT EXECUTED 1162d5: 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; } 1162d7: b8 44 90 12 00 mov $0x129044,%eax <== NOT EXECUTED 1162dc: c9 leave <== NOT EXECUTED 1162dd: c3 ret <== NOT EXECUTED 00113328 : const char *rtems_assoc_name_by_local( const rtems_assoc_t *ap, uint32_t local_value ) { 113328: 55 push %ebp 113329: 89 e5 mov %esp,%ebp 11332b: 53 push %ebx 11332c: 83 ec 0c sub $0xc,%esp 11332f: 8b 5d 0c mov 0xc(%ebp),%ebx const rtems_assoc_t *nap; nap = rtems_assoc_ptr_by_local(ap, local_value); 113332: 53 push %ebx 113333: ff 75 08 pushl 0x8(%ebp) 113336: e8 1d 00 00 00 call 113358 <== ALWAYS TAKEN if (nap) 11333b: 83 c4 10 add $0x10,%esp 11333e: 85 c0 test %eax,%eax 113340: 74 07 je 113349 <== ALWAYS TAKEN return nap->name; 113342: 8b 00 mov (%eax),%eax return rtems_assoc_name_bad(local_value); } 113344: 8b 5d fc mov -0x4(%ebp),%ebx 113347: c9 leave 113348: c3 ret nap = rtems_assoc_ptr_by_local(ap, local_value); if (nap) return nap->name; return rtems_assoc_name_bad(local_value); 113349: 89 5d 08 mov %ebx,0x8(%ebp) <== NOT EXECUTED } 11334c: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 11334f: 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); 113350: e9 7f 2f 00 00 jmp 1162d4 <== NOT EXECUTED 00111464 : const rtems_assoc_t *rtems_assoc_ptr_by_local( const rtems_assoc_t *ap, uint32_t local_value ) { 111464: 55 push %ebp 111465: 89 e5 mov %esp,%ebp 111467: 56 push %esi 111468: 53 push %ebx 111469: 8b 5d 08 mov 0x8(%ebp),%ebx 11146c: 8b 75 0c mov 0xc(%ebp),%esi const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) 11146f: 8b 03 mov (%ebx),%eax 111471: 85 c0 test %eax,%eax 111473: 74 1b je 111490 <== ALWAYS TAKEN 111475: 52 push %edx 111476: 52 push %edx 111477: 68 05 ef 11 00 push $0x11ef05 11147c: 50 push %eax 11147d: e8 2e 0b 00 00 call 111fb0 111482: 83 c4 10 add $0x10,%esp 111485: 85 c0 test %eax,%eax 111487: 75 07 jne 111490 <== NEVER TAKEN default_ap = ap++; 111489: 89 d8 mov %ebx,%eax <== NOT EXECUTED 11148b: 83 c3 0c add $0xc,%ebx <== NOT EXECUTED 11148e: eb 0c jmp 11149c <== NOT EXECUTED 111490: 31 c0 xor %eax,%eax 111492: eb 08 jmp 11149c <== ALWAYS TAKEN for ( ; ap->name; ap++) if (ap->local_value == local_value) 111494: 39 73 04 cmp %esi,0x4(%ebx) 111497: 74 0a je 1114a3 const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) default_ap = ap++; for ( ; ap->name; ap++) 111499: 83 c3 0c add $0xc,%ebx 11149c: 83 3b 00 cmpl $0x0,(%ebx) 11149f: 75 f3 jne 111494 1114a1: 89 c3 mov %eax,%ebx if (ap->local_value == local_value) return ap; return default_ap; } 1114a3: 89 d8 mov %ebx,%eax 1114a5: 8d 65 f8 lea -0x8(%ebp),%esp 1114a8: 5b pop %ebx 1114a9: 5e pop %esi 1114aa: c9 leave 1114ab: c3 ret 0011021c : const rtems_assoc_t *rtems_assoc_ptr_by_remote( const rtems_assoc_t *ap, uint32_t remote_value ) { 11021c: 55 push %ebp 11021d: 89 e5 mov %esp,%ebp 11021f: 56 push %esi 110220: 53 push %ebx 110221: 8b 5d 08 mov 0x8(%ebp),%ebx 110224: 8b 75 0c mov 0xc(%ebp),%esi const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) 110227: 8b 03 mov (%ebx),%eax 110229: 85 c0 test %eax,%eax 11022b: 74 1b je 110248 <== ALWAYS TAKEN 11022d: 52 push %edx 11022e: 52 push %edx 11022f: 68 05 ef 11 00 push $0x11ef05 110234: 50 push %eax 110235: e8 76 1d 00 00 call 111fb0 11023a: 83 c4 10 add $0x10,%esp 11023d: 85 c0 test %eax,%eax 11023f: 75 07 jne 110248 <== NEVER TAKEN default_ap = ap++; 110241: 89 d8 mov %ebx,%eax <== NOT EXECUTED 110243: 83 c3 0c add $0xc,%ebx <== NOT EXECUTED 110246: eb 0c jmp 110254 <== NOT EXECUTED 110248: 31 c0 xor %eax,%eax 11024a: eb 08 jmp 110254 <== ALWAYS TAKEN for ( ; ap->name; ap++) if (ap->remote_value == remote_value) 11024c: 39 73 08 cmp %esi,0x8(%ebx) 11024f: 74 0a je 11025b const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) default_ap = ap++; for ( ; ap->name; ap++) 110251: 83 c3 0c add $0xc,%ebx 110254: 83 3b 00 cmpl $0x0,(%ebx) 110257: 75 f3 jne 11024c 110259: 89 c3 mov %eax,%ebx if (ap->remote_value == remote_value) return ap; return default_ap; } 11025b: 89 d8 mov %ebx,%eax 11025d: 8d 65 f8 lea -0x8(%ebp),%esp 110260: 5b pop %ebx 110261: 5e pop %esi 110262: c9 leave 110263: c3 ret 00110dcc : uint32_t rtems_assoc_remote_by_local( const rtems_assoc_t *ap, uint32_t local_value ) { 110dcc: 55 push %ebp <== NOT EXECUTED 110dcd: 89 e5 mov %esp,%ebp <== NOT EXECUTED 110dcf: 83 ec 10 sub $0x10,%esp <== NOT EXECUTED const rtems_assoc_t *nap; nap = rtems_assoc_ptr_by_local(ap, local_value); 110dd2: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED 110dd5: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED 110dd8: e8 87 06 00 00 call 111464 <== NOT EXECUTED 110ddd: 89 c2 mov %eax,%edx <== NOT EXECUTED if (nap) 110ddf: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 110de2: 31 c0 xor %eax,%eax <== NOT EXECUTED 110de4: 85 d2 test %edx,%edx <== NOT EXECUTED 110de6: 74 03 je 110deb <== NOT EXECUTED return nap->remote_value; 110de8: 8b 42 08 mov 0x8(%edx),%eax <== NOT EXECUTED return 0; } 110deb: c9 leave <== NOT EXECUTED 110dec: c3 ret <== NOT EXECUTED 00110638 : rtems_name name, rtems_attribute attribute_set, uint32_t maximum_waiters, rtems_id *id ) { 110638: 55 push %ebp 110639: 89 e5 mov %esp,%ebp 11063b: 57 push %edi 11063c: 56 push %esi 11063d: 53 push %ebx 11063e: 83 ec 2c sub $0x2c,%esp 110641: 8b 75 08 mov 0x8(%ebp),%esi 110644: 8b 7d 0c mov 0xc(%ebp),%edi 110647: 8b 55 10 mov 0x10(%ebp),%edx 11064a: 8b 5d 14 mov 0x14(%ebp),%ebx Barrier_Control *the_barrier; CORE_barrier_Attributes the_attributes; if ( !rtems_is_name_valid( name ) ) 11064d: b8 03 00 00 00 mov $0x3,%eax 110652: 85 f6 test %esi,%esi 110654: 0f 84 8c 00 00 00 je 1106e6 return RTEMS_INVALID_NAME; if ( !id ) 11065a: b0 09 mov $0x9,%al 11065c: 85 db test %ebx,%ebx 11065e: 0f 84 82 00 00 00 je 1106e6 return RTEMS_INVALID_ADDRESS; /* Initialize core barrier attributes */ if ( _Attributes_Is_barrier_automatic( attribute_set ) ) { 110664: f7 c7 10 00 00 00 test $0x10,%edi 11066a: 74 0f je 11067b the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE; if ( maximum_waiters == 0 ) 11066c: b0 0a mov $0xa,%al 11066e: 85 d2 test %edx,%edx 110670: 74 74 je 1106e6 if ( !id ) return RTEMS_INVALID_ADDRESS; /* Initialize core barrier attributes */ if ( _Attributes_Is_barrier_automatic( attribute_set ) ) { the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE; 110672: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) 110679: eb 07 jmp 110682 <== ALWAYS TAKEN if ( maximum_waiters == 0 ) return RTEMS_INVALID_NUMBER; } else the_attributes.discipline = CORE_BARRIER_MANUAL_RELEASE; 11067b: c7 45 e0 01 00 00 00 movl $0x1,-0x20(%ebp) the_attributes.maximum_count = maximum_waiters; 110682: 89 55 e4 mov %edx,-0x1c(%ebp) 110685: a1 ec 41 12 00 mov 0x1241ec,%eax 11068a: 40 inc %eax 11068b: a3 ec 41 12 00 mov %eax,0x1241ec * 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 ); 110690: 83 ec 0c sub $0xc,%esp 110693: 68 78 4b 12 00 push $0x124b78 110698: e8 4f a9 ff ff call 10afec <_Objects_Allocate> _Thread_Disable_dispatch(); /* prevents deletion */ the_barrier = _Barrier_Allocate(); if ( !the_barrier ) { 11069d: 83 c4 10 add $0x10,%esp 1106a0: 85 c0 test %eax,%eax 1106a2: 75 0c jne 1106b0 _Thread_Enable_dispatch(); 1106a4: e8 48 b5 ff ff call 10bbf1 <_Thread_Enable_dispatch> 1106a9: b8 05 00 00 00 mov $0x5,%eax return RTEMS_TOO_MANY; 1106ae: eb 36 jmp 1106e6 <== ALWAYS TAKEN } the_barrier->attribute_set = attribute_set; 1106b0: 89 78 10 mov %edi,0x10(%eax) _CORE_barrier_Initialize( &the_barrier->Barrier, &the_attributes ); 1106b3: 52 push %edx 1106b4: 52 push %edx 1106b5: 8d 55 e0 lea -0x20(%ebp),%edx 1106b8: 52 push %edx 1106b9: 8d 50 14 lea 0x14(%eax),%edx 1106bc: 52 push %edx 1106bd: 89 45 d4 mov %eax,-0x2c(%ebp) 1106c0: e8 4b 03 00 00 call 110a10 <_CORE_barrier_Initialize> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 1106c5: 8b 45 d4 mov -0x2c(%ebp),%eax 1106c8: 8b 50 08 mov 0x8(%eax),%edx 1106cb: 0f b7 fa movzwl %dx,%edi 1106ce: 8b 0d 94 4b 12 00 mov 0x124b94,%ecx 1106d4: 89 04 b9 mov %eax,(%ecx,%edi,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 1106d7: 89 70 0c mov %esi,0xc(%eax) &_Barrier_Information, &the_barrier->Object, (Objects_Name) name ); *id = the_barrier->Object.id; 1106da: 89 13 mov %edx,(%ebx) _Thread_Enable_dispatch(); 1106dc: e8 10 b5 ff ff call 10bbf1 <_Thread_Enable_dispatch> 1106e1: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 1106e3: 83 c4 10 add $0x10,%esp } 1106e6: 8d 65 f4 lea -0xc(%ebp),%esp 1106e9: 5b pop %ebx 1106ea: 5e pop %esi 1106eb: 5f pop %edi 1106ec: c9 leave 1106ed: 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 e4 4e 12 00 mov 0x124ee4,%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 29 b9 00 00 call 112ae4 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 04 32 12 00 imul 0x123204,%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 d0 ef 12 00 mov 0x12efd0,%eax 10a91a: 40 inc %eax 10a91b: a3 d0 ef 12 00 mov %eax,0x12efd0 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 a1 16 00 00 call 10bfcc <_TOD_Set> _Thread_Enable_dispatch(); 10a92b: e8 2d 28 00 00 call 10d15d <_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 2a 47 00 00 call 10bf3c <_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 70 f5 12 00 push $0x12f570 10781f: e8 e4 66 00 00 call 10df08 <_Timespec_Subtract> } } } #endif (*print)( 107824: 5e pop %esi 107825: 5f pop %edi 107826: 68 bd 07 12 00 push $0x1207bd 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 a4 ef 12 00 mov 0x12efa4(,%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 2f 09 12 00 push $0x12092f 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 8c f0 12 00 mov 0x12f08c,%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 94 f0 12 00 push $0x12f094 1078cb: 89 45 a0 mov %eax,-0x60(%ebp) 1078ce: e8 35 66 00 00 call 10df08 <_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 2a 65 00 00 call 10de0c <_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 42 65 00 00 call 10de3c <_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 42 09 12 00 push $0x120942 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 5a 09 12 00 push $0x12095a 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 00110da0 : { 0, 0, 0 }, }; int rtems_deviceio_errno(rtems_status_code code) { 110da0: 55 push %ebp <== NOT EXECUTED 110da1: 89 e5 mov %esp,%ebp <== NOT EXECUTED 110da3: 53 push %ebx <== NOT EXECUTED 110da4: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED int rc; if ((rc = rtems_assoc_remote_by_local(errno_assoc, (uint32_t ) code))) 110da7: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED 110daa: 68 90 ef 11 00 push $0x11ef90 <== NOT EXECUTED 110daf: e8 18 00 00 00 call 110dcc <== NOT EXECUTED 110db4: 89 c3 mov %eax,%ebx <== NOT EXECUTED 110db6: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 110db9: 85 c0 test %eax,%eax <== NOT EXECUTED 110dbb: 74 07 je 110dc4 <== NOT EXECUTED { errno = rc; 110dbd: e8 02 07 00 00 call 1114c4 <__errno> <== NOT EXECUTED 110dc2: 89 18 mov %ebx,(%eax) <== NOT EXECUTED return -1; } return -1; } 110dc4: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 110dc7: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 110dca: c9 leave <== NOT EXECUTED 110dcb: 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 a8 42 12 00 mov 0x1242a8,%eax 10997a: 8b 80 f4 00 00 00 mov 0xf4(%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 ec 41 12 00 mov 0x1241ec,%eax 109991: 40 inc %eax 109992: a3 ec 41 12 00 mov %eax,0x1241ec } _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 48 22 00 00 call 10bbf1 <_Thread_Enable_dispatch> return( _Thread_Executing->Wait.return_code ); 1099a9: a1 a8 42 12 00 mov 0x1242a8,%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 41 21 00 00 call 10bc14 <_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 f4 00 00 00 mov 0xf4(%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 f0 20 00 00 call 10bbf1 <_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 0010d9c4 : rtems_status_code rtems_extension_create( rtems_name name, const rtems_extensions_table *extension_table, rtems_id *id ) { 10d9c4: 55 push %ebp 10d9c5: 89 e5 mov %esp,%ebp 10d9c7: 57 push %edi 10d9c8: 56 push %esi 10d9c9: 53 push %ebx 10d9ca: 83 ec 0c sub $0xc,%esp 10d9cd: 8b 75 0c mov 0xc(%ebp),%esi Extension_Control *the_extension; if ( !id ) 10d9d0: b8 09 00 00 00 mov $0x9,%eax 10d9d5: 83 7d 10 00 cmpl $0x0,0x10(%ebp) 10d9d9: 74 6f je 10da4a return RTEMS_INVALID_ADDRESS; if ( !rtems_is_name_valid( name ) ) 10d9db: b0 03 mov $0x3,%al 10d9dd: 83 7d 08 00 cmpl $0x0,0x8(%ebp) 10d9e1: 74 67 je 10da4a rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10d9e3: a1 d0 fa 12 00 mov 0x12fad0,%eax 10d9e8: 40 inc %eax 10d9e9: a3 d0 fa 12 00 mov %eax,0x12fad0 #ifndef __EXTENSION_MANAGER_inl #define __EXTENSION_MANAGER_inl RTEMS_INLINE_ROUTINE Extension_Control *_Extension_Allocate( void ) { return (Extension_Control *) _Objects_Allocate( &_Extension_Information ); 10d9ee: 83 ec 0c sub $0xc,%esp 10d9f1: 68 f8 fc 12 00 push $0x12fcf8 10d9f6: e8 e1 0b 00 00 call 10e5dc <_Objects_Allocate> 10d9fb: 89 c3 mov %eax,%ebx _Thread_Disable_dispatch(); /* to prevent deletion */ the_extension = _Extension_Allocate(); if ( !the_extension ) { 10d9fd: 83 c4 10 add $0x10,%esp 10da00: 85 c0 test %eax,%eax 10da02: 75 0c jne 10da10 _Thread_Enable_dispatch(); 10da04: e8 4c 18 00 00 call 10f255 <_Thread_Enable_dispatch> 10da09: b8 05 00 00 00 mov $0x5,%eax return RTEMS_TOO_MANY; 10da0e: eb 3a jmp 10da4a <== 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; 10da10: 8d 78 24 lea 0x24(%eax),%edi 10da13: b9 08 00 00 00 mov $0x8,%ecx 10da18: f3 a5 rep movsl %ds:(%esi),%es:(%edi) _User_extensions_Add_set( extension ); 10da1a: 83 ec 0c sub $0xc,%esp 10da1d: 8d 40 10 lea 0x10(%eax),%eax 10da20: 50 push %eax 10da21: e8 ea 23 00 00 call 10fe10 <_User_extensions_Add_set> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10da26: 8b 43 08 mov 0x8(%ebx),%eax 10da29: 0f b7 c8 movzwl %ax,%ecx 10da2c: 8b 15 14 fd 12 00 mov 0x12fd14,%edx 10da32: 89 1c 8a mov %ebx,(%edx,%ecx,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 10da35: 8b 55 08 mov 0x8(%ebp),%edx 10da38: 89 53 0c mov %edx,0xc(%ebx) &_Extension_Information, &the_extension->Object, (Objects_Name) name ); *id = the_extension->Object.id; 10da3b: 8b 55 10 mov 0x10(%ebp),%edx 10da3e: 89 02 mov %eax,(%edx) _Thread_Enable_dispatch(); 10da40: e8 10 18 00 00 call 10f255 <_Thread_Enable_dispatch> 10da45: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 10da47: 83 c4 10 add $0x10,%esp } 10da4a: 8d 65 f4 lea -0xc(%ebp),%esp 10da4d: 5b pop %ebx 10da4e: 5e pop %esi 10da4f: 5f pop %edi 10da50: c9 leave 10da51: c3 ret 0010a4ec : */ void rtems_fatal_error_occurred( uint32_t the_error ) { 10a4ec: 55 push %ebp 10a4ed: 89 e5 mov %esp,%ebp 10a4ef: 83 ec 0c sub $0xc,%esp _Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, FALSE, the_error ); 10a4f2: ff 75 08 pushl 0x8(%ebp) 10a4f5: 6a 00 push $0x0 10a4f7: 6a 01 push $0x1 10a4f9: e8 56 0a 00 00 call 10af54 <_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 15 a4 00 00 call 1114c4 <__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 04 a4 00 00 call 1114c4 <__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 40 1f 12 00 mov 0x121f40,%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 40 1f 12 00 mov 0x121f40,%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 d5 a4 00 00 call 1114c4 <__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 c4 a4 00 00 call 1114c4 <__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 5d a4 00 00 call 1114c4 <__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 40 1f 12 00 mov 0x121f40,%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 68 d0 11 00 00 cmpl $0x0,0x11d068 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 4c 01 12 00 mov 0x12014c,%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 14 36 00 00 call 10a4ec <== NOT EXECUTED rtems_filesystem_link_counts = 0; 106ed8: 8b 3d 40 1f 12 00 mov 0x121f40,%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 d7 e6 11 00 push $0x11e6d7 106f06: e8 7d 01 00 00 call 107088 <== ALWAYS TAKEN rtems_filesystem_root = loc; 106f0b: 8b 3d 40 1f 12 00 mov 0x121f40,%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 d7 e6 11 00 push $0x11e6d7 106f2c: e8 57 01 00 00 call 107088 <== ALWAYS TAKEN rtems_filesystem_current = loc; 106f31: 8b 3d 40 1f 12 00 mov 0x121f40,%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 d9 e6 11 00 push $0x11e6d9 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 84 43 12 00 00 movl $0x0,0x124384 10a425: 00 00 00 #endif /* * Initialize any target architecture specific support as early as possible */ _CPU_Initialize(); 10a428: e8 e3 29 00 00 call 10ce10 <_CPU_Initialize> /* * Do this as early as possible to ensure no debugging output * is even attempted to be printed. */ _Debug_Manager_initialization(); 10a42d: e8 06 47 00 00 call 10eb38 <_Debug_Manager_initialization> <== ALWAYS TAKEN _API_extensions_Initialization(); 10a432: e8 01 02 00 00 call 10a638 <_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 ec 41 12 00 01 movl $0x1,0x1241ec 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 ac 27 00 00 call 10cbf2 <_Workspace_Handler_initialization> _User_extensions_Handler_initialization(); 10a446: e8 35 23 00 00 call 10c780 <_User_extensions_Handler_initialization> _ISR_Handler_initialization(); 10a44b: e8 44 0b 00 00 call 10af94 <_ISR_Handler_initialization> <== ALWAYS TAKEN /* * Initialize the internal support API and allocator Mutex */ _Objects_Information_table[OBJECTS_INTERNAL_API] = _Internal_Objects; 10a450: c7 05 c4 41 12 00 04 movl $0x124204,0x1241c4 10a457: 42 12 00 _API_Mutex_Initialization( 1 ); 10a45a: 83 ec 0c sub $0xc,%esp 10a45d: 6a 01 push $0x1 10a45f: e8 d8 02 00 00 call 10a73c <_API_Mutex_Initialization> <== ALWAYS TAKEN _API_Mutex_Allocate( &_RTEMS_Allocator_Mutex ); 10a464: c7 04 24 a0 42 12 00 movl $0x1242a0,(%esp) 10a46b: e8 50 02 00 00 call 10a6c0 <_API_Mutex_Allocate> <== ALWAYS TAKEN RTEMS_INLINE_ROUTINE void _Priority_Handler_initialization( void ) { int index; _Priority_Major_bit_map = 0; 10a470: 66 c7 05 9c 42 12 00 movw $0x0,0x12429c 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 14 43 12 movw $0x0,0x124314(%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 d5 25 00 00 call 10ca68 <_Watchdog_Handler_initialization> _TOD_Handler_initialization(); 10a493: e8 28 07 00 00 call 10abc0 <_TOD_Handler_initialization> <== ALWAYS TAKEN _Thread_Handler_initialization(); 10a498: e8 13 1a 00 00 call 10beb0 <_Thread_Handler_initialization> _MPCI_Handler_initialization( RTEMS_TIMEOUT ); #endif /* MANAGERS */ _RTEMS_API_Initialize(); 10a49d: e8 4e 01 00 00 call 10a5f0 <_RTEMS_API_Initialize> <== ALWAYS TAKEN _Extension_Manager_initialization(); 10a4a2: e8 1d 00 00 00 call 10a4c4 <_Extension_Manager_initialization> <== ALWAYS TAKEN _IO_Manager_initialization(); 10a4a7: e8 7b 00 00 00 call 10a527 <_IO_Manager_initialization> <== ALWAYS TAKEN #ifdef RTEMS_POSIX_API _POSIX_API_Initialize(); 10a4ac: e8 f7 00 00 00 call 10a5a8 <_POSIX_API_Initialize> <== ALWAYS TAKEN 10a4b1: c7 05 84 43 12 00 01 movl $0x1,0x124384 10a4b8: 00 00 00 _Thread_Create_idle(); /* * Scheduling can properly occur now as long as we avoid dispatching. */ } 10a4bb: 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(); 10a4bc: e9 1f 15 00 00 jmp 10b9e0 <_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 ee 00 00 00 call 10a500 <_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 43 02 00 00 jmp 10a65b <_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 3d a7 00 00 call 1114c4 <__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 0010ba20 : 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 ) { 10ba20: 55 push %ebp 10ba21: 89 e5 mov %esp,%ebp 10ba23: 57 push %edi 10ba24: 56 push %esi 10ba25: 53 push %ebx 10ba26: 83 ec 0c sub $0xc,%esp 10ba29: 8b 5d 08 mov 0x8(%ebp),%ebx 10ba2c: 8b 75 0c mov 0xc(%ebp),%esi 10ba2f: 8b 55 10 mov 0x10(%ebp),%edx rtems_device_major_number major_limit = _IO_Number_of_drivers; 10ba32: 8b 0d 48 9c 12 00 mov 0x129c48,%ecx if ( rtems_interrupt_is_in_progress() ) 10ba38: 8b 3d 44 93 12 00 mov 0x129344,%edi 10ba3e: b8 12 00 00 00 mov $0x12,%eax 10ba43: 85 ff test %edi,%edi 10ba45: 0f 85 cc 00 00 00 jne 10bb17 return RTEMS_CALLED_FROM_ISR; if ( registered_major == NULL ) 10ba4b: 85 d2 test %edx,%edx 10ba4d: 0f 84 bf 00 00 00 je 10bb12 return RTEMS_INVALID_ADDRESS; /* Set it to an invalid value */ *registered_major = major_limit; 10ba53: 89 0a mov %ecx,(%edx) if ( driver_table == NULL ) 10ba55: 85 f6 test %esi,%esi 10ba57: 0f 84 b5 00 00 00 je 10bb12 static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 10ba5d: 83 3e 00 cmpl $0x0,(%esi) 10ba60: 0f 85 b9 00 00 00 jne 10bb1f 10ba66: 83 7e 04 00 cmpl $0x0,0x4(%esi) 10ba6a: 0f 85 af 00 00 00 jne 10bb1f 10ba70: e9 9d 00 00 00 jmp 10bb12 <== ALWAYS TAKEN rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10ba75: a1 ac 92 12 00 mov 0x1292ac,%eax 10ba7a: 40 inc %eax 10ba7b: a3 ac 92 12 00 mov %eax,0x1292ac if ( major >= major_limit ) return RTEMS_INVALID_NUMBER; _Thread_Disable_dispatch(); if ( major == 0 ) { 10ba80: 85 db test %ebx,%ebx 10ba82: 75 31 jne 10bab5 static rtems_status_code rtems_io_obtain_major_number( rtems_device_major_number *major ) { rtems_device_major_number n = _IO_Number_of_drivers; 10ba84: 8b 0d 48 9c 12 00 mov 0x129c48,%ecx 10ba8a: a1 4c 9c 12 00 mov 0x129c4c,%eax 10ba8f: eb 15 jmp 10baa6 <== 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; 10ba91: 83 38 00 cmpl $0x0,(%eax) 10ba94: 0f 85 94 00 00 00 jne 10bb2e 10ba9a: 83 78 04 00 cmpl $0x0,0x4(%eax) 10ba9e: 0f 85 8a 00 00 00 jne 10bb2e 10baa4: eb 04 jmp 10baaa <== 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 ) { 10baa6: 39 cb cmp %ecx,%ebx 10baa8: 72 e7 jb 10ba91 if ( rtems_io_is_empty_table( table ) ) break; } /* Assigns invalid value in case of failure */ *major = m; 10baaa: 89 1a mov %ebx,(%edx) if ( m != n ) 10baac: 39 cb cmp %ecx,%ebx 10baae: 75 30 jne 10bae0 10bab0: e9 82 00 00 00 jmp 10bb37 <== ALWAYS TAKEN _Thread_Enable_dispatch(); return sc; } major = *registered_major; } else { rtems_driver_address_table *const table = _IO_Driver_address_table + major; 10bab5: 6b c3 18 imul $0x18,%ebx,%eax 10bab8: 03 05 4c 9c 12 00 add 0x129c4c,%eax static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 10babe: 31 c9 xor %ecx,%ecx 10bac0: 83 38 00 cmpl $0x0,(%eax) 10bac3: 75 09 jne 10bace 10bac5: 31 c9 xor %ecx,%ecx 10bac7: 83 78 04 00 cmpl $0x0,0x4(%eax) 10bacb: 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 ) ) { 10bace: 85 c9 test %ecx,%ecx 10bad0: 75 0c jne 10bade _Thread_Enable_dispatch(); 10bad2: e8 fa 17 00 00 call 10d2d1 <_Thread_Enable_dispatch> 10bad7: b8 0c 00 00 00 mov $0xc,%eax return RTEMS_RESOURCE_IN_USE; 10badc: eb 39 jmp 10bb17 <== ALWAYS TAKEN } *registered_major = major; 10bade: 89 1a mov %ebx,(%edx) } _IO_Driver_address_table [major] = *driver_table; 10bae0: 6b fb 18 imul $0x18,%ebx,%edi 10bae3: 03 3d 4c 9c 12 00 add 0x129c4c,%edi 10bae9: b9 06 00 00 00 mov $0x6,%ecx 10baee: f3 a5 rep movsl %ds:(%esi),%es:(%edi) _Thread_Enable_dispatch(); 10baf0: e8 dc 17 00 00 call 10d2d1 <_Thread_Enable_dispatch> return rtems_io_initialize( major, 0, NULL ); 10baf5: c7 45 10 00 00 00 00 movl $0x0,0x10(%ebp) 10bafc: c7 45 0c 00 00 00 00 movl $0x0,0xc(%ebp) 10bb03: 89 5d 08 mov %ebx,0x8(%ebp) } 10bb06: 83 c4 0c add $0xc,%esp 10bb09: 5b pop %ebx 10bb0a: 5e pop %esi 10bb0b: 5f pop %edi 10bb0c: c9 leave _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); 10bb0d: e9 de 76 00 00 jmp 1131f0 <== ALWAYS TAKEN 10bb12: b8 09 00 00 00 mov $0x9,%eax } 10bb17: 83 c4 0c add $0xc,%esp 10bb1a: 5b pop %ebx 10bb1b: 5e pop %esi 10bb1c: 5f pop %edi 10bb1d: c9 leave 10bb1e: c3 ret return RTEMS_INVALID_ADDRESS; if ( rtems_io_is_empty_table( driver_table ) ) return RTEMS_INVALID_ADDRESS; if ( major >= major_limit ) 10bb1f: b8 0a 00 00 00 mov $0xa,%eax 10bb24: 39 cb cmp %ecx,%ebx 10bb26: 0f 82 49 ff ff ff jb 10ba75 10bb2c: eb e9 jmp 10bb17 <== 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 ) { 10bb2e: 43 inc %ebx 10bb2f: 83 c0 18 add $0x18,%eax 10bb32: e9 6f ff ff ff jmp 10baa6 <== ALWAYS TAKEN if ( major == 0 ) { rtems_status_code sc = rtems_io_obtain_major_number( registered_major ); if ( sc != RTEMS_SUCCESSFUL ) { _Thread_Enable_dispatch(); 10bb37: e8 95 17 00 00 call 10d2d1 <_Thread_Enable_dispatch> 10bb3c: b8 05 00 00 00 mov $0x5,%eax return sc; 10bb41: eb d4 jmp 10bb17 <== 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 0010c420 : #include #include void rtems_iterate_over_all_threads(rtems_per_thread_routine routine) { 10c420: 55 push %ebp 10c421: 89 e5 mov %esp,%ebp 10c423: 57 push %edi 10c424: 56 push %esi 10c425: 53 push %ebx 10c426: 83 ec 0c sub $0xc,%esp uint32_t i; uint32_t api_index; Thread_Control *the_thread; Objects_Information *information; if ( !routine ) 10c429: 83 7d 08 00 cmpl $0x0,0x8(%ebp) 10c42d: 74 41 je 10c470 <== ALWAYS TAKEN 10c42f: 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 ] ) 10c434: 8b 04 9d a4 ef 12 00 mov 0x12efa4(,%ebx,4),%eax 10c43b: 85 c0 test %eax,%eax 10c43d: 74 2b je 10c46a continue; information = _Objects_Information_table[ api_index ][ 1 ]; 10c43f: 8b 78 04 mov 0x4(%eax),%edi if ( !information ) 10c442: be 01 00 00 00 mov $0x1,%esi 10c447: 85 ff test %edi,%edi 10c449: 75 17 jne 10c462 10c44b: eb 1d jmp 10c46a <== ALWAYS TAKEN continue; for ( i=1 ; i <= information->maximum ; i++ ) { the_thread = (Thread_Control *)information->local_table[ i ]; 10c44d: 8b 47 1c mov 0x1c(%edi),%eax 10c450: 8b 04 b0 mov (%eax,%esi,4),%eax if ( !the_thread ) 10c453: 85 c0 test %eax,%eax 10c455: 74 0a je 10c461 <== ALWAYS TAKEN continue; (*routine)(the_thread); 10c457: 83 ec 0c sub $0xc,%esp 10c45a: 50 push %eax 10c45b: ff 55 08 call *0x8(%ebp) 10c45e: 83 c4 10 add $0x10,%esp information = _Objects_Information_table[ api_index ][ 1 ]; if ( !information ) continue; for ( i=1 ; i <= information->maximum ; i++ ) { 10c461: 46 inc %esi 10c462: 0f b7 47 10 movzwl 0x10(%edi),%eax 10c466: 39 c6 cmp %eax,%esi 10c468: 76 e3 jbe 10c44d Objects_Information *information; if ( !routine ) return; for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { 10c46a: 43 inc %ebx 10c46b: 83 fb 05 cmp $0x5,%ebx 10c46e: 75 c4 jne 10c434 (*routine)(the_thread); } } } 10c470: 8d 65 f4 lea -0xc(%ebp),%esp 10c473: 5b pop %ebx 10c474: 5e pop %esi 10c475: 5f pop %edi 10c476: c9 leave 10c477: c3 ret 0010df2b : * 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 ) { 10df2b: 55 push %ebp 10df2c: 89 e5 mov %esp,%ebp 10df2e: 57 push %edi 10df2f: 53 push %ebx 10df30: 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 ); 10df33: 6a 00 push $0x0 10df35: 6a 00 push $0x0 10df37: ff 35 98 40 12 00 pushl 0x124098 10df3d: e8 ea bf ff ff call 109f2c if (rtems_libio_iop_freelist) { 10df42: a1 94 40 12 00 mov 0x124094,%eax 10df47: 83 c4 10 add $0x10,%esp 10df4a: 85 c0 test %eax,%eax 10df4c: 74 4f je 10df9d rc = rtems_semaphore_create( 10df4e: 83 ec 0c sub $0xc,%esp 10df51: 8d 55 f4 lea -0xc(%ebp),%edx 10df54: 52 push %edx 10df55: 6a 00 push $0x0 10df57: 6a 54 push $0x54 10df59: 6a 01 push $0x1 10df5b: 2b 05 90 40 12 00 sub 0x124090,%eax 10df61: c1 f8 06 sar $0x6,%eax 10df64: 0d 00 49 42 4c or $0x4c424900,%eax 10df69: 50 push %eax 10df6a: e8 91 bd ff ff call 109d00 1, RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &sema ); if (rc != RTEMS_SUCCESSFUL) 10df6f: 83 c4 20 add $0x20,%esp 10df72: 85 c0 test %eax,%eax 10df74: 75 27 jne 10df9d <== ALWAYS TAKEN goto failed; iop = rtems_libio_iop_freelist; 10df76: 8b 1d 94 40 12 00 mov 0x124094,%ebx next = iop->data1; 10df7c: 8b 53 34 mov 0x34(%ebx),%edx (void) memset( iop, 0, sizeof(rtems_libio_t) ); 10df7f: b9 10 00 00 00 mov $0x10,%ecx 10df84: 89 df mov %ebx,%edi 10df86: f3 ab rep stos %eax,%es:(%edi) iop->flags = LIBIO_FLAGS_OPEN; 10df88: c7 43 14 00 01 00 00 movl $0x100,0x14(%ebx) iop->sem = sema; 10df8f: 8b 45 f4 mov -0xc(%ebp),%eax 10df92: 89 43 2c mov %eax,0x2c(%ebx) rtems_libio_iop_freelist = next; 10df95: 89 15 94 40 12 00 mov %edx,0x124094 goto done; 10df9b: eb 02 jmp 10df9f <== ALWAYS TAKEN 10df9d: 31 db xor %ebx,%ebx failed: iop = 0; done: rtems_semaphore_release( rtems_libio_semaphore ); 10df9f: 83 ec 0c sub $0xc,%esp 10dfa2: ff 35 98 40 12 00 pushl 0x124098 10dfa8: e8 6b c0 ff ff call 10a018 return iop; } 10dfad: 89 d8 mov %ebx,%eax 10dfaf: 8d 65 f8 lea -0x8(%ebp),%esp 10dfb2: 5b pop %ebx 10dfb3: 5f pop %edi 10dfb4: c9 leave 10dfb5: c3 ret 0010ded6 : */ void rtems_libio_free( rtems_libio_t *iop ) { 10ded6: 55 push %ebp 10ded7: 89 e5 mov %esp,%ebp 10ded9: 53 push %ebx 10deda: 83 ec 08 sub $0x8,%esp 10dedd: 8b 5d 08 mov 0x8(%ebp),%ebx rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT ); 10dee0: 6a 00 push $0x0 10dee2: 6a 00 push $0x0 10dee4: ff 35 98 40 12 00 pushl 0x124098 10deea: e8 3d c0 ff ff call 109f2c if (iop->sem) 10deef: 8b 43 2c mov 0x2c(%ebx),%eax 10def2: 83 c4 10 add $0x10,%esp 10def5: 85 c0 test %eax,%eax 10def7: 74 0c je 10df05 <== ALWAYS TAKEN rtems_semaphore_delete(iop->sem); 10def9: 83 ec 0c sub $0xc,%esp 10defc: 50 push %eax 10defd: e8 9a bf ff ff call 109e9c 10df02: 83 c4 10 add $0x10,%esp iop->flags &= ~LIBIO_FLAGS_OPEN; 10df05: 81 63 14 ff fe ff ff andl $0xfffffeff,0x14(%ebx) iop->data1 = rtems_libio_iop_freelist; 10df0c: a1 94 40 12 00 mov 0x124094,%eax 10df11: 89 43 34 mov %eax,0x34(%ebx) rtems_libio_iop_freelist = iop; 10df14: 89 1d 94 40 12 00 mov %ebx,0x124094 rtems_semaphore_release(rtems_libio_semaphore); 10df1a: a1 98 40 12 00 mov 0x124098,%eax 10df1f: 89 45 08 mov %eax,0x8(%ebp) } 10df22: 8b 5d fc mov -0x4(%ebp),%ebx 10df25: c9 leave iop->flags &= ~LIBIO_FLAGS_OPEN; iop->data1 = rtems_libio_iop_freelist; rtems_libio_iop_freelist = iop; rtems_semaphore_release(rtems_libio_semaphore); 10df26: e9 ed c0 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 44 01 12 00 mov 0x120144,%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 1a 6a 00 00 call 10dbdc <== ALWAYS TAKEN 1071c2: a3 90 40 12 00 mov %eax,0x124090 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 94 40 12 00 mov %eax,0x124094 for (i = 0 ; (i + 1) < rtems_libio_number_iops ; i++, iop++) 1071da: 8b 1d 44 01 12 00 mov 0x120144,%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 98 40 12 00 push $0x124098 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 cc 32 00 00 call 10a4ec <== NOT EXECUTED /* * Initialize the base file system infrastructure. */ if (rtems_fs_init_helper) 107220: a1 40 01 12 00 mov 0x120140,%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 0010de1e : */ int rtems_libio_is_file_open( void *node_access ) { 10de1e: 55 push %ebp 10de1f: 89 e5 mov %esp,%ebp 10de21: 53 push %ebx 10de22: 83 ec 08 sub $0x8,%esp 10de25: 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 ); 10de28: 6a 00 push $0x0 10de2a: 6a 00 push $0x0 10de2c: ff 35 98 40 12 00 pushl 0x124098 10de32: e8 f5 c0 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++){ 10de37: a1 90 40 12 00 mov 0x124090,%eax 10de3c: 8b 0d 44 01 12 00 mov 0x120144,%ecx 10de42: 31 d2 xor %edx,%edx 10de44: 83 c4 10 add $0x10,%esp 10de47: eb 16 jmp 10de5f <== ALWAYS TAKEN if ((iop->flags & LIBIO_FLAGS_OPEN) != 0) { 10de49: f6 40 15 01 testb $0x1,0x15(%eax) 10de4d: 74 0c je 10de5b /* * Check if this node is under the file system that we * are trying to dismount. */ if ( iop->pathinfo.node_access == node_access ) { 10de4f: 39 58 18 cmp %ebx,0x18(%eax) 10de52: 75 07 jne 10de5b 10de54: bb 01 00 00 00 mov $0x1,%ebx 10de59: eb 0a jmp 10de65 <== ALWAYS TAKEN /* * Look for any active file descriptor entry. */ for (iop=rtems_libio_iops,i=0; i < rtems_libio_number_iops; iop++, i++){ 10de5b: 83 c0 40 add $0x40,%eax 10de5e: 42 inc %edx 10de5f: 39 ca cmp %ecx,%edx 10de61: 72 e6 jb 10de49 10de63: 31 db xor %ebx,%ebx break; } } } rtems_semaphore_release( rtems_libio_semaphore ); 10de65: 83 ec 0c sub $0xc,%esp 10de68: ff 35 98 40 12 00 pushl 0x124098 10de6e: e8 a5 c1 ff ff call 10a018 return result; } 10de73: 89 d8 mov %ebx,%eax 10de75: 8b 5d fc mov -0x4(%ebp),%ebx 10de78: c9 leave 10de79: c3 ret 0010de7a : */ int rtems_libio_is_open_files_in_fs( rtems_filesystem_mount_table_entry_t * fs_mt_entry ) { 10de7a: 55 push %ebp 10de7b: 89 e5 mov %esp,%ebp 10de7d: 53 push %ebx 10de7e: 83 ec 08 sub $0x8,%esp 10de81: 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 ); 10de84: 6a 00 push $0x0 10de86: 6a 00 push $0x0 10de88: ff 35 98 40 12 00 pushl 0x124098 10de8e: e8 99 c0 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++){ 10de93: a1 90 40 12 00 mov 0x124090,%eax 10de98: 8b 0d 44 01 12 00 mov 0x120144,%ecx 10de9e: 31 d2 xor %edx,%edx 10dea0: 83 c4 10 add $0x10,%esp 10dea3: eb 16 jmp 10debb <== ALWAYS TAKEN if ((iop->flags & LIBIO_FLAGS_OPEN) != 0) { 10dea5: f6 40 15 01 testb $0x1,0x15(%eax) 10dea9: 74 0c je 10deb7 /* * Check if this node is under the file system that we * are trying to dismount. */ if ( iop->pathinfo.mt_entry == fs_mt_entry ) { 10deab: 39 58 28 cmp %ebx,0x28(%eax) 10deae: 75 07 jne 10deb7 10deb0: bb 01 00 00 00 mov $0x1,%ebx 10deb5: eb 0a jmp 10dec1 <== ALWAYS TAKEN /* * Look for any active file descriptor entry. */ for (iop=rtems_libio_iops,i=0; i < rtems_libio_number_iops; iop++, i++){ 10deb7: 83 c0 40 add $0x40,%eax 10deba: 42 inc %edx 10debb: 39 ca cmp %ecx,%edx 10debd: 72 e6 jb 10dea5 10debf: 31 db xor %ebx,%ebx break; } } } rtems_semaphore_release( rtems_libio_semaphore ); 10dec1: 83 ec 0c sub $0xc,%esp 10dec4: ff 35 98 40 12 00 pushl 0x124098 10deca: e8 49 c1 ff ff call 10a018 return result; } 10decf: 89 d8 mov %ebx,%eax 10ded1: 8b 5d fc mov -0x4(%ebp),%ebx 10ded4: c9 leave 10ded5: c3 ret 00126758 : rtems_filesystem_freenode( &env->root_directory); free(env); } } rtems_status_code rtems_libio_set_private_env(void) { 126758: 55 push %ebp 126759: 89 e5 mov %esp,%ebp 12675b: 57 push %edi 12675c: 56 push %esi 12675d: 53 push %ebx 12675e: 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); 126761: 8d 45 e4 lea -0x1c(%ebp),%eax 126764: 50 push %eax 126765: 6a 00 push $0x0 126767: 6a 00 push $0x0 126769: e8 b6 14 00 00 call 127c24 12676e: 89 45 c4 mov %eax,-0x3c(%ebp) if (sc != RTEMS_SUCCESSFUL) return sc; 126771: 83 c4 10 add $0x10,%esp 126774: 85 c0 test %eax,%eax 126776: 0f 85 da 00 00 00 jne 126856 <== ALWAYS TAKEN /* Only for the first time a malloc is necesary */ if (rtems_current_user_env==&rtems_global_user_env) { 12677c: 81 3d 78 e1 15 00 cc cmpl $0x163acc,0x15e178 126783: 3a 16 00 126786: 75 54 jne 1267dc rtems_user_env_t *tmp = malloc(sizeof(rtems_user_env_t)); 126788: 83 ec 0c sub $0xc,%esp 12678b: 6a 48 push $0x48 12678d: e8 1e 55 fe ff call 10bcb0 126792: 89 c3 mov %eax,%ebx if (!tmp) 126794: 83 c4 10 add $0x10,%esp 126797: 85 c0 test %eax,%eax 126799: 75 0c jne 1267a7 <== NEVER TAKEN 12679b: c7 45 c4 1a 00 00 00 movl $0x1a,-0x3c(%ebp) <== NOT EXECUTED 1267a2: e9 af 00 00 00 jmp 126856 <== 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); 1267a7: 56 push %esi 1267a8: 68 6c 66 12 00 push $0x12666c 1267ad: 68 78 e1 15 00 push $0x15e178 1267b2: 6a 00 push $0x0 1267b4: e8 0f 18 00 00 call 127fc8 1267b9: 89 c6 mov %eax,%esi if (sc != RTEMS_SUCCESSFUL) { 1267bb: 83 c4 10 add $0x10,%esp 1267be: 85 c0 test %eax,%eax 1267c0: 74 14 je 1267d6 <== NEVER TAKEN /* don't use free_user_env because the pathlocs are * not initialized yet */ free(tmp); 1267c2: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1267c5: 53 push %ebx <== NOT EXECUTED 1267c6: e8 f9 4f fe ff call 10b7c4 <== NOT EXECUTED 1267cb: 89 75 c4 mov %esi,-0x3c(%ebp) <== NOT EXECUTED return sc; 1267ce: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 1267d1: e9 80 00 00 00 jmp 126856 <== NOT EXECUTED } rtems_current_user_env = tmp; 1267d6: 89 1d 78 e1 15 00 mov %ebx,0x15e178 }; *rtems_current_user_env = rtems_global_user_env; /* get the global values*/ 1267dc: a1 78 e1 15 00 mov 0x15e178,%eax 1267e1: be cc 3a 16 00 mov $0x163acc,%esi 1267e6: b9 12 00 00 00 mov $0x12,%ecx 1267eb: 89 c7 mov %eax,%edi 1267ed: f3 a5 rep movsl %ds:(%esi),%es:(%edi) rtems_current_user_env->task_id=task_id; /* mark the local values*/ 1267ef: 8b 55 e4 mov -0x1c(%ebp),%edx 1267f2: 89 10 mov %edx,(%eax) /* get a clean root */ rtems_filesystem_root = THE_ROOT_FS_LOC; 1267f4: 8d 78 18 lea 0x18(%eax),%edi 1267f7: 8b 35 b4 3a 16 00 mov 0x163ab4,%esi 1267fd: 83 c6 1c add $0x1c,%esi 126800: b1 05 mov $0x5,%cl 126802: 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); 126804: 83 ec 0c sub $0xc,%esp 126807: 6a 00 push $0x0 126809: 8d 5d d0 lea -0x30(%ebp),%ebx 12680c: 53 push %ebx 12680d: 6a 00 push $0x0 12680f: 6a 01 push $0x1 126811: 68 c6 b2 15 00 push $0x15b2c6 126816: e8 01 4f fe ff call 10b71c rtems_filesystem_root = loc; 12681b: 8b 3d 78 e1 15 00 mov 0x15e178,%edi 126821: 83 c7 18 add $0x18,%edi 126824: b9 05 00 00 00 mov $0x5,%ecx 126829: 89 de mov %ebx,%esi 12682b: f3 a5 rep movsl %ds:(%esi),%es:(%edi) rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 12682d: 83 c4 14 add $0x14,%esp 126830: 6a 00 push $0x0 126832: 53 push %ebx 126833: 6a 00 push $0x0 126835: 6a 01 push $0x1 126837: 68 c6 b2 15 00 push $0x15b2c6 12683c: e8 db 4e fe ff call 10b71c rtems_filesystem_current = loc; 126841: 8b 3d 78 e1 15 00 mov 0x15e178,%edi 126847: 83 c7 04 add $0x4,%edi 12684a: b9 05 00 00 00 mov $0x5,%ecx 12684f: 89 de mov %ebx,%esi 126851: f3 a5 rep movsl %ds:(%esi),%es:(%edi) return RTEMS_SUCCESSFUL; 126853: 83 c4 20 add $0x20,%esp } 126856: 8b 45 c4 mov -0x3c(%ebp),%eax 126859: 8d 65 f4 lea -0xc(%ebp),%esp 12685c: 5b pop %ebx 12685d: 5e pop %esi 12685e: 5f pop %edi 12685f: c9 leave 126860: c3 ret 001266c3 : * 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) { 1266c3: 55 push %ebp <== NOT EXECUTED 1266c4: 89 e5 mov %esp,%ebp <== NOT EXECUTED 1266c6: 53 push %ebx <== NOT EXECUTED 1266c7: 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); 1266ca: 8d 45 f0 lea -0x10(%ebp),%eax <== NOT EXECUTED 1266cd: 50 push %eax <== NOT EXECUTED 1266ce: 6a 00 push $0x0 <== NOT EXECUTED 1266d0: 6a 00 push $0x0 <== NOT EXECUTED 1266d2: e8 4d 15 00 00 call 127c24 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) return sc; 1266d7: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 1266da: 85 c0 test %eax,%eax <== NOT EXECUTED 1266dc: 75 75 jne 126753 <== NOT EXECUTED if (rtems_current_user_env->task_id==current_task_id) { 1266de: 8b 1d 78 e1 15 00 mov 0x15e178,%ebx <== NOT EXECUTED 1266e4: 8b 03 mov (%ebx),%eax <== NOT EXECUTED 1266e6: 3b 45 f0 cmp -0x10(%ebp),%eax <== NOT EXECUTED 1266e9: 75 21 jne 12670c <== 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); 1266eb: 51 push %ecx <== NOT EXECUTED 1266ec: 51 push %ecx <== NOT EXECUTED 1266ed: 68 78 e1 15 00 push $0x15e178 <== NOT EXECUTED 1266f2: 6a 00 push $0x0 <== NOT EXECUTED 1266f4: e8 63 19 00 00 call 12805c <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) return sc; 1266f9: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 1266fc: 85 c0 test %eax,%eax <== NOT EXECUTED 1266fe: 75 53 jne 126753 <== NOT EXECUTED free_user_env(tmp); 126700: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 126703: 53 push %ebx <== NOT EXECUTED 126704: e8 63 ff ff ff call 12666c <== NOT EXECUTED 126709: 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, 12670c: 52 push %edx <== NOT EXECUTED 12670d: 8d 45 f4 lea -0xc(%ebp),%eax <== NOT EXECUTED 126710: 50 push %eax <== NOT EXECUTED 126711: 68 78 e1 15 00 push $0x15e178 <== NOT EXECUTED 126716: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED 126719: e8 ba 19 00 00 call 1280d8 <== NOT EXECUTED (void*)&shared_user_env ); if (sc != RTEMS_SUCCESSFUL) 12671e: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 126721: 85 c0 test %eax,%eax <== NOT EXECUTED 126723: 75 24 jne 126749 <== NOT EXECUTED goto bailout; sc = rtems_task_variable_add(RTEMS_SELF,(void*)&rtems_current_user_env,free_user_env); 126725: 50 push %eax <== NOT EXECUTED 126726: 68 6c 66 12 00 push $0x12666c <== NOT EXECUTED 12672b: 68 78 e1 15 00 push $0x15e178 <== NOT EXECUTED 126730: 6a 00 push $0x0 <== NOT EXECUTED 126732: e8 91 18 00 00 call 127fc8 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 126737: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 12673a: 85 c0 test %eax,%eax <== NOT EXECUTED 12673c: 75 0b jne 126749 <== NOT EXECUTED goto bailout; /* the current_user_env is the same pointer that remote env */ rtems_current_user_env = shared_user_env; 12673e: 8b 55 f4 mov -0xc(%ebp),%edx <== NOT EXECUTED 126741: 89 15 78 e1 15 00 mov %edx,0x15e178 <== NOT EXECUTED /* increase the reference count */ #ifdef HAVE_USERENV_REFCNT rtems_current_user_env->refcnt++; #endif return RTEMS_SUCCESSFUL; 126747: eb 0a jmp 126753 <== NOT EXECUTED bailout: /* fallback to the global env */ rtems_current_user_env = &rtems_global_user_env; 126749: c7 05 78 e1 15 00 cc movl $0x163acc,0x15e178 <== NOT EXECUTED 126750: 3a 16 00 <== NOT EXECUTED return sc; } 126753: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 126756: c9 leave <== NOT EXECUTED 126757: c3 ret <== NOT EXECUTED 0010dde0 : */ uint32_t rtems_libio_to_fcntl_flags( uint32_t flags ) { 10dde0: 55 push %ebp 10dde1: 89 e5 mov %esp,%ebp 10dde3: 8b 55 08 mov 0x8(%ebp),%edx uint32_t fcntl_flags = 0; if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) { 10dde6: 89 d1 mov %edx,%ecx 10dde8: 83 e1 06 and $0x6,%ecx 10ddeb: b8 02 00 00 00 mov $0x2,%eax 10ddf0: 83 f9 06 cmp $0x6,%ecx 10ddf3: 74 0f je 10de04 <== ALWAYS TAKEN fcntl_flags |= O_RDWR; } else if ( (flags & LIBIO_FLAGS_READ) == LIBIO_FLAGS_READ) { 10ddf5: 30 c0 xor %al,%al 10ddf7: f6 c2 02 test $0x2,%dl 10ddfa: 75 08 jne 10de04 <== NEVER TAKEN 10ddfc: 89 d0 mov %edx,%eax <== NOT EXECUTED 10ddfe: c1 e8 02 shr $0x2,%eax <== NOT EXECUTED 10de01: 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 ) { 10de04: f6 c2 01 test $0x1,%dl 10de07: 74 03 je 10de0c fcntl_flags |= O_NONBLOCK; 10de09: 80 cc 40 or $0x40,%ah } if ( (flags & LIBIO_FLAGS_APPEND) == LIBIO_FLAGS_APPEND ) { 10de0c: f6 c6 02 test $0x2,%dh 10de0f: 74 03 je 10de14 fcntl_flags |= O_APPEND; 10de11: 83 c8 08 or $0x8,%eax } if ( (flags & LIBIO_FLAGS_CREATE) == LIBIO_FLAGS_CREATE ) { 10de14: 80 e6 04 and $0x4,%dh 10de17: 74 03 je 10de1c fcntl_flags |= O_CREAT; 10de19: 80 cc 02 or $0x2,%ah } return fcntl_flags; } 10de1c: c9 leave 10de1d: 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 c1 15 00 pushl 0x15c150 <== NOT EXECUTED 10bd67: e8 00 53 00 00 call 11106c <_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 ac 3a 16 00 add %eax,0x163aac <== NOT EXECUTED 10bd7e: 11 15 b0 3a 16 00 adc %edx,0x163ab0 <== 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 c1 15 00 pushl 0x15c150 <== NOT EXECUTED 10bda6: e8 c1 52 00 00 call 11106c <_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 a4 3a 16 00 add 0x163aa4,%eax <== NOT EXECUTED 10bdb6: 13 15 a8 3a 16 00 adc 0x163aa8,%edx <== NOT EXECUTED 10bdbc: a3 a4 3a 16 00 mov %eax,0x163aa4 <== NOT EXECUTED 10bdc1: 89 15 a8 3a 16 00 mov %edx,0x163aa8 <== NOT EXECUTED current_depth = (uint32_t) (s->lifetime_allocated - s->lifetime_freed); 10bdc7: 2b 05 ac 3a 16 00 sub 0x163aac,%eax <== NOT EXECUTED if (current_depth > s->max_depth) 10bdcd: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10bdd0: 3b 05 a0 3a 16 00 cmp 0x163aa0,%eax <== NOT EXECUTED 10bdd6: 76 05 jbe 10bddd <== NOT EXECUTED s->max_depth = current_depth; 10bdd8: a3 a0 3a 16 00 mov %eax,0x163aa0 <== 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 88 3a 16 00 mov $0x163a88,%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 00112290 : int rtems_memalign( void **pointer, size_t alignment, size_t size ) { 112290: 55 push %ebp 112291: 89 e5 mov %esp,%ebp 112293: 56 push %esi 112294: 53 push %ebx 112295: 8b 5d 08 mov 0x8(%ebp),%ebx void *return_this; /* * Parameter error checks */ if ( !pointer ) 112298: 85 db test %ebx,%ebx 11229a: 74 57 je 1122f3 return EINVAL; *pointer = NULL; 11229c: 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()) && 1122a2: 83 3d 44 94 12 00 03 cmpl $0x3,0x129444 1122a9: 75 09 jne 1122b4 <== ALWAYS TAKEN 1122ab: e8 64 61 ff ff call 108414 <== ALWAYS TAKEN 1122b0: 84 c0 test %al,%al 1122b2: 74 3f je 1122f3 <== ALWAYS TAKEN /* * * If some free's have been deferred, then do them now. */ malloc_deferred_frees_process(); 1122b4: e8 b1 61 ff ff call 10846a <== ALWAYS TAKEN uintptr_t size, uintptr_t alignment ) { return _Protected_heap_Allocate_aligned_with_boundary( heap, size, alignment, 0 ); 1122b9: 6a 00 push $0x0 1122bb: ff 75 0c pushl 0xc(%ebp) 1122be: ff 75 10 pushl 0x10(%ebp) 1122c1: ff 35 50 51 12 00 pushl 0x125150 1122c7: e8 24 aa ff ff call 10ccf0 <_Protected_heap_Allocate_aligned_with_boundary> 1122cc: 89 c6 mov %eax,%esi return_this = _Protected_heap_Allocate_aligned( RTEMS_Malloc_Heap, size, alignment ); if ( !return_this ) 1122ce: 83 c4 10 add $0x10,%esp 1122d1: b8 0c 00 00 00 mov $0xc,%eax 1122d6: 85 f6 test %esi,%esi 1122d8: 74 1e je 1122f8 return ENOMEM; /* * If configured, update the more involved statistics */ if ( rtems_malloc_statistics_helpers ) 1122da: a1 30 75 12 00 mov 0x127530,%eax 1122df: 85 c0 test %eax,%eax 1122e1: 74 0a je 1122ed <== NEVER TAKEN (*rtems_malloc_statistics_helpers->at_malloc)(pointer); 1122e3: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1122e6: 53 push %ebx <== NOT EXECUTED 1122e7: ff 50 04 call *0x4(%eax) <== NOT EXECUTED 1122ea: 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; 1122ed: 89 33 mov %esi,(%ebx) 1122ef: 31 c0 xor %eax,%eax return 0; 1122f1: eb 05 jmp 1122f8 <== ALWAYS TAKEN 1122f3: b8 16 00 00 00 mov $0x16,%eax } 1122f8: 8d 65 f8 lea -0x8(%ebp),%esp 1122fb: 5b pop %ebx 1122fc: 5e pop %esi 1122fd: c9 leave 1122fe: 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 a4 de 13 00 push $0x13dea4 113e7d: e8 0e 45 00 00 call 118390 <_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 1b 2f 00 00 call 116dc0 <_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 46 4d 00 00 call 118bf5 <_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 d4 12 00 mov 0x12d4bc,%eax 11126c: 40 inc %eax 11126d: a3 bc d4 12 00 mov %eax,0x12d4bc #endif #endif _Thread_Disable_dispatch(); /* protects object pointer */ the_message_queue = _Message_queue_Allocate(); 111272: 89 55 d4 mov %edx,-0x2c(%ebp) 111275: e8 d2 51 00 00 call 11644c <_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 e1 25 00 00 call 113869 <_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 55 0f 00 00 call 112204 <_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 98 dd 12 00 push $0x12dd98 1112be: e8 0d 1c 00 00 call 112ed0 <_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 a1 25 00 00 call 113869 <_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 b4 dd 12 00 mov 0x12ddb4,%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 7b 25 00 00 call 113869 <_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 001140fc : */ rtems_status_code rtems_message_queue_delete( rtems_id id ) { 1140fc: 55 push %ebp 1140fd: 89 e5 mov %esp,%ebp 1140ff: 53 push %ebx 114100: 83 ec 18 sub $0x18,%esp 114103: 8d 45 f4 lea -0xc(%ebp),%eax 114106: 50 push %eax 114107: ff 75 08 pushl 0x8(%ebp) 11410a: 68 0c 04 13 00 push $0x13040c 11410f: e8 dc a8 ff ff call 10e9f0 <_Objects_Get> 114114: 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 ) { 114116: 83 c4 10 add $0x10,%esp 114119: b8 04 00 00 00 mov $0x4,%eax 11411e: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 114122: 75 34 jne 114158 case OBJECTS_LOCAL: _Objects_Close( &_Message_queue_Information, 114124: 51 push %ecx 114125: 51 push %ecx 114126: 53 push %ebx 114127: 68 0c 04 13 00 push $0x13040c 11412c: e8 17 a5 ff ff call 10e648 <_Objects_Close> &the_message_queue->Object ); _CORE_message_queue_Close( 114131: 83 c4 0c add $0xc,%esp 114134: 6a 05 push $0x5 114136: 6a 00 push $0x0 114138: 8d 43 14 lea 0x14(%ebx),%eax 11413b: 50 push %eax 11413c: e8 bb 04 00 00 call 1145fc <_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 ); 114141: 58 pop %eax 114142: 5a pop %edx 114143: 53 push %ebx 114144: 68 0c 04 13 00 push $0x13040c 114149: e8 7a a7 ff ff call 10e8c8 <_Objects_Free> 0, /* Not used */ 0 ); } #endif _Thread_Enable_dispatch(); 11414e: e8 02 b1 ff ff call 10f255 <_Thread_Enable_dispatch> 114153: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 114155: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 114158: 8b 5d fc mov -0x4(%ebp),%ebx 11415b: c9 leave 11415c: 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 a4 de 13 00 push $0x13dea4 114020: e8 6b 43 00 00 call 118390 <_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 2b 2e 00 00 call 116e6c <_CORE_message_queue_Flush> <== ALWAYS TAKEN 114041: 89 03 mov %eax,(%ebx) _Thread_Enable_dispatch(); 114043: e8 ad 4b 00 00 call 118bf5 <_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 98 dd 12 00 push $0x12dd98 11133f: e8 b4 1c 00 00 call 112ff8 <_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 3b 0f 00 00 call 1122ac <_CORE_message_queue_Seize> <== ALWAYS TAKEN buffer, size, wait, timeout ); _Thread_Enable_dispatch(); 111371: 83 c4 20 add $0x20,%esp 111374: e8 f0 24 00 00 call 113869 <_Thread_Enable_dispatch> return _Message_queue_Translate_core_message_queue_return_code( 111379: 83 ec 0c sub $0xc,%esp 11137c: a1 78 d5 12 00 mov 0x12d578,%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 c8 4a 12 00 push $0x124ac8 109ca2: e8 59 17 00 00 call 10b400 <_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 08 0b 00 00 call 10a7d8 <_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 17 1f 00 00 call 10bbf1 <_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 a4 de 13 00 push $0x13dea4 1141e2: e8 a9 41 00 00 call 118390 <_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 8c 2e 00 00 call 11709c <_CORE_message_queue_Submit> 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 db 49 00 00 call 118bf5 <_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 0010b684 : rtems_status_code rtems_object_get_class_information( int the_api, int the_class, rtems_object_api_class_information *info ) { 10b684: 55 push %ebp 10b685: 89 e5 mov %esp,%ebp 10b687: 57 push %edi 10b688: 56 push %esi 10b689: 53 push %ebx 10b68a: 83 ec 0c sub $0xc,%esp 10b68d: 8b 5d 10 mov 0x10(%ebp),%ebx int i; /* * Validate parameters and look up information structure. */ if ( !info ) 10b690: ba 09 00 00 00 mov $0x9,%edx 10b695: 85 db test %ebx,%ebx 10b697: 74 4e je 10b6e7 return RTEMS_INVALID_ADDRESS; obj_info = _Objects_Get_information( the_api, the_class ); 10b699: 50 push %eax 10b69a: 50 push %eax 10b69b: ff 75 0c pushl 0xc(%ebp) 10b69e: ff 75 08 pushl 0x8(%ebp) 10b6a1: e8 12 18 00 00 call 10ceb8 <_Objects_Get_information> if ( !obj_info ) 10b6a6: 83 c4 10 add $0x10,%esp 10b6a9: ba 0a 00 00 00 mov $0xa,%edx 10b6ae: 85 c0 test %eax,%eax 10b6b0: 74 35 je 10b6e7 return RTEMS_INVALID_NUMBER; /* * Return information about this object class to the user. */ info->minimum_id = obj_info->minimum_id; 10b6b2: 8b 50 08 mov 0x8(%eax),%edx 10b6b5: 89 13 mov %edx,(%ebx) info->maximum_id = obj_info->maximum_id; 10b6b7: 8b 50 0c mov 0xc(%eax),%edx 10b6ba: 89 53 04 mov %edx,0x4(%ebx) info->auto_extend = obj_info->auto_extend; 10b6bd: 8a 50 12 mov 0x12(%eax),%dl 10b6c0: 88 53 0c mov %dl,0xc(%ebx) info->maximum = obj_info->maximum; 10b6c3: 0f b7 70 10 movzwl 0x10(%eax),%esi 10b6c7: 89 73 08 mov %esi,0x8(%ebx) 10b6ca: ba 01 00 00 00 mov $0x1,%edx 10b6cf: 31 c9 xor %ecx,%ecx for ( unallocated=0, i=1 ; i <= info->maximum ; i++ ) 10b6d1: eb 0b jmp 10b6de <== ALWAYS TAKEN if ( !obj_info->local_table[i] ) 10b6d3: 8b 78 1c mov 0x1c(%eax),%edi unallocated++; 10b6d6: 83 3c 97 01 cmpl $0x1,(%edi,%edx,4) 10b6da: 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++ ) 10b6dd: 42 inc %edx 10b6de: 39 f2 cmp %esi,%edx 10b6e0: 76 f1 jbe 10b6d3 if ( !obj_info->local_table[i] ) unallocated++; info->unallocated = unallocated; 10b6e2: 89 4b 10 mov %ecx,0x10(%ebx) 10b6e5: 31 d2 xor %edx,%edx return RTEMS_SUCCESSFUL; } 10b6e7: 89 d0 mov %edx,%eax 10b6e9: 8d 65 f4 lea -0xc(%ebp),%esp 10b6ec: 5b pop %ebx 10b6ed: 5e pop %esi 10b6ee: 5f pop %edi 10b6ef: c9 leave 10b6f0: c3 ret 0010a20c : */ rtems_status_code rtems_object_set_name( rtems_id id, const char *name ) { 10a20c: 55 push %ebp 10a20d: 89 e5 mov %esp,%ebp 10a20f: 57 push %edi 10a210: 56 push %esi 10a211: 53 push %ebx 10a212: 83 ec 1c sub $0x1c,%esp 10a215: 8b 7d 0c mov 0xc(%ebp),%edi Objects_Information *information; Objects_Locations location; Objects_Control *the_object; Objects_Id tmpId; if ( !name ) 10a218: b8 09 00 00 00 mov $0x9,%eax 10a21d: 85 ff test %edi,%edi 10a21f: 74 50 je 10a271 return RTEMS_INVALID_ADDRESS; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 10a221: 8b 5d 08 mov 0x8(%ebp),%ebx 10a224: 85 db test %ebx,%ebx 10a226: 75 08 jne 10a230 10a228: a1 14 64 12 00 mov 0x126414,%eax 10a22d: 8b 58 08 mov 0x8(%eax),%ebx information = _Objects_Get_information_id( tmpId ); 10a230: 83 ec 0c sub $0xc,%esp 10a233: 53 push %ebx 10a234: e8 13 16 00 00 call 10b84c <_Objects_Get_information_id> 10a239: 89 c6 mov %eax,%esi if ( !information ) 10a23b: 83 c4 10 add $0x10,%esp 10a23e: 85 c0 test %eax,%eax 10a240: 74 2a je 10a26c return RTEMS_INVALID_ID; the_object = _Objects_Get( information, tmpId, &location ); 10a242: 51 push %ecx 10a243: 8d 45 e4 lea -0x1c(%ebp),%eax 10a246: 50 push %eax 10a247: 53 push %ebx 10a248: 56 push %esi 10a249: e8 96 17 00 00 call 10b9e4 <_Objects_Get> switch ( location ) { 10a24e: 83 c4 10 add $0x10,%esp 10a251: 83 7d e4 00 cmpl $0x0,-0x1c(%ebp) 10a255: 75 15 jne 10a26c case OBJECTS_LOCAL: _Objects_Set_name( information, the_object, name ); 10a257: 52 push %edx 10a258: 57 push %edi 10a259: 50 push %eax 10a25a: 56 push %esi 10a25b: e8 68 19 00 00 call 10bbc8 <_Objects_Set_name> _Thread_Enable_dispatch(); 10a260: e8 48 20 00 00 call 10c2ad <_Thread_Enable_dispatch> 10a265: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 10a267: 83 c4 10 add $0x10,%esp 10a26a: eb 05 jmp 10a271 <== ALWAYS TAKEN 10a26c: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10a271: 8d 65 f4 lea -0xc(%ebp),%esp 10a274: 5b pop %ebx 10a275: 5e pop %esi 10a276: 5f pop %edi 10a277: c9 leave 10a278: 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 c0 d5 13 00 mov 0x13d5c0,%eax 114298: 40 inc %eax 114299: a3 c0 d5 13 00 mov %eax,0x13d5c0 * 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 48 d4 13 00 push $0x13d448 1142a6: 89 55 e4 mov %edx,-0x1c(%ebp) 1142a9: e8 92 3c 00 00 call 117f40 <_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 36 49 00 00 call 118bf5 <_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 9a 2a 00 00 call 116d88 <_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 64 d4 13 00 mov 0x13d464,%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 e8 48 00 00 call 118bf5 <_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 48 d4 13 00 push $0x13d448 11433b: e8 50 40 00 00 call 118390 <_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 48 d4 13 00 push $0x13d448 11435e: e8 49 3c 00 00 call 117fac <_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 48 d4 13 00 push $0x13d448 11436b: e8 bc 3e 00 00 call 11822c <_Objects_Free> 0 /* Not used */ ); } #endif _Thread_Enable_dispatch(); 114370: e8 80 48 00 00 call 118bf5 <_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 74 48 00 00 call 118bf5 <_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 48 d4 13 00 push $0x13d448 1143ae: e8 dd 3f 00 00 call 118390 <_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 95 29 00 00 call 116d64 <_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 15 48 00 00 call 118bf5 <_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 0a 48 00 00 call 118bf5 <_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 48 d4 13 00 push $0x13d448 114433: e8 58 3f 00 00 call 118390 <_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 c5 28 00 00 call 116d40 <_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 72 47 00 00 call 118bf5 <_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 61 47 00 00 call 118bf5 <_Thread_Enable_dispatch> 114494: b8 09 00 00 00 mov $0x9,%eax return RTEMS_INVALID_ADDRESS; 114499: eb ed jmp 114488 <== ALWAYS TAKEN 0010f78e : /* * Initialization of FIFO/pipe module. */ void rtems_pipe_initialize (void) { 10f78e: 55 push %ebp 10f78f: 89 e5 mov %esp,%ebp 10f791: 83 ec 08 sub $0x8,%esp if (!rtems_pipe_configured) 10f794: 80 3d 0c 25 12 00 00 cmpb $0x0,0x12250c 10f79b: 74 3c je 10f7d9 <== NEVER TAKEN return; if (rtems_pipe_semaphore) 10f79d: 83 3d 94 3e 12 00 00 cmpl $0x0,0x123e94 <== NOT EXECUTED 10f7a4: 75 33 jne 10f7d9 <== NOT EXECUTED return; rtems_status_code sc; sc = rtems_semaphore_create( 10f7a6: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10f7a9: 68 94 3e 12 00 push $0x123e94 <== NOT EXECUTED 10f7ae: 6a 00 push $0x0 <== NOT EXECUTED 10f7b0: 6a 54 push $0x54 <== NOT EXECUTED 10f7b2: 6a 01 push $0x1 <== NOT EXECUTED 10f7b4: 68 45 50 49 50 push $0x50495045 <== NOT EXECUTED 10f7b9: e8 42 a5 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) 10f7be: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 10f7c1: 85 c0 test %eax,%eax <== NOT EXECUTED 10f7c3: 74 09 je 10f7ce <== NOT EXECUTED rtems_fatal_error_occurred (sc); 10f7c5: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10f7c8: 50 push %eax <== NOT EXECUTED 10f7c9: e8 1e ad ff ff call 10a4ec <== NOT EXECUTED rtems_interval now; now = rtems_clock_get_ticks_since_boot(); 10f7ce: e8 29 a1 ff ff call 1098fc <== NOT EXECUTED rtems_pipe_no = now; 10f7d3: 66 a3 9c 3e 12 00 mov %ax,0x123e9c <== NOT EXECUTED } 10f7d9: c9 leave 10f7da: 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 c0 d5 13 00 mov 0x13d5c0,%eax 1139c9: 40 inc %eax 1139ca: a3 c0 d5 13 00 mov %eax,0x13d5c0 * 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 08 d4 13 00 push $0x13d408 1139d7: e8 64 45 00 00 call 117f40 <_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 0d 52 00 00 call 118bf5 <_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 24 d4 13 00 mov 0x13d424,%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 dd 51 00 00 call 118bf5 <_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 08 d4 13 00 push $0x13d408 113aa4: e8 e7 48 00 00 call 118390 <_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 24 51 00 00 call 118bf5 <_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 08 d4 13 00 push $0x13d408 113b24: e8 67 48 00 00 call 118390 <_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 a4 50 00 00 call 118bf5 <_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 88 d4 13 00 push $0x13d488 1144af: e8 dc 3e 00 00 call 118390 <_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 7c d6 13 00 cmp 0x13d67c,%eax 1144cd: 74 0c je 1144db _Thread_Enable_dispatch(); 1144cf: e8 21 47 00 00 call 118bf5 <_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 61 59 00 00 call 119e48 <_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 02 47 00 00 call 118bf5 <_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 f0 72 12 00 mov 0x1272f0,%eax 10aace: 40 inc %eax 10aacf: a3 f0 72 12 00 mov %eax,0x1272f0 * 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 f8 71 12 00 push $0x1271f8 10aadc: e8 2f 1b 00 00 call 10c610 <_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 06 28 00 00 call 10d2f5 <_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 ac 73 12 00 mov 0x1273ac,%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 14 72 12 00 mov 0x127214,%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 8e 27 00 00 call 10d2f5 <_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 00135084 : rtems_status_code rtems_rate_monotonic_get_status( rtems_id id, rtems_rate_monotonic_period_status *status ) { 135084: 55 push %ebp 135085: 89 e5 mov %esp,%ebp 135087: 53 push %ebx 135088: 83 ec 24 sub $0x24,%esp 13508b: 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 ) 13508e: b8 09 00 00 00 mov $0x9,%eax 135093: 85 db test %ebx,%ebx 135095: 0f 84 93 00 00 00 je 13512e 13509b: 52 push %edx 13509c: 8d 45 f4 lea -0xc(%ebp),%eax 13509f: 50 push %eax 1350a0: ff 75 08 pushl 0x8(%ebp) 1350a3: 68 50 47 16 00 push $0x164750 1350a8: e8 c3 bc fd ff call 110d70 <_Objects_Get> 1350ad: 89 c2 mov %eax,%edx return RTEMS_INVALID_ADDRESS; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 1350af: 83 c4 10 add $0x10,%esp 1350b2: b8 04 00 00 00 mov $0x4,%eax 1350b7: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 1350bb: 75 71 jne 13512e case OBJECTS_LOCAL: status->owner = the_period->owner->Object.id; 1350bd: 8b 42 40 mov 0x40(%edx),%eax 1350c0: 8b 40 08 mov 0x8(%eax),%eax 1350c3: 89 03 mov %eax,(%ebx) status->state = the_period->state; 1350c5: 8b 42 38 mov 0x38(%edx),%eax 1350c8: 89 43 04 mov %eax,0x4(%ebx) /* * If the period is inactive, there is no information. */ if ( status->state == RATE_MONOTONIC_INACTIVE ) { 1350cb: 85 c0 test %eax,%eax 1350cd: 75 1e jne 1350ed #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timespec_Set_to_zero( &status->since_last_period ); 1350cf: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx) 1350d6: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx) _Timespec_Set_to_zero( &status->executed_since_last_period ); 1350dd: c7 43 10 00 00 00 00 movl $0x0,0x10(%ebx) 1350e4: c7 43 14 00 00 00 00 movl $0x0,0x14(%ebx) 1350eb: eb 3a jmp 135127 <== ALWAYS TAKEN /* * Grab the current status. */ valid_status = _Rate_monotonic_Get_status( 1350ed: 50 push %eax 1350ee: 8d 45 ec lea -0x14(%ebp),%eax 1350f1: 50 push %eax 1350f2: 8d 45 e4 lea -0x1c(%ebp),%eax 1350f5: 50 push %eax 1350f6: 52 push %edx 1350f7: e8 a0 00 00 00 call 13519c <_Rate_monotonic_Get_status> <== ALWAYS TAKEN the_period, &since_last_period, &executed ); if (!valid_status) { 1350fc: 83 c4 10 add $0x10,%esp 1350ff: 84 c0 test %al,%al 135101: 75 0c jne 13510f _Thread_Enable_dispatch(); 135103: e8 09 c5 fd ff call 111611 <_Thread_Enable_dispatch> 135108: b8 0b 00 00 00 mov $0xb,%eax return RTEMS_NOT_DEFINED; 13510d: eb 1f jmp 13512e <== ALWAYS TAKEN } #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_To_timespec( 13510f: 8b 45 e4 mov -0x1c(%ebp),%eax 135112: 8b 55 e8 mov -0x18(%ebp),%edx 135115: 89 43 08 mov %eax,0x8(%ebx) 135118: 89 53 0c mov %edx,0xc(%ebx) &since_last_period, &status->since_last_period ); _Timestamp_To_timespec( 13511b: 8b 45 ec mov -0x14(%ebp),%eax 13511e: 8b 55 f0 mov -0x10(%ebp),%edx 135121: 89 43 10 mov %eax,0x10(%ebx) 135124: 89 53 14 mov %edx,0x14(%ebx) status->since_last_period = since_last_period; status->executed_since_last_period = executed; #endif } _Thread_Enable_dispatch(); 135127: e8 e5 c4 fd ff call 111611 <_Thread_Enable_dispatch> 13512c: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 13512e: 8b 5d fc mov -0x4(%ebp),%ebx 135131: c9 leave 135132: c3 ret 00135309 : rtems_status_code rtems_rate_monotonic_period( rtems_id id, rtems_interval length ) { 135309: 55 push %ebp 13530a: 89 e5 mov %esp,%ebp 13530c: 57 push %edi 13530d: 56 push %esi 13530e: 53 push %ebx 13530f: 83 ec 30 sub $0x30,%esp 135312: 8b 75 08 mov 0x8(%ebp),%esi 135315: 8b 5d 0c mov 0xc(%ebp),%ebx 135318: 8d 45 e4 lea -0x1c(%ebp),%eax 13531b: 50 push %eax 13531c: 56 push %esi 13531d: 68 50 47 16 00 push $0x164750 135322: e8 49 ba fd ff call 110d70 <_Objects_Get> 135327: 89 c7 mov %eax,%edi rtems_rate_monotonic_period_states local_state; ISR_Level level; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 135329: 83 c4 10 add $0x10,%esp 13532c: 83 7d e4 00 cmpl $0x0,-0x1c(%ebp) 135330: 0f 85 40 01 00 00 jne 135476 case OBJECTS_LOCAL: if ( !_Thread_Is_executing( the_period->owner ) ) { 135336: 8b 40 40 mov 0x40(%eax),%eax 135339: 3b 05 88 3c 16 00 cmp 0x163c88,%eax 13533f: 74 0f je 135350 _Thread_Enable_dispatch(); 135341: e8 cb c2 fd ff call 111611 <_Thread_Enable_dispatch> 135346: bb 17 00 00 00 mov $0x17,%ebx return RTEMS_NOT_OWNER_OF_RESOURCE; 13534b: e9 2b 01 00 00 jmp 13547b <== ALWAYS TAKEN } if ( length == RTEMS_PERIOD_STATUS ) { 135350: 85 db test %ebx,%ebx 135352: 75 19 jne 13536d switch ( the_period->state ) { 135354: 8b 47 38 mov 0x38(%edi),%eax 135357: 83 f8 04 cmp $0x4,%eax 13535a: 77 07 ja 135363 <== ALWAYS TAKEN 13535c: 8b 1c 85 28 97 15 00 mov 0x159728(,%eax,4),%ebx case RATE_MONOTONIC_ACTIVE: default: /* unreached -- only to remove warnings */ return_value = RTEMS_SUCCESSFUL; break; } _Thread_Enable_dispatch(); 135363: e8 a9 c2 fd ff call 111611 <_Thread_Enable_dispatch> return( return_value ); 135368: e9 0e 01 00 00 jmp 13547b <== ALWAYS TAKEN } _ISR_Disable( level ); 13536d: 9c pushf 13536e: fa cli 13536f: 8f 45 d4 popl -0x2c(%ebp) switch ( the_period->state ) { 135372: 8b 47 38 mov 0x38(%edi),%eax 135375: 83 f8 02 cmp $0x2,%eax 135378: 74 5f je 1353d9 13537a: 83 f8 04 cmp $0x4,%eax 13537d: 0f 84 ba 00 00 00 je 13543d 135383: 85 c0 test %eax,%eax 135385: 0f 85 eb 00 00 00 jne 135476 <== ALWAYS TAKEN case RATE_MONOTONIC_INACTIVE: { _ISR_Enable( level ); 13538b: ff 75 d4 pushl -0x2c(%ebp) 13538e: 9d popf /* * Baseline statistics information for the beginning of a period. */ _Rate_monotonic_Initiate_statistics( the_period ); 13538f: 83 ec 0c sub $0xc,%esp 135392: 57 push %edi 135393: e8 9c fd ff ff call 135134 <_Rate_monotonic_Initiate_statistics> <== ALWAYS TAKEN the_period->state = RATE_MONOTONIC_ACTIVE; 135398: 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; 13539f: c7 47 18 00 00 00 00 movl $0x0,0x18(%edi) the_watchdog->routine = routine; 1353a6: c7 47 2c 88 54 13 00 movl $0x135488,0x2c(%edi) the_watchdog->id = id; 1353ad: 89 77 30 mov %esi,0x30(%edi) the_watchdog->user_data = user_data; 1353b0: c7 47 34 00 00 00 00 movl $0x0,0x34(%edi) _Rate_monotonic_Timeout, id, NULL ); the_period->next_length = length; 1353b7: 89 5f 3c mov %ebx,0x3c(%edi) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 1353ba: 89 5f 1c mov %ebx,0x1c(%edi) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 1353bd: 5b pop %ebx 1353be: 5e pop %esi 1353bf: 83 c7 10 add $0x10,%edi 1353c2: 57 push %edi 1353c3: 68 a8 3c 16 00 push $0x163ca8 1353c8: e8 03 d0 fd ff call 1123d0 <_Watchdog_Insert> _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); 1353cd: e8 3f c2 fd ff call 111611 <_Thread_Enable_dispatch> 1353d2: 31 db xor %ebx,%ebx 1353d4: e9 98 00 00 00 jmp 135471 <== ALWAYS TAKEN case RATE_MONOTONIC_ACTIVE: /* * Update statistics from the concluding period. */ _Rate_monotonic_Update_statistics( the_period ); 1353d9: 83 ec 0c sub $0xc,%esp 1353dc: 57 push %edi 1353dd: e8 4c fe ff ff call 13522e <_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; 1353e2: c7 47 38 01 00 00 00 movl $0x1,0x38(%edi) the_period->next_length = length; 1353e9: 89 5f 3c mov %ebx,0x3c(%edi) _ISR_Enable( level ); 1353ec: ff 75 d4 pushl -0x2c(%ebp) 1353ef: 9d popf _Thread_Executing->Wait.id = the_period->Object.id; 1353f0: a1 88 3c 16 00 mov 0x163c88,%eax 1353f5: 8b 57 08 mov 0x8(%edi),%edx 1353f8: 89 50 20 mov %edx,0x20(%eax) _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); 1353fb: 5a pop %edx 1353fc: 59 pop %ecx 1353fd: 68 00 40 00 00 push $0x4000 135402: 50 push %eax 135403: e8 f4 c9 fd ff call 111dfc <_Thread_Set_state> /* * Did the watchdog timer expire while we were actually blocking * on it? */ _ISR_Disable( level ); 135408: 9c pushf 135409: fa cli 13540a: 5a pop %edx local_state = the_period->state; 13540b: 8b 47 38 mov 0x38(%edi),%eax the_period->state = RATE_MONOTONIC_ACTIVE; 13540e: c7 47 38 02 00 00 00 movl $0x2,0x38(%edi) _ISR_Enable( level ); 135415: 52 push %edx 135416: 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 ) 135417: 83 c4 10 add $0x10,%esp 13541a: 83 f8 03 cmp $0x3,%eax 13541d: 75 15 jne 135434 _Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); 13541f: 56 push %esi 135420: 56 push %esi 135421: 68 00 40 00 00 push $0x4000 135426: ff 35 88 3c 16 00 pushl 0x163c88 13542c: e8 63 be fd ff call 111294 <_Thread_Clear_state> 135431: 83 c4 10 add $0x10,%esp _Thread_Enable_dispatch(); 135434: e8 d8 c1 fd ff call 111611 <_Thread_Enable_dispatch> 135439: 31 db xor %ebx,%ebx return RTEMS_SUCCESSFUL; 13543b: eb 3e jmp 13547b <== ALWAYS TAKEN case RATE_MONOTONIC_EXPIRED: /* * Update statistics from the concluding period */ _Rate_monotonic_Update_statistics( the_period ); 13543d: 83 ec 0c sub $0xc,%esp 135440: 57 push %edi 135441: e8 e8 fd ff ff call 13522e <_Rate_monotonic_Update_statistics> <== ALWAYS TAKEN _ISR_Enable( level ); 135446: ff 75 d4 pushl -0x2c(%ebp) 135449: 9d popf the_period->state = RATE_MONOTONIC_ACTIVE; 13544a: c7 47 38 02 00 00 00 movl $0x2,0x38(%edi) the_period->next_length = length; 135451: 89 5f 3c mov %ebx,0x3c(%edi) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 135454: 89 5f 1c mov %ebx,0x1c(%edi) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 135457: 59 pop %ecx 135458: 5b pop %ebx 135459: 83 c7 10 add $0x10,%edi 13545c: 57 push %edi 13545d: 68 a8 3c 16 00 push $0x163ca8 135462: e8 69 cf fd ff call 1123d0 <_Watchdog_Insert> _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); 135467: e8 a5 c1 fd ff call 111611 <_Thread_Enable_dispatch> 13546c: bb 06 00 00 00 mov $0x6,%ebx return RTEMS_TIMEOUT; 135471: 83 c4 10 add $0x10,%esp 135474: eb 05 jmp 13547b <== ALWAYS TAKEN 135476: bb 04 00 00 00 mov $0x4,%ebx case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 13547b: 89 d8 mov %ebx,%eax 13547d: 8d 65 f4 lea -0xc(%ebp),%esp 135480: 5b pop %ebx 135481: 5e pop %esi 135482: 5f pop %edi 135483: c9 leave 135484: c3 ret 0012794c : */ void rtems_rate_monotonic_report_statistics_with_plugin( void *context, rtems_printk_plugin_t print ) { 12794c: 55 push %ebp 12794d: 89 e5 mov %esp,%ebp 12794f: 57 push %edi 127950: 56 push %esi 127951: 53 push %ebx 127952: 83 ec 7c sub $0x7c,%esp 127955: 8b 5d 08 mov 0x8(%ebp),%ebx 127958: 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 ) 12795b: 85 ff test %edi,%edi 12795d: 0f 84 2b 01 00 00 je 127a8e <== ALWAYS TAKEN return; (*print)( context, "Period information by period\n" ); 127963: 52 push %edx 127964: 52 push %edx 127965: 68 20 61 15 00 push $0x156120 12796a: 53 push %ebx 12796b: ff d7 call *%edi #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ (*print)( context, "--- CPU times are in seconds ---\n" ); 12796d: 5e pop %esi 12796e: 58 pop %eax 12796f: 68 3e 61 15 00 push $0x15613e 127974: 53 push %ebx 127975: ff d7 call *%edi (*print)( context, "--- Wall times are in seconds ---\n" ); 127977: 5a pop %edx 127978: 59 pop %ecx 127979: 68 60 61 15 00 push $0x156160 12797e: 53 push %ebx 12797f: ff d7 call *%edi Be sure to test the various cases. (*print)( context,"\ 1234567890123456789012345678901234567890123456789012345678901234567890123456789\ \n"); */ (*print)( context, " ID OWNER COUNT MISSED " 127981: 5e pop %esi 127982: 58 pop %eax 127983: 68 83 61 15 00 push $0x156183 127988: 53 push %ebx 127989: ff d7 call *%edi #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ " " #endif " WALL TIME\n" ); (*print)( context, " " 12798b: 5a pop %edx 12798c: 59 pop %ecx 12798d: 68 ce 61 15 00 push $0x1561ce 127992: 53 push %ebx 127993: 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 ; 127995: 8b 35 58 47 16 00 mov 0x164758,%esi 12799b: 83 c4 10 add $0x10,%esp 12799e: e9 df 00 00 00 jmp 127a82 id <= _Rate_monotonic_Information.maximum_id ; id++ ) { status = rtems_rate_monotonic_get_statistics( id, &the_stats ); 1279a3: 50 push %eax 1279a4: 50 push %eax 1279a5: 8d 45 88 lea -0x78(%ebp),%eax 1279a8: 50 push %eax 1279a9: 56 push %esi 1279aa: e8 31 d6 00 00 call 134fe0 if ( status != RTEMS_SUCCESSFUL ) 1279af: 83 c4 10 add $0x10,%esp 1279b2: 85 c0 test %eax,%eax 1279b4: 0f 85 c7 00 00 00 jne 127a81 <== ALWAYS TAKEN continue; /* If the above passed, so should this but check it anyway */ status = rtems_rate_monotonic_get_status( id, &the_status ); 1279ba: 51 push %ecx 1279bb: 51 push %ecx 1279bc: 8d 55 c0 lea -0x40(%ebp),%edx 1279bf: 52 push %edx 1279c0: 56 push %esi 1279c1: e8 be d6 00 00 call 135084 #if defined(RTEMS_DEBUG) if ( status != RTEMS_SUCCESSFUL ) continue; #endif rtems_object_get_name( the_status.owner, sizeof(name), name ); 1279c6: 83 c4 0c add $0xc,%esp 1279c9: 8d 45 e3 lea -0x1d(%ebp),%eax 1279cc: 50 push %eax 1279cd: 6a 05 push $0x5 1279cf: ff 75 c0 pushl -0x40(%ebp) 1279d2: e8 d5 78 fe ff call 10f2ac /* * Print part of report line that is not dependent on granularity */ (*print)( context, 1279d7: 58 pop %eax 1279d8: 5a pop %edx 1279d9: ff 75 8c pushl -0x74(%ebp) 1279dc: ff 75 88 pushl -0x78(%ebp) 1279df: 8d 55 e3 lea -0x1d(%ebp),%edx 1279e2: 52 push %edx 1279e3: 56 push %esi 1279e4: 68 1a 62 15 00 push $0x15621a 1279e9: 53 push %ebx 1279ea: ff d7 call *%edi ); /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { 1279ec: 8b 45 88 mov -0x78(%ebp),%eax 1279ef: 83 c4 20 add $0x20,%esp 1279f2: 85 c0 test %eax,%eax 1279f4: 75 0f jne 127a05 (*print)( context, "\n" ); 1279f6: 51 push %ecx 1279f7: 51 push %ecx 1279f8: 68 d5 7b 15 00 push $0x157bd5 1279fd: 53 push %ebx 1279fe: ff d7 call *%edi continue; 127a00: 83 c4 10 add $0x10,%esp 127a03: eb 7c jmp 127a81 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 ); 127a05: 52 push %edx 127a06: 8d 55 d8 lea -0x28(%ebp),%edx 127a09: 52 push %edx 127a0a: 50 push %eax 127a0b: 8d 45 a0 lea -0x60(%ebp),%eax 127a0e: 50 push %eax 127a0f: e8 b4 14 00 00 call 128ec8 <_Timespec_Divide_by_integer> (*print)( context, 127a14: 8b 45 dc mov -0x24(%ebp),%eax 127a17: b9 e8 03 00 00 mov $0x3e8,%ecx 127a1c: 99 cltd 127a1d: f7 f9 idiv %ecx 127a1f: 50 push %eax 127a20: ff 75 d8 pushl -0x28(%ebp) 127a23: 8b 45 9c mov -0x64(%ebp),%eax 127a26: 99 cltd 127a27: f7 f9 idiv %ecx 127a29: 50 push %eax 127a2a: ff 75 98 pushl -0x68(%ebp) 127a2d: 8b 45 94 mov -0x6c(%ebp),%eax 127a30: 99 cltd 127a31: f7 f9 idiv %ecx 127a33: 50 push %eax 127a34: ff 75 90 pushl -0x70(%ebp) 127a37: 68 31 62 15 00 push $0x156231 127a3c: 53 push %ebx 127a3d: 89 4d 84 mov %ecx,-0x7c(%ebp) 127a40: 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); 127a42: 83 c4 2c add $0x2c,%esp 127a45: 8d 55 d8 lea -0x28(%ebp),%edx 127a48: 52 push %edx 127a49: ff 75 88 pushl -0x78(%ebp) 127a4c: 8d 45 b8 lea -0x48(%ebp),%eax 127a4f: 50 push %eax 127a50: e8 73 14 00 00 call 128ec8 <_Timespec_Divide_by_integer> (*print)( context, 127a55: 8b 45 dc mov -0x24(%ebp),%eax 127a58: 8b 4d 84 mov -0x7c(%ebp),%ecx 127a5b: 99 cltd 127a5c: f7 f9 idiv %ecx 127a5e: 50 push %eax 127a5f: ff 75 d8 pushl -0x28(%ebp) 127a62: 8b 45 b4 mov -0x4c(%ebp),%eax 127a65: 99 cltd 127a66: f7 f9 idiv %ecx 127a68: 50 push %eax 127a69: ff 75 b0 pushl -0x50(%ebp) 127a6c: 8b 45 ac mov -0x54(%ebp),%eax 127a6f: 99 cltd 127a70: f7 f9 idiv %ecx 127a72: 50 push %eax 127a73: ff 75 a8 pushl -0x58(%ebp) 127a76: 68 50 62 15 00 push $0x156250 127a7b: 53 push %ebx 127a7c: ff d7 call *%edi 127a7e: 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++ ) { 127a81: 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 ; 127a82: 3b 35 5c 47 16 00 cmp 0x16475c,%esi 127a88: 0f 86 15 ff ff ff jbe 1279a3 <== ALWAYS TAKEN the_stats.min_wall_time, the_stats.max_wall_time, ival_wall, fval_wall ); #endif } } } 127a8e: 8d 65 f4 lea -0xc(%ebp),%esp 127a91: 5b pop %ebx 127a92: 5e pop %esi 127a93: 5f pop %edi 127a94: c9 leave 127a95: c3 ret 00127ab0 : /* * rtems_rate_monotonic_reset_all_statistics */ void rtems_rate_monotonic_reset_all_statistics( void ) { 127ab0: 55 push %ebp 127ab1: 89 e5 mov %esp,%ebp 127ab3: 53 push %ebx 127ab4: 83 ec 04 sub $0x4,%esp 127ab7: a1 cc 3b 16 00 mov 0x163bcc,%eax 127abc: 40 inc %eax 127abd: a3 cc 3b 16 00 mov %eax,0x163bcc /* * 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 ; 127ac2: 8b 1d 58 47 16 00 mov 0x164758,%ebx 127ac8: eb 0d jmp 127ad7 <== ALWAYS TAKEN id <= _Rate_monotonic_Information.maximum_id ; id++ ) { status = rtems_rate_monotonic_reset_statistics( id ); 127aca: 83 ec 0c sub $0xc,%esp 127acd: 53 push %ebx 127ace: e8 15 00 00 00 call 127ae8 <== 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++ ) { 127ad3: 43 inc %ebx 127ad4: 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 ; 127ad7: 3b 1d 5c 47 16 00 cmp 0x16475c,%ebx 127add: 76 eb jbe 127aca /* * Done so exit thread dispatching disabled critical section. */ _Thread_Enable_dispatch(); } 127adf: 8b 5d fc mov -0x4(%ebp),%ebx 127ae2: c9 leave } /* * Done so exit thread dispatching disabled critical section. */ _Thread_Enable_dispatch(); 127ae3: e9 29 9b fe ff jmp 111611 <_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 74 d6 13 00 pushl 0x13d674 114bd1: e8 f2 20 00 00 call 116cc8 <_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 c8 d4 13 00 movl $0x13d4c8,(%esp) 114bdd: e8 5e 33 00 00 call 117f40 <_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 6a 2e 00 00 call 117a68 <_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 c8 d4 13 00 push $0x13d4c8 114c10: e8 17 36 00 00 call 11822c <_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 81 46 00 00 call 1192cc <_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 e4 d4 13 00 mov 0x13d4e4,%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 74 d6 13 00 pushl 0x13d674 114c73: 89 45 e4 mov %eax,-0x1c(%ebp) 114c76: e8 95 20 00 00 call 116d10 <_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 74 d6 13 00 pushl 0x13d674 114c9e: e8 25 20 00 00 call 116cc8 <_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 c8 d4 13 00 push $0x13d4c8 114cb2: e8 9d 36 00 00 call 118354 <_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 c8 d4 13 00 push $0x13d4c8 114cd7: e8 d0 32 00 00 call 117fac <_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 c8 d4 13 00 push $0x13d4c8 114ce4: e8 43 35 00 00 call 11822c <_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 74 d6 13 00 pushl 0x13d674 114cf7: e8 14 20 00 00 call 116d10 <_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 74 d6 13 00 pushl 0x13d674 114d26: e8 9d 1f 00 00 call 116cc8 <_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 c8 d4 13 00 push $0x13d4c8 114d3a: e8 15 36 00 00 call 118354 <_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 61 2a 00 00 call 1177c0 <_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 74 d6 13 00 pushl 0x13d674 114d8b: e8 80 1f 00 00 call 116d10 <_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 74 d6 13 00 pushl 0x13d674 114ec8: e8 fb 1d 00 00 call 116cc8 <_API_Mutex_Lock> <== ALWAYS TAKEN executing = _Thread_Executing; 114ecd: 8b 35 7c d6 13 00 mov 0x13d67c,%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 c8 d4 13 00 push $0x13d4c8 114ee2: e8 6d 34 00 00 call 118354 <_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 4d 27 00 00 call 117660 <_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 c0 d5 13 00 mov 0x13d5c0,%eax 114f33: 40 inc %eax 114f34: a3 c0 d5 13 00 mov %eax,0x13d5c0 * 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 74 d6 13 00 pushl 0x13d674 114f42: e8 c9 1d 00 00 call 116d10 <_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 70 93 11 00 push $0x119370 114f6b: ff 75 14 pushl 0x14(%ebp) 114f6e: 50 push %eax 114f6f: e8 40 41 00 00 call 1190b4 <_Thread_queue_Enqueue_with_handler> _Thread_Enable_dispatch(); 114f74: e8 7c 3c 00 00 call 118bf5 <_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 74 d6 13 00 pushl 0x13d674 114f8a: 89 45 d4 mov %eax,-0x2c(%ebp) 114f8d: e8 7e 1d 00 00 call 116d10 <_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 74 d6 13 00 pushl 0x13d674 114fbf: e8 04 1d 00 00 call 116cc8 <_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 c8 d4 13 00 push $0x13d4c8 114fd3: e8 7c 33 00 00 call 118354 <_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 52 2e 00 00 call 117e48 <_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 74 d6 13 00 pushl 0x13d674 11500d: e8 fe 1c 00 00 call 116d10 <_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 74 d6 13 00 pushl 0x13d674 115069: e8 5a 1c 00 00 call 116cc8 <_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 c8 d4 13 00 push $0x13d4c8 11507d: e8 d2 32 00 00 call 118354 <_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 b1 2c 00 00 call 117d58 <_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 ae 6b 00 00 call 11bc6c <_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 74 d6 13 00 pushl 0x13d674 1150cb: e8 40 1c 00 00 call 116d10 <_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 74 d6 13 00 pushl 0x13d674 1150e6: e8 25 1c 00 00 call 116d10 <_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 74 d6 13 00 pushl 0x13d674 115112: e8 b1 1b 00 00 call 116cc8 <_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 c8 d4 13 00 push $0x13d4c8 115126: e8 29 32 00 00 call 118354 <_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 ff 26 00 00 call 117848 <_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 0c 6b 00 00 call 11bc6c <_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 74 d6 13 00 pushl 0x13d674 11516e: e8 9d 1b 00 00 call 116d10 <_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 ec 41 12 00 mov 0x1241ec,%eax 109d6f: 40 inc %eax 109d70: a3 ec 41 12 00 mov %eax,0x1241ec * 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 34 41 12 00 push $0x124134 109d7d: 89 55 c4 mov %edx,-0x3c(%ebp) 109d80: e8 67 12 00 00 call 10afec <_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 5b 1e 00 00 call 10bbf1 <_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 72 0d 00 00 call 10ab48 <_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 96 0a 00 00 call 10a8dc <_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 34 41 12 00 push $0x124134 109e56: e8 7d 14 00 00 call 10b2d8 <_Objects_Free> _Semaphore_Free( the_semaphore ); _Thread_Enable_dispatch(); 109e5b: e8 91 1d 00 00 call 10bbf1 <_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 50 41 12 00 mov 0x124150,%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 68 1d 00 00 call 10bbf1 <_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 34 41 12 00 push $0x124134 109eaf: e8 4c 15 00 00 call 10b400 <_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 15 1d 00 00 call 10bbf1 <_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 df 09 00 00 call 10a8d0 <_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 3b 0c 00 00 call 10ab3c <_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 34 41 12 00 push $0x124134 109f09: e8 4a 11 00 00 call 10b058 <_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 34 41 12 00 push $0x124134 109f16: e8 bd 13 00 00 call 10b2d8 <_Objects_Free> 0, /* Not used */ 0 /* Not used */ ); } #endif _Thread_Enable_dispatch(); 109f1b: e8 d1 1c 00 00 call 10bbf1 <_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 00112d8c : #endif rtems_status_code rtems_semaphore_flush( rtems_id id ) { 112d8c: 55 push %ebp 112d8d: 89 e5 mov %esp,%ebp 112d8f: 83 ec 1c sub $0x1c,%esp 112d92: 8d 45 f4 lea -0xc(%ebp),%eax 112d95: 50 push %eax 112d96: ff 75 08 pushl 0x8(%ebp) 112d99: 68 f4 91 12 00 push $0x1291f4 112d9e: e8 bd 9c ff ff call 10ca60 <_Objects_Get> 112da3: 89 c2 mov %eax,%edx register Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _Semaphore_Get( id, &location ); switch ( location ) { 112da5: 83 c4 10 add $0x10,%esp 112da8: b8 04 00 00 00 mov $0x4,%eax 112dad: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 112db1: 75 2b jne 112dde case OBJECTS_LOCAL: if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) { 112db3: f6 42 10 30 testb $0x30,0x10(%edx) 112db7: 8d 42 14 lea 0x14(%edx),%eax 112dba: 74 0d je 112dc9 _CORE_mutex_Flush( 112dbc: 51 push %ecx 112dbd: 6a 01 push $0x1 112dbf: 6a 00 push $0x0 112dc1: 50 push %eax 112dc2: e8 0d 91 ff ff call 10bed4 <_CORE_mutex_Flush> <== ALWAYS TAKEN 112dc7: eb 0b jmp 112dd4 <== ALWAYS TAKEN &the_semaphore->Core_control.mutex, SEND_OBJECT_WAS_DELETED, CORE_MUTEX_STATUS_UNSATISFIED_NOWAIT ); } else { _CORE_semaphore_Flush( 112dc9: 52 push %edx 112dca: 6a 01 push $0x1 112dcc: 6a 00 push $0x0 112dce: 50 push %eax 112dcf: e8 6c 93 ff ff call 10c140 <_CORE_semaphore_Flush> 112dd4: 83 c4 10 add $0x10,%esp &the_semaphore->Core_control.semaphore, SEND_OBJECT_WAS_DELETED, CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT ); } _Thread_Enable_dispatch(); 112dd7: e8 f5 a4 ff ff call 10d2d1 <_Thread_Enable_dispatch> 112ddc: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 112dde: c9 leave 112ddf: 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 34 41 12 00 push $0x124134 109f4c: e8 5f 14 00 00 call 10b3b0 <_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 42 0a 00 00 call 10a9c5 <_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 a8 42 12 00 mov 0x1242a8,%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 a8 42 12 00 mov 0x1242a8,%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 ec 41 12 00 mov 0x1241ec,%ecx 109fca: 41 inc %ecx 109fcb: 89 0d ec 41 12 00 mov %ecx,0x1241ec 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 40 c3 10 00 push $0x10c340 109feb: 56 push %esi 109fec: 52 push %edx 109fed: e8 92 20 00 00 call 10c084 <_Thread_queue_Enqueue_with_handler> _Thread_Enable_dispatch(); 109ff2: e8 fa 1b 00 00 call 10bbf1 <_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 a8 42 12 00 mov 0x1242a8,%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 34 41 12 00 push $0x124134 10a02c: e8 cf 13 00 00 call 10b400 <_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 08 0a 00 00 call 10aa5c <_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 96 1b 00 00 call 10bbf1 <_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 19 0b 00 00 call 10ab88 <_CORE_semaphore_Surrender> 10a06f: 89 c3 mov %eax,%ebx &the_semaphore->Core_control.semaphore, id, MUTEX_MP_SUPPORT ); _Thread_Enable_dispatch(); 10a071: e8 7b 1b 00 00 call 10bbf1 <_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 14 63 12 00 mov 0x126314,%eax 10ae8a: 8b 80 f4 00 00 00 mov 0xf4(%eax),%eax 10ae90: 8b 0d 58 62 12 00 mov 0x126258,%ecx 10ae96: 41 inc %ecx 10ae97: 89 0d 58 62 12 00 mov %ecx,0x126258 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 11 1e 00 00 call 10cce9 <_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 4b 36 00 00 call 118c44 <_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 f4 00 00 00 mov 0xf4(%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 58 d6 13 00 mov 0x13d658,%eax 11562c: 85 c0 test %eax,%eax 11562e: 74 19 je 115649 115630: 3b 0d 7c d6 13 00 cmp 0x13d67c,%ecx 115636: 75 11 jne 115649 <== ALWAYS TAKEN _ISR_Signals_to_thread_executing = true; 115638: c6 05 10 d7 13 00 01 movb $0x1,0x13d710 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 a7 35 00 00 call 118bf5 <_Thread_Enable_dispatch> 11564e: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 115650: eb 0a jmp 11565c <== ALWAYS TAKEN } _Thread_Enable_dispatch(); 115652: e8 9e 35 00 00 call 118bf5 <_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 c8 00 00 00 mov 0xc8(%eax),%edi 10a00c: 83 c7 08 add $0x8,%edi 10a00f: be 58 3a 16 00 mov $0x163a58,%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 c4 00 00 00 mov 0xc4(%edi),%ecx 10a3cc: 8b 97 c8 00 00 00 mov 0xc8(%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 88 3c 16 00 mov 0x163c88,%edx ) { #if defined(__GNUC__) void *sp = __builtin_frame_address(0); if ( sp < the_stack->area ) { 10a295: 8b 82 c8 00 00 00 mov 0xc8(%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 c4 00 00 00 mov 0xc4(%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 b4 0d 16 00 00 cmpl $0x0,0x160db4 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 58 3a 16 00 push $0x163a58 10a2c5: 50 push %eax 10a2c6: e8 dd 1f 03 00 call 13c2a8 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 88 3c 16 00 pushl 0x163c88 <== 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 b8 0d 16 00 mov %esi,0x160db8 <== NOT EXECUTED print_handler = print; 10a16d: 89 1d bc 0d 16 00 mov %ebx,0x160dbc <== NOT EXECUTED (*print)( context, "Stack usage by thread\n"); 10a173: 51 push %ecx <== NOT EXECUTED 10a174: 51 push %ecx <== NOT EXECUTED 10a175: 68 20 1a 15 00 push $0x151a20 <== 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 37 1a 15 00 push $0x151a37 <== 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 91 66 00 00 call 110824 <== 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 b8 0d 16 00 00 movl $0x0,0x160db8 <== NOT EXECUTED 10a1a6: 00 00 00 <== NOT EXECUTED print_handler = NULL; 10a1a9: c7 05 bc 0d 16 00 00 movl $0x0,0x160dbc <== 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 c8 00 00 00 mov 0xc8(%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 c4 00 00 00 mov 0xc4(%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 58 3a 16 00 push $0x163a58 10a326: 50 push %eax 10a327: 88 55 f4 mov %dl,-0xc(%ebp) 10a32a: e8 79 1f 03 00 call 13c2a8 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 0010f050 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 10f050: 55 push %ebp 10f051: 89 e5 mov %esp,%ebp 10f053: 57 push %edi 10f054: 56 push %esi 10f055: 53 push %ebx 10f056: 83 ec 2c sub $0x2c,%esp 10f059: 8b 75 08 mov 0x8(%ebp),%esi 10f05c: 8b 5d 0c mov 0xc(%ebp),%ebx 10f05f: 8b 7d 10 mov 0x10(%ebp),%edi STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 10f062: b8 09 00 00 00 mov $0x9,%eax 10f067: 85 db test %ebx,%ebx 10f069: 74 6e je 10f0d9 return RTEMS_INVALID_ADDRESS; errno = 0; 10f06b: e8 70 2b 00 00 call 111be0 <__errno> 10f070: c7 00 00 00 00 00 movl $0x0,(%eax) *n = 0; 10f076: c7 03 00 00 00 00 movl $0x0,(%ebx) 10f07c: c7 43 04 00 00 00 00 movl $0x0,0x4(%ebx) #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); 10f083: 50 push %eax 10f084: 50 push %eax 10f085: 8d 45 e4 lea -0x1c(%ebp),%eax 10f088: 50 push %eax 10f089: 56 push %esi 10f08a: e8 11 56 00 00 call 1146a0 #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 ) 10f08f: 83 c4 10 add $0x10,%esp 10f092: 85 ff test %edi,%edi 10f094: 74 05 je 10f09b *endptr = end; 10f096: 8b 45 e4 mov -0x1c(%ebp),%eax 10f099: 89 07 mov %eax,(%edi) /* nothing was converted */ if ( end == s ) 10f09b: b8 0b 00 00 00 mov $0xb,%eax 10f0a0: 39 75 e4 cmp %esi,-0x1c(%ebp) 10f0a3: 74 2e je 10f0d3 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 10f0a5: dd 05 28 31 12 00 fldl 0x123128 10f0ab: d9 c9 fxch %st(1) 10f0ad: dd e1 fucom %st(1) 10f0af: df e0 fnstsw %ax 10f0b1: dd d9 fstp %st(1) 10f0b3: 9e sahf 10f0b4: 76 17 jbe 10f0cd 10f0b6: dd 5d c8 fstpl -0x38(%ebp) 10f0b9: e8 22 2b 00 00 call 111be0 <__errno> 10f0be: 89 c2 mov %eax,%edx 10f0c0: b8 0a 00 00 00 mov $0xa,%eax 10f0c5: 83 3a 22 cmpl $0x22,(%edx) 10f0c8: dd 45 c8 fldl -0x38(%ebp) 10f0cb: 74 0a je 10f0d7 <== NEVER TAKEN /* there was an underflow */ if ( (result == STRING_TO_MIN) && (errno == ERANGE)) return RTEMS_INVALID_NUMBER; #endif *n = (STRING_TO_TYPE) result; 10f0cd: dd 1b fstpl (%ebx) 10f0cf: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 10f0d1: eb 06 jmp 10f0d9 <== ALWAYS TAKEN 10f0d3: dd d8 fstp %st(0) 10f0d5: eb 02 jmp 10f0d9 <== ALWAYS TAKEN 10f0d7: dd d8 fstp %st(0) } 10f0d9: 8d 65 f4 lea -0xc(%ebp),%esp 10f0dc: 5b pop %ebx 10f0dd: 5e pop %esi 10f0de: 5f pop %edi 10f0df: c9 leave 10f0e0: c3 ret 0010f0e4 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 10f0e4: 55 push %ebp 10f0e5: 89 e5 mov %esp,%ebp 10f0e7: 57 push %edi 10f0e8: 56 push %esi 10f0e9: 53 push %ebx 10f0ea: 83 ec 2c sub $0x2c,%esp 10f0ed: 8b 75 08 mov 0x8(%ebp),%esi 10f0f0: 8b 5d 0c mov 0xc(%ebp),%ebx 10f0f3: 8b 7d 10 mov 0x10(%ebp),%edi STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 10f0f6: b8 09 00 00 00 mov $0x9,%eax 10f0fb: 85 db test %ebx,%ebx 10f0fd: 74 67 je 10f166 return RTEMS_INVALID_ADDRESS; errno = 0; 10f0ff: e8 dc 2a 00 00 call 111be0 <__errno> 10f104: c7 00 00 00 00 00 movl $0x0,(%eax) *n = 0; 10f10a: c7 03 00 00 00 00 movl $0x0,(%ebx) #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); 10f110: 50 push %eax 10f111: 50 push %eax 10f112: 8d 45 e4 lea -0x1c(%ebp),%eax 10f115: 50 push %eax 10f116: 56 push %esi 10f117: e8 40 55 00 00 call 11465c #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 ) 10f11c: 83 c4 10 add $0x10,%esp 10f11f: 85 ff test %edi,%edi 10f121: 74 05 je 10f128 *endptr = end; 10f123: 8b 45 e4 mov -0x1c(%ebp),%eax 10f126: 89 07 mov %eax,(%edi) /* nothing was converted */ if ( end == s ) 10f128: b8 0b 00 00 00 mov $0xb,%eax 10f12d: 39 75 e4 cmp %esi,-0x1c(%ebp) 10f130: 74 2e je 10f160 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 10f132: d9 05 30 31 12 00 flds 0x123130 10f138: d9 c9 fxch %st(1) 10f13a: dd e1 fucom %st(1) 10f13c: df e0 fnstsw %ax 10f13e: dd d9 fstp %st(1) 10f140: 9e sahf 10f141: 76 17 jbe 10f15a 10f143: d9 5d c8 fstps -0x38(%ebp) 10f146: e8 95 2a 00 00 call 111be0 <__errno> 10f14b: 89 c2 mov %eax,%edx 10f14d: b8 0a 00 00 00 mov $0xa,%eax 10f152: 83 3a 22 cmpl $0x22,(%edx) 10f155: d9 45 c8 flds -0x38(%ebp) 10f158: 74 0a je 10f164 <== NEVER TAKEN /* there was an underflow */ if ( (result == STRING_TO_MIN) && (errno == ERANGE)) return RTEMS_INVALID_NUMBER; #endif *n = (STRING_TO_TYPE) result; 10f15a: d9 1b fstps (%ebx) 10f15c: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 10f15e: eb 06 jmp 10f166 <== ALWAYS TAKEN 10f160: dd d8 fstp %st(0) 10f162: eb 02 jmp 10f166 <== ALWAYS TAKEN 10f164: dd d8 fstp %st(0) } 10f166: 8d 65 f4 lea -0xc(%ebp),%esp 10f169: 5b pop %ebx 10f16a: 5e pop %esi 10f16b: 5f pop %edi 10f16c: c9 leave 10f16d: c3 ret 0011e1dc : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 11e1dc: 55 push %ebp 11e1dd: 89 e5 mov %esp,%ebp 11e1df: 57 push %edi 11e1e0: 56 push %esi 11e1e1: 53 push %ebx 11e1e2: 83 ec 2c sub $0x2c,%esp 11e1e5: 8b 7d 08 mov 0x8(%ebp),%edi 11e1e8: 8b 5d 0c mov 0xc(%ebp),%ebx 11e1eb: 8b 55 10 mov 0x10(%ebp),%edx STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 11e1ee: b8 09 00 00 00 mov $0x9,%eax 11e1f3: 85 db test %ebx,%ebx 11e1f5: 74 5a je 11e251 return RTEMS_INVALID_ADDRESS; errno = 0; 11e1f7: 89 55 d4 mov %edx,-0x2c(%ebp) 11e1fa: e8 3d b4 01 00 call 13963c <__errno> 11e1ff: c7 00 00 00 00 00 movl $0x0,(%eax) *n = 0; 11e205: 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 ); 11e20b: 50 push %eax 11e20c: ff 75 14 pushl 0x14(%ebp) 11e20f: 8d 45 e4 lea -0x1c(%ebp),%eax 11e212: 50 push %eax 11e213: 57 push %edi 11e214: e8 ef 1f 02 00 call 140208 11e219: 89 c6 mov %eax,%esi #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 11e21b: 83 c4 10 add $0x10,%esp 11e21e: 8b 55 d4 mov -0x2c(%ebp),%edx 11e221: 85 d2 test %edx,%edx 11e223: 74 05 je 11e22a *endptr = end; 11e225: 8b 45 e4 mov -0x1c(%ebp),%eax 11e228: 89 02 mov %eax,(%edx) /* nothing was converted */ if ( end == s ) 11e22a: b8 0b 00 00 00 mov $0xb,%eax 11e22f: 39 7d e4 cmp %edi,-0x1c(%ebp) 11e232: 74 1d je 11e251 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 11e234: 81 fe ff ff ff 7f cmp $0x7fffffff,%esi 11e23a: 75 11 jne 11e24d 11e23c: e8 fb b3 01 00 call 13963c <__errno> 11e241: 89 c2 mov %eax,%edx 11e243: b8 0a 00 00 00 mov $0xa,%eax 11e248: 83 3a 22 cmpl $0x22,(%edx) 11e24b: 74 04 je 11e251 <== NEVER TAKEN /* there was an underflow */ if ( (result == STRING_TO_MIN) && (errno == ERANGE)) return RTEMS_INVALID_NUMBER; #endif *n = (STRING_TO_TYPE) result; 11e24d: 89 33 mov %esi,(%ebx) 11e24f: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; } 11e251: 8d 65 f4 lea -0xc(%ebp),%esp 11e254: 5b pop %ebx 11e255: 5e pop %esi 11e256: 5f pop %edi 11e257: c9 leave 11e258: c3 ret 0010f288 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 10f288: 55 push %ebp 10f289: 89 e5 mov %esp,%ebp 10f28b: 57 push %edi 10f28c: 56 push %esi 10f28d: 53 push %ebx 10f28e: 83 ec 2c sub $0x2c,%esp 10f291: 8b 7d 08 mov 0x8(%ebp),%edi 10f294: 8b 5d 0c mov 0xc(%ebp),%ebx 10f297: 8b 55 10 mov 0x10(%ebp),%edx STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 10f29a: b8 09 00 00 00 mov $0x9,%eax 10f29f: 85 db test %ebx,%ebx 10f2a1: 74 62 je 10f305 return RTEMS_INVALID_ADDRESS; errno = 0; 10f2a3: 89 55 d4 mov %edx,-0x2c(%ebp) 10f2a6: e8 35 29 00 00 call 111be0 <__errno> 10f2ab: c7 00 00 00 00 00 movl $0x0,(%eax) *n = 0; 10f2b1: 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 ); 10f2b7: 50 push %eax 10f2b8: ff 75 14 pushl 0x14(%ebp) 10f2bb: 8d 45 e4 lea -0x1c(%ebp),%eax 10f2be: 50 push %eax 10f2bf: 57 push %edi 10f2c0: e8 77 55 00 00 call 11483c 10f2c5: 89 c6 mov %eax,%esi #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 10f2c7: 83 c4 10 add $0x10,%esp 10f2ca: 8b 55 d4 mov -0x2c(%ebp),%edx 10f2cd: 85 d2 test %edx,%edx 10f2cf: 74 05 je 10f2d6 *endptr = end; 10f2d1: 8b 45 e4 mov -0x1c(%ebp),%eax 10f2d4: 89 02 mov %eax,(%edx) /* nothing was converted */ if ( end == s ) 10f2d6: b8 0b 00 00 00 mov $0xb,%eax 10f2db: 39 7d e4 cmp %edi,-0x1c(%ebp) 10f2de: 74 25 je 10f305 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 10f2e0: 81 fe ff ff ff 7f cmp $0x7fffffff,%esi 10f2e6: 74 08 je 10f2f0 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MIN /* there was an underflow */ if ( (result == STRING_TO_MIN) && (errno == ERANGE)) 10f2e8: 81 fe 00 00 00 80 cmp $0x80000000,%esi 10f2ee: 75 0a jne 10f2fa 10f2f0: e8 eb 28 00 00 call 111be0 <__errno> 10f2f5: 83 38 22 cmpl $0x22,(%eax) 10f2f8: 74 06 je 10f300 <== NEVER TAKEN return RTEMS_INVALID_NUMBER; #endif *n = (STRING_TO_TYPE) result; 10f2fa: 89 33 mov %esi,(%ebx) 10f2fc: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 10f2fe: eb 05 jmp 10f305 <== ALWAYS TAKEN 10f300: b8 0a 00 00 00 mov $0xa,%eax } 10f305: 8d 65 f4 lea -0xc(%ebp),%esp 10f308: 5b pop %ebx 10f309: 5e pop %esi 10f30a: 5f pop %edi 10f30b: c9 leave 10f30c: c3 ret 0010f1f0 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 10f1f0: 55 push %ebp 10f1f1: 89 e5 mov %esp,%ebp 10f1f3: 57 push %edi 10f1f4: 56 push %esi 10f1f5: 53 push %ebx 10f1f6: 83 ec 2c sub $0x2c,%esp 10f1f9: 8b 5d 0c mov 0xc(%ebp),%ebx 10f1fc: 8b 7d 10 mov 0x10(%ebp),%edi STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 10f1ff: b8 09 00 00 00 mov $0x9,%eax 10f204: 85 db test %ebx,%ebx 10f206: 74 78 je 10f280 return RTEMS_INVALID_ADDRESS; errno = 0; 10f208: e8 d3 29 00 00 call 111be0 <__errno> 10f20d: c7 00 00 00 00 00 movl $0x0,(%eax) *n = 0; 10f213: c7 03 00 00 00 00 movl $0x0,(%ebx) 10f219: 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 ); 10f220: 50 push %eax 10f221: ff 75 14 pushl 0x14(%ebp) 10f224: 8d 45 e4 lea -0x1c(%ebp),%eax 10f227: 50 push %eax 10f228: ff 75 08 pushl 0x8(%ebp) 10f22b: e8 28 56 00 00 call 114858 10f230: 89 c6 mov %eax,%esi #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 10f232: 83 c4 10 add $0x10,%esp 10f235: 85 ff test %edi,%edi 10f237: 74 05 je 10f23e *endptr = end; 10f239: 8b 45 e4 mov -0x1c(%ebp),%eax 10f23c: 89 07 mov %eax,(%edi) /* nothing was converted */ if ( end == s ) 10f23e: b8 0b 00 00 00 mov $0xb,%eax 10f243: 8b 4d 08 mov 0x8(%ebp),%ecx 10f246: 39 4d e4 cmp %ecx,-0x1c(%ebp) 10f249: 74 35 je 10f280 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 10f24b: 81 fa ff ff ff 7f cmp $0x7fffffff,%edx 10f251: 75 05 jne 10f258 10f253: 83 fe ff cmp $0xffffffff,%esi 10f256: 74 0a je 10f262 <== NEVER TAKEN return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MIN /* there was an underflow */ if ( (result == STRING_TO_MIN) && (errno == ERANGE)) 10f258: 8d 82 00 00 00 80 lea -0x80000000(%edx),%eax 10f25e: 09 f0 or %esi,%eax 10f260: 75 10 jne 10f272 10f262: 89 55 d4 mov %edx,-0x2c(%ebp) 10f265: e8 76 29 00 00 call 111be0 <__errno> 10f26a: 83 38 22 cmpl $0x22,(%eax) 10f26d: 8b 55 d4 mov -0x2c(%ebp),%edx 10f270: 74 09 je 10f27b <== NEVER TAKEN return RTEMS_INVALID_NUMBER; #endif *n = (STRING_TO_TYPE) result; 10f272: 89 33 mov %esi,(%ebx) 10f274: 89 53 04 mov %edx,0x4(%ebx) 10f277: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 10f279: eb 05 jmp 10f280 <== ALWAYS TAKEN 10f27b: b8 0a 00 00 00 mov $0xa,%eax } 10f280: 8d 65 f4 lea -0xc(%ebp),%esp 10f283: 5b pop %ebx 10f284: 5e pop %esi 10f285: 5f pop %edi 10f286: c9 leave 10f287: c3 ret 0011e25c : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 11e25c: 55 push %ebp 11e25d: 89 e5 mov %esp,%ebp 11e25f: 57 push %edi 11e260: 56 push %esi 11e261: 53 push %ebx 11e262: 83 ec 2c sub $0x2c,%esp 11e265: 8b 7d 08 mov 0x8(%ebp),%edi 11e268: 8b 5d 0c mov 0xc(%ebp),%ebx 11e26b: 8b 55 10 mov 0x10(%ebp),%edx STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 11e26e: b8 09 00 00 00 mov $0x9,%eax 11e273: 85 db test %ebx,%ebx 11e275: 74 56 je 11e2cd return RTEMS_INVALID_ADDRESS; errno = 0; 11e277: 89 55 d4 mov %edx,-0x2c(%ebp) 11e27a: e8 bd b3 01 00 call 13963c <__errno> 11e27f: c7 00 00 00 00 00 movl $0x0,(%eax) *n = 0; 11e285: 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 ); 11e28b: 50 push %eax 11e28c: 6a 10 push $0x10 11e28e: 8d 45 e4 lea -0x1c(%ebp),%eax 11e291: 50 push %eax 11e292: 57 push %edi 11e293: e8 ec 23 02 00 call 140684 11e298: 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 ) 11e29a: 83 c4 10 add $0x10,%esp 11e29d: 8b 55 d4 mov -0x2c(%ebp),%edx 11e2a0: 85 d2 test %edx,%edx 11e2a2: 74 05 je 11e2a9 *endptr = end; 11e2a4: 8b 45 e4 mov -0x1c(%ebp),%eax 11e2a7: 89 02 mov %eax,(%edx) /* nothing was converted */ if ( end == s ) 11e2a9: b8 0b 00 00 00 mov $0xb,%eax 11e2ae: 39 7d e4 cmp %edi,-0x1c(%ebp) 11e2b1: 74 1a je 11e2cd return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 11e2b3: 83 fe ff cmp $0xffffffff,%esi 11e2b6: 75 11 jne 11e2c9 <== NEVER TAKEN 11e2b8: e8 7f b3 01 00 call 13963c <__errno> <== NOT EXECUTED 11e2bd: 89 c2 mov %eax,%edx <== NOT EXECUTED 11e2bf: b8 0a 00 00 00 mov $0xa,%eax <== NOT EXECUTED 11e2c4: 83 3a 22 cmpl $0x22,(%edx) <== NOT EXECUTED 11e2c7: 74 04 je 11e2cd <== NOT EXECUTED /* there was an underflow */ if ( (result == STRING_TO_MIN) && (errno == ERANGE)) return RTEMS_INVALID_NUMBER; #endif *n = (STRING_TO_TYPE) result; 11e2c9: 89 33 mov %esi,(%ebx) 11e2cb: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; } 11e2cd: 8d 65 f4 lea -0xc(%ebp),%esp 11e2d0: 5b pop %ebx 11e2d1: 5e pop %esi 11e2d2: 5f pop %edi 11e2d3: c9 leave 11e2d4: c3 ret 0010f3e8 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 10f3e8: 55 push %ebp 10f3e9: 89 e5 mov %esp,%ebp 10f3eb: 57 push %edi 10f3ec: 56 push %esi 10f3ed: 53 push %ebx 10f3ee: 83 ec 2c sub $0x2c,%esp 10f3f1: 8b 7d 08 mov 0x8(%ebp),%edi 10f3f4: 8b 5d 0c mov 0xc(%ebp),%ebx 10f3f7: 8b 55 10 mov 0x10(%ebp),%edx STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 10f3fa: b8 09 00 00 00 mov $0x9,%eax 10f3ff: 85 db test %ebx,%ebx 10f401: 74 57 je 10f45a return RTEMS_INVALID_ADDRESS; errno = 0; 10f403: 89 55 d4 mov %edx,-0x2c(%ebp) 10f406: e8 d5 27 00 00 call 111be0 <__errno> 10f40b: c7 00 00 00 00 00 movl $0x0,(%eax) *n = 0; 10f411: 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 ); 10f417: 50 push %eax 10f418: ff 75 14 pushl 0x14(%ebp) 10f41b: 8d 45 e4 lea -0x1c(%ebp),%eax 10f41e: 50 push %eax 10f41f: 57 push %edi 10f420: e8 93 58 00 00 call 114cb8 10f425: 89 c6 mov %eax,%esi #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 10f427: 83 c4 10 add $0x10,%esp 10f42a: 8b 55 d4 mov -0x2c(%ebp),%edx 10f42d: 85 d2 test %edx,%edx 10f42f: 74 05 je 10f436 *endptr = end; 10f431: 8b 45 e4 mov -0x1c(%ebp),%eax 10f434: 89 02 mov %eax,(%edx) /* nothing was converted */ if ( end == s ) 10f436: b8 0b 00 00 00 mov $0xb,%eax 10f43b: 39 7d e4 cmp %edi,-0x1c(%ebp) 10f43e: 74 1a je 10f45a return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 10f440: 83 fe ff cmp $0xffffffff,%esi 10f443: 75 11 jne 10f456 10f445: e8 96 27 00 00 call 111be0 <__errno> 10f44a: 89 c2 mov %eax,%edx 10f44c: b8 0a 00 00 00 mov $0xa,%eax 10f451: 83 3a 22 cmpl $0x22,(%edx) 10f454: 74 04 je 10f45a <== NEVER TAKEN /* there was an underflow */ if ( (result == STRING_TO_MIN) && (errno == ERANGE)) return RTEMS_INVALID_NUMBER; #endif *n = (STRING_TO_TYPE) result; 10f456: 89 33 mov %esi,(%ebx) 10f458: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; } 10f45a: 8d 65 f4 lea -0xc(%ebp),%esp 10f45d: 5b pop %ebx 10f45e: 5e pop %esi 10f45f: 5f pop %edi 10f460: c9 leave 10f461: c3 ret 0011e334 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 11e334: 55 push %ebp 11e335: 89 e5 mov %esp,%ebp 11e337: 57 push %edi 11e338: 56 push %esi 11e339: 53 push %ebx 11e33a: 83 ec 2c sub $0x2c,%esp 11e33d: 8b 7d 08 mov 0x8(%ebp),%edi 11e340: 8b 5d 0c mov 0xc(%ebp),%ebx 11e343: 8b 55 10 mov 0x10(%ebp),%edx STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 11e346: b8 09 00 00 00 mov $0x9,%eax 11e34b: 85 db test %ebx,%ebx 11e34d: 74 57 je 11e3a6 return RTEMS_INVALID_ADDRESS; errno = 0; 11e34f: 89 55 d4 mov %edx,-0x2c(%ebp) 11e352: e8 e5 b2 01 00 call 13963c <__errno> 11e357: c7 00 00 00 00 00 movl $0x0,(%eax) *n = 0; 11e35d: 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 ); 11e363: 50 push %eax 11e364: ff 75 14 pushl 0x14(%ebp) 11e367: 8d 45 e4 lea -0x1c(%ebp),%eax 11e36a: 50 push %eax 11e36b: 57 push %edi 11e36c: e8 13 23 02 00 call 140684 11e371: 89 c6 mov %eax,%esi #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 11e373: 83 c4 10 add $0x10,%esp 11e376: 8b 55 d4 mov -0x2c(%ebp),%edx 11e379: 85 d2 test %edx,%edx 11e37b: 74 05 je 11e382 *endptr = end; 11e37d: 8b 45 e4 mov -0x1c(%ebp),%eax 11e380: 89 02 mov %eax,(%edx) /* nothing was converted */ if ( end == s ) 11e382: b8 0b 00 00 00 mov $0xb,%eax 11e387: 39 7d e4 cmp %edi,-0x1c(%ebp) 11e38a: 74 1a je 11e3a6 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 11e38c: 83 fe ff cmp $0xffffffff,%esi 11e38f: 75 11 jne 11e3a2 11e391: e8 a6 b2 01 00 call 13963c <__errno> 11e396: 89 c2 mov %eax,%edx 11e398: b8 0a 00 00 00 mov $0xa,%eax 11e39d: 83 3a 22 cmpl $0x22,(%edx) 11e3a0: 74 04 je 11e3a6 <== NEVER TAKEN /* there was an underflow */ if ( (result == STRING_TO_MIN) && (errno == ERANGE)) return RTEMS_INVALID_NUMBER; #endif *n = (STRING_TO_TYPE) result; 11e3a2: 89 33 mov %esi,(%ebx) 11e3a4: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; } 11e3a6: 8d 65 f4 lea -0xc(%ebp),%esp 11e3a9: 5b pop %ebx 11e3aa: 5e pop %esi 11e3ab: 5f pop %edi 11e3ac: c9 leave 11e3ad: c3 ret 0010f464 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 10f464: 55 push %ebp 10f465: 89 e5 mov %esp,%ebp 10f467: 57 push %edi 10f468: 56 push %esi 10f469: 53 push %ebx 10f46a: 83 ec 2c sub $0x2c,%esp 10f46d: 8b 5d 0c mov 0xc(%ebp),%ebx 10f470: 8b 7d 10 mov 0x10(%ebp),%edi STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 10f473: b8 09 00 00 00 mov $0x9,%eax 10f478: 85 db test %ebx,%ebx 10f47a: 74 6b je 10f4e7 return RTEMS_INVALID_ADDRESS; errno = 0; 10f47c: e8 5f 27 00 00 call 111be0 <__errno> 10f481: c7 00 00 00 00 00 movl $0x0,(%eax) *n = 0; 10f487: c7 03 00 00 00 00 movl $0x0,(%ebx) 10f48d: 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 ); 10f494: 50 push %eax 10f495: ff 75 14 pushl 0x14(%ebp) 10f498: 8d 45 e4 lea -0x1c(%ebp),%eax 10f49b: 50 push %eax 10f49c: ff 75 08 pushl 0x8(%ebp) 10f49f: e8 30 58 00 00 call 114cd4 10f4a4: 89 c6 mov %eax,%esi #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 10f4a6: 83 c4 10 add $0x10,%esp 10f4a9: 85 ff test %edi,%edi 10f4ab: 74 05 je 10f4b2 *endptr = end; 10f4ad: 8b 45 e4 mov -0x1c(%ebp),%eax 10f4b0: 89 07 mov %eax,(%edi) /* nothing was converted */ if ( end == s ) 10f4b2: b8 0b 00 00 00 mov $0xb,%eax 10f4b7: 8b 4d 08 mov 0x8(%ebp),%ecx 10f4ba: 39 4d e4 cmp %ecx,-0x1c(%ebp) 10f4bd: 74 28 je 10f4e7 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 10f4bf: 83 fa ff cmp $0xffffffff,%edx 10f4c2: 75 1c jne 10f4e0 10f4c4: 83 fe ff cmp $0xffffffff,%esi 10f4c7: 75 17 jne 10f4e0 <== ALWAYS TAKEN 10f4c9: 89 55 d4 mov %edx,-0x2c(%ebp) 10f4cc: e8 0f 27 00 00 call 111be0 <__errno> 10f4d1: 89 c1 mov %eax,%ecx 10f4d3: b8 0a 00 00 00 mov $0xa,%eax 10f4d8: 83 39 22 cmpl $0x22,(%ecx) 10f4db: 8b 55 d4 mov -0x2c(%ebp),%edx 10f4de: 74 07 je 10f4e7 <== NEVER TAKEN /* there was an underflow */ if ( (result == STRING_TO_MIN) && (errno == ERANGE)) return RTEMS_INVALID_NUMBER; #endif *n = (STRING_TO_TYPE) result; 10f4e0: 89 33 mov %esi,(%ebx) 10f4e2: 89 53 04 mov %edx,0x4(%ebx) 10f4e5: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; } 10f4e7: 8d 65 f4 lea -0xc(%ebp),%esp 10f4ea: 5b pop %ebx 10f4eb: 5e pop %esi 10f4ec: 5f pop %edi 10f4ed: c9 leave 10f4ee: 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 f4 01 12 00 movzbl 0x1201f4,%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 a0 42 12 00 pushl 0x1242a0 10a104: 89 55 e4 mov %edx,-0x1c(%ebp) 10a107: e8 0c 06 00 00 call 10a718 <_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 74 41 12 00 movl $0x124174,(%esp) 10a113: e8 d4 0e 00 00 call 10afec <_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 a0 42 12 00 pushl 0x1242a0 10a12d: e8 2e 06 00 00 call 10a760 <_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 74 41 12 00 push $0x124174 10a16e: e8 15 1b 00 00 call 10bc88 <_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 c3 11 00 00 call 10b348 <_Objects_Get_information_id> 10a185: 5a pop %edx 10a186: 59 pop %ecx 10a187: 53 push %ebx 10a188: 50 push %eax 10a189: e8 4a 11 00 00 call 10b2d8 <_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 a0 42 12 00 pushl 0x1242a0 10a195: e8 c6 05 00 00 call 10a760 <_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 f4 00 00 00 mov 0xf4(%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 a0 42 12 00 pushl 0x1242a0 10a1c6: e8 95 05 00 00 call 10a760 <_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 a0 42 12 00 pushl 0x1242a0 10a1e5: e8 2e 05 00 00 call 10a718 <_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 1c 1a 00 00 call 10bc14 <_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 3a 11 00 00 call 10b348 <_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 e9 16 00 00 call 10b900 <_Thread_Close> 10a217: 58 pop %eax 10a218: ff 73 08 pushl 0x8(%ebx) 10a21b: e8 28 11 00 00 call 10b348 <_Objects_Get_information_id> 10a220: 5a pop %edx 10a221: 59 pop %ecx 10a222: 53 push %ebx 10a223: 50 push %eax 10a224: e8 af 10 00 00 call 10b2d8 <_Objects_Free> _RTEMS_tasks_Free( the_thread ); _RTEMS_Unlock_allocator(); 10a229: 58 pop %eax 10a22a: ff 35 a0 42 12 00 pushl 0x1242a0 10a230: e8 2b 05 00 00 call 10a760 <_API_Mutex_Unlock> <== ALWAYS TAKEN _Thread_Enable_dispatch(); 10a235: e8 b7 19 00 00 call 10bbf1 <_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 a0 42 12 00 pushl 0x1242a0 10a247: e8 14 05 00 00 call 10a760 <_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 41 12 00 00 cmpb $0x0,0x1241c4 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 3c 85 12 00 mov 0x12853c,%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 3c 85 12 00 mov 0x12853c,%eax 10ba3f: 8b 80 f4 00 00 00 mov 0xf4(%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 7b 1c 00 00 call 10d6d4 <_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 f4 00 00 00 mov 0xf4(%edx),%eax 10ba6f: 8b 44 b0 20 mov 0x20(%eax,%esi,4),%eax 10ba73: 89 03 mov %eax,(%ebx) _Thread_Enable_dispatch(); 10ba75: e8 37 1c 00 00 call 10d6b1 <_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 a8 42 12 00 mov 0x1242a8,%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 74 41 12 00 push $0x124174 10a28d: e8 e6 12 00 00 call 10b578 <_Objects_Name_to_id_u32> return _Status_Object_name_errors_to_status[ status ]; 10a292: 8b 04 85 ac e7 11 00 mov 0x11e7ac(,%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 de 32 00 00 call 118c44 <_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 74 32 00 00 call 118bf5 <_Thread_Enable_dispatch> 115981: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 115983: eb 0a jmp 11598f <== ALWAYS TAKEN } _Thread_Enable_dispatch(); 115985: e8 6b 32 00 00 call 118bf5 <_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 00110808 : rtems_status_code rtems_task_mode( rtems_mode mode_set, rtems_mode mask, rtems_mode *previous_mode_set ) { 110808: 55 push %ebp 110809: 89 e5 mov %esp,%ebp 11080b: 57 push %edi 11080c: 56 push %esi 11080d: 53 push %ebx 11080e: 83 ec 1c sub $0x1c,%esp 110811: 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 ) 110814: b8 09 00 00 00 mov $0x9,%eax 110819: 85 c9 test %ecx,%ecx 11081b: 0f 84 f4 00 00 00 je 110915 return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; 110821: 8b 1d a8 42 12 00 mov 0x1242a8,%ebx api = executing->API_Extensions[ THREAD_API_RTEMS ]; 110827: 8b b3 f4 00 00 00 mov 0xf4(%ebx),%esi asr = &api->Signal; old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT; 11082d: 80 7b 75 01 cmpb $0x1,0x75(%ebx) 110831: 19 ff sbb %edi,%edi 110833: 81 e7 00 01 00 00 and $0x100,%edi if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE ) 110839: 83 7b 7c 00 cmpl $0x0,0x7c(%ebx) 11083d: 74 06 je 110845 old_mode |= RTEMS_NO_TIMESLICE; else old_mode |= RTEMS_TIMESLICE; 11083f: 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; 110845: 80 7e 08 01 cmpb $0x1,0x8(%esi) 110849: 19 d2 sbb %edx,%edx 11084b: 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(); 110851: 89 55 e4 mov %edx,-0x1c(%ebp) 110854: 89 4d e0 mov %ecx,-0x20(%ebp) 110857: e8 cf c5 ff ff call 10ce2b <_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; 11085c: 8b 55 e4 mov -0x1c(%ebp),%edx 11085f: 09 d0 or %edx,%eax old_mode |= _ISR_Get_level(); *previous_mode_set = old_mode; 110861: 09 f8 or %edi,%eax 110863: 8b 4d e0 mov -0x20(%ebp),%ecx 110866: 89 01 mov %eax,(%ecx) /* * These are generic thread scheduling characteristics. */ if ( mask & RTEMS_PREEMPT_MASK ) 110868: f7 45 0c 00 01 00 00 testl $0x100,0xc(%ebp) 11086f: 74 0f je 110880 executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false; 110871: 8b 45 08 mov 0x8(%ebp),%eax 110874: c1 e8 08 shr $0x8,%eax 110877: 83 f0 01 xor $0x1,%eax 11087a: 83 e0 01 and $0x1,%eax 11087d: 88 43 75 mov %al,0x75(%ebx) if ( mask & RTEMS_TIMESLICE_MASK ) { 110880: f7 45 0c 00 02 00 00 testl $0x200,0xc(%ebp) 110887: 74 21 je 1108aa if ( _Modes_Is_timeslice(mode_set) ) { 110889: f7 45 08 00 02 00 00 testl $0x200,0x8(%ebp) 110890: 74 11 je 1108a3 executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; 110892: c7 43 7c 01 00 00 00 movl $0x1,0x7c(%ebx) executing->cpu_time_budget = _Thread_Ticks_per_timeslice; 110899: a1 b8 41 12 00 mov 0x1241b8,%eax 11089e: 89 43 78 mov %eax,0x78(%ebx) 1108a1: eb 07 jmp 1108aa <== ALWAYS TAKEN } else executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; 1108a3: c7 43 7c 00 00 00 00 movl $0x0,0x7c(%ebx) /* * Set the new interrupt level */ if ( mask & RTEMS_INTERRUPT_MASK ) 1108aa: f6 45 0c 01 testb $0x1,0xc(%ebp) 1108ae: 74 0a je 1108ba */ RTEMS_INLINE_ROUTINE void _Modes_Set_interrupt_level ( Modes_Control mode_set ) { _ISR_Set_level( _Modes_Get_interrupt_level( mode_set ) ); 1108b0: f6 45 08 01 testb $0x1,0x8(%ebp) 1108b4: 74 03 je 1108b9 1108b6: fa cli 1108b7: eb 01 jmp 1108ba <== ALWAYS TAKEN 1108b9: fb sti */ is_asr_enabled = false; needs_asr_dispatching = false; if ( mask & RTEMS_ASR_MASK ) { 1108ba: f7 45 0c 00 04 00 00 testl $0x400,0xc(%ebp) 1108c1: 74 33 je 1108f6 * Output: * *previous_mode_set - previous mode set * always return RTEMS_SUCCESSFUL; */ rtems_status_code rtems_task_mode( 1108c3: 8b 45 08 mov 0x8(%ebp),%eax 1108c6: c1 e8 0a shr $0xa,%eax 1108c9: 83 f0 01 xor $0x1,%eax 1108cc: 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; 1108cf: 3a 46 08 cmp 0x8(%esi),%al 1108d2: 74 22 je 1108f6 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; 1108d4: 88 46 08 mov %al,0x8(%esi) ) { rtems_signal_set _signals; ISR_Level _level; _ISR_Disable( _level ); 1108d7: 9c pushf 1108d8: fa cli 1108d9: 58 pop %eax _signals = information->signals_pending; 1108da: 8b 56 18 mov 0x18(%esi),%edx information->signals_pending = information->signals_posted; 1108dd: 8b 4e 14 mov 0x14(%esi),%ecx 1108e0: 89 4e 18 mov %ecx,0x18(%esi) information->signals_posted = _signals; 1108e3: 89 56 14 mov %edx,0x14(%esi) _ISR_Enable( _level ); 1108e6: 50 push %eax 1108e7: 9d popf if ( !previous_mode_set ) return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; api = executing->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; 1108e8: 83 7e 14 00 cmpl $0x0,0x14(%esi) 1108ec: 74 08 je 1108f6 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; 1108ee: c6 43 74 01 movb $0x1,0x74(%ebx) 1108f2: b3 01 mov $0x1,%bl 1108f4: eb 02 jmp 1108f8 <== ALWAYS TAKEN 1108f6: 31 db xor %ebx,%ebx } } } if ( _System_state_Is_up( _System_state_Get() ) ) 1108f8: 83 3d 84 43 12 00 03 cmpl $0x3,0x124384 1108ff: 75 12 jne 110913 <== ALWAYS TAKEN if ( _Thread_Evaluate_mode() || needs_asr_dispatching ) 110901: e8 06 02 00 00 call 110b0c <_Thread_Evaluate_mode> <== ALWAYS TAKEN 110906: 84 c0 test %al,%al 110908: 75 04 jne 11090e 11090a: 84 db test %bl,%bl 11090c: 74 05 je 110913 _Thread_Dispatch(); 11090e: e8 99 b1 ff ff call 10baac <_Thread_Dispatch> 110913: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; } 110915: 83 c4 1c add $0x1c,%esp 110918: 5b pop %ebx 110919: 5e pop %esi 11091a: 5f pop %edi 11091b: c9 leave 11091c: 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 de 19 00 00 call 10c614 <_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 22 21 00 00 call 10cd74 <_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 93 19 00 00 call 10c5f1 <_Thread_Enable_dispatch> 10ac5e: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 10ac60: eb 0a jmp 10ac6c <== ALWAYS TAKEN } _Thread_Enable_dispatch(); 10ac62: e8 8a 19 00 00 call 10c5f1 <_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 d6 1a 00 00 call 10ee94 <_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 16 22 00 00 call 10f5f4 <_Thread_Resume> _Thread_Enable_dispatch(); 10d3de: e8 62 1a 00 00 call 10ee45 <_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 56 1a 00 00 call 10ee45 <_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 41 12 00 00 cmpb $0x0,0x1241c4 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 3c 85 12 00 mov 0x12853c,%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 3c 85 12 00 mov 0x12853c,%eax 10bb8d: 8b 80 f4 00 00 00 mov 0xf4(%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 2f 1b 00 00 call 10d6d4 <_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 f4 00 00 00 mov 0xf4(%edx),%eax 10bbbb: 89 74 98 20 mov %esi,0x20(%eax,%ebx,4) _Thread_Enable_dispatch(); 10bbbf: e8 ed 1a 00 00 call 10d6b1 <_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 f4 51 12 00 movzbl 0x1251f4,%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 f3 1b 00 00 call 10fc14 <_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 d8 16 00 00 call 10f728 <_Thread_Change_priority> 10e050: 83 c4 10 add $0x10,%esp } _Thread_Enable_dispatch(); 10e053: e8 6d 1b 00 00 call 10fbc5 <_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 df 18 00 00 call 10bc14 <_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 a6 22 00 00 call 10c5fc <_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 8f 18 00 00 call 10bbf1 <_Thread_Enable_dispatch> 10a362: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 10a364: eb 0a jmp 10a370 <== ALWAYS TAKEN } _Thread_Enable_dispatch(); 10a366: e8 86 18 00 00 call 10bbf1 <_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 0010eaac : */ rtems_status_code rtems_task_suspend( rtems_id id ) { 10eaac: 55 push %ebp 10eaad: 89 e5 mov %esp,%ebp 10eaaf: 83 ec 20 sub $0x20,%esp register Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 10eab2: 8d 45 f4 lea -0xc(%ebp),%eax 10eab5: 50 push %eax 10eab6: ff 75 08 pushl 0x8(%ebp) 10eab9: e8 56 d1 ff ff call 10bc14 <_Thread_Get> 10eabe: 89 c2 mov %eax,%edx switch ( location ) { 10eac0: 83 c4 10 add $0x10,%esp 10eac3: b8 04 00 00 00 mov $0x4,%eax 10eac8: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 10eacc: 75 25 jne 10eaf3 case OBJECTS_LOCAL: if ( !_States_Is_suspended( the_thread->current_state ) ) { 10eace: f6 42 10 02 testb $0x2,0x10(%edx) 10ead2: 75 15 jne 10eae9 _Thread_Suspend( the_thread ); 10ead4: 83 ec 0c sub $0xc,%esp 10ead7: 52 push %edx 10ead8: e8 93 09 00 00 call 10f470 <_Thread_Suspend> _Thread_Enable_dispatch(); 10eadd: e8 0f d1 ff ff call 10bbf1 <_Thread_Enable_dispatch> 10eae2: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 10eae4: 83 c4 10 add $0x10,%esp 10eae7: eb 0a jmp 10eaf3 <== ALWAYS TAKEN } _Thread_Enable_dispatch(); 10eae9: e8 03 d1 ff ff call 10bbf1 <_Thread_Enable_dispatch> 10eaee: b8 0f 00 00 00 mov $0xf,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10eaf3: c9 leave 10eaf4: c3 ret 00127fc8 : rtems_status_code rtems_task_variable_add( rtems_id tid, void **ptr, void (*dtor)(void *) ) { 127fc8: 55 push %ebp 127fc9: 89 e5 mov %esp,%ebp 127fcb: 57 push %edi 127fcc: 56 push %esi 127fcd: 53 push %ebx 127fce: 83 ec 1c sub $0x1c,%esp 127fd1: 8b 5d 0c mov 0xc(%ebp),%ebx 127fd4: 8b 7d 10 mov 0x10(%ebp),%edi Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp, *new; if ( !ptr ) 127fd7: b8 09 00 00 00 mov $0x9,%eax 127fdc: 85 db test %ebx,%ebx 127fde: 74 73 je 128053 return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get (tid, &location); 127fe0: 50 push %eax 127fe1: 50 push %eax 127fe2: 8d 45 e4 lea -0x1c(%ebp),%eax 127fe5: 50 push %eax 127fe6: ff 75 08 pushl 0x8(%ebp) 127fe9: e8 46 96 fe ff call 111634 <_Thread_Get> 127fee: 89 c6 mov %eax,%esi switch (location) { 127ff0: 83 c4 10 add $0x10,%esp 127ff3: b8 04 00 00 00 mov $0x4,%eax 127ff8: 83 7d e4 00 cmpl $0x0,-0x1c(%ebp) 127ffc: 75 55 jne 128053 case OBJECTS_LOCAL: /* * Figure out if the variable is already in this task's list. */ tvp = the_thread->task_variables; 127ffe: 8b 86 04 01 00 00 mov 0x104(%esi),%eax while (tvp) { 128004: eb 0c jmp 128012 <== ALWAYS TAKEN if (tvp->ptr == ptr) { 128006: 39 58 04 cmp %ebx,0x4(%eax) 128009: 75 05 jne 128010 tvp->dtor = dtor; 12800b: 89 78 10 mov %edi,0x10(%eax) 12800e: eb 3c jmp 12804c <== ALWAYS TAKEN _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } tvp = (rtems_task_variable_t *)tvp->next; 128010: 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) { 128012: 85 c0 test %eax,%eax 128014: 75 f0 jne 128006 } /* * Now allocate memory for this task variable. */ new = (rtems_task_variable_t *) 128016: 83 ec 0c sub $0xc,%esp 128019: 6a 14 push $0x14 12801b: e8 c4 a5 fe ff call 1125e4 <_Workspace_Allocate> _Workspace_Allocate(sizeof(rtems_task_variable_t)); if (new == NULL) { 128020: 83 c4 10 add $0x10,%esp 128023: 85 c0 test %eax,%eax 128025: 75 0c jne 128033 _Thread_Enable_dispatch(); 128027: e8 e5 95 fe ff call 111611 <_Thread_Enable_dispatch> 12802c: b8 1a 00 00 00 mov $0x1a,%eax return RTEMS_NO_MEMORY; 128031: eb 20 jmp 128053 <== ALWAYS TAKEN } new->gval = *ptr; 128033: 8b 13 mov (%ebx),%edx 128035: 89 50 08 mov %edx,0x8(%eax) new->ptr = ptr; 128038: 89 58 04 mov %ebx,0x4(%eax) new->dtor = dtor; 12803b: 89 78 10 mov %edi,0x10(%eax) new->next = (struct rtems_task_variable_tt *)the_thread->task_variables; 12803e: 8b 96 04 01 00 00 mov 0x104(%esi),%edx 128044: 89 10 mov %edx,(%eax) the_thread->task_variables = new; 128046: 89 86 04 01 00 00 mov %eax,0x104(%esi) _Thread_Enable_dispatch(); 12804c: e8 c0 95 fe ff call 111611 <_Thread_Enable_dispatch> 128051: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 128053: 8d 65 f4 lea -0xc(%ebp),%esp 128056: 5b pop %ebx 128057: 5e pop %esi 128058: 5f pop %edi 128059: c9 leave 12805a: c3 ret 0012805c : rtems_status_code rtems_task_variable_delete( rtems_id tid, void **ptr ) { 12805c: 55 push %ebp 12805d: 89 e5 mov %esp,%ebp 12805f: 53 push %ebx 128060: 83 ec 14 sub $0x14,%esp 128063: 8b 5d 0c mov 0xc(%ebp),%ebx Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp, *prev; if ( !ptr ) 128066: b8 09 00 00 00 mov $0x9,%eax 12806b: 85 db test %ebx,%ebx 12806d: 74 64 je 1280d3 return RTEMS_INVALID_ADDRESS; prev = NULL; the_thread = _Thread_Get (tid, &location); 12806f: 52 push %edx 128070: 52 push %edx 128071: 8d 45 f4 lea -0xc(%ebp),%eax 128074: 50 push %eax 128075: ff 75 08 pushl 0x8(%ebp) 128078: e8 b7 95 fe ff call 111634 <_Thread_Get> 12807d: 89 c1 mov %eax,%ecx switch (location) { 12807f: 83 c4 10 add $0x10,%esp 128082: b8 04 00 00 00 mov $0x4,%eax 128087: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 12808b: 75 46 jne 1280d3 case OBJECTS_LOCAL: tvp = the_thread->task_variables; 12808d: 8b 91 04 01 00 00 mov 0x104(%ecx),%edx 128093: 30 c0 xor %al,%al while (tvp) { 128095: eb 2e jmp 1280c5 <== ALWAYS TAKEN if (tvp->ptr == ptr) { 128097: 39 5a 04 cmp %ebx,0x4(%edx) 12809a: 75 25 jne 1280c1 if (prev) 12809c: 85 c0 test %eax,%eax 12809e: 8b 1a mov (%edx),%ebx 1280a0: 74 04 je 1280a6 prev->next = tvp->next; 1280a2: 89 18 mov %ebx,(%eax) 1280a4: eb 06 jmp 1280ac <== ALWAYS TAKEN else the_thread->task_variables = (rtems_task_variable_t *)tvp->next; 1280a6: 89 99 04 01 00 00 mov %ebx,0x104(%ecx) _RTEMS_Tasks_Invoke_task_variable_dtor( the_thread, tvp ); 1280ac: 50 push %eax 1280ad: 50 push %eax 1280ae: 52 push %edx 1280af: 51 push %ecx 1280b0: e8 8b 00 00 00 call 128140 <_RTEMS_Tasks_Invoke_task_variable_dtor> <== ALWAYS TAKEN _Thread_Enable_dispatch(); 1280b5: e8 57 95 fe ff call 111611 <_Thread_Enable_dispatch> 1280ba: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 1280bc: 83 c4 10 add $0x10,%esp 1280bf: eb 12 jmp 1280d3 <== ALWAYS TAKEN } prev = tvp; tvp = (rtems_task_variable_t *)tvp->next; 1280c1: 89 d0 mov %edx,%eax 1280c3: 8b 12 mov (%edx),%edx the_thread = _Thread_Get (tid, &location); switch (location) { case OBJECTS_LOCAL: tvp = the_thread->task_variables; while (tvp) { 1280c5: 85 d2 test %edx,%edx 1280c7: 75 ce jne 128097 return RTEMS_SUCCESSFUL; } prev = tvp; tvp = (rtems_task_variable_t *)tvp->next; } _Thread_Enable_dispatch(); 1280c9: e8 43 95 fe ff call 111611 <_Thread_Enable_dispatch> 1280ce: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1280d3: 8b 5d fc mov -0x4(%ebp),%ebx 1280d6: c9 leave 1280d7: c3 ret 001280d8 : rtems_status_code rtems_task_variable_get( rtems_id tid, void **ptr, void **result ) { 1280d8: 55 push %ebp 1280d9: 89 e5 mov %esp,%ebp 1280db: 56 push %esi 1280dc: 53 push %ebx 1280dd: 83 ec 10 sub $0x10,%esp 1280e0: 8b 75 0c mov 0xc(%ebp),%esi 1280e3: 8b 5d 10 mov 0x10(%ebp),%ebx Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp; if ( !ptr ) 1280e6: 85 f6 test %esi,%esi 1280e8: 74 48 je 128132 return RTEMS_INVALID_ADDRESS; if ( !result ) 1280ea: 85 db test %ebx,%ebx 1280ec: 74 44 je 128132 return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get (tid, &location); 1280ee: 50 push %eax 1280ef: 50 push %eax 1280f0: 8d 45 f4 lea -0xc(%ebp),%eax 1280f3: 50 push %eax 1280f4: ff 75 08 pushl 0x8(%ebp) 1280f7: e8 38 95 fe ff call 111634 <_Thread_Get> 1280fc: 89 c2 mov %eax,%edx switch (location) { 1280fe: 83 c4 10 add $0x10,%esp 128101: b8 04 00 00 00 mov $0x4,%eax 128106: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 12810a: 75 2b jne 128137 case OBJECTS_LOCAL: /* * Figure out if the variable is in this task's list. */ tvp = the_thread->task_variables; 12810c: 8b 82 04 01 00 00 mov 0x104(%edx),%eax while (tvp) { 128112: eb 15 jmp 128129 <== ALWAYS TAKEN if (tvp->ptr == ptr) { 128114: 39 70 04 cmp %esi,0x4(%eax) 128117: 75 0e jne 128127 /* * Should this return the current (i.e not the * saved) value if `tid' is the current task? */ *result = tvp->tval; 128119: 8b 40 0c mov 0xc(%eax),%eax 12811c: 89 03 mov %eax,(%ebx) _Thread_Enable_dispatch(); 12811e: e8 ee 94 fe ff call 111611 <_Thread_Enable_dispatch> 128123: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 128125: eb 10 jmp 128137 <== ALWAYS TAKEN } tvp = (rtems_task_variable_t *)tvp->next; 128127: 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) { 128129: 85 c0 test %eax,%eax 12812b: 75 e7 jne 128114 _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } tvp = (rtems_task_variable_t *)tvp->next; } _Thread_Enable_dispatch(); 12812d: e8 df 94 fe ff call 111611 <_Thread_Enable_dispatch> return RTEMS_INVALID_ADDRESS; 128132: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 128137: 8d 65 f8 lea -0x8(%ebp),%esp 12813a: 5b pop %ebx 12813b: 5e pop %esi 12813c: c9 leave 12813d: 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 ec 41 12 00 mov 0x1241ec,%eax 10a387: 40 inc %eax 10a388: a3 ec 41 12 00 mov %eax,0x1241ec _Thread_Disable_dispatch(); if ( ticks == 0 ) { 10a38d: 85 db test %ebx,%ebx 10a38f: 75 07 jne 10a398 _Thread_Yield_processor(); 10a391: e8 26 23 00 00 call 10c6bc <_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 a8 42 12 00 pushl 0x1242a8 10a3a2: e8 35 20 00 00 call 10c3dc <_Thread_Set_state> _Watchdog_Initialize( &_Thread_Executing->Timer, _Thread_Delay_ended, _Thread_Executing->Object.id, 10a3a7: a1 a8 42 12 00 mov 0x1242a8,%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 74 ba 10 00 movl $0x10ba74,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 c8 42 12 00 push $0x1242c8 10a3d5: e8 d6 25 00 00 call 10c9b0 <_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 0f 18 00 00 call 10bbf1 <_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 ec 73 12 00 00 cmpb $0x0,0x1273ec 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 68 74 12 00 cmp 0x127468,%eax 10b09d: 76 60 jbe 10b0ff 10b09f: a1 d8 73 12 00 mov 0x1273d8,%eax 10b0a4: 40 inc %eax 10b0a5: a3 d8 73 12 00 mov %eax,0x1273d8 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 94 74 12 00 pushl 0x127494 10b0b4: e8 23 21 00 00 call 10d1dc <_Thread_Set_state> _Watchdog_Initialize( &_Thread_Executing->Timer, _Thread_Delay_ended, _Thread_Executing->Object.id, 10b0b9: 8b 15 94 74 12 00 mov 0x127494,%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 74 c8 10 00 movl $0x10c874,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 68 74 12 00 sub 0x127468,%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 a8 74 12 00 push $0x1274a8 10b0ee: e8 29 27 00 00 call 10d81c <_Watchdog_Insert> ); _Watchdog_Insert_seconds( &_Thread_Executing->Timer, seconds - _TOD_Seconds_since_epoch() ); _Thread_Enable_dispatch(); 10b0f3: e8 f9 18 00 00 call 10c9f1 <_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 30 1f 12 00 mov %eax,0x121f30 <== NOT EXECUTED rtems_termios_raw_input_size = raw_input; 107e7f: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED 107e82: a3 34 1f 12 00 mov %eax,0x121f34 <== NOT EXECUTED rtems_termios_raw_output_size = raw_output; 107e87: 8b 45 10 mov 0x10(%ebp),%eax <== NOT EXECUTED 107e8a: a3 38 1f 12 00 mov %eax,0x121f38 <== 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 e0 40 12 00 pushl 0x1240e0 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 8c 3d 12 00 mov 0x123d8c(%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 44 14 00 00 call 10a4ec <== 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 e4 40 12 00 mov %eax,0x1240e4 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 e8 40 12 00 mov %eax,0x1240e8 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 e0 40 12 00 pushl 0x1240e0 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 3c 24 00 00 call 10a4ec <== 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 3c 3e 12 00 mov 0x123e3c,%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 98 3d 12 00 00 cmpl $0x0,0x123d98(%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 98 3d 12 00 call *0x123d98(%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 e0 40 12 00 00 cmpl $0x0,0x1240e0 107e45: 75 28 jne 107e6f sc = rtems_semaphore_create ( 107e47: 83 ec 0c sub $0xc,%esp 107e4a: 68 e0 40 12 00 push $0x1240e0 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 7d 26 00 00 call 10a4ec <== 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 a0 3d 12 00 mov 0x123da0(%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 8c 3d 12 00 mov 0x123d8c(%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 88 3d 12 00 mov 0x123d88(%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 e0 40 12 00 pushl 0x1240e0 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 e8 40 12 00 mov 0x1240e8,%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 34 1f 12 00 mov 0x121f34,%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 38 1f 12 00 mov 0x121f38,%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 30 1f 12 00 pushl 0x121f30 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 e0 40 12 00 pushl 0x1240e0 <== 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 e8 40 12 00 mov 0x1240e8,%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 e8 40 12 00 mov %ebx,0x1240e8 if (rtems_termios_ttyTail == NULL) 1092cf: 83 3d e4 40 12 00 00 cmpl $0x0,0x1240e4 1092d6: 75 06 jne 1092de rtems_termios_ttyTail = tty; 1092d8: 89 1d e4 40 12 00 mov %ebx,0x1240e4 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 3c 1f 12 00 movsbl 0x121f3c,%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 3c 1f 12 00 movsbl 0x121f3c,%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 3c 1f 12 00 movsbl 0x121f3c,%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 3c 1f 12 00 movsbl 0x121f3c,%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 3c 1f 12 00 movsbl 0x121f3c,%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 3c 1f 12 00 movsbl 0x121f3c,%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 3c 1f 12 00 mov 0x121f3c,%al 1094d0: 8d 48 01 lea 0x1(%eax),%ecx 1094d3: 88 0d 3c 1f 12 00 mov %cl,0x121f3c 1094d9: 3c 7a cmp $0x7a,%al 1094db: 75 07 jne 1094e4 <== NEVER TAKEN c = 'a'; 1094dd: c6 05 3c 1f 12 00 61 movb $0x61,0x121f3c <== 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 8a 0f 00 00 call 10a4ec <== NOT EXECUTED } } rtems_semaphore_release (rtems_termios_ttyMutex); 109562: 83 ec 0c sub $0xc,%esp 109565: ff 35 e0 40 12 00 pushl 0x1240e0 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 50 46 00 00 call 10dbdc 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 f2 20 00 00 call 10a4ec <== 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 90 3d 12 00 mov 0x123d90(%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 30 1f 12 00 mov 0x121f30,%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 9c 3d 12 00 mov 0x123d9c(%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 94 3d 12 00 mov 0x123d94(%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 e4 de 13 00 push $0x13dee4 115e32: e8 59 25 00 00 call 118390 <_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 ef 3f 00 00 call 119e48 <_Watchdog_Remove> 115e59: 83 c4 10 add $0x10,%esp _Thread_Enable_dispatch(); 115e5c: e8 94 2d 00 00 call 118bf5 <_Thread_Enable_dispatch> 115e61: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 115e63: c9 leave 115e64: c3 ret 0010a65c : rtems_status_code rtems_timer_create( rtems_name name, rtems_id *id ) { 10a65c: 55 push %ebp 10a65d: 89 e5 mov %esp,%ebp 10a65f: 57 push %edi 10a660: 56 push %esi 10a661: 53 push %ebx 10a662: 83 ec 0c sub $0xc,%esp 10a665: 8b 75 08 mov 0x8(%ebp),%esi 10a668: 8b 5d 0c mov 0xc(%ebp),%ebx Timer_Control *the_timer; if ( !rtems_is_name_valid( name ) ) 10a66b: b8 03 00 00 00 mov $0x3,%eax 10a670: 85 f6 test %esi,%esi 10a672: 74 6f je 10a6e3 return RTEMS_INVALID_NAME; if ( !id ) 10a674: b0 09 mov $0x9,%al 10a676: 85 db test %ebx,%ebx 10a678: 74 69 je 10a6e3 10a67a: a1 e4 51 12 00 mov 0x1251e4,%eax 10a67f: 40 inc %eax 10a680: a3 e4 51 12 00 mov %eax,0x1251e4 * 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 ); 10a685: 83 ec 0c sub $0xc,%esp 10a688: 68 00 5b 12 00 push $0x125b00 10a68d: e8 06 0d 00 00 call 10b398 <_Objects_Allocate> <== ALWAYS TAKEN _Thread_Disable_dispatch(); /* to prevent deletion */ the_timer = _Timer_Allocate(); if ( !the_timer ) { 10a692: 83 c4 10 add $0x10,%esp 10a695: 85 c0 test %eax,%eax 10a697: 75 0c jne 10a6a5 _Thread_Enable_dispatch(); 10a699: e8 ff 18 00 00 call 10bf9d <_Thread_Enable_dispatch> 10a69e: b8 05 00 00 00 mov $0x5,%eax return RTEMS_TOO_MANY; 10a6a3: eb 3e jmp 10a6e3 <== ALWAYS TAKEN } the_timer->the_class = TIMER_DORMANT; 10a6a5: 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; 10a6ac: c7 40 18 00 00 00 00 movl $0x0,0x18(%eax) the_watchdog->routine = routine; 10a6b3: c7 40 2c 00 00 00 00 movl $0x0,0x2c(%eax) the_watchdog->id = id; 10a6ba: c7 40 30 00 00 00 00 movl $0x0,0x30(%eax) the_watchdog->user_data = user_data; 10a6c1: 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; 10a6c8: 8b 50 08 mov 0x8(%eax),%edx 10a6cb: 0f b7 fa movzwl %dx,%edi 10a6ce: 8b 0d 1c 5b 12 00 mov 0x125b1c,%ecx 10a6d4: 89 04 b9 mov %eax,(%ecx,%edi,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 10a6d7: 89 70 0c mov %esi,0xc(%eax) &_Timer_Information, &the_timer->Object, (Objects_Name) name ); *id = the_timer->Object.id; 10a6da: 89 13 mov %edx,(%ebx) _Thread_Enable_dispatch(); 10a6dc: e8 bc 18 00 00 call 10bf9d <_Thread_Enable_dispatch> 10a6e1: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; } 10a6e3: 8d 65 f4 lea -0xc(%ebp),%esp 10a6e6: 5b pop %ebx 10a6e7: 5e pop %esi 10a6e8: 5f pop %edi 10a6e9: c9 leave 10a6ea: c3 ret 0010a6ec : rtems_id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { 10a6ec: 55 push %ebp 10a6ed: 89 e5 mov %esp,%ebp 10a6ef: 57 push %edi 10a6f0: 56 push %esi 10a6f1: 53 push %ebx 10a6f2: 83 ec 1c sub $0x1c,%esp 10a6f5: 8b 7d 08 mov 0x8(%ebp),%edi Timer_Control *the_timer; Objects_Locations location; ISR_Level level; if ( ticks == 0 ) 10a6f8: b8 0a 00 00 00 mov $0xa,%eax 10a6fd: 83 7d 0c 00 cmpl $0x0,0xc(%ebp) 10a701: 0f 84 87 00 00 00 je 10a78e return RTEMS_INVALID_NUMBER; if ( !routine ) 10a707: b0 09 mov $0x9,%al 10a709: 83 7d 10 00 cmpl $0x0,0x10(%ebp) 10a70d: 74 7f je 10a78e RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Get ( Objects_Id id, Objects_Locations *location ) { return (Timer_Control *) 10a70f: 52 push %edx 10a710: 8d 45 e4 lea -0x1c(%ebp),%eax 10a713: 50 push %eax 10a714: 57 push %edi 10a715: 68 00 5b 12 00 push $0x125b00 10a71a: e8 8d 10 00 00 call 10b7ac <_Objects_Get> 10a71f: 89 c3 mov %eax,%ebx return RTEMS_INVALID_ADDRESS; the_timer = _Timer_Get( id, &location ); switch ( location ) { 10a721: 83 c4 10 add $0x10,%esp 10a724: b8 04 00 00 00 mov $0x4,%eax 10a729: 83 7d e4 00 cmpl $0x0,-0x1c(%ebp) 10a72d: 75 5f jne 10a78e case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 10a72f: 8d 73 10 lea 0x10(%ebx),%esi 10a732: 83 ec 0c sub $0xc,%esp 10a735: 56 push %esi 10a736: e8 39 27 00 00 call 10ce74 <_Watchdog_Remove> _ISR_Disable( level ); 10a73b: 9c pushf 10a73c: fa cli 10a73d: 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 ) { 10a73e: 83 c4 10 add $0x10,%esp 10a741: 83 7b 18 00 cmpl $0x0,0x18(%ebx) 10a745: 74 0b je 10a752 _ISR_Enable( level ); 10a747: 50 push %eax 10a748: 9d popf _Thread_Enable_dispatch(); 10a749: e8 4f 18 00 00 call 10bf9d <_Thread_Enable_dispatch> 10a74e: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 10a750: eb 3c jmp 10a78e <== 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; 10a752: 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; 10a759: c7 43 18 00 00 00 00 movl $0x0,0x18(%ebx) the_watchdog->routine = routine; 10a760: 8b 55 10 mov 0x10(%ebp),%edx 10a763: 89 53 2c mov %edx,0x2c(%ebx) the_watchdog->id = id; 10a766: 89 7b 30 mov %edi,0x30(%ebx) the_watchdog->user_data = user_data; 10a769: 8b 55 14 mov 0x14(%ebp),%edx 10a76c: 89 53 34 mov %edx,0x34(%ebx) _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); _ISR_Enable( level ); 10a76f: 50 push %eax 10a770: 9d popf Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 10a771: 8b 45 0c mov 0xc(%ebp),%eax 10a774: 89 43 1c mov %eax,0x1c(%ebx) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 10a777: 50 push %eax 10a778: 50 push %eax 10a779: 56 push %esi 10a77a: 68 c0 52 12 00 push $0x1252c0 10a77f: e8 d8 25 00 00 call 10cd5c <_Watchdog_Insert> _Watchdog_Insert_ticks( &the_timer->Ticker, ticks ); _Thread_Enable_dispatch(); 10a784: e8 14 18 00 00 call 10bf9d <_Thread_Enable_dispatch> 10a789: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 10a78b: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10a78e: 8d 65 f4 lea -0xc(%ebp),%esp 10a791: 5b pop %ebx 10a792: 5e pop %esi 10a793: 5f pop %edi 10a794: c9 leave 10a795: 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 d4 d5 13 00 00 cmpb $0x0,0x13d5d4 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 50 d6 13 00 cmp 0x13d650,%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 e4 de 13 00 push $0x13dee4 116064: e8 27 23 00 00 call 118390 <_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 c3 3d 00 00 call 119e48 <_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 50 d6 13 00 sub 0x13d650,%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 90 d6 13 00 push $0x13d690 1160b6: e8 75 3c 00 00 call 119d30 <_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 35 2b 00 00 call 118bf5 <_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 f4 51 13 00 movzbl 0x1351f4,%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 c0 d5 13 00 mov 0x13d5c0,%eax 116399: 40 inc %eax 11639a: a3 c0 d5 13 00 mov %eax,0x13d5c0 /* * Just to make sure this is only called once. */ _Thread_Disable_dispatch(); tmpInitialized = initialized; 11639f: 8a 15 e8 8e 13 00 mov 0x138ee8,%dl initialized = true; 1163a5: c6 05 e8 8e 13 00 01 movb $0x1,0x138ee8 _Thread_Enable_dispatch(); 1163ac: 88 55 e4 mov %dl,-0x1c(%ebp) 1163af: e8 41 28 00 00 call 118bf5 <_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 e8 8e 13 00 00 movb $0x0,0x138ee8 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 64 d5 13 00 mov 0x13d564,%edx 116403: 8b 14 8a mov (%edx,%ecx,4),%edx 116406: 89 15 ec 8e 13 00 mov %edx,0x138eec */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 11640c: c7 05 1c 8f 13 00 20 movl $0x138f20,0x138f1c 116413: 8f 13 00 the_chain->permanent_null = NULL; 116416: c7 05 20 8f 13 00 00 movl $0x0,0x138f20 11641d: 00 00 00 the_chain->last = _Chain_Head(the_chain); 116420: c7 05 24 8f 13 00 1c movl $0x138f1c,0x138f24 116427: 8f 13 00 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 11642a: c7 05 54 8f 13 00 58 movl $0x138f58,0x138f54 116431: 8f 13 00 the_chain->permanent_null = NULL; 116434: c7 05 58 8f 13 00 00 movl $0x0,0x138f58 11643b: 00 00 00 the_chain->last = _Chain_Head(the_chain); 11643e: c7 05 5c 8f 13 00 54 movl $0x138f54,0x138f5c 116445: 8f 13 00 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 116448: c7 05 fc 8e 13 00 00 movl $0x0,0x138efc 11644f: 00 00 00 the_watchdog->routine = routine; 116452: c7 05 10 8f 13 00 78 movl $0x118a78,0x138f10 116459: 8a 11 00 the_watchdog->id = id; 11645c: a3 14 8f 13 00 mov %eax,0x138f14 the_watchdog->user_data = user_data; 116461: c7 05 18 8f 13 00 00 movl $0x0,0x138f18 116468: 00 00 00 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 11646b: c7 05 34 8f 13 00 00 movl $0x0,0x138f34 116472: 00 00 00 the_watchdog->routine = routine; 116475: c7 05 48 8f 13 00 78 movl $0x118a78,0x138f48 11647c: 8a 11 00 the_watchdog->id = id; 11647f: a3 4c 8f 13 00 mov %eax,0x138f4c the_watchdog->user_data = user_data; 116484: c7 05 50 8f 13 00 00 movl $0x0,0x138f50 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 f0 8e 13 00 ff movl $0x1166ff,0x138ef0 116495: 66 11 00 ts->Interval_watchdogs.last_snapshot = _Watchdog_Ticks_since_boot; 116498: 8b 15 0c d7 13 00 mov 0x13d70c,%edx 11649e: 89 15 28 8f 13 00 mov %edx,0x138f28 ts->TOD_watchdogs.last_snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); 1164a4: 8b 15 50 d6 13 00 mov 0x13d650,%edx 1164aa: 89 15 60 8f 13 00 mov %edx,0x138f60 ts->insert_chain = NULL; 1164b0: c7 05 64 8f 13 00 00 movl $0x0,0x138f64 1164b7: 00 00 00 ts->active = false; 1164ba: c6 05 68 8f 13 00 00 movb $0x0,0x138f68 /* * The default timer server is now available. */ _Timer_server = ts; 1164c1: c7 05 24 df 13 00 ec movl $0x138eec,0x13df24 1164c8: 8e 13 00 /* * Start the timer server */ status = rtems_task_start( 1164cb: 52 push %edx 1164cc: 68 ec 8e 13 00 push $0x138eec 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 e4 de 13 00 push $0x13dee4 116164: e8 27 22 00 00 call 118390 <_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 bc 3c 00 00 call 119e48 <_Watchdog_Remove> _Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker ); 11618c: 59 pop %ecx 11618d: 58 pop %eax 11618e: 53 push %ebx 11618f: 68 9c d6 13 00 push $0x13d69c 116194: e8 97 3b 00 00 call 119d30 <_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 24 df 13 00 mov 0x13df24,%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 90 3c 00 00 call 119e48 <_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 2c 2a 00 00 call 118bf5 <_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 24 df 13 00 mov 0x13df24,%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 e4 de 13 00 push $0x13dee4 116212: e8 79 21 00 00 call 118390 <_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 15 3c 00 00 call 119e48 <_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 af 29 00 00 call 118bf5 <_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 7a 29 00 00 call 118bf5 <_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 24 df 13 00 mov 0x13df24,%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 d4 d5 13 00 00 cmpb $0x0,0x13d5d4 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 50 d6 13 00 cmp 0x13d650,%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 e4 de 13 00 push $0x13dee4 1162f9: e8 92 20 00 00 call 118390 <_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 2e 3b 00 00 call 119e48 <_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 50 d6 13 00 sub 0x13d650,%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 a6 28 00 00 call 118bf5 <_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 e8 b1 12 00 mov 0x12b1e8,%eax <== NOT EXECUTED 10b3a9: 8d 50 01 lea 0x1(%eax),%edx <== NOT EXECUTED 10b3ac: 89 15 e8 b1 12 00 mov %edx,0x12b1e8 <== 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 48 b3 12 00 mov 0x12b348,%eax <== NOT EXECUTED 10b3bb: 40 inc %eax <== NOT EXECUTED 10b3bc: a3 48 b3 12 00 mov %eax,0x12b348 <== NOT EXECUTED _Thread_Disable_dispatch(); /* disable task switches */ /* don't aggravate things */ if (rtems_panic_in_progress > 2) 10b3c1: 83 3d e8 b1 12 00 02 cmpl $0x2,0x12b1e8 <== 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 80 90 12 00 mov 0x129080,%eax <== NOT EXECUTED 10b3d6: ff 70 08 pushl 0x8(%eax) <== NOT EXECUTED 10b3d9: e8 62 bd 00 00 call 117140 <== 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 f4 b9 00 00 call 116dec <__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 80 90 12 00 mov 0x129080,%eax <== NOT EXECUTED 10b406: ff 70 0c pushl 0xc(%eax) <== NOT EXECUTED 10b409: e8 0a 19 01 00 call 11cd18 <== 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 d3 4b 12 00 push $0x124bd3 <== NOT EXECUTED 10b42a: a1 80 90 12 00 mov 0x129080,%eax <== NOT EXECUTED 10b42f: ff 70 0c pushl 0xc(%eax) <== NOT EXECUTED 10b432: e8 51 c0 00 00 call 117488 <== 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 03 c8 00 00 call 117c50 <== 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 f2 c7 00 00 call 117c50 <== NOT EXECUTED 10b45e: 83 c4 0c add $0xc,%esp <== NOT EXECUTED 10b461: 50 push %eax <== NOT EXECUTED 10b462: 68 e1 4b 12 00 push $0x124be1 <== 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 ee 4b 12 00 push $0x124bee <== NOT EXECUTED 10b470: a1 80 90 12 00 mov 0x129080,%eax <== NOT EXECUTED 10b475: ff 70 0c pushl 0xc(%eax) <== NOT EXECUTED 10b478: e8 0b c0 00 00 call 117488 <== 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 c0 52 12 00 push $0x1252c0 <== NOT EXECUTED 10b48a: a1 80 90 12 00 mov 0x129080,%eax <== NOT EXECUTED 10b48f: ff 70 0c pushl 0xc(%eax) <== NOT EXECUTED 10b492: e8 f1 bf 00 00 call 117488 <== NOT EXECUTED 10b497: 89 c7 mov %eax,%edi <== NOT EXECUTED (void) fflush(stderr); 10b499: 59 pop %ecx <== NOT EXECUTED 10b49a: a1 80 90 12 00 mov 0x129080,%eax <== NOT EXECUTED 10b49f: ff 70 0c pushl 0xc(%eax) <== NOT EXECUTED 10b4a2: e8 99 bc 00 00 call 117140 <== 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 02 4c 12 00 push $0x124c02 <== 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 17 4c 12 00 push $0x124c17 <== NOT EXECUTED 10b4dd: 6a 00 push $0x0 <== NOT EXECUTED 10b4df: e8 27 00 00 00 call 10b50b <== NOT EXECUTED abort(); 10b4e4: e8 cf b8 00 00 call 116db8 <== 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 0010ab1d : */ bool rtems_workspace_allocate( uintptr_t bytes, void **pointer ) { 10ab1d: 55 push %ebp 10ab1e: 89 e5 mov %esp,%ebp 10ab20: 53 push %ebx 10ab21: 83 ec 04 sub $0x4,%esp 10ab24: 8b 45 08 mov 0x8(%ebp),%eax 10ab27: 8b 5d 0c mov 0xc(%ebp),%ebx void *ptr; /* * check the arguments */ if ( !pointer ) 10ab2a: 85 db test %ebx,%ebx 10ab2c: 74 20 je 10ab4e return false; if ( !bytes ) 10ab2e: 85 c0 test %eax,%eax 10ab30: 74 1c je 10ab4e RTEMS_INLINE_ROUTINE void *_Protected_heap_Allocate( Heap_Control *heap, uintptr_t size ) { return _Protected_heap_Allocate_aligned_with_boundary( heap, size, 0, 0 ); 10ab32: 6a 00 push $0x0 10ab34: 6a 00 push $0x0 10ab36: 50 push %eax 10ab37: 68 04 7d 12 00 push $0x127d04 10ab3c: e8 5f 13 00 00 call 10bea0 <_Protected_heap_Allocate_aligned_with_boundary> /* * Allocate the memory */ ptr = _Protected_heap_Allocate( &_Workspace_Area, (intptr_t) bytes ); if (!ptr) 10ab41: 83 c4 10 add $0x10,%esp 10ab44: 85 c0 test %eax,%eax 10ab46: 74 06 je 10ab4e return false; *pointer = ptr; 10ab48: 89 03 mov %eax,(%ebx) 10ab4a: b0 01 mov $0x1,%al return true; 10ab4c: eb 02 jmp 10ab50 <== ALWAYS TAKEN 10ab4e: 31 c0 xor %eax,%eax } 10ab50: 8b 5d fc mov -0x4(%ebp),%ebx 10ab53: c9 leave 10ab54: c3 ret 0012590e : /* * Extract an integer value from the database */ static int scanInt(FILE *fp, int *val) { 12590e: 55 push %ebp 12590f: 89 e5 mov %esp,%ebp 125911: 57 push %edi 125912: 56 push %esi 125913: 53 push %ebx 125914: 83 ec 3c sub $0x3c,%esp 125917: 89 c3 mov %eax,%ebx 125919: 89 55 e0 mov %edx,-0x20(%ebp) 12591c: 31 f6 xor %esi,%esi 12591e: c7 45 e4 ff ff ff 7f movl $0x7fffffff,-0x1c(%ebp) 125925: 31 ff xor %edi,%edi sign = 1; } if (!isdigit(c)) return 0; d = c - '0'; if ((i > (limit / 10)) 125927: 89 7d c4 mov %edi,-0x3c(%ebp) unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp); 12592a: 8b 43 04 mov 0x4(%ebx),%eax 12592d: 48 dec %eax 12592e: 89 43 04 mov %eax,0x4(%ebx) 125931: 85 c0 test %eax,%eax 125933: 79 15 jns 12594a <== NEVER TAKEN 125935: 50 push %eax <== NOT EXECUTED 125936: 50 push %eax <== NOT EXECUTED 125937: 53 push %ebx <== NOT EXECUTED 125938: ff 35 a0 e9 15 00 pushl 0x15e9a0 <== NOT EXECUTED 12593e: e8 55 87 01 00 call 13e098 <__srget_r> <== NOT EXECUTED 125943: 89 c1 mov %eax,%ecx <== NOT EXECUTED 125945: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 125948: eb 08 jmp 125952 <== NOT EXECUTED 12594a: 8b 03 mov (%ebx),%eax 12594c: 0f b6 08 movzbl (%eax),%ecx 12594f: 40 inc %eax 125950: 89 03 mov %eax,(%ebx) if (c == ':') 125952: 83 f9 3a cmp $0x3a,%ecx 125955: 74 4a je 1259a1 break; if (sign == 0) { 125957: 85 f6 test %esi,%esi 125959: 75 11 jne 12596c <== ALWAYS TAKEN if (c == '-') { sign = -1; limit++; continue; 12595b: 66 be 01 00 mov $0x1,%si for (;;) { c = getc(fp); if (c == ':') break; if (sign == 0) { if (c == '-') { 12595f: 83 f9 2d cmp $0x2d,%ecx 125962: 75 08 jne 12596c <== NEVER TAKEN sign = -1; limit++; 125964: ff 45 e4 incl -0x1c(%ebp) <== NOT EXECUTED 125967: 83 ce ff or $0xffffffff,%esi <== NOT EXECUTED continue; 12596a: eb be jmp 12592a <== NOT EXECUTED } sign = 1; } if (!isdigit(c)) 12596c: a1 7c e9 15 00 mov 0x15e97c,%eax 125971: f6 44 08 01 04 testb $0x4,0x1(%eax,%ecx,1) 125976: 74 3f je 1259b7 <== ALWAYS TAKEN return 0; d = c - '0'; if ((i > (limit / 10)) 125978: 8b 45 e4 mov -0x1c(%ebp),%eax 12597b: bf 0a 00 00 00 mov $0xa,%edi 125980: 31 d2 xor %edx,%edx 125982: f7 f7 div %edi 125984: 89 55 d4 mov %edx,-0x2c(%ebp) 125987: 39 45 c4 cmp %eax,-0x3c(%ebp) 12598a: 77 2b ja 1259b7 <== ALWAYS TAKEN } sign = 1; } if (!isdigit(c)) return 0; d = c - '0'; 12598c: 83 e9 30 sub $0x30,%ecx if ((i > (limit / 10)) 12598f: 39 45 c4 cmp %eax,-0x3c(%ebp) 125992: 75 04 jne 125998 <== NEVER TAKEN 125994: 39 d1 cmp %edx,%ecx <== NOT EXECUTED 125996: 77 1f ja 1259b7 <== NOT EXECUTED || ((i == (limit / 10)) && (d > (limit % 10)))) return 0; i = i * 10 + d; 125998: 6b 7d c4 0a imul $0xa,-0x3c(%ebp),%edi 12599c: 8d 3c 39 lea (%ecx,%edi,1),%edi 12599f: eb 86 jmp 125927 <== ALWAYS TAKEN 1259a1: 8b 7d c4 mov -0x3c(%ebp),%edi } if (sign == 0) 1259a4: 85 f6 test %esi,%esi 1259a6: 74 0f je 1259b7 <== ALWAYS TAKEN return 0; *val = i * sign; 1259a8: 0f af f7 imul %edi,%esi 1259ab: 8b 45 e0 mov -0x20(%ebp),%eax 1259ae: 89 30 mov %esi,(%eax) 1259b0: b8 01 00 00 00 mov $0x1,%eax return 1; 1259b5: eb 02 jmp 1259b9 <== ALWAYS TAKEN 1259b7: 31 c0 xor %eax,%eax <== NOT EXECUTED } 1259b9: 8d 65 f4 lea -0xc(%ebp),%esp 1259bc: 5b pop %ebx 1259bd: 5e pop %esi 1259be: 5f pop %edi 1259bf: c9 leave 1259c0: c3 ret 001259c1 : /* * Extract a string value from the database */ static int scanString(FILE *fp, char **name, char **bufp, size_t *nleft, int nlFlag) { 1259c1: 55 push %ebp 1259c2: 89 e5 mov %esp,%ebp 1259c4: 57 push %edi 1259c5: 56 push %esi 1259c6: 53 push %ebx 1259c7: 83 ec 1c sub $0x1c,%esp 1259ca: 89 c3 mov %eax,%ebx 1259cc: 89 ce mov %ecx,%esi 1259ce: 8b 7d 08 mov 0x8(%ebp),%edi 1259d1: 8b 4d 0c mov 0xc(%ebp),%ecx int c; *name = *bufp; 1259d4: 8b 06 mov (%esi),%eax 1259d6: 89 02 mov %eax,(%edx) for (;;) { c = getc(fp); 1259d8: 8b 43 04 mov 0x4(%ebx),%eax 1259db: 48 dec %eax 1259dc: 89 43 04 mov %eax,0x4(%ebx) 1259df: 85 c0 test %eax,%eax 1259e1: 79 19 jns 1259fc 1259e3: 52 push %edx 1259e4: 52 push %edx 1259e5: 53 push %ebx 1259e6: ff 35 a0 e9 15 00 pushl 0x15e9a0 1259ec: 89 4d e4 mov %ecx,-0x1c(%ebp) 1259ef: e8 a4 86 01 00 call 13e098 <__srget_r> 1259f4: 83 c4 10 add $0x10,%esp 1259f7: 8b 4d e4 mov -0x1c(%ebp),%ecx 1259fa: eb 08 jmp 125a04 <== ALWAYS TAKEN 1259fc: 8b 13 mov (%ebx),%edx 1259fe: 0f b6 02 movzbl (%edx),%eax 125a01: 42 inc %edx 125a02: 89 13 mov %edx,(%ebx) if (c == ':') { 125a04: 83 f8 3a cmp $0x3a,%eax 125a07: 75 06 jne 125a0f if (nlFlag) 125a09: 85 c9 test %ecx,%ecx 125a0b: 74 21 je 125a2e <== NEVER TAKEN 125a0d: eb 2f jmp 125a3e <== NOT EXECUTED return 0; break; } if (c == '\n') { 125a0f: 83 f8 0a cmp $0xa,%eax 125a12: 75 06 jne 125a1a if (!nlFlag) 125a14: 85 c9 test %ecx,%ecx 125a16: 75 16 jne 125a2e <== NEVER TAKEN 125a18: eb 24 jmp 125a3e <== NOT EXECUTED return 0; break; } if (c == EOF) 125a1a: 83 f8 ff cmp $0xffffffff,%eax 125a1d: 74 1f je 125a3e <== ALWAYS TAKEN return 0; if (*nleft < 2) 125a1f: 83 3f 01 cmpl $0x1,(%edi) 125a22: 76 1a jbe 125a3e <== ALWAYS TAKEN return 0; **bufp = c; 125a24: 8b 16 mov (%esi),%edx 125a26: 88 02 mov %al,(%edx) ++(*bufp); 125a28: ff 06 incl (%esi) --(*nleft); 125a2a: ff 0f decl (%edi) } 125a2c: eb aa jmp 1259d8 <== ALWAYS TAKEN **bufp = '\0'; 125a2e: 8b 06 mov (%esi),%eax 125a30: c6 00 00 movb $0x0,(%eax) ++(*bufp); 125a33: ff 06 incl (%esi) --(*nleft); 125a35: ff 0f decl (%edi) 125a37: b8 01 00 00 00 mov $0x1,%eax return 1; 125a3c: eb 02 jmp 125a40 <== ALWAYS TAKEN 125a3e: 31 c0 xor %eax,%eax <== NOT EXECUTED } 125a40: 8d 65 f4 lea -0xc(%ebp),%esp 125a43: 5b pop %ebx 125a44: 5e pop %esi 125a45: 5f pop %edi 125a46: c9 leave 125a47: c3 ret 00125a48 : FILE *fp, struct group *grp, char *buffer, size_t bufsize ) { 125a48: 55 push %ebp 125a49: 89 e5 mov %esp,%ebp 125a4b: 57 push %edi 125a4c: 56 push %esi 125a4d: 53 push %ebx 125a4e: 83 ec 34 sub $0x34,%esp 125a51: 89 c6 mov %eax,%esi 125a53: 89 d3 mov %edx,%ebx 125a55: 89 4d d4 mov %ecx,-0x2c(%ebp) int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 125a58: 8d 7d d4 lea -0x2c(%ebp),%edi 125a5b: 6a 00 push $0x0 125a5d: 8d 45 08 lea 0x8(%ebp),%eax 125a60: 50 push %eax 125a61: 89 f9 mov %edi,%ecx 125a63: 89 f0 mov %esi,%eax 125a65: e8 57 ff ff ff call 1259c1 <== ALWAYS TAKEN 125a6a: 83 c4 10 add $0x10,%esp 125a6d: 85 c0 test %eax,%eax 125a6f: 0f 84 c8 00 00 00 je 125b3d <== ALWAYS TAKEN || !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0) 125a75: 50 push %eax 125a76: 50 push %eax 125a77: 8d 53 04 lea 0x4(%ebx),%edx 125a7a: 6a 00 push $0x0 125a7c: 8d 45 08 lea 0x8(%ebp),%eax 125a7f: 50 push %eax 125a80: 89 f9 mov %edi,%ecx 125a82: 89 f0 mov %esi,%eax 125a84: e8 38 ff ff ff call 1259c1 <== ALWAYS TAKEN { int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 125a89: 83 c4 10 add $0x10,%esp 125a8c: 85 c0 test %eax,%eax 125a8e: 0f 84 a9 00 00 00 je 125b3d <== ALWAYS TAKEN || !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &grgid) 125a94: 8d 55 e4 lea -0x1c(%ebp),%edx 125a97: 89 f0 mov %esi,%eax 125a99: e8 70 fe ff ff call 12590e <== ALWAYS TAKEN { int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 125a9e: 85 c0 test %eax,%eax 125aa0: 0f 84 97 00 00 00 je 125b3d <== ALWAYS TAKEN || !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &grgid) || !scanString(fp, &grmem, &buffer, &bufsize, 1)) 125aa6: 51 push %ecx 125aa7: 51 push %ecx 125aa8: 8d 55 e0 lea -0x20(%ebp),%edx 125aab: 6a 01 push $0x1 125aad: 8d 45 08 lea 0x8(%ebp),%eax 125ab0: 50 push %eax 125ab1: 89 f9 mov %edi,%ecx 125ab3: 89 f0 mov %esi,%eax 125ab5: e8 07 ff ff ff call 1259c1 <== ALWAYS TAKEN { int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 125aba: 83 c4 10 add $0x10,%esp 125abd: 85 c0 test %eax,%eax 125abf: 74 7c je 125b3d <== 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; 125ac1: 8b 45 e4 mov -0x1c(%ebp),%eax 125ac4: 66 89 43 08 mov %ax,0x8(%ebx) /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 125ac8: 8b 7d e0 mov -0x20(%ebp),%edi 125acb: 89 fa mov %edi,%edx 125acd: b8 01 00 00 00 mov $0x1,%eax 125ad2: eb 12 jmp 125ae6 <== ALWAYS TAKEN if(*cp == ',') memcount++; 125ad4: 80 7d d3 2c cmpb $0x2c,-0x2d(%ebp) 125ad8: 0f 94 c1 sete %cl 125adb: 89 ce mov %ecx,%esi 125add: 81 e6 ff 00 00 00 and $0xff,%esi 125ae3: 01 f0 add %esi,%eax grp->gr_gid = grgid; /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 125ae5: 42 inc %edx 125ae6: 8a 0a mov (%edx),%cl 125ae8: 88 4d d3 mov %cl,-0x2d(%ebp) 125aeb: 84 c9 test %cl,%cl 125aed: 75 e5 jne 125ad4 } /* * Hack to produce (hopefully) a suitably-aligned array of pointers */ if (bufsize < (((memcount+1)*sizeof(char *)) + 15)) 125aef: 8d 04 85 13 00 00 00 lea 0x13(,%eax,4),%eax 125af6: 39 45 08 cmp %eax,0x8(%ebp) 125af9: 72 42 jb 125b3d <== ALWAYS TAKEN return 0; grp->gr_mem = (char **)(((uintptr_t)buffer + 15) & ~15); 125afb: 8b 45 d4 mov -0x2c(%ebp),%eax 125afe: 83 c0 0f add $0xf,%eax 125b01: 83 e0 f0 and $0xfffffff0,%eax 125b04: 89 43 0c mov %eax,0xc(%ebx) /* * Fill in pointer array */ grp->gr_mem[0] = grmem; 125b07: 89 38 mov %edi,(%eax) 125b09: 8b 45 e0 mov -0x20(%ebp),%eax 125b0c: 40 inc %eax 125b0d: ba 01 00 00 00 mov $0x1,%edx for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 125b12: eb 11 jmp 125b25 <== ALWAYS TAKEN if(*cp == ',') { 125b14: 80 f9 2c cmp $0x2c,%cl 125b17: 75 0b jne 125b24 <== NEVER TAKEN *cp = '\0'; 125b19: c6 40 ff 00 movb $0x0,-0x1(%eax) <== NOT EXECUTED grp->gr_mem[memcount++] = cp + 1; 125b1d: 8b 4b 0c mov 0xc(%ebx),%ecx <== NOT EXECUTED 125b20: 89 04 91 mov %eax,(%ecx,%edx,4) <== NOT EXECUTED 125b23: 42 inc %edx <== NOT EXECUTED 125b24: 40 inc %eax /* * Fill in pointer array */ grp->gr_mem[0] = grmem; for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 125b25: 8a 48 ff mov -0x1(%eax),%cl 125b28: 84 c9 test %cl,%cl 125b2a: 75 e8 jne 125b14 if(*cp == ',') { *cp = '\0'; grp->gr_mem[memcount++] = cp + 1; } } grp->gr_mem[memcount] = NULL; 125b2c: 8b 43 0c mov 0xc(%ebx),%eax 125b2f: c7 04 90 00 00 00 00 movl $0x0,(%eax,%edx,4) 125b36: b8 01 00 00 00 mov $0x1,%eax return 1; 125b3b: eb 02 jmp 125b3f <== ALWAYS TAKEN 125b3d: 31 c0 xor %eax,%eax <== NOT EXECUTED } 125b3f: 8d 65 f4 lea -0xc(%ebp),%esp 125b42: 5b pop %ebx 125b43: 5e pop %esi 125b44: 5f pop %edi 125b45: c9 leave 125b46: c3 ret 00125b7f : FILE *fp, struct passwd *pwd, char *buffer, size_t bufsize ) { 125b7f: 55 push %ebp 125b80: 89 e5 mov %esp,%ebp 125b82: 57 push %edi 125b83: 56 push %esi 125b84: 53 push %ebx 125b85: 83 ec 34 sub $0x34,%esp 125b88: 89 c6 mov %eax,%esi 125b8a: 89 d3 mov %edx,%ebx 125b8c: 89 4d d4 mov %ecx,-0x2c(%ebp) int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 125b8f: 8d 7d d4 lea -0x2c(%ebp),%edi 125b92: 6a 00 push $0x0 125b94: 8d 45 08 lea 0x8(%ebp),%eax 125b97: 50 push %eax 125b98: 89 f9 mov %edi,%ecx 125b9a: 89 f0 mov %esi,%eax 125b9c: e8 20 fe ff ff call 1259c1 <== ALWAYS TAKEN 125ba1: 83 c4 10 add $0x10,%esp 125ba4: 85 c0 test %eax,%eax 125ba6: 0f 84 c4 00 00 00 je 125c70 <== ALWAYS TAKEN || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) 125bac: 51 push %ecx 125bad: 51 push %ecx 125bae: 8d 53 04 lea 0x4(%ebx),%edx 125bb1: 6a 00 push $0x0 125bb3: 8d 45 08 lea 0x8(%ebp),%eax 125bb6: 50 push %eax 125bb7: 89 f9 mov %edi,%ecx 125bb9: 89 f0 mov %esi,%eax 125bbb: e8 01 fe ff ff call 1259c1 <== ALWAYS TAKEN size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 125bc0: 83 c4 10 add $0x10,%esp 125bc3: 85 c0 test %eax,%eax 125bc5: 0f 84 a5 00 00 00 je 125c70 <== ALWAYS TAKEN || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &pwuid) 125bcb: 8d 55 e4 lea -0x1c(%ebp),%edx 125bce: 89 f0 mov %esi,%eax 125bd0: e8 39 fd ff ff call 12590e <== ALWAYS TAKEN size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 125bd5: 85 c0 test %eax,%eax 125bd7: 0f 84 93 00 00 00 je 125c70 <== ALWAYS TAKEN || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &pwuid) || !scanInt(fp, &pwgid) 125bdd: 8d 55 e0 lea -0x20(%ebp),%edx 125be0: 89 f0 mov %esi,%eax 125be2: e8 27 fd ff ff call 12590e <== ALWAYS TAKEN size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 125be7: 85 c0 test %eax,%eax 125be9: 0f 84 81 00 00 00 je 125c70 <== ALWAYS TAKEN || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &pwuid) || !scanInt(fp, &pwgid) || !scanString(fp, &pwd->pw_comment, &buffer, &bufsize, 0) 125bef: 52 push %edx 125bf0: 52 push %edx 125bf1: 8d 53 0c lea 0xc(%ebx),%edx 125bf4: 6a 00 push $0x0 125bf6: 8d 45 08 lea 0x8(%ebp),%eax 125bf9: 50 push %eax 125bfa: 89 f9 mov %edi,%ecx 125bfc: 89 f0 mov %esi,%eax 125bfe: e8 be fd ff ff call 1259c1 <== ALWAYS TAKEN size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 125c03: 83 c4 10 add $0x10,%esp 125c06: 85 c0 test %eax,%eax 125c08: 74 66 je 125c70 <== 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) 125c0a: 50 push %eax 125c0b: 50 push %eax 125c0c: 8d 53 10 lea 0x10(%ebx),%edx 125c0f: 6a 00 push $0x0 125c11: 8d 45 08 lea 0x8(%ebp),%eax 125c14: 50 push %eax 125c15: 89 f9 mov %edi,%ecx 125c17: 89 f0 mov %esi,%eax 125c19: e8 a3 fd ff ff call 1259c1 <== ALWAYS TAKEN size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 125c1e: 83 c4 10 add $0x10,%esp 125c21: 85 c0 test %eax,%eax 125c23: 74 4b je 125c70 <== 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) 125c25: 51 push %ecx 125c26: 51 push %ecx 125c27: 8d 53 14 lea 0x14(%ebx),%edx 125c2a: 6a 00 push $0x0 125c2c: 8d 45 08 lea 0x8(%ebp),%eax 125c2f: 50 push %eax 125c30: 89 f9 mov %edi,%ecx 125c32: 89 f0 mov %esi,%eax 125c34: e8 88 fd ff ff call 1259c1 <== ALWAYS TAKEN size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 125c39: 83 c4 10 add $0x10,%esp 125c3c: 85 c0 test %eax,%eax 125c3e: 74 30 je 125c70 <== 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)) 125c40: 52 push %edx 125c41: 52 push %edx 125c42: 8d 53 18 lea 0x18(%ebx),%edx 125c45: 6a 01 push $0x1 125c47: 8d 45 08 lea 0x8(%ebp),%eax 125c4a: 50 push %eax 125c4b: 89 f9 mov %edi,%ecx 125c4d: 89 f0 mov %esi,%eax 125c4f: e8 6d fd ff ff call 1259c1 <== ALWAYS TAKEN size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 125c54: 83 c4 10 add $0x10,%esp 125c57: 85 c0 test %eax,%eax 125c59: 74 15 je 125c70 <== 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; 125c5b: 8b 45 e4 mov -0x1c(%ebp),%eax 125c5e: 66 89 43 08 mov %ax,0x8(%ebx) pwd->pw_gid = pwgid; 125c62: 8b 45 e0 mov -0x20(%ebp),%eax 125c65: 66 89 43 0a mov %ax,0xa(%ebx) 125c69: b8 01 00 00 00 mov $0x1,%eax return 1; 125c6e: eb 02 jmp 125c72 <== ALWAYS TAKEN 125c70: 31 c0 xor %eax,%eax <== NOT EXECUTED } 125c72: 8d 65 f4 lea -0xc(%ebp),%esp 125c75: 5b pop %ebx 125c76: 5e pop %esi 125c77: 5f pop %edi 125c78: c9 leave 125c79: c3 ret 0010a65c : #include int sched_get_priority_max( int policy ) { 10a65c: 55 push %ebp 10a65d: 89 e5 mov %esp,%ebp 10a65f: 83 ec 08 sub $0x8,%esp switch ( policy ) { 10a662: 83 7d 08 03 cmpl $0x3,0x8(%ebp) 10a666: 76 10 jbe 10a678 case SCHED_RR: case SCHED_SPORADIC: break; default: rtems_set_errno_and_return_minus_one( EINVAL ); 10a668: e8 bf 79 00 00 call 11202c <__errno> 10a66d: c7 00 16 00 00 00 movl $0x16,(%eax) 10a673: 83 c8 ff or $0xffffffff,%eax 10a676: eb 08 jmp 10a680 <== ALWAYS TAKEN } return POSIX_SCHEDULER_MAXIMUM_PRIORITY; 10a678: 0f b6 05 18 12 12 00 movzbl 0x121218,%eax 10a67f: 48 dec %eax } 10a680: c9 leave 10a681: c3 ret 0010a6a8 : int sched_rr_get_interval( pid_t pid, struct timespec *interval ) { 10a6a8: 55 push %ebp 10a6a9: 89 e5 mov %esp,%ebp 10a6ab: 56 push %esi 10a6ac: 53 push %ebx 10a6ad: 8b 75 08 mov 0x8(%ebp),%esi 10a6b0: 8b 5d 0c mov 0xc(%ebp),%ebx /* * Only supported for the "calling process" (i.e. this node). */ if ( pid && pid != getpid() ) 10a6b3: 85 f6 test %esi,%esi 10a6b5: 74 16 je 10a6cd <== ALWAYS TAKEN 10a6b7: e8 3c d1 ff ff call 1077f8 10a6bc: 39 c6 cmp %eax,%esi 10a6be: 74 0d je 10a6cd rtems_set_errno_and_return_minus_one( ESRCH ); 10a6c0: e8 67 79 00 00 call 11202c <__errno> 10a6c5: c7 00 03 00 00 00 movl $0x3,(%eax) 10a6cb: eb 0f jmp 10a6dc <== ALWAYS TAKEN if ( !interval ) 10a6cd: 85 db test %ebx,%ebx 10a6cf: 75 10 jne 10a6e1 rtems_set_errno_and_return_minus_one( EINVAL ); 10a6d1: e8 56 79 00 00 call 11202c <__errno> 10a6d6: c7 00 16 00 00 00 movl $0x16,(%eax) 10a6dc: 83 c8 ff or $0xffffffff,%eax 10a6df: eb 13 jmp 10a6f4 <== ALWAYS TAKEN _Timespec_From_ticks( _Thread_Ticks_per_timeslice, interval ); 10a6e1: 50 push %eax 10a6e2: 50 push %eax 10a6e3: 53 push %ebx 10a6e4: ff 35 a8 51 12 00 pushl 0x1251a8 10a6ea: e8 1d 2f 00 00 call 10d60c <_Timespec_From_ticks> 10a6ef: 31 c0 xor %eax,%eax return 0; 10a6f1: 83 c4 10 add $0x10,%esp } 10a6f4: 8d 65 f8 lea -0x8(%ebp),%esp 10a6f7: 5b pop %ebx 10a6f8: 5e pop %esi 10a6f9: c9 leave 10a6fa: c3 ret 0010cb40 : */ int sem_close( sem_t *sem ) { 10cb40: 55 push %ebp 10cb41: 89 e5 mov %esp,%ebp 10cb43: 83 ec 1c sub $0x1c,%esp RTEMS_INLINE_ROUTINE POSIX_Semaphore_Control *_POSIX_Semaphore_Get ( sem_t *id, Objects_Locations *location ) { return (POSIX_Semaphore_Control *) 10cb46: 8d 45 f4 lea -0xc(%ebp),%eax 10cb49: 50 push %eax 10cb4a: 8b 45 08 mov 0x8(%ebp),%eax 10cb4d: ff 30 pushl (%eax) 10cb4f: 68 e4 a6 12 00 push $0x12a6e4 10cb54: e8 bf 1d 00 00 call 10e918 <_Objects_Get> register POSIX_Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _POSIX_Semaphore_Get( sem, &location ); switch ( location ) { 10cb59: 83 c4 10 add $0x10,%esp 10cb5c: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 10cb60: 75 18 jne 10cb7a case OBJECTS_LOCAL: the_semaphore->open_count -= 1; 10cb62: ff 48 18 decl 0x18(%eax) _POSIX_Semaphore_Delete( the_semaphore ); 10cb65: 83 ec 0c sub $0xc,%esp 10cb68: 50 push %eax 10cb69: e8 fa 53 00 00 call 111f68 <_POSIX_Semaphore_Delete> _Thread_Enable_dispatch(); 10cb6e: e8 de 25 00 00 call 10f151 <_Thread_Enable_dispatch> 10cb73: 31 c0 xor %eax,%eax return 0; 10cb75: 83 c4 10 add $0x10,%esp 10cb78: eb 0e jmp 10cb88 <== ALWAYS TAKEN #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 10cb7a: e8 6d 86 00 00 call 1151ec <__errno> 10cb7f: c7 00 16 00 00 00 movl $0x16,(%eax) 10cb85: 83 c8 ff or $0xffffffff,%eax } 10cb88: c9 leave 10cb89: c3 ret 0010cb8c : */ int sem_destroy( sem_t *sem ) { 10cb8c: 55 push %ebp 10cb8d: 89 e5 mov %esp,%ebp 10cb8f: 83 ec 1c sub $0x1c,%esp 10cb92: 8d 45 f4 lea -0xc(%ebp),%eax 10cb95: 50 push %eax 10cb96: 8b 45 08 mov 0x8(%ebp),%eax 10cb99: ff 30 pushl (%eax) 10cb9b: 68 e4 a6 12 00 push $0x12a6e4 10cba0: e8 73 1d 00 00 call 10e918 <_Objects_Get> register POSIX_Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _POSIX_Semaphore_Get( sem, &location ); switch ( location ) { 10cba5: 83 c4 10 add $0x10,%esp 10cba8: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 10cbac: 75 22 jne 10cbd0 case OBJECTS_LOCAL: /* * Undefined operation on a named semaphore. */ if ( the_semaphore->named == true ) { 10cbae: 80 78 14 00 cmpb $0x0,0x14(%eax) 10cbb2: 74 07 je 10cbbb _Thread_Enable_dispatch(); 10cbb4: e8 98 25 00 00 call 10f151 <_Thread_Enable_dispatch> 10cbb9: eb 15 jmp 10cbd0 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); } _POSIX_Semaphore_Delete( the_semaphore ); 10cbbb: 83 ec 0c sub $0xc,%esp 10cbbe: 50 push %eax 10cbbf: e8 a4 53 00 00 call 111f68 <_POSIX_Semaphore_Delete> _Thread_Enable_dispatch(); 10cbc4: e8 88 25 00 00 call 10f151 <_Thread_Enable_dispatch> 10cbc9: 31 c0 xor %eax,%eax return 0; 10cbcb: 83 c4 10 add $0x10,%esp 10cbce: eb 0e jmp 10cbde <== ALWAYS TAKEN #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 10cbd0: e8 17 86 00 00 call 1151ec <__errno> 10cbd5: c7 00 16 00 00 00 movl $0x16,(%eax) 10cbdb: 83 c8 ff or $0xffffffff,%eax } 10cbde: c9 leave 10cbdf: c3 ret 0010cbe0 : int sem_getvalue( sem_t *sem, int *sval ) { 10cbe0: 55 push %ebp 10cbe1: 89 e5 mov %esp,%ebp 10cbe3: 83 ec 1c sub $0x1c,%esp 10cbe6: 8d 45 f4 lea -0xc(%ebp),%eax 10cbe9: 50 push %eax 10cbea: 8b 45 08 mov 0x8(%ebp),%eax 10cbed: ff 30 pushl (%eax) 10cbef: 68 e4 a6 12 00 push $0x12a6e4 10cbf4: e8 1f 1d 00 00 call 10e918 <_Objects_Get> register POSIX_Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _POSIX_Semaphore_Get( sem, &location ); switch ( location ) { 10cbf9: 83 c4 10 add $0x10,%esp 10cbfc: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 10cc00: 75 11 jne 10cc13 case OBJECTS_LOCAL: *sval = _CORE_semaphore_Get_count( &the_semaphore->Semaphore ); 10cc02: 8b 50 64 mov 0x64(%eax),%edx 10cc05: 8b 45 0c mov 0xc(%ebp),%eax 10cc08: 89 10 mov %edx,(%eax) _Thread_Enable_dispatch(); 10cc0a: e8 42 25 00 00 call 10f151 <_Thread_Enable_dispatch> 10cc0f: 31 c0 xor %eax,%eax return 0; 10cc11: eb 0e jmp 10cc21 <== ALWAYS TAKEN #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 10cc13: e8 d4 85 00 00 call 1151ec <__errno> 10cc18: c7 00 16 00 00 00 movl $0x16,(%eax) 10cc1e: 83 c8 ff or $0xffffffff,%eax } 10cc21: c9 leave 10cc22: c3 ret 0010cc24 : int sem_init( sem_t *sem, int pshared, unsigned int value ) { 10cc24: 55 push %ebp 10cc25: 89 e5 mov %esp,%ebp 10cc27: 53 push %ebx 10cc28: 83 ec 14 sub $0x14,%esp 10cc2b: 8b 5d 08 mov 0x8(%ebp),%ebx int status; POSIX_Semaphore_Control *the_semaphore; if ( !sem ) 10cc2e: 85 db test %ebx,%ebx 10cc30: 75 10 jne 10cc42 rtems_set_errno_and_return_minus_one( EINVAL ); 10cc32: e8 b5 85 00 00 call 1151ec <__errno> 10cc37: c7 00 16 00 00 00 movl $0x16,(%eax) 10cc3d: 83 c8 ff or $0xffffffff,%eax 10cc40: eb 21 jmp 10cc63 <== ALWAYS TAKEN status = _POSIX_Semaphore_Create_support( 10cc42: 8d 45 f4 lea -0xc(%ebp),%eax 10cc45: 50 push %eax 10cc46: ff 75 10 pushl 0x10(%ebp) 10cc49: ff 75 0c pushl 0xc(%ebp) 10cc4c: 6a 00 push $0x0 10cc4e: e8 29 52 00 00 call 111e7c <_POSIX_Semaphore_Create_support> pshared, value, &the_semaphore ); if ( status != -1 ) 10cc53: 83 c4 10 add $0x10,%esp 10cc56: 83 f8 ff cmp $0xffffffff,%eax 10cc59: 74 08 je 10cc63 *sem = the_semaphore->Object.id; 10cc5b: 8b 55 f4 mov -0xc(%ebp),%edx 10cc5e: 8b 52 08 mov 0x8(%edx),%edx 10cc61: 89 13 mov %edx,(%ebx) return status; } 10cc63: 8b 5d fc mov -0x4(%ebp),%ebx 10cc66: c9 leave 10cc67: c3 ret 0010cc68 : int oflag, ... /* mode_t mode, */ /* unsigned int value */ ) { 10cc68: 55 push %ebp 10cc69: 89 e5 mov %esp,%ebp 10cc6b: 57 push %edi 10cc6c: 56 push %esi 10cc6d: 53 push %ebx 10cc6e: 83 ec 2c sub $0x2c,%esp 10cc71: 8b 75 08 mov 0x8(%ebp),%esi rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10cc74: a1 fc a3 12 00 mov 0x12a3fc,%eax 10cc79: 40 inc %eax 10cc7a: a3 fc a3 12 00 mov %eax,0x12a3fc POSIX_Semaphore_Control *the_semaphore; Objects_Locations location; _Thread_Disable_dispatch(); if ( oflag & O_CREAT ) { 10cc7f: 8b 45 0c mov 0xc(%ebp),%eax 10cc82: 25 00 02 00 00 and $0x200,%eax 10cc87: 89 45 d4 mov %eax,-0x2c(%ebp) 10cc8a: 75 04 jne 10cc90 10cc8c: 31 ff xor %edi,%edi 10cc8e: eb 03 jmp 10cc93 <== ALWAYS TAKEN va_start(arg, oflag); mode = (mode_t) va_arg( arg, unsigned int ); value = va_arg( arg, unsigned int ); 10cc90: 8b 7d 14 mov 0x14(%ebp),%edi va_end(arg); } status = _POSIX_Semaphore_Name_to_id( name, &the_semaphore_id ); 10cc93: 52 push %edx 10cc94: 52 push %edx 10cc95: 8d 45 e4 lea -0x1c(%ebp),%eax 10cc98: 50 push %eax 10cc99: 56 push %esi 10cc9a: e8 11 53 00 00 call 111fb0 <_POSIX_Semaphore_Name_to_id> 10cc9f: 89 c3 mov %eax,%ebx * and we can just return a pointer to the id. Otherwise we may * need to check to see if this is a "semaphore does not exist" * or some other miscellaneous error on the name. */ if ( status ) { 10cca1: 83 c4 10 add $0x10,%esp 10cca4: 85 c0 test %eax,%eax 10cca6: 74 19 je 10ccc1 /* * Unless provided a valid name that did not already exist * and we are willing to create then it is an error. */ if ( !( status == ENOENT && (oflag & O_CREAT) ) ) { 10cca8: 83 f8 02 cmp $0x2,%eax 10ccab: 75 06 jne 10ccb3 <== ALWAYS TAKEN 10ccad: 83 7d d4 00 cmpl $0x0,-0x2c(%ebp) 10ccb1: 75 59 jne 10cd0c _Thread_Enable_dispatch(); 10ccb3: e8 99 24 00 00 call 10f151 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one_cast( status, sem_t * ); 10ccb8: e8 2f 85 00 00 call 1151ec <__errno> 10ccbd: 89 18 mov %ebx,(%eax) 10ccbf: eb 1f jmp 10cce0 <== ALWAYS TAKEN /* * Check for existence with creation. */ if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) { 10ccc1: 8b 45 0c mov 0xc(%ebp),%eax 10ccc4: 25 00 0a 00 00 and $0xa00,%eax 10ccc9: 3d 00 0a 00 00 cmp $0xa00,%eax 10ccce: 75 15 jne 10cce5 _Thread_Enable_dispatch(); 10ccd0: e8 7c 24 00 00 call 10f151 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one_cast( EEXIST, sem_t * ); 10ccd5: e8 12 85 00 00 call 1151ec <__errno> 10ccda: c7 00 11 00 00 00 movl $0x11,(%eax) 10cce0: 83 c8 ff or $0xffffffff,%eax 10cce3: eb 4a jmp 10cd2f <== ALWAYS TAKEN 10cce5: 50 push %eax 10cce6: 8d 45 dc lea -0x24(%ebp),%eax 10cce9: 50 push %eax 10ccea: ff 75 e4 pushl -0x1c(%ebp) 10cced: 68 e4 a6 12 00 push $0x12a6e4 10ccf2: e8 21 1c 00 00 call 10e918 <_Objects_Get> } the_semaphore = _POSIX_Semaphore_Get( &the_semaphore_id, &location ); 10ccf7: 89 45 e0 mov %eax,-0x20(%ebp) the_semaphore->open_count += 1; 10ccfa: ff 40 18 incl 0x18(%eax) _Thread_Enable_dispatch(); 10ccfd: e8 4f 24 00 00 call 10f151 <_Thread_Enable_dispatch> _Thread_Enable_dispatch(); 10cd02: e8 4a 24 00 00 call 10f151 <_Thread_Enable_dispatch> goto return_id; 10cd07: 83 c4 10 add $0x10,%esp 10cd0a: eb 1d jmp 10cd29 <== ALWAYS TAKEN /* * At this point, the semaphore does not exist and everything has been * checked. We should go ahead and create a semaphore. */ status =_POSIX_Semaphore_Create_support( 10cd0c: 8d 45 e0 lea -0x20(%ebp),%eax 10cd0f: 50 push %eax 10cd10: 57 push %edi 10cd11: 6a 00 push $0x0 10cd13: 56 push %esi 10cd14: e8 63 51 00 00 call 111e7c <_POSIX_Semaphore_Create_support> 10cd19: 89 c3 mov %eax,%ebx /* * errno was set by Create_support, so don't set it again. */ _Thread_Enable_dispatch(); 10cd1b: e8 31 24 00 00 call 10f151 <_Thread_Enable_dispatch> if ( status == -1 ) 10cd20: 83 c4 10 add $0x10,%esp 10cd23: 83 c8 ff or $0xffffffff,%eax 10cd26: 43 inc %ebx 10cd27: 74 06 je 10cd2f return_id: #if defined(RTEMS_USE_16_BIT_OBJECT) the_semaphore->Semaphore_id = the_semaphore->Object.id; id = &the_semaphore->Semaphore_id; #else id = (sem_t *)&the_semaphore->Object.id; 10cd29: 8b 45 e0 mov -0x20(%ebp),%eax 10cd2c: 83 c0 08 add $0x8,%eax #endif return id; } 10cd2f: 8d 65 f4 lea -0xc(%ebp),%esp 10cd32: 5b pop %ebx 10cd33: 5e pop %esi 10cd34: 5f pop %edi 10cd35: c9 leave 10cd36: c3 ret 0010cd38 : */ int sem_post( sem_t *sem ) { 10cd38: 55 push %ebp 10cd39: 89 e5 mov %esp,%ebp 10cd3b: 83 ec 1c sub $0x1c,%esp 10cd3e: 8d 45 f4 lea -0xc(%ebp),%eax 10cd41: 50 push %eax 10cd42: 8b 45 08 mov 0x8(%ebp),%eax 10cd45: ff 30 pushl (%eax) 10cd47: 68 e4 a6 12 00 push $0x12a6e4 10cd4c: e8 c7 1b 00 00 call 10e918 <_Objects_Get> register POSIX_Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _POSIX_Semaphore_Get( sem, &location ); switch ( location ) { 10cd51: 83 c4 10 add $0x10,%esp 10cd54: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 10cd58: 75 1b jne 10cd75 case OBJECTS_LOCAL: _CORE_semaphore_Surrender( 10cd5a: 52 push %edx 10cd5b: 6a 00 push $0x0 10cd5d: ff 70 08 pushl 0x8(%eax) 10cd60: 83 c0 1c add $0x1c,%eax 10cd63: 50 push %eax 10cd64: e8 37 13 00 00 call 10e0a0 <_CORE_semaphore_Surrender> NULL /* XXX need to define a routine to handle this case */ #else NULL #endif ); _Thread_Enable_dispatch(); 10cd69: e8 e3 23 00 00 call 10f151 <_Thread_Enable_dispatch> 10cd6e: 31 c0 xor %eax,%eax return 0; 10cd70: 83 c4 10 add $0x10,%esp 10cd73: eb 0e jmp 10cd83 <== ALWAYS TAKEN #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 10cd75: e8 72 84 00 00 call 1151ec <__errno> 10cd7a: c7 00 16 00 00 00 movl $0x16,(%eax) 10cd80: 83 c8 ff or $0xffffffff,%eax } 10cd83: c9 leave 10cd84: c3 ret 0010cdc8 : */ int sem_unlink( const char *name ) { 10cdc8: 55 push %ebp 10cdc9: 89 e5 mov %esp,%ebp 10cdcb: 53 push %ebx 10cdcc: 83 ec 1c sub $0x1c,%esp 10cdcf: a1 fc a3 12 00 mov 0x12a3fc,%eax 10cdd4: 40 inc %eax 10cdd5: a3 fc a3 12 00 mov %eax,0x12a3fc register POSIX_Semaphore_Control *the_semaphore; sem_t the_semaphore_id; _Thread_Disable_dispatch(); status = _POSIX_Semaphore_Name_to_id( name, &the_semaphore_id ); 10cdda: 8d 45 f4 lea -0xc(%ebp),%eax 10cddd: 50 push %eax 10cdde: ff 75 08 pushl 0x8(%ebp) 10cde1: e8 ca 51 00 00 call 111fb0 <_POSIX_Semaphore_Name_to_id> 10cde6: 89 c3 mov %eax,%ebx if ( status != 0 ) { 10cde8: 83 c4 10 add $0x10,%esp 10cdeb: 85 c0 test %eax,%eax 10cded: 74 11 je 10ce00 _Thread_Enable_dispatch(); 10cdef: e8 5d 23 00 00 call 10f151 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( status ); 10cdf4: e8 f3 83 00 00 call 1151ec <__errno> 10cdf9: 89 18 mov %ebx,(%eax) 10cdfb: 83 c8 ff or $0xffffffff,%eax 10cdfe: eb 2f jmp 10ce2f <== ALWAYS TAKEN } the_semaphore = (POSIX_Semaphore_Control *) _Objects_Get_local_object( 10ce00: 0f b7 55 f4 movzwl -0xc(%ebp),%edx 10ce04: a1 00 a7 12 00 mov 0x12a700,%eax 10ce09: 8b 1c 90 mov (%eax,%edx,4),%ebx &_POSIX_Semaphore_Information, _Objects_Get_index( the_semaphore_id ) ); the_semaphore->linked = false; 10ce0c: c6 43 15 00 movb $0x0,0x15(%ebx) RTEMS_INLINE_ROUTINE void _POSIX_Semaphore_Namespace_remove ( POSIX_Semaphore_Control *the_semaphore ) { _Objects_Namespace_remove( 10ce10: 50 push %eax 10ce11: 50 push %eax 10ce12: 53 push %ebx 10ce13: 68 e4 a6 12 00 push $0x12a6e4 10ce18: e8 3f 1c 00 00 call 10ea5c <_Objects_Namespace_remove> _POSIX_Semaphore_Namespace_remove( the_semaphore ); _POSIX_Semaphore_Delete( the_semaphore ); 10ce1d: 89 1c 24 mov %ebx,(%esp) 10ce20: e8 43 51 00 00 call 111f68 <_POSIX_Semaphore_Delete> _Thread_Enable_dispatch(); 10ce25: e8 27 23 00 00 call 10f151 <_Thread_Enable_dispatch> 10ce2a: 31 c0 xor %eax,%eax return 0; 10ce2c: 83 c4 10 add $0x10,%esp } 10ce2f: 8b 5d fc mov -0x4(%ebp),%ebx 10ce32: c9 leave 10ce33: c3 ret 001258ad : */ int setgid( gid_t gid ) { 1258ad: 55 push %ebp <== NOT EXECUTED 1258ae: 89 e5 mov %esp,%ebp <== NOT EXECUTED _POSIX_types_Gid = gid; 1258b0: a1 78 e1 15 00 mov 0x15e178,%eax <== NOT EXECUTED 1258b5: 8b 55 08 mov 0x8(%ebp),%edx <== NOT EXECUTED 1258b8: 66 89 50 34 mov %dx,0x34(%eax) <== NOT EXECUTED return 0; } 1258bc: 31 c0 xor %eax,%eax <== NOT EXECUTED 1258be: c9 leave <== NOT EXECUTED 1258bf: c3 ret <== NOT EXECUTED 00125d83 : return NULL; return &grent; } void setgrent(void) { 125d83: 55 push %ebp <== NOT EXECUTED 125d84: 89 e5 mov %esp,%ebp <== NOT EXECUTED 125d86: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED init_etc_passwd_group(); 125d89: e8 24 ff ff ff call 125cb2 <== NOT EXECUTED if (group_fp != NULL) 125d8e: a1 a4 36 16 00 mov 0x1636a4,%eax <== NOT EXECUTED 125d93: 85 c0 test %eax,%eax <== NOT EXECUTED 125d95: 74 0c je 125da3 <== NOT EXECUTED fclose(group_fp); 125d97: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 125d9a: 50 push %eax <== NOT EXECUTED 125d9b: e8 e8 39 01 00 call 139788 <== NOT EXECUTED 125da0: 83 c4 10 add $0x10,%esp <== NOT EXECUTED group_fp = fopen("/etc/group", "r"); 125da3: 52 push %edx <== NOT EXECUTED 125da4: 52 push %edx <== NOT EXECUTED 125da5: 68 a3 28 15 00 push $0x1528a3 <== NOT EXECUTED 125daa: 68 65 ff 14 00 push $0x14ff65 <== NOT EXECUTED 125daf: e8 c4 41 01 00 call 139f78 <== NOT EXECUTED 125db4: a3 a4 36 16 00 mov %eax,0x1636a4 <== NOT EXECUTED 125db9: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } 125dbc: c9 leave <== NOT EXECUTED 125dbd: c3 ret <== NOT EXECUTED 00109c2c : int setitimer( int which, const struct itimerval *value, struct itimerval *ovalue ) { 109c2c: 55 push %ebp 109c2d: 89 e5 mov %esp,%ebp 109c2f: 83 ec 08 sub $0x8,%esp if ( !value ) 109c32: 83 7d 0c 00 cmpl $0x0,0xc(%ebp) 109c36: 74 06 je 109c3e rtems_set_errno_and_return_minus_one( EFAULT ); if ( !ovalue ) 109c38: 83 7d 10 00 cmpl $0x0,0x10(%ebp) 109c3c: 75 0d jne 109c4b rtems_set_errno_and_return_minus_one( EFAULT ); 109c3e: e8 e9 7e 00 00 call 111b2c <__errno> 109c43: c7 00 0e 00 00 00 movl $0xe,(%eax) 109c49: eb 1e jmp 109c69 <== ALWAYS TAKEN switch ( which ) { 109c4b: 83 7d 08 02 cmpl $0x2,0x8(%ebp) 109c4f: 77 0d ja 109c5e case ITIMER_REAL: case ITIMER_VIRTUAL: case ITIMER_PROF: rtems_set_errno_and_return_minus_one( ENOSYS ); 109c51: e8 d6 7e 00 00 call 111b2c <__errno> 109c56: c7 00 58 00 00 00 movl $0x58,(%eax) 109c5c: eb 0b jmp 109c69 <== ALWAYS TAKEN default: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 109c5e: e8 c9 7e 00 00 call 111b2c <__errno> 109c63: c7 00 16 00 00 00 movl $0x16,(%eax) } 109c69: 83 c8 ff or $0xffffffff,%eax 109c6c: c9 leave 109c6d: c3 ret 00125f27 : return NULL; return &pwent; } void setpwent(void) { 125f27: 55 push %ebp <== NOT EXECUTED 125f28: 89 e5 mov %esp,%ebp <== NOT EXECUTED 125f2a: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED init_etc_passwd_group(); 125f2d: e8 80 fd ff ff call 125cb2 <== NOT EXECUTED if (passwd_fp != NULL) 125f32: a1 bc 35 16 00 mov 0x1635bc,%eax <== NOT EXECUTED 125f37: 85 c0 test %eax,%eax <== NOT EXECUTED 125f39: 74 0c je 125f47 <== NOT EXECUTED fclose(passwd_fp); 125f3b: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 125f3e: 50 push %eax <== NOT EXECUTED 125f3f: e8 44 38 01 00 call 139788 <== NOT EXECUTED 125f44: 83 c4 10 add $0x10,%esp <== NOT EXECUTED passwd_fp = fopen("/etc/passwd", "r"); 125f47: 50 push %eax <== NOT EXECUTED 125f48: 50 push %eax <== NOT EXECUTED 125f49: 68 a3 28 15 00 push $0x1528a3 <== NOT EXECUTED 125f4e: 68 20 ff 14 00 push $0x14ff20 <== NOT EXECUTED 125f53: e8 20 40 01 00 call 139f78 <== NOT EXECUTED 125f58: a3 bc 35 16 00 mov %eax,0x1635bc <== NOT EXECUTED 125f5d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } 125f60: c9 leave <== NOT EXECUTED 125f61: 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 e1 15 00 mov 0x15e178,%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 0010a558 : int sigaction( int sig, const struct sigaction *act, struct sigaction *oact ) { 10a558: 55 push %ebp 10a559: 89 e5 mov %esp,%ebp 10a55b: 57 push %edi 10a55c: 56 push %esi 10a55d: 53 push %ebx 10a55e: 83 ec 1c sub $0x1c,%esp 10a561: 8b 5d 08 mov 0x8(%ebp),%ebx 10a564: 8b 55 0c mov 0xc(%ebp),%edx 10a567: 8b 45 10 mov 0x10(%ebp),%eax ISR_Level level; if ( oact ) 10a56a: 85 c0 test %eax,%eax 10a56c: 74 12 je 10a580 *oact = _POSIX_signals_Vectors[ sig ]; 10a56e: 6b f3 0c imul $0xc,%ebx,%esi 10a571: 81 c6 8c 67 12 00 add $0x12678c,%esi 10a577: b9 03 00 00 00 mov $0x3,%ecx 10a57c: 89 c7 mov %eax,%edi 10a57e: f3 a5 rep movsl %ds:(%esi),%es:(%edi) if ( !sig ) 10a580: 85 db test %ebx,%ebx 10a582: 74 0d je 10a591 rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) ) 10a584: 8d 43 ff lea -0x1(%ebx),%eax 10a587: 83 f8 1f cmp $0x1f,%eax 10a58a: 77 05 ja 10a591 * * NOTE: Solaris documentation claims to "silently enforce" this which * contradicts the POSIX specification. */ if ( sig == SIGKILL ) 10a58c: 83 fb 09 cmp $0x9,%ebx 10a58f: 75 10 jne 10a5a1 rtems_set_errno_and_return_minus_one( EINVAL ); 10a591: e8 ba 7b 00 00 call 112150 <__errno> 10a596: c7 00 16 00 00 00 movl $0x16,(%eax) 10a59c: 83 c8 ff or $0xffffffff,%eax 10a59f: eb 53 jmp 10a5f4 <== ALWAYS TAKEN /* * Evaluate the new action structure and set the global signal vector * appropriately. */ if ( act ) { 10a5a1: 31 c0 xor %eax,%eax 10a5a3: 85 d2 test %edx,%edx 10a5a5: 74 4d je 10a5f4 <== ALWAYS TAKEN /* * Unless the user is installing the default signal actions, then * we can just copy the provided sigaction structure into the vectors. */ _ISR_Disable( level ); 10a5a7: 9c pushf 10a5a8: fa cli 10a5a9: 8f 45 e4 popl -0x1c(%ebp) if ( act->sa_handler == SIG_DFL ) { 10a5ac: 83 7a 08 00 cmpl $0x0,0x8(%edx) 10a5b0: 75 18 jne 10a5ca _POSIX_signals_Vectors[ sig ] = _POSIX_signals_Default_vectors[ sig ]; 10a5b2: 6b db 0c imul $0xc,%ebx,%ebx 10a5b5: 8d bb 8c 67 12 00 lea 0x12678c(%ebx),%edi 10a5bb: 8d b3 58 07 12 00 lea 0x120758(%ebx),%esi 10a5c1: b9 03 00 00 00 mov $0x3,%ecx 10a5c6: f3 a5 rep movsl %ds:(%esi),%es:(%edi) 10a5c8: eb 24 jmp 10a5ee <== ALWAYS TAKEN } else { _POSIX_signals_Clear_process_signals( sig ); 10a5ca: 83 ec 0c sub $0xc,%esp 10a5cd: 53 push %ebx 10a5ce: 89 55 e0 mov %edx,-0x20(%ebp) 10a5d1: e8 7a 4b 00 00 call 10f150 <_POSIX_signals_Clear_process_signals> _POSIX_signals_Vectors[ sig ] = *act; 10a5d6: 6b db 0c imul $0xc,%ebx,%ebx 10a5d9: 8d bb 8c 67 12 00 lea 0x12678c(%ebx),%edi 10a5df: b9 03 00 00 00 mov $0x3,%ecx 10a5e4: 8b 55 e0 mov -0x20(%ebp),%edx 10a5e7: 89 d6 mov %edx,%esi 10a5e9: f3 a5 rep movsl %ds:(%esi),%es:(%edi) 10a5eb: 83 c4 10 add $0x10,%esp } _ISR_Enable( level ); 10a5ee: ff 75 e4 pushl -0x1c(%ebp) 10a5f1: 9d popf 10a5f2: 31 c0 xor %eax,%eax * + If we are now ignoring a signal that was previously pending, * we clear the pending signal indicator. */ return 0; } 10a5f4: 8d 65 f4 lea -0xc(%ebp),%esp 10a5f7: 5b pop %ebx 10a5f8: 5e pop %esi 10a5f9: 5f pop %edi 10a5fa: c9 leave 10a5fb: c3 ret 0010a5fc : int sigaddset( sigset_t *set, int signo ) { 10a5fc: 55 push %ebp 10a5fd: 89 e5 mov %esp,%ebp 10a5ff: 83 ec 08 sub $0x8,%esp 10a602: 8b 45 08 mov 0x8(%ebp),%eax 10a605: 8b 4d 0c mov 0xc(%ebp),%ecx if ( !set ) 10a608: 85 c0 test %eax,%eax 10a60a: 74 0a je 10a616 rtems_set_errno_and_return_minus_one( EINVAL ); if ( !signo ) 10a60c: 85 c9 test %ecx,%ecx 10a60e: 74 06 je 10a616 10a610: 49 dec %ecx rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(signo) ) 10a611: 83 f9 1f cmp $0x1f,%ecx 10a614: 76 10 jbe 10a626 rtems_set_errno_and_return_minus_one( EINVAL ); 10a616: e8 35 7b 00 00 call 112150 <__errno> 10a61b: c7 00 16 00 00 00 movl $0x16,(%eax) 10a621: 83 c8 ff or $0xffffffff,%eax 10a624: eb 0b jmp 10a631 <== ALWAYS TAKEN *set |= signo_to_mask(signo); 10a626: ba 01 00 00 00 mov $0x1,%edx 10a62b: d3 e2 shl %cl,%edx 10a62d: 09 10 or %edx,(%eax) 10a62f: 31 c0 xor %eax,%eax return 0; } 10a631: c9 leave 10a632: c3 ret 0010bffc : int sigdelset( sigset_t *set, int signo ) { 10bffc: 55 push %ebp 10bffd: 89 e5 mov %esp,%ebp 10bfff: 83 ec 08 sub $0x8,%esp 10c002: 8b 55 08 mov 0x8(%ebp),%edx 10c005: 8b 4d 0c mov 0xc(%ebp),%ecx if ( !set ) 10c008: 85 d2 test %edx,%edx 10c00a: 74 0c je 10c018 rtems_set_errno_and_return_minus_one( EINVAL ); if ( !signo ) 10c00c: 31 c0 xor %eax,%eax 10c00e: 85 c9 test %ecx,%ecx 10c010: 74 21 je 10c033 10c012: 49 dec %ecx return 0; if ( !is_valid_signo(signo) ) 10c013: 83 f9 1f cmp $0x1f,%ecx 10c016: 76 10 jbe 10c028 rtems_set_errno_and_return_minus_one( EINVAL ); 10c018: e8 ab 7b 00 00 call 113bc8 <__errno> 10c01d: c7 00 16 00 00 00 movl $0x16,(%eax) 10c023: 83 c8 ff or $0xffffffff,%eax 10c026: eb 0b jmp 10c033 <== ALWAYS TAKEN *set &= ~signo_to_mask(signo); 10c028: b8 fe ff ff ff mov $0xfffffffe,%eax 10c02d: d3 c0 rol %cl,%eax 10c02f: 21 02 and %eax,(%edx) 10c031: 31 c0 xor %eax,%eax return 0; } 10c033: c9 leave 10c034: c3 ret 0010e61c : #include int sigemptyset( sigset_t *set ) { 10e61c: 55 push %ebp 10e61d: 89 e5 mov %esp,%ebp 10e61f: 83 ec 08 sub $0x8,%esp 10e622: 8b 45 08 mov 0x8(%ebp),%eax if ( !set ) 10e625: 85 c0 test %eax,%eax 10e627: 75 10 jne 10e639 rtems_set_errno_and_return_minus_one( EINVAL ); 10e629: e8 96 2e 00 00 call 1114c4 <__errno> 10e62e: c7 00 16 00 00 00 movl $0x16,(%eax) 10e634: 83 c8 ff or $0xffffffff,%eax 10e637: eb 08 jmp 10e641 <== ALWAYS TAKEN *set = 0; 10e639: c7 00 00 00 00 00 movl $0x0,(%eax) 10e63f: 31 c0 xor %eax,%eax return 0; } 10e641: c9 leave 10e642: c3 ret 0010c060 : #include int sigfillset( sigset_t *set ) { 10c060: 55 push %ebp 10c061: 89 e5 mov %esp,%ebp 10c063: 83 ec 08 sub $0x8,%esp 10c066: 8b 45 08 mov 0x8(%ebp),%eax if ( !set ) 10c069: 85 c0 test %eax,%eax 10c06b: 75 10 jne 10c07d rtems_set_errno_and_return_minus_one( EINVAL ); 10c06d: e8 56 7b 00 00 call 113bc8 <__errno> 10c072: c7 00 16 00 00 00 movl $0x16,(%eax) 10c078: 83 c8 ff or $0xffffffff,%eax 10c07b: eb 08 jmp 10c085 <== ALWAYS TAKEN *set = SIGNAL_ALL_MASK; 10c07d: c7 00 ff ff ff ff movl $0xffffffff,(%eax) 10c083: 31 c0 xor %eax,%eax return 0; } 10c085: c9 leave 10c086: c3 ret 0010c088 : int sigismember( const sigset_t *set, int signo ) { 10c088: 55 push %ebp 10c089: 89 e5 mov %esp,%ebp 10c08b: 83 ec 08 sub $0x8,%esp 10c08e: 8b 55 08 mov 0x8(%ebp),%edx 10c091: 8b 4d 0c mov 0xc(%ebp),%ecx if ( !set ) 10c094: 85 d2 test %edx,%edx 10c096: 74 0c je 10c0a4 rtems_set_errno_and_return_minus_one( EINVAL ); if ( !signo ) 10c098: 31 c0 xor %eax,%eax 10c09a: 85 c9 test %ecx,%ecx 10c09c: 74 25 je 10c0c3 10c09e: 49 dec %ecx return 0; if ( !is_valid_signo(signo) ) 10c09f: 83 f9 1f cmp $0x1f,%ecx 10c0a2: 76 10 jbe 10c0b4 rtems_set_errno_and_return_minus_one( EINVAL ); 10c0a4: e8 1f 7b 00 00 call 113bc8 <__errno> 10c0a9: c7 00 16 00 00 00 movl $0x16,(%eax) 10c0af: 83 c8 ff or $0xffffffff,%eax 10c0b2: eb 0f jmp 10c0c3 <== ALWAYS TAKEN 10c0b4: b8 01 00 00 00 mov $0x1,%eax 10c0b9: d3 e0 shl %cl,%eax 10c0bb: 85 02 test %eax,(%edx) 10c0bd: 0f 95 c0 setne %al 10c0c0: 0f b6 c0 movzbl %al,%eax if ( *set & signo_to_mask(signo) ) return 1; return 0; } 10c0c3: c9 leave 10c0c4: c3 ret 0010a424 : sighandler_t signal( int signum, sighandler_t handler ) { 10a424: 55 push %ebp 10a425: 89 e5 mov %esp,%ebp 10a427: 53 push %ebx 10a428: 83 ec 30 sub $0x30,%esp struct sigaction s; struct sigaction old; s.sa_handler = handler ; 10a42b: 8b 45 0c mov 0xc(%ebp),%eax 10a42e: 89 45 f4 mov %eax,-0xc(%ebp) sigemptyset(&s.sa_mask); 10a431: 8d 5d ec lea -0x14(%ebp),%ebx 10a434: 8d 45 f0 lea -0x10(%ebp),%eax 10a437: 50 push %eax 10a438: e8 bf ff ff ff call 10a3fc <== ALWAYS TAKEN s.sa_flags = SA_RESTART | SA_INTERRUPT | SA_NOMASK; s.sa_restorer= NULL ; #elif defined(signal_like_SVR4) s.sa_flags = SA_RESTART; #else s.sa_flags = 0; 10a43d: c7 45 ec 00 00 00 00 movl $0x0,-0x14(%ebp) #endif sigaction( signum, &s, &old ); 10a444: 83 c4 0c add $0xc,%esp 10a447: 8d 45 e0 lea -0x20(%ebp),%eax 10a44a: 50 push %eax 10a44b: 53 push %ebx 10a44c: ff 75 08 pushl 0x8(%ebp) 10a44f: e8 cc fe ff ff call 10a320 <== ALWAYS TAKEN return (sighandler_t) old.sa_handler; } 10a454: 8b 45 e8 mov -0x18(%ebp),%eax 10a457: 8b 5d fc mov -0x4(%ebp),%ebx 10a45a: c9 leave 10a45b: c3 ret 0010a65c : #include int sigpending( sigset_t *set ) { 10a65c: 55 push %ebp 10a65d: 89 e5 mov %esp,%ebp 10a65f: 83 ec 08 sub $0x8,%esp 10a662: 8b 55 08 mov 0x8(%ebp),%edx POSIX_API_Control *api; if ( !set ) 10a665: 85 d2 test %edx,%edx 10a667: 75 10 jne 10a679 rtems_set_errno_and_return_minus_one( EINVAL ); 10a669: e8 e2 7a 00 00 call 112150 <__errno> 10a66e: c7 00 16 00 00 00 movl $0x16,(%eax) 10a674: 83 c8 ff or $0xffffffff,%eax 10a677: eb 1a jmp 10a693 <== ALWAYS TAKEN api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; *set = api->signals_pending | _POSIX_signals_Pending; 10a679: a1 e8 62 12 00 mov 0x1262e8,%eax 10a67e: 8b 88 f8 00 00 00 mov 0xf8(%eax),%ecx 10a684: a1 58 69 12 00 mov 0x126958,%eax 10a689: 0b 81 c8 00 00 00 or 0xc8(%ecx),%eax 10a68f: 89 02 mov %eax,(%edx) 10a691: 31 c0 xor %eax,%eax return 0; } 10a693: c9 leave 10a694: c3 ret 0010c128 : #include int sigsuspend( const sigset_t *sigmask ) { 10c128: 55 push %ebp 10c129: 89 e5 mov %esp,%ebp 10c12b: 56 push %esi 10c12c: 53 push %ebx 10c12d: 83 ec 14 sub $0x14,%esp int status; POSIX_API_Control *api; api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; status = sigprocmask( SIG_BLOCK, sigmask, &saved_signals_blocked ); 10c130: 8d 5d f4 lea -0xc(%ebp),%ebx 10c133: 53 push %ebx 10c134: ff 75 08 pushl 0x8(%ebp) 10c137: 6a 01 push $0x1 10c139: e8 c6 ff ff ff call 10c104 <== ALWAYS TAKEN (void) sigfillset( &all_signals ); 10c13e: 8d 75 f0 lea -0x10(%ebp),%esi 10c141: 89 34 24 mov %esi,(%esp) 10c144: e8 17 ff ff ff call 10c060 <== ALWAYS TAKEN status = sigtimedwait( &all_signals, NULL, NULL ); 10c149: 83 c4 0c add $0xc,%esp 10c14c: 6a 00 push $0x0 10c14e: 6a 00 push $0x0 10c150: 56 push %esi 10c151: e8 69 00 00 00 call 10c1bf <== ALWAYS TAKEN 10c156: 89 c6 mov %eax,%esi (void) sigprocmask( SIG_SETMASK, &saved_signals_blocked, NULL ); 10c158: 83 c4 0c add $0xc,%esp 10c15b: 6a 00 push $0x0 10c15d: 53 push %ebx 10c15e: 6a 00 push $0x0 10c160: e8 9f ff ff ff call 10c104 <== ALWAYS TAKEN /* * sigtimedwait() returns the signal number while sigsuspend() * is supposed to return -1 and EINTR when a signal is caught. */ if ( status != -1 ) 10c165: 83 c4 10 add $0x10,%esp 10c168: 46 inc %esi 10c169: 74 0b je 10c176 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EINTR ); 10c16b: e8 58 7a 00 00 call 113bc8 <__errno> 10c170: c7 00 04 00 00 00 movl $0x4,(%eax) return status; } 10c176: 83 c8 ff or $0xffffffff,%eax 10c179: 8d 65 f8 lea -0x8(%ebp),%esp 10c17c: 5b pop %ebx 10c17d: 5e pop %esi 10c17e: c9 leave 10c17f: c3 ret 0010a91b : int sigtimedwait( const sigset_t *set, siginfo_t *info, const struct timespec *timeout ) { 10a91b: 55 push %ebp 10a91c: 89 e5 mov %esp,%ebp 10a91e: 57 push %edi 10a91f: 56 push %esi 10a920: 53 push %ebx 10a921: 83 ec 2c sub $0x2c,%esp 10a924: 8b 7d 08 mov 0x8(%ebp),%edi 10a927: 8b 5d 10 mov 0x10(%ebp),%ebx ISR_Level level; /* * Error check parameters before disabling interrupts. */ if ( !set ) 10a92a: 85 ff test %edi,%edi 10a92c: 74 24 je 10a952 /* NOTE: This is very specifically a RELATIVE not ABSOLUTE time * in the Open Group specification. */ interval = 0; if ( timeout ) { 10a92e: 85 db test %ebx,%ebx 10a930: 74 33 je 10a965 if ( !_Timespec_Is_valid( timeout ) ) 10a932: 83 ec 0c sub $0xc,%esp 10a935: 53 push %ebx 10a936: e8 d1 2f 00 00 call 10d90c <_Timespec_Is_valid> 10a93b: 83 c4 10 add $0x10,%esp 10a93e: 84 c0 test %al,%al 10a940: 74 10 je 10a952 rtems_set_errno_and_return_minus_one( EINVAL ); interval = _Timespec_To_ticks( timeout ); 10a942: 83 ec 0c sub $0xc,%esp 10a945: 53 push %ebx 10a946: e8 19 30 00 00 call 10d964 <_Timespec_To_ticks> if ( !interval ) 10a94b: 83 c4 10 add $0x10,%esp 10a94e: 85 c0 test %eax,%eax 10a950: 75 15 jne 10a967 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); 10a952: e8 35 7b 00 00 call 11248c <__errno> 10a957: c7 00 16 00 00 00 movl $0x16,(%eax) 10a95d: 83 cf ff or $0xffffffff,%edi 10a960: e9 13 01 00 00 jmp 10aa78 <== ALWAYS TAKEN 10a965: 31 c0 xor %eax,%eax /* * Initialize local variables. */ the_info = ( info ) ? info : &signal_information; 10a967: 8b 5d 0c mov 0xc(%ebp),%ebx 10a96a: 85 db test %ebx,%ebx 10a96c: 75 03 jne 10a971 10a96e: 8d 5d dc lea -0x24(%ebp),%ebx the_thread = _Thread_Executing; 10a971: 8b 15 e8 62 12 00 mov 0x1262e8,%edx api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 10a977: 8b b2 f8 00 00 00 mov 0xf8(%edx),%esi * What if they are already pending? */ /* API signals pending? */ _ISR_Disable( level ); 10a97d: 9c pushf 10a97e: fa cli 10a97f: 8f 45 d4 popl -0x2c(%ebp) if ( *set & api->signals_pending ) { 10a982: 8b 0f mov (%edi),%ecx 10a984: 89 4d d0 mov %ecx,-0x30(%ebp) 10a987: 8b 8e c8 00 00 00 mov 0xc8(%esi),%ecx 10a98d: 85 4d d0 test %ecx,-0x30(%ebp) 10a990: 74 32 je 10a9c4 /* XXX real info later */ the_info->si_signo = _POSIX_signals_Get_highest( api->signals_pending ); 10a992: 83 ec 0c sub $0xc,%esp 10a995: 51 push %ecx 10a996: e8 41 ff ff ff call 10a8dc <_POSIX_signals_Get_highest> <== ALWAYS TAKEN 10a99b: 89 03 mov %eax,(%ebx) _POSIX_signals_Clear_signals( 10a99d: c7 04 24 00 00 00 00 movl $0x0,(%esp) 10a9a4: 6a 00 push $0x0 10a9a6: 53 push %ebx 10a9a7: 50 push %eax 10a9a8: 56 push %esi 10a9a9: e8 d6 4d 00 00 call 10f784 <_POSIX_signals_Clear_signals> the_info->si_signo, the_info, false, false ); _ISR_Enable( level ); 10a9ae: ff 75 d4 pushl -0x2c(%ebp) 10a9b1: 9d popf the_info->si_code = SI_USER; 10a9b2: c7 43 04 01 00 00 00 movl $0x1,0x4(%ebx) the_info->si_value.sival_int = 0; 10a9b9: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx) return the_info->si_signo; 10a9c0: 8b 3b mov (%ebx),%edi 10a9c2: eb 3b jmp 10a9ff <== ALWAYS TAKEN } /* Process pending signals? */ if ( *set & _POSIX_signals_Pending ) { 10a9c4: 8b 0d 58 69 12 00 mov 0x126958,%ecx 10a9ca: 85 4d d0 test %ecx,-0x30(%ebp) 10a9cd: 74 35 je 10aa04 signo = _POSIX_signals_Get_highest( _POSIX_signals_Pending ); 10a9cf: 83 ec 0c sub $0xc,%esp 10a9d2: 51 push %ecx 10a9d3: e8 04 ff ff ff call 10a8dc <_POSIX_signals_Get_highest> <== ALWAYS TAKEN 10a9d8: 89 c7 mov %eax,%edi _POSIX_signals_Clear_signals( api, signo, the_info, true, false ); 10a9da: c7 04 24 00 00 00 00 movl $0x0,(%esp) 10a9e1: 6a 01 push $0x1 10a9e3: 53 push %ebx 10a9e4: 50 push %eax 10a9e5: 56 push %esi 10a9e6: e8 99 4d 00 00 call 10f784 <_POSIX_signals_Clear_signals> _ISR_Enable( level ); 10a9eb: ff 75 d4 pushl -0x2c(%ebp) 10a9ee: 9d popf the_info->si_signo = signo; 10a9ef: 89 3b mov %edi,(%ebx) the_info->si_code = SI_USER; 10a9f1: c7 43 04 01 00 00 00 movl $0x1,0x4(%ebx) the_info->si_value.sival_int = 0; 10a9f8: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx) return signo; 10a9ff: 83 c4 20 add $0x20,%esp 10aa02: eb 74 jmp 10aa78 <== ALWAYS TAKEN } the_info->si_signo = -1; 10aa04: c7 03 ff ff ff ff movl $0xffffffff,(%ebx) 10aa0a: 8b 0d 2c 62 12 00 mov 0x12622c,%ecx 10aa10: 41 inc %ecx 10aa11: 89 0d 2c 62 12 00 mov %ecx,0x12622c _Thread_Disable_dispatch(); the_thread->Wait.queue = &_POSIX_signals_Wait_queue; 10aa17: c7 42 44 18 69 12 00 movl $0x126918,0x44(%edx) the_thread->Wait.return_code = EINTR; 10aa1e: c7 42 34 04 00 00 00 movl $0x4,0x34(%edx) the_thread->Wait.option = *set; 10aa25: 8b 0f mov (%edi),%ecx 10aa27: 89 4a 30 mov %ecx,0x30(%edx) the_thread->Wait.return_argument = the_info; 10aa2a: 89 5a 28 mov %ebx,0x28(%edx) RTEMS_INLINE_ROUTINE void _Thread_queue_Enter_critical_section ( Thread_queue_Control *the_thread_queue ) { the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 10aa2d: c7 05 48 69 12 00 01 movl $0x1,0x126948 10aa34: 00 00 00 _Thread_queue_Enter_critical_section( &_POSIX_signals_Wait_queue ); _ISR_Enable( level ); 10aa37: ff 75 d4 pushl -0x2c(%ebp) 10aa3a: 9d popf _Thread_queue_Enqueue( &_POSIX_signals_Wait_queue, interval ); 10aa3b: 52 push %edx 10aa3c: 68 00 d5 10 00 push $0x10d500 10aa41: 50 push %eax 10aa42: 68 18 69 12 00 push $0x126918 10aa47: e8 f8 27 00 00 call 10d244 <_Thread_queue_Enqueue_with_handler> _Thread_Enable_dispatch(); 10aa4c: e8 60 23 00 00 call 10cdb1 <_Thread_Enable_dispatch> /* * When the thread is set free by a signal, it is need to eliminate * the signal. */ _POSIX_signals_Clear_signals( api, the_info->si_signo, the_info, false, false ); 10aa51: c7 04 24 00 00 00 00 movl $0x0,(%esp) 10aa58: 6a 00 push $0x0 10aa5a: 53 push %ebx 10aa5b: ff 33 pushl (%ebx) 10aa5d: 56 push %esi 10aa5e: e8 21 4d 00 00 call 10f784 <_POSIX_signals_Clear_signals> errno = _Thread_Executing->Wait.return_code; 10aa63: 83 c4 20 add $0x20,%esp 10aa66: e8 21 7a 00 00 call 11248c <__errno> 10aa6b: 8b 15 e8 62 12 00 mov 0x1262e8,%edx 10aa71: 8b 52 34 mov 0x34(%edx),%edx 10aa74: 89 10 mov %edx,(%eax) return the_info->si_signo; 10aa76: 8b 3b mov (%ebx),%edi } 10aa78: 89 f8 mov %edi,%eax 10aa7a: 8d 65 f4 lea -0xc(%ebp),%esp 10aa7d: 5b pop %ebx 10aa7e: 5e pop %esi 10aa7f: 5f pop %edi 10aa80: c9 leave 10aa81: c3 ret 0010c340 : int sigwait( const sigset_t *set, int *sig ) { 10c340: 55 push %ebp 10c341: 89 e5 mov %esp,%ebp 10c343: 53 push %ebx 10c344: 83 ec 08 sub $0x8,%esp 10c347: 8b 5d 0c mov 0xc(%ebp),%ebx int status; status = sigtimedwait( set, NULL, NULL ); 10c34a: 6a 00 push $0x0 10c34c: 6a 00 push $0x0 10c34e: ff 75 08 pushl 0x8(%ebp) 10c351: e8 69 fe ff ff call 10c1bf <== ALWAYS TAKEN 10c356: 89 c2 mov %eax,%edx if ( status != -1 ) { 10c358: 83 c4 10 add $0x10,%esp 10c35b: 83 f8 ff cmp $0xffffffff,%eax 10c35e: 74 0a je 10c36a if ( sig ) 10c360: 31 c0 xor %eax,%eax 10c362: 85 db test %ebx,%ebx 10c364: 74 0b je 10c371 <== ALWAYS TAKEN *sig = status; 10c366: 89 13 mov %edx,(%ebx) 10c368: eb 07 jmp 10c371 <== ALWAYS TAKEN return 0; } return errno; 10c36a: e8 59 78 00 00 call 113bc8 <__errno> 10c36f: 8b 00 mov (%eax),%eax } 10c371: 8b 5d fc mov -0x4(%ebp),%ebx 10c374: c9 leave 10c375: c3 ret 0010c328 : int sigwaitinfo( const sigset_t *set, siginfo_t *info ) { 10c328: 55 push %ebp 10c329: 89 e5 mov %esp,%ebp 10c32b: 83 ec 0c sub $0xc,%esp return sigtimedwait( set, info, NULL ); 10c32e: 6a 00 push $0x0 10c330: ff 75 0c pushl 0xc(%ebp) 10c333: ff 75 08 pushl 0x8(%ebp) 10c336: e8 84 fe ff ff call 10c1bf <== ALWAYS TAKEN } 10c33b: c9 leave 10c33c: c3 ret 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 48 cb 02 00 call 13963c <__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 f3 ca 02 00 call 13963c <__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 001269b8 : */ extern rtems_chain_control rtems_filesystem_mount_table_control; int statvfs (const char *path, struct statvfs *sb) { 1269b8: 55 push %ebp <== NOT EXECUTED 1269b9: 89 e5 mov %esp,%ebp <== NOT EXECUTED 1269bb: 57 push %edi <== NOT EXECUTED 1269bc: 56 push %esi <== NOT EXECUTED 1269bd: 53 push %ebx <== NOT EXECUTED 1269be: 83 ec 38 sub $0x38,%esp <== NOT EXECUTED 1269c1: 8b 55 08 mov 0x8(%ebp),%edx <== NOT EXECUTED 1269c4: 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 ) ) 1269c7: 31 c0 xor %eax,%eax <== NOT EXECUTED 1269c9: 83 c9 ff or $0xffffffff,%ecx <== NOT EXECUTED 1269cc: 89 d7 mov %edx,%edi <== NOT EXECUTED 1269ce: f2 ae repnz scas %es:(%edi),%al <== NOT EXECUTED 1269d0: f7 d1 not %ecx <== NOT EXECUTED 1269d2: 49 dec %ecx <== NOT EXECUTED 1269d3: 6a 01 push $0x1 <== NOT EXECUTED 1269d5: 8d 5d d4 lea -0x2c(%ebp),%ebx <== NOT EXECUTED 1269d8: 53 push %ebx <== NOT EXECUTED 1269d9: 6a 00 push $0x0 <== NOT EXECUTED 1269db: 51 push %ecx <== NOT EXECUTED 1269dc: 52 push %edx <== NOT EXECUTED 1269dd: e8 3a 4d fe ff call 10b71c <== NOT EXECUTED 1269e2: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 1269e5: 83 cf ff or $0xffffffff,%edi <== NOT EXECUTED 1269e8: 85 c0 test %eax,%eax <== NOT EXECUTED 1269ea: 75 4b jne 126a37 <== NOT EXECUTED return -1; mt_entry = loc.mt_entry; 1269ec: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED fs_mount_root = &mt_entry->mt_fs_root; 1269ef: 8b 4a 28 mov 0x28(%edx),%ecx <== NOT EXECUTED 1269f2: 83 79 44 00 cmpl $0x0,0x44(%ecx) <== NOT EXECUTED 1269f6: 75 0d jne 126a05 <== NOT EXECUTED if ( !fs_mount_root->ops->statvfs_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 1269f8: e8 3f 2c 01 00 call 13963c <__errno> <== NOT EXECUTED 1269fd: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 126a03: eb 32 jmp 126a37 <== NOT EXECUTED memset (sb, 0, sizeof (struct statvfs)); 126a05: b9 0e 00 00 00 mov $0xe,%ecx <== NOT EXECUTED 126a0a: 89 f7 mov %esi,%edi <== NOT EXECUTED 126a0c: f3 ab rep stos %eax,%es:(%edi) <== NOT EXECUTED result = ( fs_mount_root->ops->statvfs_h )( fs_mount_root, sb ); 126a0e: 50 push %eax <== NOT EXECUTED 126a0f: 50 push %eax <== NOT EXECUTED 126a10: 8b 42 28 mov 0x28(%edx),%eax <== NOT EXECUTED 126a13: 56 push %esi <== NOT EXECUTED 126a14: 83 c2 1c add $0x1c,%edx <== NOT EXECUTED 126a17: 52 push %edx <== NOT EXECUTED 126a18: ff 50 44 call *0x44(%eax) <== NOT EXECUTED 126a1b: 89 c7 mov %eax,%edi <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 126a1d: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED 126a20: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 126a23: 85 c0 test %eax,%eax <== NOT EXECUTED 126a25: 74 10 je 126a37 <== NOT EXECUTED 126a27: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 126a2a: 85 c0 test %eax,%eax <== NOT EXECUTED 126a2c: 74 09 je 126a37 <== NOT EXECUTED 126a2e: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 126a31: 53 push %ebx <== NOT EXECUTED 126a32: ff d0 call *%eax <== NOT EXECUTED 126a34: 83 c4 10 add $0x10,%esp <== NOT EXECUTED return result; } 126a37: 89 f8 mov %edi,%eax <== NOT EXECUTED 126a39: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 126a3c: 5b pop %ebx <== NOT EXECUTED 126a3d: 5e pop %esi <== NOT EXECUTED 126a3e: 5f pop %edi <== NOT EXECUTED 126a3f: c9 leave <== NOT EXECUTED 126a40: c3 ret <== NOT EXECUTED 00126a44 : int symlink( const char *actualpath, const char *sympath ) { 126a44: 55 push %ebp 126a45: 89 e5 mov %esp,%ebp 126a47: 57 push %edi 126a48: 56 push %esi 126a49: 83 ec 20 sub $0x20,%esp 126a4c: 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 ); 126a4f: 8a 10 mov (%eax),%dl 126a51: 80 fa 5c cmp $0x5c,%dl 126a54: 74 09 je 126a5f <== ALWAYS TAKEN 126a56: 80 fa 2f cmp $0x2f,%dl 126a59: 74 04 je 126a5f 126a5b: 84 d2 test %dl,%dl 126a5d: 75 17 jne 126a76 <== NEVER TAKEN 126a5f: 8d 7d e0 lea -0x20(%ebp),%edi 126a62: 8b 35 78 e1 15 00 mov 0x15e178,%esi 126a68: 83 c6 18 add $0x18,%esi 126a6b: b9 05 00 00 00 mov $0x5,%ecx 126a70: f3 a5 rep movsl %ds:(%esi),%es:(%edi) 126a72: b1 01 mov $0x1,%cl 126a74: eb 13 jmp 126a89 <== ALWAYS TAKEN 126a76: 8d 7d e0 lea -0x20(%ebp),%edi 126a79: 8b 35 78 e1 15 00 mov 0x15e178,%esi 126a7f: 83 c6 04 add $0x4,%esi 126a82: b9 05 00 00 00 mov $0x5,%ecx 126a87: f3 a5 rep movsl %ds:(%esi),%es:(%edi) if ( !loc.ops->evalformake_h ) { 126a89: 8b 55 ec mov -0x14(%ebp),%edx 126a8c: 8b 52 04 mov 0x4(%edx),%edx 126a8f: 85 d2 test %edx,%edx 126a91: 74 32 je 126ac5 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.ops->evalformake_h)( &sympath[i], &loc, &name_start ); 126a93: 56 push %esi 126a94: 8d 75 f4 lea -0xc(%ebp),%esi 126a97: 56 push %esi 126a98: 8d 7d e0 lea -0x20(%ebp),%edi 126a9b: 57 push %edi 126a9c: 01 c8 add %ecx,%eax 126a9e: 50 push %eax 126a9f: ff d2 call *%edx if ( result != 0 ) 126aa1: 83 c4 10 add $0x10,%esp 126aa4: 83 ce ff or $0xffffffff,%esi 126aa7: 85 c0 test %eax,%eax 126aa9: 75 50 jne 126afb return -1; if ( !loc.ops->symlink_h ) { 126aab: 8b 55 ec mov -0x14(%ebp),%edx 126aae: 8b 42 38 mov 0x38(%edx),%eax 126ab1: 85 c0 test %eax,%eax 126ab3: 75 20 jne 126ad5 <== NEVER TAKEN rtems_filesystem_freenode( &loc ); 126ab5: 8b 42 1c mov 0x1c(%edx),%eax <== NOT EXECUTED 126ab8: 85 c0 test %eax,%eax <== NOT EXECUTED 126aba: 74 09 je 126ac5 <== NOT EXECUTED 126abc: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 126abf: 57 push %edi <== NOT EXECUTED 126ac0: ff d0 call *%eax <== NOT EXECUTED 126ac2: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 126ac5: e8 72 2b 01 00 call 13963c <__errno> <== NOT EXECUTED 126aca: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 126ad0: 83 ce ff or $0xffffffff,%esi <== NOT EXECUTED 126ad3: eb 26 jmp 126afb <== NOT EXECUTED } result = (*loc.ops->symlink_h)( &loc, actualpath, name_start); 126ad5: 52 push %edx 126ad6: ff 75 f4 pushl -0xc(%ebp) 126ad9: ff 75 08 pushl 0x8(%ebp) 126adc: 57 push %edi 126add: ff d0 call *%eax 126adf: 89 c6 mov %eax,%esi rtems_filesystem_freenode( &loc ); 126ae1: 8b 45 ec mov -0x14(%ebp),%eax 126ae4: 83 c4 10 add $0x10,%esp 126ae7: 85 c0 test %eax,%eax 126ae9: 74 10 je 126afb <== ALWAYS TAKEN 126aeb: 8b 40 1c mov 0x1c(%eax),%eax 126aee: 85 c0 test %eax,%eax 126af0: 74 09 je 126afb <== ALWAYS TAKEN 126af2: 83 ec 0c sub $0xc,%esp 126af5: 57 push %edi 126af6: ff d0 call *%eax 126af8: 83 c4 10 add $0x10,%esp return result; } 126afb: 89 f0 mov %esi,%eax 126afd: 8d 65 f8 lea -0x8(%ebp),%esp 126b00: 5e pop %esi 126b01: 5f pop %edi 126b02: c9 leave 126b03: 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 f0 00 00 00 mov 0xf0(%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 b0 72 12 00 mov 0x1272b0,%edx 109282: 8b 9a f0 00 00 00 mov 0xf0(%edx),%ebx _Thread_Executing->libc_reent = this_reent; 109288: 89 8a f0 00 00 00 mov %ecx,0xf0(%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 f0 00 00 00 pushl 0xf0(%eax) 10929b: e8 14 b0 00 00 call 1142b4 <_fwalk> _Thread_Executing->libc_reent = current_reent; 1092a0: a1 b0 72 12 00 mov 0x1272b0,%eax 1092a5: 89 98 f0 00 00 00 mov %ebx,0xf0(%eax) 1092ab: 83 c4 10 add $0x10,%esp } } 1092ae: 8b 5d fc mov -0x4(%ebp),%ebx 1092b1: c9 leave 1092b2: c3 ret 00109aec : */ long sysconf( int name ) { 109aec: 55 push %ebp 109aed: 89 e5 mov %esp,%ebp 109aef: 83 ec 08 sub $0x8,%esp 109af2: 8b 55 08 mov 0x8(%ebp),%edx if ( name == _SC_CLK_TCK ) 109af5: 83 fa 02 cmp $0x2,%edx 109af8: 75 0f jne 109b09 return (TOD_MICROSECONDS_PER_SECOND / 109afa: b8 40 42 0f 00 mov $0xf4240,%eax 109aff: 31 d2 xor %edx,%edx 109b01: f7 35 28 12 12 00 divl 0x121228 109b07: eb 2d jmp 109b36 <== ALWAYS TAKEN rtems_configuration_get_microseconds_per_tick()); if ( name == _SC_OPEN_MAX ) 109b09: 83 fa 04 cmp $0x4,%edx 109b0c: 75 07 jne 109b15 return rtems_libio_number_iops; 109b0e: a1 44 11 12 00 mov 0x121144,%eax 109b13: eb 21 jmp 109b36 <== ALWAYS TAKEN if ( name == _SC_GETPW_R_SIZE_MAX ) 109b15: b8 00 04 00 00 mov $0x400,%eax 109b1a: 83 fa 33 cmp $0x33,%edx 109b1d: 74 17 je 109b36 return 1024; if ( name == _SC_PAGESIZE ) 109b1f: 66 b8 00 10 mov $0x1000,%ax 109b23: 83 fa 08 cmp $0x8,%edx 109b26: 74 0e je 109b36 #if defined(__sparc__) if ( name == 515 ) /* Solaris _SC_STACK_PROT */ return 0; #endif rtems_set_errno_and_return_minus_one( EINVAL ); 109b28: e8 cf 7e 00 00 call 1119fc <__errno> 109b2d: c7 00 16 00 00 00 movl $0x16,(%eax) 109b33: 83 c8 ff or $0xffffffff,%eax } 109b36: c9 leave 109b37: c3 ret 001138a8 : int tcsetattr( int fd, int opt, struct termios *tp ) { 1138a8: 55 push %ebp 1138a9: 89 e5 mov %esp,%ebp 1138ab: 56 push %esi 1138ac: 53 push %ebx 1138ad: 8b 5d 08 mov 0x8(%ebp),%ebx 1138b0: 8b 45 0c mov 0xc(%ebp),%eax 1138b3: 8b 75 10 mov 0x10(%ebp),%esi switch (opt) { 1138b6: 85 c0 test %eax,%eax 1138b8: 74 22 je 1138dc <== NEVER TAKEN 1138ba: 48 dec %eax <== NOT EXECUTED 1138bb: 74 0d je 1138ca <== NOT EXECUTED default: rtems_set_errno_and_return_minus_one( ENOTSUP ); 1138bd: e8 ca 44 00 00 call 117d8c <__errno> <== NOT EXECUTED 1138c2: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 1138c8: eb 2a jmp 1138f4 <== NOT EXECUTED case TCSADRAIN: if (ioctl( fd, RTEMS_IO_TCDRAIN, NULL ) < 0) 1138ca: 50 push %eax <== NOT EXECUTED 1138cb: 6a 00 push $0x0 <== NOT EXECUTED 1138cd: 6a 03 push $0x3 <== NOT EXECUTED 1138cf: 53 push %ebx <== NOT EXECUTED 1138d0: e8 c7 31 00 00 call 116a9c <== NOT EXECUTED 1138d5: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 1138d8: 85 c0 test %eax,%eax <== NOT EXECUTED 1138da: 78 18 js 1138f4 <== NOT EXECUTED return -1; /* * Fall through to.... */ case TCSANOW: return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp ); 1138dc: 89 75 10 mov %esi,0x10(%ebp) 1138df: c7 45 0c 02 00 00 00 movl $0x2,0xc(%ebp) 1138e6: 89 5d 08 mov %ebx,0x8(%ebp) } } 1138e9: 8d 65 f8 lea -0x8(%ebp),%esp 1138ec: 5b pop %ebx 1138ed: 5e pop %esi 1138ee: c9 leave return -1; /* * Fall through to.... */ case TCSANOW: return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp ); 1138ef: e9 a8 31 00 00 jmp 116a9c } } 1138f4: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 1138f7: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED 1138fa: 5b pop %ebx <== NOT EXECUTED 1138fb: 5e pop %esi <== NOT EXECUTED 1138fc: c9 leave <== NOT EXECUTED 1138fd: c3 ret <== NOT EXECUTED 00109dcc : int timer_create( clockid_t clock_id, struct sigevent *evp, timer_t *timerid ) { 109dcc: 55 push %ebp 109dcd: 89 e5 mov %esp,%ebp 109dcf: 56 push %esi 109dd0: 53 push %ebx 109dd1: 8b 5d 0c mov 0xc(%ebp),%ebx 109dd4: 8b 75 10 mov 0x10(%ebp),%esi POSIX_Timer_Control *ptimer; if ( clock_id != CLOCK_REALTIME ) 109dd7: 83 7d 08 01 cmpl $0x1,0x8(%ebp) 109ddb: 75 1d jne 109dfa rtems_set_errno_and_return_minus_one( EINVAL ); if ( !timerid ) 109ddd: 85 f6 test %esi,%esi 109ddf: 74 19 je 109dfa /* * The data of the structure evp are checked in order to verify if they * are coherent. */ if (evp != NULL) { 109de1: 85 db test %ebx,%ebx 109de3: 74 22 je 109e07 /* The structure has data */ if ( ( evp->sigev_notify != SIGEV_NONE ) && 109de5: 8b 03 mov (%ebx),%eax 109de7: 48 dec %eax 109de8: 83 f8 01 cmp $0x1,%eax 109deb: 77 0d ja 109dfa <== ALWAYS TAKEN ( evp->sigev_notify != SIGEV_SIGNAL ) ) { /* The value of the field sigev_notify is not valid */ rtems_set_errno_and_return_minus_one( EINVAL ); } if ( !evp->sigev_signo ) 109ded: 8b 43 04 mov 0x4(%ebx),%eax 109df0: 85 c0 test %eax,%eax 109df2: 74 06 je 109dfa <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(evp->sigev_signo) ) 109df4: 48 dec %eax 109df5: 83 f8 1f cmp $0x1f,%eax 109df8: 76 0d jbe 109e07 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); 109dfa: e8 91 80 00 00 call 111e90 <__errno> 109dff: c7 00 16 00 00 00 movl $0x16,(%eax) 109e05: eb 2f jmp 109e36 <== ALWAYS TAKEN rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 109e07: a1 40 62 12 00 mov 0x126240,%eax 109e0c: 40 inc %eax 109e0d: a3 40 62 12 00 mov %eax,0x126240 * the inactive chain of free timer control blocks. */ RTEMS_INLINE_ROUTINE POSIX_Timer_Control *_POSIX_Timer_Allocate( void ) { return (POSIX_Timer_Control *) _Objects_Allocate( &_POSIX_Timer_Information ); 109e12: 83 ec 0c sub $0xc,%esp 109e15: 68 68 65 12 00 push $0x126568 109e1a: e8 1d 1b 00 00 call 10b93c <_Objects_Allocate> /* * Allocate a timer */ ptimer = _POSIX_Timer_Allocate(); if ( !ptimer ) { 109e1f: 83 c4 10 add $0x10,%esp 109e22: 85 c0 test %eax,%eax 109e24: 75 18 jne 109e3e _Thread_Enable_dispatch(); 109e26: e8 16 27 00 00 call 10c541 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EAGAIN ); 109e2b: e8 60 80 00 00 call 111e90 <__errno> 109e30: c7 00 0b 00 00 00 movl $0xb,(%eax) 109e36: 83 c8 ff or $0xffffffff,%eax 109e39: e9 83 00 00 00 jmp 109ec1 <== ALWAYS TAKEN } /* The data of the created timer are stored to use them later */ ptimer->state = POSIX_TIMER_STATE_CREATE_NEW; 109e3e: c6 40 3c 02 movb $0x2,0x3c(%eax) ptimer->thread_id = _Thread_Executing->Object.id; 109e42: 8b 15 fc 62 12 00 mov 0x1262fc,%edx 109e48: 8b 52 08 mov 0x8(%edx),%edx 109e4b: 89 50 38 mov %edx,0x38(%eax) if ( evp != NULL ) { 109e4e: 85 db test %ebx,%ebx 109e50: 74 11 je 109e63 ptimer->inf.sigev_notify = evp->sigev_notify; 109e52: 8b 13 mov (%ebx),%edx 109e54: 89 50 40 mov %edx,0x40(%eax) ptimer->inf.sigev_signo = evp->sigev_signo; 109e57: 8b 53 04 mov 0x4(%ebx),%edx 109e5a: 89 50 44 mov %edx,0x44(%eax) ptimer->inf.sigev_value = evp->sigev_value; 109e5d: 8b 53 08 mov 0x8(%ebx),%edx 109e60: 89 50 48 mov %edx,0x48(%eax) } ptimer->overrun = 0; 109e63: c7 40 68 00 00 00 00 movl $0x0,0x68(%eax) ptimer->timer_data.it_value.tv_sec = 0; 109e6a: c7 40 5c 00 00 00 00 movl $0x0,0x5c(%eax) ptimer->timer_data.it_value.tv_nsec = 0; 109e71: c7 40 60 00 00 00 00 movl $0x0,0x60(%eax) ptimer->timer_data.it_interval.tv_sec = 0; 109e78: c7 40 54 00 00 00 00 movl $0x0,0x54(%eax) ptimer->timer_data.it_interval.tv_nsec = 0; 109e7f: c7 40 58 00 00 00 00 movl $0x0,0x58(%eax) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 109e86: c7 40 18 00 00 00 00 movl $0x0,0x18(%eax) the_watchdog->routine = routine; 109e8d: c7 40 2c 00 00 00 00 movl $0x0,0x2c(%eax) the_watchdog->id = id; 109e94: c7 40 30 00 00 00 00 movl $0x0,0x30(%eax) the_watchdog->user_data = user_data; 109e9b: 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; 109ea2: 8b 50 08 mov 0x8(%eax),%edx 109ea5: 0f b7 da movzwl %dx,%ebx 109ea8: 8b 0d 84 65 12 00 mov 0x126584,%ecx 109eae: 89 04 99 mov %eax,(%ecx,%ebx,4) _Objects_Get_index( the_object->id ), the_object ); /* ASSERT: information->is_string == false */ the_object->name.name_u32 = name; 109eb1: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax) _Watchdog_Initialize( &ptimer->Timer, NULL, 0, NULL ); _Objects_Open_u32(&_POSIX_Timer_Information, &ptimer->Object, 0); *timerid = ptimer->Object.id; 109eb8: 89 16 mov %edx,(%esi) _Thread_Enable_dispatch(); 109eba: e8 82 26 00 00 call 10c541 <_Thread_Enable_dispatch> 109ebf: 31 c0 xor %eax,%eax return 0; } 109ec1: 8d 65 f8 lea -0x8(%ebp),%esp 109ec4: 5b pop %ebx 109ec5: 5e pop %esi 109ec6: c9 leave 109ec7: c3 ret 0010a298 : int timer_delete( timer_t timerid ) { 10a298: 55 push %ebp 10a299: 89 e5 mov %esp,%ebp 10a29b: 53 push %ebx 10a29c: 83 ec 18 sub $0x18,%esp RTEMS_INLINE_ROUTINE POSIX_Timer_Control *_POSIX_Timer_Get ( timer_t id, Objects_Locations *location ) { return (POSIX_Timer_Control *) 10a29f: 8d 45 f4 lea -0xc(%ebp),%eax 10a2a2: 50 push %eax 10a2a3: ff 75 08 pushl 0x8(%ebp) 10a2a6: 68 fc 64 12 00 push $0x1264fc 10a2ab: e8 e0 1d 00 00 call 10c090 <_Objects_Get> 10a2b0: 89 c3 mov %eax,%ebx */ POSIX_Timer_Control *ptimer; Objects_Locations location; ptimer = _POSIX_Timer_Get( timerid, &location ); switch ( location ) { 10a2b2: 83 c4 10 add $0x10,%esp 10a2b5: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 10a2b9: 75 35 jne 10a2f0 case OBJECTS_LOCAL: _Objects_Close( &_POSIX_Timer_Information, &ptimer->Object ); 10a2bb: 51 push %ecx 10a2bc: 51 push %ecx 10a2bd: 50 push %eax 10a2be: 68 fc 64 12 00 push $0x1264fc 10a2c3: e8 20 1a 00 00 call 10bce8 <_Objects_Close> ptimer->state = POSIX_TIMER_STATE_FREE; 10a2c8: c6 43 3c 01 movb $0x1,0x3c(%ebx) (void) _Watchdog_Remove( &ptimer->Timer ); 10a2cc: 8d 43 10 lea 0x10(%ebx),%eax 10a2cf: 89 04 24 mov %eax,(%esp) 10a2d2: e8 0d 35 00 00 call 10d7e4 <_Watchdog_Remove> RTEMS_INLINE_ROUTINE void _POSIX_Timer_Free ( POSIX_Timer_Control *the_timer ) { _Objects_Free( &_POSIX_Timer_Information, &the_timer->Object ); 10a2d7: 58 pop %eax 10a2d8: 5a pop %edx 10a2d9: 53 push %ebx 10a2da: 68 fc 64 12 00 push $0x1264fc 10a2df: e8 84 1c 00 00 call 10bf68 <_Objects_Free> _POSIX_Timer_Free( ptimer ); _Thread_Enable_dispatch(); 10a2e4: e8 98 25 00 00 call 10c881 <_Thread_Enable_dispatch> 10a2e9: 31 c0 xor %eax,%eax return 0; 10a2eb: 83 c4 10 add $0x10,%esp 10a2ee: eb 0e jmp 10a2fe <== ALWAYS TAKEN #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 10a2f0: e8 23 82 00 00 call 112518 <__errno> 10a2f5: c7 00 16 00 00 00 movl $0x16,(%eax) 10a2fb: 83 c8 ff or $0xffffffff,%eax } 10a2fe: 8b 5d fc mov -0x4(%ebp),%ebx 10a301: c9 leave 10a302: c3 ret 0010af48 : * its execution, _POSIX_Timer_TSR will have to set this counter to 0. */ int timer_getoverrun( timer_t timerid ) { 10af48: 55 push %ebp 10af49: 89 e5 mov %esp,%ebp 10af4b: 53 push %ebx 10af4c: 83 ec 18 sub $0x18,%esp RTEMS_INLINE_ROUTINE POSIX_Timer_Control *_POSIX_Timer_Get ( timer_t id, Objects_Locations *location ) { return (POSIX_Timer_Control *) 10af4f: 8d 45 f4 lea -0xc(%ebp),%eax 10af52: 50 push %eax 10af53: ff 75 08 pushl 0x8(%ebp) 10af56: 68 94 75 12 00 push $0x127594 10af5b: e8 74 1d 00 00 call 10ccd4 <_Objects_Get> int overrun; POSIX_Timer_Control *ptimer; Objects_Locations location; ptimer = _POSIX_Timer_Get( timerid, &location ); switch ( location ) { 10af60: 83 c4 10 add $0x10,%esp 10af63: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 10af67: 75 11 jne 10af7a case OBJECTS_LOCAL: overrun = ptimer->overrun; 10af69: 8b 58 68 mov 0x68(%eax),%ebx ptimer->overrun = 0; 10af6c: c7 40 68 00 00 00 00 movl $0x0,0x68(%eax) _Thread_Enable_dispatch(); 10af73: e8 4d 25 00 00 call 10d4c5 <_Thread_Enable_dispatch> return overrun; 10af78: eb 0e jmp 10af88 <== ALWAYS TAKEN #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 10af7a: e8 69 7e 00 00 call 112de8 <__errno> 10af7f: c7 00 16 00 00 00 movl $0x16,(%eax) 10af85: 83 cb ff or $0xffffffff,%ebx } 10af88: 89 d8 mov %ebx,%eax 10af8a: 8b 5d fc mov -0x4(%ebp),%ebx 10af8d: c9 leave 10af8e: c3 ret 00109ec8 : timer_t timerid, int flags, const struct itimerspec *value, struct itimerspec *ovalue ) { 109ec8: 55 push %ebp 109ec9: 89 e5 mov %esp,%ebp 109ecb: 57 push %edi 109ecc: 56 push %esi 109ecd: 53 push %ebx 109ece: 83 ec 2c sub $0x2c,%esp 109ed1: 8b 45 0c mov 0xc(%ebp),%eax Objects_Locations location; bool activated; uint32_t initial_period; struct itimerspec normalize; if ( !value ) 109ed4: 83 7d 10 00 cmpl $0x0,0x10(%ebp) 109ed8: 0f 84 47 01 00 00 je 10a025 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); /* First, it verifies if the structure "value" is correct */ if ( ( value->it_value.tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) || 109ede: 8b 55 10 mov 0x10(%ebp),%edx 109ee1: 81 7a 0c ff c9 9a 3b cmpl $0x3b9ac9ff,0xc(%edx) 109ee8: 0f 87 37 01 00 00 ja 10a025 ( value->it_value.tv_nsec < 0 ) || ( value->it_interval.tv_nsec >= TOD_NANOSECONDS_PER_SECOND) || 109eee: 81 7a 04 ff c9 9a 3b cmpl $0x3b9ac9ff,0x4(%edx) 109ef5: 0f 87 2a 01 00 00 ja 10a025 <== ALWAYS TAKEN ( value->it_interval.tv_nsec < 0 )) { /* The number of nanoseconds is not correct */ rtems_set_errno_and_return_minus_one( EINVAL ); } if ( flags != TIMER_ABSTIME && flags != POSIX_TIMER_RELATIVE ) { 109efb: 85 c0 test %eax,%eax 109efd: 74 09 je 109f08 109eff: 83 f8 04 cmp $0x4,%eax 109f02: 0f 85 1d 01 00 00 jne 10a025 rtems_set_errno_and_return_minus_one( EINVAL ); } normalize = *value; 109f08: 8d 7d cc lea -0x34(%ebp),%edi 109f0b: b9 04 00 00 00 mov $0x4,%ecx 109f10: 8b 75 10 mov 0x10(%ebp),%esi 109f13: f3 a5 rep movsl %ds:(%esi),%es:(%edi) /* Convert absolute to relative time */ if (flags == TIMER_ABSTIME) { 109f15: 83 f8 04 cmp $0x4,%eax 109f18: 75 2f jne 109f49 struct timespec now; _TOD_Get( &now ); 109f1a: 83 ec 0c sub $0xc,%esp 109f1d: 8d 5d dc lea -0x24(%ebp),%ebx 109f20: 53 push %ebx 109f21: e8 8e 15 00 00 call 10b4b4 <_TOD_Get> /* Check for seconds in the past */ if ( _Timespec_Greater_than( &now, &normalize.it_value ) ) 109f26: 59 pop %ecx 109f27: 5e pop %esi 109f28: 8d 75 d4 lea -0x2c(%ebp),%esi 109f2b: 56 push %esi 109f2c: 53 push %ebx 109f2d: e8 6a 31 00 00 call 10d09c <_Timespec_Greater_than> 109f32: 83 c4 10 add $0x10,%esp 109f35: 84 c0 test %al,%al 109f37: 0f 85 e8 00 00 00 jne 10a025 rtems_set_errno_and_return_minus_one( EINVAL ); _Timespec_Subtract( &now, &normalize.it_value, &normalize.it_value ); 109f3d: 52 push %edx 109f3e: 56 push %esi 109f3f: 56 push %esi 109f40: 53 push %ebx 109f41: e8 7a 31 00 00 call 10d0c0 <_Timespec_Subtract> 109f46: 83 c4 10 add $0x10,%esp RTEMS_INLINE_ROUTINE POSIX_Timer_Control *_POSIX_Timer_Get ( timer_t id, Objects_Locations *location ) { return (POSIX_Timer_Control *) 109f49: 50 push %eax 109f4a: 8d 45 e4 lea -0x1c(%ebp),%eax 109f4d: 50 push %eax 109f4e: ff 75 08 pushl 0x8(%ebp) 109f51: 68 68 65 12 00 push $0x126568 109f56: e8 f5 1d 00 00 call 10bd50 <_Objects_Get> 109f5b: 89 c3 mov %eax,%ebx * something with the structure of times of the timer: to stop, start * or start it again */ ptimer = _POSIX_Timer_Get( timerid, &location ); switch ( location ) { 109f5d: 83 c4 10 add $0x10,%esp 109f60: 83 7d e4 00 cmpl $0x0,-0x1c(%ebp) 109f64: 0f 85 bb 00 00 00 jne 10a025 case OBJECTS_LOCAL: /* First, it verifies if the timer must be stopped */ if ( normalize.it_value.tv_sec == 0 && normalize.it_value.tv_nsec == 0 ) { 109f6a: 83 7d d4 00 cmpl $0x0,-0x2c(%ebp) 109f6e: 75 3b jne 109fab 109f70: 83 7d d8 00 cmpl $0x0,-0x28(%ebp) 109f74: 75 35 jne 109fab /* Stop the timer */ (void) _Watchdog_Remove( &ptimer->Timer ); 109f76: 83 ec 0c sub $0xc,%esp 109f79: 8d 40 10 lea 0x10(%eax),%eax 109f7c: 50 push %eax 109f7d: e8 fa 34 00 00 call 10d47c <_Watchdog_Remove> /* The old data of the timer are returned */ if ( ovalue ) 109f82: 83 c4 10 add $0x10,%esp 109f85: 83 7d 14 00 cmpl $0x0,0x14(%ebp) 109f89: 74 0d je 109f98 *ovalue = ptimer->timer_data; 109f8b: 8d 73 54 lea 0x54(%ebx),%esi 109f8e: b9 04 00 00 00 mov $0x4,%ecx 109f93: 8b 7d 14 mov 0x14(%ebp),%edi 109f96: f3 a5 rep movsl %ds:(%esi),%es:(%edi) /* The new data are set */ ptimer->timer_data = normalize; 109f98: 8d 7b 54 lea 0x54(%ebx),%edi 109f9b: 8d 75 cc lea -0x34(%ebp),%esi 109f9e: b9 04 00 00 00 mov $0x4,%ecx 109fa3: f3 a5 rep movsl %ds:(%esi),%es:(%edi) /* Indicates that the timer is created and stopped */ ptimer->state = POSIX_TIMER_STATE_CREATE_STOP; 109fa5: c6 43 3c 04 movb $0x4,0x3c(%ebx) 109fa9: eb 35 jmp 109fe0 <== ALWAYS TAKEN _Thread_Enable_dispatch(); return 0; } /* Convert from seconds and nanoseconds to ticks */ ptimer->ticks = _Timespec_To_ticks( &value->it_interval ); 109fab: 83 ec 0c sub $0xc,%esp 109fae: ff 75 10 pushl 0x10(%ebp) 109fb1: e8 3e 31 00 00 call 10d0f4 <_Timespec_To_ticks> 109fb6: 89 43 64 mov %eax,0x64(%ebx) initial_period = _Timespec_To_ticks( &normalize.it_value ); 109fb9: 8d 45 d4 lea -0x2c(%ebp),%eax 109fbc: 89 04 24 mov %eax,(%esp) 109fbf: e8 30 31 00 00 call 10d0f4 <_Timespec_To_ticks> activated = _POSIX_Timer_Insert_helper( 109fc4: 89 1c 24 mov %ebx,(%esp) 109fc7: 68 3c a0 10 00 push $0x10a03c 109fcc: ff 73 08 pushl 0x8(%ebx) 109fcf: 50 push %eax 109fd0: 8d 43 10 lea 0x10(%ebx),%eax 109fd3: 50 push %eax 109fd4: e8 3f 51 00 00 call 10f118 <_POSIX_Timer_Insert_helper> initial_period, ptimer->Object.id, _POSIX_Timer_TSR, ptimer ); if ( !activated ) { 109fd9: 83 c4 20 add $0x20,%esp 109fdc: 84 c0 test %al,%al 109fde: 75 09 jne 109fe9 _Thread_Enable_dispatch(); 109fe0: e8 5c 25 00 00 call 10c541 <_Thread_Enable_dispatch> 109fe5: 31 c0 xor %eax,%eax return 0; 109fe7: eb 4a jmp 10a033 <== ALWAYS TAKEN /* * The timer has been started and is running. So we return the * old ones in "ovalue" */ if ( ovalue ) 109fe9: 83 7d 14 00 cmpl $0x0,0x14(%ebp) 109fed: 74 0d je 109ffc *ovalue = ptimer->timer_data; 109fef: 8d 73 54 lea 0x54(%ebx),%esi 109ff2: b9 04 00 00 00 mov $0x4,%ecx 109ff7: 8b 7d 14 mov 0x14(%ebp),%edi 109ffa: f3 a5 rep movsl %ds:(%esi),%es:(%edi) ptimer->timer_data = normalize; 109ffc: 8d 7b 54 lea 0x54(%ebx),%edi 109fff: 8d 75 cc lea -0x34(%ebp),%esi 10a002: b9 04 00 00 00 mov $0x4,%ecx 10a007: f3 a5 rep movsl %ds:(%esi),%es:(%edi) /* Indicate that the time is running */ ptimer->state = POSIX_TIMER_STATE_CREATE_RUN; 10a009: c6 43 3c 03 movb $0x3,0x3c(%ebx) _TOD_Get( &ptimer->time ); 10a00d: 83 ec 0c sub $0xc,%esp 10a010: 83 c3 6c add $0x6c,%ebx 10a013: 53 push %ebx 10a014: e8 9b 14 00 00 call 10b4b4 <_TOD_Get> _Thread_Enable_dispatch(); 10a019: e8 23 25 00 00 call 10c541 <_Thread_Enable_dispatch> 10a01e: 31 c0 xor %eax,%eax return 0; 10a020: 83 c4 10 add $0x10,%esp 10a023: eb 0e jmp 10a033 <== ALWAYS TAKEN #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 10a025: e8 66 7e 00 00 call 111e90 <__errno> 10a02a: c7 00 16 00 00 00 movl $0x16,(%eax) 10a030: 83 c8 ff or $0xffffffff,%eax } 10a033: 8d 65 f4 lea -0xc(%ebp),%esp 10a036: 5b pop %ebx 10a037: 5e pop %esi 10a038: 5f pop %edi 10a039: c9 leave 10a03a: c3 ret 0010e644 : useconds_t ualarm( useconds_t useconds, useconds_t interval ) { 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 1c sub $0x1c,%esp 10e64d: 8b 75 08 mov 0x8(%ebp),%esi /* * Initialize the timer used to implement alarm(). */ if ( !the_timer->routine ) { 10e650: 83 3d b8 4a 12 00 00 cmpl $0x0,0x124ab8 10e657: 75 2c jne 10e685 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 10e659: c7 05 a4 4a 12 00 00 movl $0x0,0x124aa4 10e660: 00 00 00 the_watchdog->routine = routine; 10e663: c7 05 b8 4a 12 00 26 movl $0x10e726,0x124ab8 10e66a: e7 10 00 the_watchdog->id = id; 10e66d: c7 05 bc 4a 12 00 00 movl $0x0,0x124abc 10e674: 00 00 00 the_watchdog->user_data = user_data; 10e677: c7 05 c0 4a 12 00 00 movl $0x0,0x124ac0 10e67e: 00 00 00 10e681: 31 db xor %ebx,%ebx 10e683: eb 4f jmp 10e6d4 <== ALWAYS TAKEN _Watchdog_Initialize( the_timer, _POSIX_signals_Ualarm_TSR, 0, NULL ); } else { Watchdog_States state; state = _Watchdog_Remove( the_timer ); 10e685: 83 ec 0c sub $0xc,%esp 10e688: 68 9c 4a 12 00 push $0x124a9c 10e68d: e8 36 e4 ff ff call 10cac8 <_Watchdog_Remove> if ( (state == WATCHDOG_ACTIVE) || (state == WATCHDOG_REMOVE_IT) ) { 10e692: 83 e8 02 sub $0x2,%eax 10e695: 83 c4 10 add $0x10,%esp 10e698: 31 db xor %ebx,%ebx 10e69a: 83 f8 01 cmp $0x1,%eax 10e69d: 77 35 ja 10e6d4 <== ALWAYS TAKEN * boot. Since alarm() is dealing in seconds, we must account for * this. */ ticks = the_timer->initial; ticks -= (the_timer->stop_time - the_timer->start_time); 10e69f: a1 b0 4a 12 00 mov 0x124ab0,%eax 10e6a4: 03 05 a8 4a 12 00 add 0x124aa8,%eax /* remaining is now in ticks */ _Timespec_From_ticks( ticks, &tp ); 10e6aa: 51 push %ecx 10e6ab: 51 push %ecx 10e6ac: 8d 55 e0 lea -0x20(%ebp),%edx 10e6af: 52 push %edx 10e6b0: 2b 05 b4 4a 12 00 sub 0x124ab4,%eax 10e6b6: 50 push %eax 10e6b7: e8 84 0e 00 00 call 10f540 <_Timespec_From_ticks> remaining = tp.tv_sec * TOD_MICROSECONDS_PER_SECOND; 10e6bc: 69 4d e0 40 42 0f 00 imul $0xf4240,-0x20(%ebp),%ecx remaining += tp.tv_nsec / 1000; 10e6c3: 8b 45 e4 mov -0x1c(%ebp),%eax 10e6c6: bf e8 03 00 00 mov $0x3e8,%edi 10e6cb: 99 cltd 10e6cc: f7 ff idiv %edi 10e6ce: 8d 1c 08 lea (%eax,%ecx,1),%ebx 10e6d1: 83 c4 10 add $0x10,%esp /* * If useconds is non-zero, then the caller wants to schedule * the alarm repeatedly at that interval. If the interval is * less than a single clock tick, then fudge it to a clock tick. */ if ( useconds ) { 10e6d4: 85 f6 test %esi,%esi 10e6d6: 74 44 je 10e71c Watchdog_Interval ticks; tp.tv_sec = useconds / TOD_MICROSECONDS_PER_SECOND; 10e6d8: b9 40 42 0f 00 mov $0xf4240,%ecx 10e6dd: 89 f0 mov %esi,%eax 10e6df: 31 d2 xor %edx,%edx 10e6e1: f7 f1 div %ecx 10e6e3: 89 45 e0 mov %eax,-0x20(%ebp) tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000; 10e6e6: 69 d2 e8 03 00 00 imul $0x3e8,%edx,%edx 10e6ec: 89 55 e4 mov %edx,-0x1c(%ebp) ticks = _Timespec_To_ticks( &tp ); 10e6ef: 83 ec 0c sub $0xc,%esp 10e6f2: 8d 75 e0 lea -0x20(%ebp),%esi 10e6f5: 56 push %esi 10e6f6: e8 6d 0e 00 00 call 10f568 <_Timespec_To_ticks> if ( ticks == 0 ) ticks = 1; _Watchdog_Insert_ticks( the_timer, _Timespec_To_ticks( &tp ) ); 10e6fb: 89 34 24 mov %esi,(%esp) 10e6fe: e8 65 0e 00 00 call 10f568 <_Timespec_To_ticks> Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 10e703: a3 a8 4a 12 00 mov %eax,0x124aa8 _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 10e708: 58 pop %eax 10e709: 5a pop %edx 10e70a: 68 9c 4a 12 00 push $0x124a9c 10e70f: 68 c8 42 12 00 push $0x1242c8 10e714: e8 97 e2 ff ff call 10c9b0 <_Watchdog_Insert> 10e719: 83 c4 10 add $0x10,%esp } return remaining; } 10e71c: 89 d8 mov %ebx,%eax 10e71e: 8d 65 f4 lea -0xc(%ebp),%esp 10e721: 5b pop %ebx 10e722: 5e pop %esi 10e723: 5f pop %edi 10e724: c9 leave 10e725: c3 ret 00109ccc : */ int uname( struct utsname *name ) { 109ccc: 55 push %ebp 109ccd: 89 e5 mov %esp,%ebp 109ccf: 53 push %ebx 109cd0: 83 ec 04 sub $0x4,%esp 109cd3: 8b 5d 08 mov 0x8(%ebp),%ebx release = 5.3 version = Generic_101318-12 machine = sun4m */ if ( !name ) 109cd6: 85 db test %ebx,%ebx 109cd8: 75 10 jne 109cea rtems_set_errno_and_return_minus_one( EFAULT ); 109cda: e8 4d 83 00 00 call 11202c <__errno> 109cdf: c7 00 0e 00 00 00 movl $0xe,(%eax) 109ce5: 83 c8 ff or $0xffffffff,%eax 109ce8: eb 5d jmp 109d47 <== ALWAYS TAKEN strcpy( name->sysname, "RTEMS" ); 109cea: 52 push %edx 109ceb: 52 push %edx 109cec: 68 eb f6 11 00 push $0x11f6eb 109cf1: 53 push %ebx 109cf2: e8 e1 8d 00 00 call 112ad8 sprintf( name->nodename, "Node %" PRId16, _Objects_Local_node ); 109cf7: 83 c4 0c add $0xc,%esp 109cfa: 6a 01 push $0x1 109cfc: 68 f1 f6 11 00 push $0x11f6f1 109d01: 8d 43 20 lea 0x20(%ebx),%eax 109d04: 50 push %eax 109d05: e8 f6 8b 00 00 call 112900 strcpy( name->release, RTEMS_VERSION ); 109d0a: 59 pop %ecx 109d0b: 58 pop %eax 109d0c: 68 f9 f6 11 00 push $0x11f6f9 109d11: 8d 43 40 lea 0x40(%ebx),%eax 109d14: 50 push %eax 109d15: e8 be 8d 00 00 call 112ad8 strcpy( name->version, "" ); 109d1a: 58 pop %eax 109d1b: 5a pop %edx 109d1c: 68 ea f6 11 00 push $0x11f6ea 109d21: 8d 43 60 lea 0x60(%ebx),%eax 109d24: 50 push %eax 109d25: e8 ae 8d 00 00 call 112ad8 sprintf( name->machine, "%s/%s", CPU_NAME, CPU_MODEL_NAME ); 109d2a: 68 02 f7 11 00 push $0x11f702 109d2f: 68 11 f7 11 00 push $0x11f711 109d34: 68 1c f7 11 00 push $0x11f71c 109d39: 83 eb 80 sub $0xffffff80,%ebx 109d3c: 53 push %ebx 109d3d: e8 be 8b 00 00 call 112900 109d42: 31 c0 xor %eax,%eax return 0; 109d44: 83 c4 20 add $0x20,%esp } 109d47: 8b 5d fc mov -0x4(%ebp),%ebx 109d4a: c9 leave 109d4b: c3 ret 00110e0c : #include int unlink( const char *path ) { 110e0c: 55 push %ebp 110e0d: 89 e5 mov %esp,%ebp 110e0f: 57 push %edi 110e10: 56 push %esi 110e11: 53 push %ebx 110e12: 83 ec 58 sub $0x58,%esp /* * Get the node to be unlinked. Find the parent path first. */ parentpathlen = rtems_filesystem_dirname ( path ); 110e15: ff 75 08 pushl 0x8(%ebp) 110e18: e8 7e 61 ff ff call 106f9b 110e1d: 89 c2 mov %eax,%edx if ( parentpathlen == 0 ) 110e1f: 83 c4 10 add $0x10,%esp 110e22: 85 c0 test %eax,%eax 110e24: 75 36 jne 110e5c rtems_filesystem_get_start_loc( path, &i, &parentloc ); 110e26: 8b 4d 08 mov 0x8(%ebp),%ecx 110e29: 8a 01 mov (%ecx),%al 110e2b: 3c 5c cmp $0x5c,%al 110e2d: 74 08 je 110e37 <== ALWAYS TAKEN 110e2f: 3c 2f cmp $0x2f,%al 110e31: 74 04 je 110e37 <== NEVER TAKEN 110e33: 84 c0 test %al,%al <== NOT EXECUTED 110e35: 75 0e jne 110e45 <== NOT EXECUTED 110e37: 8d 7d d4 lea -0x2c(%ebp),%edi 110e3a: 8b 35 40 1f 12 00 mov 0x121f40,%esi 110e40: 83 c6 18 add $0x18,%esi 110e43: eb 0c jmp 110e51 <== ALWAYS TAKEN 110e45: 8d 7d d4 lea -0x2c(%ebp),%edi <== NOT EXECUTED 110e48: 8b 35 40 1f 12 00 mov 0x121f40,%esi <== NOT EXECUTED 110e4e: 83 c6 04 add $0x4,%esi <== NOT EXECUTED 110e51: b9 05 00 00 00 mov $0x5,%ecx 110e56: f3 a5 rep movsl %ds:(%esi),%es:(%edi) 110e58: 31 db xor %ebx,%ebx 110e5a: eb 27 jmp 110e83 <== ALWAYS TAKEN else { result = rtems_filesystem_evaluate_path( path, parentpathlen, 110e5c: 83 ec 0c sub $0xc,%esp 110e5f: 6a 00 push $0x0 110e61: 8d 45 d4 lea -0x2c(%ebp),%eax 110e64: 50 push %eax 110e65: 6a 02 push $0x2 110e67: 52 push %edx 110e68: ff 75 08 pushl 0x8(%ebp) 110e6b: 89 55 b4 mov %edx,-0x4c(%ebp) 110e6e: e8 15 62 ff ff call 107088 RTEMS_LIBIO_PERMS_WRITE, &parentloc, false ); if ( result != 0 ) 110e73: 83 c4 20 add $0x20,%esp 110e76: 85 c0 test %eax,%eax 110e78: 8b 55 b4 mov -0x4c(%ebp),%edx 110e7b: 0f 85 68 01 00 00 jne 110fe9 <== ALWAYS TAKEN 110e81: b3 01 mov $0x1,%bl /* * Start from the parent to find the node that should be under it. */ loc = parentloc; 110e83: 8d 7d c0 lea -0x40(%ebp),%edi 110e86: 8d 75 d4 lea -0x2c(%ebp),%esi 110e89: b9 05 00 00 00 mov $0x5,%ecx 110e8e: f3 a5 rep movsl %ds:(%esi),%es:(%edi) name = path + parentpathlen; 110e90: 8b 75 08 mov 0x8(%ebp),%esi 110e93: 01 d6 add %edx,%esi name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 110e95: 83 c9 ff or $0xffffffff,%ecx 110e98: 89 f7 mov %esi,%edi 110e9a: 31 c0 xor %eax,%eax 110e9c: f2 ae repnz scas %es:(%edi),%al 110e9e: f7 d1 not %ecx 110ea0: 49 dec %ecx 110ea1: 52 push %edx 110ea2: 52 push %edx 110ea3: 51 push %ecx 110ea4: 56 push %esi 110ea5: e8 ca 60 ff ff call 106f74 110eaa: 01 c6 add %eax,%esi result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 110eac: 83 c9 ff or $0xffffffff,%ecx 110eaf: 89 f7 mov %esi,%edi 110eb1: 31 c0 xor %eax,%eax 110eb3: f2 ae repnz scas %es:(%edi),%al 110eb5: f7 d1 not %ecx 110eb7: 49 dec %ecx 110eb8: c7 04 24 00 00 00 00 movl $0x0,(%esp) 110ebf: 8d 7d c0 lea -0x40(%ebp),%edi 110ec2: 57 push %edi 110ec3: 6a 00 push $0x0 110ec5: 51 push %ecx 110ec6: 56 push %esi 110ec7: e8 02 61 ff ff call 106fce 0, &loc, false ); if ( result != 0 ) { 110ecc: 83 c4 20 add $0x20,%esp 110ecf: 85 c0 test %eax,%eax 110ed1: 74 2f je 110f02 if ( free_parentloc ) 110ed3: 84 db test %bl,%bl 110ed5: 0f 84 0e 01 00 00 je 110fe9 <== ALWAYS TAKEN rtems_filesystem_freenode( &parentloc ); 110edb: 8b 45 e0 mov -0x20(%ebp),%eax 110ede: 85 c0 test %eax,%eax 110ee0: 0f 84 03 01 00 00 je 110fe9 <== ALWAYS TAKEN 110ee6: 8b 40 1c mov 0x1c(%eax),%eax 110ee9: 85 c0 test %eax,%eax 110eeb: 0f 84 f8 00 00 00 je 110fe9 <== ALWAYS TAKEN 110ef1: 83 ec 0c sub $0xc,%esp 110ef4: 8d 55 d4 lea -0x2c(%ebp),%edx 110ef7: 52 push %edx 110ef8: ff d0 call *%eax 110efa: 83 ce ff or $0xffffffff,%esi 110efd: e9 e2 00 00 00 jmp 110fe4 <== ALWAYS TAKEN return -1; } if ( !loc.ops->node_type_h ) { 110f02: 8b 55 cc mov -0x34(%ebp),%edx 110f05: 8b 42 10 mov 0x10(%edx),%eax 110f08: 85 c0 test %eax,%eax 110f0a: 75 05 jne 110f11 <== NEVER TAKEN rtems_filesystem_freenode( &loc ); 110f0c: 8b 42 1c mov 0x1c(%edx),%eax <== NOT EXECUTED 110f0f: eb 5b jmp 110f6c <== 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 ) { 110f11: 83 ec 0c sub $0xc,%esp 110f14: 57 push %edi 110f15: ff d0 call *%eax 110f17: 83 c4 10 add $0x10,%esp 110f1a: 48 dec %eax 110f1b: 8b 45 cc mov -0x34(%ebp),%eax 110f1e: 75 42 jne 110f62 rtems_filesystem_freenode( &loc ); 110f20: 85 c0 test %eax,%eax 110f22: 74 10 je 110f34 <== ALWAYS TAKEN 110f24: 8b 40 1c mov 0x1c(%eax),%eax 110f27: 85 c0 test %eax,%eax 110f29: 74 09 je 110f34 <== ALWAYS TAKEN 110f2b: 83 ec 0c sub $0xc,%esp 110f2e: 57 push %edi 110f2f: ff d0 call *%eax 110f31: 83 c4 10 add $0x10,%esp if ( free_parentloc ) 110f34: 84 db test %bl,%bl 110f36: 74 1a je 110f52 <== NEVER TAKEN rtems_filesystem_freenode( &parentloc ); 110f38: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED 110f3b: 85 c0 test %eax,%eax <== NOT EXECUTED 110f3d: 74 13 je 110f52 <== NOT EXECUTED 110f3f: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 110f42: 85 c0 test %eax,%eax <== NOT EXECUTED 110f44: 74 0c je 110f52 <== NOT EXECUTED 110f46: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 110f49: 8d 55 d4 lea -0x2c(%ebp),%edx <== NOT EXECUTED 110f4c: 52 push %edx <== NOT EXECUTED 110f4d: ff d0 call *%eax <== NOT EXECUTED 110f4f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EISDIR ); 110f52: e8 6d 05 00 00 call 1114c4 <__errno> 110f57: c7 00 15 00 00 00 movl $0x15,(%eax) 110f5d: e9 87 00 00 00 jmp 110fe9 <== ALWAYS TAKEN } if ( !loc.ops->unlink_h ) { 110f62: 8b 50 0c mov 0xc(%eax),%edx 110f65: 85 d2 test %edx,%edx 110f67: 75 3b jne 110fa4 <== NEVER TAKEN rtems_filesystem_freenode( &loc ); 110f69: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 110f6c: 85 c0 test %eax,%eax <== NOT EXECUTED 110f6e: 74 09 je 110f79 <== NOT EXECUTED 110f70: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 110f73: 57 push %edi <== NOT EXECUTED 110f74: ff d0 call *%eax <== NOT EXECUTED 110f76: 83 c4 10 add $0x10,%esp <== NOT EXECUTED if ( free_parentloc ) 110f79: 84 db test %bl,%bl <== NOT EXECUTED 110f7b: 74 1a je 110f97 <== NOT EXECUTED rtems_filesystem_freenode( &parentloc ); 110f7d: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED 110f80: 85 c0 test %eax,%eax <== NOT EXECUTED 110f82: 74 13 je 110f97 <== NOT EXECUTED 110f84: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 110f87: 85 c0 test %eax,%eax <== NOT EXECUTED 110f89: 74 0c je 110f97 <== NOT EXECUTED 110f8b: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 110f8e: 8d 55 d4 lea -0x2c(%ebp),%edx <== NOT EXECUTED 110f91: 52 push %edx <== NOT EXECUTED 110f92: ff d0 call *%eax <== NOT EXECUTED 110f94: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 110f97: e8 28 05 00 00 call 1114c4 <__errno> <== NOT EXECUTED 110f9c: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 110fa2: eb 45 jmp 110fe9 <== NOT EXECUTED } result = (*loc.ops->unlink_h)( &parentloc, &loc ); 110fa4: 50 push %eax 110fa5: 50 push %eax 110fa6: 57 push %edi 110fa7: 8d 45 d4 lea -0x2c(%ebp),%eax 110faa: 50 push %eax 110fab: ff d2 call *%edx 110fad: 89 c6 mov %eax,%esi rtems_filesystem_freenode( &loc ); 110faf: 8b 45 cc mov -0x34(%ebp),%eax 110fb2: 83 c4 10 add $0x10,%esp 110fb5: 85 c0 test %eax,%eax 110fb7: 74 10 je 110fc9 <== ALWAYS TAKEN 110fb9: 8b 40 1c mov 0x1c(%eax),%eax 110fbc: 85 c0 test %eax,%eax 110fbe: 74 09 je 110fc9 <== ALWAYS TAKEN 110fc0: 83 ec 0c sub $0xc,%esp 110fc3: 57 push %edi 110fc4: ff d0 call *%eax 110fc6: 83 c4 10 add $0x10,%esp if ( free_parentloc ) 110fc9: 84 db test %bl,%bl 110fcb: 74 1f je 110fec <== ALWAYS TAKEN rtems_filesystem_freenode( &parentloc ); 110fcd: 8b 45 e0 mov -0x20(%ebp),%eax 110fd0: 85 c0 test %eax,%eax 110fd2: 74 18 je 110fec <== ALWAYS TAKEN 110fd4: 8b 40 1c mov 0x1c(%eax),%eax 110fd7: 85 c0 test %eax,%eax 110fd9: 74 11 je 110fec <== ALWAYS TAKEN 110fdb: 83 ec 0c sub $0xc,%esp 110fde: 8d 55 d4 lea -0x2c(%ebp),%edx 110fe1: 52 push %edx 110fe2: ff d0 call *%eax 110fe4: 83 c4 10 add $0x10,%esp 110fe7: eb 03 jmp 110fec <== ALWAYS TAKEN 110fe9: 83 ce ff or $0xffffffff,%esi return result; } 110fec: 89 f0 mov %esi,%eax 110fee: 8d 65 f4 lea -0xc(%ebp),%esp 110ff1: 5b pop %ebx 110ff2: 5e pop %esi 110ff3: 5f pop %edi 110ff4: c9 leave 110ff5: 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 ef ae 02 00 call 13963c <__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 b9 ae 02 00 call 13963c <__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 e1 15 00 mov 0x15e178,%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 b4 3a 16 00 mov 0x163ab4,%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 b8 3a 16 00 cmp $0x163ab8,%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 82 ae 02 00 call 13963c <__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 61 12 00 00 call 10fa60 <== 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 20 15 00 00 call 10fd28 <_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 00126b9c : int utime( const char *path, const struct utimbuf *times ) { 126b9c: 55 push %ebp 126b9d: 89 e5 mov %esp,%ebp 126b9f: 57 push %edi 126ba0: 56 push %esi 126ba1: 53 push %ebx 126ba2: 83 ec 38 sub $0x38,%esp 126ba5: 8b 55 08 mov 0x8(%ebp),%edx 126ba8: 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 ) ) 126bab: 31 c0 xor %eax,%eax 126bad: 83 c9 ff or $0xffffffff,%ecx 126bb0: 89 d7 mov %edx,%edi 126bb2: f2 ae repnz scas %es:(%edi),%al 126bb4: f7 d1 not %ecx 126bb6: 49 dec %ecx 126bb7: 6a 01 push $0x1 126bb9: 8d 75 d4 lea -0x2c(%ebp),%esi 126bbc: 56 push %esi 126bbd: 6a 00 push $0x0 126bbf: 51 push %ecx 126bc0: 52 push %edx 126bc1: e8 56 4b fe ff call 10b71c 126bc6: 83 c4 20 add $0x20,%esp 126bc9: 83 cf ff or $0xffffffff,%edi 126bcc: 85 c0 test %eax,%eax 126bce: 75 4f jne 126c1f return -1; if ( !temp_loc.ops->utime_h ){ 126bd0: 8b 55 e0 mov -0x20(%ebp),%edx 126bd3: 8b 42 30 mov 0x30(%edx),%eax 126bd6: 85 c0 test %eax,%eax 126bd8: 75 20 jne 126bfa <== NEVER TAKEN rtems_filesystem_freenode( &temp_loc ); 126bda: 8b 42 1c mov 0x1c(%edx),%eax <== NOT EXECUTED 126bdd: 85 c0 test %eax,%eax <== NOT EXECUTED 126bdf: 74 09 je 126bea <== NOT EXECUTED 126be1: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 126be4: 56 push %esi <== NOT EXECUTED 126be5: ff d0 call *%eax <== NOT EXECUTED 126be7: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 126bea: e8 4d 2a 01 00 call 13963c <__errno> <== NOT EXECUTED 126bef: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 126bf5: 83 cf ff or $0xffffffff,%edi <== NOT EXECUTED 126bf8: eb 25 jmp 126c1f <== NOT EXECUTED } result = (*temp_loc.ops->utime_h)( &temp_loc, times->actime, times->modtime ); 126bfa: 52 push %edx 126bfb: ff 73 04 pushl 0x4(%ebx) 126bfe: ff 33 pushl (%ebx) 126c00: 56 push %esi 126c01: ff d0 call *%eax 126c03: 89 c7 mov %eax,%edi rtems_filesystem_freenode( &temp_loc ); 126c05: 8b 45 e0 mov -0x20(%ebp),%eax 126c08: 83 c4 10 add $0x10,%esp 126c0b: 85 c0 test %eax,%eax 126c0d: 74 10 je 126c1f <== ALWAYS TAKEN 126c0f: 8b 40 1c mov 0x1c(%eax),%eax 126c12: 85 c0 test %eax,%eax 126c14: 74 09 je 126c1f <== ALWAYS TAKEN 126c16: 83 ec 0c sub $0xc,%esp 126c19: 56 push %esi 126c1a: ff d0 call *%eax 126c1c: 83 c4 10 add $0x10,%esp return result; } 126c1f: 89 f8 mov %edi,%eax 126c21: 8d 65 f4 lea -0xc(%ebp),%esp 126c24: 5b pop %ebx 126c25: 5e pop %esi 126c26: 5f pop %edi 126c27: c9 leave 126c28: 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 5c 02 12 00 call *0x12025c 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 1d e7 11 00 mov $0x11e71d,%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 5c 02 12 00 call *0x12025c 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 5c 02 12 00 call *0x12025c 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 5c 02 12 00 call *0x12025c 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 5c 02 12 00 call *0x12025c 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 1e e7 11 00 movsbl 0x11e71e(%edx),%edx 1098b7: 52 push %edx 1098b8: 89 45 b0 mov %eax,-0x50(%ebp) 1098bb: ff 15 5c 02 12 00 call *0x12025c 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 0011cb6c : ssize_t write( int fd, const void *buffer, size_t count ) { 11cb6c: 55 push %ebp 11cb6d: 89 e5 mov %esp,%ebp 11cb6f: 56 push %esi 11cb70: 53 push %ebx 11cb71: 8b 5d 08 mov 0x8(%ebp),%ebx 11cb74: 8b 55 0c mov 0xc(%ebp),%edx 11cb77: 8b 4d 10 mov 0x10(%ebp),%ecx ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 11cb7a: 3b 1d 44 01 12 00 cmp 0x120144,%ebx 11cb80: 73 14 jae 11cb96 <== ALWAYS TAKEN iop = rtems_libio_iop( fd ); 11cb82: c1 e3 06 shl $0x6,%ebx 11cb85: 03 1d 90 40 12 00 add 0x124090,%ebx rtems_libio_check_is_open( iop ); 11cb8b: 8b 73 14 mov 0x14(%ebx),%esi 11cb8e: f7 c6 00 01 00 00 test $0x100,%esi 11cb94: 75 0d jne 11cba3 <== NEVER TAKEN 11cb96: e8 29 49 ff ff call 1114c4 <__errno> <== NOT EXECUTED 11cb9b: c7 00 09 00 00 00 movl $0x9,(%eax) <== NOT EXECUTED 11cba1: eb 31 jmp 11cbd4 <== NOT EXECUTED rtems_libio_check_buffer( buffer ); 11cba3: 85 d2 test %edx,%edx 11cba5: 74 0b je 11cbb2 <== ALWAYS TAKEN rtems_libio_check_count( count ); 11cba7: 31 c0 xor %eax,%eax 11cba9: 85 c9 test %ecx,%ecx 11cbab: 74 44 je 11cbf1 rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 11cbad: 83 e6 04 and $0x4,%esi 11cbb0: 75 0d jne 11cbbf <== NEVER TAKEN 11cbb2: e8 0d 49 ff ff call 1114c4 <__errno> <== NOT EXECUTED 11cbb7: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 11cbbd: eb 15 jmp 11cbd4 <== NOT EXECUTED /* * Now process the write() request. */ if ( !iop->handlers->write_h ) 11cbbf: 8b 43 3c mov 0x3c(%ebx),%eax 11cbc2: 8b 40 0c mov 0xc(%eax),%eax 11cbc5: 85 c0 test %eax,%eax 11cbc7: 75 10 jne 11cbd9 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); 11cbc9: e8 f6 48 ff ff call 1114c4 <__errno> <== NOT EXECUTED 11cbce: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 11cbd4: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 11cbd7: eb 18 jmp 11cbf1 <== NOT EXECUTED rc = (*iop->handlers->write_h)( iop, buffer, count ); 11cbd9: 56 push %esi 11cbda: 51 push %ecx 11cbdb: 52 push %edx 11cbdc: 53 push %ebx 11cbdd: ff d0 call *%eax if ( rc > 0 ) 11cbdf: 83 c4 10 add $0x10,%esp 11cbe2: 85 c0 test %eax,%eax 11cbe4: 7e 0b jle 11cbf1 <== ALWAYS TAKEN iop->offset += rc; 11cbe6: 89 c1 mov %eax,%ecx 11cbe8: c1 f9 1f sar $0x1f,%ecx 11cbeb: 01 43 0c add %eax,0xc(%ebx) 11cbee: 11 4b 10 adc %ecx,0x10(%ebx) return rc; } 11cbf1: 8d 65 f8 lea -0x8(%ebp),%esp 11cbf4: 5b pop %ebx 11cbf5: 5e pop %esi 11cbf6: c9 leave 11cbf7: 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 e4 42 12 00 cmp 0x1242e4,%esi 10ab01: 73 11 jae 10ab14 <== ALWAYS TAKEN iop = rtems_libio_iop( fd ); 10ab03: c1 e6 06 shl $0x6,%esi 10ab06: 03 35 08 8a 12 00 add 0x128a08,%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 7f 87 00 00 call 113298 <__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 4f 87 00 00 call 113298 <__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 14 87 00 00 call 113298 <__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