0010eae0 : #define MAXSYMLINK 5 int IMFS_Set_handlers( rtems_filesystem_location_info_t *loc ) { 10eae0: 55 push %ebp 10eae1: 89 e5 mov %esp,%ebp 10eae3: 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; 10eae6: 8b 50 10 mov 0x10(%eax),%edx 10eae9: 8b 4a 34 mov 0x34(%edx),%ecx switch( node->type ) { 10eaec: 8b 10 mov (%eax),%edx 10eaee: 83 7a 4c 07 cmpl $0x7,0x4c(%edx) 10eaf2: 77 12 ja 10eb06 <== ALWAYS TAKEN 10eaf4: 8b 52 4c mov 0x4c(%edx),%edx 10eaf7: ff 24 95 68 10 12 00 jmp *0x121068(,%edx,4) 10eafe: 66 90 xchg %ax,%ax <== NOT EXECUTED case IMFS_DIRECTORY: loc->handlers = fs_info->directory_handlers; 10eb00: 8b 51 08 mov 0x8(%ecx),%edx 10eb03: 89 50 08 mov %edx,0x8(%eax) loc->handlers = &IMFS_fifo_handlers; break; } return 0; } 10eb06: 31 c0 xor %eax,%eax 10eb08: c9 leave 10eb09: c3 ret 10eb0a: 66 90 xchg %ax,%ax <== NOT EXECUTED break; case IMFS_LINEAR_FILE: loc->handlers = fs_info->memfile_handlers; break; case IMFS_MEMORY_FILE: loc->handlers = fs_info->memfile_handlers; 10eb0c: 8b 51 04 mov 0x4(%ecx),%edx 10eb0f: 89 50 08 mov %edx,0x8(%eax) loc->handlers = &IMFS_fifo_handlers; break; } return 0; } 10eb12: 31 c0 xor %eax,%eax 10eb14: c9 leave 10eb15: c3 ret 10eb16: 66 90 xchg %ax,%ax <== NOT EXECUTED case IMFS_DEVICE: loc->handlers = &IMFS_device_handlers; break; case IMFS_SYM_LINK: case IMFS_HARD_LINK: loc->handlers = &IMFS_link_handlers; 10eb18: c7 40 08 a0 11 12 00 movl $0x1211a0,0x8(%eax) loc->handlers = &IMFS_fifo_handlers; break; } return 0; } 10eb1f: 31 c0 xor %eax,%eax 10eb21: c9 leave 10eb22: c3 ret 10eb23: 90 nop <== NOT EXECUTED break; case IMFS_MEMORY_FILE: loc->handlers = fs_info->memfile_handlers; break; case IMFS_FIFO: loc->handlers = &IMFS_fifo_handlers; 10eb24: c7 40 08 a0 10 12 00 movl $0x1210a0,0x8(%eax) break; } return 0; } 10eb2b: 31 c0 xor %eax,%eax 10eb2d: c9 leave 10eb2e: c3 ret 10eb2f: 90 nop <== NOT EXECUTED switch( node->type ) { case IMFS_DIRECTORY: loc->handlers = fs_info->directory_handlers; break; case IMFS_DEVICE: loc->handlers = &IMFS_device_handlers; 10eb30: c7 40 08 60 11 12 00 movl $0x121160,0x8(%eax) loc->handlers = &IMFS_fifo_handlers; break; } return 0; } 10eb37: 31 c0 xor %eax,%eax 10eb39: c9 leave 10eb3a: c3 ret 0011203c : IMFS_jnode_t *IMFS_allocate_node( IMFS_jnode_types_t type, const char *name, mode_t mode ) { 11203c: 55 push %ebp 11203d: 89 e5 mov %esp,%ebp 11203f: 53 push %ebx 112040: 83 ec 1c sub $0x1c,%esp struct timeval tv; /* * Allocate an IMFS jnode */ node = calloc( 1, sizeof( IMFS_jnode_t ) ); 112043: 6a 64 push $0x64 112045: 6a 01 push $0x1 112047: e8 70 d8 ff ff call 10f8bc 11204c: 89 c3 mov %eax,%ebx if ( !node ) 11204e: 83 c4 10 add $0x10,%esp 112051: 85 c0 test %eax,%eax 112053: 74 4f je 1120a4 <== ALWAYS TAKEN return NULL; /* * Fill in the basic information */ node->st_nlink = 1; 112055: 66 c7 40 34 01 00 movw $0x1,0x34(%eax) node->type = type; 11205b: 8b 45 08 mov 0x8(%ebp),%eax 11205e: 89 43 4c mov %eax,0x4c(%ebx) strncpy( node->name, name, IMFS_NAME_MAX ); 112061: 51 push %ecx 112062: 6a 20 push $0x20 112064: ff 75 0c pushl 0xc(%ebp) 112067: 8d 43 0c lea 0xc(%ebx),%eax 11206a: 50 push %eax 11206b: e8 5c 23 00 00 call 1143cc /* * Fill in the mode and permission information for the jnode structure. */ node->st_mode = mode; 112070: 8b 45 10 mov 0x10(%ebp),%eax 112073: 89 43 30 mov %eax,0x30(%ebx) #if defined(RTEMS_POSIX_API) node->st_uid = geteuid(); 112076: e8 dd d9 ff ff call 10fa58 11207b: 66 89 43 3c mov %ax,0x3c(%ebx) node->st_gid = getegid(); 11207f: e8 c4 d9 ff ff call 10fa48 112084: 66 89 43 3e mov %ax,0x3e(%ebx) #endif /* * Now set all the times. */ gettimeofday( &tv, 0 ); 112088: 58 pop %eax 112089: 5a pop %edx 11208a: 6a 00 push $0x0 11208c: 8d 45 f0 lea -0x10(%ebp),%eax 11208f: 50 push %eax 112090: e8 d3 d9 ff ff call 10fa68 node->stat_atime = (time_t) tv.tv_sec; 112095: 8b 45 f0 mov -0x10(%ebp),%eax 112098: 89 43 40 mov %eax,0x40(%ebx) node->stat_mtime = (time_t) tv.tv_sec; 11209b: 89 43 44 mov %eax,0x44(%ebx) node->stat_ctime = (time_t) tv.tv_sec; 11209e: 89 43 48 mov %eax,0x48(%ebx) return node; 1120a1: 83 c4 10 add $0x10,%esp } 1120a4: 89 d8 mov %ebx,%eax 1120a6: 8b 5d fc mov -0x4(%ebp),%ebx 1120a9: c9 leave 1120aa: c3 ret 00113688 : int IMFS_chown( rtems_filesystem_location_info_t *pathloc, /* IN */ uid_t owner, /* IN */ gid_t group /* IN */ ) { 113688: 55 push %ebp 113689: 89 e5 mov %esp,%ebp 11368b: 57 push %edi 11368c: 56 push %esi 11368d: 53 push %ebx 11368e: 83 ec 1c sub $0x1c,%esp 113691: 8b 7d 0c mov 0xc(%ebp),%edi 113694: 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; 113697: 8b 45 08 mov 0x8(%ebp),%eax 11369a: 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(); 11369c: e8 3b 10 00 00 call 1146dc if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) ) 1136a1: 66 3b 43 3c cmp 0x3c(%ebx),%ax 1136a5: 74 05 je 1136ac <== NEVER TAKEN 1136a7: 66 85 c0 test %ax,%ax <== NOT EXECUTED 1136aa: 75 2c jne 1136d8 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EPERM ); #endif jnode->st_uid = owner; 1136ac: 66 89 7b 3c mov %di,0x3c(%ebx) jnode->st_gid = group; 1136b0: 66 89 73 3e mov %si,0x3e(%ebx) IMFS_update_ctime( jnode ); 1136b4: 83 ec 08 sub $0x8,%esp 1136b7: 6a 00 push $0x0 1136b9: 8d 45 e0 lea -0x20(%ebp),%eax 1136bc: 50 push %eax 1136bd: e8 26 5d ff ff call 1093e8 1136c2: 8b 45 e0 mov -0x20(%ebp),%eax 1136c5: 89 43 48 mov %eax,0x48(%ebx) 1136c8: 31 c0 xor %eax,%eax return 0; 1136ca: 83 c4 10 add $0x10,%esp } 1136cd: 8d 65 f4 lea -0xc(%ebp),%esp 1136d0: 5b pop %ebx 1136d1: 5e pop %esi 1136d2: 5f pop %edi 1136d3: c9 leave 1136d4: c3 ret 1136d5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED #if defined(RTEMS_POSIX_API) st_uid = geteuid(); if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) ) rtems_set_errno_and_return_minus_one( EPERM ); 1136d8: e8 db 52 00 00 call 1189b8 <__errno> <== NOT EXECUTED 1136dd: c7 00 01 00 00 00 movl $0x1,(%eax) <== NOT EXECUTED 1136e3: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 1136e8: eb e3 jmp 1136cd <== NOT EXECUTED 001120e0 : IMFS_jnode_types_t type, const char *name, mode_t mode, const IMFS_types_union *info ) { 1120e0: 55 push %ebp 1120e1: 89 e5 mov %esp,%ebp 1120e3: 57 push %edi 1120e4: 56 push %esi 1120e5: 53 push %ebx 1120e6: 83 ec 1c sub $0x1c,%esp 1120e9: 8b 5d 08 mov 0x8(%ebp),%ebx 1120ec: 8b 75 0c mov 0xc(%ebp),%esi 1120ef: 8b 7d 18 mov 0x18(%ebp),%edi IMFS_fs_info_t *fs_info; /* * MUST have a parent node to call this routine. */ if ( parent_loc == NULL ) 1120f2: 85 db test %ebx,%ebx 1120f4: 75 0a jne 112100 <== NEVER TAKEN 1120f6: 31 c0 xor %eax,%eax <== NOT EXECUTED node->st_ino = ++fs_info->ino_count; rtems_chain_append( &parent->info.directory.Entries, &node->Node ); return node; } 1120f8: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 1120fb: 5b pop %ebx <== NOT EXECUTED 1120fc: 5e pop %esi <== NOT EXECUTED 1120fd: 5f pop %edi <== NOT EXECUTED 1120fe: c9 leave <== NOT EXECUTED 1120ff: c3 ret <== NOT EXECUTED return NULL; /* * Allocate filesystem node and fill in basic information */ node = IMFS_allocate_node( type, name, mode & ~rtems_filesystem_umask ); 112100: 50 push %eax 112101: a1 f8 4f 12 00 mov 0x124ff8,%eax 112106: 8b 40 2c mov 0x2c(%eax),%eax 112109: f7 d0 not %eax 11210b: 23 45 14 and 0x14(%ebp),%eax 11210e: 50 push %eax 11210f: ff 75 10 pushl 0x10(%ebp) 112112: 56 push %esi 112113: e8 24 ff ff ff call 11203c <== ALWAYS TAKEN if ( !node ) 112118: 83 c4 10 add $0x10,%esp 11211b: 85 c0 test %eax,%eax 11211d: 74 d9 je 1120f8 <== ALWAYS TAKEN return NULL; /* * Set the type specific information */ switch (type) { 11211f: 83 fe 07 cmp $0x7,%esi 112122: 76 18 jbe 11213c <== NEVER TAKEN case IMFS_FIFO: node->info.fifo.pipe = NULL; break; default: assert(0); 112124: 68 b5 0a 12 00 push $0x120ab5 <== NOT EXECUTED 112129: 68 5c 15 12 00 push $0x12155c <== NOT EXECUTED 11212e: 6a 5c push $0x5c <== NOT EXECUTED 112130: 68 f0 14 12 00 push $0x1214f0 <== NOT EXECUTED 112135: e8 4e 5b ff ff call 107c88 <__assert_func> <== NOT EXECUTED 11213a: 66 90 xchg %ax,%ax <== NOT EXECUTED return NULL; /* * Set the type specific information */ switch (type) { 11213c: ff 24 b5 3c 15 12 00 jmp *0x12153c(,%esi,4) 112143: 90 nop <== NOT EXECUTED case IMFS_HARD_LINK: node->info.hard_link.link_node = info->hard_link.link_node; break; case IMFS_SYM_LINK: node->info.sym_link.name = info->sym_link.name; 112144: 8b 17 mov (%edi),%edx 112146: 89 50 50 mov %edx,0x50(%eax) } /* * This node MUST have a parent, so put it in that directory list. */ parent = parent_loc->node_access; 112149: 8b 13 mov (%ebx),%edx fs_info = parent_loc->mt_entry->fs_info; 11214b: 8b 4b 10 mov 0x10(%ebx),%ecx 11214e: 8b 59 34 mov 0x34(%ecx),%ebx node->Parent = parent; 112151: 89 50 08 mov %edx,0x8(%eax) node->st_ino = ++fs_info->ino_count; 112154: 8b 0b mov (%ebx),%ecx 112156: 41 inc %ecx 112157: 89 0b mov %ecx,(%ebx) 112159: 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 ); 11215c: 83 ec 08 sub $0x8,%esp 11215f: 50 push %eax 112160: 83 c2 50 add $0x50,%edx 112163: 52 push %edx 112164: 89 45 e4 mov %eax,-0x1c(%ebp) 112167: e8 0c 9d ff ff call 10be78 <_Chain_Append> rtems_chain_append( &parent->info.directory.Entries, &node->Node ); return node; 11216c: 83 c4 10 add $0x10,%esp 11216f: 8b 45 e4 mov -0x1c(%ebp),%eax } 112172: 8d 65 f4 lea -0xc(%ebp),%esp 112175: 5b pop %ebx 112176: 5e pop %esi 112177: 5f pop %edi 112178: c9 leave 112179: c3 ret 11217a: 66 90 xchg %ax,%ax <== NOT EXECUTED node->info.device.major = info->device.major; node->info.device.minor = info->device.minor; break; case IMFS_LINEAR_FILE: node->info.linearfile.size = 0; 11217c: c7 40 50 00 00 00 00 movl $0x0,0x50(%eax) <== NOT EXECUTED 112183: c7 40 54 00 00 00 00 movl $0x0,0x54(%eax) <== NOT EXECUTED node->info.linearfile.direct = 0; 11218a: c7 40 58 00 00 00 00 movl $0x0,0x58(%eax) <== NOT EXECUTED case IMFS_MEMORY_FILE: node->info.file.size = 0; 112191: c7 40 50 00 00 00 00 movl $0x0,0x50(%eax) 112198: c7 40 54 00 00 00 00 movl $0x0,0x54(%eax) node->info.file.indirect = 0; 11219f: c7 40 58 00 00 00 00 movl $0x0,0x58(%eax) node->info.file.doubly_indirect = 0; 1121a6: c7 40 5c 00 00 00 00 movl $0x0,0x5c(%eax) node->info.file.triply_indirect = 0; 1121ad: c7 40 60 00 00 00 00 movl $0x0,0x60(%eax) break; 1121b4: eb 93 jmp 112149 <== ALWAYS TAKEN 1121b6: 66 90 xchg %ax,%ax <== NOT EXECUTED case IMFS_FIFO: node->info.fifo.pipe = NULL; 1121b8: c7 40 50 00 00 00 00 movl $0x0,0x50(%eax) break; 1121bf: eb 88 jmp 112149 <== ALWAYS TAKEN 1121c1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED case IMFS_SYM_LINK: node->info.sym_link.name = info->sym_link.name; break; case IMFS_DEVICE: node->info.device.major = info->device.major; 1121c4: 8b 17 mov (%edi),%edx 1121c6: 89 50 50 mov %edx,0x50(%eax) node->info.device.minor = info->device.minor; 1121c9: 8b 57 04 mov 0x4(%edi),%edx 1121cc: 89 50 54 mov %edx,0x54(%eax) break; 1121cf: e9 75 ff ff ff jmp 112149 <== ALWAYS TAKEN */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 1121d4: 8d 50 54 lea 0x54(%eax),%edx 1121d7: 89 50 50 mov %edx,0x50(%eax) the_chain->permanent_null = NULL; 1121da: c7 40 54 00 00 00 00 movl $0x0,0x54(%eax) the_chain->last = _Chain_Head(the_chain); 1121e1: 8d 50 50 lea 0x50(%eax),%edx 1121e4: 89 50 58 mov %edx,0x58(%eax) 1121e7: e9 5d ff ff ff jmp 112149 <== ALWAYS TAKEN 001120ac : IMFS_jnode_t *IMFS_create_root_node(void) { 1120ac: 55 push %ebp 1120ad: 89 e5 mov %esp,%ebp 1120af: 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) ); 1120b2: 68 ed 41 00 00 push $0x41ed 1120b7: 68 cf 0c 12 00 push $0x120ccf 1120bc: 6a 01 push $0x1 1120be: e8 79 ff ff ff call 11203c <== ALWAYS TAKEN if ( !node ) 1120c3: 83 c4 10 add $0x10,%esp 1120c6: 85 c0 test %eax,%eax 1120c8: 74 13 je 1120dd <== ALWAYS TAKEN */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 1120ca: 8d 50 54 lea 0x54(%eax),%edx 1120cd: 89 50 50 mov %edx,0x50(%eax) the_chain->permanent_null = NULL; 1120d0: c7 40 54 00 00 00 00 movl $0x0,0x54(%eax) the_chain->last = _Chain_Head(the_chain); 1120d7: 8d 50 50 lea 0x50(%eax),%edx 1120da: 89 50 58 mov %edx,0x58(%eax) * NOTE: Root node is always a directory. */ rtems_chain_initialize_empty(&node->info.directory.Entries); return node; } 1120dd: c9 leave 1120de: c3 ret 001094bc : * NOTE: Assuming the "/" directory is bad. * Not checking that the starting directory is in an IMFS is bad. */ void IMFS_dump( void ) { 1094bc: 55 push %ebp 1094bd: 89 e5 mov %esp,%ebp 1094bf: 83 ec 08 sub $0x8,%esp fprintf(stdout, "*************** Dump of Entire IMFS ***************\n" ); 1094c2: a1 80 b6 12 00 mov 0x12b680,%eax 1094c7: ff 70 08 pushl 0x8(%eax) 1094ca: 6a 34 push $0x34 1094cc: 6a 01 push $0x1 1094ce: 68 60 63 12 00 push $0x126360 1094d3: e8 c0 f0 00 00 call 118598 fprintf(stdout, "/\n" ); 1094d8: a1 80 b6 12 00 mov 0x12b680,%eax 1094dd: ff 70 08 pushl 0x8(%eax) 1094e0: 6a 02 push $0x2 1094e2: 6a 01 push $0x1 1094e4: 68 ce 62 12 00 push $0x1262ce 1094e9: e8 aa f0 00 00 call 118598 IMFS_dump_directory( rtems_filesystem_root.node_access, 0 ); 1094ee: 83 c4 18 add $0x18,%esp 1094f1: 6a 00 push $0x0 1094f3: a1 74 b5 12 00 mov 0x12b574,%eax 1094f8: ff 70 18 pushl 0x18(%eax) 1094fb: e8 e4 fe ff ff call 1093e4 <== ALWAYS TAKEN fprintf(stdout, "*************** End of Dump ***************\n" ); 109500: a1 80 b6 12 00 mov 0x12b680,%eax 109505: ff 70 08 pushl 0x8(%eax) 109508: 6a 39 push $0x39 10950a: 6a 01 push $0x1 10950c: 68 98 63 12 00 push $0x126398 109511: e8 82 f0 00 00 call 118598 109516: 83 c4 20 add $0x20,%esp } 109519: c9 leave 10951a: c3 ret 001093e4 : void IMFS_dump_directory( IMFS_jnode_t *the_directory, int level ) { 1093e4: 55 push %ebp 1093e5: 89 e5 mov %esp,%ebp 1093e7: 57 push %edi 1093e8: 56 push %esi 1093e9: 53 push %ebx 1093ea: 83 ec 1c sub $0x1c,%esp 1093ed: 8b 45 08 mov 0x8(%ebp),%eax 1093f0: 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 ); 1093f3: 85 c0 test %eax,%eax 1093f5: 74 7a je 109471 <== ALWAYS TAKEN assert( level >= 0 ); 1093f7: 85 f6 test %esi,%esi 1093f9: 0f 88 a4 00 00 00 js 1094a3 <== ALWAYS TAKEN assert( the_directory->type == IMFS_DIRECTORY ); 1093ff: 83 78 4c 01 cmpl $0x1,0x4c(%eax) 109403: 0f 85 81 00 00 00 jne 10948a <== ALWAYS TAKEN the_chain = &the_directory->info.directory.Entries; for ( the_node = the_chain->first; 109409: 8b 78 50 mov 0x50(%eax),%edi */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10940c: 83 c0 54 add $0x54,%eax 10940f: 89 45 e4 mov %eax,-0x1c(%ebp) 109412: 39 c7 cmp %eax,%edi 109414: 74 41 je 109457 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 ); 109416: 8d 46 01 lea 0x1(%esi),%eax 109419: 89 45 e0 mov %eax,-0x20(%ebp) for ( the_node = the_chain->first; !rtems_chain_is_tail( the_chain, the_node ); the_node = the_node->next ) { the_jnode = (IMFS_jnode_t *) the_node; 10941c: 31 db xor %ebx,%ebx 10941e: 66 90 xchg %ax,%ax for ( i=0 ; i<=level ; i++ ) fprintf(stdout, "...." ); 109420: a1 80 b6 12 00 mov 0x12b680,%eax 109425: ff 70 08 pushl 0x8(%eax) 109428: 6a 04 push $0x4 10942a: 6a 01 push $0x1 10942c: 68 c9 62 12 00 push $0x1262c9 109431: e8 62 f1 00 00 call 118598 !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++ ) 109436: 43 inc %ebx 109437: 83 c4 10 add $0x10,%esp 10943a: 39 de cmp %ebx,%esi 10943c: 7d e2 jge 109420 fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); 10943e: 83 ec 0c sub $0xc,%esp 109441: 57 push %edi 109442: e8 f5 fd ff ff call 10923c <== ALWAYS TAKEN if ( the_jnode->type == IMFS_DIRECTORY ) 109447: 83 c4 10 add $0x10,%esp 10944a: 83 7f 4c 01 cmpl $0x1,0x4c(%edi) 10944e: 74 10 je 109460 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 ) { 109450: 8b 3f mov (%edi),%edi assert( the_directory->type == IMFS_DIRECTORY ); the_chain = &the_directory->info.directory.Entries; for ( the_node = the_chain->first; 109452: 3b 7d e4 cmp -0x1c(%ebp),%edi 109455: 75 c5 jne 10941c fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); if ( the_jnode->type == IMFS_DIRECTORY ) IMFS_dump_directory( the_jnode, level + 1 ); } } 109457: 8d 65 f4 lea -0xc(%ebp),%esp 10945a: 5b pop %ebx 10945b: 5e pop %esi 10945c: 5f pop %edi 10945d: c9 leave 10945e: c3 ret 10945f: 90 nop <== NOT EXECUTED for ( i=0 ; i<=level ; i++ ) fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); if ( the_jnode->type == IMFS_DIRECTORY ) IMFS_dump_directory( the_jnode, level + 1 ); 109460: 83 ec 08 sub $0x8,%esp 109463: ff 75 e0 pushl -0x20(%ebp) 109466: 57 push %edi 109467: e8 78 ff ff ff call 1093e4 <== ALWAYS TAKEN 10946c: 83 c4 10 add $0x10,%esp 10946f: eb df jmp 109450 <== ALWAYS TAKEN rtems_chain_node *the_node; rtems_chain_control *the_chain; IMFS_jnode_t *the_jnode; int i; assert( the_directory ); 109471: 68 b0 62 12 00 push $0x1262b0 <== NOT EXECUTED 109476: 68 f4 63 12 00 push $0x1263f4 <== NOT EXECUTED 10947b: 68 84 00 00 00 push $0x84 <== NOT EXECUTED 109480: 68 ec 62 12 00 push $0x1262ec <== NOT EXECUTED 109485: e8 ca 06 00 00 call 109b54 <__assert_func> <== NOT EXECUTED assert( level >= 0 ); assert( the_directory->type == IMFS_DIRECTORY ); 10948a: 68 38 63 12 00 push $0x126338 <== NOT EXECUTED 10948f: 68 f4 63 12 00 push $0x1263f4 <== NOT EXECUTED 109494: 68 88 00 00 00 push $0x88 <== NOT EXECUTED 109499: 68 ec 62 12 00 push $0x1262ec <== NOT EXECUTED 10949e: e8 b1 06 00 00 call 109b54 <__assert_func> <== NOT EXECUTED IMFS_jnode_t *the_jnode; int i; assert( the_directory ); assert( level >= 0 ); 1094a3: 68 be 62 12 00 push $0x1262be <== NOT EXECUTED 1094a8: 68 f4 63 12 00 push $0x1263f4 <== NOT EXECUTED 1094ad: 68 86 00 00 00 push $0x86 <== NOT EXECUTED 1094b2: 68 ec 62 12 00 push $0x1262ec <== NOT EXECUTED 1094b7: e8 98 06 00 00 call 109b54 <__assert_func> <== NOT EXECUTED 0010ecac : const char *pathname, /* IN */ int pathnamelen, /* IN */ int flags, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 10ecac: 55 push %ebp 10ecad: 89 e5 mov %esp,%ebp 10ecaf: 57 push %edi 10ecb0: 56 push %esi 10ecb1: 53 push %ebx 10ecb2: 83 ec 5c sub $0x5c,%esp /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; 10ecb5: 8b 45 14 mov 0x14(%ebp),%eax 10ecb8: 8b 38 mov (%eax),%edi 10ecba: c7 45 a4 00 00 00 00 movl $0x0,-0x5c(%ebp) 10ecc1: 8d 75 af lea -0x51(%ebp),%esi * Evaluate all tokens until we are done or an error occurs. */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { type = IMFS_get_token( &pathname[i], pathnamelen, token, &len ); 10ecc4: 8d 55 e4 lea -0x1c(%ebp),%edx 10ecc7: 52 push %edx 10ecc8: 56 push %esi 10ecc9: ff 75 0c pushl 0xc(%ebp) 10eccc: 8b 45 08 mov 0x8(%ebp),%eax 10eccf: 03 45 a4 add -0x5c(%ebp),%eax 10ecd2: 50 push %eax 10ecd3: e8 44 08 00 00 call 10f51c <== ALWAYS TAKEN 10ecd8: 89 c3 mov %eax,%ebx pathnamelen -= len; 10ecda: 8b 55 e4 mov -0x1c(%ebp),%edx i += len; if ( !pathloc->node_access ) 10ecdd: 8b 4d 14 mov 0x14(%ebp),%ecx 10ece0: 8b 01 mov (%ecx),%eax 10ece2: 83 c4 10 add $0x10,%esp 10ece5: 85 c0 test %eax,%eax 10ece7: 0f 84 e7 00 00 00 je 10edd4 <== ALWAYS TAKEN */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { type = IMFS_get_token( &pathname[i], pathnamelen, token, &len ); pathnamelen -= len; 10eced: 29 55 0c sub %edx,0xc(%ebp) i += len; 10ecf0: 01 55 a4 add %edx,-0x5c(%ebp) rtems_set_errno_and_return_minus_one( ENOENT ); /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) 10ecf3: 85 db test %ebx,%ebx 10ecf5: 75 45 jne 10ed3c * 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 ) { 10ecf7: 83 78 4c 01 cmpl $0x1,0x4c(%eax) 10ecfb: 0f 84 27 01 00 00 je 10ee28 flags, pathloc ); } else { result = IMFS_Set_handlers( pathloc ); } } else { result = IMFS_Set_handlers( pathloc ); 10ed01: 83 ec 0c sub $0xc,%esp 10ed04: ff 75 14 pushl 0x14(%ebp) 10ed07: e8 d4 fd ff ff call 10eae0 <== ALWAYS TAKEN 10ed0c: 89 c3 mov %eax,%ebx 10ed0e: 58 pop %eax 10ed0f: 5a pop %edx /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( pathloc, flags ) ) 10ed10: ff 75 10 pushl 0x10(%ebp) 10ed13: ff 75 14 pushl 0x14(%ebp) 10ed16: e8 21 fe ff ff call 10eb3c <== ALWAYS TAKEN 10ed1b: 83 c4 10 add $0x10,%esp 10ed1e: 85 c0 test %eax,%eax 10ed20: 0f 85 d2 00 00 00 jne 10edf8 rtems_set_errno_and_return_minus_one( EACCES ); 10ed26: e8 e5 4a 00 00 call 113810 <__errno> 10ed2b: c7 00 0d 00 00 00 movl $0xd,(%eax) 10ed31: bb ff ff ff ff mov $0xffffffff,%ebx 10ed36: e9 bd 00 00 00 jmp 10edf8 <== ALWAYS TAKEN 10ed3b: 90 nop <== NOT EXECUTED /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) if ( node->type == IMFS_DIRECTORY ) 10ed3c: 83 7f 4c 01 cmpl $0x1,0x4c(%edi) 10ed40: 0f 84 be 00 00 00 je 10ee04 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; 10ed46: 89 c7 mov %eax,%edi switch( type ) { 10ed48: 83 fb 03 cmp $0x3,%ebx 10ed4b: 74 1b je 10ed68 10ed4d: 83 fb 04 cmp $0x4,%ebx 10ed50: 0f 84 92 00 00 00 je 10ede8 10ed56: 83 fb 02 cmp $0x2,%ebx 10ed59: 74 51 je 10edac /* * Evaluate all tokens until we are done or an error occurs. */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { 10ed5b: 83 fb 04 cmp $0x4,%ebx 10ed5e: 0f 85 60 ff ff ff jne 10ecc4 <== NEVER TAKEN 10ed64: eb 91 jmp 10ecf7 <== NOT EXECUTED 10ed66: 66 90 xchg %ax,%ax <== NOT EXECUTED case IMFS_NAME: /* * If we are at a link follow it. */ if ( node->type == IMFS_HARD_LINK ) { 10ed68: 8b 40 4c mov 0x4c(%eax),%eax 10ed6b: 83 f8 03 cmp $0x3,%eax 10ed6e: 0f 84 00 01 00 00 je 10ee74 node = pathloc->node_access; if ( !node ) rtems_set_errno_and_return_minus_one( ENOTDIR ); } else if ( node->type == IMFS_SYM_LINK ) { 10ed74: 83 f8 04 cmp $0x4,%eax 10ed77: 0f 84 6e 01 00 00 je 10eeeb /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) 10ed7d: 48 dec %eax 10ed7e: 0f 85 11 01 00 00 jne 10ee95 /* * 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 ) { 10ed84: 8b 47 5c mov 0x5c(%edi),%eax 10ed87: 85 c0 test %eax,%eax 10ed89: 0f 85 1b 01 00 00 jne 10eeaa /* * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); 10ed8f: 83 ec 08 sub $0x8,%esp 10ed92: 56 push %esi 10ed93: 57 push %edi 10ed94: e8 f3 06 00 00 call 10f48c <== ALWAYS TAKEN 10ed99: 89 c7 mov %eax,%edi if ( !node ) 10ed9b: 83 c4 10 add $0x10,%esp 10ed9e: 85 c0 test %eax,%eax 10eda0: 74 32 je 10edd4 /* * Set the node access to the point we have found. */ pathloc->node_access = node; 10eda2: 8b 45 14 mov 0x14(%ebp),%eax 10eda5: 89 38 mov %edi,(%eax) break; 10eda7: e9 18 ff ff ff jmp 10ecc4 <== 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 ) 10edac: 8b 15 f8 4f 12 00 mov 0x124ff8,%edx 10edb2: 39 42 18 cmp %eax,0x18(%edx) 10edb5: 0f 84 09 ff ff ff je 10ecc4 /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == pathloc->mt_entry->mt_fs_root.node_access) { 10edbb: 8b 4d 14 mov 0x14(%ebp),%ecx 10edbe: 8b 51 10 mov 0x10(%ecx),%edx /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == 10edc1: 39 42 1c cmp %eax,0x1c(%edx) 10edc4: 0f 84 42 01 00 00 je 10ef0c pathnamelen+len, flags,pathloc); } } else { if ( !node->Parent ) 10edca: 8b 78 08 mov 0x8(%eax),%edi 10edcd: 85 ff test %edi,%edi 10edcf: 75 d1 jne 10eda2 10edd1: 8d 76 00 lea 0x0(%esi),%esi * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); if ( !node ) rtems_set_errno_and_return_minus_one( ENOENT ); 10edd4: e8 37 4a 00 00 call 113810 <__errno> 10edd9: c7 00 02 00 00 00 movl $0x2,(%eax) 10eddf: bb ff ff ff ff mov $0xffffffff,%ebx 10ede4: eb 12 jmp 10edf8 <== ALWAYS TAKEN 10ede6: 66 90 xchg %ax,%ax <== NOT EXECUTED case IMFS_NO_MORE_PATH: case IMFS_CURRENT_DIR: break; case IMFS_INVALID_TOKEN: rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); 10ede8: e8 23 4a 00 00 call 113810 <__errno> 10eded: c7 00 5b 00 00 00 movl $0x5b,(%eax) 10edf3: bb ff ff ff ff mov $0xffffffff,%ebx if ( !IMFS_evaluate_permission( pathloc, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 10edf8: 89 d8 mov %ebx,%eax 10edfa: 8d 65 f4 lea -0xc(%ebp),%esp 10edfd: 5b pop %ebx 10edfe: 5e pop %esi 10edff: 5f pop %edi 10ee00: c9 leave 10ee01: c3 ret 10ee02: 66 90 xchg %ax,%ax <== NOT EXECUTED /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) if ( node->type == IMFS_DIRECTORY ) if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) 10ee04: 83 ec 08 sub $0x8,%esp 10ee07: 6a 01 push $0x1 10ee09: ff 75 14 pushl 0x14(%ebp) 10ee0c: e8 2b fd ff ff call 10eb3c <== ALWAYS TAKEN 10ee11: 83 c4 10 add $0x10,%esp 10ee14: 85 c0 test %eax,%eax 10ee16: 0f 84 0a ff ff ff je 10ed26 10ee1c: 8b 55 14 mov 0x14(%ebp),%edx 10ee1f: 8b 02 mov (%edx),%eax 10ee21: e9 20 ff ff ff jmp 10ed46 <== ALWAYS TAKEN 10ee26: 66 90 xchg %ax,%ax <== NOT EXECUTED * * NOTE: The behavior of stat() on a mount point appears to be questionable. */ if ( node->type == IMFS_DIRECTORY ) { if ( node->info.directory.mt_fs != NULL ) { 10ee28: 8b 70 5c mov 0x5c(%eax),%esi 10ee2b: 85 f6 test %esi,%esi 10ee2d: 0f 84 ce fe ff ff je 10ed01 newloc = node->info.directory.mt_fs->mt_fs_root; 10ee33: 8d 7d d0 lea -0x30(%ebp),%edi 10ee36: 83 c6 1c add $0x1c,%esi 10ee39: b9 05 00 00 00 mov $0x5,%ecx 10ee3e: f3 a5 rep movsl %ds:(%esi),%es:(%edi) *pathloc = newloc; 10ee40: 8d 75 d0 lea -0x30(%ebp),%esi 10ee43: b1 05 mov $0x5,%cl 10ee45: 8b 7d 14 mov 0x14(%ebp),%edi 10ee48: f3 a5 rep movsl %ds:(%esi),%es:(%edi) return (*pathloc->ops->evalpath_h)( &pathname[i-len], 10ee4a: 8b 45 e4 mov -0x1c(%ebp),%eax 10ee4d: 8b 4d 14 mov 0x14(%ebp),%ecx 10ee50: 8b 51 0c mov 0xc(%ecx),%edx 10ee53: 51 push %ecx 10ee54: ff 75 10 pushl 0x10(%ebp) 10ee57: 8b 4d 0c mov 0xc(%ebp),%ecx 10ee5a: 01 c1 add %eax,%ecx 10ee5c: 51 push %ecx 10ee5d: 8b 4d a4 mov -0x5c(%ebp),%ecx 10ee60: 29 c1 sub %eax,%ecx 10ee62: 8b 45 08 mov 0x8(%ebp),%eax 10ee65: 01 c8 add %ecx,%eax 10ee67: 50 push %eax 10ee68: ff 12 call *(%edx) 10ee6a: 89 c3 mov %eax,%ebx 10ee6c: 83 c4 10 add $0x10,%esp 10ee6f: eb 87 jmp 10edf8 <== ALWAYS TAKEN 10ee71: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED * If we are at a link follow it. */ if ( node->type == IMFS_HARD_LINK ) { IMFS_evaluate_hard_link( pathloc, 0 ); 10ee74: 83 ec 08 sub $0x8,%esp 10ee77: 6a 00 push $0x0 10ee79: ff 75 14 pushl 0x14(%ebp) 10ee7c: e8 0b fd ff ff call 10eb8c <== ALWAYS TAKEN node = pathloc->node_access; 10ee81: 8b 55 14 mov 0x14(%ebp),%edx 10ee84: 8b 3a mov (%edx),%edi if ( !node ) 10ee86: 83 c4 10 add $0x10,%esp 10ee89: 85 ff test %edi,%edi 10ee8b: 74 08 je 10ee95 <== ALWAYS TAKEN } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_sym_link( pathloc, 0 ); node = pathloc->node_access; 10ee8d: 8b 47 4c mov 0x4c(%edi),%eax 10ee90: e9 e8 fe ff ff jmp 10ed7d <== ALWAYS TAKEN /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); 10ee95: e8 76 49 00 00 call 113810 <__errno> 10ee9a: c7 00 14 00 00 00 movl $0x14,(%eax) 10eea0: bb ff ff ff ff mov $0xffffffff,%ebx 10eea5: e9 4e ff ff ff jmp 10edf8 <== 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 ) { newloc = node->info.directory.mt_fs->mt_fs_root; 10eeaa: 8d 7d d0 lea -0x30(%ebp),%edi 10eead: 8d 70 1c lea 0x1c(%eax),%esi 10eeb0: b9 05 00 00 00 mov $0x5,%ecx 10eeb5: f3 a5 rep movsl %ds:(%esi),%es:(%edi) *pathloc = newloc; 10eeb7: 8d 75 d0 lea -0x30(%ebp),%esi 10eeba: b1 05 mov $0x5,%cl 10eebc: 8b 7d 14 mov 0x14(%ebp),%edi 10eebf: f3 a5 rep movsl %ds:(%esi),%es:(%edi) return (*pathloc->ops->evalpath_h)( &pathname[i-len], 10eec1: 8b 55 e4 mov -0x1c(%ebp),%edx 10eec4: 8b 4d 14 mov 0x14(%ebp),%ecx 10eec7: 8b 41 0c mov 0xc(%ecx),%eax 10eeca: 51 push %ecx 10eecb: ff 75 10 pushl 0x10(%ebp) 10eece: 8b 4d 0c mov 0xc(%ebp),%ecx 10eed1: 01 d1 add %edx,%ecx 10eed3: 51 push %ecx 10eed4: 8b 4d a4 mov -0x5c(%ebp),%ecx 10eed7: 29 d1 sub %edx,%ecx 10eed9: 8b 55 08 mov 0x8(%ebp),%edx 10eedc: 01 ca add %ecx,%edx 10eede: 52 push %edx 10eedf: ff 10 call *(%eax) 10eee1: 89 c3 mov %eax,%ebx 10eee3: 83 c4 10 add $0x10,%esp 10eee6: e9 0d ff ff ff jmp 10edf8 <== ALWAYS TAKEN if ( !node ) rtems_set_errno_and_return_minus_one( ENOTDIR ); } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_sym_link( pathloc, 0 ); 10eeeb: 83 ec 08 sub $0x8,%esp 10eeee: 6a 00 push $0x0 10eef0: ff 75 14 pushl 0x14(%ebp) 10eef3: e8 f0 fc ff ff call 10ebe8 <== ALWAYS TAKEN 10eef8: 89 c3 mov %eax,%ebx node = pathloc->node_access; 10eefa: 8b 4d 14 mov 0x14(%ebp),%ecx 10eefd: 8b 39 mov (%ecx),%edi if ( result == -1 ) 10eeff: 83 c4 10 add $0x10,%esp 10ef02: 83 f8 ff cmp $0xffffffff,%eax 10ef05: 75 86 jne 10ee8d <== NEVER TAKEN 10ef07: e9 ec fe ff ff jmp 10edf8 <== NOT EXECUTED */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; /* Throw out the .. in this case */ } else { newloc = pathloc->mt_entry->mt_point_node; 10ef0c: 8d 7d d0 lea -0x30(%ebp),%edi 10ef0f: 8d 72 08 lea 0x8(%edx),%esi 10ef12: eb 9c jmp 10eeb0 <== ALWAYS TAKEN 0010efc0 : int IMFS_evaluate_for_make( const char *path, /* IN */ rtems_filesystem_location_info_t *pathloc, /* IN/OUT */ const char **name /* OUT */ ) { 10efc0: 55 push %ebp 10efc1: 89 e5 mov %esp,%ebp 10efc3: 57 push %edi 10efc4: 56 push %esi 10efc5: 53 push %ebx 10efc6: 83 ec 5c sub $0x5c,%esp /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; 10efc9: 8b 45 0c mov 0xc(%ebp),%eax 10efcc: 8b 18 mov (%eax),%ebx /* * Get the path length. */ pathlen = strlen( path ); 10efce: 31 c0 xor %eax,%eax 10efd0: b9 ff ff ff ff mov $0xffffffff,%ecx 10efd5: 8b 7d 08 mov 0x8(%ebp),%edi 10efd8: f2 ae repnz scas %es:(%edi),%al 10efda: f7 d1 not %ecx 10efdc: 8d 71 ff lea -0x1(%ecx),%esi 10efdf: 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 ); 10efe6: 8d 55 e4 lea -0x1c(%ebp),%edx 10efe9: 52 push %edx 10efea: 8d 4d af lea -0x51(%ebp),%ecx 10efed: 51 push %ecx 10efee: 56 push %esi 10efef: 8b 45 08 mov 0x8(%ebp),%eax 10eff2: 03 45 a4 add -0x5c(%ebp),%eax 10eff5: 50 push %eax 10eff6: e8 21 05 00 00 call 10f51c <== ALWAYS TAKEN 10effb: 89 c7 mov %eax,%edi pathlen -= len; 10effd: 8b 55 e4 mov -0x1c(%ebp),%edx 10f000: 29 d6 sub %edx,%esi i += len; if ( !pathloc->node_access ) 10f002: 8b 4d 0c mov 0xc(%ebp),%ecx 10f005: 8b 01 mov (%ecx),%eax 10f007: 83 c4 10 add $0x10,%esp 10f00a: 85 c0 test %eax,%eax 10f00c: 0f 84 2a 01 00 00 je 10f13c <== ALWAYS TAKEN /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) 10f012: 85 ff test %edi,%edi 10f014: 75 1a jne 10f030 pathloc->node_access = node; break; case IMFS_NO_MORE_PATH: rtems_set_errno_and_return_minus_one( EEXIST ); 10f016: e8 f5 47 00 00 call 113810 <__errno> 10f01b: c7 00 11 00 00 00 movl $0x11,(%eax) 10f021: bb ff ff ff ff mov $0xffffffff,%ebx if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 10f026: 89 d8 mov %ebx,%eax 10f028: 8d 65 f4 lea -0xc(%ebp),%esp 10f02b: 5b pop %ebx 10f02c: 5e pop %esi 10f02d: 5f pop %edi 10f02e: c9 leave 10f02f: c3 ret /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) if ( node->type == IMFS_DIRECTORY ) 10f030: 83 7b 4c 01 cmpl $0x1,0x4c(%ebx) 10f034: 0f 84 ca 00 00 00 je 10f104 while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); pathlen -= len; i += len; 10f03a: 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; 10f03d: 89 c3 mov %eax,%ebx switch( type ) { 10f03f: 83 ff 02 cmp $0x2,%edi 10f042: 0f 84 8c 00 00 00 je 10f0d4 10f048: 76 26 jbe 10f070 10f04a: 83 ff 03 cmp $0x3,%edi 10f04d: 74 2d je 10f07c 10f04f: 83 ff 04 cmp $0x4,%edi 10f052: 75 92 jne 10efe6 <== ALWAYS TAKEN case IMFS_NO_MORE_PATH: rtems_set_errno_and_return_minus_one( EEXIST ); break; case IMFS_INVALID_TOKEN: rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); 10f054: e8 b7 47 00 00 call 113810 <__errno> 10f059: c7 00 5b 00 00 00 movl $0x5b,(%eax) 10f05f: bb ff ff ff ff mov $0xffffffff,%ebx if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 10f064: 89 d8 mov %ebx,%eax 10f066: 8d 65 f4 lea -0xc(%ebp),%esp 10f069: 5b pop %ebx 10f06a: 5e pop %esi 10f06b: 5f pop %edi 10f06c: c9 leave 10f06d: c3 ret 10f06e: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; switch( type ) { 10f070: 85 ff test %edi,%edi 10f072: 74 a2 je 10f016 <== ALWAYS TAKEN 10f074: e9 6d ff ff ff jmp 10efe6 <== ALWAYS TAKEN 10f079: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED pathloc->node_access = node; break; case IMFS_NAME: if ( node->type == IMFS_HARD_LINK ) { 10f07c: 8b 40 4c mov 0x4c(%eax),%eax 10f07f: 83 f8 03 cmp $0x3,%eax 10f082: 0f 84 86 01 00 00 je 10f20e result = IMFS_evaluate_link( pathloc, 0 ); if ( result == -1 ) return -1; } else if ( node->type == IMFS_SYM_LINK ) { 10f088: 83 f8 04 cmp $0x4,%eax 10f08b: 0f 84 9c 01 00 00 je 10f22d if ( result == -1 ) return -1; } node = pathloc->node_access; if ( !node ) 10f091: 85 db test %ebx,%ebx 10f093: 0f 84 27 01 00 00 je 10f1c0 <== ALWAYS TAKEN /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) 10f099: 83 7b 4c 01 cmpl $0x1,0x4c(%ebx) 10f09d: 0f 85 1d 01 00 00 jne 10f1c0 /* * 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 ) { 10f0a3: 8b 43 5c mov 0x5c(%ebx),%eax 10f0a6: 85 c0 test %eax,%eax 10f0a8: 0f 85 27 01 00 00 jne 10f1d5 /* * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); 10f0ae: 83 ec 08 sub $0x8,%esp 10f0b1: 8d 45 af lea -0x51(%ebp),%eax 10f0b4: 50 push %eax 10f0b5: 53 push %ebx 10f0b6: e8 d1 03 00 00 call 10f48c <== ALWAYS TAKEN 10f0bb: 89 c3 mov %eax,%ebx /* * If there is no node we have found the name of the node we * wish to create. */ if ( ! node ) 10f0bd: 83 c4 10 add $0x10,%esp 10f0c0: 85 c0 test %eax,%eax 10f0c2: 0f 84 8c 00 00 00 je 10f154 done = true; else pathloc->node_access = node; 10f0c8: 8b 55 0c mov 0xc(%ebp),%edx 10f0cb: 89 02 mov %eax,(%edx) 10f0cd: e9 14 ff ff ff jmp 10efe6 <== ALWAYS TAKEN 10f0d2: 66 90 xchg %ax,%ax <== NOT EXECUTED case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) 10f0d4: 8b 15 f8 4f 12 00 mov 0x124ff8,%edx 10f0da: 39 42 18 cmp %eax,0x18(%edx) 10f0dd: 0f 84 03 ff ff ff je 10efe6 /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == pathloc->mt_entry->mt_fs_root.node_access){ 10f0e3: 8b 4d 0c mov 0xc(%ebp),%ecx 10f0e6: 8b 51 10 mov 0x10(%ecx),%edx 10f0e9: 39 42 1c cmp %eax,0x1c(%edx) 10f0ec: 0f 84 5a 01 00 00 je 10f24c *pathloc = newloc; return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); } } else { if ( !node->Parent ) 10f0f2: 8b 58 08 mov 0x8(%eax),%ebx 10f0f5: 85 db test %ebx,%ebx 10f0f7: 74 43 je 10f13c rtems_set_errno_and_return_minus_one( ENOENT ); node = node->Parent; } pathloc->node_access = node; 10f0f9: 8b 4d 0c mov 0xc(%ebp),%ecx 10f0fc: 89 19 mov %ebx,(%ecx) break; 10f0fe: e9 e3 fe ff ff jmp 10efe6 <== ALWAYS TAKEN 10f103: 90 nop <== NOT EXECUTED * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) if ( node->type == IMFS_DIRECTORY ) if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) 10f104: 83 ec 08 sub $0x8,%esp 10f107: 6a 01 push $0x1 10f109: ff 75 0c pushl 0xc(%ebp) 10f10c: 89 55 a0 mov %edx,-0x60(%ebp) 10f10f: e8 28 fa ff ff call 10eb3c <== ALWAYS TAKEN 10f114: 83 c4 10 add $0x10,%esp 10f117: 85 c0 test %eax,%eax 10f119: 8b 55 a0 mov -0x60(%ebp),%edx 10f11c: 0f 84 89 00 00 00 je 10f1ab 10f122: 8b 4d 0c mov 0xc(%ebp),%ecx 10f125: 8b 01 mov (%ecx),%eax 10f127: e9 0e ff ff ff jmp 10f03a <== 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++) { 10f12c: 8a 42 01 mov 0x1(%edx),%al 10f12f: 42 inc %edx 10f130: 84 c0 test %al,%al 10f132: 74 44 je 10f178 if ( !IMFS_is_separator( path[ i ] ) ) 10f134: 3c 2f cmp $0x2f,%al 10f136: 74 f4 je 10f12c 10f138: 3c 5c cmp $0x5c,%al 10f13a: 74 f0 je 10f12c rtems_set_errno_and_return_minus_one( ENOENT ); 10f13c: e8 cf 46 00 00 call 113810 <__errno> 10f141: c7 00 02 00 00 00 movl $0x2,(%eax) 10f147: bb ff ff ff ff mov $0xffffffff,%ebx 10f14c: e9 d5 fe ff ff jmp 10f026 <== ALWAYS TAKEN 10f151: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED case IMFS_CURRENT_DIR: break; } } *name = &path[ i - len ]; 10f154: 8b 45 a4 mov -0x5c(%ebp),%eax 10f157: 2b 45 e4 sub -0x1c(%ebp),%eax 10f15a: 03 45 08 add 0x8(%ebp),%eax 10f15d: 8b 4d 10 mov 0x10(%ebp),%ecx 10f160: 89 01 mov %eax,(%ecx) /* * We have evaluated the path as far as we can. * Verify there is not any invalid stuff at the end of the name. */ for( ; path[i] != '\0'; i++) { 10f162: 8b 4d 08 mov 0x8(%ebp),%ecx 10f165: 8b 55 a4 mov -0x5c(%ebp),%edx 10f168: 8a 04 11 mov (%ecx,%edx,1),%al 10f16b: 84 c0 test %al,%al 10f16d: 74 09 je 10f178 10f16f: 8b 55 a4 mov -0x5c(%ebp),%edx 10f172: 01 ca add %ecx,%edx 10f174: eb be jmp 10f134 <== ALWAYS TAKEN 10f176: 66 90 xchg %ax,%ax <== NOT EXECUTED /* * Verify we can execute and write to this directory. */ result = IMFS_Set_handlers( pathloc ); 10f178: 83 ec 0c sub $0xc,%esp 10f17b: ff 75 0c pushl 0xc(%ebp) 10f17e: e8 5d f9 ff ff call 10eae0 <== ALWAYS TAKEN 10f183: 89 c3 mov %eax,%ebx /* * The returned node must be a directory */ node = pathloc->node_access; 10f185: 8b 55 0c mov 0xc(%ebp),%edx 10f188: 8b 02 mov (%edx),%eax 10f18a: 83 c4 10 add $0x10,%esp 10f18d: 83 78 4c 01 cmpl $0x1,0x4c(%eax) 10f191: 75 2d jne 10f1c0 <== ALWAYS TAKEN /* * We must have Write and execute permission on the returned node. */ if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) ) 10f193: 83 ec 08 sub $0x8,%esp 10f196: 6a 03 push $0x3 10f198: ff 75 0c pushl 0xc(%ebp) 10f19b: e8 9c f9 ff ff call 10eb3c <== ALWAYS TAKEN 10f1a0: 83 c4 10 add $0x10,%esp 10f1a3: 85 c0 test %eax,%eax 10f1a5: 0f 85 7b fe ff ff jne 10f026 rtems_set_errno_and_return_minus_one( EACCES ); 10f1ab: e8 60 46 00 00 call 113810 <__errno> 10f1b0: c7 00 0d 00 00 00 movl $0xd,(%eax) 10f1b6: bb ff ff ff ff mov $0xffffffff,%ebx 10f1bb: e9 66 fe ff ff jmp 10f026 <== ALWAYS TAKEN /* * The returned node must be a directory */ node = pathloc->node_access; if ( node->type != IMFS_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); 10f1c0: e8 4b 46 00 00 call 113810 <__errno> 10f1c5: c7 00 14 00 00 00 movl $0x14,(%eax) 10f1cb: bb ff ff ff ff mov $0xffffffff,%ebx 10f1d0: e9 51 fe ff ff jmp 10f026 <== 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 ) { newloc = node->info.directory.mt_fs->mt_fs_root; 10f1d5: 8d 7d d0 lea -0x30(%ebp),%edi 10f1d8: 8d 70 1c lea 0x1c(%eax),%esi 10f1db: b9 05 00 00 00 mov $0x5,%ecx 10f1e0: f3 a5 rep movsl %ds:(%esi),%es:(%edi) *pathloc = newloc; 10f1e2: 8d 75 d0 lea -0x30(%ebp),%esi 10f1e5: b1 05 mov $0x5,%cl 10f1e7: 8b 7d 0c mov 0xc(%ebp),%edi 10f1ea: f3 a5 rep movsl %ds:(%esi),%es:(%edi) return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); 10f1ec: 51 push %ecx 10f1ed: 8b 4d 0c mov 0xc(%ebp),%ecx 10f1f0: 8b 41 0c mov 0xc(%ecx),%eax 10f1f3: ff 75 10 pushl 0x10(%ebp) 10f1f6: 51 push %ecx 10f1f7: 8b 55 a4 mov -0x5c(%ebp),%edx 10f1fa: 2b 55 e4 sub -0x1c(%ebp),%edx 10f1fd: 03 55 08 add 0x8(%ebp),%edx 10f200: 52 push %edx 10f201: ff 50 04 call *0x4(%eax) 10f204: 89 c3 mov %eax,%ebx 10f206: 83 c4 10 add $0x10,%esp 10f209: e9 18 fe ff ff jmp 10f026 <== ALWAYS TAKEN case IMFS_NAME: if ( node->type == IMFS_HARD_LINK ) { result = IMFS_evaluate_link( pathloc, 0 ); 10f20e: 83 ec 08 sub $0x8,%esp 10f211: 6a 00 push $0x0 10f213: ff 75 0c pushl 0xc(%ebp) 10f216: e8 f9 fc ff ff call 10ef14 <== ALWAYS TAKEN if ( result == -1 ) 10f21b: 83 c4 10 add $0x10,%esp 10f21e: 83 f8 ff cmp $0xffffffff,%eax 10f221: 74 4d je 10f270 <== ALWAYS TAKEN 10f223: 8b 45 0c mov 0xc(%ebp),%eax 10f226: 8b 18 mov (%eax),%ebx 10f228: e9 64 fe ff ff jmp 10f091 <== ALWAYS TAKEN return -1; } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_link( pathloc, 0 ); 10f22d: 83 ec 08 sub $0x8,%esp 10f230: 6a 00 push $0x0 10f232: ff 75 0c pushl 0xc(%ebp) 10f235: e8 da fc ff ff call 10ef14 <== ALWAYS TAKEN if ( result == -1 ) 10f23a: 83 c4 10 add $0x10,%esp 10f23d: 83 f8 ff cmp $0xffffffff,%eax 10f240: 74 2e je 10f270 <== ALWAYS TAKEN 10f242: 8b 55 0c mov 0xc(%ebp),%edx 10f245: 8b 1a mov (%edx),%ebx 10f247: e9 45 fe ff ff jmp 10f091 <== ALWAYS TAKEN if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; } else { newloc = pathloc->mt_entry->mt_point_node; 10f24c: 8d 7d d0 lea -0x30(%ebp),%edi 10f24f: 8d 72 08 lea 0x8(%edx),%esi 10f252: b9 05 00 00 00 mov $0x5,%ecx 10f257: f3 a5 rep movsl %ds:(%esi),%es:(%edi) *pathloc = newloc; 10f259: 8d 75 d0 lea -0x30(%ebp),%esi 10f25c: b1 05 mov $0x5,%cl 10f25e: 8b 7d 0c mov 0xc(%ebp),%edi 10f261: f3 a5 rep movsl %ds:(%esi),%es:(%edi) return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); 10f263: 53 push %ebx 10f264: 8b 55 0c mov 0xc(%ebp),%edx 10f267: 8b 42 0c mov 0xc(%edx),%eax 10f26a: ff 75 10 pushl 0x10(%ebp) 10f26d: 52 push %edx 10f26e: eb 87 jmp 10f1f7 <== ALWAYS TAKEN 10f270: 89 c3 mov %eax,%ebx <== NOT EXECUTED 10f272: e9 af fd ff ff jmp 10f026 <== NOT EXECUTED 0010eb8c : int IMFS_evaluate_hard_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 10eb8c: 55 push %ebp 10eb8d: 89 e5 mov %esp,%ebp 10eb8f: 53 push %ebx 10eb90: 83 ec 04 sub $0x4,%esp 10eb93: 8b 5d 08 mov 0x8(%ebp),%ebx IMFS_jnode_t *jnode = node->node_access; 10eb96: 8b 03 mov (%ebx),%eax /* * Check for things that should never happen. */ if ( jnode->type != IMFS_HARD_LINK ) 10eb98: 83 78 4c 03 cmpl $0x3,0x4c(%eax) 10eb9c: 75 3c jne 10ebda <== ALWAYS TAKEN /* * Set the hard link value and the handlers. */ node->node_access = jnode->info.hard_link.link_node; 10eb9e: 8b 40 50 mov 0x50(%eax),%eax 10eba1: 89 03 mov %eax,(%ebx) IMFS_Set_handlers( node ); 10eba3: 83 ec 0c sub $0xc,%esp 10eba6: 53 push %ebx 10eba7: e8 34 ff ff ff call 10eae0 <== ALWAYS TAKEN /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) 10ebac: 58 pop %eax 10ebad: 5a pop %edx 10ebae: ff 75 0c pushl 0xc(%ebp) 10ebb1: 53 push %ebx 10ebb2: e8 85 ff ff ff call 10eb3c <== ALWAYS TAKEN 10ebb7: 83 c4 10 add $0x10,%esp 10ebba: 85 c0 test %eax,%eax 10ebbc: 74 0a je 10ebc8 <== ALWAYS TAKEN 10ebbe: 31 c0 xor %eax,%eax rtems_set_errno_and_return_minus_one( EACCES ); return result; } 10ebc0: 8b 5d fc mov -0x4(%ebp),%ebx 10ebc3: c9 leave 10ebc4: c3 ret 10ebc5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); 10ebc8: e8 43 4c 00 00 call 113810 <__errno> <== NOT EXECUTED 10ebcd: c7 00 0d 00 00 00 movl $0xd,(%eax) <== NOT EXECUTED 10ebd3: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 10ebd8: eb e6 jmp 10ebc0 <== NOT EXECUTED /* * Check for things that should never happen. */ if ( jnode->type != IMFS_HARD_LINK ) rtems_fatal_error_occurred (0xABCD0000); 10ebda: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10ebdd: 68 00 00 cd ab push $0xabcd0000 <== NOT EXECUTED 10ebe2: e8 b5 cf ff ff call 10bb9c <== NOT EXECUTED 0010ef14 : int IMFS_evaluate_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 10ef14: 55 push %ebp 10ef15: 89 e5 mov %esp,%ebp 10ef17: 57 push %edi 10ef18: 56 push %esi 10ef19: 53 push %ebx 10ef1a: 83 ec 0c sub $0xc,%esp 10ef1d: 8b 75 08 mov 0x8(%ebp),%esi 10ef20: 8b 7d 0c mov 0xc(%ebp),%edi 10ef23: 8b 15 f8 4f 12 00 mov 0x124ff8,%edx 10ef29: eb 0e jmp 10ef39 <== ALWAYS TAKEN 10ef2b: 90 nop <== NOT EXECUTED */ if ( jnode->type == IMFS_HARD_LINK ) result = IMFS_evaluate_hard_link( node, flags ); else if (jnode->type == IMFS_SYM_LINK ) 10ef2c: 83 f8 04 cmp $0x4,%eax 10ef2f: 74 53 je 10ef84 result = IMFS_evaluate_sym_link( node, flags ); } while ( ( result == 0 ) && ( ( jnode->type == IMFS_SYM_LINK ) || ( jnode->type == IMFS_HARD_LINK ) ) ); 10ef31: 83 e8 03 sub $0x3,%eax 10ef34: 83 f8 01 cmp $0x1,%eax 10ef37: 77 3a ja 10ef73 <== NEVER TAKEN { IMFS_jnode_t *jnode; int result = 0; do { jnode = node->node_access; 10ef39: 8b 1e mov (%esi),%ebx /* * Increment and check the link counter. */ rtems_filesystem_link_counts ++; 10ef3b: 8b 42 30 mov 0x30(%edx),%eax 10ef3e: 40 inc %eax 10ef3f: 66 89 42 30 mov %ax,0x30(%edx) if ( rtems_filesystem_link_counts > MAXSYMLINK ) { 10ef43: 66 83 f8 05 cmp $0x5,%ax 10ef47: 77 57 ja 10efa0 /* * Follow the Link node. */ if ( jnode->type == IMFS_HARD_LINK ) 10ef49: 8b 43 4c mov 0x4c(%ebx),%eax 10ef4c: 83 f8 03 cmp $0x3,%eax 10ef4f: 75 db jne 10ef2c result = IMFS_evaluate_hard_link( node, flags ); 10ef51: 83 ec 08 sub $0x8,%esp 10ef54: 57 push %edi 10ef55: 56 push %esi 10ef56: e8 31 fc ff ff call 10eb8c <== ALWAYS TAKEN 10ef5b: 83 c4 10 add $0x10,%esp else if (jnode->type == IMFS_SYM_LINK ) result = IMFS_evaluate_sym_link( node, flags ); } while ( ( result == 0 ) && ( ( jnode->type == IMFS_SYM_LINK ) || ( jnode->type == IMFS_HARD_LINK ) ) ); 10ef5e: 85 c0 test %eax,%eax 10ef60: 75 33 jne 10ef95 <== ALWAYS TAKEN 10ef62: 8b 43 4c mov 0x4c(%ebx),%eax 10ef65: 8b 15 f8 4f 12 00 mov 0x124ff8,%edx 10ef6b: 83 e8 03 sub $0x3,%eax 10ef6e: 83 f8 01 cmp $0x1,%eax 10ef71: 76 c6 jbe 10ef39 <== NEVER TAKEN 10ef73: 31 c0 xor %eax,%eax /* * Clear link counter. */ rtems_filesystem_link_counts = 0; 10ef75: 66 c7 42 30 00 00 movw $0x0,0x30(%edx) return result; } 10ef7b: 8d 65 f4 lea -0xc(%ebp),%esp 10ef7e: 5b pop %ebx 10ef7f: 5e pop %esi 10ef80: 5f pop %edi 10ef81: c9 leave 10ef82: c3 ret 10ef83: 90 nop <== NOT EXECUTED if ( jnode->type == IMFS_HARD_LINK ) result = IMFS_evaluate_hard_link( node, flags ); else if (jnode->type == IMFS_SYM_LINK ) result = IMFS_evaluate_sym_link( node, flags ); 10ef84: 83 ec 08 sub $0x8,%esp 10ef87: 57 push %edi 10ef88: 56 push %esi 10ef89: e8 5a fc ff ff call 10ebe8 <== ALWAYS TAKEN 10ef8e: 83 c4 10 add $0x10,%esp } while ( ( result == 0 ) && ( ( jnode->type == IMFS_SYM_LINK ) || ( jnode->type == IMFS_HARD_LINK ) ) ); 10ef91: 85 c0 test %eax,%eax 10ef93: 74 cd je 10ef62 10ef95: 8b 15 f8 4f 12 00 mov 0x124ff8,%edx 10ef9b: eb d8 jmp 10ef75 <== ALWAYS TAKEN 10ef9d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED * Increment and check the link counter. */ rtems_filesystem_link_counts ++; if ( rtems_filesystem_link_counts > MAXSYMLINK ) { rtems_filesystem_link_counts = 0; 10efa0: 66 c7 42 30 00 00 movw $0x0,0x30(%edx) rtems_set_errno_and_return_minus_one( ELOOP ); 10efa6: e8 65 48 00 00 call 113810 <__errno> 10efab: c7 00 5c 00 00 00 movl $0x5c,(%eax) 10efb1: b8 ff ff ff ff mov $0xffffffff,%eax */ rtems_filesystem_link_counts = 0; return result; } 10efb6: 8d 65 f4 lea -0xc(%ebp),%esp 10efb9: 5b pop %ebx 10efba: 5e pop %esi 10efbb: 5f pop %edi 10efbc: c9 leave 10efbd: c3 ret 0010eb3c : int IMFS_evaluate_permission( rtems_filesystem_location_info_t *node, int flags ) { 10eb3c: 55 push %ebp 10eb3d: 89 e5 mov %esp,%ebp 10eb3f: 57 push %edi 10eb40: 56 push %esi 10eb41: 53 push %ebx 10eb42: 83 ec 0c sub $0xc,%esp 10eb45: 8b 7d 0c mov 0xc(%ebp),%edi if ( !rtems_libio_is_valid_perms( flags ) ) { assert( 0 ); rtems_set_errno_and_return_minus_one( EIO ); } jnode = node->node_access; 10eb48: 8b 45 08 mov 0x8(%ebp),%eax 10eb4b: 8b 18 mov (%eax),%ebx #if defined(RTEMS_POSIX_API) st_uid = geteuid(); 10eb4d: e8 06 0f 00 00 call 10fa58 <== ALWAYS TAKEN 10eb52: 89 c6 mov %eax,%esi st_gid = getegid(); 10eb54: e8 ef 0e 00 00 call 10fa48 <== ALWAYS TAKEN * Check if I am owner or a group member or someone else. */ flags_to_test = flags; if ( st_uid == jnode->st_uid ) 10eb59: 66 3b 73 3c cmp 0x3c(%ebx),%si 10eb5d: 74 1d je 10eb7c flags_to_test <<= 6; else if ( st_gid == jnode->st_gid ) 10eb5f: 66 3b 43 3e cmp 0x3e(%ebx),%ax 10eb63: 74 1f je 10eb84 <== NEVER TAKEN /* * If all of the flags are set we have permission * to do this. */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) 10eb65: 8b 43 30 mov 0x30(%ebx),%eax 10eb68: 21 f8 and %edi,%eax 10eb6a: 39 c7 cmp %eax,%edi 10eb6c: 0f 94 c0 sete %al 10eb6f: 0f b6 c0 movzbl %al,%eax return 1; return 0; } 10eb72: 83 c4 0c add $0xc,%esp 10eb75: 5b pop %ebx 10eb76: 5e pop %esi 10eb77: 5f pop %edi 10eb78: c9 leave 10eb79: c3 ret 10eb7a: 66 90 xchg %ax,%ax <== NOT EXECUTED */ flags_to_test = flags; if ( st_uid == jnode->st_uid ) flags_to_test <<= 6; 10eb7c: c1 e7 06 shl $0x6,%edi 10eb7f: eb e4 jmp 10eb65 <== ALWAYS TAKEN 10eb81: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED else if ( st_gid == jnode->st_gid ) flags_to_test <<= 3; 10eb84: c1 e7 03 shl $0x3,%edi 10eb87: eb dc jmp 10eb65 <== ALWAYS TAKEN 0010ebe8 : int IMFS_evaluate_sym_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 10ebe8: 55 push %ebp 10ebe9: 89 e5 mov %esp,%ebp 10ebeb: 57 push %edi 10ebec: 56 push %esi 10ebed: 53 push %ebx 10ebee: 83 ec 0c sub $0xc,%esp 10ebf1: 8b 5d 08 mov 0x8(%ebp),%ebx IMFS_jnode_t *jnode = node->node_access; 10ebf4: 8b 03 mov (%ebx),%eax /* * Check for things that should never happen. */ if ( jnode->type != IMFS_SYM_LINK ) 10ebf6: 83 78 4c 04 cmpl $0x4,0x4c(%eax) 10ebfa: 0f 85 9f 00 00 00 jne 10ec9f <== ALWAYS TAKEN rtems_fatal_error_occurred (0xABCD0000); if ( !jnode->Parent ) 10ec00: 8b 50 08 mov 0x8(%eax),%edx 10ec03: 85 d2 test %edx,%edx 10ec05: 0f 84 87 00 00 00 je 10ec92 <== ALWAYS TAKEN /* * Move the node_access to either the symbolic links parent or * root depending on the symbolic links path. */ node->node_access = jnode->Parent; 10ec0b: 89 13 mov %edx,(%ebx) rtems_filesystem_get_sym_start_loc( 10ec0d: 8b 50 50 mov 0x50(%eax),%edx 10ec10: 8a 0a mov (%edx),%cl 10ec12: 80 f9 2f cmp $0x2f,%cl 10ec15: 74 09 je 10ec20 10ec17: 80 f9 5c cmp $0x5c,%cl 10ec1a: 74 04 je 10ec20 <== ALWAYS TAKEN 10ec1c: 84 c9 test %cl,%cl 10ec1e: 75 5c jne 10ec7c <== NEVER TAKEN 10ec20: 8b 35 f8 4f 12 00 mov 0x124ff8,%esi 10ec26: 83 c6 18 add $0x18,%esi 10ec29: b9 05 00 00 00 mov $0x5,%ecx 10ec2e: 89 df mov %ebx,%edi 10ec30: f3 a5 rep movsl %ds:(%esi),%es:(%edi) 10ec32: 8b 50 50 mov 0x50(%eax),%edx 10ec35: b8 01 00 00 00 mov $0x1,%eax * 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] ), 10ec3a: 01 c2 add %eax,%edx 10ec3c: 31 c0 xor %eax,%eax 10ec3e: b9 ff ff ff ff mov $0xffffffff,%ecx 10ec43: 89 d7 mov %edx,%edi 10ec45: f2 ae repnz scas %es:(%edi),%al 10ec47: f7 d1 not %ecx 10ec49: 49 dec %ecx /* * Use eval path to evaluate the path of the symbolic link. */ result = IMFS_eval_path( 10ec4a: 53 push %ebx 10ec4b: ff 75 0c pushl 0xc(%ebp) 10ec4e: 51 push %ecx 10ec4f: 52 push %edx 10ec50: e8 57 00 00 00 call 10ecac <== ALWAYS TAKEN 10ec55: 89 c6 mov %eax,%esi strlen( &jnode->info.sym_link.name[i] ), flags, node ); IMFS_Set_handlers( node ); 10ec57: 89 1c 24 mov %ebx,(%esp) 10ec5a: e8 81 fe ff ff call 10eae0 <== ALWAYS TAKEN /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) 10ec5f: 59 pop %ecx 10ec60: 5f pop %edi 10ec61: ff 75 0c pushl 0xc(%ebp) 10ec64: 53 push %ebx 10ec65: e8 d2 fe ff ff call 10eb3c <== ALWAYS TAKEN 10ec6a: 83 c4 10 add $0x10,%esp 10ec6d: 85 c0 test %eax,%eax 10ec6f: 74 0f je 10ec80 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EACCES ); return result; } 10ec71: 89 f0 mov %esi,%eax 10ec73: 8d 65 f4 lea -0xc(%ebp),%esp 10ec76: 5b pop %ebx 10ec77: 5e pop %esi 10ec78: 5f pop %edi 10ec79: c9 leave 10ec7a: c3 ret 10ec7b: 90 nop <== NOT EXECUTED * root depending on the symbolic links path. */ node->node_access = jnode->Parent; rtems_filesystem_get_sym_start_loc( 10ec7c: 31 c0 xor %eax,%eax 10ec7e: eb ba jmp 10ec3a <== ALWAYS TAKEN /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); 10ec80: e8 8b 4b 00 00 call 113810 <__errno> <== NOT EXECUTED 10ec85: c7 00 0d 00 00 00 movl $0xd,(%eax) <== NOT EXECUTED 10ec8b: be ff ff ff ff mov $0xffffffff,%esi <== NOT EXECUTED 10ec90: eb df jmp 10ec71 <== NOT EXECUTED if ( jnode->type != IMFS_SYM_LINK ) rtems_fatal_error_occurred (0xABCD0000); if ( !jnode->Parent ) rtems_fatal_error_occurred( 0xBAD00000 ); 10ec92: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10ec95: 68 00 00 d0 ba push $0xbad00000 <== NOT EXECUTED 10ec9a: e8 fd ce ff ff call 10bb9c <== NOT EXECUTED /* * Check for things that should never happen. */ if ( jnode->type != IMFS_SYM_LINK ) rtems_fatal_error_occurred (0xABCD0000); 10ec9f: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10eca2: 68 00 00 cd ab push $0xabcd0000 <== NOT EXECUTED 10eca7: e8 f0 ce ff ff call 10bb9c <== NOT EXECUTED 001121ec : int IMFS_fchmod( rtems_filesystem_location_info_t *loc, mode_t mode ) { 1121ec: 55 push %ebp 1121ed: 89 e5 mov %esp,%ebp 1121ef: 53 push %ebx 1121f0: 83 ec 14 sub $0x14,%esp IMFS_jnode_t *jnode; #if defined(RTEMS_POSIX_API) uid_t st_uid; #endif jnode = loc->node_access; 1121f3: 8b 45 08 mov 0x8(%ebp),%eax 1121f6: 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(); 1121f8: e8 5b d8 ff ff call 10fa58 if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) ) 1121fd: 66 3b 43 3c cmp 0x3c(%ebx),%ax 112201: 74 05 je 112208 <== NEVER TAKEN 112203: 66 85 c0 test %ax,%ax <== NOT EXECUTED 112206: 75 34 jne 11223c <== 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); 112208: 8b 45 0c mov 0xc(%ebp),%eax 11220b: 25 ff 0f 00 00 and $0xfff,%eax 112210: 8b 53 30 mov 0x30(%ebx),%edx 112213: 81 e2 00 f0 ff ff and $0xfffff000,%edx 112219: 09 d0 or %edx,%eax 11221b: 89 43 30 mov %eax,0x30(%ebx) IMFS_update_ctime( jnode ); 11221e: 83 ec 08 sub $0x8,%esp 112221: 6a 00 push $0x0 112223: 8d 45 f0 lea -0x10(%ebp),%eax 112226: 50 push %eax 112227: e8 3c d8 ff ff call 10fa68 11222c: 8b 45 f0 mov -0x10(%ebp),%eax 11222f: 89 43 48 mov %eax,0x48(%ebx) 112232: 31 c0 xor %eax,%eax return 0; 112234: 83 c4 10 add $0x10,%esp } 112237: 8b 5d fc mov -0x4(%ebp),%ebx 11223a: c9 leave 11223b: c3 ret */ #if defined(RTEMS_POSIX_API) st_uid = geteuid(); if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) ) rtems_set_errno_and_return_minus_one( EPERM ); 11223c: e8 cf 15 00 00 call 113810 <__errno> <== NOT EXECUTED 112241: c7 00 01 00 00 00 movl $0x1,(%eax) <== NOT EXECUTED 112247: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 11224c: eb e9 jmp 112237 <== NOT EXECUTED 0010f3e8 : } int IMFS_fifo_close( rtems_libio_t *iop ) { 10f3e8: 55 push %ebp <== NOT EXECUTED 10f3e9: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10f3eb: 57 push %edi <== NOT EXECUTED 10f3ec: 56 push %esi <== NOT EXECUTED 10f3ed: 53 push %ebx <== NOT EXECUTED 10f3ee: 83 ec 14 sub $0x14,%esp <== NOT EXECUTED 10f3f1: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; 10f3f4: 8b 7b 38 mov 0x38(%ebx),%edi <== NOT EXECUTED int err = pipe_release(&JNODE2PIPE(jnode), iop); 10f3f7: 53 push %ebx <== NOT EXECUTED 10f3f8: 8d 47 50 lea 0x50(%edi),%eax <== NOT EXECUTED 10f3fb: 50 push %eax <== NOT EXECUTED 10f3fc: e8 ff 26 00 00 call 111b00 <== NOT EXECUTED 10f401: 89 c6 mov %eax,%esi <== NOT EXECUTED if (! err) { 10f403: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10f406: 83 f8 00 cmp $0x0,%eax <== NOT EXECUTED 10f409: 74 0d je 10f418 <== 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) free(jnode); } IMFS_FIFO_RETURN(err); 10f40b: 7c 37 jl 10f444 <== NOT EXECUTED } 10f40d: 89 f0 mov %esi,%eax <== NOT EXECUTED 10f40f: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 10f412: 5b pop %ebx <== NOT EXECUTED 10f413: 5e pop %esi <== NOT EXECUTED 10f414: 5f pop %edi <== NOT EXECUTED 10f415: c9 leave <== NOT EXECUTED 10f416: c3 ret <== NOT EXECUTED 10f417: 90 nop <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; int err = pipe_release(&JNODE2PIPE(jnode), iop); if (! err) { iop->flags &= ~LIBIO_FLAGS_OPEN; 10f418: 81 63 14 ff fe ff ff andl $0xfffffeff,0x14(%ebx) <== 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) 10f41f: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10f422: 57 push %edi <== NOT EXECUTED 10f423: e8 08 07 00 00 call 10fb30 <== NOT EXECUTED 10f428: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10f42b: 85 c0 test %eax,%eax <== NOT EXECUTED 10f42d: 75 de jne 10f40d <== NOT EXECUTED 10f42f: 66 83 7f 34 00 cmpw $0x0,0x34(%edi) <== NOT EXECUTED 10f434: 75 d7 jne 10f40d <== NOT EXECUTED free(jnode); 10f436: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10f439: 57 push %edi <== NOT EXECUTED 10f43a: e8 9d 8b ff ff call 107fdc <== NOT EXECUTED 10f43f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10f442: eb c9 jmp 10f40d <== NOT EXECUTED } IMFS_FIFO_RETURN(err); 10f444: e8 c7 43 00 00 call 113810 <__errno> <== NOT EXECUTED 10f449: f7 de neg %esi <== NOT EXECUTED 10f44b: 89 30 mov %esi,(%eax) <== NOT EXECUTED 10f44d: be ff ff ff ff mov $0xffffffff,%esi <== NOT EXECUTED 10f452: eb b9 jmp 10f40d <== NOT EXECUTED 0010f2b8 : int IMFS_fifo_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) { 10f2b8: 55 push %ebp <== NOT EXECUTED 10f2b9: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10f2bb: 53 push %ebx <== NOT EXECUTED 10f2bc: 83 ec 04 sub $0x4,%esp <== NOT EXECUTED 10f2bf: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 10f2c2: 8b 55 0c mov 0xc(%ebp),%edx <== NOT EXECUTED 10f2c5: 8b 4d 10 mov 0x10(%ebp),%ecx <== NOT EXECUTED int err; if (command == FIONBIO) { 10f2c8: 81 fa 7e 66 04 80 cmp $0x8004667e,%edx <== NOT EXECUTED 10f2ce: 74 1c je 10f2ec <== NOT EXECUTED iop->flags &= ~LIBIO_FLAGS_NO_DELAY; return 0; } } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); 10f2d0: 50 push %eax <== NOT EXECUTED 10f2d1: 51 push %ecx <== NOT EXECUTED 10f2d2: 52 push %edx <== NOT EXECUTED 10f2d3: 8b 40 38 mov 0x38(%eax),%eax <== NOT EXECUTED 10f2d6: ff 70 50 pushl 0x50(%eax) <== NOT EXECUTED 10f2d9: e8 02 24 00 00 call 1116e0 <== NOT EXECUTED IMFS_FIFO_RETURN(err); 10f2de: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10f2e1: 85 c0 test %eax,%eax <== NOT EXECUTED 10f2e3: 78 3e js 10f323 <== NOT EXECUTED } 10f2e5: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 10f2e8: c9 leave <== NOT EXECUTED 10f2e9: c3 ret <== NOT EXECUTED 10f2ea: 66 90 xchg %ax,%ax <== NOT EXECUTED ) { int err; if (command == FIONBIO) { if (buffer == NULL) 10f2ec: 85 c9 test %ecx,%ecx <== NOT EXECUTED 10f2ee: 74 20 je 10f310 <== NOT EXECUTED err = -EFAULT; else { if (*(int *)buffer) 10f2f0: 8b 11 mov (%ecx),%edx <== NOT EXECUTED 10f2f2: 85 d2 test %edx,%edx <== NOT EXECUTED 10f2f4: 74 0e je 10f304 <== NOT EXECUTED iop->flags |= LIBIO_FLAGS_NO_DELAY; 10f2f6: 83 48 14 01 orl $0x1,0x14(%eax) <== NOT EXECUTED 10f2fa: 31 c0 xor %eax,%eax <== NOT EXECUTED } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); IMFS_FIFO_RETURN(err); } 10f2fc: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 10f2ff: c9 leave <== NOT EXECUTED 10f300: c3 ret <== NOT EXECUTED 10f301: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED err = -EFAULT; else { if (*(int *)buffer) iop->flags |= LIBIO_FLAGS_NO_DELAY; else iop->flags &= ~LIBIO_FLAGS_NO_DELAY; 10f304: 83 60 14 fe andl $0xfffffffe,0x14(%eax) <== NOT EXECUTED 10f308: 31 c0 xor %eax,%eax <== NOT EXECUTED } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); IMFS_FIFO_RETURN(err); } 10f30a: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 10f30d: c9 leave <== NOT EXECUTED 10f30e: c3 ret <== NOT EXECUTED 10f30f: 90 nop <== NOT EXECUTED ) { int err; if (command == FIONBIO) { if (buffer == NULL) 10f310: bb 0e 00 00 00 mov $0xe,%ebx <== NOT EXECUTED } } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); IMFS_FIFO_RETURN(err); 10f315: e8 f6 44 00 00 call 113810 <__errno> <== NOT EXECUTED 10f31a: 89 18 mov %ebx,(%eax) <== NOT EXECUTED 10f31c: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 10f321: eb c2 jmp 10f2e5 <== NOT EXECUTED 10f323: 89 c3 mov %eax,%ebx <== NOT EXECUTED 10f325: f7 db neg %ebx <== NOT EXECUTED 10f327: eb ec jmp 10f315 <== NOT EXECUTED 0010f278 : rtems_off64_t IMFS_fifo_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { 10f278: 55 push %ebp <== NOT EXECUTED 10f279: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10f27b: 53 push %ebx <== NOT EXECUTED 10f27c: 83 ec 04 sub $0x4,%esp <== NOT EXECUTED 10f27f: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED off_t err = pipe_lseek(LIBIO2PIPE(iop), offset, whence, iop); 10f282: 50 push %eax <== NOT EXECUTED 10f283: ff 75 14 pushl 0x14(%ebp) <== NOT EXECUTED 10f286: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED 10f289: 8b 40 38 mov 0x38(%eax),%eax <== NOT EXECUTED 10f28c: ff 70 50 pushl 0x50(%eax) <== NOT EXECUTED 10f28f: e8 ec 23 00 00 call 111680 <== NOT EXECUTED 10f294: 89 c3 mov %eax,%ebx <== NOT EXECUTED IMFS_FIFO_RETURN(err); 10f296: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10f299: 85 c0 test %eax,%eax <== NOT EXECUTED 10f29b: 78 06 js 10f2a3 <== NOT EXECUTED 10f29d: 99 cltd <== NOT EXECUTED } 10f29e: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 10f2a1: c9 leave <== NOT EXECUTED 10f2a2: c3 ret <== NOT EXECUTED rtems_off64_t offset, int whence ) { off_t err = pipe_lseek(LIBIO2PIPE(iop), offset, whence, iop); IMFS_FIFO_RETURN(err); 10f2a3: e8 68 45 00 00 call 113810 <__errno> <== NOT EXECUTED 10f2a8: f7 db neg %ebx <== NOT EXECUTED 10f2aa: 89 18 mov %ebx,(%eax) <== NOT EXECUTED 10f2ac: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 10f2b1: ba ff ff ff ff mov $0xffffffff,%edx <== NOT EXECUTED 10f2b6: eb e6 jmp 10f29e <== NOT EXECUTED 0010f454 : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 10f454: 55 push %ebp 10f455: 89 e5 mov %esp,%ebp 10f457: 53 push %ebx 10f458: 83 ec 0c sub $0xc,%esp 10f45b: 8b 45 08 mov 0x8(%ebp),%eax IMFS_jnode_t *jnode = iop->file_info; int err = fifo_open(&JNODE2PIPE(jnode), iop); 10f45e: 50 push %eax 10f45f: 8b 40 38 mov 0x38(%eax),%eax 10f462: 83 c0 50 add $0x50,%eax 10f465: 50 push %eax 10f466: e8 a9 27 00 00 call 111c14 10f46b: 89 c3 mov %eax,%ebx IMFS_FIFO_RETURN(err); 10f46d: 83 c4 10 add $0x10,%esp 10f470: 85 c0 test %eax,%eax 10f472: 78 07 js 10f47b <== NEVER TAKEN } 10f474: 89 d8 mov %ebx,%eax 10f476: 8b 5d fc mov -0x4(%ebp),%ebx 10f479: c9 leave 10f47a: c3 ret ) { IMFS_jnode_t *jnode = iop->file_info; int err = fifo_open(&JNODE2PIPE(jnode), iop); IMFS_FIFO_RETURN(err); 10f47b: e8 90 43 00 00 call 113810 <__errno> 10f480: f7 db neg %ebx 10f482: 89 18 mov %ebx,(%eax) 10f484: bb ff ff ff ff mov $0xffffffff,%ebx 10f489: eb e9 jmp 10f474 <== ALWAYS TAKEN 0010f38c : ssize_t IMFS_fifo_read( rtems_libio_t *iop, void *buffer, size_t count ) { 10f38c: 55 push %ebp <== NOT EXECUTED 10f38d: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10f38f: 56 push %esi <== NOT EXECUTED 10f390: 53 push %ebx <== NOT EXECUTED 10f391: 83 ec 10 sub $0x10,%esp <== NOT EXECUTED 10f394: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; 10f397: 8b 70 38 mov 0x38(%eax),%esi <== NOT EXECUTED int err = pipe_read(JNODE2PIPE(jnode), buffer, count, iop); 10f39a: 50 push %eax <== NOT EXECUTED 10f39b: ff 75 10 pushl 0x10(%ebp) <== NOT EXECUTED 10f39e: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED 10f3a1: ff 76 50 pushl 0x50(%esi) <== NOT EXECUTED 10f3a4: e8 97 23 00 00 call 111740 <== NOT EXECUTED 10f3a9: 89 c3 mov %eax,%ebx <== NOT EXECUTED if (err > 0) 10f3ab: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10f3ae: 83 f8 00 cmp $0x0,%eax <== NOT EXECUTED 10f3b1: 7e 21 jle 10f3d4 <== NOT EXECUTED IMFS_update_atime(jnode); 10f3b3: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 10f3b6: 6a 00 push $0x0 <== NOT EXECUTED 10f3b8: 8d 45 f0 lea -0x10(%ebp),%eax <== NOT EXECUTED 10f3bb: 50 push %eax <== NOT EXECUTED 10f3bc: e8 a7 06 00 00 call 10fa68 <== NOT EXECUTED 10f3c1: 8b 45 f0 mov -0x10(%ebp),%eax <== NOT EXECUTED 10f3c4: 89 46 40 mov %eax,0x40(%esi) <== NOT EXECUTED 10f3c7: 83 c4 10 add $0x10,%esp <== NOT EXECUTED IMFS_FIFO_RETURN(err); } 10f3ca: 89 d8 mov %ebx,%eax <== NOT EXECUTED 10f3cc: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED 10f3cf: 5b pop %ebx <== NOT EXECUTED 10f3d0: 5e pop %esi <== NOT EXECUTED 10f3d1: c9 leave <== NOT EXECUTED 10f3d2: c3 ret <== NOT EXECUTED 10f3d3: 90 nop <== NOT EXECUTED int err = pipe_read(JNODE2PIPE(jnode), buffer, count, iop); if (err > 0) IMFS_update_atime(jnode); IMFS_FIFO_RETURN(err); 10f3d4: 74 f4 je 10f3ca <== NOT EXECUTED 10f3d6: e8 35 44 00 00 call 113810 <__errno> <== NOT EXECUTED 10f3db: f7 db neg %ebx <== NOT EXECUTED 10f3dd: 89 18 mov %ebx,(%eax) <== NOT EXECUTED 10f3df: bb ff ff ff ff mov $0xffffffff,%ebx <== NOT EXECUTED 10f3e4: eb e4 jmp 10f3ca <== NOT EXECUTED 0010f32c : ssize_t IMFS_fifo_write( rtems_libio_t *iop, const void *buffer, size_t count ) { 10f32c: 55 push %ebp <== NOT EXECUTED 10f32d: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10f32f: 56 push %esi <== NOT EXECUTED 10f330: 53 push %ebx <== NOT EXECUTED 10f331: 83 ec 10 sub $0x10,%esp <== NOT EXECUTED 10f334: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; 10f337: 8b 58 38 mov 0x38(%eax),%ebx <== NOT EXECUTED int err = pipe_write(JNODE2PIPE(jnode), buffer, count, iop); 10f33a: 50 push %eax <== NOT EXECUTED 10f33b: ff 75 10 pushl 0x10(%ebp) <== NOT EXECUTED 10f33e: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED 10f341: ff 73 50 pushl 0x50(%ebx) <== NOT EXECUTED 10f344: e8 b7 25 00 00 call 111900 <== NOT EXECUTED 10f349: 89 c6 mov %eax,%esi <== NOT EXECUTED if (err > 0) { 10f34b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10f34e: 83 f8 00 cmp $0x0,%eax <== NOT EXECUTED 10f351: 7e 25 jle 10f378 <== NOT EXECUTED IMFS_mtime_ctime_update(jnode); 10f353: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 10f356: 6a 00 push $0x0 <== NOT EXECUTED 10f358: 8d 45 f0 lea -0x10(%ebp),%eax <== NOT EXECUTED 10f35b: 50 push %eax <== NOT EXECUTED 10f35c: e8 07 07 00 00 call 10fa68 <== NOT EXECUTED 10f361: 8b 45 f0 mov -0x10(%ebp),%eax <== NOT EXECUTED 10f364: 89 43 44 mov %eax,0x44(%ebx) <== NOT EXECUTED 10f367: 89 43 48 mov %eax,0x48(%ebx) <== NOT EXECUTED 10f36a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } IMFS_FIFO_RETURN(err); } 10f36d: 89 f0 mov %esi,%eax <== NOT EXECUTED 10f36f: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED 10f372: 5b pop %ebx <== NOT EXECUTED 10f373: 5e pop %esi <== NOT EXECUTED 10f374: c9 leave <== NOT EXECUTED 10f375: c3 ret <== NOT EXECUTED 10f376: 66 90 xchg %ax,%ax <== NOT EXECUTED int err = pipe_write(JNODE2PIPE(jnode), buffer, count, iop); if (err > 0) { IMFS_mtime_ctime_update(jnode); } IMFS_FIFO_RETURN(err); 10f378: 74 f3 je 10f36d <== NOT EXECUTED 10f37a: e8 91 44 00 00 call 113810 <__errno> <== NOT EXECUTED 10f37f: f7 de neg %esi <== NOT EXECUTED 10f381: 89 30 mov %esi,(%eax) <== NOT EXECUTED 10f383: be ff ff ff ff mov $0xffffffff,%esi <== NOT EXECUTED 10f388: eb e3 jmp 10f36d <== NOT EXECUTED 0010f48c : IMFS_jnode_t *IMFS_find_match_in_dir( IMFS_jnode_t *directory, char *name ) { 10f48c: 55 push %ebp 10f48d: 89 e5 mov %esp,%ebp 10f48f: 57 push %edi 10f490: 56 push %esi 10f491: 53 push %ebx 10f492: 83 ec 0c sub $0xc,%esp 10f495: 8b 45 08 mov 0x8(%ebp),%eax 10f498: 8b 5d 0c mov 0xc(%ebp),%ebx /* * Check for fatal errors. A NULL directory show a problem in the * the IMFS code. */ assert( directory ); 10f49b: 85 c0 test %eax,%eax 10f49d: 74 67 je 10f506 <== ALWAYS TAKEN if ( !name ) 10f49f: 85 db test %ebx,%ebx 10f4a1: 74 2d je 10f4d0 <== ALWAYS TAKEN /* * Check for "." and ".." */ if ( !strcmp( name, dotname ) ) 10f4a3: bf 30 11 12 00 mov $0x121130,%edi 10f4a8: b9 02 00 00 00 mov $0x2,%ecx 10f4ad: 89 de mov %ebx,%esi 10f4af: f3 a6 repz cmpsb %es:(%edi),%ds:(%esi) 10f4b1: 74 13 je 10f4c6 <== ALWAYS TAKEN return directory; if ( !strcmp( name, dotdotname ) ) 10f4b3: bf 32 11 12 00 mov $0x121132,%edi 10f4b8: b9 03 00 00 00 mov $0x3,%ecx 10f4bd: 89 de mov %ebx,%esi 10f4bf: f3 a6 repz cmpsb %es:(%edi),%ds:(%esi) 10f4c1: 75 19 jne 10f4dc <== NEVER TAKEN return directory->Parent; 10f4c3: 8b 40 08 mov 0x8(%eax),%eax <== NOT EXECUTED if ( !strcmp( name, the_jnode->name ) ) return the_jnode; } return 0; } 10f4c6: 8d 65 f4 lea -0xc(%ebp),%esp 10f4c9: 5b pop %ebx 10f4ca: 5e pop %esi 10f4cb: 5f pop %edi 10f4cc: c9 leave 10f4cd: c3 ret 10f4ce: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( !strcmp( name, dotdotname ) ) return directory->Parent; the_chain = &directory->info.directory.Entries; for ( the_node = the_chain->first; 10f4d0: 31 c0 xor %eax,%eax if ( !strcmp( name, the_jnode->name ) ) return the_jnode; } return 0; } 10f4d2: 8d 65 f4 lea -0xc(%ebp),%esp 10f4d5: 5b pop %ebx 10f4d6: 5e pop %esi 10f4d7: 5f pop %edi 10f4d8: c9 leave 10f4d9: c3 ret 10f4da: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( !strcmp( name, dotdotname ) ) return directory->Parent; the_chain = &directory->info.directory.Entries; for ( the_node = the_chain->first; 10f4dc: 8b 70 50 mov 0x50(%eax),%esi */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10f4df: 8d 78 54 lea 0x54(%eax),%edi 10f4e2: 39 fe cmp %edi,%esi 10f4e4: 75 08 jne 10f4ee 10f4e6: eb e8 jmp 10f4d0 <== ALWAYS TAKEN !rtems_chain_is_tail( the_chain, the_node ); the_node = the_node->next ) { 10f4e8: 8b 36 mov (%esi),%esi if ( !strcmp( name, dotdotname ) ) return directory->Parent; the_chain = &directory->info.directory.Entries; for ( the_node = the_chain->first; 10f4ea: 39 fe cmp %edi,%esi 10f4ec: 74 e2 je 10f4d0 !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 ) ) 10f4ee: 8d 46 0c lea 0xc(%esi),%eax 10f4f1: 83 ec 08 sub $0x8,%esp 10f4f4: 50 push %eax 10f4f5: 53 push %ebx 10f4f6: e8 ad 4d 00 00 call 1142a8 10f4fb: 83 c4 10 add $0x10,%esp 10f4fe: 85 c0 test %eax,%eax 10f500: 75 e6 jne 10f4e8 10f502: 89 f0 mov %esi,%eax 10f504: eb c0 jmp 10f4c6 <== ALWAYS TAKEN /* * Check for fatal errors. A NULL directory show a problem in the * the IMFS code. */ assert( directory ); 10f506: 68 d8 10 12 00 push $0x1210d8 <== NOT EXECUTED 10f50b: 68 35 11 12 00 push $0x121135 <== NOT EXECUTED 10f510: 6a 2a push $0x2a <== NOT EXECUTED 10f512: 68 e4 10 12 00 push $0x1210e4 <== NOT EXECUTED 10f517: e8 6c 87 ff ff call 107c88 <__assert_func> <== NOT EXECUTED 00114250 : ((IMFS_jnode_t *)( rtems_chain_head( jnode_get_control( jnode ) )->next)) int IMFS_fsunmount( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { 114250: 55 push %ebp 114251: 89 e5 mov %esp,%ebp 114253: 57 push %edi 114254: 56 push %esi 114255: 53 push %ebx 114256: 83 ec 3c sub $0x3c,%esp 114259: 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; 11425c: 8b 58 1c mov 0x1c(%eax),%ebx loc = temp_mt_entry->mt_fs_root; 11425f: 8d 55 d4 lea -0x2c(%ebp),%edx 114262: 89 55 c4 mov %edx,-0x3c(%ebp) 114265: 8d 70 1c lea 0x1c(%eax),%esi 114268: b9 05 00 00 00 mov $0x5,%ecx 11426d: 89 d7 mov %edx,%edi 11426f: 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; 114271: c7 40 1c 00 00 00 00 movl $0x0,0x1c(%eax) do { next = jnode->Parent; 114278: 8b 73 08 mov 0x8(%ebx),%esi loc.node_access = (void *)jnode; 11427b: 89 5d d4 mov %ebx,-0x2c(%ebp) IMFS_Set_handlers( &loc ); 11427e: 83 ec 0c sub $0xc,%esp 114281: 8d 45 d4 lea -0x2c(%ebp),%eax 114284: 50 push %eax 114285: e8 12 f6 ff ff call 11389c <== ALWAYS TAKEN if ( jnode->type != IMFS_DIRECTORY ) { 11428a: 83 c4 10 add $0x10,%esp 11428d: 83 7b 4c 01 cmpl $0x1,0x4c(%ebx) 114291: 75 2d jne 1142c0 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 114293: 8d 43 54 lea 0x54(%ebx),%eax 114296: 39 43 50 cmp %eax,0x50(%ebx) 114299: 74 3e je 1142d9 result = IMFS_unlink( NULL, &loc ); if (result != 0) return -1; jnode = next; } if ( jnode != NULL ) { 11429b: 85 db test %ebx,%ebx 11429d: 74 15 je 1142b4 if ( jnode->type == IMFS_DIRECTORY ) { 11429f: 83 7b 4c 01 cmpl $0x1,0x4c(%ebx) 1142a3: 75 d3 jne 114278 <== ALWAYS TAKEN 1142a5: 8d 43 54 lea 0x54(%ebx),%eax 1142a8: 39 43 50 cmp %eax,0x50(%ebx) 1142ab: 74 cb je 114278 if ( jnode_has_children( jnode ) ) jnode = jnode_get_first_child( jnode ); 1142ad: 8b 5b 50 mov 0x50(%ebx),%ebx } } } while (jnode != NULL); 1142b0: 85 db test %ebx,%ebx 1142b2: 75 c4 jne 114278 <== NEVER TAKEN 1142b4: 31 c0 xor %eax,%eax return 0; } 1142b6: 8d 65 f4 lea -0xc(%ebp),%esp 1142b9: 5b pop %ebx 1142ba: 5e pop %esi 1142bb: 5f pop %edi 1142bc: c9 leave 1142bd: c3 ret 1142be: 66 90 xchg %ax,%ax <== NOT EXECUTED next = jnode->Parent; loc.node_access = (void *)jnode; IMFS_Set_handlers( &loc ); if ( jnode->type != IMFS_DIRECTORY ) { result = IMFS_unlink( NULL, &loc ); 1142c0: 83 ec 08 sub $0x8,%esp 1142c3: 8d 55 d4 lea -0x2c(%ebp),%edx 1142c6: 52 push %edx if (result != 0) return -1; jnode = next; } else if ( jnode_has_no_children( jnode ) ) { result = IMFS_unlink( NULL, &loc ); 1142c7: 6a 00 push $0x0 1142c9: e8 be 4a ff ff call 108d8c if (result != 0) 1142ce: 83 c4 10 add $0x10,%esp 1142d1: 85 c0 test %eax,%eax 1142d3: 75 0d jne 1142e2 <== ALWAYS TAKEN 1142d5: 89 f3 mov %esi,%ebx 1142d7: eb c2 jmp 11429b <== ALWAYS TAKEN result = IMFS_unlink( NULL, &loc ); if (result != 0) return -1; jnode = next; } else if ( jnode_has_no_children( jnode ) ) { result = IMFS_unlink( NULL, &loc ); 1142d9: 83 ec 08 sub $0x8,%esp 1142dc: 8d 45 d4 lea -0x2c(%ebp),%eax 1142df: 50 push %eax 1142e0: eb e5 jmp 1142c7 <== ALWAYS TAKEN if ( jnode->type == IMFS_DIRECTORY ) { if ( jnode_has_children( jnode ) ) jnode = jnode_get_first_child( jnode ); } } } while (jnode != NULL); 1142e2: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 1142e5: eb cf jmp 1142b6 <== NOT EXECUTED 0010f51c : const char *path, int pathlen, char *token, int *token_len ) { 10f51c: 55 push %ebp 10f51d: 89 e5 mov %esp,%ebp 10f51f: 57 push %edi 10f520: 56 push %esi 10f521: 53 push %ebx 10f522: 8b 75 08 mov 0x8(%ebp),%esi 10f525: 8b 7d 0c mov 0xc(%ebp),%edi 10f528: 8b 45 10 mov 0x10(%ebp),%eax 10f52b: 8b 5d 14 mov 0x14(%ebp),%ebx register char c; /* * Copy a name into token. (Remember NULL is a token.) */ c = path[i]; 10f52e: 8a 16 mov (%esi),%dl while ( (!IMFS_is_separator(c)) && (i < pathlen) && (i <= IMFS_NAME_MAX) ) { 10f530: 80 fa 2f cmp $0x2f,%dl 10f533: 0f 84 94 00 00 00 je 10f5cd 10f539: 80 fa 5c cmp $0x5c,%dl 10f53c: 0f 84 8b 00 00 00 je 10f5cd 10f542: 84 d2 test %dl,%dl 10f544: 0f 84 94 00 00 00 je 10f5de 10f54a: 85 ff test %edi,%edi 10f54c: 7e 7f jle 10f5cd <== ALWAYS TAKEN token[i] = c; 10f54e: 88 10 mov %dl,(%eax) 10f550: 31 d2 xor %edx,%edx 10f552: 66 90 xchg %ax,%ax return IMFS_INVALID_TOKEN; if ( !IMFS_is_valid_name_char(c) ) type = IMFS_INVALID_TOKEN; c = path [++i]; 10f554: 42 inc %edx 10f555: 8a 0c 16 mov (%esi,%edx,1),%cl /* * Copy a name into token. (Remember NULL is a token.) */ c = path[i]; while ( (!IMFS_is_separator(c)) && (i < pathlen) && (i <= IMFS_NAME_MAX) ) { 10f558: 80 f9 2f cmp $0x2f,%cl 10f55b: 74 1f je 10f57c 10f55d: 80 f9 5c cmp $0x5c,%cl 10f560: 74 1a je 10f57c 10f562: 84 c9 test %cl,%cl 10f564: 74 16 je 10f57c 10f566: 39 d7 cmp %edx,%edi 10f568: 7e 12 jle 10f57c token[i] = c; 10f56a: 88 0c 10 mov %cl,(%eax,%edx,1) if ( i == IMFS_NAME_MAX ) 10f56d: 83 fa 20 cmp $0x20,%edx 10f570: 75 e2 jne 10f554 10f572: b8 04 00 00 00 mov $0x4,%eax else if ( strcmp( token, "." ) == 0 ) type = IMFS_CURRENT_DIR; } return type; } 10f577: 5b pop %ebx 10f578: 5e pop %esi 10f579: 5f pop %edi 10f57a: c9 leave 10f57b: c3 ret i++; type = IMFS_CURRENT_DIR; } else { type = IMFS_NO_MORE_PATH; } } else if (token[ i-1 ] != '\0') { 10f57c: 80 7c 10 ff 00 cmpb $0x0,-0x1(%eax,%edx,1) 10f581: 74 04 je 10f587 <== ALWAYS TAKEN token[i] = '\0'; 10f583: c6 04 10 00 movb $0x0,(%eax,%edx,1) /* * Set token_len to the number of characters copied. */ *token_len = i; 10f587: 89 13 mov %edx,(%ebx) * If we copied something that was not a seperator see if * it was a special name. */ if ( type == IMFS_NAME ) { if ( strcmp( token, "..") == 0 ) 10f589: bf 4c 11 12 00 mov $0x12114c,%edi 10f58e: b9 03 00 00 00 mov $0x3,%ecx 10f593: 89 c6 mov %eax,%esi 10f595: f3 a6 repz cmpsb %es:(%edi),%ds:(%esi) 10f597: 75 0b jne 10f5a4 10f599: b8 02 00 00 00 mov $0x2,%eax else if ( strcmp( token, "." ) == 0 ) type = IMFS_CURRENT_DIR; } return type; } 10f59e: 5b pop %ebx 10f59f: 5e pop %esi 10f5a0: 5f pop %edi 10f5a1: c9 leave 10f5a2: c3 ret 10f5a3: 90 nop <== NOT EXECUTED */ if ( type == IMFS_NAME ) { if ( strcmp( token, "..") == 0 ) type = IMFS_UP_DIR; else if ( strcmp( token, "." ) == 0 ) 10f5a4: bf 4d 11 12 00 mov $0x12114d,%edi 10f5a9: b9 02 00 00 00 mov $0x2,%ecx 10f5ae: 89 c6 mov %eax,%esi 10f5b0: f3 a6 repz cmpsb %es:(%edi),%ds:(%esi) 10f5b2: 0f 97 c0 seta %al 10f5b5: 0f 92 c2 setb %dl 10f5b8: 28 d0 sub %dl,%al 10f5ba: 0f be c0 movsbl %al,%eax 10f5bd: 83 f8 01 cmp $0x1,%eax 10f5c0: 19 c0 sbb %eax,%eax 10f5c2: 83 e0 fe and $0xfffffffe,%eax 10f5c5: 83 c0 03 add $0x3,%eax type = IMFS_CURRENT_DIR; } return type; } 10f5c8: 5b pop %ebx 10f5c9: 5e pop %esi 10f5ca: 5f pop %edi 10f5cb: c9 leave 10f5cc: c3 ret /* * Copy a seperator into token. */ if ( i == 0 ) { token[i] = c; 10f5cd: 88 10 mov %dl,(%eax) i++; type = IMFS_CURRENT_DIR; } else { type = IMFS_NO_MORE_PATH; } } else if (token[ i-1 ] != '\0') { 10f5cf: 83 ff 01 cmp $0x1,%edi 10f5d2: 19 c0 sbb %eax,%eax 10f5d4: 40 inc %eax 10f5d5: 89 c2 mov %eax,%edx /* * Set token_len to the number of characters copied. */ *token_len = i; 10f5d7: 89 13 mov %edx,(%ebx) else if ( strcmp( token, "." ) == 0 ) type = IMFS_CURRENT_DIR; } return type; } 10f5d9: 5b pop %ebx 10f5da: 5e pop %esi 10f5db: 5f pop %edi 10f5dc: c9 leave 10f5dd: c3 ret /* * Copy a seperator into token. */ if ( i == 0 ) { token[i] = c; 10f5de: c6 00 00 movb $0x0,(%eax) 10f5e1: 31 c0 xor %eax,%eax 10f5e3: 31 d2 xor %edx,%edx /* * Set token_len to the number of characters copied. */ *token_len = i; 10f5e5: 89 13 mov %edx,(%ebx) 10f5e7: eb f0 jmp 10f5d9 <== ALWAYS TAKEN 001089a4 : */ int IMFS_initialize( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { 1089a4: 55 push %ebp 1089a5: 89 e5 mov %esp,%ebp 1089a7: 83 ec 08 sub $0x8,%esp return IMFS_initialize_support( 1089aa: 68 80 65 12 00 push $0x126580 1089af: 68 00 66 12 00 push $0x126600 1089b4: 68 e0 5e 12 00 push $0x125ee0 1089b9: ff 75 08 pushl 0x8(%ebp) 1089bc: e8 03 00 00 00 call 1089c4 <== ALWAYS TAKEN temp_mt_entry, &IMFS_ops, &IMFS_memfile_handlers, &IMFS_directory_handlers ); } 1089c1: c9 leave 1089c2: c3 ret 0010f5ec : 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 ) { 10f5ec: 55 push %ebp 10f5ed: 89 e5 mov %esp,%ebp 10f5ef: 57 push %edi 10f5f0: 56 push %esi 10f5f1: 53 push %ebx 10f5f2: 83 ec 0c sub $0xc,%esp 10f5f5: 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, 10f5f8: 8b 0d 50 31 12 00 mov 0x123150,%ecx int bit_mask; /* * check, whether requested bytes per block is valid */ for (bit_mask = 16; !is_valid && (bit_mask <= 512); bit_mask <<= 1) { 10f5fe: 83 f9 10 cmp $0x10,%ecx 10f601: 74 18 je 10f61b <== ALWAYS TAKEN 10f603: 31 d2 xor %edx,%edx 10f605: b8 20 00 00 00 mov $0x20,%eax 10f60a: 39 c1 cmp %eax,%ecx 10f60c: 74 0d je 10f61b 10f60e: d1 e0 shl %eax 10f610: 42 inc %edx 10f611: 83 fa 05 cmp $0x5,%edx 10f614: 75 f4 jne 10f60a <== NEVER TAKEN 10f616: b9 80 00 00 00 mov $0x80,%ecx <== NOT EXECUTED if (bit_mask == requested_bytes_per_block) { is_valid = true; } } *dest_bytes_per_block = ((is_valid) 10f61b: 89 0d 08 70 12 00 mov %ecx,0x127008 /* * 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(); 10f621: e8 86 2a 00 00 call 1120ac 10f626: 89 43 1c mov %eax,0x1c(%ebx) temp_mt_entry->mt_fs_root.handlers = directory_handlers; 10f629: 8b 45 14 mov 0x14(%ebp),%eax 10f62c: 89 43 24 mov %eax,0x24(%ebx) temp_mt_entry->mt_fs_root.ops = op_table; 10f62f: 8b 45 0c mov 0xc(%ebp),%eax 10f632: 89 43 28 mov %eax,0x28(%ebx) temp_mt_entry->pathconf_limits_and_options = IMFS_LIMITS_AND_OPTIONS; 10f635: 8d 7b 38 lea 0x38(%ebx),%edi 10f638: be c0 14 12 00 mov $0x1214c0,%esi 10f63d: b9 0c 00 00 00 mov $0xc,%ecx 10f642: f3 a5 rep movsl %ds:(%esi),%es:(%edi) /* * Create custom file system data. */ fs_info = calloc( 1, sizeof( IMFS_fs_info_t ) ); 10f644: 83 ec 08 sub $0x8,%esp 10f647: 6a 0c push $0xc 10f649: 6a 01 push $0x1 10f64b: e8 6c 02 00 00 call 10f8bc <== ALWAYS TAKEN if ( !fs_info ) { 10f650: 83 c4 10 add $0x10,%esp 10f653: 85 c0 test %eax,%eax 10f655: 74 2e je 10f685 <== ALWAYS TAKEN free(temp_mt_entry->mt_fs_root.node_access); rtems_set_errno_and_return_minus_one(ENOMEM); } temp_mt_entry->fs_info = fs_info; 10f657: 89 43 34 mov %eax,0x34(%ebx) /* * Set st_ino for the root to 1. */ fs_info->ino_count = 1; 10f65a: c7 00 01 00 00 00 movl $0x1,(%eax) fs_info->memfile_handlers = memfile_handlers; 10f660: 8b 55 10 mov 0x10(%ebp),%edx 10f663: 89 50 04 mov %edx,0x4(%eax) fs_info->directory_handlers = directory_handlers; 10f666: 8b 55 14 mov 0x14(%ebp),%edx 10f669: 89 50 08 mov %edx,0x8(%eax) jnode = temp_mt_entry->mt_fs_root.node_access; jnode->st_ino = fs_info->ino_count; 10f66c: 8b 43 1c mov 0x1c(%ebx),%eax 10f66f: c7 40 38 01 00 00 00 movl $0x1,0x38(%eax) /* Initialize POSIX FIFO/pipe module */ rtems_pipe_initialize(); 10f676: e8 11 20 00 00 call 11168c 10f67b: 31 c0 xor %eax,%eax return 0; } 10f67d: 8d 65 f4 lea -0xc(%ebp),%esp 10f680: 5b pop %ebx 10f681: 5e pop %esi 10f682: 5f pop %edi 10f683: c9 leave 10f684: c3 ret /* * Create custom file system data. */ fs_info = calloc( 1, sizeof( IMFS_fs_info_t ) ); if ( !fs_info ) { free(temp_mt_entry->mt_fs_root.node_access); 10f685: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10f688: ff 73 1c pushl 0x1c(%ebx) <== NOT EXECUTED 10f68b: e8 4c 89 ff ff call 107fdc <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOMEM); 10f690: e8 7b 41 00 00 call 113810 <__errno> <== NOT EXECUTED 10f695: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED 10f69b: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 10f6a0: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10f6a3: eb d8 jmp 10f67d <== NOT EXECUTED 00108a80 : int IMFS_link( rtems_filesystem_location_info_t *to_loc, /* IN */ rtems_filesystem_location_info_t *parent_loc, /* IN */ const char *token /* IN */ ) { 108a80: 55 push %ebp 108a81: 89 e5 mov %esp,%ebp 108a83: 57 push %edi 108a84: 53 push %ebx 108a85: 83 ec 50 sub $0x50,%esp 108a88: 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; 108a8b: 8b 45 08 mov 0x8(%ebp),%eax 108a8e: 8b 00 mov (%eax),%eax 108a90: 89 45 d8 mov %eax,-0x28(%ebp) if ( info.hard_link.link_node->st_nlink >= LINK_MAX ) 108a93: 66 83 78 34 07 cmpw $0x7,0x34(%eax) 108a98: 77 66 ja 108b00 rtems_set_errno_and_return_minus_one( EMLINK ); /* * Remove any separators at the end of the string. */ IMFS_get_token( token, strlen( token ), new_name, &i ); 108a9a: 31 c0 xor %eax,%eax 108a9c: b9 ff ff ff ff mov $0xffffffff,%ecx 108aa1: 89 d7 mov %edx,%edi 108aa3: f2 ae repnz scas %es:(%edi),%al 108aa5: f7 d1 not %ecx 108aa7: 49 dec %ecx 108aa8: 8d 45 f4 lea -0xc(%ebp),%eax 108aab: 50 push %eax 108aac: 8d 5d b7 lea -0x49(%ebp),%ebx 108aaf: 53 push %ebx 108ab0: 51 push %ecx 108ab1: 52 push %edx 108ab2: e8 c1 b8 00 00 call 114378 * 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( 108ab7: 8d 45 d8 lea -0x28(%ebp),%eax 108aba: 89 04 24 mov %eax,(%esp) 108abd: 68 ff a1 00 00 push $0xa1ff 108ac2: 53 push %ebx 108ac3: 6a 03 push $0x3 108ac5: ff 75 0c pushl 0xc(%ebp) 108ac8: e8 c3 ac 00 00 call 113790 new_name, ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if ( !new_node ) 108acd: 83 c4 20 add $0x20,%esp 108ad0: 85 c0 test %eax,%eax 108ad2: 74 3e je 108b12 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOMEM ); /* * Increment the link count of the node being pointed to. */ info.hard_link.link_node->st_nlink++; 108ad4: 8b 45 d8 mov -0x28(%ebp),%eax 108ad7: 66 ff 40 34 incw 0x34(%eax) IMFS_update_ctime( info.hard_link.link_node ); 108adb: 83 ec 08 sub $0x8,%esp 108ade: 6a 00 push $0x0 108ae0: 8d 45 ec lea -0x14(%ebp),%eax 108ae3: 50 push %eax 108ae4: e8 ff 08 00 00 call 1093e8 108ae9: 8b 55 ec mov -0x14(%ebp),%edx 108aec: 8b 45 d8 mov -0x28(%ebp),%eax 108aef: 89 50 48 mov %edx,0x48(%eax) 108af2: 31 c0 xor %eax,%eax return 0; 108af4: 83 c4 10 add $0x10,%esp } 108af7: 8d 65 f8 lea -0x8(%ebp),%esp 108afa: 5b pop %ebx 108afb: 5f pop %edi 108afc: c9 leave 108afd: c3 ret 108afe: 66 90 xchg %ax,%ax <== NOT EXECUTED /* * Verify this node can be linked to. */ info.hard_link.link_node = to_loc->node_access; if ( info.hard_link.link_node->st_nlink >= LINK_MAX ) rtems_set_errno_and_return_minus_one( EMLINK ); 108b00: e8 b3 fe 00 00 call 1189b8 <__errno> 108b05: c7 00 1f 00 00 00 movl $0x1f,(%eax) 108b0b: b8 ff ff ff ff mov $0xffffffff,%eax 108b10: eb e5 jmp 108af7 <== ALWAYS TAKEN ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if ( !new_node ) rtems_set_errno_and_return_minus_one( ENOMEM ); 108b12: e8 a1 fe 00 00 call 1189b8 <__errno> <== NOT EXECUTED 108b17: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED 108b1d: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 108b22: eb d3 jmp 108af7 <== NOT EXECUTED 00116cc4 : MEMFILE_STATIC int IMFS_memfile_addblock( IMFS_jnode_t *the_jnode, unsigned int block ) { 116cc4: 55 push %ebp 116cc5: 89 e5 mov %esp,%ebp 116cc7: 53 push %ebx 116cc8: 83 ec 04 sub $0x4,%esp 116ccb: 8b 45 08 mov 0x8(%ebp),%eax block_p memory; block_p *block_entry_ptr; assert( the_jnode ); 116cce: 85 c0 test %eax,%eax 116cd0: 74 50 je 116d22 <== ALWAYS TAKEN if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 116cd2: 83 78 4c 05 cmpl $0x5,0x4c(%eax) 116cd6: 75 31 jne 116d09 <== ALWAYS TAKEN 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 ); 116cd8: 52 push %edx 116cd9: 6a 01 push $0x1 116cdb: ff 75 0c pushl 0xc(%ebp) 116cde: 50 push %eax 116cdf: e8 b8 fa ff ff call 11679c <== ALWAYS TAKEN 116ce4: 89 c3 mov %eax,%ebx if ( *block_entry_ptr ) 116ce6: 83 c4 10 add $0x10,%esp 116ce9: 8b 00 mov (%eax),%eax 116ceb: 85 c0 test %eax,%eax 116ced: 74 09 je 116cf8 #endif memory = memfile_alloc_block(); if ( !memory ) return 1; *block_entry_ptr = memory; 116cef: 31 c0 xor %eax,%eax return 0; } 116cf1: 8b 5d fc mov -0x4(%ebp),%ebx 116cf4: c9 leave 116cf5: c3 ret 116cf6: 66 90 xchg %ax,%ax <== NOT EXECUTED #if 0 fprintf(stdout, "%d %p", block, block_entry_ptr ); fflush(stdout); #endif memory = memfile_alloc_block(); 116cf8: e8 7b fa ff ff call 116778 <== ALWAYS TAKEN if ( !memory ) 116cfd: 85 c0 test %eax,%eax 116cff: 74 04 je 116d05 <== ALWAYS TAKEN return 1; *block_entry_ptr = memory; 116d01: 89 03 mov %eax,(%ebx) 116d03: eb ea jmp 116cef <== ALWAYS TAKEN fprintf(stdout, "%d %p", block, block_entry_ptr ); fflush(stdout); #endif memory = memfile_alloc_block(); if ( !memory ) 116d05: b0 01 mov $0x1,%al <== NOT EXECUTED 116d07: eb e8 jmp 116cf1 <== NOT EXECUTED assert( the_jnode ); if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 116d09: 68 3c 69 12 00 push $0x12693c <== NOT EXECUTED 116d0e: 68 3b 6a 12 00 push $0x126a3b <== NOT EXECUTED 116d13: 68 6d 01 00 00 push $0x16d <== NOT EXECUTED 116d18: 68 f4 68 12 00 push $0x1268f4 <== NOT EXECUTED 116d1d: e8 ba 22 ff ff call 108fdc <__assert_func> <== NOT EXECUTED ) { block_p memory; block_p *block_entry_ptr; assert( the_jnode ); 116d22: 68 c8 68 12 00 push $0x1268c8 <== NOT EXECUTED 116d27: 68 3b 6a 12 00 push $0x126a3b <== NOT EXECUTED 116d2c: 68 69 01 00 00 push $0x169 <== NOT EXECUTED 116d31: 68 f4 68 12 00 push $0x1268f4 <== NOT EXECUTED 116d36: e8 a1 22 ff ff call 108fdc <__assert_func> <== NOT EXECUTED 00116d3c : MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, off_t new_length ) { 116d3c: 55 push %ebp 116d3d: 89 e5 mov %esp,%ebp 116d3f: 57 push %edi 116d40: 56 push %esi 116d41: 53 push %ebx 116d42: 83 ec 1c sub $0x1c,%esp 116d45: 8b 5d 08 mov 0x8(%ebp),%ebx /* * Perform internal consistency checks */ assert( the_jnode ); 116d48: 85 db test %ebx,%ebx 116d4a: 0f 84 03 01 00 00 je 116e53 <== ALWAYS TAKEN if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 116d50: 83 7b 4c 05 cmpl $0x5,0x4c(%ebx) 116d54: 0f 85 e0 00 00 00 jne 116e3a <== ALWAYS TAKEN if ( the_jnode->type != IMFS_MEMORY_FILE ) rtems_set_errno_and_return_minus_one( EIO ); if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) 116d5a: 8b 0d 70 c6 12 00 mov 0x12c670,%ecx 116d60: 89 ce mov %ecx,%esi 116d62: c1 ee 02 shr $0x2,%esi 116d65: 8d 56 01 lea 0x1(%esi),%edx 116d68: 0f af d6 imul %esi,%edx 116d6b: 42 inc %edx 116d6c: 0f af d6 imul %esi,%edx 116d6f: 4a dec %edx 116d70: 0f af d1 imul %ecx,%edx 116d73: 39 55 0c cmp %edx,0xc(%ebp) 116d76: 0f 83 ac 00 00 00 jae 116e28 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); if ( new_length <= the_jnode->info.file.size ) 116d7c: 8b 45 0c mov 0xc(%ebp),%eax 116d7f: 99 cltd 116d80: 89 45 d8 mov %eax,-0x28(%ebp) 116d83: 89 55 dc mov %edx,-0x24(%ebp) 116d86: 8b 73 50 mov 0x50(%ebx),%esi 116d89: 8b 7b 54 mov 0x54(%ebx),%edi 116d8c: 89 75 e0 mov %esi,-0x20(%ebp) 116d8f: 89 7d e4 mov %edi,-0x1c(%ebp) 116d92: 39 fa cmp %edi,%edx 116d94: 7e 72 jle 116e08 <== NEVER TAKEN /* * Calculate the number of range of blocks to allocate */ new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK; 116d96: 8b 45 0c mov 0xc(%ebp),%eax 116d99: 99 cltd 116d9a: f7 f9 idiv %ecx 116d9c: 89 c6 mov %eax,%esi old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; 116d9e: 89 c8 mov %ecx,%eax 116da0: 99 cltd 116da1: 52 push %edx 116da2: 51 push %ecx 116da3: ff 75 e4 pushl -0x1c(%ebp) 116da6: ff 75 e0 pushl -0x20(%ebp) 116da9: e8 9e cb 00 00 call 12394c <__divdi3> 116dae: 83 c4 10 add $0x10,%esp 116db1: 89 45 e0 mov %eax,-0x20(%ebp) /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { 116db4: 39 c6 cmp %eax,%esi 116db6: 72 60 jb 116e18 <== ALWAYS TAKEN 116db8: 89 c7 mov %eax,%edi 116dba: eb 05 jmp 116dc1 <== ALWAYS TAKEN 116dbc: 47 inc %edi 116dbd: 39 fe cmp %edi,%esi 116dbf: 72 57 jb 116e18 if ( IMFS_memfile_addblock( the_jnode, block ) ) { 116dc1: 83 ec 08 sub $0x8,%esp 116dc4: 57 push %edi 116dc5: 53 push %ebx 116dc6: e8 f9 fe ff ff call 116cc4 <== ALWAYS TAKEN 116dcb: 83 c4 10 add $0x10,%esp 116dce: 85 c0 test %eax,%eax 116dd0: 74 ea je 116dbc <== NEVER TAKEN for ( ; block>=old_blocks ; block-- ) { 116dd2: 39 7d e0 cmp %edi,-0x20(%ebp) <== NOT EXECUTED 116dd5: 77 17 ja 116dee <== NOT EXECUTED 116dd7: 8b 75 e0 mov -0x20(%ebp),%esi <== NOT EXECUTED 116dda: 66 90 xchg %ax,%ax <== NOT EXECUTED IMFS_memfile_remove_block( the_jnode, block ); 116ddc: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 116ddf: 57 push %edi <== NOT EXECUTED 116de0: 53 push %ebx <== NOT EXECUTED 116de1: e8 12 fc ff ff call 1169f8 <== 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-- ) { 116de6: 4f dec %edi <== NOT EXECUTED 116de7: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 116dea: 39 fe cmp %edi,%esi <== NOT EXECUTED 116dec: 76 ee jbe 116ddc <== NOT EXECUTED IMFS_memfile_remove_block( the_jnode, block ); } rtems_set_errno_and_return_minus_one( ENOSPC ); 116dee: e8 c5 1b 00 00 call 1189b8 <__errno> <== NOT EXECUTED 116df3: c7 00 1c 00 00 00 movl $0x1c,(%eax) <== NOT EXECUTED 116df9: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED * Set the new length of the file. */ the_jnode->info.file.size = new_length; return 0; } 116dfe: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 116e01: 5b pop %ebx <== NOT EXECUTED 116e02: 5e pop %esi <== NOT EXECUTED 116e03: 5f pop %edi <== NOT EXECUTED 116e04: c9 leave <== NOT EXECUTED 116e05: c3 ret <== NOT EXECUTED 116e06: 66 90 xchg %ax,%ax <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EIO ); if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( new_length <= the_jnode->info.file.size ) 116e08: 7c 04 jl 116e0e <== ALWAYS TAKEN 116e0a: 39 f0 cmp %esi,%eax 116e0c: 77 88 ja 116d96 /* * Set the new length of the file. */ the_jnode->info.file.size = new_length; 116e0e: 31 c0 xor %eax,%eax return 0; } 116e10: 8d 65 f4 lea -0xc(%ebp),%esp 116e13: 5b pop %ebx 116e14: 5e pop %esi 116e15: 5f pop %edi 116e16: c9 leave 116e17: c3 ret /* * Set the new length of the file. */ the_jnode->info.file.size = new_length; 116e18: 8b 75 d8 mov -0x28(%ebp),%esi 116e1b: 8b 7d dc mov -0x24(%ebp),%edi 116e1e: 89 73 50 mov %esi,0x50(%ebx) 116e21: 89 7b 54 mov %edi,0x54(%ebx) 116e24: 31 c0 xor %eax,%eax 116e26: eb e8 jmp 116e10 <== ALWAYS TAKEN assert( the_jnode->type == IMFS_MEMORY_FILE ); if ( the_jnode->type != IMFS_MEMORY_FILE ) rtems_set_errno_and_return_minus_one( EIO ); if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) rtems_set_errno_and_return_minus_one( EINVAL ); 116e28: e8 8b 1b 00 00 call 1189b8 <__errno> <== NOT EXECUTED 116e2d: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 116e33: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 116e38: eb c4 jmp 116dfe <== NOT EXECUTED assert( the_jnode ); if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 116e3a: 68 3c 69 12 00 push $0x12693c <== NOT EXECUTED 116e3f: 68 51 6a 12 00 push $0x126a51 <== NOT EXECUTED 116e44: 68 35 01 00 00 push $0x135 <== NOT EXECUTED 116e49: 68 f4 68 12 00 push $0x1268f4 <== NOT EXECUTED 116e4e: e8 89 21 ff ff call 108fdc <__assert_func> <== NOT EXECUTED /* * Perform internal consistency checks */ assert( the_jnode ); 116e53: 68 c8 68 12 00 push $0x1268c8 <== NOT EXECUTED 116e58: 68 51 6a 12 00 push $0x126a51 <== NOT EXECUTED 116e5d: 68 31 01 00 00 push $0x131 <== NOT EXECUTED 116e62: 68 f4 68 12 00 push $0x1268f4 <== NOT EXECUTED 116e67: e8 70 21 ff ff call 108fdc <__assert_func> <== NOT EXECUTED 0011679c : #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { 11679c: 55 push %ebp 11679d: 89 e5 mov %esp,%ebp 11679f: 57 push %edi 1167a0: 56 push %esi 1167a1: 53 push %ebx 1167a2: 83 ec 1c sub $0x1c,%esp 1167a5: 8b 5d 08 mov 0x8(%ebp),%ebx 1167a8: 8b 7d 0c mov 0xc(%ebp),%edi 1167ab: 8b 75 10 mov 0x10(%ebp),%esi /* * Perform internal consistency checks */ assert( the_jnode ); 1167ae: 85 db test %ebx,%ebx 1167b0: 0f 84 58 01 00 00 je 11690e <== ALWAYS TAKEN if ( !the_jnode ) return NULL; assert( the_jnode->type == IMFS_MEMORY_FILE ); 1167b6: 83 7b 4c 05 cmpl $0x5,0x4c(%ebx) 1167ba: 0f 85 67 01 00 00 jne 116927 <== ALWAYS TAKEN /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { 1167c0: 8b 0d 70 c6 12 00 mov 0x12c670,%ecx 1167c6: c1 e9 02 shr $0x2,%ecx 1167c9: 8d 41 ff lea -0x1(%ecx),%eax 1167cc: 39 c7 cmp %eax,%edi 1167ce: 76 44 jbe 116814 <== NEVER TAKEN /* * Is the block number in the doubly indirect portion? */ if ( my_block <= LAST_DOUBLY_INDIRECT ) { 1167d0: 8d 41 01 lea 0x1(%ecx),%eax <== NOT EXECUTED 1167d3: 0f af c1 imul %ecx,%eax <== NOT EXECUTED 1167d6: 8d 50 ff lea -0x1(%eax),%edx <== NOT EXECUTED 1167d9: 39 d7 cmp %edx,%edi <== NOT EXECUTED 1167db: 77 57 ja 116834 <== NOT EXECUTED #if 0 fprintf(stdout, "(d %d) ", block ); fflush(stdout); #endif my_block -= FIRST_DOUBLY_INDIRECT; 1167dd: 89 f8 mov %edi,%eax <== NOT EXECUTED 1167df: 29 c8 sub %ecx,%eax <== NOT EXECUTED singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 1167e1: 31 d2 xor %edx,%edx <== NOT EXECUTED 1167e3: f7 f1 div %ecx <== NOT EXECUTED 1167e5: 89 c1 mov %eax,%ecx <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; p = info->doubly_indirect; 1167e7: 8b 43 5c mov 0x5c(%ebx),%eax <== NOT EXECUTED if ( malloc_it ) { 1167ea: 85 f6 test %esi,%esi <== NOT EXECUTED 1167ec: 0f 84 96 00 00 00 je 116888 <== NOT EXECUTED if ( !p ) { 1167f2: 85 c0 test %eax,%eax <== NOT EXECUTED 1167f4: 0f 84 dd 00 00 00 je 1168d7 <== NOT EXECUTED if ( !p ) return 0; info->doubly_indirect = p; } p1 = (block_p *)p[ doubly ]; 1167fa: 8d 1c 88 lea (%eax,%ecx,4),%ebx <== NOT EXECUTED 1167fd: 8b 03 mov (%ebx),%eax <== NOT EXECUTED if ( !p1 ) { 1167ff: 85 c0 test %eax,%eax <== NOT EXECUTED 116801: 0f 84 ba 00 00 00 je 1168c1 <== 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 ]; 116807: 8d 04 90 lea (%eax,%edx,4),%eax <== NOT EXECUTED /* * This means the requested block number is out of range. */ return 0; } 11680a: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 11680d: 5b pop %ebx <== NOT EXECUTED 11680e: 5e pop %esi <== NOT EXECUTED 11680f: 5f pop %edi <== NOT EXECUTED 116810: c9 leave <== NOT EXECUTED 116811: c3 ret <== NOT EXECUTED 116812: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( my_block <= LAST_INDIRECT ) { #if 0 fprintf(stdout, "(s %d) ", block ); fflush(stdout); #endif p = info->indirect; 116814: 8b 43 58 mov 0x58(%ebx),%eax if ( malloc_it ) { 116817: 85 f6 test %esi,%esi 116819: 0f 84 85 00 00 00 je 1168a4 if ( !p ) { 11681f: 85 c0 test %eax,%eax 116821: 0f 84 89 00 00 00 je 1168b0 p2 = memfile_alloc_block(); if ( !p2 ) return 0; p1[ doubly ] = (block_p) p2; } return (block_p *)&p2[ singly ]; 116827: 8d 04 b8 lea (%eax,%edi,4),%eax /* * This means the requested block number is out of range. */ return 0; } 11682a: 8d 65 f4 lea -0xc(%ebp),%esp 11682d: 5b pop %ebx 11682e: 5e pop %esi 11682f: 5f pop %edi 116830: c9 leave 116831: c3 ret 116832: 66 90 xchg %ax,%ax <== NOT EXECUTED #endif /* * Is the block number in the triply indirect portion? */ if ( my_block <= LAST_TRIPLY_INDIRECT ) { 116834: 8d 50 01 lea 0x1(%eax),%edx <== NOT EXECUTED 116837: 0f af d1 imul %ecx,%edx <== NOT EXECUTED 11683a: 4a dec %edx <== NOT EXECUTED 11683b: 39 d7 cmp %edx,%edi <== NOT EXECUTED 11683d: 77 59 ja 116898 <== NOT EXECUTED my_block -= FIRST_TRIPLY_INDIRECT; 11683f: 29 c7 sub %eax,%edi <== NOT EXECUTED 116841: 89 f8 mov %edi,%eax <== NOT EXECUTED singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 116843: 31 d2 xor %edx,%edx <== NOT EXECUTED 116845: f7 f1 div %ecx <== NOT EXECUTED 116847: 89 d7 mov %edx,%edi <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS; 116849: 31 d2 xor %edx,%edx <== NOT EXECUTED 11684b: f7 f1 div %ecx <== NOT EXECUTED 11684d: 89 c1 mov %eax,%ecx <== NOT EXECUTED doubly %= IMFS_MEMFILE_BLOCK_SLOTS; p = info->triply_indirect; 11684f: 8b 43 60 mov 0x60(%ebx),%eax <== NOT EXECUTED if ( malloc_it ) { 116852: 85 f6 test %esi,%esi <== NOT EXECUTED 116854: 0f 84 9a 00 00 00 je 1168f4 <== NOT EXECUTED if ( !p ) { 11685a: 85 c0 test %eax,%eax <== NOT EXECUTED 11685c: 0f 84 de 00 00 00 je 116940 <== NOT EXECUTED if ( !p ) return 0; info->triply_indirect = p; } p1 = (block_p *) p[ triply ]; 116862: 8d 1c 88 lea (%eax,%ecx,4),%ebx <== NOT EXECUTED 116865: 8b 03 mov (%ebx),%eax <== NOT EXECUTED if ( !p1 ) { 116867: 85 c0 test %eax,%eax <== NOT EXECUTED 116869: 0f 84 f2 00 00 00 je 116961 <== NOT EXECUTED if ( !p1 ) return 0; p[ triply ] = (block_p) p1; } p2 = (block_p *)p1[ doubly ]; 11686f: 8d 1c 90 lea (%eax,%edx,4),%ebx <== NOT EXECUTED 116872: 8b 03 mov (%ebx),%eax <== NOT EXECUTED if ( !p2 ) { 116874: 85 c0 test %eax,%eax <== NOT EXECUTED 116876: 75 af jne 116827 <== NOT EXECUTED p2 = memfile_alloc_block(); 116878: e8 fb fe ff ff call 116778 <== NOT EXECUTED if ( !p2 ) 11687d: 85 c0 test %eax,%eax <== NOT EXECUTED 11687f: 74 17 je 116898 <== NOT EXECUTED return 0; p1[ doubly ] = (block_p) p2; 116881: 89 03 mov %eax,(%ebx) <== NOT EXECUTED 116883: eb a2 jmp 116827 <== NOT EXECUTED 116885: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED } return (block_p *)&p1[ singly ]; } if ( !p ) 116888: 85 c0 test %eax,%eax <== NOT EXECUTED 11688a: 74 0c je 116898 <== NOT EXECUTED return 0; p = (block_p *)p[ doubly ]; 11688c: 8b 04 88 mov (%eax,%ecx,4),%eax <== NOT EXECUTED if ( !p ) 11688f: 85 c0 test %eax,%eax <== NOT EXECUTED 116891: 0f 85 70 ff ff ff jne 116807 <== NOT EXECUTED 116897: 90 nop <== NOT EXECUTED p2 = (block_p *)p1[ doubly ]; if ( !p ) return 0; return (block_p *)&p2[ singly ]; 116898: 31 c0 xor %eax,%eax <== NOT EXECUTED /* * This means the requested block number is out of range. */ return 0; } 11689a: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 11689d: 5b pop %ebx <== NOT EXECUTED 11689e: 5e pop %esi <== NOT EXECUTED 11689f: 5f pop %edi <== NOT EXECUTED 1168a0: c9 leave <== NOT EXECUTED 1168a1: c3 ret <== NOT EXECUTED 1168a2: 66 90 xchg %ax,%ax <== NOT EXECUTED info->indirect = p; } return &info->indirect[ my_block ]; } if ( !p ) 1168a4: 85 c0 test %eax,%eax 1168a6: 0f 85 7b ff ff ff jne 116827 <== NEVER TAKEN p2 = (block_p *)p1[ doubly ]; if ( !p ) return 0; return (block_p *)&p2[ singly ]; 1168ac: 31 c0 xor %eax,%eax <== NOT EXECUTED 1168ae: eb ea jmp 11689a <== NOT EXECUTED p = info->indirect; if ( malloc_it ) { if ( !p ) { p = memfile_alloc_block(); 1168b0: e8 c3 fe ff ff call 116778 <== ALWAYS TAKEN if ( !p ) 1168b5: 85 c0 test %eax,%eax 1168b7: 74 df je 116898 <== ALWAYS TAKEN return 0; info->indirect = p; 1168b9: 89 43 58 mov %eax,0x58(%ebx) 1168bc: e9 66 ff ff ff jmp 116827 <== ALWAYS TAKEN info->doubly_indirect = p; } p1 = (block_p *)p[ doubly ]; if ( !p1 ) { p1 = memfile_alloc_block(); 1168c1: 89 55 e4 mov %edx,-0x1c(%ebp) <== NOT EXECUTED 1168c4: e8 af fe ff ff call 116778 <== NOT EXECUTED if ( !p1 ) 1168c9: 85 c0 test %eax,%eax <== NOT EXECUTED 1168cb: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED 1168ce: 74 c8 je 116898 <== NOT EXECUTED return 0; p[ doubly ] = (block_p) p1; 1168d0: 89 03 mov %eax,(%ebx) <== NOT EXECUTED 1168d2: e9 30 ff ff ff jmp 116807 <== NOT EXECUTED p = info->doubly_indirect; if ( malloc_it ) { if ( !p ) { p = memfile_alloc_block(); 1168d7: 89 55 e4 mov %edx,-0x1c(%ebp) <== NOT EXECUTED 1168da: 89 4d e0 mov %ecx,-0x20(%ebp) <== NOT EXECUTED 1168dd: e8 96 fe ff ff call 116778 <== NOT EXECUTED if ( !p ) 1168e2: 85 c0 test %eax,%eax <== NOT EXECUTED 1168e4: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED 1168e7: 8b 4d e0 mov -0x20(%ebp),%ecx <== NOT EXECUTED 1168ea: 74 ac je 116898 <== NOT EXECUTED return 0; info->doubly_indirect = p; 1168ec: 89 43 5c mov %eax,0x5c(%ebx) <== NOT EXECUTED 1168ef: e9 06 ff ff ff jmp 1167fa <== NOT EXECUTED p1[ doubly ] = (block_p) p2; } return (block_p *)&p2[ singly ]; } if ( !p ) 1168f4: 85 c0 test %eax,%eax <== NOT EXECUTED 1168f6: 74 a0 je 116898 <== 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 ]; 1168f8: 8b 0c 88 mov (%eax,%ecx,4),%ecx <== NOT EXECUTED if ( !p1 ) 1168fb: 85 c9 test %ecx,%ecx <== NOT EXECUTED 1168fd: 74 99 je 116898 <== NOT EXECUTED p2 = (block_p *)p1[ doubly ]; if ( !p ) return 0; return (block_p *)&p2[ singly ]; 1168ff: 8d 04 bd 00 00 00 00 lea 0x0(,%edi,4),%eax <== NOT EXECUTED 116906: 03 04 91 add (%ecx,%edx,4),%eax <== NOT EXECUTED 116909: e9 fc fe ff ff jmp 11680a <== NOT EXECUTED /* * Perform internal consistency checks */ assert( the_jnode ); 11690e: 68 c8 68 12 00 push $0x1268c8 <== NOT EXECUTED 116913: 68 ac 69 12 00 push $0x1269ac <== NOT EXECUTED 116918: 68 88 03 00 00 push $0x388 <== NOT EXECUTED 11691d: 68 f4 68 12 00 push $0x1268f4 <== NOT EXECUTED 116922: e8 b5 26 ff ff call 108fdc <__assert_func> <== NOT EXECUTED if ( !the_jnode ) return NULL; assert( the_jnode->type == IMFS_MEMORY_FILE ); 116927: 68 3c 69 12 00 push $0x12693c <== NOT EXECUTED 11692c: 68 ac 69 12 00 push $0x1269ac <== NOT EXECUTED 116931: 68 8c 03 00 00 push $0x38c <== NOT EXECUTED 116936: 68 f4 68 12 00 push $0x1268f4 <== NOT EXECUTED 11693b: e8 9c 26 ff ff call 108fdc <__assert_func> <== NOT EXECUTED p = info->triply_indirect; if ( malloc_it ) { if ( !p ) { p = memfile_alloc_block(); 116940: 89 55 e4 mov %edx,-0x1c(%ebp) <== NOT EXECUTED 116943: 89 4d e0 mov %ecx,-0x20(%ebp) <== NOT EXECUTED 116946: e8 2d fe ff ff call 116778 <== NOT EXECUTED if ( !p ) 11694b: 85 c0 test %eax,%eax <== NOT EXECUTED 11694d: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED 116950: 8b 4d e0 mov -0x20(%ebp),%ecx <== NOT EXECUTED 116953: 0f 84 3f ff ff ff je 116898 <== NOT EXECUTED return 0; info->triply_indirect = p; 116959: 89 43 60 mov %eax,0x60(%ebx) <== NOT EXECUTED 11695c: e9 01 ff ff ff jmp 116862 <== NOT EXECUTED } p1 = (block_p *) p[ triply ]; if ( !p1 ) { p1 = memfile_alloc_block(); 116961: 89 55 e4 mov %edx,-0x1c(%ebp) <== NOT EXECUTED 116964: e8 0f fe ff ff call 116778 <== NOT EXECUTED if ( !p1 ) 116969: 85 c0 test %eax,%eax <== NOT EXECUTED 11696b: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED 11696e: 0f 84 24 ff ff ff je 116898 <== NOT EXECUTED return 0; p[ triply ] = (block_p) p1; 116974: 89 03 mov %eax,(%ebx) <== NOT EXECUTED 116976: e9 f4 fe ff ff jmp 11686f <== NOT EXECUTED 00117270 : IMFS_jnode_t *the_jnode, off_t start, unsigned char *destination, unsigned int length ) { 117270: 55 push %ebp 117271: 89 e5 mov %esp,%ebp 117273: 57 push %edi 117274: 56 push %esi 117275: 53 push %ebx 117276: 83 ec 4c sub $0x4c,%esp /* * Perform internal consistency checks */ assert( the_jnode ); 117279: 8b 7d 08 mov 0x8(%ebp),%edi 11727c: 85 ff test %edi,%edi 11727e: 0f 84 75 02 00 00 je 1174f9 <== ALWAYS TAKEN if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE || 117284: 8b 45 08 mov 0x8(%ebp),%eax 117287: 8b 48 4c mov 0x4c(%eax),%ecx 11728a: 8d 59 fb lea -0x5(%ecx),%ebx 11728d: 83 fb 01 cmp $0x1,%ebx 117290: 0f 87 4a 02 00 00 ja 1174e0 <== ALWAYS TAKEN /* * Error checks on arguments */ assert( dest ); 117296: 8b 75 10 mov 0x10(%ebp),%esi 117299: 85 f6 test %esi,%esi 11729b: 0f 84 0d 02 00 00 je 1174ae <== ALWAYS TAKEN /* * If there is nothing to read, then quick exit. */ my_length = length; if ( !my_length ) 1172a1: 8b 5d 14 mov 0x14(%ebp),%ebx 1172a4: 85 db test %ebx,%ebx 1172a6: 0f 84 d4 01 00 00 je 117480 <== ALWAYS TAKEN /* * Linear files (as created from a tar file are easier to handle * than block files). */ if (the_jnode->type == IMFS_LINEAR_FILE) { 1172ac: 83 f9 06 cmp $0x6,%ecx 1172af: 0f 84 3f 01 00 00 je 1173f4 <== ALWAYS TAKEN * 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 ) 1172b5: 8b 7d 08 mov 0x8(%ebp),%edi 1172b8: 8b 5f 50 mov 0x50(%edi),%ebx 1172bb: 8b 75 14 mov 0x14(%ebp),%esi 1172be: 03 75 0c add 0xc(%ebp),%esi 1172c1: 31 c9 xor %ecx,%ecx 1172c3: 3b 4f 54 cmp 0x54(%edi),%ecx 1172c6: 0f 8e c8 00 00 00 jle 117394 <== NEVER TAKEN my_length = the_jnode->info.file.size - start; 1172cc: 2b 5d 0c sub 0xc(%ebp),%ebx 1172cf: 89 5d d0 mov %ebx,-0x30(%ebp) /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 1172d2: 8b 15 70 c6 12 00 mov 0x12c670,%edx 1172d8: 89 55 d4 mov %edx,-0x2c(%ebp) 1172db: 8b 45 0c mov 0xc(%ebp),%eax 1172de: 99 cltd 1172df: f7 7d d4 idivl -0x2c(%ebp) 1172e2: 89 d6 mov %edx,%esi 1172e4: 89 45 c4 mov %eax,-0x3c(%ebp) block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 1172e7: 89 c3 mov %eax,%ebx if ( start_offset ) { 1172e9: 85 d2 test %edx,%edx 1172eb: 0f 85 b7 00 00 00 jne 1173a8 1172f1: 8b 4d 10 mov 0x10(%ebp),%ecx 1172f4: 89 4d cc mov %ecx,-0x34(%ebp) 1172f7: c7 45 c8 00 00 00 00 movl $0x0,-0x38(%ebp) /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 1172fe: 8b 55 d4 mov -0x2c(%ebp),%edx 117301: 39 55 d0 cmp %edx,-0x30(%ebp) 117304: 72 3b jb 117341 117306: 66 90 xchg %ax,%ax block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 117308: 50 push %eax 117309: 6a 00 push $0x0 11730b: 53 push %ebx 11730c: ff 75 08 pushl 0x8(%ebp) 11730f: e8 88 f4 ff ff call 11679c assert( block_ptr ); 117314: 83 c4 10 add $0x10,%esp 117317: 85 c0 test %eax,%eax 117319: 0f 84 76 01 00 00 je 117495 <== ALWAYS TAKEN if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); 11731f: 8b 30 mov (%eax),%esi 117321: 8b 7d cc mov -0x34(%ebp),%edi 117324: 8b 4d d4 mov -0x2c(%ebp),%ecx 117327: f3 a4 rep movsb %ds:(%esi),%es:(%edi) dest += to_copy; 117329: 89 7d cc mov %edi,-0x34(%ebp) block++; 11732c: 43 inc %ebx my_length -= to_copy; 11732d: 8b 4d d4 mov -0x2c(%ebp),%ecx 117330: 29 4d d0 sub %ecx,-0x30(%ebp) copied += to_copy; 117333: 01 4d c8 add %ecx,-0x38(%ebp) /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 117336: 8b 7d d0 mov -0x30(%ebp),%edi 117339: 39 3d 70 c6 12 00 cmp %edi,0x12c670 11733f: 76 c7 jbe 117308 * Phase 3: possibly the first part of one block */ assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); if ( my_length ) { 117341: 8b 7d d0 mov -0x30(%ebp),%edi 117344: 85 ff test %edi,%edi 117346: 74 27 je 11736f block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 117348: 56 push %esi 117349: 6a 00 push $0x0 11734b: 53 push %ebx 11734c: ff 75 08 pushl 0x8(%ebp) 11734f: e8 48 f4 ff ff call 11679c <== ALWAYS TAKEN assert( block_ptr ); 117354: 83 c4 10 add $0x10,%esp 117357: 85 c0 test %eax,%eax 117359: 0f 84 68 01 00 00 je 1174c7 <== ALWAYS TAKEN if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], my_length ); 11735f: 8b 30 mov (%eax),%esi 117361: 8b 7d cc mov -0x34(%ebp),%edi 117364: 8b 4d d0 mov -0x30(%ebp),%ecx 117367: f3 a4 rep movsb %ds:(%esi),%es:(%edi) copied += my_length; 117369: 8b 45 d0 mov -0x30(%ebp),%eax 11736c: 01 45 c8 add %eax,-0x38(%ebp) } IMFS_update_atime( the_jnode ); 11736f: 83 ec 08 sub $0x8,%esp 117372: 6a 00 push $0x0 117374: 8d 45 e0 lea -0x20(%ebp),%eax 117377: 50 push %eax 117378: e8 6b 20 ff ff call 1093e8 11737d: 8b 45 e0 mov -0x20(%ebp),%eax 117380: 8b 55 08 mov 0x8(%ebp),%edx 117383: 89 42 40 mov %eax,0x40(%edx) return copied; 117386: 8b 45 c8 mov -0x38(%ebp),%eax 117389: 83 c4 10 add $0x10,%esp } 11738c: 8d 65 f4 lea -0xc(%ebp),%esp 11738f: 5b pop %ebx 117390: 5e pop %esi 117391: 5f pop %edi 117392: c9 leave 117393: c3 ret * 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 ) 117394: 0f 8d c2 00 00 00 jge 11745c <== NEVER TAKEN 11739a: 8b 45 14 mov 0x14(%ebp),%eax <== NOT EXECUTED 11739d: 89 45 d0 mov %eax,-0x30(%ebp) <== NOT EXECUTED 1173a0: e9 2d ff ff ff jmp 1172d2 <== NOT EXECUTED 1173a5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; if ( start_offset ) { to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset; if ( to_copy > my_length ) to_copy = my_length; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 1173a8: 52 push %edx 1173a9: 6a 00 push $0x0 1173ab: ff 75 c4 pushl -0x3c(%ebp) 1173ae: ff 75 08 pushl 0x8(%ebp) 1173b1: e8 e6 f3 ff ff call 11679c assert( block_ptr ); 1173b6: 83 c4 10 add $0x10,%esp 1173b9: 85 c0 test %eax,%eax 1173bb: 0f 84 51 01 00 00 je 117512 <== ALWAYS TAKEN */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; if ( start_offset ) { to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset; 1173c1: 8b 4d d4 mov -0x2c(%ebp),%ecx 1173c4: 29 f1 sub %esi,%ecx 1173c6: 8b 55 d0 mov -0x30(%ebp),%edx 1173c9: 39 ca cmp %ecx,%edx 1173cb: 0f 87 9b 00 00 00 ja 11746c 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 ); 1173d1: 03 30 add (%eax),%esi dest += to_copy; 1173d3: 8b 7d 10 mov 0x10(%ebp),%edi 1173d6: 89 d1 mov %edx,%ecx 1173d8: f3 a4 rep movsb %ds:(%esi),%es:(%edi) 1173da: 89 7d cc mov %edi,-0x34(%ebp) block++; 1173dd: 8b 5d c4 mov -0x3c(%ebp),%ebx 1173e0: 43 inc %ebx my_length -= to_copy; 1173e1: 29 55 d0 sub %edx,-0x30(%ebp) 1173e4: a1 70 c6 12 00 mov 0x12c670,%eax 1173e9: 89 45 d4 mov %eax,-0x2c(%ebp) 1173ec: 89 55 c8 mov %edx,-0x38(%ebp) 1173ef: e9 0a ff ff ff jmp 1172fe <== ALWAYS TAKEN * than block files). */ if (the_jnode->type == IMFS_LINEAR_FILE) { unsigned char *file_ptr; file_ptr = (unsigned char *)the_jnode->info.linearfile.direct; 1173f4: 8b 55 08 mov 0x8(%ebp),%edx <== NOT EXECUTED 1173f7: 8b 52 58 mov 0x58(%edx),%edx <== NOT EXECUTED 1173fa: 89 55 d4 mov %edx,-0x2c(%ebp) <== NOT EXECUTED if (my_length > (the_jnode->info.linearfile.size - start)) 1173fd: 8b 4d 08 mov 0x8(%ebp),%ecx <== NOT EXECUTED 117400: 8b 71 50 mov 0x50(%ecx),%esi <== NOT EXECUTED 117403: 8b 79 54 mov 0x54(%ecx),%edi <== NOT EXECUTED 117406: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED 117409: 99 cltd <== NOT EXECUTED 11740a: 89 f1 mov %esi,%ecx <== NOT EXECUTED 11740c: 89 fb mov %edi,%ebx <== NOT EXECUTED 11740e: 29 c1 sub %eax,%ecx <== NOT EXECUTED 117410: 19 d3 sbb %edx,%ebx <== NOT EXECUTED 117412: 89 4d b0 mov %ecx,-0x50(%ebp) <== NOT EXECUTED 117415: 89 5d b4 mov %ebx,-0x4c(%ebp) <== NOT EXECUTED 117418: 31 c0 xor %eax,%eax <== NOT EXECUTED 11741a: 39 d8 cmp %ebx,%eax <== NOT EXECUTED 11741c: 7e 56 jle 117474 <== NOT EXECUTED my_length = the_jnode->info.linearfile.size - start; 11741e: 89 f2 mov %esi,%edx <== NOT EXECUTED 117420: 2b 55 0c sub 0xc(%ebp),%edx <== NOT EXECUTED memcpy(dest, &file_ptr[start], my_length); 117423: 8b 75 d4 mov -0x2c(%ebp),%esi <== NOT EXECUTED 117426: 03 75 0c add 0xc(%ebp),%esi <== NOT EXECUTED 117429: 8b 7d 10 mov 0x10(%ebp),%edi <== NOT EXECUTED 11742c: 89 d1 mov %edx,%ecx <== NOT EXECUTED 11742e: f3 a4 rep movsb %ds:(%esi),%es:(%edi) <== NOT EXECUTED IMFS_update_atime( the_jnode ); 117430: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 117433: 6a 00 push $0x0 <== NOT EXECUTED 117435: 8d 45 e0 lea -0x20(%ebp),%eax <== NOT EXECUTED 117438: 50 push %eax <== NOT EXECUTED 117439: 89 55 c0 mov %edx,-0x40(%ebp) <== NOT EXECUTED 11743c: e8 a7 1f ff ff call 1093e8 <== NOT EXECUTED 117441: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED 117444: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED 117447: 89 43 40 mov %eax,0x40(%ebx) <== NOT EXECUTED return my_length; 11744a: 8b 55 c0 mov -0x40(%ebp),%edx <== NOT EXECUTED 11744d: 89 d0 mov %edx,%eax <== NOT EXECUTED 11744f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } IMFS_update_atime( the_jnode ); return copied; } 117452: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 117455: 5b pop %ebx <== NOT EXECUTED 117456: 5e pop %esi <== NOT EXECUTED 117457: 5f pop %edi <== NOT EXECUTED 117458: c9 leave <== NOT EXECUTED 117459: c3 ret <== NOT EXECUTED 11745a: 66 90 xchg %ax,%ax <== NOT EXECUTED * If the last byte we are supposed to read is past the end of this * in memory file, then shorten the length to read. */ last_byte = start + length; if ( last_byte > the_jnode->info.file.size ) 11745c: 39 de cmp %ebx,%esi 11745e: 0f 87 68 fe ff ff ja 1172cc <== NEVER TAKEN 117464: e9 31 ff ff ff jmp 11739a <== NOT EXECUTED 117469: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; if ( start_offset ) { to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset; 11746c: 89 ca mov %ecx,%edx 11746e: e9 5e ff ff ff jmp 1173d1 <== ALWAYS TAKEN 117473: 90 nop <== NOT EXECUTED if (the_jnode->type == IMFS_LINEAR_FILE) { unsigned char *file_ptr; file_ptr = (unsigned char *)the_jnode->info.linearfile.direct; if (my_length > (the_jnode->info.linearfile.size - start)) 117474: 7c 05 jl 11747b <== NOT EXECUTED 117476: 39 4d 14 cmp %ecx,0x14(%ebp) <== NOT EXECUTED 117479: 77 a3 ja 11741e <== NOT EXECUTED 11747b: 8b 55 14 mov 0x14(%ebp),%edx <== NOT EXECUTED 11747e: eb a3 jmp 117423 <== NOT EXECUTED * If there is nothing to read, then quick exit. */ my_length = length; if ( !my_length ) rtems_set_errno_and_return_minus_one( EINVAL ); 117480: e8 33 15 00 00 call 1189b8 <__errno> <== NOT EXECUTED 117485: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 11748b: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 117490: e9 f7 fe ff ff jmp 11738c <== NOT EXECUTED */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr ); 117495: 68 de 68 12 00 push $0x1268de <== NOT EXECUTED 11749a: 68 de 69 12 00 push $0x1269de <== NOT EXECUTED 11749f: 68 a7 02 00 00 push $0x2a7 <== NOT EXECUTED 1174a4: 68 f4 68 12 00 push $0x1268f4 <== NOT EXECUTED 1174a9: e8 2e 1b ff ff call 108fdc <__assert_func> <== NOT EXECUTED /* * Error checks on arguments */ assert( dest ); 1174ae: 68 ef 68 12 00 push $0x1268ef <== NOT EXECUTED 1174b3: 68 de 69 12 00 push $0x1269de <== NOT EXECUTED 1174b8: 68 5a 02 00 00 push $0x25a <== NOT EXECUTED 1174bd: 68 f4 68 12 00 push $0x1268f4 <== NOT EXECUTED 1174c2: e8 15 1b ff ff call 108fdc <__assert_func> <== NOT EXECUTED assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); if ( my_length ) { block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr ); 1174c7: 68 de 68 12 00 push $0x1268de <== NOT EXECUTED 1174cc: 68 de 69 12 00 push $0x1269de <== NOT EXECUTED 1174d1: 68 b9 02 00 00 push $0x2b9 <== NOT EXECUTED 1174d6: 68 f4 68 12 00 push $0x1268f4 <== NOT EXECUTED 1174db: e8 fc 1a ff ff call 108fdc <__assert_func> <== NOT EXECUTED assert( the_jnode ); if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE || 1174e0: 68 60 69 12 00 push $0x126960 <== NOT EXECUTED 1174e5: 68 de 69 12 00 push $0x1269de <== NOT EXECUTED 1174ea: 68 51 02 00 00 push $0x251 <== NOT EXECUTED 1174ef: 68 f4 68 12 00 push $0x1268f4 <== NOT EXECUTED 1174f4: e8 e3 1a ff ff call 108fdc <__assert_func> <== NOT EXECUTED /* * Perform internal consistency checks */ assert( the_jnode ); 1174f9: 68 c8 68 12 00 push $0x1268c8 <== NOT EXECUTED 1174fe: 68 de 69 12 00 push $0x1269de <== NOT EXECUTED 117503: 68 4c 02 00 00 push $0x24c <== NOT EXECUTED 117508: 68 f4 68 12 00 push $0x1268f4 <== NOT EXECUTED 11750d: e8 ca 1a ff ff call 108fdc <__assert_func> <== NOT EXECUTED if ( start_offset ) { to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset; if ( to_copy > my_length ) to_copy = my_length; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr ); 117512: 68 de 68 12 00 push $0x1268de <== NOT EXECUTED 117517: 68 de 69 12 00 push $0x1269de <== NOT EXECUTED 11751c: 68 96 02 00 00 push $0x296 <== NOT EXECUTED 117521: 68 f4 68 12 00 push $0x1268f4 <== NOT EXECUTED 117526: e8 b1 1a ff ff call 108fdc <__assert_func> <== NOT EXECUTED 00116a44 : */ int IMFS_memfile_remove( IMFS_jnode_t *the_jnode ) { 116a44: 55 push %ebp 116a45: 89 e5 mov %esp,%ebp 116a47: 57 push %edi 116a48: 56 push %esi 116a49: 53 push %ebx 116a4a: 83 ec 1c sub $0x1c,%esp /* * Perform internal consistency checks */ assert( the_jnode ); 116a4d: 8b 55 08 mov 0x8(%ebp),%edx 116a50: 85 d2 test %edx,%edx 116a52: 0f 84 61 01 00 00 je 116bb9 <== ALWAYS TAKEN if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 116a58: 8b 45 08 mov 0x8(%ebp),%eax 116a5b: 83 78 4c 05 cmpl $0x5,0x4c(%eax) 116a5f: 0f 85 6d 01 00 00 jne 116bd2 <== ALWAYS TAKEN /* * 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; 116a65: 8b 3d 70 c6 12 00 mov 0x12c670,%edi 116a6b: c1 ef 02 shr $0x2,%edi * + indirect * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; 116a6e: 8b 55 08 mov 0x8(%ebp),%edx 116a71: 8b 42 58 mov 0x58(%edx),%eax 116a74: 85 c0 test %eax,%eax 116a76: 74 12 je 116a8a if ( info->indirect ) { memfile_free_blocks_in_table( &info->indirect, to_free ); 116a78: 83 ec 08 sub $0x8,%esp 116a7b: 57 push %edi 116a7c: 89 d0 mov %edx,%eax 116a7e: 83 c0 58 add $0x58,%eax 116a81: 50 push %eax 116a82: e8 f5 fe ff ff call 11697c <== ALWAYS TAKEN 116a87: 83 c4 10 add $0x10,%esp } if ( info->doubly_indirect ) { 116a8a: 8b 4d 08 mov 0x8(%ebp),%ecx 116a8d: 8b 51 5c mov 0x5c(%ecx),%edx 116a90: 85 d2 test %edx,%edx 116a92: 74 57 je 116aeb <== NEVER TAKEN for ( i=0 ; i <== NOT EXECUTED 116aa0: 31 c9 xor %ecx,%ecx <== NOT EXECUTED 116aa2: 31 db xor %ebx,%ebx <== NOT EXECUTED 116aa4: 8b 75 08 mov 0x8(%ebp),%esi <== NOT EXECUTED 116aa7: eb 06 jmp 116aaf <== NOT EXECUTED 116aa9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 116aac: 8b 56 5c mov 0x5c(%esi),%edx <== NOT EXECUTED if ( info->doubly_indirect[i] ) { 116aaf: c1 e1 02 shl $0x2,%ecx <== NOT EXECUTED 116ab2: 83 3c 0a 00 cmpl $0x0,(%edx,%ecx,1) <== NOT EXECUTED 116ab6: 74 14 je 116acc <== NOT EXECUTED memfile_free_blocks_in_table( 116ab8: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 116abb: 57 push %edi <== NOT EXECUTED 116abc: 01 ca add %ecx,%edx <== NOT EXECUTED 116abe: 52 push %edx <== NOT EXECUTED 116abf: e8 b8 fe ff ff call 11697c <== NOT EXECUTED 116ac4: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 116ac7: a1 70 c6 12 00 mov 0x12c670,%eax <== NOT EXECUTED memfile_free_blocks_in_table( &info->indirect, to_free ); } if ( info->doubly_indirect ) { for ( i=0 ; i <== NOT EXECUTED if ( info->doubly_indirect[i] ) { memfile_free_blocks_in_table( (block_p **)&info->doubly_indirect[i], to_free ); } } memfile_free_blocks_in_table( &info->doubly_indirect, to_free ); 116ad8: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 116adb: 57 push %edi <== NOT EXECUTED 116adc: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 116adf: 83 c0 5c add $0x5c,%eax <== NOT EXECUTED 116ae2: 50 push %eax <== NOT EXECUTED 116ae3: e8 94 fe ff ff call 11697c <== NOT EXECUTED 116ae8: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } if ( info->triply_indirect ) { 116aeb: 8b 45 08 mov 0x8(%ebp),%eax 116aee: 8b 50 60 mov 0x60(%eax),%edx 116af1: 85 d2 test %edx,%edx 116af3: 0f 84 b6 00 00 00 je 116baf <== NEVER TAKEN for ( i=0 ; i <== NOT EXECUTED p = (block_p *) info->triply_indirect[i]; 116b09: 8b 32 mov (%edx),%esi <== NOT EXECUTED if ( !p ) /* ensure we have a valid pointer */ 116b0b: 85 f6 test %esi,%esi <== NOT EXECUTED 116b0d: 0f 84 89 00 00 00 je 116b9c <== NOT EXECUTED 116b13: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) <== NOT EXECUTED 116b1a: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) <== NOT EXECUTED 116b21: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED break; for ( j=0 ; j <== NOT EXECUTED 116b2b: 31 d2 xor %edx,%edx <== NOT EXECUTED 116b2d: 31 db xor %ebx,%ebx <== NOT EXECUTED 116b2f: 90 nop <== NOT EXECUTED if ( p[j] ) { 116b30: c1 e2 02 shl $0x2,%edx <== NOT EXECUTED 116b33: 8b 0c 16 mov (%esi,%edx,1),%ecx <== NOT EXECUTED 116b36: 85 c9 test %ecx,%ecx <== NOT EXECUTED 116b38: 74 15 je 116b4f <== NOT EXECUTED memfile_free_blocks_in_table( (block_p **)&p[j], to_free); 116b3a: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 116b3d: 57 push %edi <== NOT EXECUTED 116b3e: 8d 14 16 lea (%esi,%edx,1),%edx <== NOT EXECUTED 116b41: 52 push %edx <== NOT EXECUTED 116b42: e8 35 fe ff ff call 11697c <== NOT EXECUTED 116b47: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 116b4a: a1 70 c6 12 00 mov 0x12c670,%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( 116b5b: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 116b5e: 57 push %edi <== NOT EXECUTED 116b5f: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED 116b62: 8b 4d 08 mov 0x8(%ebp),%ecx <== NOT EXECUTED 116b65: 03 41 60 add 0x60(%ecx),%eax <== NOT EXECUTED 116b68: 50 push %eax <== NOT EXECUTED 116b69: e8 0e fe ff ff call 11697c <== NOT EXECUTED memfile_free_blocks_in_table( &info->doubly_indirect, to_free ); } if ( info->triply_indirect ) { for ( i=0 ; i <== NOT EXECUTED p = (block_p *) info->triply_indirect[i]; if ( !p ) /* ensure we have a valid pointer */ 116b83: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED 116b86: c1 e2 02 shl $0x2,%edx <== NOT EXECUTED 116b89: 89 55 e0 mov %edx,-0x20(%ebp) <== NOT EXECUTED } if ( info->triply_indirect ) { for ( i=0 ; itriply_indirect[i]; 116b8c: 8b 4d 08 mov 0x8(%ebp),%ecx <== NOT EXECUTED 116b8f: 8b 51 60 mov 0x60(%ecx),%edx <== NOT EXECUTED 116b92: 8b 4d e0 mov -0x20(%ebp),%ecx <== NOT EXECUTED 116b95: 8b 34 0a mov (%edx,%ecx,1),%esi <== NOT EXECUTED if ( !p ) /* ensure we have a valid pointer */ 116b98: 85 f6 test %esi,%esi <== NOT EXECUTED 116b9a: 75 88 jne 116b24 <== NOT EXECUTED } } memfile_free_blocks_in_table( (block_p **)&info->triply_indirect[i], to_free ); } memfile_free_blocks_in_table( 116b9c: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 116b9f: 57 push %edi <== NOT EXECUTED 116ba0: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 116ba3: 83 c0 60 add $0x60,%eax <== NOT EXECUTED 116ba6: 50 push %eax <== NOT EXECUTED 116ba7: e8 d0 fd ff ff call 11697c <== NOT EXECUTED 116bac: 83 c4 10 add $0x10,%esp <== NOT EXECUTED (block_p **)&info->triply_indirect, to_free ); } return 0; } 116baf: 31 c0 xor %eax,%eax 116bb1: 8d 65 f4 lea -0xc(%ebp),%esp 116bb4: 5b pop %ebx 116bb5: 5e pop %esi 116bb6: 5f pop %edi 116bb7: c9 leave 116bb8: c3 ret /* * Perform internal consistency checks */ assert( the_jnode ); 116bb9: 68 c8 68 12 00 push $0x1268c8 <== NOT EXECUTED 116bbe: 68 f0 69 12 00 push $0x1269f0 <== NOT EXECUTED 116bc3: 68 ee 01 00 00 push $0x1ee <== NOT EXECUTED 116bc8: 68 f4 68 12 00 push $0x1268f4 <== NOT EXECUTED 116bcd: e8 0a 24 ff ff call 108fdc <__assert_func> <== NOT EXECUTED if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 116bd2: 68 3c 69 12 00 push $0x12693c <== NOT EXECUTED 116bd7: 68 f0 69 12 00 push $0x1269f0 <== NOT EXECUTED 116bdc: 68 f2 01 00 00 push $0x1f2 <== NOT EXECUTED 116be1: 68 f4 68 12 00 push $0x1268f4 <== NOT EXECUTED 116be6: e8 f1 23 ff ff call 108fdc <__assert_func> <== NOT EXECUTED 001169f8 : MEMFILE_STATIC int IMFS_memfile_remove_block( IMFS_jnode_t *the_jnode, unsigned int block ) { 1169f8: 55 push %ebp <== NOT EXECUTED 1169f9: 89 e5 mov %esp,%ebp <== NOT EXECUTED 1169fb: 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 ); 1169fe: 6a 00 push $0x0 <== NOT EXECUTED 116a00: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED 116a03: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED 116a06: e8 91 fd ff ff call 11679c <== NOT EXECUTED assert( block_ptr ); 116a0b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 116a0e: 85 c0 test %eax,%eax <== NOT EXECUTED 116a10: 74 18 je 116a2a <== NOT EXECUTED if ( block_ptr ) { ptr = *block_ptr; 116a12: 8b 10 mov (%eax),%edx <== NOT EXECUTED *block_ptr = 0; 116a14: c7 00 00 00 00 00 movl $0x0,(%eax) <== NOT EXECUTED memfile_free_block( ptr ); 116a1a: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 116a1d: 52 push %edx <== NOT EXECUTED 116a1e: e8 39 fd ff ff call 11675c <== NOT EXECUTED } return 1; } 116a23: b8 01 00 00 00 mov $0x1,%eax <== NOT EXECUTED 116a28: c9 leave <== NOT EXECUTED 116a29: c3 ret <== NOT EXECUTED { block_p *block_ptr; block_p ptr; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr ); 116a2a: 68 de 68 12 00 push $0x1268de <== NOT EXECUTED 116a2f: 68 21 6a 12 00 push $0x126a21 <== NOT EXECUTED 116a34: 68 96 01 00 00 push $0x196 <== NOT EXECUTED 116a39: 68 f4 68 12 00 push $0x1268f4 <== NOT EXECUTED 116a3e: e8 99 25 ff ff call 108fdc <__assert_func> <== NOT EXECUTED 00116f58 : IMFS_jnode_t *the_jnode, off_t start, const unsigned char *source, unsigned int length ) { 116f58: 55 push %ebp 116f59: 89 e5 mov %esp,%ebp 116f5b: 57 push %edi 116f5c: 56 push %esi 116f5d: 53 push %ebx 116f5e: 83 ec 2c sub $0x2c,%esp 116f61: 8b 5d 0c mov 0xc(%ebp),%ebx 116f64: 8b 75 10 mov 0x10(%ebp),%esi /* * Perform internal consistency checks */ assert( the_jnode ); 116f67: 8b 4d 08 mov 0x8(%ebp),%ecx 116f6a: 85 c9 test %ecx,%ecx 116f6c: 0f 84 c8 01 00 00 je 11713a <== ALWAYS TAKEN if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 116f72: 8b 45 08 mov 0x8(%ebp),%eax 116f75: 83 78 4c 05 cmpl $0x5,0x4c(%eax) 116f79: 0f 85 a2 01 00 00 jne 117121 <== ALWAYS TAKEN /* * Error check arguments */ assert( source ); 116f7f: 85 f6 test %esi,%esi 116f81: 0f 84 cc 01 00 00 je 117153 <== ALWAYS TAKEN /* * If there is nothing to write, then quick exit. */ my_length = length; if ( !my_length ) 116f87: 8b 55 14 mov 0x14(%ebp),%edx 116f8a: 85 d2 test %edx,%edx 116f8c: 0f 84 5f 01 00 00 je 1170f1 <== ALWAYS TAKEN /* * If the last byte we are supposed to write is past the end of this * in memory file, then extend the length. */ last_byte = start + length; 116f92: 8b 55 14 mov 0x14(%ebp),%edx 116f95: 01 da add %ebx,%edx if ( last_byte > the_jnode->info.file.size ) { 116f97: 31 c0 xor %eax,%eax 116f99: 8b 4d 08 mov 0x8(%ebp),%ecx 116f9c: 3b 41 54 cmp 0x54(%ecx),%eax 116f9f: 7c 0f jl 116fb0 <== ALWAYS TAKEN 116fa1: 0f 8f 15 01 00 00 jg 1170bc <== ALWAYS TAKEN 116fa7: 3b 51 50 cmp 0x50(%ecx),%edx 116faa: 0f 87 0c 01 00 00 ja 1170bc <== NEVER TAKEN /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 116fb0: a1 70 c6 12 00 mov 0x12c670,%eax 116fb5: 89 45 d4 mov %eax,-0x2c(%ebp) 116fb8: 89 d8 mov %ebx,%eax 116fba: 99 cltd 116fbb: f7 7d d4 idivl -0x2c(%ebp) 116fbe: 89 45 cc mov %eax,-0x34(%ebp) block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 116fc1: 89 c3 mov %eax,%ebx if ( start_offset ) { 116fc3: 85 d2 test %edx,%edx 116fc5: 0f 85 9d 00 00 00 jne 117068 116fcb: 8b 55 14 mov 0x14(%ebp),%edx 116fce: c7 45 d0 00 00 00 00 movl $0x0,-0x30(%ebp) /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 116fd5: 3b 55 d4 cmp -0x2c(%ebp),%edx 116fd8: 72 3a jb 117014 116fda: 66 90 xchg %ax,%ax block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 116fdc: 57 push %edi 116fdd: 6a 00 push $0x0 116fdf: 53 push %ebx 116fe0: ff 75 08 pushl 0x8(%ebp) 116fe3: 89 55 c8 mov %edx,-0x38(%ebp) 116fe6: e8 b1 f7 ff ff call 11679c assert( block_ptr ); 116feb: 83 c4 10 add $0x10,%esp 116fee: 85 c0 test %eax,%eax 116ff0: 8b 55 c8 mov -0x38(%ebp),%edx 116ff3: 0f 84 0f 01 00 00 je 117108 <== ALWAYS TAKEN 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 ); 116ff9: 8b 00 mov (%eax),%eax src += to_copy; 116ffb: 89 c7 mov %eax,%edi 116ffd: 8b 4d d4 mov -0x2c(%ebp),%ecx 117000: f3 a4 rep movsb %ds:(%esi),%es:(%edi) block++; 117002: 43 inc %ebx my_length -= to_copy; 117003: 2b 55 d4 sub -0x2c(%ebp),%edx * * This routine writes the specified data buffer into the in memory * file pointed to by the_jnode. The file is extended as needed. */ MEMFILE_STATIC ssize_t IMFS_memfile_write( 117006: 8b 4d d4 mov -0x2c(%ebp),%ecx 117009: 01 4d d0 add %ecx,-0x30(%ebp) /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 11700c: 39 15 70 c6 12 00 cmp %edx,0x12c670 117012: 76 c8 jbe 116fdc <== ALWAYS TAKEN */ assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); to_copy = my_length; if ( my_length ) { 117014: 85 d2 test %edx,%edx 117016: 74 28 je 117040 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 117018: 51 push %ecx 117019: 6a 00 push $0x0 11701b: 53 push %ebx 11701c: ff 75 08 pushl 0x8(%ebp) 11701f: 89 55 c8 mov %edx,-0x38(%ebp) 117022: e8 75 f7 ff ff call 11679c <== ALWAYS TAKEN assert( block_ptr ); 117027: 83 c4 10 add $0x10,%esp 11702a: 85 c0 test %eax,%eax 11702c: 8b 55 c8 mov -0x38(%ebp),%edx 11702f: 0f 84 37 01 00 00 je 11716c <== ALWAYS TAKEN 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 ); 117035: 8b 00 mov (%eax),%eax 117037: 89 c7 mov %eax,%edi 117039: 89 d1 mov %edx,%ecx 11703b: f3 a4 rep movsb %ds:(%esi),%es:(%edi) my_length = 0; copied += to_copy; 11703d: 01 55 d0 add %edx,-0x30(%ebp) } IMFS_mtime_ctime_update( the_jnode ); 117040: 83 ec 08 sub $0x8,%esp 117043: 6a 00 push $0x0 117045: 8d 45 e0 lea -0x20(%ebp),%eax 117048: 50 push %eax 117049: e8 9a 23 ff ff call 1093e8 11704e: 8b 45 e0 mov -0x20(%ebp),%eax 117051: 8b 55 08 mov 0x8(%ebp),%edx 117054: 89 42 44 mov %eax,0x44(%edx) 117057: 89 42 48 mov %eax,0x48(%edx) return copied; 11705a: 83 c4 10 add $0x10,%esp } 11705d: 8b 45 d0 mov -0x30(%ebp),%eax 117060: 8d 65 f4 lea -0xc(%ebp),%esp 117063: 5b pop %ebx 117064: 5e pop %esi 117065: 5f pop %edi 117066: c9 leave 117067: c3 ret block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; if ( start_offset ) { to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset; if ( to_copy > my_length ) to_copy = my_length; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 117068: 50 push %eax 117069: 6a 00 push $0x0 11706b: ff 75 cc pushl -0x34(%ebp) 11706e: ff 75 08 pushl 0x8(%ebp) 117071: 89 55 c8 mov %edx,-0x38(%ebp) 117074: e8 23 f7 ff ff call 11679c assert( block_ptr ); 117079: 83 c4 10 add $0x10,%esp 11707c: 85 c0 test %eax,%eax 11707e: 8b 55 c8 mov -0x38(%ebp),%edx 117081: 0f 84 fe 00 00 00 je 117185 <== ALWAYS TAKEN */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; if ( start_offset ) { to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset; 117087: 8b 4d d4 mov -0x2c(%ebp),%ecx 11708a: 29 d1 sub %edx,%ecx 11708c: 89 4d d0 mov %ecx,-0x30(%ebp) 11708f: 8b 4d 14 mov 0x14(%ebp),%ecx 117092: 39 4d d0 cmp %ecx,-0x30(%ebp) 117095: 77 55 ja 1170ec <== NEVER TAKEN 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 ); 117097: 8b 00 mov (%eax),%eax 117099: 01 d0 add %edx,%eax src += to_copy; 11709b: 89 c7 mov %eax,%edi 11709d: 8b 4d d0 mov -0x30(%ebp),%ecx 1170a0: f3 a4 rep movsb %ds:(%esi),%es:(%edi) block++; 1170a2: 8b 5d cc mov -0x34(%ebp),%ebx 1170a5: 43 inc %ebx my_length -= to_copy; 1170a6: 8b 55 14 mov 0x14(%ebp),%edx 1170a9: 2b 55 d0 sub -0x30(%ebp),%edx copied += to_copy; 1170ac: a1 70 c6 12 00 mov 0x12c670,%eax 1170b1: 89 45 d4 mov %eax,-0x2c(%ebp) 1170b4: e9 1c ff ff ff jmp 116fd5 <== ALWAYS TAKEN 1170b9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED * in memory file, then extend the length. */ last_byte = start + length; if ( last_byte > the_jnode->info.file.size ) { status = IMFS_memfile_extend( the_jnode, last_byte ); 1170bc: 83 ec 08 sub $0x8,%esp 1170bf: 52 push %edx 1170c0: ff 75 08 pushl 0x8(%ebp) 1170c3: e8 74 fc ff ff call 116d3c <== ALWAYS TAKEN if ( status ) 1170c8: 83 c4 10 add $0x10,%esp 1170cb: 85 c0 test %eax,%eax 1170cd: 0f 84 dd fe ff ff je 116fb0 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOSPC ); 1170d3: e8 e0 18 00 00 call 1189b8 <__errno> <== NOT EXECUTED 1170d8: c7 00 1c 00 00 00 movl $0x1c,(%eax) <== NOT EXECUTED 1170de: c7 45 d0 ff ff ff ff movl $0xffffffff,-0x30(%ebp) <== NOT EXECUTED 1170e5: e9 73 ff ff ff jmp 11705d <== NOT EXECUTED 1170ea: 66 90 xchg %ax,%ax <== 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; 1170ec: 89 4d d0 mov %ecx,-0x30(%ebp) 1170ef: eb a6 jmp 117097 <== ALWAYS TAKEN * If there is nothing to write, then quick exit. */ my_length = length; if ( !my_length ) rtems_set_errno_and_return_minus_one( EINVAL ); 1170f1: e8 c2 18 00 00 call 1189b8 <__errno> <== NOT EXECUTED 1170f6: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 1170fc: c7 45 d0 ff ff ff ff movl $0xffffffff,-0x30(%ebp) <== NOT EXECUTED 117103: e9 55 ff ff ff jmp 11705d <== NOT EXECUTED */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr ); 117108: 68 de 68 12 00 push $0x1268de <== NOT EXECUTED 11710d: 68 cb 69 12 00 push $0x1269cb <== NOT EXECUTED 117112: 68 30 03 00 00 push $0x330 <== NOT EXECUTED 117117: 68 f4 68 12 00 push $0x1268f4 <== NOT EXECUTED 11711c: e8 bb 1e ff ff call 108fdc <__assert_func> <== NOT EXECUTED assert( the_jnode ); if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 117121: 68 3c 69 12 00 push $0x12693c <== NOT EXECUTED 117126: 68 cb 69 12 00 push $0x1269cb <== NOT EXECUTED 11712b: 68 e7 02 00 00 push $0x2e7 <== NOT EXECUTED 117130: 68 f4 68 12 00 push $0x1268f4 <== NOT EXECUTED 117135: e8 a2 1e ff ff call 108fdc <__assert_func> <== NOT EXECUTED /* * Perform internal consistency checks */ assert( the_jnode ); 11713a: 68 c8 68 12 00 push $0x1268c8 <== NOT EXECUTED 11713f: 68 cb 69 12 00 push $0x1269cb <== NOT EXECUTED 117144: 68 e3 02 00 00 push $0x2e3 <== NOT EXECUTED 117149: 68 f4 68 12 00 push $0x1268f4 <== NOT EXECUTED 11714e: e8 89 1e ff ff call 108fdc <__assert_func> <== NOT EXECUTED /* * Error check arguments */ assert( source ); 117153: 68 e8 68 12 00 push $0x1268e8 <== NOT EXECUTED 117158: 68 cb 69 12 00 push $0x1269cb <== NOT EXECUTED 11715d: 68 ef 02 00 00 push $0x2ef <== NOT EXECUTED 117162: 68 f4 68 12 00 push $0x1268f4 <== NOT EXECUTED 117167: e8 70 1e ff ff call 108fdc <__assert_func> <== NOT EXECUTED assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); to_copy = my_length; if ( my_length ) { block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr ); 11716c: 68 de 68 12 00 push $0x1268de <== NOT EXECUTED 117171: 68 cb 69 12 00 push $0x1269cb <== NOT EXECUTED 117176: 68 46 03 00 00 push $0x346 <== NOT EXECUTED 11717b: 68 f4 68 12 00 push $0x1268f4 <== NOT EXECUTED 117180: e8 57 1e ff ff call 108fdc <__assert_func> <== NOT EXECUTED if ( start_offset ) { to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset; if ( to_copy > my_length ) to_copy = my_length; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr ); 117185: 68 de 68 12 00 push $0x1268de <== NOT EXECUTED 11718a: 68 cb 69 12 00 push $0x1269cb <== NOT EXECUTED 11718f: 68 1c 03 00 00 push $0x31c <== NOT EXECUTED 117194: 68 f4 68 12 00 push $0x1268f4 <== NOT EXECUTED 117199: e8 3e 1e ff ff call 108fdc <__assert_func> <== NOT EXECUTED 0010f6a8 : const char *token, /* IN */ mode_t mode, /* IN */ dev_t dev, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 10f6a8: 55 push %ebp 10f6a9: 89 e5 mov %esp,%ebp 10f6ab: 57 push %edi 10f6ac: 56 push %esi 10f6ad: 53 push %ebx 10f6ae: 83 ec 5c sub $0x5c,%esp 10f6b1: 8b 55 08 mov 0x8(%ebp),%edx 10f6b4: 8b 5d 0c mov 0xc(%ebp),%ebx 10f6b7: 8b 75 10 mov 0x10(%ebp),%esi 10f6ba: 8b 45 14 mov 0x14(%ebp),%eax 10f6bd: 89 45 a4 mov %eax,-0x5c(%ebp) IMFS_jnode_t *new_node; int result; char new_name[ IMFS_NAME_MAX + 1 ]; IMFS_types_union info; IMFS_get_token( token, strlen( token ), new_name, &result ); 10f6c0: 31 c0 xor %eax,%eax 10f6c2: b9 ff ff ff ff mov $0xffffffff,%ecx 10f6c7: 89 d7 mov %edx,%edi 10f6c9: f2 ae repnz scas %es:(%edi),%al 10f6cb: f7 d1 not %ecx 10f6cd: 49 dec %ecx 10f6ce: 8d 45 e4 lea -0x1c(%ebp),%eax 10f6d1: 50 push %eax 10f6d2: 8d 7d af lea -0x51(%ebp),%edi 10f6d5: 57 push %edi 10f6d6: 51 push %ecx 10f6d7: 52 push %edx 10f6d8: e8 3f fe ff ff call 10f51c <== ALWAYS TAKEN /* * Figure out what type of IMFS node this is. */ if ( S_ISDIR(mode) ) 10f6dd: 89 d8 mov %ebx,%eax 10f6df: 25 00 f0 00 00 and $0xf000,%eax 10f6e4: 83 c4 10 add $0x10,%esp 10f6e7: 3d 00 40 00 00 cmp $0x4000,%eax 10f6ec: 74 5e je 10f74c type = IMFS_DIRECTORY; else if ( S_ISREG(mode) ) 10f6ee: 3d 00 80 00 00 cmp $0x8000,%eax 10f6f3: 74 4f je 10f744 type = IMFS_MEMORY_FILE; else if ( S_ISBLK(mode) || S_ISCHR(mode) ) { 10f6f5: 3d 00 60 00 00 cmp $0x6000,%eax 10f6fa: 74 38 je 10f734 10f6fc: 3d 00 20 00 00 cmp $0x2000,%eax 10f701: 74 31 je 10f734 type = IMFS_DEVICE; rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor ); } else if (S_ISFIFO(mode)) 10f703: 3d 00 10 00 00 cmp $0x1000,%eax 10f708: 75 4a jne 10f754 <== ALWAYS TAKEN 10f70a: ba 07 00 00 00 mov $0x7,%edx * was ONLY passed a NULL when we created the root node. We * added a new IMFS_create_root_node() so this path no longer * existed. The result was simpler code which should not have * this path. */ new_node = IMFS_create_node( 10f70f: 83 ec 0c sub $0xc,%esp 10f712: 8d 45 d0 lea -0x30(%ebp),%eax 10f715: 50 push %eax 10f716: 53 push %ebx 10f717: 57 push %edi 10f718: 52 push %edx 10f719: ff 75 18 pushl 0x18(%ebp) 10f71c: e8 bf 29 00 00 call 1120e0 new_name, mode, &info ); if ( !new_node ) 10f721: 83 c4 20 add $0x20,%esp 10f724: 85 c0 test %eax,%eax 10f726: 74 3e je 10f766 <== ALWAYS TAKEN 10f728: 31 c0 xor %eax,%eax rtems_set_errno_and_return_minus_one( ENOMEM ); return 0; } 10f72a: 8d 65 f4 lea -0xc(%ebp),%esp 10f72d: 5b pop %ebx 10f72e: 5e pop %esi 10f72f: 5f pop %edi 10f730: c9 leave 10f731: c3 ret 10f732: 66 90 xchg %ax,%ax <== NOT EXECUTED type = IMFS_DIRECTORY; else if ( S_ISREG(mode) ) type = IMFS_MEMORY_FILE; else if ( S_ISBLK(mode) || S_ISCHR(mode) ) { type = IMFS_DEVICE; rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor ); 10f734: 89 75 d0 mov %esi,-0x30(%ebp) dev_t device ) { union __rtems_dev_t temp; temp.device = device; 10f737: 8b 45 a4 mov -0x5c(%ebp),%eax 10f73a: 89 45 d4 mov %eax,-0x2c(%ebp) 10f73d: ba 02 00 00 00 mov $0x2,%edx */ if ( S_ISDIR(mode) ) type = IMFS_DIRECTORY; else if ( S_ISREG(mode) ) type = IMFS_MEMORY_FILE; else if ( S_ISBLK(mode) || S_ISCHR(mode) ) { 10f742: eb cb jmp 10f70f <== ALWAYS TAKEN /* * Figure out what type of IMFS node this is. */ if ( S_ISDIR(mode) ) type = IMFS_DIRECTORY; else if ( S_ISREG(mode) ) 10f744: ba 05 00 00 00 mov $0x5,%edx 10f749: eb c4 jmp 10f70f <== ALWAYS TAKEN 10f74b: 90 nop <== NOT EXECUTED rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor ); } else if (S_ISFIFO(mode)) type = IMFS_FIFO; else { rtems_set_errno_and_return_minus_one( EINVAL ); 10f74c: ba 01 00 00 00 mov $0x1,%edx 10f751: eb bc jmp 10f70f <== ALWAYS TAKEN 10f753: 90 nop <== NOT EXECUTED 10f754: e8 b7 40 00 00 call 113810 <__errno> <== NOT EXECUTED 10f759: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 10f75f: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 10f764: eb c4 jmp 10f72a <== NOT EXECUTED mode, &info ); if ( !new_node ) rtems_set_errno_and_return_minus_one( ENOMEM ); 10f766: e8 a5 40 00 00 call 113810 <__errno> <== NOT EXECUTED 10f76b: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED 10f771: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 10f776: eb b2 jmp 10f72a <== NOT EXECUTED 00108bf4 : #include int IMFS_mount( rtems_filesystem_mount_table_entry_t *mt_entry ) { 108bf4: 55 push %ebp 108bf5: 89 e5 mov %esp,%ebp 108bf7: 83 ec 08 sub $0x8,%esp 108bfa: 8b 55 08 mov 0x8(%ebp),%edx IMFS_jnode_t *node; node = mt_entry->mt_point_node.node_access; 108bfd: 8b 42 08 mov 0x8(%edx),%eax /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 108c00: 83 78 4c 01 cmpl $0x1,0x4c(%eax) 108c04: 75 0a jne 108c10 <== ALWAYS TAKEN /* * Set mt_fs pointer to point to the mount table entry for * the mounted file system. */ node->info.directory.mt_fs = mt_entry; 108c06: 89 50 5c mov %edx,0x5c(%eax) 108c09: 31 c0 xor %eax,%eax return 0; } 108c0b: c9 leave 108c0c: c3 ret 108c0d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); 108c10: e8 a3 fd 00 00 call 1189b8 <__errno> <== NOT EXECUTED 108c15: c7 00 14 00 00 00 movl $0x14,(%eax) <== NOT EXECUTED 108c1b: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED * the mounted file system. */ node->info.directory.mt_fs = mt_entry; return 0; } 108c20: c9 leave <== NOT EXECUTED 108c21: c3 ret <== NOT EXECUTED 0010923c : */ void IMFS_print_jnode( IMFS_jnode_t *the_jnode ) { 10923c: 55 push %ebp 10923d: 89 e5 mov %esp,%ebp 10923f: 53 push %ebx 109240: 83 ec 04 sub $0x4,%esp 109243: 8b 5d 08 mov 0x8(%ebp),%ebx assert( the_jnode ); 109246: 85 db test %ebx,%ebx 109248: 0f 84 7f 01 00 00 je 1093cd <== ALWAYS TAKEN fprintf(stdout, "%s", the_jnode->name ); 10924e: 83 ec 08 sub $0x8,%esp 109251: a1 80 b6 12 00 mov 0x12b680,%eax 109256: ff 70 08 pushl 0x8(%eax) 109259: 8d 43 0c lea 0xc(%ebx),%eax 10925c: 50 push %eax 10925d: e8 d6 e8 00 00 call 117b38 switch( the_jnode->type ) { 109262: 8b 43 4c mov 0x4c(%ebx),%eax 109265: 83 c4 10 add $0x10,%esp 109268: 83 f8 07 cmp $0x7,%eax 10926b: 76 2b jbe 109298 <== NEVER TAKEN fprintf(stdout, " FIFO not printed\n" ); assert(0); break; default: fprintf(stdout, " bad type %d\n", the_jnode->type ); 10926d: 52 push %edx <== NOT EXECUTED 10926e: 50 push %eax <== NOT EXECUTED 10926f: 68 a2 62 12 00 push $0x1262a2 <== NOT EXECUTED 109274: a1 80 b6 12 00 mov 0x12b680,%eax <== NOT EXECUTED 109279: ff 70 08 pushl 0x8(%eax) <== NOT EXECUTED 10927c: e8 8f e7 00 00 call 117a10 <== NOT EXECUTED assert(0); 109281: 68 ee 43 12 00 push $0x1243ee <== NOT EXECUTED 109286: 68 08 64 12 00 push $0x126408 <== NOT EXECUTED 10928b: 6a 6c push $0x6c <== NOT EXECUTED 10928d: 68 ec 62 12 00 push $0x1262ec <== NOT EXECUTED 109292: e8 bd 08 00 00 call 109b54 <__assert_func> <== NOT EXECUTED 109297: 90 nop <== NOT EXECUTED ) { assert( the_jnode ); fprintf(stdout, "%s", the_jnode->name ); switch( the_jnode->type ) { 109298: ff 24 85 d4 63 12 00 jmp *0x1263d4(,%eax,4) 10929f: 90 nop <== NOT EXECUTED fprintf(stdout, " links not printed\n" ); assert(0); break; case IMFS_FIFO: fprintf(stdout, " FIFO not printed\n" ); 1092a0: a1 80 b6 12 00 mov 0x12b680,%eax <== NOT EXECUTED 1092a5: ff 70 08 pushl 0x8(%eax) <== NOT EXECUTED 1092a8: 6a 12 push $0x12 <== NOT EXECUTED 1092aa: 6a 01 push $0x1 <== NOT EXECUTED 1092ac: 68 8f 62 12 00 push $0x12628f <== NOT EXECUTED 1092b1: e8 e2 f2 00 00 call 118598 <== NOT EXECUTED assert(0); 1092b6: 68 ee 43 12 00 push $0x1243ee <== NOT EXECUTED 1092bb: 68 08 64 12 00 push $0x126408 <== NOT EXECUTED 1092c0: 6a 67 push $0x67 <== NOT EXECUTED 1092c2: 68 ec 62 12 00 push $0x1262ec <== NOT EXECUTED 1092c7: e8 88 08 00 00 call 109b54 <__assert_func> <== NOT EXECUTED fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")", the_jnode->info.device.major, the_jnode->info.device.minor ); break; case IMFS_LINEAR_FILE: fprintf(stdout, " (file %" PRId32 " %p)", 1092cc: ff 73 58 pushl 0x58(%ebx) <== NOT EXECUTED 1092cf: ff 73 50 pushl 0x50(%ebx) <== NOT EXECUTED 1092d2: 68 60 62 12 00 push $0x126260 <== NOT EXECUTED 1092d7: a1 80 b6 12 00 mov 0x12b680,%eax <== NOT EXECUTED 1092dc: ff 70 08 pushl 0x8(%eax) <== NOT EXECUTED 1092df: e8 2c e7 00 00 call 117a10 <== NOT EXECUTED (uint32_t)the_jnode->info.linearfile.size, the_jnode->info.linearfile.direct ); break; 1092e4: 83 c4 10 add $0x10,%esp <== NOT EXECUTED default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); 1092e7: c7 45 08 97 65 12 00 movl $0x126597,0x8(%ebp) <== NOT EXECUTED } 1092ee: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 1092f1: c9 leave <== NOT EXECUTED default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); 1092f2: e9 f9 fe 00 00 jmp 1191f0 <== NOT EXECUTED 1092f7: 90 nop <== NOT EXECUTED the_jnode->info.file.indirect, the_jnode->info.file.doubly_indirect, the_jnode->info.file.triply_indirect ); #else fprintf(stdout, " (file %" PRId32 ")", 1092f8: 51 push %ecx 1092f9: ff 73 50 pushl 0x50(%ebx) 1092fc: 68 6f 62 12 00 push $0x12626f 109301: a1 80 b6 12 00 mov 0x12b680,%eax 109306: ff 70 08 pushl 0x8(%eax) 109309: e8 02 e7 00 00 call 117a10 (uint32_t)the_jnode->info.file.size ); #endif break; 10930e: 83 c4 10 add $0x10,%esp default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); 109311: c7 45 08 97 65 12 00 movl $0x126597,0x8(%ebp) } 109318: 8b 5d fc mov -0x4(%ebp),%ebx 10931b: c9 leave default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); 10931c: e9 cf fe 00 00 jmp 1191f0 109321: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED fprintf(stdout, " links not printed\n" ); assert(0); break; case IMFS_SYM_LINK: fprintf(stdout, " links not printed\n" ); 109324: a1 80 b6 12 00 mov 0x12b680,%eax <== NOT EXECUTED 109329: ff 70 08 pushl 0x8(%eax) <== NOT EXECUTED 10932c: 6a 13 push $0x13 <== NOT EXECUTED 10932e: 6a 01 push $0x1 <== NOT EXECUTED 109330: 68 7b 62 12 00 push $0x12627b <== NOT EXECUTED 109335: e8 5e f2 00 00 call 118598 <== NOT EXECUTED assert(0); 10933a: 68 ee 43 12 00 push $0x1243ee <== NOT EXECUTED 10933f: 68 08 64 12 00 push $0x126408 <== NOT EXECUTED 109344: 6a 62 push $0x62 <== NOT EXECUTED 109346: 68 ec 62 12 00 push $0x1262ec <== NOT EXECUTED 10934b: e8 04 08 00 00 call 109b54 <__assert_func> <== NOT EXECUTED (uint32_t)the_jnode->info.file.size ); #endif break; case IMFS_HARD_LINK: fprintf(stdout, " links not printed\n" ); 109350: a1 80 b6 12 00 mov 0x12b680,%eax <== NOT EXECUTED 109355: ff 70 08 pushl 0x8(%eax) <== NOT EXECUTED 109358: 6a 13 push $0x13 <== NOT EXECUTED 10935a: 6a 01 push $0x1 <== NOT EXECUTED 10935c: 68 7b 62 12 00 push $0x12627b <== NOT EXECUTED 109361: e8 32 f2 00 00 call 118598 <== NOT EXECUTED assert(0); 109366: 68 ee 43 12 00 push $0x1243ee <== NOT EXECUTED 10936b: 68 08 64 12 00 push $0x126408 <== NOT EXECUTED 109370: 6a 5d push $0x5d <== NOT EXECUTED 109372: 68 ec 62 12 00 push $0x1262ec <== NOT EXECUTED 109377: e8 d8 07 00 00 call 109b54 <__assert_func> <== NOT EXECUTED case IMFS_DIRECTORY: fprintf(stdout, "/" ); break; case IMFS_DEVICE: fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")", 10937c: ff 73 54 pushl 0x54(%ebx) 10937f: ff 73 50 pushl 0x50(%ebx) 109382: 68 4d 62 12 00 push $0x12624d 109387: a1 80 b6 12 00 mov 0x12b680,%eax 10938c: ff 70 08 pushl 0x8(%eax) 10938f: e8 7c e6 00 00 call 117a10 the_jnode->info.device.major, the_jnode->info.device.minor ); break; 109394: 83 c4 10 add $0x10,%esp default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); 109397: c7 45 08 97 65 12 00 movl $0x126597,0x8(%ebp) } 10939e: 8b 5d fc mov -0x4(%ebp),%ebx 1093a1: c9 leave default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); 1093a2: e9 49 fe 00 00 jmp 1191f0 1093a7: 90 nop <== NOT EXECUTED assert( the_jnode ); fprintf(stdout, "%s", the_jnode->name ); switch( the_jnode->type ) { case IMFS_DIRECTORY: fprintf(stdout, "/" ); 1093a8: 83 ec 08 sub $0x8,%esp 1093ab: a1 80 b6 12 00 mov 0x12b680,%eax 1093b0: ff 70 08 pushl 0x8(%eax) 1093b3: 6a 2f push $0x2f 1093b5: e8 92 e6 00 00 call 117a4c break; 1093ba: 83 c4 10 add $0x10,%esp default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); 1093bd: c7 45 08 97 65 12 00 movl $0x126597,0x8(%ebp) } 1093c4: 8b 5d fc mov -0x4(%ebp),%ebx 1093c7: c9 leave default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); 1093c8: e9 23 fe 00 00 jmp 1191f0 void IMFS_print_jnode( IMFS_jnode_t *the_jnode ) { assert( the_jnode ); 1093cd: 68 43 62 12 00 push $0x126243 <== NOT EXECUTED 1093d2: 68 08 64 12 00 push $0x126408 <== NOT EXECUTED 1093d7: 6a 38 push $0x38 <== NOT EXECUTED 1093d9: 68 ec 62 12 00 push $0x1262ec <== NOT EXECUTED 1093de: e8 71 07 00 00 call 109b54 <__assert_func> <== NOT EXECUTED 00108c34 : int IMFS_readlink( rtems_filesystem_location_info_t *loc, char *buf, /* OUT */ size_t bufsize ) { 108c34: 55 push %ebp 108c35: 89 e5 mov %esp,%ebp 108c37: 57 push %edi 108c38: 56 push %esi 108c39: 53 push %ebx 108c3a: 83 ec 0c sub $0xc,%esp 108c3d: 8b 7d 0c mov 0xc(%ebp),%edi 108c40: 8b 75 10 mov 0x10(%ebp),%esi IMFS_jnode_t *node; int i; node = loc->node_access; 108c43: 8b 45 08 mov 0x8(%ebp),%eax 108c46: 8b 18 mov (%eax),%ebx if ( node->type != IMFS_SYM_LINK ) 108c48: 83 7b 4c 04 cmpl $0x4,0x4c(%ebx) 108c4c: 75 36 jne 108c84 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); for( i=0; ((iinfo.sym_link.name[i] != '\0')); i++ ) 108c4e: 85 f6 test %esi,%esi 108c50: 74 2e je 108c80 <== ALWAYS TAKEN 108c52: 8b 43 50 mov 0x50(%ebx),%eax 108c55: 8a 10 mov (%eax),%dl 108c57: 84 d2 test %dl,%dl 108c59: 74 25 je 108c80 <== ALWAYS TAKEN int i; node = loc->node_access; if ( node->type != IMFS_SYM_LINK ) rtems_set_errno_and_return_minus_one( EINVAL ); 108c5b: 31 c9 xor %ecx,%ecx 108c5d: 31 c0 xor %eax,%eax 108c5f: eb 0d jmp 108c6e <== ALWAYS TAKEN 108c61: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED for( i=0; ((iinfo.sym_link.name[i] != '\0')); i++ ) 108c64: 8b 53 50 mov 0x50(%ebx),%edx 108c67: 8a 14 02 mov (%edx,%eax,1),%dl 108c6a: 84 d2 test %dl,%dl 108c6c: 74 0a je 108c78 buf[i] = node->info.sym_link.name[i]; 108c6e: 88 14 0f mov %dl,(%edi,%ecx,1) node = loc->node_access; if ( node->type != IMFS_SYM_LINK ) rtems_set_errno_and_return_minus_one( EINVAL ); for( i=0; ((iinfo.sym_link.name[i] != '\0')); i++ ) 108c71: 40 inc %eax 108c72: 89 c1 mov %eax,%ecx 108c74: 39 c6 cmp %eax,%esi 108c76: 77 ec ja 108c64 buf[i] = node->info.sym_link.name[i]; return i; } 108c78: 83 c4 0c add $0xc,%esp 108c7b: 5b pop %ebx 108c7c: 5e pop %esi 108c7d: 5f pop %edi 108c7e: c9 leave 108c7f: c3 ret node = loc->node_access; if ( node->type != IMFS_SYM_LINK ) rtems_set_errno_and_return_minus_one( EINVAL ); for( i=0; ((iinfo.sym_link.name[i] != '\0')); i++ ) 108c80: 31 c0 xor %eax,%eax <== NOT EXECUTED 108c82: eb f4 jmp 108c78 <== NOT EXECUTED int i; node = loc->node_access; if ( node->type != IMFS_SYM_LINK ) rtems_set_errno_and_return_minus_one( EINVAL ); 108c84: e8 2f fd 00 00 call 1189b8 <__errno> <== NOT EXECUTED 108c89: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 108c8f: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 108c94: eb e2 jmp 108c78 <== NOT EXECUTED 00108c98 : 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 */ ) { 108c98: 55 push %ebp <== NOT EXECUTED 108c99: 89 e5 mov %esp,%ebp <== NOT EXECUTED 108c9b: 53 push %ebx <== NOT EXECUTED 108c9c: 83 ec 18 sub $0x18,%esp <== NOT EXECUTED IMFS_jnode_t *the_jnode; IMFS_jnode_t *new_parent; the_jnode = old_loc->node_access; 108c9f: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED 108ca2: 8b 18 mov (%eax),%ebx <== NOT EXECUTED strncpy( the_jnode->name, new_name, IMFS_NAME_MAX ); 108ca4: 6a 20 push $0x20 <== NOT EXECUTED 108ca6: ff 75 14 pushl 0x14(%ebp) <== NOT EXECUTED 108ca9: 8d 43 0c lea 0xc(%ebx),%eax <== NOT EXECUTED 108cac: 50 push %eax <== NOT EXECUTED 108cad: e8 8a 08 01 00 call 11953c <== NOT EXECUTED if ( the_jnode->Parent != NULL ) 108cb2: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 108cb5: 8b 4b 08 mov 0x8(%ebx),%ecx <== NOT EXECUTED 108cb8: 85 c9 test %ecx,%ecx <== NOT EXECUTED 108cba: 74 0c je 108cc8 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 108cbc: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 108cbf: 53 push %ebx <== NOT EXECUTED 108cc0: e8 93 4a 00 00 call 10d758 <_Chain_Extract> <== NOT EXECUTED 108cc5: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_chain_extract( (rtems_chain_node *) the_jnode ); new_parent = new_parent_loc->node_access; 108cc8: 8b 45 10 mov 0x10(%ebp),%eax <== NOT EXECUTED 108ccb: 8b 00 mov (%eax),%eax <== NOT EXECUTED the_jnode->Parent = new_parent; 108ccd: 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 ); 108cd0: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 108cd3: 53 push %ebx <== NOT EXECUTED 108cd4: 83 c0 50 add $0x50,%eax <== NOT EXECUTED 108cd7: 50 push %eax <== NOT EXECUTED 108cd8: e8 57 4a 00 00 call 10d734 <_Chain_Append> <== NOT EXECUTED rtems_chain_append( &new_parent->info.directory.Entries, &the_jnode->Node ); /* * Update the time. */ IMFS_update_ctime( the_jnode ); 108cdd: 58 pop %eax <== NOT EXECUTED 108cde: 5a pop %edx <== NOT EXECUTED 108cdf: 6a 00 push $0x0 <== NOT EXECUTED 108ce1: 8d 45 f0 lea -0x10(%ebp),%eax <== NOT EXECUTED 108ce4: 50 push %eax <== NOT EXECUTED 108ce5: e8 fe 06 00 00 call 1093e8 <== NOT EXECUTED 108cea: 8b 45 f0 mov -0x10(%ebp),%eax <== NOT EXECUTED 108ced: 89 43 48 mov %eax,0x48(%ebx) <== NOT EXECUTED return 0; } 108cf0: 31 c0 xor %eax,%eax <== NOT EXECUTED 108cf2: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 108cf5: c9 leave <== NOT EXECUTED 108cf6: c3 ret <== NOT EXECUTED 0010f788 : int IMFS_rmnod( rtems_filesystem_location_info_t *parent_pathloc, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN */ ) { 10f788: 55 push %ebp 10f789: 89 e5 mov %esp,%ebp 10f78b: 56 push %esi 10f78c: 53 push %ebx 10f78d: 83 ec 10 sub $0x10,%esp 10f790: 8b 75 0c mov 0xc(%ebp),%esi IMFS_jnode_t *the_jnode; the_jnode = (IMFS_jnode_t *) pathloc->node_access; 10f793: 8b 1e mov (%esi),%ebx /* * Take the node out of the parent's chain that contains this node */ if ( the_jnode->Parent != NULL ) { 10f795: 8b 43 08 mov 0x8(%ebx),%eax 10f798: 85 c0 test %eax,%eax 10f79a: 74 13 je 10f7af <== ALWAYS TAKEN */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 10f79c: 83 ec 0c sub $0xc,%esp 10f79f: 53 push %ebx 10f7a0: e8 eb 11 00 00 call 110990 <_Chain_Extract> rtems_chain_extract( (rtems_chain_node *) the_jnode ); the_jnode->Parent = NULL; 10f7a5: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx) 10f7ac: 83 c4 10 add $0x10,%esp /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; 10f7af: 66 ff 4b 34 decw 0x34(%ebx) IMFS_update_ctime( the_jnode ); 10f7b3: 83 ec 08 sub $0x8,%esp 10f7b6: 6a 00 push $0x0 10f7b8: 8d 45 f0 lea -0x10(%ebp),%eax 10f7bb: 50 push %eax 10f7bc: e8 a7 02 00 00 call 10fa68 10f7c1: 8b 45 f0 mov -0x10(%ebp),%eax 10f7c4: 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) ) { 10f7c7: 89 1c 24 mov %ebx,(%esp) 10f7ca: e8 61 03 00 00 call 10fb30 <== ALWAYS TAKEN 10f7cf: 83 c4 10 add $0x10,%esp 10f7d2: 85 c0 test %eax,%eax 10f7d4: 75 25 jne 10f7fb <== ALWAYS TAKEN 10f7d6: 66 83 7b 34 00 cmpw $0x0,0x34(%ebx) 10f7db: 75 1e jne 10f7fb <== ALWAYS TAKEN /* * Is rtems_filesystem_current this node? */ if ( rtems_filesystem_current.node_access == pathloc->node_access ) 10f7dd: a1 f8 4f 12 00 mov 0x124ff8,%eax 10f7e2: 8b 50 04 mov 0x4(%eax),%edx 10f7e5: 3b 16 cmp (%esi),%edx 10f7e7: 74 33 je 10f81c <== ALWAYS TAKEN /* * Free memory associated with a memory file. */ if ( the_jnode->type == IMFS_SYM_LINK ) { 10f7e9: 83 7b 4c 04 cmpl $0x4,0x4c(%ebx) 10f7ed: 74 15 je 10f804 if ( the_jnode->info.sym_link.name ) free( (void*) the_jnode->info.sym_link.name ); } free( the_jnode ); 10f7ef: 83 ec 0c sub $0xc,%esp 10f7f2: 53 push %ebx 10f7f3: e8 e4 87 ff ff call 107fdc 10f7f8: 83 c4 10 add $0x10,%esp } return 0; } 10f7fb: 31 c0 xor %eax,%eax 10f7fd: 8d 65 f8 lea -0x8(%ebp),%esp 10f800: 5b pop %ebx 10f801: 5e pop %esi 10f802: c9 leave 10f803: c3 ret /* * Free memory associated with a memory file. */ if ( the_jnode->type == IMFS_SYM_LINK ) { if ( the_jnode->info.sym_link.name ) 10f804: 8b 43 50 mov 0x50(%ebx),%eax 10f807: 85 c0 test %eax,%eax 10f809: 74 e4 je 10f7ef <== ALWAYS TAKEN free( (void*) the_jnode->info.sym_link.name ); 10f80b: 83 ec 0c sub $0xc,%esp 10f80e: 50 push %eax 10f80f: e8 c8 87 ff ff call 107fdc 10f814: 83 c4 10 add $0x10,%esp 10f817: eb d6 jmp 10f7ef <== ALWAYS TAKEN 10f819: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED /* * Is rtems_filesystem_current this node? */ if ( rtems_filesystem_current.node_access == pathloc->node_access ) rtems_filesystem_current.node_access = NULL; 10f81c: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax) <== NOT EXECUTED 10f823: eb c4 jmp 10f7e9 <== NOT EXECUTED 0010f828 : int IMFS_stat( rtems_filesystem_location_info_t *loc, struct stat *buf ) { 10f828: 55 push %ebp 10f829: 89 e5 mov %esp,%ebp 10f82b: 53 push %ebx 10f82c: 83 ec 04 sub $0x4,%esp 10f82f: 8b 55 0c mov 0xc(%ebp),%edx IMFS_jnode_t *the_jnode; IMFS_device_t *io; the_jnode = loc->node_access; 10f832: 8b 45 08 mov 0x8(%ebp),%eax 10f835: 8b 00 mov (%eax),%eax switch ( the_jnode->type ) { 10f837: 83 78 4c 07 cmpl $0x7,0x4c(%eax) 10f83b: 76 17 jbe 10f854 <== NEVER TAKEN case IMFS_FIFO: buf->st_size = 0; break; default: rtems_set_errno_and_return_minus_one( ENOTSUP ); 10f83d: e8 ce 3f 00 00 call 113810 <__errno> <== NOT EXECUTED 10f842: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 10f848: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED buf->st_atime = the_jnode->stat_atime; buf->st_mtime = the_jnode->stat_mtime; buf->st_ctime = the_jnode->stat_ctime; return 0; } 10f84d: 5a pop %edx <== NOT EXECUTED 10f84e: 5b pop %ebx <== NOT EXECUTED 10f84f: c9 leave <== NOT EXECUTED 10f850: c3 ret <== NOT EXECUTED 10f851: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED IMFS_device_t *io; the_jnode = loc->node_access; switch ( the_jnode->type ) { 10f854: 8b 48 4c mov 0x4c(%eax),%ecx 10f857: ff 24 8d d8 11 12 00 jmp *0x1211d8(,%ecx,4) 10f85e: 66 90 xchg %ax,%ax <== NOT EXECUTED case IMFS_SYM_LINK: buf->st_size = 0; break; case IMFS_FIFO: buf->st_size = 0; 10f860: c7 42 20 00 00 00 00 movl $0x0,0x20(%edx) <== NOT EXECUTED default: rtems_set_errno_and_return_minus_one( ENOTSUP ); break; } buf->st_mode = the_jnode->st_mode; 10f867: 8b 48 30 mov 0x30(%eax),%ecx 10f86a: 89 4a 0c mov %ecx,0xc(%edx) buf->st_nlink = the_jnode->st_nlink; 10f86d: 8b 48 34 mov 0x34(%eax),%ecx 10f870: 66 89 4a 10 mov %cx,0x10(%edx) buf->st_ino = the_jnode->st_ino; 10f874: 8b 48 38 mov 0x38(%eax),%ecx 10f877: 89 4a 08 mov %ecx,0x8(%edx) buf->st_uid = the_jnode->st_uid; 10f87a: 8b 48 3c mov 0x3c(%eax),%ecx 10f87d: 66 89 4a 12 mov %cx,0x12(%edx) buf->st_gid = the_jnode->st_gid; 10f881: 66 8b 48 3e mov 0x3e(%eax),%cx 10f885: 66 89 4a 14 mov %cx,0x14(%edx) buf->st_atime = the_jnode->stat_atime; 10f889: 8b 48 40 mov 0x40(%eax),%ecx 10f88c: 89 4a 24 mov %ecx,0x24(%edx) buf->st_mtime = the_jnode->stat_mtime; 10f88f: 8b 48 44 mov 0x44(%eax),%ecx 10f892: 89 4a 2c mov %ecx,0x2c(%edx) buf->st_ctime = the_jnode->stat_ctime; 10f895: 8b 40 48 mov 0x48(%eax),%eax 10f898: 89 42 34 mov %eax,0x34(%edx) 10f89b: 31 c0 xor %eax,%eax return 0; } 10f89d: 5a pop %edx 10f89e: 5b pop %ebx 10f89f: c9 leave 10f8a0: c3 ret 10f8a1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED switch ( the_jnode->type ) { case IMFS_DEVICE: io = &the_jnode->info.device; buf->st_rdev = rtems_filesystem_make_dev_t( io->major, io->minor ); 10f8a4: 8b 48 54 mov 0x54(%eax),%ecx rtems_device_minor_number _minor ) { union __rtems_dev_t temp; temp.__overlay.major = _major; 10f8a7: 8b 58 50 mov 0x50(%eax),%ebx 10f8aa: 89 5a 18 mov %ebx,0x18(%edx) 10f8ad: 89 4a 1c mov %ecx,0x1c(%edx) break; 10f8b0: eb b5 jmp 10f867 <== ALWAYS TAKEN 10f8b2: 66 90 xchg %ax,%ax <== NOT EXECUTED case IMFS_LINEAR_FILE: case IMFS_MEMORY_FILE: buf->st_size = the_jnode->info.file.size; 10f8b4: 8b 48 50 mov 0x50(%eax),%ecx 10f8b7: 89 4a 20 mov %ecx,0x20(%edx) break; 10f8ba: eb ab jmp 10f867 <== ALWAYS TAKEN 00108cf8 : int IMFS_symlink( rtems_filesystem_location_info_t *parent_loc, const char *link_name, const char *node_name ) { 108cf8: 55 push %ebp 108cf9: 89 e5 mov %esp,%ebp 108cfb: 57 push %edi 108cfc: 53 push %ebx 108cfd: 83 ec 40 sub $0x40,%esp 108d00: 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 ); 108d03: 31 c0 xor %eax,%eax 108d05: b9 ff ff ff ff mov $0xffffffff,%ecx 108d0a: 89 d7 mov %edx,%edi 108d0c: f2 ae repnz scas %es:(%edi),%al 108d0e: f7 d1 not %ecx 108d10: 49 dec %ecx 108d11: 8d 45 f4 lea -0xc(%ebp),%eax 108d14: 50 push %eax 108d15: 8d 5d bf lea -0x41(%ebp),%ebx 108d18: 53 push %ebx 108d19: 51 push %ecx 108d1a: 52 push %edx 108d1b: e8 58 b6 00 00 call 114378 /* * Duplicate link name */ info.sym_link.name = strdup(link_name); 108d20: 58 pop %eax 108d21: ff 75 0c pushl 0xc(%ebp) 108d24: e8 37 07 01 00 call 119460 108d29: 89 45 e0 mov %eax,-0x20(%ebp) if (info.sym_link.name == NULL) { 108d2c: 83 c4 10 add $0x10,%esp 108d2f: 85 c0 test %eax,%eax 108d31: 74 27 je 108d5a <== ALWAYS TAKEN * was ONLY passed a NULL when we created the root node. We * added a new IMFS_create_root_node() so this path no longer * existed. The result was simpler code which should not have * this path. */ new_node = IMFS_create_node( 108d33: 83 ec 0c sub $0xc,%esp 108d36: 8d 45 e0 lea -0x20(%ebp),%eax 108d39: 50 push %eax 108d3a: 68 ff a1 00 00 push $0xa1ff 108d3f: 53 push %ebx 108d40: 6a 04 push $0x4 108d42: ff 75 08 pushl 0x8(%ebp) 108d45: e8 46 aa 00 00 call 113790 new_name, ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if (new_node == NULL) { 108d4a: 83 c4 20 add $0x20,%esp 108d4d: 85 c0 test %eax,%eax 108d4f: 74 1b je 108d6c <== ALWAYS TAKEN 108d51: 31 c0 xor %eax,%eax free(info.sym_link.name); rtems_set_errno_and_return_minus_one(ENOMEM); } return 0; } 108d53: 8d 65 f8 lea -0x8(%ebp),%esp 108d56: 5b pop %ebx 108d57: 5f pop %edi 108d58: c9 leave 108d59: c3 ret /* * Duplicate link name */ info.sym_link.name = strdup(link_name); if (info.sym_link.name == NULL) { rtems_set_errno_and_return_minus_one(ENOMEM); 108d5a: e8 59 fc 00 00 call 1189b8 <__errno> <== NOT EXECUTED 108d5f: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED 108d65: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 108d6a: eb e7 jmp 108d53 <== NOT EXECUTED ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if (new_node == NULL) { free(info.sym_link.name); 108d6c: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 108d6f: ff 75 e0 pushl -0x20(%ebp) <== NOT EXECUTED 108d72: e8 f5 05 00 00 call 10936c <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOMEM); 108d77: e8 3c fc 00 00 call 1189b8 <__errno> <== NOT EXECUTED 108d7c: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED 108d82: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 108d87: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 108d8a: eb c7 jmp 108d53 <== NOT EXECUTED 00108d8c : int IMFS_unlink( rtems_filesystem_location_info_t *parentloc, /* IN */ rtems_filesystem_location_info_t *loc /* IN */ ) { 108d8c: 55 push %ebp 108d8d: 89 e5 mov %esp,%ebp 108d8f: 57 push %edi 108d90: 56 push %esi 108d91: 53 push %ebx 108d92: 83 ec 3c sub $0x3c,%esp 108d95: 8b 5d 0c mov 0xc(%ebp),%ebx IMFS_jnode_t *node; rtems_filesystem_location_info_t the_link; int result = 0; node = loc->node_access; 108d98: 8b 13 mov (%ebx),%edx /* * If this is the last last pointer to the node * free the node. */ if ( node->type == IMFS_HARD_LINK ) { 108d9a: 83 7a 4c 03 cmpl $0x3,0x4c(%edx) 108d9e: 74 18 je 108db8 /* * Now actually free the node we were asked to free. */ result = (*loc->handlers->rmnod_h)( parentloc, loc ); 108da0: 83 ec 08 sub $0x8,%esp 108da3: 8b 43 08 mov 0x8(%ebx),%eax 108da6: 53 push %ebx 108da7: ff 75 08 pushl 0x8(%ebp) 108daa: ff 50 34 call *0x34(%eax) return result; 108dad: 83 c4 10 add $0x10,%esp } 108db0: 8d 65 f4 lea -0xc(%ebp),%esp 108db3: 5b pop %ebx 108db4: 5e pop %esi 108db5: 5f pop %edi 108db6: c9 leave 108db7: c3 ret * free the node. */ if ( node->type == IMFS_HARD_LINK ) { if ( !node->info.hard_link.link_node ) 108db8: 8b 42 50 mov 0x50(%edx),%eax 108dbb: 85 c0 test %eax,%eax 108dbd: 74 79 je 108e38 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); the_link = *loc; 108dbf: 8d 7d cc lea -0x34(%ebp),%edi 108dc2: b9 05 00 00 00 mov $0x5,%ecx 108dc7: 89 de mov %ebx,%esi 108dc9: f3 a5 rep movsl %ds:(%esi),%es:(%edi) the_link.node_access = node->info.hard_link.link_node; 108dcb: 89 45 cc mov %eax,-0x34(%ebp) IMFS_Set_handlers( &the_link ); 108dce: 83 ec 0c sub $0xc,%esp 108dd1: 8d 75 cc lea -0x34(%ebp),%esi 108dd4: 56 push %esi 108dd5: 89 55 c4 mov %edx,-0x3c(%ebp) 108dd8: e8 bf aa 00 00 call 11389c /* * 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) 108ddd: 8b 55 c4 mov -0x3c(%ebp),%edx 108de0: 8b 42 50 mov 0x50(%edx),%eax 108de3: 8b 48 34 mov 0x34(%eax),%ecx 108de6: 83 c4 10 add $0x10,%esp 108de9: 66 83 f9 01 cmp $0x1,%cx 108ded: 74 27 je 108e16 if ( result != 0 ) return -1; } else { node->info.hard_link.link_node->st_nlink --; 108def: 49 dec %ecx 108df0: 66 89 48 34 mov %cx,0x34(%eax) IMFS_update_ctime( node->info.hard_link.link_node ); 108df4: 83 ec 08 sub $0x8,%esp 108df7: 6a 00 push $0x0 108df9: 8d 45 e0 lea -0x20(%ebp),%eax 108dfc: 50 push %eax 108dfd: 89 55 c4 mov %edx,-0x3c(%ebp) 108e00: e8 e3 05 00 00 call 1093e8 108e05: 8b 55 c4 mov -0x3c(%ebp),%edx 108e08: 8b 42 50 mov 0x50(%edx),%eax 108e0b: 8b 55 e0 mov -0x20(%ebp),%edx 108e0e: 89 50 48 mov %edx,0x48(%eax) 108e11: 83 c4 10 add $0x10,%esp 108e14: eb 8a jmp 108da0 <== ALWAYS TAKEN * to remove the node that is a link and the node itself. */ if ( node->info.hard_link.link_node->st_nlink == 1) { result = (*the_link.handlers->rmnod_h)( parentloc, &the_link ); 108e16: 83 ec 08 sub $0x8,%esp 108e19: 56 push %esi 108e1a: ff 75 08 pushl 0x8(%ebp) 108e1d: 8b 45 d4 mov -0x2c(%ebp),%eax 108e20: ff 50 34 call *0x34(%eax) if ( result != 0 ) 108e23: 83 c4 10 add $0x10,%esp 108e26: 85 c0 test %eax,%eax 108e28: 0f 84 72 ff ff ff je 108da0 108e2e: b8 ff ff ff ff mov $0xffffffff,%eax 108e33: e9 78 ff ff ff jmp 108db0 <== ALWAYS TAKEN */ if ( node->type == IMFS_HARD_LINK ) { if ( !node->info.hard_link.link_node ) rtems_set_errno_and_return_minus_one( EINVAL ); 108e38: e8 7b fb 00 00 call 1189b8 <__errno> <== NOT EXECUTED 108e3d: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 108e43: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 108e48: e9 63 ff ff ff jmp 108db0 <== NOT EXECUTED 00108e50 : #include int IMFS_unmount( rtems_filesystem_mount_table_entry_t *mt_entry ) { 108e50: 55 push %ebp 108e51: 89 e5 mov %esp,%ebp 108e53: 83 ec 08 sub $0x8,%esp IMFS_jnode_t *node; node = mt_entry->mt_point_node.node_access; 108e56: 8b 45 08 mov 0x8(%ebp),%eax 108e59: 8b 40 08 mov 0x8(%eax),%eax /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 108e5c: 83 78 4c 01 cmpl $0x1,0x4c(%eax) 108e60: 75 12 jne 108e74 <== ALWAYS TAKEN /* * Did the node indicate that there was a directory mounted here? */ if ( node->info.directory.mt_fs == NULL ) 108e62: 8b 50 5c mov 0x5c(%eax),%edx 108e65: 85 d2 test %edx,%edx 108e67: 74 1d je 108e86 <== ALWAYS TAKEN /* * Set the mt_fs pointer to indicate that there is no longer * a file system mounted to this point. */ node->info.directory.mt_fs = NULL; 108e69: c7 40 5c 00 00 00 00 movl $0x0,0x5c(%eax) 108e70: 31 c0 xor %eax,%eax return 0; } 108e72: c9 leave 108e73: c3 ret /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); 108e74: e8 3f fb 00 00 call 1189b8 <__errno> <== NOT EXECUTED 108e79: c7 00 14 00 00 00 movl $0x14,(%eax) <== NOT EXECUTED 108e7f: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED */ node->info.directory.mt_fs = NULL; return 0; } 108e84: c9 leave <== NOT EXECUTED 108e85: c3 ret <== NOT EXECUTED /* * Did the node indicate that there was a directory mounted here? */ if ( node->info.directory.mt_fs == NULL ) rtems_set_errno_and_return_minus_one( EINVAL ); /* XXX */ 108e86: e8 2d fb 00 00 call 1189b8 <__errno> <== NOT EXECUTED 108e8b: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 108e91: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED */ node->info.directory.mt_fs = NULL; return 0; } 108e96: c9 leave <== NOT EXECUTED 108e97: c3 ret <== NOT EXECUTED 00108180 : void RTEMS_Malloc_Initialize( void *heap_begin, uintptr_t heap_size, size_t sbrk_amount ) { 108180: 55 push %ebp 108181: 89 e5 mov %esp,%ebp 108183: 57 push %edi 108184: 56 push %esi 108185: 53 push %ebx 108186: 83 ec 0c sub $0xc,%esp 108189: 8b 5d 08 mov 0x8(%ebp),%ebx 10818c: 8b 75 0c mov 0xc(%ebp),%esi #endif /* * If configured, initialize the statistics support */ if ( rtems_malloc_statistics_helpers != NULL ) { 10818f: a1 08 56 12 00 mov 0x125608,%eax 108194: 85 c0 test %eax,%eax 108196: 74 02 je 10819a <== NEVER TAKEN (*rtems_malloc_statistics_helpers->initialize)(); 108198: ff 10 call *(%eax) <== NOT EXECUTED } /* * Initialize the garbage collection list to start with nothing on it. */ malloc_deferred_frees_initialize(); 10819a: e8 79 ff ff ff call 108118 <== ALWAYS TAKEN /* * Initialize the optional sbrk support for extending the heap */ if ( rtems_malloc_sbrk_helpers != NULL ) { 10819f: a1 0c 56 12 00 mov 0x12560c,%eax 1081a4: 85 c0 test %eax,%eax 1081a6: 74 13 je 1081bb <== NEVER TAKEN void *new_heap_begin = (*rtems_malloc_sbrk_helpers->initialize)( 1081a8: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 1081ab: ff 75 10 pushl 0x10(%ebp) <== NOT EXECUTED 1081ae: 53 push %ebx <== NOT EXECUTED 1081af: ff 10 call *(%eax) <== NOT EXECUTED heap_begin, sbrk_amount ); heap_size -= (uintptr_t) new_heap_begin - (uintptr_t) heap_begin; 1081b1: 8d 34 33 lea (%ebx,%esi,1),%esi <== NOT EXECUTED 1081b4: 29 c6 sub %eax,%esi <== NOT EXECUTED 1081b6: 89 c3 mov %eax,%ebx <== NOT EXECUTED 1081b8: 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 ( 1081bb: 80 3d 05 56 12 00 00 cmpb $0x0,0x125605 1081c2: 75 1f jne 1081e3 !rtems_unified_work_area && rtems_configuration_get_do_zero_of_workspace() 1081c4: 80 3d 48 32 12 00 00 cmpb $0x0,0x123248 1081cb: 75 3f jne 10820c void *area_begin, uintptr_t area_size, uintptr_t page_size ) { return _Heap_Initialize( heap, area_begin, area_size, page_size ); 1081cd: 6a 04 push $0x4 1081cf: 56 push %esi 1081d0: 53 push %ebx 1081d1: ff 35 58 31 12 00 pushl 0x123158 1081d7: e8 f8 41 00 00 call 10c3d4 <_Heap_Initialize> RTEMS_Malloc_Heap, heap_begin, heap_size, CPU_HEAP_ALIGNMENT ); if ( status == 0 ) { 1081dc: 83 c4 10 add $0x10,%esp 1081df: 85 c0 test %eax,%eax 1081e1: 74 3c je 10821f <== ALWAYS TAKEN rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); } } MSBUMP( space_available, _Protected_heap_Get_size(RTEMS_Malloc_Heap) ); 1081e3: 8b 1d 60 72 12 00 mov 0x127260,%ebx 1081e9: 83 ec 0c sub $0xc,%esp 1081ec: ff 35 58 31 12 00 pushl 0x123158 1081f2: e8 7d 4d 00 00 call 10cf74 <_Protected_heap_Get_size> 1081f7: 8d 1c 18 lea (%eax,%ebx,1),%ebx 1081fa: 89 1d 60 72 12 00 mov %ebx,0x127260 108200: 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 } 108203: 8d 65 f4 lea -0xc(%ebp),%esp 108206: 5b pop %ebx 108207: 5e pop %esi 108208: 5f pop %edi 108209: c9 leave 10820a: c3 ret 10820b: 90 nop <== NOT EXECUTED if ( !rtems_unified_work_area && rtems_configuration_get_do_zero_of_workspace() ) { memset( heap_begin, 0, heap_size ); 10820c: 31 c0 xor %eax,%eax 10820e: 89 df mov %ebx,%edi 108210: 89 f1 mov %esi,%ecx 108212: 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 ) { 108214: 80 3d 05 56 12 00 00 cmpb $0x0,0x125605 10821b: 74 b0 je 1081cd <== NEVER TAKEN 10821d: eb c4 jmp 1081e3 <== NOT EXECUTED heap_begin, heap_size, CPU_HEAP_ALIGNMENT ); if ( status == 0 ) { rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); 10821f: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 108222: 6a 1a push $0x1a <== NOT EXECUTED 108224: e8 73 39 00 00 call 10bb9c <== NOT EXECUTED 0010b49c : static rtems_printk_plugin_t print_handler; void Stack_check_Dump_threads_usage( Thread_Control *the_thread ) { 10b49c: 55 push %ebp <== NOT EXECUTED 10b49d: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10b49f: 57 push %edi <== NOT EXECUTED 10b4a0: 56 push %esi <== NOT EXECUTED 10b4a1: 53 push %ebx <== NOT EXECUTED 10b4a2: 83 ec 2c sub $0x2c,%esp <== NOT EXECUTED 10b4a5: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED void *high_water_mark; void *current; Stack_Control *stack; char name[5]; if ( !the_thread ) 10b4a8: 85 db test %ebx,%ebx <== NOT EXECUTED 10b4aa: 0f 84 c5 00 00 00 je 10b575 <== NOT EXECUTED return; if ( !print_handler ) 10b4b0: a1 20 c1 16 00 mov 0x16c120,%eax <== NOT EXECUTED 10b4b5: 89 45 d0 mov %eax,-0x30(%ebp) <== NOT EXECUTED 10b4b8: 85 c0 test %eax,%eax <== NOT EXECUTED 10b4ba: 0f 84 b5 00 00 00 je 10b575 <== NOT EXECUTED /* * Obtain interrupt stack information */ if (the_thread == (Thread_Control *) -1) { 10b4c0: 83 fb ff cmp $0xffffffff,%ebx <== NOT EXECUTED 10b4c3: 0f 84 d7 00 00 00 je 10b5a0 <== NOT EXECUTED current = 0; } else return; } else { stack = &the_thread->Start.Initial_stack; 10b4c9: 8d b3 c4 00 00 00 lea 0xc4(%ebx),%esi <== NOT EXECUTED current = (void *)_CPU_Context_Get_SP( &the_thread->Registers ); 10b4cf: 8b 93 d8 00 00 00 mov 0xd8(%ebx),%edx <== NOT EXECUTED 10b4d5: 89 55 cc mov %edx,-0x34(%ebp) <== NOT EXECUTED } low = Stack_check_usable_stack_start(stack); 10b4d8: 8b 46 04 mov 0x4(%esi),%eax <== NOT EXECUTED 10b4db: 83 c0 10 add $0x10,%eax <== NOT EXECUTED 10b4de: 89 45 d4 mov %eax,-0x2c(%ebp) <== NOT EXECUTED size = Stack_check_usable_stack_size(stack); 10b4e1: 8b 3e mov (%esi),%edi <== NOT EXECUTED 10b4e3: 83 ef 10 sub $0x10,%edi <== NOT EXECUTED high_water_mark = Stack_check_find_high_water_mark(low, size); 10b4e6: 57 push %edi <== NOT EXECUTED 10b4e7: 50 push %eax <== NOT EXECUTED 10b4e8: e8 77 ff ff ff call 10b464 <== NOT EXECUTED if ( high_water_mark ) 10b4ed: 59 pop %ecx <== NOT EXECUTED 10b4ee: 5a pop %edx <== NOT EXECUTED 10b4ef: 85 c0 test %eax,%eax <== NOT EXECUTED 10b4f1: 0f 84 c9 00 00 00 je 10b5c0 <== NOT EXECUTED used = Stack_check_Calculate_used( low, size, high_water_mark ); 10b4f7: 8b 55 d4 mov -0x2c(%ebp),%edx <== NOT EXECUTED 10b4fa: 01 fa add %edi,%edx <== NOT EXECUTED 10b4fc: 29 c2 sub %eax,%edx <== NOT EXECUTED 10b4fe: 89 55 d4 mov %edx,-0x2c(%ebp) <== NOT EXECUTED else used = 0; if ( the_thread ) { 10b501: 85 db test %ebx,%ebx <== NOT EXECUTED 10b503: 0f 84 c7 00 00 00 je 10b5d0 <== NOT EXECUTED (*print_handler)( 10b509: 52 push %edx <== NOT EXECUTED 10b50a: 8d 45 e3 lea -0x1d(%ebp),%eax <== NOT EXECUTED 10b50d: 50 push %eax <== NOT EXECUTED 10b50e: 6a 05 push $0x5 <== NOT EXECUTED 10b510: ff 73 08 pushl 0x8(%ebx) <== NOT EXECUTED 10b513: e8 24 5e 00 00 call 11133c <== NOT EXECUTED 10b518: 50 push %eax <== NOT EXECUTED 10b519: ff 73 08 pushl 0x8(%ebx) <== NOT EXECUTED 10b51c: 68 3c ac 15 00 push $0x15ac3c <== NOT EXECUTED 10b521: ff 35 1c c1 16 00 pushl 0x16c11c <== NOT EXECUTED 10b527: ff 55 d0 call *-0x30(%ebp) <== NOT EXECUTED 10b52a: 83 c4 20 add $0x20,%esp <== NOT EXECUTED ); } else { (*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 ); } (*print_handler)( 10b52d: 8b 46 04 mov 0x4(%esi),%eax <== NOT EXECUTED 10b530: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 10b533: 57 push %edi <== NOT EXECUTED 10b534: ff 75 cc pushl -0x34(%ebp) <== NOT EXECUTED 10b537: 8b 16 mov (%esi),%edx <== NOT EXECUTED 10b539: 8d 54 10 ff lea -0x1(%eax,%edx,1),%edx <== NOT EXECUTED 10b53d: 52 push %edx <== NOT EXECUTED 10b53e: 50 push %eax <== NOT EXECUTED 10b53f: 68 57 ac 15 00 push $0x15ac57 <== NOT EXECUTED 10b544: ff 35 1c c1 16 00 pushl 0x16c11c <== NOT EXECUTED 10b54a: ff 15 20 c1 16 00 call *0x16c120 <== NOT EXECUTED stack->area + stack->size - 1, current, size ); if (Stack_check_Initialized == 0) { 10b550: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 10b553: 8b 1d 18 c1 16 00 mov 0x16c118,%ebx <== NOT EXECUTED 10b559: 85 db test %ebx,%ebx <== NOT EXECUTED 10b55b: 74 23 je 10b580 <== NOT EXECUTED (*print_handler)( print_context, "Unavailable\n" ); } else { (*print_handler)( print_context, "%8" PRId32 "\n", used ); 10b55d: 51 push %ecx <== NOT EXECUTED 10b55e: ff 75 d4 pushl -0x2c(%ebp) <== NOT EXECUTED 10b561: 68 82 ac 15 00 push $0x15ac82 <== NOT EXECUTED 10b566: ff 35 1c c1 16 00 pushl 0x16c11c <== NOT EXECUTED 10b56c: ff 15 20 c1 16 00 call *0x16c120 <== NOT EXECUTED 10b572: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } } 10b575: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 10b578: 5b pop %ebx <== NOT EXECUTED 10b579: 5e pop %esi <== NOT EXECUTED 10b57a: 5f pop %edi <== NOT EXECUTED 10b57b: c9 leave <== NOT EXECUTED 10b57c: c3 ret <== NOT EXECUTED 10b57d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED current, size ); if (Stack_check_Initialized == 0) { (*print_handler)( print_context, "Unavailable\n" ); 10b580: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 10b583: 68 75 ac 15 00 push $0x15ac75 <== NOT EXECUTED 10b588: ff 35 1c c1 16 00 pushl 0x16c11c <== NOT EXECUTED 10b58e: ff 15 20 c1 16 00 call *0x16c120 <== NOT EXECUTED 10b594: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } else { (*print_handler)( print_context, "%8" PRId32 "\n", used ); } } 10b597: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 10b59a: 5b pop %ebx <== NOT EXECUTED 10b59b: 5e pop %esi <== NOT EXECUTED 10b59c: 5f pop %edi <== NOT EXECUTED 10b59d: c9 leave <== NOT EXECUTED 10b59e: c3 ret <== NOT EXECUTED 10b59f: 90 nop <== NOT EXECUTED /* * Obtain interrupt stack information */ if (the_thread == (Thread_Control *) -1) { if (Stack_check_Interrupt_stack.area) { 10b5a0: 8b 0d 94 ee 16 00 mov 0x16ee94,%ecx <== NOT EXECUTED 10b5a6: 85 c9 test %ecx,%ecx <== NOT EXECUTED 10b5a8: 74 cb je 10b575 <== NOT EXECUTED 10b5aa: be 90 ee 16 00 mov $0x16ee90,%esi <== NOT EXECUTED 10b5af: c7 45 cc 00 00 00 00 movl $0x0,-0x34(%ebp) <== NOT EXECUTED 10b5b6: 31 db xor %ebx,%ebx <== NOT EXECUTED 10b5b8: e9 1b ff ff ff jmp 10b4d8 <== NOT EXECUTED 10b5bd: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED low = Stack_check_usable_stack_start(stack); size = Stack_check_usable_stack_size(stack); high_water_mark = Stack_check_find_high_water_mark(low, size); if ( high_water_mark ) 10b5c0: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp) <== NOT EXECUTED used = Stack_check_Calculate_used( low, size, high_water_mark ); else used = 0; if ( the_thread ) { 10b5c7: 85 db test %ebx,%ebx <== NOT EXECUTED 10b5c9: 0f 85 3a ff ff ff jne 10b509 <== NOT EXECUTED 10b5cf: 90 nop <== 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 ); 10b5d0: 50 push %eax <== NOT EXECUTED 10b5d1: 6a ff push $0xffffffff <== NOT EXECUTED 10b5d3: 68 49 ac 15 00 push $0x15ac49 <== NOT EXECUTED 10b5d8: ff 35 1c c1 16 00 pushl 0x16c11c <== NOT EXECUTED 10b5de: ff 55 d0 call *-0x30(%ebp) <== NOT EXECUTED 10b5e1: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10b5e4: e9 44 ff ff ff jmp 10b52d <== NOT EXECUTED 0010b7f4 : /* * Stack_check_Initialize */ void Stack_check_Initialize( void ) { 10b7f4: 55 push %ebp 10b7f5: 89 e5 mov %esp,%ebp 10b7f7: 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) 10b7f8: 8b 3d 18 c1 16 00 mov 0x16c118,%edi 10b7fe: 85 ff test %edi,%edi 10b800: 75 4d jne 10b84f 10b802: 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 ]; 10b804: 89 c2 mov %eax,%edx 10b806: 83 e2 03 and $0x3,%edx 10b809: 8b 14 95 c0 ad 15 00 mov 0x15adc0(,%edx,4),%edx 10b810: 89 14 85 80 ee 16 00 mov %edx,0x16ee80(,%eax,4) /* * Dope the pattern and fill areas */ p = Stack_check_Pattern.pattern; for ( i = 0; i < PATTERN_SIZE_WORDS; i++ ) { 10b817: 40 inc %eax 10b818: 83 f8 04 cmp $0x4,%eax 10b81b: 75 e7 jne 10b804 /* * 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) { 10b81d: 8b 15 48 f0 16 00 mov 0x16f048,%edx 10b823: 85 d2 test %edx,%edx 10b825: 74 1e je 10b845 <== ALWAYS TAKEN 10b827: 8b 0d 08 f0 16 00 mov 0x16f008,%ecx 10b82d: 85 c9 test %ecx,%ecx 10b82f: 74 14 je 10b845 <== ALWAYS TAKEN Stack_check_Interrupt_stack.area = _CPU_Interrupt_stack_low; 10b831: 89 15 94 ee 16 00 mov %edx,0x16ee94 Stack_check_Interrupt_stack.size = (char *) _CPU_Interrupt_stack_high - 10b837: 29 d1 sub %edx,%ecx 10b839: 89 0d 90 ee 16 00 mov %ecx,0x16ee90 (char *) _CPU_Interrupt_stack_low; Stack_check_Dope_stack(&Stack_check_Interrupt_stack); 10b83f: b0 a5 mov $0xa5,%al 10b841: 89 d7 mov %edx,%edi 10b843: f3 aa rep stos %al,%es:(%edi) } #endif Stack_check_Initialized = 1; 10b845: c7 05 18 c1 16 00 01 movl $0x1,0x16c118 10b84c: 00 00 00 } 10b84f: 5f pop %edi 10b850: c9 leave 10b851: c3 ret 0010b464 : */ void *Stack_check_find_high_water_mark( const void *s, size_t n ) { 10b464: 55 push %ebp <== NOT EXECUTED 10b465: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10b467: 8b 4d 08 mov 0x8(%ebp),%ecx <== NOT EXECUTED 10b46a: 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; 10b46d: 8d 41 10 lea 0x10(%ecx),%eax <== NOT EXECUTED for (ebase = base + length; base < ebase; base++) 10b470: 83 e2 fc and $0xfffffffc,%edx <== NOT EXECUTED 10b473: 8d 14 10 lea (%eax,%edx,1),%edx <== NOT EXECUTED 10b476: 39 d0 cmp %edx,%eax <== NOT EXECUTED 10b478: 73 1d jae 10b497 <== NOT EXECUTED if (*base != U32_PATTERN) 10b47a: 81 79 10 a5 a5 a5 a5 cmpl $0xa5a5a5a5,0x10(%ecx) <== NOT EXECUTED 10b481: 74 0d je 10b490 <== NOT EXECUTED 10b483: eb 14 jmp 10b499 <== NOT EXECUTED 10b485: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 10b488: 81 38 a5 a5 a5 a5 cmpl $0xa5a5a5a5,(%eax) <== NOT EXECUTED 10b48e: 75 09 jne 10b499 <== 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++) 10b490: 83 c0 04 add $0x4,%eax <== NOT EXECUTED 10b493: 39 c2 cmp %eax,%edx <== NOT EXECUTED 10b495: 77 f1 ja 10b488 <== NOT EXECUTED 10b497: 31 c0 xor %eax,%eax <== NOT EXECUTED if (*base != U32_PATTERN) return (void *) base; #endif return (void *)0; } 10b499: c9 leave <== NOT EXECUTED 10b49a: c3 ret <== NOT EXECUTED 0010b668 : * * 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) { 10b668: 55 push %ebp <== NOT EXECUTED 10b669: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10b66b: 56 push %esi <== NOT EXECUTED 10b66c: 53 push %ebx <== NOT EXECUTED 10b66d: 83 ec 3c sub $0x3c,%esp <== NOT EXECUTED 10b670: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED 10b673: 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); 10b676: 8b b3 c8 00 00 00 mov 0xc8(%ebx),%esi <== NOT EXECUTED char name [32]; printk("BLOWN STACK!!!\n"); 10b67c: 68 9f ac 15 00 push $0x15ac9f <== NOT EXECUTED 10b681: 88 55 d4 mov %dl,-0x2c(%ebp) <== NOT EXECUTED 10b684: e8 27 29 00 00 call 10dfb0 <== NOT EXECUTED printk("task control block: 0x%08lx\n", (unsigned long) running); 10b689: 58 pop %eax <== NOT EXECUTED 10b68a: 5a pop %edx <== NOT EXECUTED 10b68b: 53 push %ebx <== NOT EXECUTED 10b68c: 68 af ac 15 00 push $0x15acaf <== NOT EXECUTED 10b691: e8 1a 29 00 00 call 10dfb0 <== NOT EXECUTED printk("task ID: 0x%08lx\n", (unsigned long) running->Object.id); 10b696: 5a pop %edx <== NOT EXECUTED 10b697: 59 pop %ecx <== NOT EXECUTED 10b698: ff 73 08 pushl 0x8(%ebx) <== NOT EXECUTED 10b69b: 68 cc ac 15 00 push $0x15accc <== NOT EXECUTED 10b6a0: e8 0b 29 00 00 call 10dfb0 <== NOT EXECUTED printk( 10b6a5: 59 pop %ecx <== NOT EXECUTED 10b6a6: 58 pop %eax <== NOT EXECUTED 10b6a7: ff 73 0c pushl 0xc(%ebx) <== NOT EXECUTED 10b6aa: 68 de ac 15 00 push $0x15acde <== NOT EXECUTED 10b6af: e8 fc 28 00 00 call 10dfb0 <== NOT EXECUTED "task name: 0x%08lx\n", (unsigned long) running->Object.name.name_u32 ); printk( 10b6b4: 83 c4 0c add $0xc,%esp <== NOT EXECUTED 10b6b7: 8d 45 d8 lea -0x28(%ebp),%eax <== NOT EXECUTED 10b6ba: 50 push %eax <== NOT EXECUTED 10b6bb: 6a 20 push $0x20 <== NOT EXECUTED 10b6bd: ff 73 08 pushl 0x8(%ebx) <== NOT EXECUTED 10b6c0: e8 77 5c 00 00 call 11133c <== NOT EXECUTED 10b6c5: 59 pop %ecx <== NOT EXECUTED 10b6c6: 5a pop %edx <== NOT EXECUTED 10b6c7: 50 push %eax <== NOT EXECUTED 10b6c8: 68 f2 ac 15 00 push $0x15acf2 <== NOT EXECUTED 10b6cd: e8 de 28 00 00 call 10dfb0 <== 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) 10b6d2: 8b 8b c8 00 00 00 mov 0xc8(%ebx),%ecx <== NOT EXECUTED 10b6d8: 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( 10b6de: 8d 1c 01 lea (%ecx,%eax,1),%ebx <== NOT EXECUTED 10b6e1: 53 push %ebx <== NOT EXECUTED 10b6e2: 51 push %ecx <== NOT EXECUTED 10b6e3: 50 push %eax <== NOT EXECUTED 10b6e4: 68 54 ad 15 00 push $0x15ad54 <== NOT EXECUTED 10b6e9: e8 c2 28 00 00 call 10dfb0 <== 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) { 10b6ee: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 10b6f1: 8a 55 d4 mov -0x2c(%ebp),%dl <== NOT EXECUTED 10b6f4: 84 d2 test %dl,%dl <== NOT EXECUTED 10b6f6: 74 10 je 10b708 <== NOT EXECUTED rtems_configuration_get_user_multiprocessing_table()->node ); } #endif rtems_fatal_error_occurred(0x81); 10b6f8: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10b6fb: 68 81 00 00 00 push $0x81 <== NOT EXECUTED 10b700: e8 b3 64 00 00 call 111bb8 <== NOT EXECUTED 10b705: 8d 76 00 lea 0x0(%esi),%esi <== 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); 10b708: 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( 10b70b: 83 c6 18 add $0x18,%esi <== NOT EXECUTED 10b70e: 56 push %esi <== NOT EXECUTED 10b70f: 50 push %eax <== NOT EXECUTED 10b710: 6a 10 push $0x10 <== NOT EXECUTED 10b712: 68 88 ad 15 00 push $0x15ad88 <== NOT EXECUTED 10b717: e8 94 28 00 00 call 10dfb0 <== NOT EXECUTED 10b71c: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10b71f: eb d7 jmp 10b6f8 <== NOT EXECUTED 0010bda8 <_API_Mutex_Allocate>: #include void _API_Mutex_Allocate( API_Mutex_Control **the_mutex ) { 10bda8: 55 push %ebp 10bda9: 89 e5 mov %esp,%ebp 10bdab: 57 push %edi 10bdac: 56 push %esi 10bdad: 83 ec 1c sub $0x1c,%esp CORE_mutex_Attributes attr = { CORE_MUTEX_NESTING_IS_ERROR, false, CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT, 0 }; 10bdb0: 8d 7d e8 lea -0x18(%ebp),%edi 10bdb3: be 80 0d 12 00 mov $0x120d80,%esi 10bdb8: b9 04 00 00 00 mov $0x4,%ecx 10bdbd: f3 a5 rep movsl %ds:(%esi),%es:(%edi) mutex = (API_Mutex_Control *) _Objects_Allocate( &_API_Mutex_Information ); 10bdbf: 68 e0 74 12 00 push $0x1274e0 10bdc4: e8 c7 09 00 00 call 10c790 <_Objects_Allocate> <== ALWAYS TAKEN 10bdc9: 89 c6 mov %eax,%esi _CORE_mutex_Initialize( &mutex->Mutex, &attr, CORE_MUTEX_UNLOCKED ); 10bdcb: 83 c4 0c add $0xc,%esp 10bdce: 6a 01 push $0x1 10bdd0: 8d 45 e8 lea -0x18(%ebp),%eax 10bdd3: 50 push %eax 10bdd4: 8d 46 10 lea 0x10(%esi),%eax 10bdd7: 50 push %eax 10bdd8: e8 23 02 00 00 call 10c000 <_CORE_mutex_Initialize> <== ALWAYS TAKEN #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10bddd: 0f b7 56 08 movzwl 0x8(%esi),%edx 10bde1: a1 fc 74 12 00 mov 0x1274fc,%eax 10bde6: 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; 10bde9: c7 46 0c 01 00 00 00 movl $0x1,0xc(%esi) _Objects_Open_u32( &_API_Mutex_Information, &mutex->Object, 1 ); *the_mutex = mutex; 10bdf0: 8b 45 08 mov 0x8(%ebp),%eax 10bdf3: 89 30 mov %esi,(%eax) 10bdf5: 83 c4 10 add $0x10,%esp } 10bdf8: 8d 65 f8 lea -0x8(%ebp),%esp 10bdfb: 5e pop %esi 10bdfc: 5f pop %edi 10bdfd: c9 leave 10bdfe: c3 ret 0010be24 <_API_Mutex_Initialization>: #include void _API_Mutex_Initialization( uint32_t maximum_mutexes ) { 10be24: 55 push %ebp 10be25: 89 e5 mov %esp,%ebp 10be27: 83 ec 0c sub $0xc,%esp _Objects_Initialize_information( 10be2a: 6a 00 push $0x0 10be2c: 6a 00 push $0x0 10be2e: 6a 74 push $0x74 10be30: ff 75 08 pushl 0x8(%ebp) 10be33: 6a 02 push $0x2 10be35: 6a 01 push $0x1 10be37: 68 e0 74 12 00 push $0x1274e0 10be3c: e8 67 0e 00 00 call 10cca8 <_Objects_Initialize_information> <== ALWAYS TAKEN 10be41: 83 c4 20 add $0x20,%esp , true, /* true if this is a global object class */ NULL /* Proxy extraction support callout */ #endif ); } 10be44: c9 leave 10be45: c3 ret 0010be00 <_API_Mutex_Lock>: #include void _API_Mutex_Lock( API_Mutex_Control *the_mutex ) { 10be00: 55 push %ebp 10be01: 89 e5 mov %esp,%ebp 10be03: 83 ec 14 sub $0x14,%esp 10be06: 8b 45 08 mov 0x8(%ebp),%eax ISR_Level level; _ISR_Disable( level ); 10be09: 9c pushf 10be0a: fa cli 10be0b: 5a pop %edx _CORE_mutex_Seize( 10be0c: 52 push %edx 10be0d: 6a 00 push $0x0 10be0f: 6a 01 push $0x1 10be11: ff 70 08 pushl 0x8(%eax) 10be14: 83 c0 10 add $0x10,%eax 10be17: 50 push %eax 10be18: e8 db 02 00 00 call 10c0f8 <_CORE_mutex_Seize> <== ALWAYS TAKEN 10be1d: 83 c4 20 add $0x20,%esp the_mutex->Object.id, true, 0, level ); } 10be20: c9 leave 10be21: c3 ret 0010be48 <_API_Mutex_Unlock>: #include void _API_Mutex_Unlock( API_Mutex_Control *the_mutex ) { 10be48: 55 push %ebp 10be49: 89 e5 mov %esp,%ebp 10be4b: 83 ec 0c sub $0xc,%esp 10be4e: 8b 45 08 mov 0x8(%ebp),%eax rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10be51: 8b 15 d8 73 12 00 mov 0x1273d8,%edx 10be57: 42 inc %edx 10be58: 89 15 d8 73 12 00 mov %edx,0x1273d8 _Thread_Disable_dispatch(); _CORE_mutex_Surrender( 10be5e: 6a 00 push $0x0 10be60: ff 70 08 pushl 0x8(%eax) 10be63: 83 c0 10 add $0x10,%eax 10be66: 50 push %eax 10be67: e8 2c 03 00 00 call 10c198 <_CORE_mutex_Surrender> <== ALWAYS TAKEN &the_mutex->Mutex, the_mutex->Object.id, NULL ); _Thread_Enable_dispatch(); 10be6c: 83 c4 10 add $0x10,%esp } 10be6f: c9 leave _CORE_mutex_Surrender( &the_mutex->Mutex, the_mutex->Object.id, NULL ); _Thread_Enable_dispatch(); 10be70: e9 3f 16 00 00 jmp 10d4b4 <_Thread_Enable_dispatch> 0010bd90 <_API_extensions_Add>: */ void _API_extensions_Add( API_extensions_Control *the_extension ) { 10bd90: 55 push %ebp 10bd91: 89 e5 mov %esp,%ebp 10bd93: 83 ec 10 sub $0x10,%esp _Chain_Append( &_API_extensions_List, &the_extension->Node ); 10bd96: ff 75 08 pushl 0x8(%ebp) 10bd99: 68 38 76 12 00 push $0x127638 10bd9e: e8 d5 00 00 00 call 10be78 <_Chain_Append> <== ALWAYS TAKEN 10bda3: 83 c4 10 add $0x10,%esp } 10bda6: c9 leave 10bda7: c3 ret 0010bd2c <_API_extensions_Run_postdriver>: * * _API_extensions_Run_postdriver */ void _API_extensions_Run_postdriver( void ) { 10bd2c: 55 push %ebp 10bd2d: 89 e5 mov %esp,%ebp 10bd2f: 53 push %ebx 10bd30: 83 ec 04 sub $0x4,%esp Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; 10bd33: 8b 1d 38 76 12 00 mov 0x127638,%ebx 10bd39: 81 fb 3c 76 12 00 cmp $0x12763c,%ebx 10bd3f: 74 10 je 10bd51 <_API_extensions_Run_postdriver+0x25> <== ALWAYS TAKEN 10bd41: 8d 76 00 lea 0x0(%esi),%esi * Currently all APIs configure this hook so it is always non-NULL. */ #if defined(FUNCTIONALITY_NOT_CURRENTLY_USED_BY_ANY_API) if ( the_extension->postdriver_hook ) #endif (*the_extension->postdriver_hook)(); 10bd44: 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 ) { 10bd47: 8b 1b mov (%ebx),%ebx void _API_extensions_Run_postdriver( void ) { Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; 10bd49: 81 fb 3c 76 12 00 cmp $0x12763c,%ebx 10bd4f: 75 f3 jne 10bd44 <_API_extensions_Run_postdriver+0x18> #if defined(FUNCTIONALITY_NOT_CURRENTLY_USED_BY_ANY_API) if ( the_extension->postdriver_hook ) #endif (*the_extension->postdriver_hook)(); } } 10bd51: 58 pop %eax 10bd52: 5b pop %ebx 10bd53: c9 leave 10bd54: c3 ret 0010bd58 <_API_extensions_Run_postswitch>: * * _API_extensions_Run_postswitch */ void _API_extensions_Run_postswitch( void ) { 10bd58: 55 push %ebp 10bd59: 89 e5 mov %esp,%ebp 10bd5b: 53 push %ebx 10bd5c: 83 ec 04 sub $0x4,%esp Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; 10bd5f: 8b 1d 38 76 12 00 mov 0x127638,%ebx 10bd65: 81 fb 3c 76 12 00 cmp $0x12763c,%ebx 10bd6b: 74 1c je 10bd89 <_API_extensions_Run_postswitch+0x31> <== ALWAYS TAKEN 10bd6d: 8d 76 00 lea 0x0(%esi),%esi * provide this hook. */ #if defined(RTEMS_ITRON_API) if ( the_extension->postswitch_hook ) #endif (*the_extension->postswitch_hook)( _Thread_Executing ); 10bd70: 83 ec 0c sub $0xc,%esp 10bd73: ff 35 98 74 12 00 pushl 0x127498 10bd79: 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 ) { 10bd7c: 8b 1b mov (%ebx),%ebx void _API_extensions_Run_postswitch( void ) { Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; 10bd7e: 83 c4 10 add $0x10,%esp 10bd81: 81 fb 3c 76 12 00 cmp $0x12763c,%ebx 10bd87: 75 e7 jne 10bd70 <_API_extensions_Run_postswitch+0x18> #if defined(RTEMS_ITRON_API) if ( the_extension->postswitch_hook ) #endif (*the_extension->postswitch_hook)( _Thread_Executing ); } } 10bd89: 8b 5d fc mov -0x4(%ebp),%ebx 10bd8c: c9 leave 10bd8d: c3 ret 0010dfc4 <_CORE_RWLock_Obtain_for_reading>: Objects_Id id, bool wait, Watchdog_Interval timeout, CORE_RWLock_API_mp_support_callout api_rwlock_mp_support ) { 10dfc4: 55 push %ebp 10dfc5: 89 e5 mov %esp,%ebp 10dfc7: 57 push %edi 10dfc8: 56 push %esi 10dfc9: 53 push %ebx 10dfca: 83 ec 1c sub $0x1c,%esp 10dfcd: 8b 5d 08 mov 0x8(%ebp),%ebx 10dfd0: 8b 7d 0c mov 0xc(%ebp),%edi 10dfd3: 8b 4d 14 mov 0x14(%ebp),%ecx 10dfd6: 8a 55 10 mov 0x10(%ebp),%dl ISR_Level level; Thread_Control *executing = _Thread_Executing; 10dfd9: 8b 35 38 a2 12 00 mov 0x12a238,%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 ); 10dfdf: 9c pushf 10dfe0: fa cli 10dfe1: 8f 45 e4 popl -0x1c(%ebp) switch ( the_rwlock->current_state ) { 10dfe4: 8b 43 44 mov 0x44(%ebx),%eax 10dfe7: 85 c0 test %eax,%eax 10dfe9: 75 1d jne 10e008 <_CORE_RWLock_Obtain_for_reading+0x44> <== ALWAYS TAKEN case CORE_RWLOCK_UNLOCKED: the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_READING; 10dfeb: c7 43 44 01 00 00 00 movl $0x1,0x44(%ebx) the_rwlock->number_of_readers += 1; 10dff2: ff 43 48 incl 0x48(%ebx) _ISR_Enable( level ); 10dff5: ff 75 e4 pushl -0x1c(%ebp) 10dff8: 9d popf executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; 10dff9: c7 46 34 00 00 00 00 movl $0x0,0x34(%esi) timeout, _CORE_RWLock_Timeout ); /* return to API level so it can dispatch and we block */ } 10e000: 8d 65 f4 lea -0xc(%ebp),%esp 10e003: 5b pop %ebx 10e004: 5e pop %esi 10e005: 5f pop %edi 10e006: c9 leave 10e007: c3 ret * If locked for reading and no waiters, then OK to read. * If any thread is waiting, then we wait. */ _ISR_Disable( level ); switch ( the_rwlock->current_state ) { 10e008: 48 dec %eax 10e009: 74 51 je 10e05c <_CORE_RWLock_Obtain_for_reading+0x98> /* * If the thread is not willing to wait, then return immediately. */ if ( !wait ) { 10e00b: 84 d2 test %dl,%dl 10e00d: 75 15 jne 10e024 <_CORE_RWLock_Obtain_for_reading+0x60> _ISR_Enable( level ); 10e00f: ff 75 e4 pushl -0x1c(%ebp) 10e012: 9d popf executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE; 10e013: c7 46 34 02 00 00 00 movl $0x2,0x34(%esi) timeout, _CORE_RWLock_Timeout ); /* return to API level so it can dispatch and we block */ } 10e01a: 8d 65 f4 lea -0xc(%ebp),%esp 10e01d: 5b pop %ebx 10e01e: 5e pop %esi 10e01f: 5f pop %edi 10e020: c9 leave 10e021: c3 ret 10e022: 66 90 xchg %ax,%ax <== NOT EXECUTED 10e024: 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; 10e02b: 89 5e 44 mov %ebx,0x44(%esi) executing->Wait.id = id; 10e02e: 89 7e 20 mov %edi,0x20(%esi) executing->Wait.option = CORE_RWLOCK_THREAD_WAITING_FOR_READ; 10e031: c7 46 30 00 00 00 00 movl $0x0,0x30(%esi) executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; 10e038: c7 46 34 00 00 00 00 movl $0x0,0x34(%esi) _ISR_Enable( level ); 10e03f: ff 75 e4 pushl -0x1c(%ebp) 10e042: 9d popf _Thread_queue_Enqueue_with_handler( 10e043: c7 45 10 c8 e1 10 00 movl $0x10e1c8,0x10(%ebp) 10e04a: 89 4d 0c mov %ecx,0xc(%ebp) 10e04d: 89 5d 08 mov %ebx,0x8(%ebp) timeout, _CORE_RWLock_Timeout ); /* return to API level so it can dispatch and we block */ } 10e050: 8d 65 f4 lea -0xc(%ebp),%esp 10e053: 5b pop %ebx 10e054: 5e pop %esi 10e055: 5f pop %edi 10e056: 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( 10e057: e9 4c 19 00 00 jmp 10f9a8 <_Thread_queue_Enqueue_with_handler> 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 ); 10e05c: 83 ec 0c sub $0xc,%esp 10e05f: 53 push %ebx 10e060: 88 55 e0 mov %dl,-0x20(%ebp) 10e063: 89 4d dc mov %ecx,-0x24(%ebp) 10e066: e8 5d 1c 00 00 call 10fcc8 <_Thread_queue_First> if ( !waiter ) { 10e06b: 83 c4 10 add $0x10,%esp 10e06e: 85 c0 test %eax,%eax 10e070: 8a 55 e0 mov -0x20(%ebp),%dl 10e073: 8b 4d dc mov -0x24(%ebp),%ecx 10e076: 75 93 jne 10e00b <_CORE_RWLock_Obtain_for_reading+0x47> <== ALWAYS TAKEN the_rwlock->number_of_readers += 1; 10e078: ff 43 48 incl 0x48(%ebx) _ISR_Enable( level ); 10e07b: ff 75 e4 pushl -0x1c(%ebp) 10e07e: 9d popf executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; 10e07f: c7 46 34 00 00 00 00 movl $0x0,0x34(%esi) return; 10e086: e9 75 ff ff ff jmp 10e000 <_CORE_RWLock_Obtain_for_reading+0x3c> <== ALWAYS TAKEN 0010e08c <_CORE_RWLock_Obtain_for_writing>: Objects_Id id, bool wait, Watchdog_Interval timeout, CORE_RWLock_API_mp_support_callout api_rwlock_mp_support ) { 10e08c: 55 push %ebp 10e08d: 89 e5 mov %esp,%ebp 10e08f: 57 push %edi 10e090: 56 push %esi 10e091: 53 push %ebx 10e092: 83 ec 0c sub $0xc,%esp 10e095: 8b 45 08 mov 0x8(%ebp),%eax 10e098: 8b 7d 0c mov 0xc(%ebp),%edi 10e09b: 8b 75 14 mov 0x14(%ebp),%esi 10e09e: 8a 5d 10 mov 0x10(%ebp),%bl ISR_Level level; Thread_Control *executing = _Thread_Executing; 10e0a1: 8b 15 38 a2 12 00 mov 0x12a238,%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 ); 10e0a7: 9c pushf 10e0a8: fa cli 10e0a9: 59 pop %ecx switch ( the_rwlock->current_state ) { 10e0aa: 83 78 44 00 cmpl $0x0,0x44(%eax) 10e0ae: 75 18 jne 10e0c8 <_CORE_RWLock_Obtain_for_writing+0x3c> case CORE_RWLOCK_UNLOCKED: the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_WRITING; 10e0b0: c7 40 44 02 00 00 00 movl $0x2,0x44(%eax) _ISR_Enable( level ); 10e0b7: 51 push %ecx 10e0b8: 9d popf executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; 10e0b9: c7 42 34 00 00 00 00 movl $0x0,0x34(%edx) _CORE_RWLock_Timeout ); /* return to API level so it can dispatch and we block */ } 10e0c0: 83 c4 0c add $0xc,%esp 10e0c3: 5b pop %ebx 10e0c4: 5e pop %esi 10e0c5: 5f pop %edi 10e0c6: c9 leave 10e0c7: c3 ret /* * If the thread is not willing to wait, then return immediately. */ if ( !wait ) { 10e0c8: 84 db test %bl,%bl 10e0ca: 75 14 jne 10e0e0 <_CORE_RWLock_Obtain_for_writing+0x54> _ISR_Enable( level ); 10e0cc: 51 push %ecx 10e0cd: 9d popf executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE; 10e0ce: c7 42 34 02 00 00 00 movl $0x2,0x34(%edx) _CORE_RWLock_Timeout ); /* return to API level so it can dispatch and we block */ } 10e0d5: 83 c4 0c add $0xc,%esp 10e0d8: 5b pop %ebx 10e0d9: 5e pop %esi 10e0da: 5f pop %edi 10e0db: c9 leave 10e0dc: c3 ret 10e0dd: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 10e0e0: c7 40 30 01 00 00 00 movl $0x1,0x30(%eax) /* * 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; 10e0e7: 89 42 44 mov %eax,0x44(%edx) executing->Wait.id = id; 10e0ea: 89 7a 20 mov %edi,0x20(%edx) executing->Wait.option = CORE_RWLOCK_THREAD_WAITING_FOR_WRITE; 10e0ed: c7 42 30 01 00 00 00 movl $0x1,0x30(%edx) executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; 10e0f4: c7 42 34 00 00 00 00 movl $0x0,0x34(%edx) _ISR_Enable( level ); 10e0fb: 51 push %ecx 10e0fc: 9d popf _Thread_queue_Enqueue_with_handler( 10e0fd: c7 45 10 c8 e1 10 00 movl $0x10e1c8,0x10(%ebp) 10e104: 89 75 0c mov %esi,0xc(%ebp) 10e107: 89 45 08 mov %eax,0x8(%ebp) _CORE_RWLock_Timeout ); /* return to API level so it can dispatch and we block */ } 10e10a: 83 c4 0c add $0xc,%esp 10e10d: 5b pop %ebx 10e10e: 5e pop %esi 10e10f: 5f pop %edi 10e110: 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( 10e111: e9 92 18 00 00 jmp 10f9a8 <_Thread_queue_Enqueue_with_handler> 0010e118 <_CORE_RWLock_Release>: */ CORE_RWLock_Status _CORE_RWLock_Release( CORE_RWLock_Control *the_rwlock ) { 10e118: 55 push %ebp 10e119: 89 e5 mov %esp,%ebp 10e11b: 53 push %ebx 10e11c: 83 ec 04 sub $0x4,%esp 10e11f: 8b 5d 08 mov 0x8(%ebp),%ebx ISR_Level level; Thread_Control *executing = _Thread_Executing; 10e122: 8b 0d 38 a2 12 00 mov 0x12a238,%ecx * 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 ); 10e128: 9c pushf 10e129: fa cli 10e12a: 5a pop %edx if ( the_rwlock->current_state == CORE_RWLOCK_UNLOCKED){ 10e12b: 8b 43 44 mov 0x44(%ebx),%eax 10e12e: 85 c0 test %eax,%eax 10e130: 74 7a je 10e1ac <_CORE_RWLock_Release+0x94> _ISR_Enable( level ); executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE; return CORE_RWLOCK_SUCCESSFUL; } if ( the_rwlock->current_state == CORE_RWLOCK_LOCKED_FOR_READING ) { 10e132: 48 dec %eax 10e133: 74 63 je 10e198 <_CORE_RWLock_Release+0x80> return CORE_RWLOCK_SUCCESSFUL; } } /* CORE_RWLOCK_LOCKED_FOR_WRITING or READING with readers */ executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; 10e135: c7 41 34 00 00 00 00 movl $0x0,0x34(%ecx) /* * Implicitly transition to "unlocked" and find another thread interested * in obtaining this rwlock. */ the_rwlock->current_state = CORE_RWLOCK_UNLOCKED; 10e13c: c7 43 44 00 00 00 00 movl $0x0,0x44(%ebx) _ISR_Enable( level ); 10e143: 52 push %edx 10e144: 9d popf next = _Thread_queue_Dequeue( &the_rwlock->Wait_queue ); 10e145: 83 ec 0c sub $0xc,%esp 10e148: 53 push %ebx 10e149: e8 3e 17 00 00 call 10f88c <_Thread_queue_Dequeue> if ( next ) { 10e14e: 83 c4 10 add $0x10,%esp 10e151: 85 c0 test %eax,%eax 10e153: 74 39 je 10e18e <_CORE_RWLock_Release+0x76> if ( next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE ) { 10e155: 83 78 30 01 cmpl $0x1,0x30(%eax) 10e159: 74 61 je 10e1bc <_CORE_RWLock_Release+0xa4> } /* * Must be CORE_RWLOCK_THREAD_WAITING_FOR_READING */ the_rwlock->number_of_readers += 1; 10e15b: ff 43 48 incl 0x48(%ebx) the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_READING; 10e15e: c7 43 44 01 00 00 00 movl $0x1,0x44(%ebx) 10e165: eb 17 jmp 10e17e <_CORE_RWLock_Release+0x66> <== ALWAYS TAKEN 10e167: 90 nop <== NOT EXECUTED * Now see if more readers can be let go. */ while ( 1 ) { next = _Thread_queue_First( &the_rwlock->Wait_queue ); if ( !next || next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE ) 10e168: 83 78 30 01 cmpl $0x1,0x30(%eax) 10e16c: 74 20 je 10e18e <_CORE_RWLock_Release+0x76> <== ALWAYS TAKEN return CORE_RWLOCK_SUCCESSFUL; the_rwlock->number_of_readers += 1; 10e16e: ff 43 48 incl 0x48(%ebx) _Thread_queue_Extract( &the_rwlock->Wait_queue, next ); 10e171: 83 ec 08 sub $0x8,%esp 10e174: 50 push %eax 10e175: 53 push %ebx 10e176: e8 35 1a 00 00 call 10fbb0 <_Thread_queue_Extract> } 10e17b: 83 c4 10 add $0x10,%esp /* * Now see if more readers can be let go. */ while ( 1 ) { next = _Thread_queue_First( &the_rwlock->Wait_queue ); 10e17e: 83 ec 0c sub $0xc,%esp 10e181: 53 push %ebx 10e182: e8 41 1b 00 00 call 10fcc8 <_Thread_queue_First> if ( !next || 10e187: 83 c4 10 add $0x10,%esp 10e18a: 85 c0 test %eax,%eax 10e18c: 75 da jne 10e168 <_CORE_RWLock_Release+0x50> } /* indentation is to match _ISR_Disable at top */ return CORE_RWLOCK_SUCCESSFUL; } 10e18e: 31 c0 xor %eax,%eax 10e190: 8b 5d fc mov -0x4(%ebp),%ebx 10e193: c9 leave 10e194: c3 ret 10e195: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED _ISR_Enable( level ); executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE; return CORE_RWLOCK_SUCCESSFUL; } if ( the_rwlock->current_state == CORE_RWLOCK_LOCKED_FOR_READING ) { the_rwlock->number_of_readers -= 1; 10e198: 8b 43 48 mov 0x48(%ebx),%eax 10e19b: 48 dec %eax 10e19c: 89 43 48 mov %eax,0x48(%ebx) if ( the_rwlock->number_of_readers != 0 ) { 10e19f: 85 c0 test %eax,%eax 10e1a1: 74 92 je 10e135 <_CORE_RWLock_Release+0x1d> /* must be unlocked again */ _ISR_Enable( level ); 10e1a3: 52 push %edx 10e1a4: 9d popf } /* indentation is to match _ISR_Disable at top */ return CORE_RWLOCK_SUCCESSFUL; } 10e1a5: 31 c0 xor %eax,%eax 10e1a7: 8b 5d fc mov -0x4(%ebp),%ebx 10e1aa: c9 leave 10e1ab: c3 ret * If any thread is waiting, then we wait. */ _ISR_Disable( level ); if ( the_rwlock->current_state == CORE_RWLOCK_UNLOCKED){ _ISR_Enable( level ); 10e1ac: 52 push %edx 10e1ad: 9d popf executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE; 10e1ae: c7 41 34 02 00 00 00 movl $0x2,0x34(%ecx) } /* indentation is to match _ISR_Disable at top */ return CORE_RWLOCK_SUCCESSFUL; } 10e1b5: 31 c0 xor %eax,%eax 10e1b7: 8b 5d fc mov -0x4(%ebp),%ebx 10e1ba: c9 leave 10e1bb: c3 ret next = _Thread_queue_Dequeue( &the_rwlock->Wait_queue ); if ( next ) { if ( next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE ) { the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_WRITING; 10e1bc: c7 43 44 02 00 00 00 movl $0x2,0x44(%ebx) return CORE_RWLOCK_SUCCESSFUL; 10e1c3: eb c9 jmp 10e18e <_CORE_RWLock_Release+0x76> <== ALWAYS TAKEN 0010e1c8 <_CORE_RWLock_Timeout>: void _CORE_RWLock_Timeout( Objects_Id id, void *ignored ) { 10e1c8: 55 push %ebp 10e1c9: 89 e5 mov %esp,%ebp 10e1cb: 83 ec 20 sub $0x20,%esp Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 10e1ce: 8d 45 f4 lea -0xc(%ebp),%eax 10e1d1: 50 push %eax 10e1d2: ff 75 08 pushl 0x8(%ebp) 10e1d5: e8 e2 12 00 00 call 10f4bc <_Thread_Get> switch ( location ) { 10e1da: 83 c4 10 add $0x10,%esp 10e1dd: 8b 55 f4 mov -0xc(%ebp),%edx 10e1e0: 85 d2 test %edx,%edx 10e1e2: 75 17 jne 10e1fb <_CORE_RWLock_Timeout+0x33> <== ALWAYS TAKEN #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_queue_Process_timeout( the_thread ); 10e1e4: 83 ec 0c sub $0xc,%esp 10e1e7: 50 push %eax 10e1e8: e8 ab 1b 00 00 call 10fd98 <_Thread_queue_Process_timeout> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 10e1ed: a1 78 a1 12 00 mov 0x12a178,%eax 10e1f2: 48 dec %eax 10e1f3: a3 78 a1 12 00 mov %eax,0x12a178 10e1f8: 83 c4 10 add $0x10,%esp _Thread_Unnest_dispatch(); break; } } 10e1fb: c9 leave 10e1fc: c3 ret 00112c34 <_CORE_barrier_Release>: #else Objects_Id id __attribute__((unused)), CORE_barrier_API_mp_support_callout api_barrier_mp_support __attribute__((unused)) #endif ) { 112c34: 55 push %ebp 112c35: 89 e5 mov %esp,%ebp 112c37: 56 push %esi 112c38: 53 push %ebx 112c39: 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)) ) { 112c3c: 31 db xor %ebx,%ebx 112c3e: eb 01 jmp 112c41 <_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++; 112c40: 43 inc %ebx { Thread_Control *the_thread; uint32_t count; count = 0; while ( (the_thread = _Thread_queue_Dequeue(&the_barrier->Wait_queue)) ) { 112c41: 83 ec 0c sub $0xc,%esp 112c44: 56 push %esi 112c45: e8 5e ac ff ff call 10d8a8 <_Thread_queue_Dequeue> 112c4a: 83 c4 10 add $0x10,%esp 112c4d: 85 c0 test %eax,%eax 112c4f: 75 ef jne 112c40 <_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; 112c51: c7 46 48 00 00 00 00 movl $0x0,0x48(%esi) return count; } 112c58: 89 d8 mov %ebx,%eax 112c5a: 8d 65 f8 lea -0x8(%ebp),%esp 112c5d: 5b pop %ebx 112c5e: 5e pop %esi 112c5f: c9 leave 112c60: c3 ret 00112c64 <_CORE_barrier_Wait>: Objects_Id id, bool wait, Watchdog_Interval timeout, CORE_barrier_API_mp_support_callout api_barrier_mp_support ) { 112c64: 55 push %ebp 112c65: 89 e5 mov %esp,%ebp 112c67: 57 push %edi 112c68: 56 push %esi 112c69: 53 push %ebx 112c6a: 83 ec 1c sub $0x1c,%esp 112c6d: 8b 45 08 mov 0x8(%ebp),%eax 112c70: 8b 5d 0c mov 0xc(%ebp),%ebx 112c73: 8b 75 14 mov 0x14(%ebp),%esi 112c76: 8b 7d 18 mov 0x18(%ebp),%edi Thread_Control *executing; ISR_Level level; executing = _Thread_Executing; 112c79: 8b 15 98 74 12 00 mov 0x127498,%edx executing->Wait.return_code = CORE_BARRIER_STATUS_SUCCESSFUL; 112c7f: c7 42 34 00 00 00 00 movl $0x0,0x34(%edx) _ISR_Disable( level ); 112c86: 9c pushf 112c87: fa cli 112c88: 8f 45 e4 popl -0x1c(%ebp) the_barrier->number_of_waiting_threads++; 112c8b: 8b 48 48 mov 0x48(%eax),%ecx 112c8e: 41 inc %ecx 112c8f: 89 48 48 mov %ecx,0x48(%eax) if ( _CORE_barrier_Is_automatic( &the_barrier->Attributes ) ) { 112c92: 83 78 40 00 cmpl $0x0,0x40(%eax) 112c96: 75 05 jne 112c9d <_CORE_barrier_Wait+0x39> if ( the_barrier->number_of_waiting_threads == the_barrier->Attributes.maximum_count) { 112c98: 3b 48 44 cmp 0x44(%eax),%ecx 112c9b: 74 2b je 112cc8 <_CORE_barrier_Wait+0x64> 112c9d: 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; 112ca4: 89 42 44 mov %eax,0x44(%edx) executing->Wait.id = id; 112ca7: 89 5a 20 mov %ebx,0x20(%edx) _ISR_Enable( level ); 112caa: ff 75 e4 pushl -0x1c(%ebp) 112cad: 9d popf _Thread_queue_Enqueue( &the_barrier->Wait_queue, timeout ); 112cae: c7 45 10 d4 dc 10 00 movl $0x10dcd4,0x10(%ebp) 112cb5: 89 75 0c mov %esi,0xc(%ebp) 112cb8: 89 45 08 mov %eax,0x8(%ebp) } 112cbb: 83 c4 1c add $0x1c,%esp 112cbe: 5b pop %ebx 112cbf: 5e pop %esi 112cc0: 5f pop %edi 112cc1: 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 ); 112cc2: e9 fd ac ff ff jmp 10d9c4 <_Thread_queue_Enqueue_with_handler> 112cc7: 90 nop <== NOT EXECUTED _ISR_Disable( level ); the_barrier->number_of_waiting_threads++; if ( _CORE_barrier_Is_automatic( &the_barrier->Attributes ) ) { if ( the_barrier->number_of_waiting_threads == the_barrier->Attributes.maximum_count) { executing->Wait.return_code = CORE_BARRIER_STATUS_AUTOMATICALLY_RELEASED; 112cc8: c7 42 34 01 00 00 00 movl $0x1,0x34(%edx) _ISR_Enable( level ); 112ccf: ff 75 e4 pushl -0x1c(%ebp) 112cd2: 9d popf _CORE_barrier_Release( the_barrier, id, api_barrier_mp_support ); 112cd3: 89 7d 10 mov %edi,0x10(%ebp) 112cd6: 89 5d 0c mov %ebx,0xc(%ebp) 112cd9: 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 ); } 112cdc: 83 c4 1c add $0x1c,%esp 112cdf: 5b pop %ebx 112ce0: 5e pop %esi 112ce1: 5f pop %edi 112ce2: 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 ); 112ce3: e9 4c ff ff ff jmp 112c34 <_CORE_barrier_Release> <== ALWAYS TAKEN 0011943c <_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 ) { 11943c: 55 push %ebp 11943d: 89 e5 mov %esp,%ebp 11943f: 57 push %edi 119440: 56 push %esi 119441: 53 push %ebx 119442: 83 ec 1c sub $0x1c,%esp 119445: 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 ) { 119448: 8b 45 10 mov 0x10(%ebp),%eax 11944b: 39 43 4c cmp %eax,0x4c(%ebx) 11944e: 72 60 jb 1194b0 <_CORE_message_queue_Broadcast+0x74> <== ALWAYS TAKEN * NOTE: This check is critical because threads can block on * send and receive and this ensures that we are broadcasting * the message to threads waiting to receive -- not to send. */ if ( the_message_queue->number_of_pending_messages != 0 ) { 119450: 8b 43 48 mov 0x48(%ebx),%eax 119453: 85 c0 test %eax,%eax 119455: 75 45 jne 11949c <_CORE_message_queue_Broadcast+0x60> * 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))) { 119457: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) 11945e: eb 18 jmp 119478 <_CORE_message_queue_Broadcast+0x3c> <== ALWAYS TAKEN waitp = &the_thread->Wait; number_broadcasted += 1; 119460: ff 45 e4 incl -0x1c(%ebp) const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 119463: 8b 42 2c mov 0x2c(%edx),%eax 119466: 89 c7 mov %eax,%edi 119468: 8b 75 0c mov 0xc(%ebp),%esi 11946b: 8b 4d 10 mov 0x10(%ebp),%ecx 11946e: f3 a4 rep movsb %ds:(%esi),%es:(%edi) buffer, waitp->return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; 119470: 8b 42 28 mov 0x28(%edx),%eax 119473: 8b 55 10 mov 0x10(%ebp),%edx 119476: 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))) { 119478: 83 ec 0c sub $0xc,%esp 11947b: 53 push %ebx 11947c: e8 db 24 00 00 call 11b95c <_Thread_queue_Dequeue> 119481: 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 = 119483: 83 c4 10 add $0x10,%esp 119486: 85 c0 test %eax,%eax 119488: 75 d6 jne 119460 <_CORE_message_queue_Broadcast+0x24> if ( !_Objects_Is_local_id( the_thread->Object.id ) ) (*api_message_queue_mp_support) ( the_thread, id ); #endif } *count = number_broadcasted; 11948a: 8b 55 e4 mov -0x1c(%ebp),%edx 11948d: 8b 45 1c mov 0x1c(%ebp),%eax 119490: 89 10 mov %edx,(%eax) 119492: 31 c0 xor %eax,%eax return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } 119494: 8d 65 f4 lea -0xc(%ebp),%esp 119497: 5b pop %ebx 119498: 5e pop %esi 119499: 5f pop %edi 11949a: c9 leave 11949b: c3 ret * send and receive and this ensures that we are broadcasting * the message to threads waiting to receive -- not to send. */ if ( the_message_queue->number_of_pending_messages != 0 ) { *count = 0; 11949c: 8b 55 1c mov 0x1c(%ebp),%edx 11949f: c7 02 00 00 00 00 movl $0x0,(%edx) 1194a5: 31 c0 xor %eax,%eax #endif } *count = number_broadcasted; return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } 1194a7: 8d 65 f4 lea -0xc(%ebp),%esp 1194aa: 5b pop %ebx 1194ab: 5e pop %esi 1194ac: 5f pop %edi 1194ad: c9 leave 1194ae: c3 ret 1194af: 90 nop <== NOT EXECUTED { Thread_Control *the_thread; uint32_t number_broadcasted; Thread_Wait_information *waitp; if ( size > the_message_queue->maximum_message_size ) { 1194b0: b8 01 00 00 00 mov $0x1,%eax <== NOT EXECUTED #endif } *count = number_broadcasted; return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } 1194b5: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 1194b8: 5b pop %ebx <== NOT EXECUTED 1194b9: 5e pop %esi <== NOT EXECUTED 1194ba: 5f pop %edi <== NOT EXECUTED 1194bb: c9 leave <== NOT EXECUTED 1194bc: c3 ret <== NOT EXECUTED 00118030 <_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 ) { 118030: 55 push %ebp 118031: 89 e5 mov %esp,%ebp 118033: 53 push %ebx 118034: 83 ec 08 sub $0x8,%esp 118037: 8b 5d 08 mov 0x8(%ebp),%ebx /* * This will flush blocked threads whether they were blocked on * a send or receive. */ _Thread_queue_Flush( 11803a: ff 75 10 pushl 0x10(%ebp) 11803d: ff 75 0c pushl 0xc(%ebp) 118040: 53 push %ebx 118041: e8 4e a9 ff ff call 112994 <_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 ) 118046: 83 c4 10 add $0x10,%esp 118049: 8b 43 48 mov 0x48(%ebx),%eax 11804c: 85 c0 test %eax,%eax 11804e: 74 0c je 11805c <_CORE_message_queue_Close+0x2c> (void) _CORE_message_queue_Flush_support( the_message_queue ); 118050: 83 ec 0c sub $0xc,%esp 118053: 53 push %ebx 118054: e8 13 00 00 00 call 11806c <_CORE_message_queue_Flush_support> <== ALWAYS TAKEN 118059: 83 c4 10 add $0x10,%esp (void) _Workspace_Free( the_message_queue->message_buffers ); 11805c: 8b 43 5c mov 0x5c(%ebx),%eax 11805f: 89 45 08 mov %eax,0x8(%ebp) } 118062: 8b 5d fc mov -0x4(%ebp),%ebx 118065: 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 ); 118066: e9 f9 b3 ff ff jmp 113464 <_Workspace_Free> 001194fc <_CORE_message_queue_Flush>: */ uint32_t _CORE_message_queue_Flush( CORE_message_queue_Control *the_message_queue ) { 1194fc: 55 push %ebp 1194fd: 89 e5 mov %esp,%ebp 1194ff: 83 ec 08 sub $0x8,%esp 119502: 8b 45 08 mov 0x8(%ebp),%eax if ( the_message_queue->number_of_pending_messages != 0 ) 119505: 8b 50 48 mov 0x48(%eax),%edx 119508: 85 d2 test %edx,%edx 11950a: 75 04 jne 119510 <_CORE_message_queue_Flush+0x14> return _CORE_message_queue_Flush_support( the_message_queue ); else return 0; } 11950c: 31 c0 xor %eax,%eax 11950e: c9 leave 11950f: 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 ); 119510: 89 45 08 mov %eax,0x8(%ebp) else return 0; } 119513: 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 ); 119514: e9 03 00 00 00 jmp 11951c <_CORE_message_queue_Flush_support> <== ALWAYS TAKEN 00114c40 <_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 ) { 114c40: 55 push %ebp 114c41: 89 e5 mov %esp,%ebp 114c43: 57 push %edi 114c44: 56 push %esi 114c45: 53 push %ebx 114c46: 83 ec 0c sub $0xc,%esp 114c49: 8b 5d 08 mov 0x8(%ebp),%ebx 114c4c: 8b 75 10 mov 0x10(%ebp),%esi 114c4f: 8b 45 14 mov 0x14(%ebp),%eax size_t message_buffering_required; size_t allocated_message_size; the_message_queue->maximum_pending_messages = maximum_pending_messages; 114c52: 89 73 44 mov %esi,0x44(%ebx) the_message_queue->number_of_pending_messages = 0; 114c55: c7 43 48 00 00 00 00 movl $0x0,0x48(%ebx) the_message_queue->maximum_message_size = maximum_message_size; 114c5c: 89 43 4c mov %eax,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; 114c5f: c7 43 60 00 00 00 00 movl $0x0,0x60(%ebx) the_message_queue->notify_argument = the_argument; 114c66: 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)) { 114c6d: a8 03 test $0x3,%al 114c6f: 75 1b jne 114c8c <_CORE_message_queue_Initialize+0x4c> 114c71: 89 c2 mov %eax,%edx /* * Calculate how much total memory is required for message buffering and * check for overflow on the multiplication. */ message_buffering_required = (size_t) maximum_pending_messages * (allocated_message_size + sizeof(CORE_message_queue_Buffer_control)); 114c73: 8d 7a 14 lea 0x14(%edx),%edi /* * Calculate how much total memory is required for message buffering and * check for overflow on the multiplication. */ message_buffering_required = (size_t) maximum_pending_messages * 114c76: 89 f8 mov %edi,%eax 114c78: 0f af c6 imul %esi,%eax (allocated_message_size + sizeof(CORE_message_queue_Buffer_control)); if (message_buffering_required < allocated_message_size) 114c7b: 39 d0 cmp %edx,%eax 114c7d: 73 25 jae 114ca4 <_CORE_message_queue_Initialize+0x64> <== NEVER TAKEN THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO, STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; 114c7f: 31 c0 xor %eax,%eax } 114c81: 8d 65 f4 lea -0xc(%ebp),%esp 114c84: 5b pop %ebx 114c85: 5e pop %esi 114c86: 5f pop %edi 114c87: c9 leave 114c88: c3 ret 114c89: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED * Round size up to multiple of a pointer for chain init and * check for overflow on adding overhead to each message. */ allocated_message_size = maximum_message_size; if (allocated_message_size & (sizeof(uint32_t) - 1)) { allocated_message_size += sizeof(uint32_t); 114c8c: 8d 50 04 lea 0x4(%eax),%edx allocated_message_size &= ~(sizeof(uint32_t) - 1); 114c8f: 83 e2 fc and $0xfffffffc,%edx } if (allocated_message_size < maximum_message_size) 114c92: 39 d0 cmp %edx,%eax 114c94: 77 e9 ja 114c7f <_CORE_message_queue_Initialize+0x3f> <== 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)); 114c96: 8d 7a 14 lea 0x14(%edx),%edi /* * Calculate how much total memory is required for message buffering and * check for overflow on the multiplication. */ message_buffering_required = (size_t) maximum_pending_messages * 114c99: 89 f8 mov %edi,%eax 114c9b: 0f af c6 imul %esi,%eax (allocated_message_size + sizeof(CORE_message_queue_Buffer_control)); if (message_buffering_required < allocated_message_size) 114c9e: 39 d0 cmp %edx,%eax 114ca0: 72 dd jb 114c7f <_CORE_message_queue_Initialize+0x3f> <== ALWAYS TAKEN 114ca2: 66 90 xchg %ax,%ax return false; /* * Attempt to allocate the message memory */ the_message_queue->message_buffers = (CORE_message_queue_Buffer *) 114ca4: 83 ec 0c sub $0xc,%esp 114ca7: 50 push %eax 114ca8: e8 a7 29 00 00 call 117654 <_Workspace_Allocate> 114cad: 89 43 5c mov %eax,0x5c(%ebx) _Workspace_Allocate( message_buffering_required ); if (the_message_queue->message_buffers == 0) 114cb0: 83 c4 10 add $0x10,%esp 114cb3: 85 c0 test %eax,%eax 114cb5: 74 c8 je 114c7f <_CORE_message_queue_Initialize+0x3f> /* * Initialize the pool of inactive messages, pending messages, * and set of waiting threads. */ _Chain_Initialize ( 114cb7: 57 push %edi 114cb8: 56 push %esi 114cb9: 50 push %eax 114cba: 8d 43 68 lea 0x68(%ebx),%eax 114cbd: 50 push %eax 114cbe: e8 c5 4c 00 00 call 119988 <_Chain_Initialize> <== ALWAYS TAKEN */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 114cc3: 8d 43 54 lea 0x54(%ebx),%eax 114cc6: 89 43 50 mov %eax,0x50(%ebx) the_chain->permanent_null = NULL; 114cc9: c7 43 54 00 00 00 00 movl $0x0,0x54(%ebx) the_chain->last = _Chain_Head(the_chain); 114cd0: 8d 43 50 lea 0x50(%ebx),%eax 114cd3: 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( 114cd6: 6a 06 push $0x6 114cd8: 68 80 00 00 00 push $0x80 114cdd: 8b 45 0c mov 0xc(%ebp),%eax 114ce0: 83 38 01 cmpl $0x1,(%eax) 114ce3: 0f 94 c0 sete %al 114ce6: 0f b6 c0 movzbl %al,%eax 114ce9: 50 push %eax 114cea: 53 push %ebx 114ceb: e8 4c 1f 00 00 call 116c3c <_Thread_queue_Initialize> 114cf0: b0 01 mov $0x1,%al THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO, STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; 114cf2: 83 c4 20 add $0x20,%esp } 114cf5: 8d 65 f4 lea -0xc(%ebp),%esp 114cf8: 5b pop %ebx 114cf9: 5e pop %esi 114cfa: 5f pop %edi 114cfb: c9 leave 114cfc: c3 ret 001109e8 <_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 ) { 1109e8: 55 push %ebp 1109e9: 89 e5 mov %esp,%ebp 1109eb: 56 push %esi 1109ec: 53 push %ebx 1109ed: 8b 45 08 mov 0x8(%ebp),%eax 1109f0: 8b 55 0c mov 0xc(%ebp),%edx 1109f3: 8b 4d 10 mov 0x10(%ebp),%ecx 1109f6: 89 4a 08 mov %ecx,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 ) { 1109f9: 81 f9 ff ff ff 7f cmp $0x7fffffff,%ecx 1109ff: 74 53 je 110a54 <_CORE_message_queue_Insert_message+0x6c> _ISR_Disable( level ); SET_NOTIFY(); the_message_queue->number_of_pending_messages++; _CORE_message_queue_Append_unprotected(the_message_queue, the_message); _ISR_Enable( level ); } else if ( submit_type == CORE_MESSAGE_QUEUE_URGENT_REQUEST ) { 110a01: 81 f9 00 00 00 80 cmp $0x80000000,%ecx 110a07: 74 6f je 110a78 <_CORE_message_queue_Insert_message+0x90> 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; 110a09: 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; 110a0c: 8d 70 54 lea 0x54(%eax),%esi while ( !_Chain_Is_tail( the_header, the_node ) ) { 110a0f: 39 f3 cmp %esi,%ebx 110a11: 74 05 je 110a18 <_CORE_message_queue_Insert_message+0x30> this_message = (CORE_message_queue_Buffer_control *) the_node; this_priority = _CORE_message_queue_Get_message_priority(this_message); if ( this_priority <= the_priority ) { 110a13: 3b 4b 08 cmp 0x8(%ebx),%ecx 110a16: 7d 2c jge 110a44 <_CORE_message_queue_Insert_message+0x5c> the_node = the_node->next; continue; } break; } _ISR_Disable( level ); 110a18: 9c pushf 110a19: fa cli 110a1a: 5e pop %esi SET_NOTIFY(); the_message_queue->number_of_pending_messages++; 110a1b: ff 40 48 incl 0x48(%eax) _Chain_Insert_unprotected( the_node->previous, &the_message->Node ); 110a1e: 8b 4b 04 mov 0x4(%ebx),%ecx Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 110a21: 89 4a 04 mov %ecx,0x4(%edx) before_node = after_node->next; 110a24: 8b 19 mov (%ecx),%ebx after_node->next = the_node; 110a26: 89 11 mov %edx,(%ecx) the_node->next = before_node; 110a28: 89 1a mov %ebx,(%edx) before_node->previous = the_node; 110a2a: 89 53 04 mov %edx,0x4(%ebx) _ISR_Enable( level ); 110a2d: 56 push %esi 110a2e: 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 ) 110a2f: 8b 50 60 mov 0x60(%eax),%edx 110a32: 85 d2 test %edx,%edx 110a34: 74 3d je 110a73 <_CORE_message_queue_Insert_message+0x8b> (*the_message_queue->notify_handler)(the_message_queue->notify_argument); 110a36: 8b 40 64 mov 0x64(%eax),%eax 110a39: 89 45 08 mov %eax,0x8(%ebp) #endif } 110a3c: 5b pop %ebx 110a3d: 5e pop %esi 110a3e: 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); 110a3f: ff e2 jmp *%edx 110a41: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 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; 110a44: 8b 1b mov (%ebx),%ebx 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 ) ) { 110a46: 39 f3 cmp %esi,%ebx 110a48: 74 ce je 110a18 <_CORE_message_queue_Insert_message+0x30> this_message = (CORE_message_queue_Buffer_control *) the_node; this_priority = _CORE_message_queue_Get_message_priority(this_message); if ( this_priority <= the_priority ) { 110a4a: 3b 4b 08 cmp 0x8(%ebx),%ecx 110a4d: 7c c9 jl 110a18 <_CORE_message_queue_Insert_message+0x30> 110a4f: eb f3 jmp 110a44 <_CORE_message_queue_Insert_message+0x5c> <== ALWAYS TAKEN 110a51: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED else _CORE_message_queue_Prepend_unprotected(the_message_queue, the_message); _ISR_Enable( level ); #else if ( submit_type == CORE_MESSAGE_QUEUE_SEND_REQUEST ) { _ISR_Disable( level ); 110a54: 9c pushf 110a55: fa cli 110a56: 5b pop %ebx SET_NOTIFY(); the_message_queue->number_of_pending_messages++; 110a57: ff 40 48 incl 0x48(%eax) Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 110a5a: 8d 48 54 lea 0x54(%eax),%ecx 110a5d: 89 0a mov %ecx,(%edx) old_last_node = the_chain->last; 110a5f: 8b 48 58 mov 0x58(%eax),%ecx the_chain->last = the_node; 110a62: 89 50 58 mov %edx,0x58(%eax) old_last_node->next = the_node; 110a65: 89 11 mov %edx,(%ecx) the_node->previous = old_last_node; 110a67: 89 4a 04 mov %ecx,0x4(%edx) _CORE_message_queue_Append_unprotected(the_message_queue, the_message); _ISR_Enable( level ); 110a6a: 53 push %ebx 110a6b: 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 ) 110a6c: 8b 50 60 mov 0x60(%eax),%edx 110a6f: 85 d2 test %edx,%edx 110a71: 75 c3 jne 110a36 <_CORE_message_queue_Insert_message+0x4e> <== ALWAYS TAKEN (*the_message_queue->notify_handler)(the_message_queue->notify_argument); #endif } 110a73: 5b pop %ebx 110a74: 5e pop %esi 110a75: c9 leave 110a76: c3 ret 110a77: 90 nop <== NOT EXECUTED SET_NOTIFY(); the_message_queue->number_of_pending_messages++; _CORE_message_queue_Append_unprotected(the_message_queue, the_message); _ISR_Enable( level ); } else if ( submit_type == CORE_MESSAGE_QUEUE_URGENT_REQUEST ) { _ISR_Disable( level ); 110a78: 9c pushf 110a79: fa cli 110a7a: 5b pop %ebx SET_NOTIFY(); the_message_queue->number_of_pending_messages++; 110a7b: ff 40 48 incl 0x48(%eax) */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Head( Chain_Control *the_chain ) { return (Chain_Node *) the_chain; 110a7e: 8d 48 50 lea 0x50(%eax),%ecx Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 110a81: 89 4a 04 mov %ecx,0x4(%edx) before_node = after_node->next; 110a84: 8b 48 50 mov 0x50(%eax),%ecx after_node->next = the_node; 110a87: 89 50 50 mov %edx,0x50(%eax) the_node->next = before_node; 110a8a: 89 0a mov %ecx,(%edx) before_node->previous = the_node; 110a8c: 89 51 04 mov %edx,0x4(%ecx) _CORE_message_queue_Prepend_unprotected(the_message_queue, the_message); _ISR_Enable( level ); 110a8f: 53 push %ebx 110a90: 9d popf 110a91: eb 9c jmp 110a2f <_CORE_message_queue_Insert_message+0x47> <== ALWAYS TAKEN 00114d00 <_CORE_message_queue_Seize>: void *buffer, size_t *size_p, bool wait, Watchdog_Interval timeout ) { 114d00: 55 push %ebp 114d01: 89 e5 mov %esp,%ebp 114d03: 57 push %edi 114d04: 56 push %esi 114d05: 53 push %ebx 114d06: 83 ec 2c sub $0x2c,%esp 114d09: 8b 55 08 mov 0x8(%ebp),%edx 114d0c: 8b 45 0c mov 0xc(%ebp),%eax 114d0f: 89 45 dc mov %eax,-0x24(%ebp) 114d12: 8b 4d 10 mov 0x10(%ebp),%ecx 114d15: 89 4d e0 mov %ecx,-0x20(%ebp) 114d18: 8b 45 14 mov 0x14(%ebp),%eax 114d1b: 8b 5d 1c mov 0x1c(%ebp),%ebx 114d1e: 89 5d d8 mov %ebx,-0x28(%ebp) 114d21: 0f b6 7d 18 movzbl 0x18(%ebp),%edi ISR_Level level; CORE_message_queue_Buffer_control *the_message; Thread_Control *executing; executing = _Thread_Executing; 114d25: 8b 0d b8 11 13 00 mov 0x1311b8,%ecx executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; 114d2b: c7 41 34 00 00 00 00 movl $0x0,0x34(%ecx) _ISR_Disable( level ); 114d32: 9c pushf 114d33: fa cli 114d34: 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)); 114d37: 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; 114d3a: 8d 72 54 lea 0x54(%edx),%esi 114d3d: 39 f3 cmp %esi,%ebx 114d3f: 74 7b je 114dbc <_CORE_message_queue_Seize+0xbc> { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; 114d41: 8b 0b mov (%ebx),%ecx the_chain->first = new_first; 114d43: 89 4a 50 mov %ecx,0x50(%edx) new_first->previous = _Chain_Head(the_chain); 114d46: 8d 72 50 lea 0x50(%edx),%esi 114d49: 89 71 04 mov %esi,0x4(%ecx) the_message = _CORE_message_queue_Get_pending_message( the_message_queue ); if ( the_message != NULL ) { the_message_queue->number_of_pending_messages -= 1; 114d4c: ff 4a 48 decl 0x48(%edx) _ISR_Enable( level ); 114d4f: ff 75 e4 pushl -0x1c(%ebp) 114d52: 9d popf *size_p = the_message->Contents.size; 114d53: 8b 4b 0c mov 0xc(%ebx),%ecx 114d56: 89 08 mov %ecx,(%eax) _Thread_Executing->Wait.count = 114d58: 8b 73 08 mov 0x8(%ebx),%esi 114d5b: 8b 0d b8 11 13 00 mov 0x1311b8,%ecx 114d61: 89 71 24 mov %esi,0x24(%ecx) _CORE_message_queue_Get_message_priority( the_message ); _CORE_message_queue_Copy_buffer( the_message->Contents.buffer, 114d64: 8d 4b 10 lea 0x10(%ebx),%ecx 114d67: 89 4d e4 mov %ecx,-0x1c(%ebp) const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 114d6a: 8b 08 mov (%eax),%ecx 114d6c: 8b 7d e0 mov -0x20(%ebp),%edi 114d6f: 8b 75 e4 mov -0x1c(%ebp),%esi 114d72: 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 ); 114d74: 83 ec 0c sub $0xc,%esp 114d77: 52 push %edx 114d78: 89 55 d4 mov %edx,-0x2c(%ebp) 114d7b: e8 40 1b 00 00 call 1168c0 <_Thread_queue_Dequeue> if ( !the_thread ) { 114d80: 83 c4 10 add $0x10,%esp 114d83: 85 c0 test %eax,%eax 114d85: 8b 55 d4 mov -0x2c(%ebp),%edx 114d88: 0f 84 86 00 00 00 je 114e14 <_CORE_message_queue_Seize+0x114> CORE_message_queue_Buffer_control *the_message, int priority ) { #if defined(RTEMS_SCORE_COREMSG_ENABLE_MESSAGE_PRIORITY) the_message->priority = priority; 114d8e: 8b 48 24 mov 0x24(%eax),%ecx 114d91: 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; 114d94: 8b 48 30 mov 0x30(%eax),%ecx 114d97: 89 4b 0c mov %ecx,0xc(%ebx) const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 114d9a: 8b 70 2c mov 0x2c(%eax),%esi 114d9d: 8b 7d e4 mov -0x1c(%ebp),%edi 114da0: 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( 114da2: 8b 43 08 mov 0x8(%ebx),%eax 114da5: 89 45 10 mov %eax,0x10(%ebp) 114da8: 89 5d 0c mov %ebx,0xc(%ebp) 114dab: 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 ); } 114dae: 8d 65 f4 lea -0xc(%ebp),%esp 114db1: 5b pop %ebx 114db2: 5e pop %esi 114db3: 5f pop %edi 114db4: c9 leave the_thread->Wait.return_argument_second.immutable_object, the_message->Contents.buffer, the_message->Contents.size ); _CORE_message_queue_Insert_message( 114db5: e9 0e 4c 00 00 jmp 1199c8 <_CORE_message_queue_Insert_message> 114dba: 66 90 xchg %ax,%ax <== NOT EXECUTED return; } #endif } if ( !wait ) { 114dbc: 89 fb mov %edi,%ebx 114dbe: 84 db test %bl,%bl 114dc0: 75 16 jne 114dd8 <_CORE_message_queue_Seize+0xd8> _ISR_Enable( level ); 114dc2: ff 75 e4 pushl -0x1c(%ebp) 114dc5: 9d popf executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT; 114dc6: c7 41 34 04 00 00 00 movl $0x4,0x34(%ecx) executing->Wait.return_argument = size_p; /* Wait.count will be filled in with the message priority */ _ISR_Enable( level ); _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); } 114dcd: 8d 65 f4 lea -0xc(%ebp),%esp 114dd0: 5b pop %ebx 114dd1: 5e pop %esi 114dd2: 5f pop %edi 114dd3: c9 leave 114dd4: c3 ret 114dd5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED RTEMS_INLINE_ROUTINE void _Thread_queue_Enter_critical_section ( Thread_queue_Control *the_thread_queue ) { the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 114dd8: 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; 114ddf: 89 51 44 mov %edx,0x44(%ecx) executing->Wait.id = id; 114de2: 8b 5d dc mov -0x24(%ebp),%ebx 114de5: 89 59 20 mov %ebx,0x20(%ecx) executing->Wait.return_argument_second.mutable_object = buffer; 114de8: 8b 5d e0 mov -0x20(%ebp),%ebx 114deb: 89 59 2c mov %ebx,0x2c(%ecx) executing->Wait.return_argument = size_p; 114dee: 89 41 28 mov %eax,0x28(%ecx) /* Wait.count will be filled in with the message priority */ _ISR_Enable( level ); 114df1: ff 75 e4 pushl -0x1c(%ebp) 114df4: 9d popf _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); 114df5: c7 45 10 ec 6c 11 00 movl $0x116cec,0x10(%ebp) 114dfc: 8b 45 d8 mov -0x28(%ebp),%eax 114dff: 89 45 0c mov %eax,0xc(%ebp) 114e02: 89 55 08 mov %edx,0x8(%ebp) } 114e05: 8d 65 f4 lea -0xc(%ebp),%esp 114e08: 5b pop %ebx 114e09: 5e pop %esi 114e0a: 5f pop %edi 114e0b: 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 ); 114e0c: e9 cb 1b 00 00 jmp 1169dc <_Thread_queue_Enqueue_with_handler> 114e11: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 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 ); 114e14: 89 5d 0c mov %ebx,0xc(%ebp) 114e17: 83 c2 68 add $0x68,%edx 114e1a: 89 55 08 mov %edx,0x8(%ebp) } 114e1d: 8d 65 f4 lea -0xc(%ebp),%esp 114e20: 5b pop %ebx 114e21: 5e pop %esi 114e22: 5f pop %edi 114e23: c9 leave 114e24: e9 97 fd ff ff jmp 114bc0 <_Chain_Append> <== ALWAYS TAKEN 0010bec0 <_CORE_message_queue_Submit>: #endif CORE_message_queue_Submit_types submit_type, bool wait, Watchdog_Interval timeout ) { 10bec0: 55 push %ebp 10bec1: 89 e5 mov %esp,%ebp 10bec3: 57 push %edi 10bec4: 56 push %esi 10bec5: 53 push %ebx 10bec6: 83 ec 1c sub $0x1c,%esp 10bec9: 8b 5d 08 mov 0x8(%ebp),%ebx 10becc: 8b 75 0c mov 0xc(%ebp),%esi 10becf: 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 ) { 10bed2: 8b 45 10 mov 0x10(%ebp),%eax 10bed5: 39 43 4c cmp %eax,0x4c(%ebx) 10bed8: 72 2e jb 10bf08 <_CORE_message_queue_Submit+0x48> } /* * Is there a thread currently waiting on this message queue? */ if ( the_message_queue->number_of_pending_messages == 0 ) { 10beda: 8b 43 48 mov 0x48(%ebx),%eax 10bedd: 85 c0 test %eax,%eax 10bedf: 74 37 je 10bf18 <_CORE_message_queue_Submit+0x58> /* * 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 ) { 10bee1: 39 43 44 cmp %eax,0x44(%ebx) 10bee4: 0f 87 b6 00 00 00 ja 10bfa0 <_CORE_message_queue_Submit+0xe0> /* * 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 ) { 10beea: 84 c9 test %cl,%cl 10beec: 0f 84 ea 00 00 00 je 10bfdc <_CORE_message_queue_Submit+0x11c> /* * 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() ) { 10bef2: a1 74 74 12 00 mov 0x127474,%eax 10bef7: 85 c0 test %eax,%eax 10bef9: 74 5d je 10bf58 <_CORE_message_queue_Submit+0x98> 10befb: b8 03 00 00 00 mov $0x3,%eax _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); } return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT; #endif } 10bf00: 8d 65 f4 lea -0xc(%ebp),%esp 10bf03: 5b pop %ebx 10bf04: 5e pop %esi 10bf05: 5f pop %edi 10bf06: c9 leave 10bf07: c3 ret ) { CORE_message_queue_Buffer_control *the_message; Thread_Control *the_thread; if ( size > the_message_queue->maximum_message_size ) { 10bf08: b8 01 00 00 00 mov $0x1,%eax _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); } return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT; #endif } 10bf0d: 8d 65 f4 lea -0xc(%ebp),%esp 10bf10: 5b pop %ebx 10bf11: 5e pop %esi 10bf12: 5f pop %edi 10bf13: c9 leave 10bf14: c3 ret 10bf15: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED /* * Is there a thread currently waiting on this message queue? */ if ( the_message_queue->number_of_pending_messages == 0 ) { the_thread = _Thread_queue_Dequeue( &the_message_queue->Wait_queue ); 10bf18: 83 ec 0c sub $0xc,%esp 10bf1b: 53 push %ebx 10bf1c: 88 4d e4 mov %cl,-0x1c(%ebp) 10bf1f: e8 84 19 00 00 call 10d8a8 <_Thread_queue_Dequeue> 10bf24: 89 c2 mov %eax,%edx if ( the_thread ) { 10bf26: 83 c4 10 add $0x10,%esp 10bf29: 85 c0 test %eax,%eax 10bf2b: 8a 4d e4 mov -0x1c(%ebp),%cl 10bf2e: 0f 84 b8 00 00 00 je 10bfec <_CORE_message_queue_Submit+0x12c> const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 10bf34: 8b 40 2c mov 0x2c(%eax),%eax 10bf37: 89 c7 mov %eax,%edi 10bf39: 8b 4d 10 mov 0x10(%ebp),%ecx 10bf3c: 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; 10bf3e: 8b 42 28 mov 0x28(%edx),%eax 10bf41: 8b 4d 10 mov 0x10(%ebp),%ecx 10bf44: 89 08 mov %ecx,(%eax) the_thread->Wait.count = (uint32_t) submit_type; 10bf46: 8b 45 1c mov 0x1c(%ebp),%eax 10bf49: 89 42 24 mov %eax,0x24(%edx) 10bf4c: 31 c0 xor %eax,%eax _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); } return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT; #endif } 10bf4e: 8d 65 f4 lea -0xc(%ebp),%esp 10bf51: 5b pop %ebx 10bf52: 5e pop %esi 10bf53: 5f pop %edi 10bf54: c9 leave 10bf55: c3 ret 10bf56: 66 90 xchg %ax,%ax <== NOT EXECUTED * 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; 10bf58: a1 98 74 12 00 mov 0x127498,%eax ISR_Level level; _ISR_Disable( level ); 10bf5d: 9c pushf 10bf5e: fa cli 10bf5f: 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; 10bf60: 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; 10bf67: 89 58 44 mov %ebx,0x44(%eax) executing->Wait.id = id; 10bf6a: 8b 55 14 mov 0x14(%ebp),%edx 10bf6d: 89 50 20 mov %edx,0x20(%eax) executing->Wait.return_argument_second.immutable_object = buffer; 10bf70: 89 70 2c mov %esi,0x2c(%eax) executing->Wait.option = (uint32_t) size; 10bf73: 8b 55 10 mov 0x10(%ebp),%edx 10bf76: 89 50 30 mov %edx,0x30(%eax) executing->Wait.count = submit_type; 10bf79: 8b 55 1c mov 0x1c(%ebp),%edx 10bf7c: 89 50 24 mov %edx,0x24(%eax) _ISR_Enable( level ); 10bf7f: 51 push %ecx 10bf80: 9d popf _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); 10bf81: 50 push %eax 10bf82: 68 d4 dc 10 00 push $0x10dcd4 10bf87: ff 75 24 pushl 0x24(%ebp) 10bf8a: 53 push %ebx 10bf8b: e8 34 1a 00 00 call 10d9c4 <_Thread_queue_Enqueue_with_handler> 10bf90: b8 07 00 00 00 mov $0x7,%eax } return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT; 10bf95: 83 c4 10 add $0x10,%esp #endif } 10bf98: 8d 65 f4 lea -0xc(%ebp),%esp 10bf9b: 5b pop %ebx 10bf9c: 5e pop %esi 10bf9d: 5f pop %edi 10bf9e: c9 leave 10bf9f: c3 ret 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 *) 10bfa0: 83 ec 0c sub $0xc,%esp 10bfa3: 8d 43 68 lea 0x68(%ebx),%eax 10bfa6: 50 push %eax 10bfa7: e8 f0 fe ff ff call 10be9c <_Chain_Get> <== ALWAYS TAKEN 10bfac: 89 c2 mov %eax,%edx const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 10bfae: 8d 40 10 lea 0x10(%eax),%eax 10bfb1: 89 c7 mov %eax,%edi 10bfb3: 8b 4d 10 mov 0x10(%ebp),%ecx 10bfb6: f3 a4 rep movsb %ds:(%esi),%es:(%edi) _CORE_message_queue_Copy_buffer( buffer, the_message->Contents.buffer, size ); the_message->Contents.size = size; 10bfb8: 8b 4d 10 mov 0x10(%ebp),%ecx 10bfbb: 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; 10bfbe: 8b 45 1c mov 0x1c(%ebp),%eax 10bfc1: 89 42 08 mov %eax,0x8(%edx) _CORE_message_queue_Set_message_priority( the_message, submit_type ); _CORE_message_queue_Insert_message( 10bfc4: 83 c4 0c add $0xc,%esp 10bfc7: 50 push %eax 10bfc8: 52 push %edx 10bfc9: 53 push %ebx 10bfca: e8 19 4a 00 00 call 1109e8 <_CORE_message_queue_Insert_message> 10bfcf: 31 c0 xor %eax,%eax the_message_queue, the_message, submit_type ); return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; 10bfd1: 83 c4 10 add $0x10,%esp 10bfd4: e9 34 ff ff ff jmp 10bf0d <_CORE_message_queue_Submit+0x4d> <== ALWAYS TAKEN 10bfd9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED /* * 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 ) { 10bfdc: b8 02 00 00 00 mov $0x2,%eax _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); } return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT; #endif } 10bfe1: 8d 65 f4 lea -0xc(%ebp),%esp 10bfe4: 5b pop %ebx 10bfe5: 5e pop %esi 10bfe6: 5f pop %edi 10bfe7: c9 leave 10bfe8: c3 ret 10bfe9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED /* * Is there a thread currently waiting on this message queue? */ if ( the_message_queue->number_of_pending_messages == 0 ) { the_thread = _Thread_queue_Dequeue( &the_message_queue->Wait_queue ); if ( the_thread ) { 10bfec: 8b 43 48 mov 0x48(%ebx),%eax 10bfef: e9 ed fe ff ff jmp 10bee1 <_CORE_message_queue_Submit+0x21> <== ALWAYS TAKEN 0010c000 <_CORE_mutex_Initialize>: CORE_mutex_Status _CORE_mutex_Initialize( CORE_mutex_Control *the_mutex, CORE_mutex_Attributes *the_mutex_attributes, uint32_t initial_lock ) { 10c000: 55 push %ebp 10c001: 89 e5 mov %esp,%ebp 10c003: 57 push %edi 10c004: 56 push %esi 10c005: 53 push %ebx 10c006: 83 ec 0c sub $0xc,%esp 10c009: 8b 45 08 mov 0x8(%ebp),%eax 10c00c: 8b 5d 0c mov 0xc(%ebp),%ebx 10c00f: 8b 55 10 mov 0x10(%ebp),%edx /* Add this to the RTEMS environment later ????????? rtems_assert( initial_lock == CORE_MUTEX_LOCKED || initial_lock == CORE_MUTEX_UNLOCKED ); */ the_mutex->Attributes = *the_mutex_attributes; 10c012: 8d 78 40 lea 0x40(%eax),%edi 10c015: b9 04 00 00 00 mov $0x4,%ecx 10c01a: 89 de mov %ebx,%esi 10c01c: f3 a5 rep movsl %ds:(%esi),%es:(%edi) the_mutex->lock = initial_lock; 10c01e: 89 50 50 mov %edx,0x50(%eax) the_mutex->blocked_count = 0; 10c021: c7 40 58 00 00 00 00 movl $0x0,0x58(%eax) if ( initial_lock == CORE_MUTEX_LOCKED ) { 10c028: 85 d2 test %edx,%edx 10c02a: 75 30 jne 10c05c <_CORE_mutex_Initialize+0x5c> the_mutex->nest_count = 1; 10c02c: c7 40 54 01 00 00 00 movl $0x1,0x54(%eax) the_mutex->holder = _Thread_Executing; 10c033: 8b 15 98 74 12 00 mov 0x127498,%edx 10c039: 89 50 5c mov %edx,0x5c(%eax) the_mutex->holder_id = _Thread_Executing->Object.id; 10c03c: 8b 4a 08 mov 0x8(%edx),%ecx 10c03f: 89 48 60 mov %ecx,0x60(%eax) */ RTEMS_INLINE_ROUTINE bool _CORE_mutex_Is_inherit_priority( CORE_mutex_Attributes *the_attribute ) { return the_attribute->discipline == CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; 10c042: 8b 48 48 mov 0x48(%eax),%ecx if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 10c045: 83 f9 02 cmp $0x2,%ecx 10c048: 74 05 je 10c04f <_CORE_mutex_Initialize+0x4f> 10c04a: 83 f9 03 cmp $0x3,%ecx 10c04d: 75 22 jne 10c071 <_CORE_mutex_Initialize+0x71> _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { if ( _Thread_Executing->current_priority < the_mutex->Attributes.priority_ceiling ) 10c04f: 8b 4a 14 mov 0x14(%edx),%ecx 10c052: 3b 48 4c cmp 0x4c(%eax),%ecx 10c055: 72 41 jb 10c098 <_CORE_mutex_Initialize+0x98> _Chain_Prepend_unprotected( &_Thread_Executing->lock_mutex, &the_mutex->queue.lock_queue ); the_mutex->queue.priority_before = _Thread_Executing->current_priority; #endif _Thread_Executing->resource_count++; 10c057: ff 42 1c incl 0x1c(%edx) 10c05a: eb 15 jmp 10c071 <_CORE_mutex_Initialize+0x71> <== ALWAYS TAKEN } } else { the_mutex->nest_count = 0; 10c05c: c7 40 54 00 00 00 00 movl $0x0,0x54(%eax) the_mutex->holder = NULL; 10c063: c7 40 5c 00 00 00 00 movl $0x0,0x5c(%eax) the_mutex->holder_id = 0; 10c06a: c7 40 60 00 00 00 00 movl $0x0,0x60(%eax) } _Thread_queue_Initialize( 10c071: 6a 05 push $0x5 10c073: 68 00 04 00 00 push $0x400 10c078: 31 d2 xor %edx,%edx 10c07a: 83 7b 08 00 cmpl $0x0,0x8(%ebx) 10c07e: 0f 95 c2 setne %dl 10c081: 52 push %edx 10c082: 50 push %eax 10c083: e8 9c 1b 00 00 call 10dc24 <_Thread_queue_Initialize> 10c088: 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; 10c08a: 83 c4 10 add $0x10,%esp } 10c08d: 8d 65 f4 lea -0xc(%ebp),%esp 10c090: 5b pop %ebx 10c091: 5e pop %esi 10c092: 5f pop %edi 10c093: c9 leave 10c094: c3 ret 10c095: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED the_mutex->holder_id = _Thread_Executing->Object.id; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { if ( _Thread_Executing->current_priority < the_mutex->Attributes.priority_ceiling ) 10c098: b8 06 00 00 00 mov $0x6,%eax STATES_WAITING_FOR_MUTEX, CORE_MUTEX_TIMEOUT ); return CORE_MUTEX_STATUS_SUCCESSFUL; } 10c09d: 8d 65 f4 lea -0xc(%ebp),%esp 10c0a0: 5b pop %ebx 10c0a1: 5e pop %esi 10c0a2: 5f pop %edi 10c0a3: c9 leave 10c0a4: c3 ret 0010c0f8 <_CORE_mutex_Seize>: Objects_Id _id, bool _wait, Watchdog_Interval _timeout, ISR_Level _level ) { 10c0f8: 55 push %ebp 10c0f9: 89 e5 mov %esp,%ebp 10c0fb: 53 push %ebx 10c0fc: 83 ec 14 sub $0x14,%esp 10c0ff: 8b 5d 08 mov 0x8(%ebp),%ebx 10c102: 8a 55 10 mov 0x10(%ebp),%dl _CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level ); 10c105: a1 d8 73 12 00 mov 0x1273d8,%eax 10c10a: 85 c0 test %eax,%eax 10c10c: 74 04 je 10c112 <_CORE_mutex_Seize+0x1a> 10c10e: 84 d2 test %dl,%dl 10c110: 75 36 jne 10c148 <_CORE_mutex_Seize+0x50> <== NEVER TAKEN 10c112: 83 ec 08 sub $0x8,%esp 10c115: 8d 45 18 lea 0x18(%ebp),%eax 10c118: 50 push %eax 10c119: 53 push %ebx 10c11a: 88 55 f4 mov %dl,-0xc(%ebp) 10c11d: e8 72 49 00 00 call 110a94 <_CORE_mutex_Seize_interrupt_trylock> 10c122: 83 c4 10 add $0x10,%esp 10c125: 85 c0 test %eax,%eax 10c127: 8a 55 f4 mov -0xc(%ebp),%dl 10c12a: 74 14 je 10c140 <_CORE_mutex_Seize+0x48> 10c12c: 84 d2 test %dl,%dl 10c12e: 75 30 jne 10c160 <_CORE_mutex_Seize+0x68> 10c130: ff 75 18 pushl 0x18(%ebp) 10c133: 9d popf 10c134: a1 98 74 12 00 mov 0x127498,%eax 10c139: c7 40 34 01 00 00 00 movl $0x1,0x34(%eax) } 10c140: 8b 5d fc mov -0x4(%ebp),%ebx 10c143: c9 leave 10c144: c3 ret 10c145: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED bool _wait, Watchdog_Interval _timeout, ISR_Level _level ) { _CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level ); 10c148: 83 3d a0 75 12 00 01 cmpl $0x1,0x1275a0 10c14f: 76 c1 jbe 10c112 <_CORE_mutex_Seize+0x1a> 10c151: 53 push %ebx 10c152: 6a 13 push $0x13 10c154: 6a 00 push $0x0 10c156: 6a 00 push $0x0 10c158: e8 9b 05 00 00 call 10c6f8 <_Internal_error_Occurred> <== ALWAYS TAKEN 10c15d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 10c160: c7 43 30 01 00 00 00 movl $0x1,0x30(%ebx) 10c167: a1 98 74 12 00 mov 0x127498,%eax 10c16c: 89 58 44 mov %ebx,0x44(%eax) 10c16f: 8b 55 0c mov 0xc(%ebp),%edx 10c172: 89 50 20 mov %edx,0x20(%eax) 10c175: a1 d8 73 12 00 mov 0x1273d8,%eax 10c17a: 40 inc %eax 10c17b: a3 d8 73 12 00 mov %eax,0x1273d8 10c180: ff 75 18 pushl 0x18(%ebp) 10c183: 9d popf 10c184: 83 ec 08 sub $0x8,%esp 10c187: ff 75 14 pushl 0x14(%ebp) 10c18a: 53 push %ebx 10c18b: e8 18 ff ff ff call 10c0a8 <_CORE_mutex_Seize_interrupt_blocking> <== ALWAYS TAKEN 10c190: 83 c4 10 add $0x10,%esp } 10c193: 8b 5d fc mov -0x4(%ebp),%ebx 10c196: c9 leave 10c197: c3 ret 0010c0a8 <_CORE_mutex_Seize_interrupt_blocking>: void _CORE_mutex_Seize_interrupt_blocking( CORE_mutex_Control *the_mutex, Watchdog_Interval timeout ) { 10c0a8: 55 push %ebp 10c0a9: 89 e5 mov %esp,%ebp 10c0ab: 56 push %esi 10c0ac: 53 push %ebx 10c0ad: 8b 5d 08 mov 0x8(%ebp),%ebx 10c0b0: 8b 75 0c mov 0xc(%ebp),%esi Thread_Control *executing; executing = _Thread_Executing; 10c0b3: a1 98 74 12 00 mov 0x127498,%eax if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) ) { 10c0b8: 83 7b 48 02 cmpl $0x2,0x48(%ebx) 10c0bc: 74 1e je 10c0dc <_CORE_mutex_Seize_interrupt_blocking+0x34> false ); } } the_mutex->blocked_count++; 10c0be: ff 43 58 incl 0x58(%ebx) _Thread_queue_Enqueue( &the_mutex->Wait_queue, timeout ); 10c0c1: 50 push %eax 10c0c2: 68 d4 dc 10 00 push $0x10dcd4 10c0c7: 56 push %esi 10c0c8: 53 push %ebx 10c0c9: e8 f6 18 00 00 call 10d9c4 <_Thread_queue_Enqueue_with_handler> _Thread_Enable_dispatch(); 10c0ce: 83 c4 10 add $0x10,%esp } 10c0d1: 8d 65 f8 lea -0x8(%ebp),%esp 10c0d4: 5b pop %ebx 10c0d5: 5e pop %esi 10c0d6: c9 leave } the_mutex->blocked_count++; _Thread_queue_Enqueue( &the_mutex->Wait_queue, timeout ); _Thread_Enable_dispatch(); 10c0d7: e9 d8 13 00 00 jmp 10d4b4 <_Thread_Enable_dispatch> { Thread_Control *executing; executing = _Thread_Executing; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) ) { if ( the_mutex->holder->current_priority > executing->current_priority ) { 10c0dc: 8b 53 5c mov 0x5c(%ebx),%edx 10c0df: 8b 40 14 mov 0x14(%eax),%eax 10c0e2: 39 42 14 cmp %eax,0x14(%edx) 10c0e5: 76 d7 jbe 10c0be <_CORE_mutex_Seize_interrupt_blocking+0x16> _Thread_Change_priority( 10c0e7: 51 push %ecx 10c0e8: 6a 00 push $0x0 10c0ea: 50 push %eax 10c0eb: 52 push %edx 10c0ec: e8 db 0e 00 00 call 10cfcc <_Thread_Change_priority> 10c0f1: 83 c4 10 add $0x10,%esp 10c0f4: eb c8 jmp 10c0be <_CORE_mutex_Seize_interrupt_blocking+0x16> <== ALWAYS TAKEN 00110a94 <_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 ) { 110a94: 55 push %ebp 110a95: 89 e5 mov %esp,%ebp 110a97: 56 push %esi 110a98: 53 push %ebx 110a99: 8b 45 08 mov 0x8(%ebp),%eax 110a9c: 8b 4d 0c mov 0xc(%ebp),%ecx { Thread_Control *executing; /* disabled when you get here */ executing = _Thread_Executing; 110a9f: 8b 15 98 74 12 00 mov 0x127498,%edx executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; 110aa5: c7 42 34 00 00 00 00 movl $0x0,0x34(%edx) if ( !_CORE_mutex_Is_locked( the_mutex ) ) { 110aac: 8b 58 50 mov 0x50(%eax),%ebx 110aaf: 85 db test %ebx,%ebx 110ab1: 74 31 je 110ae4 <_CORE_mutex_Seize_interrupt_trylock+0x50> the_mutex->lock = CORE_MUTEX_LOCKED; 110ab3: c7 40 50 00 00 00 00 movl $0x0,0x50(%eax) the_mutex->holder = executing; 110aba: 89 50 5c mov %edx,0x5c(%eax) the_mutex->holder_id = executing->Object.id; 110abd: 8b 5a 08 mov 0x8(%edx),%ebx 110ac0: 89 58 60 mov %ebx,0x60(%eax) the_mutex->nest_count = 1; 110ac3: 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; 110aca: 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 ) || 110acd: 83 fb 02 cmp $0x2,%ebx 110ad0: 74 26 je 110af8 <_CORE_mutex_Seize_interrupt_trylock+0x64> 110ad2: 83 fb 03 cmp $0x3,%ebx 110ad5: 74 3d je 110b14 <_CORE_mutex_Seize_interrupt_trylock+0x80> executing->resource_count++; } if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { _ISR_Enable( *level_p ); 110ad7: ff 31 pushl (%ecx) 110ad9: 9d popf 110ada: 31 c0 xor %eax,%eax return _CORE_mutex_Seize_interrupt_trylock_body( the_mutex, level_p ); } 110adc: 8d 65 f8 lea -0x8(%ebp),%esp 110adf: 5b pop %ebx 110ae0: 5e pop %esi 110ae1: c9 leave 110ae2: c3 ret 110ae3: 90 nop <== NOT EXECUTED /* * At this point, we know the mutex was not available. If this thread * is the thread that has locked the mutex, let's see if we are allowed * to nest access. */ if ( _Thread_Is_executing( the_mutex->holder ) ) { 110ae4: 3b 50 5c cmp 0x5c(%eax),%edx 110ae7: 74 17 je 110b00 <_CORE_mutex_Seize_interrupt_trylock+0x6c> the_mutex->nest_count++; _ISR_Enable( *level_p ); return 0; case CORE_MUTEX_NESTING_IS_ERROR: executing->Wait.return_code = CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED; _ISR_Enable( *level_p ); 110ae9: b8 01 00 00 00 mov $0x1,%eax 110aee: 8d 65 f8 lea -0x8(%ebp),%esp 110af1: 5b pop %ebx 110af2: 5e pop %esi 110af3: c9 leave 110af4: c3 ret 110af5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED _Chain_Prepend_unprotected( &executing->lock_mutex, &the_mutex->queue.lock_queue ); the_mutex->queue.priority_before = executing->current_priority; #endif executing->resource_count++; 110af8: ff 42 1c incl 0x1c(%edx) 110afb: eb da jmp 110ad7 <_CORE_mutex_Seize_interrupt_trylock+0x43> <== ALWAYS TAKEN 110afd: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED * At this point, we know the mutex was not available. If this thread * is the thread that has locked the mutex, let's see if we are allowed * to nest access. */ if ( _Thread_Is_executing( the_mutex->holder ) ) { switch ( the_mutex->Attributes.lock_nesting_behavior ) { 110b00: 8b 58 40 mov 0x40(%eax),%ebx 110b03: 85 db test %ebx,%ebx 110b05: 75 45 jne 110b4c <_CORE_mutex_Seize_interrupt_trylock+0xb8> case CORE_MUTEX_NESTING_ACQUIRES: the_mutex->nest_count++; 110b07: ff 40 54 incl 0x54(%eax) _ISR_Enable( *level_p ); 110b0a: ff 31 pushl (%ecx) 110b0c: 9d popf 110b0d: 31 c0 xor %eax,%eax 110b0f: eb dd jmp 110aee <_CORE_mutex_Seize_interrupt_trylock+0x5a> <== ALWAYS TAKEN 110b11: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED _Chain_Prepend_unprotected( &executing->lock_mutex, &the_mutex->queue.lock_queue ); the_mutex->queue.priority_before = executing->current_priority; #endif executing->resource_count++; 110b14: 8b 5a 1c mov 0x1c(%edx),%ebx 110b17: 8d 73 01 lea 0x1(%ebx),%esi 110b1a: 89 72 1c mov %esi,0x1c(%edx) { Priority_Control ceiling; Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; current = executing->current_priority; 110b1d: 8b 72 14 mov 0x14(%edx),%esi if ( current == ceiling ) { 110b20: 39 70 4c cmp %esi,0x4c(%eax) 110b23: 74 6b je 110b90 <_CORE_mutex_Seize_interrupt_trylock+0xfc> _ISR_Enable( *level_p ); return 0; } if ( current > ceiling ) { 110b25: 72 39 jb 110b60 <_CORE_mutex_Seize_interrupt_trylock+0xcc> ); _Thread_Enable_dispatch(); return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; 110b27: c7 42 34 06 00 00 00 movl $0x6,0x34(%edx) the_mutex->lock = CORE_MUTEX_UNLOCKED; 110b2e: c7 40 50 01 00 00 00 movl $0x1,0x50(%eax) the_mutex->nest_count = 0; /* undo locking above */ 110b35: c7 40 54 00 00 00 00 movl $0x0,0x54(%eax) executing->resource_count--; /* undo locking above */ 110b3c: 89 5a 1c mov %ebx,0x1c(%edx) _ISR_Enable( *level_p ); 110b3f: ff 31 pushl (%ecx) 110b41: 9d popf 110b42: 31 c0 xor %eax,%eax 110b44: 8d 65 f8 lea -0x8(%ebp),%esp 110b47: 5b pop %ebx 110b48: 5e pop %esi 110b49: c9 leave 110b4a: c3 ret 110b4b: 90 nop <== NOT EXECUTED * At this point, we know the mutex was not available. If this thread * is the thread that has locked the mutex, let's see if we are allowed * to nest access. */ if ( _Thread_Is_executing( the_mutex->holder ) ) { switch ( the_mutex->Attributes.lock_nesting_behavior ) { 110b4c: 4b dec %ebx 110b4d: 75 9a jne 110ae9 <_CORE_mutex_Seize_interrupt_trylock+0x55> case CORE_MUTEX_NESTING_ACQUIRES: the_mutex->nest_count++; _ISR_Enable( *level_p ); return 0; case CORE_MUTEX_NESTING_IS_ERROR: executing->Wait.return_code = CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED; 110b4f: c7 42 34 02 00 00 00 movl $0x2,0x34(%edx) _ISR_Enable( *level_p ); 110b56: ff 31 pushl (%ecx) 110b58: 9d popf 110b59: 31 c0 xor %eax,%eax 110b5b: eb 91 jmp 110aee <_CORE_mutex_Seize_interrupt_trylock+0x5a> <== ALWAYS TAKEN 110b5d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 110b60: 8b 15 d8 73 12 00 mov 0x1273d8,%edx 110b66: 42 inc %edx 110b67: 89 15 d8 73 12 00 mov %edx,0x1273d8 return 0; } if ( current > ceiling ) { _Thread_Disable_dispatch(); _ISR_Enable( *level_p ); 110b6d: ff 31 pushl (%ecx) 110b6f: 9d popf _Thread_Change_priority( 110b70: 52 push %edx 110b71: 6a 00 push $0x0 110b73: ff 70 4c pushl 0x4c(%eax) 110b76: ff 70 5c pushl 0x5c(%eax) 110b79: e8 4e c4 ff ff call 10cfcc <_Thread_Change_priority> the_mutex->holder, the_mutex->Attributes.priority_ceiling, false ); _Thread_Enable_dispatch(); 110b7e: e8 31 c9 ff ff call 10d4b4 <_Thread_Enable_dispatch> 110b83: 31 c0 xor %eax,%eax 110b85: 83 c4 10 add $0x10,%esp 110b88: e9 61 ff ff ff jmp 110aee <_CORE_mutex_Seize_interrupt_trylock+0x5a> <== ALWAYS TAKEN 110b8d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; current = executing->current_priority; if ( current == ceiling ) { _ISR_Enable( *level_p ); 110b90: ff 31 pushl (%ecx) 110b92: 9d popf 110b93: 31 c0 xor %eax,%eax 110b95: e9 54 ff ff ff jmp 110aee <_CORE_mutex_Seize_interrupt_trylock+0x5a> <== ALWAYS TAKEN 0010c198 <_CORE_mutex_Surrender>: #else Objects_Id id __attribute__((unused)), CORE_mutex_API_mp_support_callout api_mutex_mp_support __attribute__((unused)) #endif ) { 10c198: 55 push %ebp 10c199: 89 e5 mov %esp,%ebp 10c19b: 53 push %ebx 10c19c: 83 ec 04 sub $0x4,%esp 10c19f: 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; 10c1a2: 8b 43 5c mov 0x5c(%ebx),%eax * allowed when the mutex in quetion is FIFO or simple Priority * discipline. But Priority Ceiling or Priority Inheritance mutexes * must be released by the thread which acquired them. */ if ( the_mutex->Attributes.only_owner_release ) { 10c1a5: 80 7b 44 00 cmpb $0x0,0x44(%ebx) 10c1a9: 74 15 je 10c1c0 <_CORE_mutex_Surrender+0x28> if ( !_Thread_Is_executing( holder ) ) 10c1ab: 3b 05 98 74 12 00 cmp 0x127498,%eax 10c1b1: 74 0d je 10c1c0 <_CORE_mutex_Surrender+0x28> 10c1b3: b8 03 00 00 00 mov $0x3,%eax } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; return CORE_MUTEX_STATUS_SUCCESSFUL; } 10c1b8: 8b 5d fc mov -0x4(%ebp),%ebx 10c1bb: c9 leave 10c1bc: c3 ret 10c1bd: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED return CORE_MUTEX_STATUS_NOT_OWNER_OF_RESOURCE; } /* XXX already unlocked -- not right status */ if ( !the_mutex->nest_count ) 10c1c0: 8b 53 54 mov 0x54(%ebx),%edx 10c1c3: 85 d2 test %edx,%edx 10c1c5: 74 65 je 10c22c <_CORE_mutex_Surrender+0x94> return CORE_MUTEX_STATUS_SUCCESSFUL; the_mutex->nest_count--; 10c1c7: 4a dec %edx 10c1c8: 89 53 54 mov %edx,0x54(%ebx) if ( the_mutex->nest_count != 0 ) { 10c1cb: 85 d2 test %edx,%edx 10c1cd: 75 5d jne 10c22c <_CORE_mutex_Surrender+0x94> 10c1cf: 8b 53 48 mov 0x48(%ebx),%edx /* * Formally release the mutex before possibly transferring it to a * blocked thread. */ if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 10c1d2: 83 fa 02 cmp $0x2,%edx 10c1d5: 0f 84 99 00 00 00 je 10c274 <_CORE_mutex_Surrender+0xdc> 10c1db: 83 fa 03 cmp $0x3,%edx 10c1de: 0f 84 90 00 00 00 je 10c274 <_CORE_mutex_Surrender+0xdc> } first_node = _Chain_Get_first_unprotected(&holder->lock_mutex); #endif holder->resource_count--; } the_mutex->holder = NULL; 10c1e4: c7 43 5c 00 00 00 00 movl $0x0,0x5c(%ebx) the_mutex->holder_id = 0; 10c1eb: c7 43 60 00 00 00 00 movl $0x0,0x60(%ebx) /* * 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 ) || 10c1f2: 83 fa 02 cmp $0x2,%edx 10c1f5: 74 5d je 10c254 <_CORE_mutex_Surrender+0xbc> 10c1f7: 83 fa 03 cmp $0x3,%edx 10c1fa: 74 58 je 10c254 <_CORE_mutex_Surrender+0xbc> /* * 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 ) ) ) { 10c1fc: 83 ec 0c sub $0xc,%esp 10c1ff: 53 push %ebx 10c200: e8 a3 16 00 00 call 10d8a8 <_Thread_queue_Dequeue> 10c205: 83 c4 10 add $0x10,%esp 10c208: 85 c0 test %eax,%eax 10c20a: 74 7c je 10c288 <_CORE_mutex_Surrender+0xf0> } else #endif { the_mutex->holder = the_thread; 10c20c: 89 43 5c mov %eax,0x5c(%ebx) the_mutex->holder_id = the_thread->Object.id; 10c20f: 8b 50 08 mov 0x8(%eax),%edx 10c212: 89 53 60 mov %edx,0x60(%ebx) the_mutex->nest_count = 1; 10c215: c7 43 54 01 00 00 00 movl $0x1,0x54(%ebx) switch ( the_mutex->Attributes.discipline ) { 10c21c: 8b 53 48 mov 0x48(%ebx),%edx 10c21f: 83 fa 02 cmp $0x2,%edx 10c222: 74 58 je 10c27c <_CORE_mutex_Surrender+0xe4> 10c224: 83 fa 03 cmp $0x3,%edx 10c227: 74 0b je 10c234 <_CORE_mutex_Surrender+0x9c> 10c229: 8d 76 00 lea 0x0(%esi),%esi } break; } } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; 10c22c: 31 c0 xor %eax,%eax return CORE_MUTEX_STATUS_SUCCESSFUL; } 10c22e: 8b 5d fc mov -0x4(%ebp),%ebx 10c231: c9 leave 10c232: c3 ret 10c233: 90 nop <== NOT EXECUTED 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++; 10c234: ff 40 1c incl 0x1c(%eax) if (the_mutex->Attributes.priority_ceiling < 10c237: 8b 53 4c mov 0x4c(%ebx),%edx the_thread->current_priority){ 10c23a: 3b 50 14 cmp 0x14(%eax),%edx 10c23d: 73 ed jae 10c22c <_CORE_mutex_Surrender+0x94> _Thread_Change_priority( 10c23f: 51 push %ecx 10c240: 6a 00 push $0x0 10c242: 52 push %edx 10c243: 50 push %eax 10c244: e8 83 0d 00 00 call 10cfcc <_Thread_Change_priority> <== ALWAYS TAKEN 10c249: 31 c0 xor %eax,%eax 10c24b: 83 c4 10 add $0x10,%esp 10c24e: e9 65 ff ff ff jmp 10c1b8 <_CORE_mutex_Surrender+0x20> <== ALWAYS TAKEN 10c253: 90 nop <== NOT EXECUTED _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 && 10c254: 8b 50 1c mov 0x1c(%eax),%edx 10c257: 85 d2 test %edx,%edx 10c259: 75 a1 jne 10c1fc <_CORE_mutex_Surrender+0x64> holder->real_priority != holder->current_priority ) { 10c25b: 8b 50 18 mov 0x18(%eax),%edx 10c25e: 3b 50 14 cmp 0x14(%eax),%edx 10c261: 74 99 je 10c1fc <_CORE_mutex_Surrender+0x64> _Thread_Change_priority( holder, holder->real_priority, true ); 10c263: 51 push %ecx 10c264: 6a 01 push $0x1 10c266: 52 push %edx 10c267: 50 push %eax 10c268: e8 5f 0d 00 00 call 10cfcc <_Thread_Change_priority> <== ALWAYS TAKEN 10c26d: 83 c4 10 add $0x10,%esp 10c270: eb 8a jmp 10c1fc <_CORE_mutex_Surrender+0x64> <== ALWAYS TAKEN 10c272: 66 90 xchg %ax,%ax <== NOT EXECUTED the_mutex->nest_count++; return CORE_MUTEX_RELEASE_NOT_ORDER; } first_node = _Chain_Get_first_unprotected(&holder->lock_mutex); #endif holder->resource_count--; 10c274: ff 48 1c decl 0x1c(%eax) 10c277: e9 68 ff ff ff jmp 10c1e4 <_CORE_mutex_Surrender+0x4c> <== 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++; 10c27c: ff 40 1c incl 0x1c(%eax) 10c27f: 31 c0 xor %eax,%eax break; 10c281: e9 32 ff ff ff jmp 10c1b8 <_CORE_mutex_Surrender+0x20> <== ALWAYS TAKEN 10c286: 66 90 xchg %ax,%ax <== NOT EXECUTED } break; } } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; 10c288: c7 43 50 01 00 00 00 movl $0x1,0x50(%ebx) 10c28f: 31 c0 xor %eax,%eax 10c291: e9 22 ff ff ff jmp 10c1b8 <_CORE_mutex_Surrender+0x20> <== ALWAYS TAKEN 00114868 <_CORE_semaphore_Seize>: CORE_semaphore_Control *the_semaphore, Objects_Id id, bool wait, Watchdog_Interval timeout ) { 114868: 55 push %ebp 114869: 89 e5 mov %esp,%ebp 11486b: 57 push %edi 11486c: 56 push %esi 11486d: 53 push %ebx 11486e: 83 ec 1c sub $0x1c,%esp 114871: 8b 45 08 mov 0x8(%ebp),%eax 114874: 8b 7d 0c mov 0xc(%ebp),%edi 114877: 8b 75 14 mov 0x14(%ebp),%esi 11487a: 8a 5d 10 mov 0x10(%ebp),%bl Thread_Control *executing; ISR_Level level; executing = _Thread_Executing; 11487d: 8b 15 d8 d0 12 00 mov 0x12d0d8,%edx executing->Wait.return_code = CORE_SEMAPHORE_STATUS_SUCCESSFUL; 114883: c7 42 34 00 00 00 00 movl $0x0,0x34(%edx) _ISR_Disable( level ); 11488a: 9c pushf 11488b: fa cli 11488c: 8f 45 e4 popl -0x1c(%ebp) if ( the_semaphore->count != 0 ) { 11488f: 8b 48 48 mov 0x48(%eax),%ecx 114892: 85 c9 test %ecx,%ecx 114894: 75 46 jne 1148dc <_CORE_semaphore_Seize+0x74> /* * 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 ) { 114896: 84 db test %bl,%bl 114898: 75 16 jne 1148b0 <_CORE_semaphore_Seize+0x48> _ISR_Enable( level ); 11489a: ff 75 e4 pushl -0x1c(%ebp) 11489d: 9d popf executing->Wait.return_code = CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT; 11489e: c7 42 34 01 00 00 00 movl $0x1,0x34(%edx) _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 ); } 1148a5: 83 c4 1c add $0x1c,%esp 1148a8: 5b pop %ebx 1148a9: 5e pop %esi 1148aa: 5f pop %edi 1148ab: c9 leave 1148ac: c3 ret 1148ad: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 1148b0: 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; 1148b7: 89 42 44 mov %eax,0x44(%edx) executing->Wait.id = id; 1148ba: 89 7a 20 mov %edi,0x20(%edx) _ISR_Enable( level ); 1148bd: ff 75 e4 pushl -0x1c(%ebp) 1148c0: 9d popf _Thread_queue_Enqueue( &the_semaphore->Wait_queue, timeout ); 1148c1: c7 45 10 dc 13 11 00 movl $0x1113dc,0x10(%ebp) 1148c8: 89 75 0c mov %esi,0xc(%ebp) 1148cb: 89 45 08 mov %eax,0x8(%ebp) } 1148ce: 83 c4 1c add $0x1c,%esp 1148d1: 5b pop %ebx 1148d2: 5e pop %esi 1148d3: 5f pop %edi 1148d4: 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 ); 1148d5: e9 f2 c7 ff ff jmp 1110cc <_Thread_queue_Enqueue_with_handler> 1148da: 66 90 xchg %ax,%ax <== NOT EXECUTED executing = _Thread_Executing; executing->Wait.return_code = CORE_SEMAPHORE_STATUS_SUCCESSFUL; _ISR_Disable( level ); if ( the_semaphore->count != 0 ) { the_semaphore->count -= 1; 1148dc: 49 dec %ecx 1148dd: 89 48 48 mov %ecx,0x48(%eax) _ISR_Enable( level ); 1148e0: ff 75 e4 pushl -0x1c(%ebp) 1148e3: 9d popf _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 ); } 1148e4: 83 c4 1c add $0x1c,%esp 1148e7: 5b pop %ebx 1148e8: 5e pop %esi 1148e9: 5f pop %edi 1148ea: c9 leave 1148eb: c3 ret 0010c2e4 <_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 ) { 10c2e4: 55 push %ebp 10c2e5: 89 e5 mov %esp,%ebp 10c2e7: 53 push %ebx 10c2e8: 83 ec 10 sub $0x10,%esp 10c2eb: 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)) ) { 10c2ee: 53 push %ebx 10c2ef: e8 b4 15 00 00 call 10d8a8 <_Thread_queue_Dequeue> 10c2f4: 83 c4 10 add $0x10,%esp 10c2f7: 85 c0 test %eax,%eax 10c2f9: 74 09 je 10c304 <_CORE_semaphore_Surrender+0x20> 10c2fb: 31 c0 xor %eax,%eax status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); } return status; } 10c2fd: 8b 5d fc mov -0x4(%ebp),%ebx 10c300: c9 leave 10c301: c3 ret 10c302: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( !_Objects_Is_local_id( the_thread->Object.id ) ) (*api_semaphore_mp_support) ( the_thread, id ); #endif } else { _ISR_Disable( level ); 10c304: 9c pushf 10c305: fa cli 10c306: 5a pop %edx if ( the_semaphore->count < the_semaphore->Attributes.maximum_count ) 10c307: 8b 43 48 mov 0x48(%ebx),%eax 10c30a: 3b 43 40 cmp 0x40(%ebx),%eax 10c30d: 72 0d jb 10c31c <_CORE_semaphore_Surrender+0x38> <== NEVER TAKEN 10c30f: b8 04 00 00 00 mov $0x4,%eax <== NOT EXECUTED the_semaphore->count += 1; else status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); 10c314: 52 push %edx 10c315: 9d popf } return status; } 10c316: 8b 5d fc mov -0x4(%ebp),%ebx 10c319: c9 leave 10c31a: c3 ret 10c31b: 90 nop <== NOT EXECUTED #endif } else { _ISR_Disable( level ); if ( the_semaphore->count < the_semaphore->Attributes.maximum_count ) the_semaphore->count += 1; 10c31c: 40 inc %eax 10c31d: 89 43 48 mov %eax,0x48(%ebx) 10c320: 31 c0 xor %eax,%eax 10c322: eb f0 jmp 10c314 <_CORE_semaphore_Surrender+0x30> <== ALWAYS TAKEN 0010cc84 <_CORE_spinlock_Release>: */ CORE_spinlock_Status _CORE_spinlock_Release( CORE_spinlock_Control *the_spinlock ) { 10cc84: 55 push %ebp 10cc85: 89 e5 mov %esp,%ebp 10cc87: 53 push %ebx 10cc88: 8b 45 08 mov 0x8(%ebp),%eax ISR_Level level; _ISR_Disable( level ); 10cc8b: 9c pushf 10cc8c: fa cli 10cc8d: 59 pop %ecx /* * It must locked before it can be unlocked. */ if ( the_spinlock->lock == CORE_SPINLOCK_UNLOCKED ) { 10cc8e: 8b 50 04 mov 0x4(%eax),%edx 10cc91: 85 d2 test %edx,%edx 10cc93: 75 0b jne 10cca0 <_CORE_spinlock_Release+0x1c> _ISR_Enable( level ); 10cc95: 51 push %ecx 10cc96: 9d popf 10cc97: b8 06 00 00 00 mov $0x6,%eax the_spinlock->lock = CORE_SPINLOCK_UNLOCKED; the_spinlock->holder = 0; _ISR_Enable( level ); return CORE_SPINLOCK_SUCCESSFUL; } 10cc9c: 5b pop %ebx 10cc9d: c9 leave 10cc9e: c3 ret 10cc9f: 90 nop <== NOT EXECUTED } /* * It must locked by the current thread before it can be unlocked. */ if ( the_spinlock->holder != _Thread_Executing->Object.id ) { 10cca0: 8b 58 0c mov 0xc(%eax),%ebx 10cca3: 8b 15 58 87 12 00 mov 0x128758,%edx 10cca9: 3b 5a 08 cmp 0x8(%edx),%ebx 10ccac: 74 0a je 10ccb8 <_CORE_spinlock_Release+0x34> _ISR_Enable( level ); 10ccae: 51 push %ecx 10ccaf: 9d popf 10ccb0: b8 02 00 00 00 mov $0x2,%eax the_spinlock->lock = CORE_SPINLOCK_UNLOCKED; the_spinlock->holder = 0; _ISR_Enable( level ); return CORE_SPINLOCK_SUCCESSFUL; } 10ccb5: 5b pop %ebx 10ccb6: c9 leave 10ccb7: c3 ret } /* * Let it be unlocked. */ the_spinlock->users -= 1; 10ccb8: 8b 50 08 mov 0x8(%eax),%edx 10ccbb: 4a dec %edx 10ccbc: 89 50 08 mov %edx,0x8(%eax) the_spinlock->lock = CORE_SPINLOCK_UNLOCKED; 10ccbf: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax) the_spinlock->holder = 0; 10ccc6: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax) _ISR_Enable( level ); 10cccd: 51 push %ecx 10ccce: 9d popf 10cccf: 31 c0 xor %eax,%eax return CORE_SPINLOCK_SUCCESSFUL; 10ccd1: eb c9 jmp 10cc9c <_CORE_spinlock_Release+0x18> <== ALWAYS TAKEN 0010ccd4 <_CORE_spinlock_Wait>: CORE_spinlock_Status _CORE_spinlock_Wait( CORE_spinlock_Control *the_spinlock, bool wait, Watchdog_Interval timeout ) { 10ccd4: 55 push %ebp 10ccd5: 89 e5 mov %esp,%ebp 10ccd7: 56 push %esi 10ccd8: 53 push %ebx 10ccd9: 8b 5d 08 mov 0x8(%ebp),%ebx 10ccdc: 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 ); 10ccdf: 9c pushf 10cce0: fa cli 10cce1: 58 pop %eax if ( (the_spinlock->lock == CORE_SPINLOCK_LOCKED) && 10cce2: 8b 53 04 mov 0x4(%ebx),%edx 10cce5: 4a dec %edx 10cce6: 74 60 je 10cd48 <_CORE_spinlock_Wait+0x74> (the_spinlock->holder == _Thread_Executing->Object.id) ) { _ISR_Enable( level ); return CORE_SPINLOCK_HOLDER_RELOCKING; } the_spinlock->users += 1; 10cce8: 8b 53 08 mov 0x8(%ebx),%edx 10cceb: 42 inc %edx 10ccec: 89 53 08 mov %edx,0x8(%ebx) for ( ;; ) { if ( the_spinlock->lock == CORE_SPINLOCK_UNLOCKED ) { 10ccef: 8b 53 04 mov 0x4(%ebx),%edx 10ccf2: 85 d2 test %edx,%edx 10ccf4: 74 22 je 10cd18 <_CORE_spinlock_Wait+0x44> } /* * Spinlock is unavailable. If not willing to wait, return. */ if ( !wait ) { 10ccf6: 84 c9 test %cl,%cl 10ccf8: 74 39 je 10cd33 <_CORE_spinlock_Wait+0x5f> 10ccfa: 66 90 xchg %ax,%ax * * A spinlock cannot be deleted while it is being used so we are * safe from deletion. */ _ISR_Enable( level ); 10ccfc: 50 push %eax 10ccfd: 9d popf /* An ISR could occur here */ _Thread_Enable_dispatch(); 10ccfe: e8 ed 11 00 00 call 10def0 <_Thread_Enable_dispatch> 10cd03: a1 98 86 12 00 mov 0x128698,%eax 10cd08: 40 inc %eax 10cd09: a3 98 86 12 00 mov %eax,0x128698 /* Another thread could get dispatched here */ /* Reenter the critical sections so we can attempt the lock again. */ _Thread_Disable_dispatch(); _ISR_Disable( level ); 10cd0e: 9c pushf 10cd0f: fa cli 10cd10: 58 pop %eax _ISR_Enable( level ); return CORE_SPINLOCK_HOLDER_RELOCKING; } the_spinlock->users += 1; for ( ;; ) { if ( the_spinlock->lock == CORE_SPINLOCK_UNLOCKED ) { 10cd11: 8b 53 04 mov 0x4(%ebx),%edx 10cd14: 85 d2 test %edx,%edx 10cd16: 75 e4 jne 10ccfc <_CORE_spinlock_Wait+0x28> the_spinlock->lock = CORE_SPINLOCK_LOCKED; 10cd18: c7 43 04 01 00 00 00 movl $0x1,0x4(%ebx) the_spinlock->holder = _Thread_Executing->Object.id; 10cd1f: 8b 15 58 87 12 00 mov 0x128758,%edx 10cd25: 8b 52 08 mov 0x8(%edx),%edx 10cd28: 89 53 0c mov %edx,0xc(%ebx) _ISR_Enable( level ); 10cd2b: 50 push %eax 10cd2c: 9d popf 10cd2d: 31 c0 xor %eax,%eax _Thread_Disable_dispatch(); _ISR_Disable( level ); } } 10cd2f: 5b pop %ebx 10cd30: 5e pop %esi 10cd31: c9 leave 10cd32: c3 ret /* * Spinlock is unavailable. If not willing to wait, return. */ if ( !wait ) { the_spinlock->users -= 1; 10cd33: 8b 53 08 mov 0x8(%ebx),%edx 10cd36: 4a dec %edx 10cd37: 89 53 08 mov %edx,0x8(%ebx) _ISR_Enable( level ); 10cd3a: 50 push %eax 10cd3b: 9d popf 10cd3c: b8 05 00 00 00 mov $0x5,%eax _Thread_Disable_dispatch(); _ISR_Disable( level ); } } 10cd41: 5b pop %ebx 10cd42: 5e pop %esi 10cd43: c9 leave 10cd44: c3 ret 10cd45: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED Watchdog_Interval limit = _Watchdog_Ticks_since_boot + timeout; #endif _ISR_Disable( level ); if ( (the_spinlock->lock == CORE_SPINLOCK_LOCKED) && (the_spinlock->holder == _Thread_Executing->Object.id) ) { 10cd48: 8b 73 0c mov 0xc(%ebx),%esi 10cd4b: 8b 15 58 87 12 00 mov 0x128758,%edx 10cd51: 3b 72 08 cmp 0x8(%edx),%esi 10cd54: 75 92 jne 10cce8 <_CORE_spinlock_Wait+0x14> _ISR_Enable( level ); 10cd56: 50 push %eax 10cd57: 9d popf 10cd58: b8 01 00 00 00 mov $0x1,%eax return CORE_SPINLOCK_HOLDER_RELOCKING; 10cd5d: eb d0 jmp 10cd2f <_CORE_spinlock_Wait+0x5b> <== ALWAYS TAKEN 0010be9c <_Chain_Get>: */ Chain_Node *_Chain_Get( Chain_Control *the_chain ) { 10be9c: 55 push %ebp 10be9d: 89 e5 mov %esp,%ebp 10be9f: 53 push %ebx 10bea0: 8b 55 08 mov 0x8(%ebp),%edx ISR_Level level; Chain_Node *return_node; return_node = NULL; _ISR_Disable( level ); 10bea3: 9c pushf 10bea4: fa cli 10bea5: 5b pop %ebx */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 10bea6: 8b 02 mov (%edx),%eax */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10bea8: 8d 4a 04 lea 0x4(%edx),%ecx 10beab: 39 c8 cmp %ecx,%eax 10bead: 74 0d je 10bebc <_Chain_Get+0x20> { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; 10beaf: 8b 08 mov (%eax),%ecx the_chain->first = new_first; 10beb1: 89 0a mov %ecx,(%edx) new_first->previous = _Chain_Head(the_chain); 10beb3: 89 51 04 mov %edx,0x4(%ecx) if ( !_Chain_Is_empty( the_chain ) ) return_node = _Chain_Get_first_unprotected( the_chain ); _ISR_Enable( level ); 10beb6: 53 push %ebx 10beb7: 9d popf return return_node; } 10beb8: 5b pop %ebx 10beb9: c9 leave 10beba: c3 ret 10bebb: 90 nop <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10bebc: 31 c0 xor %eax,%eax 10bebe: eb f6 jmp 10beb6 <_Chain_Get+0x1a> <== ALWAYS TAKEN 001109a8 <_Chain_Initialize>: Chain_Control *the_chain, void *starting_address, size_t number_nodes, size_t node_size ) { 1109a8: 55 push %ebp 1109a9: 89 e5 mov %esp,%ebp 1109ab: 57 push %edi 1109ac: 56 push %esi 1109ad: 53 push %ebx 1109ae: 8b 7d 08 mov 0x8(%ebp),%edi 1109b1: 8b 4d 10 mov 0x10(%ebp),%ecx 1109b4: 8b 75 14 mov 0x14(%ebp),%esi */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Head( Chain_Control *the_chain ) { return (Chain_Node *) the_chain; 1109b7: 89 fa mov %edi,%edx Chain_Node *current; Chain_Node *next; count = number_nodes; current = _Chain_Head( the_chain ); the_chain->permanent_null = NULL; 1109b9: c7 47 04 00 00 00 00 movl $0x0,0x4(%edi) next = starting_address; while ( count-- ) { 1109c0: 85 c9 test %ecx,%ecx 1109c2: 74 17 je 1109db <_Chain_Initialize+0x33> <== ALWAYS TAKEN Chain_Node *next; count = number_nodes; current = _Chain_Head( the_chain ); the_chain->permanent_null = NULL; next = starting_address; 1109c4: 8b 45 0c mov 0xc(%ebp),%eax 1109c7: eb 05 jmp 1109ce <_Chain_Initialize+0x26> <== ALWAYS TAKEN 1109c9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED while ( count-- ) { 1109cc: 89 d8 mov %ebx,%eax current->next = next; 1109ce: 89 02 mov %eax,(%edx) next->previous = current; 1109d0: 89 50 04 mov %edx,0x4(%eax) 1109d3: 8d 1c 30 lea (%eax,%esi,1),%ebx current = next; next = (Chain_Node *) 1109d6: 89 c2 mov %eax,%edx count = number_nodes; current = _Chain_Head( the_chain ); the_chain->permanent_null = NULL; next = starting_address; while ( count-- ) { 1109d8: 49 dec %ecx 1109d9: 75 f1 jne 1109cc <_Chain_Initialize+0x24> next->previous = current; current = next; next = (Chain_Node *) _Addresses_Add_offset( (void *) next, node_size ); } current->next = _Chain_Tail( the_chain ); 1109db: 8d 47 04 lea 0x4(%edi),%eax 1109de: 89 02 mov %eax,(%edx) the_chain->last = current; 1109e0: 89 57 08 mov %edx,0x8(%edi) } 1109e3: 5b pop %ebx 1109e4: 5e pop %esi 1109e5: 5f pop %edi 1109e6: c9 leave 1109e7: c3 ret 0010af24 <_Event_Seize>: rtems_event_set event_in, rtems_option option_set, rtems_interval ticks, rtems_event_set *event_out ) { 10af24: 55 push %ebp 10af25: 89 e5 mov %esp,%ebp 10af27: 57 push %edi 10af28: 56 push %esi 10af29: 53 push %ebx 10af2a: 83 ec 2c sub $0x2c,%esp 10af2d: 8b 45 08 mov 0x8(%ebp),%eax 10af30: 8b 4d 0c mov 0xc(%ebp),%ecx 10af33: 8b 55 10 mov 0x10(%ebp),%edx 10af36: 89 55 dc mov %edx,-0x24(%ebp) 10af39: 8b 7d 14 mov 0x14(%ebp),%edi rtems_event_set pending_events; ISR_Level level; RTEMS_API_Control *api; Thread_blocking_operation_States sync_state; executing = _Thread_Executing; 10af3c: 8b 1d 98 74 12 00 mov 0x127498,%ebx executing->Wait.return_code = RTEMS_SUCCESSFUL; 10af42: c7 43 34 00 00 00 00 movl $0x0,0x34(%ebx) api = executing->API_Extensions[ THREAD_API_RTEMS ]; 10af49: 8b b3 f4 00 00 00 mov 0xf4(%ebx),%esi _ISR_Disable( level ); 10af4f: 9c pushf 10af50: fa cli 10af51: 8f 45 e0 popl -0x20(%ebp) pending_events = api->pending_events; 10af54: 8b 16 mov (%esi),%edx 10af56: 89 55 d4 mov %edx,-0x2c(%ebp) seized_events = _Event_sets_Get( pending_events, event_in ); if ( !_Event_sets_Is_empty( seized_events ) && 10af59: 21 c2 and %eax,%edx 10af5b: 89 55 e4 mov %edx,-0x1c(%ebp) 10af5e: 74 0d je 10af6d <_Event_Seize+0x49> 10af60: 39 d0 cmp %edx,%eax 10af62: 0f 84 84 00 00 00 je 10afec <_Event_Seize+0xc8> 10af68: f6 c1 02 test $0x2,%cl 10af6b: 75 7f jne 10afec <_Event_Seize+0xc8> <== NEVER TAKEN _ISR_Enable( level ); *event_out = seized_events; return; } if ( _Options_Is_no_wait( option_set ) ) { 10af6d: f6 c1 01 test $0x1,%cl 10af70: 75 62 jne 10afd4 <_Event_Seize+0xb0> * set properly when we are marked as in the event critical section. * * NOTE: Since interrupts are disabled, this isn't that much of an * issue but better safe than sorry. */ executing->Wait.option = (uint32_t) option_set; 10af72: 89 4b 30 mov %ecx,0x30(%ebx) executing->Wait.count = (uint32_t) event_in; 10af75: 89 43 24 mov %eax,0x24(%ebx) executing->Wait.return_argument = event_out; 10af78: 89 7b 28 mov %edi,0x28(%ebx) _Event_Sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 10af7b: c7 05 68 7d 12 00 01 movl $0x1,0x127d68 10af82: 00 00 00 _ISR_Enable( level ); 10af85: ff 75 e0 pushl -0x20(%ebp) 10af88: 9d popf if ( ticks ) { 10af89: 8b 45 dc mov -0x24(%ebp),%eax 10af8c: 85 c0 test %eax,%eax 10af8e: 0f 85 80 00 00 00 jne 10b014 <_Event_Seize+0xf0> NULL ); _Watchdog_Insert_ticks( &executing->Timer, ticks ); } _Thread_Set_state( executing, STATES_WAITING_FOR_EVENT ); 10af94: 83 ec 08 sub $0x8,%esp 10af97: 68 00 01 00 00 push $0x100 10af9c: 53 push %ebx 10af9d: e8 d6 2d 00 00 call 10dd78 <_Thread_Set_state> _ISR_Disable( level ); 10afa2: 9c pushf 10afa3: fa cli 10afa4: 5a pop %edx sync_state = _Event_Sync_state; 10afa5: a1 68 7d 12 00 mov 0x127d68,%eax _Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 10afaa: c7 05 68 7d 12 00 00 movl $0x0,0x127d68 10afb1: 00 00 00 if ( sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) { 10afb4: 83 c4 10 add $0x10,%esp 10afb7: 83 f8 01 cmp $0x1,%eax 10afba: 74 4c je 10b008 <_Event_Seize+0xe4> * An interrupt completed the thread's blocking request. * The blocking thread was satisfied by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ _Thread_blocking_operation_Cancel( sync_state, executing, level ); 10afbc: 89 55 10 mov %edx,0x10(%ebp) 10afbf: 89 5d 0c mov %ebx,0xc(%ebp) 10afc2: 89 45 08 mov %eax,0x8(%ebp) } 10afc5: 8d 65 f4 lea -0xc(%ebp),%esp 10afc8: 5b pop %ebx 10afc9: 5e pop %esi 10afca: 5f pop %edi 10afcb: 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 ); 10afcc: e9 af 1f 00 00 jmp 10cf80 <_Thread_blocking_operation_Cancel> 10afd1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED *event_out = seized_events; return; } if ( _Options_Is_no_wait( option_set ) ) { _ISR_Enable( level ); 10afd4: ff 75 e0 pushl -0x20(%ebp) 10afd7: 9d popf executing->Wait.return_code = RTEMS_UNSATISFIED; 10afd8: c7 43 34 0d 00 00 00 movl $0xd,0x34(%ebx) *event_out = seized_events; 10afdf: 8b 55 e4 mov -0x1c(%ebp),%edx 10afe2: 89 17 mov %edx,(%edi) * The blocking thread was satisfied by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ _Thread_blocking_operation_Cancel( sync_state, executing, level ); } 10afe4: 8d 65 f4 lea -0xc(%ebp),%esp 10afe7: 5b pop %ebx 10afe8: 5e pop %esi 10afe9: 5f pop %edi 10afea: c9 leave 10afeb: c3 ret pending_events = api->pending_events; seized_events = _Event_sets_Get( pending_events, event_in ); if ( !_Event_sets_Is_empty( seized_events ) && (seized_events == event_in || _Options_Is_any( option_set )) ) { api->pending_events = 10afec: 8b 45 e4 mov -0x1c(%ebp),%eax 10afef: f7 d0 not %eax 10aff1: 23 45 d4 and -0x2c(%ebp),%eax 10aff4: 89 06 mov %eax,(%esi) _Event_sets_Clear( pending_events, seized_events ); _ISR_Enable( level ); 10aff6: ff 75 e0 pushl -0x20(%ebp) 10aff9: 9d popf *event_out = seized_events; 10affa: 8b 45 e4 mov -0x1c(%ebp),%eax 10affd: 89 07 mov %eax,(%edi) * The blocking thread was satisfied by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ _Thread_blocking_operation_Cancel( sync_state, executing, level ); } 10afff: 8d 65 f4 lea -0xc(%ebp),%esp 10b002: 5b pop %ebx 10b003: 5e pop %esi 10b004: 5f pop %edi 10b005: c9 leave 10b006: c3 ret 10b007: 90 nop <== NOT EXECUTED _ISR_Disable( level ); sync_state = _Event_Sync_state; _Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; if ( sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) { _ISR_Enable( level ); 10b008: 52 push %edx 10b009: 9d popf * The blocking thread was satisfied by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ _Thread_blocking_operation_Cancel( sync_state, executing, level ); } 10b00a: 8d 65 f4 lea -0xc(%ebp),%esp 10b00d: 5b pop %ebx 10b00e: 5e pop %esi 10b00f: 5f pop %edi 10b010: c9 leave 10b011: c3 ret 10b012: 66 90 xchg %ax,%ax <== NOT EXECUTED _Event_Sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; _ISR_Enable( level ); if ( ticks ) { _Watchdog_Initialize( 10b014: 8b 43 08 mov 0x8(%ebx),%eax Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 10b017: c7 43 50 00 00 00 00 movl $0x0,0x50(%ebx) the_watchdog->routine = routine; 10b01e: c7 43 64 c8 b1 10 00 movl $0x10b1c8,0x64(%ebx) the_watchdog->id = id; 10b025: 89 43 68 mov %eax,0x68(%ebx) the_watchdog->user_data = user_data; 10b028: c7 43 6c 00 00 00 00 movl $0x0,0x6c(%ebx) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 10b02f: 8b 45 dc mov -0x24(%ebp),%eax 10b032: 89 43 54 mov %eax,0x54(%ebx) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 10b035: 83 ec 08 sub $0x8,%esp 10b038: 8d 43 48 lea 0x48(%ebx),%eax 10b03b: 50 push %eax 10b03c: 68 b8 74 12 00 push $0x1274b8 10b041: e8 ba 33 00 00 call 10e400 <_Watchdog_Insert> 10b046: 83 c4 10 add $0x10,%esp 10b049: e9 46 ff ff ff jmp 10af94 <_Event_Seize+0x70> <== ALWAYS TAKEN 0010b0a4 <_Event_Surrender>: */ void _Event_Surrender( Thread_Control *the_thread ) { 10b0a4: 55 push %ebp 10b0a5: 89 e5 mov %esp,%ebp 10b0a7: 57 push %edi 10b0a8: 56 push %esi 10b0a9: 53 push %ebx 10b0aa: 83 ec 1c sub $0x1c,%esp 10b0ad: 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 ]; 10b0b0: 8b 8b f4 00 00 00 mov 0xf4(%ebx),%ecx option_set = (rtems_option) the_thread->Wait.option; 10b0b6: 8b 73 30 mov 0x30(%ebx),%esi _ISR_Disable( level ); 10b0b9: 9c pushf 10b0ba: fa cli 10b0bb: 8f 45 e4 popl -0x1c(%ebp) pending_events = api->pending_events; 10b0be: 8b 11 mov (%ecx),%edx event_condition = (rtems_event_set) the_thread->Wait.count; 10b0c0: 8b 43 24 mov 0x24(%ebx),%eax seized_events = _Event_sets_Get( pending_events, event_condition ); /* * No events were seized in this operation */ if ( _Event_sets_Is_empty( seized_events ) ) { 10b0c3: 89 c7 mov %eax,%edi 10b0c5: 21 d7 and %edx,%edi 10b0c7: 89 7d e0 mov %edi,-0x20(%ebp) 10b0ca: 74 74 je 10b140 <_Event_Surrender+0x9c> /* * If we are in an ISR and sending to the current thread, then * we have a critical section issue to deal with. */ if ( _ISR_Is_in_progress() && 10b0cc: 8b 3d 74 74 12 00 mov 0x127474,%edi 10b0d2: 85 ff test %edi,%edi 10b0d4: 74 0c je 10b0e2 <_Event_Surrender+0x3e> 10b0d6: 3b 1d 98 74 12 00 cmp 0x127498,%ebx 10b0dc: 0f 84 96 00 00 00 je 10b178 <_Event_Surrender+0xd4> } /* * Otherwise, this is a normal send to another thread */ if ( _States_Is_waiting_for_event( the_thread->current_state ) ) { 10b0e2: f6 43 11 01 testb $0x1,0x11(%ebx) 10b0e6: 74 4c je 10b134 <_Event_Surrender+0x90> <== ALWAYS TAKEN if ( seized_events == event_condition || _Options_Is_any( option_set ) ) { 10b0e8: 3b 45 e0 cmp -0x20(%ebp),%eax 10b0eb: 74 05 je 10b0f2 <_Event_Surrender+0x4e> 10b0ed: 83 e6 02 and $0x2,%esi 10b0f0: 74 42 je 10b134 <_Event_Surrender+0x90> <== ALWAYS TAKEN api->pending_events = _Event_sets_Clear( pending_events, seized_events ); 10b0f2: 8b 45 e0 mov -0x20(%ebp),%eax 10b0f5: f7 d0 not %eax 10b0f7: 21 d0 and %edx,%eax 10b0f9: 89 01 mov %eax,(%ecx) the_thread->Wait.count = 0; 10b0fb: c7 43 24 00 00 00 00 movl $0x0,0x24(%ebx) *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 10b102: 8b 43 28 mov 0x28(%ebx),%eax 10b105: 8b 7d e0 mov -0x20(%ebp),%edi 10b108: 89 38 mov %edi,(%eax) _ISR_Flash( level ); 10b10a: ff 75 e4 pushl -0x1c(%ebp) 10b10d: 9d popf 10b10e: fa cli if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 10b10f: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 10b113: 74 37 je 10b14c <_Event_Surrender+0xa8> _ISR_Enable( level ); 10b115: ff 75 e4 pushl -0x1c(%ebp) 10b118: 9d popf RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 10b119: 83 ec 08 sub $0x8,%esp 10b11c: 68 f8 ff 03 10 push $0x1003fff8 10b121: 53 push %ebx 10b122: e8 e5 1f 00 00 call 10d10c <_Thread_Clear_state> 10b127: 83 c4 10 add $0x10,%esp } return; } } _ISR_Enable( level ); } 10b12a: 8d 65 f4 lea -0xc(%ebp),%esp 10b12d: 5b pop %ebx 10b12e: 5e pop %esi 10b12f: 5f pop %edi 10b130: c9 leave 10b131: c3 ret 10b132: 66 90 xchg %ax,%ax <== NOT EXECUTED _Thread_Unblock( the_thread ); } return; } } _ISR_Enable( level ); 10b134: ff 75 e4 pushl -0x1c(%ebp) <== NOT EXECUTED 10b137: 9d popf <== NOT EXECUTED } 10b138: 8d 65 f4 lea -0xc(%ebp),%esp 10b13b: 5b pop %ebx 10b13c: 5e pop %esi 10b13d: 5f pop %edi 10b13e: c9 leave 10b13f: c3 ret /* * No events were seized in this operation */ if ( _Event_sets_Is_empty( seized_events ) ) { _ISR_Enable( level ); 10b140: ff 75 e4 pushl -0x1c(%ebp) 10b143: 9d popf } return; } } _ISR_Enable( level ); } 10b144: 8d 65 f4 lea -0xc(%ebp),%esp 10b147: 5b pop %ebx 10b148: 5e pop %esi 10b149: 5f pop %edi 10b14a: c9 leave 10b14b: c3 ret RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 10b14c: c7 43 50 03 00 00 00 movl $0x3,0x50(%ebx) if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { _ISR_Enable( level ); _Thread_Unblock( the_thread ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 10b153: ff 75 e4 pushl -0x1c(%ebp) 10b156: 9d popf (void) _Watchdog_Remove( &the_thread->Timer ); 10b157: 83 ec 0c sub $0xc,%esp 10b15a: 8d 43 48 lea 0x48(%ebx),%eax 10b15d: 50 push %eax 10b15e: e8 d5 33 00 00 call 10e538 <_Watchdog_Remove> 10b163: 58 pop %eax 10b164: 5a pop %edx 10b165: 68 f8 ff 03 10 push $0x1003fff8 10b16a: 53 push %ebx 10b16b: e8 9c 1f 00 00 call 10d10c <_Thread_Clear_state> 10b170: 83 c4 10 add $0x10,%esp 10b173: eb c3 jmp 10b138 <_Event_Surrender+0x94> <== ALWAYS TAKEN 10b175: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED * If we are in an ISR and sending to the current thread, then * we have a critical section issue to deal with. */ if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || 10b178: 8b 3d 68 7d 12 00 mov 0x127d68,%edi /* * 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() && 10b17e: 83 ff 02 cmp $0x2,%edi 10b181: 74 0d je 10b190 <_Event_Surrender+0xec> <== ALWAYS TAKEN _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || (_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) { 10b183: 8b 3d 68 7d 12 00 mov 0x127d68,%edi /* * 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() && 10b189: 4f dec %edi 10b18a: 0f 85 52 ff ff ff jne 10b0e2 <_Event_Surrender+0x3e> _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) ) { 10b190: 3b 45 e0 cmp -0x20(%ebp),%eax 10b193: 74 05 je 10b19a <_Event_Surrender+0xf6> 10b195: 83 e6 02 and $0x2,%esi 10b198: 74 22 je 10b1bc <_Event_Surrender+0x118> <== ALWAYS TAKEN api->pending_events = _Event_sets_Clear( pending_events,seized_events ); 10b19a: 8b 45 e0 mov -0x20(%ebp),%eax 10b19d: f7 d0 not %eax 10b19f: 21 d0 and %edx,%eax 10b1a1: 89 01 mov %eax,(%ecx) the_thread->Wait.count = 0; 10b1a3: c7 43 24 00 00 00 00 movl $0x0,0x24(%ebx) *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 10b1aa: 8b 43 28 mov 0x28(%ebx),%eax 10b1ad: 8b 55 e0 mov -0x20(%ebp),%edx 10b1b0: 89 10 mov %edx,(%eax) _Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; 10b1b2: c7 05 68 7d 12 00 03 movl $0x3,0x127d68 10b1b9: 00 00 00 } _ISR_Enable( level ); 10b1bc: ff 75 e4 pushl -0x1c(%ebp) 10b1bf: 9d popf return; 10b1c0: e9 73 ff ff ff jmp 10b138 <_Event_Surrender+0x94> <== ALWAYS TAKEN 0010b1c8 <_Event_Timeout>: void _Event_Timeout( Objects_Id id, void *ignored ) { 10b1c8: 55 push %ebp 10b1c9: 89 e5 mov %esp,%ebp 10b1cb: 83 ec 20 sub $0x20,%esp Thread_Control *the_thread; Objects_Locations location; ISR_Level level; the_thread = _Thread_Get( id, &location ); 10b1ce: 8d 45 f4 lea -0xc(%ebp),%eax 10b1d1: 50 push %eax 10b1d2: ff 75 08 pushl 0x8(%ebp) 10b1d5: e8 fe 22 00 00 call 10d4d8 <_Thread_Get> switch ( location ) { 10b1da: 83 c4 10 add $0x10,%esp 10b1dd: 8b 55 f4 mov -0xc(%ebp),%edx 10b1e0: 85 d2 test %edx,%edx 10b1e2: 75 37 jne 10b21b <_Event_Timeout+0x53> <== 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 ); 10b1e4: 9c pushf 10b1e5: fa cli 10b1e6: 5a pop %edx _ISR_Enable( level ); return; } #endif the_thread->Wait.count = 0; 10b1e7: c7 40 24 00 00 00 00 movl $0x0,0x24(%eax) if ( _Thread_Is_executing( the_thread ) ) { 10b1ee: 3b 05 98 74 12 00 cmp 0x127498,%eax 10b1f4: 74 2a je 10b220 <_Event_Timeout+0x58> if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) _Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; } the_thread->Wait.return_code = RTEMS_TIMEOUT; 10b1f6: c7 40 34 06 00 00 00 movl $0x6,0x34(%eax) _ISR_Enable( level ); 10b1fd: 52 push %edx 10b1fe: 9d popf 10b1ff: 83 ec 08 sub $0x8,%esp 10b202: 68 f8 ff 03 10 push $0x1003fff8 10b207: 50 push %eax 10b208: e8 ff 1e 00 00 call 10d10c <_Thread_Clear_state> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 10b20d: a1 d8 73 12 00 mov 0x1273d8,%eax 10b212: 48 dec %eax 10b213: a3 d8 73 12 00 mov %eax,0x1273d8 10b218: 83 c4 10 add $0x10,%esp case OBJECTS_REMOTE: /* impossible */ #endif case OBJECTS_ERROR: break; } } 10b21b: c9 leave 10b21c: c3 ret 10b21d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED } #endif the_thread->Wait.count = 0; if ( _Thread_Is_executing( the_thread ) ) { if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) 10b220: 8b 0d 68 7d 12 00 mov 0x127d68,%ecx 10b226: 49 dec %ecx 10b227: 75 cd jne 10b1f6 <_Event_Timeout+0x2e> _Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; 10b229: c7 05 68 7d 12 00 02 movl $0x2,0x127d68 10b230: 00 00 00 10b233: eb c1 jmp 10b1f6 <_Event_Timeout+0x2e> <== ALWAYS TAKEN 00110c4c <_Heap_Allocate_aligned_with_boundary>: Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { 110c4c: 55 push %ebp 110c4d: 89 e5 mov %esp,%ebp 110c4f: 57 push %edi 110c50: 56 push %esi 110c51: 53 push %ebx 110c52: 83 ec 2c sub $0x2c,%esp 110c55: 8b 7d 0c mov 0xc(%ebp),%edi return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 110c58: 8b 45 08 mov 0x8(%ebp),%eax 110c5b: 8b 48 08 mov 0x8(%eax),%ecx Heap_Statistics *const stats = &heap->stats; Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); Heap_Block *block = _Heap_Free_list_first( heap ); uintptr_t const block_size_floor = alloc_size + HEAP_BLOCK_HEADER_SIZE - HEAP_BLOCK_SIZE_OFFSET; uintptr_t const page_size = heap->page_size; 110c5e: 8b 50 10 mov 0x10(%eax),%edx 110c61: 89 55 d4 mov %edx,-0x2c(%ebp) uintptr_t alloc_begin = 0; uint32_t search_count = 0; if ( block_size_floor < alloc_size ) { 110c64: 89 f8 mov %edi,%eax 110c66: 83 c0 04 add $0x4,%eax 110c69: 89 45 e0 mov %eax,-0x20(%ebp) 110c6c: 0f 82 5a 01 00 00 jb 110dcc <_Heap_Allocate_aligned_with_boundary+0x180> /* Integer overflow occured */ return NULL; } if ( boundary != 0 ) { 110c72: 8b 75 14 mov 0x14(%ebp),%esi 110c75: 85 f6 test %esi,%esi 110c77: 0f 85 48 01 00 00 jne 110dc5 <_Heap_Allocate_aligned_with_boundary+0x179> if ( alignment == 0 ) { alignment = page_size; } } while ( block != free_list_tail ) { 110c7d: 39 4d 08 cmp %ecx,0x8(%ebp) 110c80: 0f 84 50 01 00 00 je 110dd6 <_Heap_Allocate_aligned_with_boundary+0x18a> 110c86: 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; 110c8d: 8b 55 d4 mov -0x2c(%ebp),%edx 110c90: 83 c2 07 add $0x7,%edx 110c93: 89 55 c8 mov %edx,-0x38(%ebp) uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET; uintptr_t alloc_begin = alloc_end - alloc_size; 110c96: c7 45 d8 04 00 00 00 movl $0x4,-0x28(%ebp) 110c9d: 29 7d d8 sub %edi,-0x28(%ebp) 110ca0: eb 19 jmp 110cbb <_Heap_Allocate_aligned_with_boundary+0x6f> <== ALWAYS TAKEN 110ca2: 66 90 xchg %ax,%ax <== NOT EXECUTED RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block( const Heap_Block *block ) { return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE; 110ca4: 8d 59 08 lea 0x8(%ecx),%ebx boundary ); } } if ( alloc_begin != 0 ) { 110ca7: 85 db test %ebx,%ebx 110ca9: 0f 85 e9 00 00 00 jne 110d98 <_Heap_Allocate_aligned_with_boundary+0x14c> <== NEVER TAKEN break; } block = block->next; 110caf: 8b 49 08 mov 0x8(%ecx),%ecx if ( alignment == 0 ) { alignment = page_size; } } while ( block != free_list_tail ) { 110cb2: 39 4d 08 cmp %ecx,0x8(%ebp) 110cb5: 0f 84 25 01 00 00 je 110de0 <_Heap_Allocate_aligned_with_boundary+0x194> _HAssert( _Heap_Is_prev_used( block ) ); /* Statistics */ ++search_count; 110cbb: 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 ) { 110cbe: 8b 59 04 mov 0x4(%ecx),%ebx 110cc1: 39 5d e0 cmp %ebx,-0x20(%ebp) 110cc4: 73 e9 jae 110caf <_Heap_Allocate_aligned_with_boundary+0x63> if ( alignment == 0 ) { 110cc6: 8b 55 10 mov 0x10(%ebp),%edx 110cc9: 85 d2 test %edx,%edx 110ccb: 74 d7 je 110ca4 <_Heap_Allocate_aligned_with_boundary+0x58> uintptr_t alignment, uintptr_t boundary ) { uintptr_t const page_size = heap->page_size; uintptr_t const min_block_size = heap->min_block_size; 110ccd: 8b 45 08 mov 0x8(%ebp),%eax 110cd0: 8b 40 14 mov 0x14(%eax),%eax 110cd3: 89 45 d0 mov %eax,-0x30(%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; 110cd6: 83 e3 fe and $0xfffffffe,%ebx 110cd9: 8d 1c 19 lea (%ecx,%ebx,1),%ebx 110cdc: 8d 51 08 lea 0x8(%ecx),%edx 110cdf: 89 55 cc mov %edx,-0x34(%ebp) uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_begin_ceiling = block_end - min_block_size + HEAP_BLOCK_HEADER_SIZE + page_size - 1; 110ce2: 8b 75 c8 mov -0x38(%ebp),%esi 110ce5: 29 c6 sub %eax,%esi 110ce7: 01 de add %ebx,%esi uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET; uintptr_t alloc_begin = alloc_end - alloc_size; 110ce9: 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); 110cec: 89 d8 mov %ebx,%eax 110cee: 31 d2 xor %edx,%edx 110cf0: f7 75 10 divl 0x10(%ebp) 110cf3: 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 ) { 110cf5: 39 de cmp %ebx,%esi 110cf7: 73 0b jae 110d04 <_Heap_Allocate_aligned_with_boundary+0xb8> 110cf9: 89 f0 mov %esi,%eax 110cfb: 31 d2 xor %edx,%edx 110cfd: f7 75 10 divl 0x10(%ebp) 110d00: 89 f3 mov %esi,%ebx 110d02: 29 d3 sub %edx,%ebx } alloc_end = alloc_begin + alloc_size; /* Ensure boundary constaint */ if ( boundary != 0 ) { 110d04: 8b 45 14 mov 0x14(%ebp),%eax 110d07: 85 c0 test %eax,%eax 110d09: 74 59 je 110d64 <_Heap_Allocate_aligned_with_boundary+0x118> /* 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; 110d0b: 8d 34 3b lea (%ebx,%edi,1),%esi 110d0e: 89 f0 mov %esi,%eax 110d10: 31 d2 xor %edx,%edx 110d12: f7 75 14 divl 0x14(%ebp) 110d15: 89 f0 mov %esi,%eax 110d17: 29 d0 sub %edx,%eax 110d19: 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 ) { 110d1b: 39 c3 cmp %eax,%ebx 110d1d: 73 45 jae 110d64 <_Heap_Allocate_aligned_with_boundary+0x118> 110d1f: 39 c6 cmp %eax,%esi 110d21: 76 41 jbe 110d64 <_Heap_Allocate_aligned_with_boundary+0x118> alloc_end = alloc_begin + alloc_size; /* Ensure boundary constaint */ if ( boundary != 0 ) { uintptr_t const boundary_floor = alloc_begin_floor + alloc_size; 110d23: 8b 45 cc mov -0x34(%ebp),%eax 110d26: 01 f8 add %edi,%eax 110d28: 89 45 dc mov %eax,-0x24(%ebp) uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary ); while ( alloc_begin < boundary_line && boundary_line < alloc_end ) { if ( boundary_line < boundary_floor ) { 110d2b: 39 d0 cmp %edx,%eax 110d2d: 77 80 ja 110caf <_Heap_Allocate_aligned_with_boundary+0x63> 110d2f: 89 ce mov %ecx,%esi 110d31: eb 0e jmp 110d41 <_Heap_Allocate_aligned_with_boundary+0xf5> <== ALWAYS TAKEN 110d33: 90 nop <== NOT EXECUTED /* Ensure boundary constaint */ if ( boundary != 0 ) { uintptr_t const boundary_floor = alloc_begin_floor + alloc_size; uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary ); while ( alloc_begin < boundary_line && boundary_line < alloc_end ) { 110d34: 39 c1 cmp %eax,%ecx 110d36: 76 2a jbe 110d62 <_Heap_Allocate_aligned_with_boundary+0x116> if ( boundary_line < boundary_floor ) { 110d38: 39 55 dc cmp %edx,-0x24(%ebp) 110d3b: 0f 87 a3 00 00 00 ja 110de4 <_Heap_Allocate_aligned_with_boundary+0x198> <== ALWAYS TAKEN return 0; } alloc_begin = boundary_line - alloc_size; 110d41: 89 d3 mov %edx,%ebx 110d43: 29 fb sub %edi,%ebx 110d45: 89 d8 mov %ebx,%eax 110d47: 31 d2 xor %edx,%edx 110d49: f7 75 10 divl 0x10(%ebp) 110d4c: 29 d3 sub %edx,%ebx alloc_begin = _Heap_Align_down( alloc_begin, alignment ); alloc_end = alloc_begin + alloc_size; 110d4e: 8d 0c 3b lea (%ebx,%edi,1),%ecx 110d51: 89 c8 mov %ecx,%eax 110d53: 31 d2 xor %edx,%edx 110d55: f7 75 14 divl 0x14(%ebp) 110d58: 89 c8 mov %ecx,%eax 110d5a: 29 d0 sub %edx,%eax 110d5c: 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 ) { 110d5e: 39 c3 cmp %eax,%ebx 110d60: 72 d2 jb 110d34 <_Heap_Allocate_aligned_with_boundary+0xe8> 110d62: 89 f1 mov %esi,%ecx boundary_line = _Heap_Align_down( alloc_end, boundary ); } } /* Ensure that the we have a valid new block at the beginning */ if ( alloc_begin >= alloc_begin_floor ) { 110d64: 39 5d cc cmp %ebx,-0x34(%ebp) 110d67: 0f 87 42 ff ff ff ja 110caf <_Heap_Allocate_aligned_with_boundary+0x63> 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; 110d6d: be f8 ff ff ff mov $0xfffffff8,%esi 110d72: 29 ce sub %ecx,%esi 110d74: 01 de add %ebx,%esi 110d76: 89 d8 mov %ebx,%eax 110d78: 31 d2 xor %edx,%edx 110d7a: f7 75 d4 divl -0x2c(%ebp) 110d7d: 29 d6 sub %edx,%esi if ( free_size >= min_block_size || free_size == 0 ) { 110d7f: 39 75 d0 cmp %esi,-0x30(%ebp) 110d82: 0f 86 1f ff ff ff jbe 110ca7 <_Heap_Allocate_aligned_with_boundary+0x5b> 110d88: 85 f6 test %esi,%esi 110d8a: 0f 85 1f ff ff ff jne 110caf <_Heap_Allocate_aligned_with_boundary+0x63> boundary ); } } if ( alloc_begin != 0 ) { 110d90: 85 db test %ebx,%ebx 110d92: 0f 84 17 ff ff ff je 110caf <_Heap_Allocate_aligned_with_boundary+0x63> <== ALWAYS TAKEN block = block->next; } if ( alloc_begin != 0 ) { /* Statistics */ stats->searches += search_count; 110d98: 8b 55 e4 mov -0x1c(%ebp),%edx 110d9b: 8b 45 08 mov 0x8(%ebp),%eax 110d9e: 01 50 4c add %edx,0x4c(%eax) block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size ); 110da1: 57 push %edi 110da2: 53 push %ebx 110da3: 51 push %ecx 110da4: 50 push %eax 110da5: e8 5e b8 ff ff call 10c608 <_Heap_Block_allocate> <== ALWAYS TAKEN 110daa: 89 d8 mov %ebx,%eax 110dac: 83 c4 10 add $0x10,%esp uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { Heap_Statistics *const stats = &heap->stats; 110daf: 8b 4d e4 mov -0x1c(%ebp),%ecx 110db2: 8b 55 08 mov 0x8(%ebp),%edx 110db5: 39 4a 44 cmp %ecx,0x44(%edx) 110db8: 73 14 jae 110dce <_Heap_Allocate_aligned_with_boundary+0x182> ); } /* Statistics */ if ( stats->max_search < search_count ) { stats->max_search = search_count; 110dba: 89 4a 44 mov %ecx,0x44(%edx) } return (void *) alloc_begin; } 110dbd: 8d 65 f4 lea -0xc(%ebp),%esp 110dc0: 5b pop %ebx 110dc1: 5e pop %esi 110dc2: 5f pop %edi 110dc3: c9 leave 110dc4: c3 ret /* Integer overflow occured */ return NULL; } if ( boundary != 0 ) { if ( boundary < alloc_size ) { 110dc5: 3b 7d 14 cmp 0x14(%ebp),%edi 110dc8: 76 21 jbe 110deb <_Heap_Allocate_aligned_with_boundary+0x19f> 110dca: 66 90 xchg %ax,%ax ); } /* Statistics */ if ( stats->max_search < search_count ) { stats->max_search = search_count; 110dcc: 31 c0 xor %eax,%eax } return (void *) alloc_begin; } 110dce: 8d 65 f4 lea -0xc(%ebp),%esp 110dd1: 5b pop %ebx 110dd2: 5e pop %esi 110dd3: 5f pop %edi 110dd4: c9 leave 110dd5: c3 ret if ( alignment == 0 ) { alignment = page_size; } } while ( block != free_list_tail ) { 110dd6: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) 110ddd: 8d 76 00 lea 0x0(%esi),%esi 110de0: 31 c0 xor %eax,%eax 110de2: eb cb jmp 110daf <_Heap_Allocate_aligned_with_boundary+0x163> <== ALWAYS TAKEN 110de4: 89 f1 mov %esi,%ecx <== NOT EXECUTED 110de6: e9 c4 fe ff ff jmp 110caf <_Heap_Allocate_aligned_with_boundary+0x63> <== NOT EXECUTED if ( boundary != 0 ) { if ( boundary < alloc_size ) { return NULL; } if ( alignment == 0 ) { 110deb: 8b 5d 10 mov 0x10(%ebp),%ebx 110dee: 85 db test %ebx,%ebx 110df0: 0f 85 87 fe ff ff jne 110c7d <_Heap_Allocate_aligned_with_boundary+0x31> 110df6: 89 55 10 mov %edx,0x10(%ebp) 110df9: e9 7f fe ff ff jmp 110c7d <_Heap_Allocate_aligned_with_boundary+0x31> <== ALWAYS TAKEN 0010c608 <_Heap_Block_allocate>: Heap_Control *heap, Heap_Block *block, uintptr_t alloc_begin, uintptr_t alloc_size ) { 10c608: 55 push %ebp 10c609: 89 e5 mov %esp,%ebp 10c60b: 57 push %edi 10c60c: 56 push %esi 10c60d: 53 push %ebx 10c60e: 83 ec 10 sub $0x10,%esp 10c611: 8b 75 08 mov 0x8(%ebp),%esi 10c614: 8b 5d 0c mov 0xc(%ebp),%ebx RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block( const Heap_Block *block ) { return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE; 10c617: 89 5d ec mov %ebx,-0x14(%ebp) 10c61a: 8b 7d 10 mov 0x10(%ebp),%edi 10c61d: 83 ef 08 sub $0x8,%edi 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; 10c620: 89 f8 mov %edi,%eax 10c622: 29 d8 sub %ebx,%eax Heap_Block *free_list_anchor = NULL; _HAssert( alloc_area_begin <= alloc_begin ); if ( _Heap_Is_free( block ) ) { 10c624: 8b 53 04 mov 0x4(%ebx),%edx 10c627: 83 e2 fe and $0xfffffffe,%edx 10c62a: f6 44 13 04 01 testb $0x1,0x4(%ebx,%edx,1) 10c62f: 0f 85 8b 00 00 00 jne 10c6c0 <_Heap_Block_allocate+0xb8> free_list_anchor = block->prev; 10c635: 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; 10c638: 8b 53 08 mov 0x8(%ebx),%edx Heap_Block *prev = block->prev; prev->next = next; 10c63b: 89 51 08 mov %edx,0x8(%ecx) next->prev = prev; 10c63e: 89 4a 0c mov %ecx,0xc(%edx) _Heap_Free_list_remove( block ); /* Statistics */ --stats->free_blocks; 10c641: ff 4e 38 decl 0x38(%esi) ++stats->used_blocks; 10c644: ff 46 40 incl 0x40(%esi) stats->free_size -= _Heap_Block_size( block ); 10c647: 8b 53 04 mov 0x4(%ebx),%edx 10c64a: 83 e2 fe and $0xfffffffe,%edx 10c64d: 29 56 30 sub %edx,0x30(%esi) } else { free_list_anchor = _Heap_Free_list_head( heap ); } if ( alloc_area_offset < heap->page_size ) { 10c650: 8b 56 10 mov 0x10(%esi),%edx 10c653: 89 55 e4 mov %edx,-0x1c(%ebp) 10c656: 39 d0 cmp %edx,%eax 10c658: 72 72 jb 10c6cc <_Heap_Block_allocate+0xc4> - 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; 10c65a: 8b 43 04 mov 0x4(%ebx),%eax 10c65d: 89 45 f0 mov %eax,-0x10(%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 ) 10c660: 8b 45 10 mov 0x10(%ebp),%eax 10c663: 31 d2 xor %edx,%edx 10c665: f7 75 e4 divl -0x1c(%ebp) 10c668: 29 d7 sub %edx,%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; 10c66a: 89 f8 mov %edi,%eax 10c66c: 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; 10c66e: 01 46 30 add %eax,0x30(%esi) if ( _Heap_Is_prev_used( block ) ) { 10c671: f6 43 04 01 testb $0x1,0x4(%ebx) 10c675: 75 69 jne 10c6e0 <_Heap_Block_allocate+0xd8> RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Prev_block( const Heap_Block *block ) { return (Heap_Block *) ((uintptr_t) block - block->prev_size); 10c677: 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; 10c679: 8b 53 04 mov 0x4(%ebx),%edx 10c67c: 83 e2 fe and $0xfffffffe,%edx 10c67f: 01 d0 add %edx,%eax } block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED; 10c681: 89 c2 mov %eax,%edx 10c683: 83 ca 01 or $0x1,%edx 10c686: 89 53 04 mov %edx,0x4(%ebx) new_block->prev_size = block_size; 10c689: 89 07 mov %eax,(%edi) new_block->size_and_flag = new_block_size; 10c68b: 8b 45 f0 mov -0x10(%ebp),%eax 10c68e: 83 e0 fe and $0xfffffffe,%eax 10c691: 03 45 ec add -0x14(%ebp),%eax 10c694: 29 f8 sub %edi,%eax 10c696: 89 47 04 mov %eax,0x4(%edi) _Heap_Block_split( heap, new_block, free_list_anchor, alloc_size ); 10c699: ff 75 14 pushl 0x14(%ebp) 10c69c: 51 push %ecx 10c69d: 57 push %edi 10c69e: 56 push %esi 10c69f: e8 80 fe ff ff call 10c524 <_Heap_Block_split> <== ALWAYS TAKEN 10c6a4: 89 fb mov %edi,%ebx 10c6a6: 83 c4 10 add $0x10,%esp alloc_size ); } /* Statistics */ if ( stats->min_free_size > stats->free_size ) { 10c6a9: 8b 46 30 mov 0x30(%esi),%eax Heap_Block *block, uintptr_t alloc_begin, uintptr_t alloc_size ) { Heap_Statistics *const stats = &heap->stats; 10c6ac: 39 46 34 cmp %eax,0x34(%esi) 10c6af: 76 03 jbe 10c6b4 <_Heap_Block_allocate+0xac> ); } /* Statistics */ if ( stats->min_free_size > stats->free_size ) { stats->min_free_size = stats->free_size; 10c6b1: 89 46 34 mov %eax,0x34(%esi) } return block; } 10c6b4: 89 d8 mov %ebx,%eax 10c6b6: 8d 65 f4 lea -0xc(%ebp),%esp 10c6b9: 5b pop %ebx 10c6ba: 5e pop %esi 10c6bb: 5f pop %edi 10c6bc: c9 leave 10c6bd: c3 ret 10c6be: 66 90 xchg %ax,%ax <== NOT EXECUTED /* Statistics */ --stats->free_blocks; ++stats->used_blocks; stats->free_size -= _Heap_Block_size( block ); } else { free_list_anchor = _Heap_Free_list_head( heap ); 10c6c0: 89 f1 mov %esi,%ecx } if ( alloc_area_offset < heap->page_size ) { 10c6c2: 8b 56 10 mov 0x10(%esi),%edx 10c6c5: 89 55 e4 mov %edx,-0x1c(%ebp) 10c6c8: 39 d0 cmp %edx,%eax 10c6ca: 73 8e jae 10c65a <_Heap_Block_allocate+0x52> Heap_Block *block, Heap_Block *free_list_anchor, uintptr_t alloc_size ) { _Heap_Block_split( heap, block, free_list_anchor, alloc_size ); 10c6cc: 03 45 14 add 0x14(%ebp),%eax 10c6cf: 50 push %eax 10c6d0: 51 push %ecx 10c6d1: 53 push %ebx 10c6d2: 56 push %esi 10c6d3: e8 4c fe ff ff call 10c524 <_Heap_Block_split> <== ALWAYS TAKEN 10c6d8: 83 c4 10 add $0x10,%esp 10c6db: eb cc jmp 10c6a9 <_Heap_Block_allocate+0xa1> <== ALWAYS TAKEN 10c6dd: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED RTEMS_INLINE_ROUTINE void _Heap_Free_list_insert_after( Heap_Block *block_before, Heap_Block *new_block ) { Heap_Block *next = block_before->next; 10c6e0: 8b 51 08 mov 0x8(%ecx),%edx new_block->next = next; 10c6e3: 89 53 08 mov %edx,0x8(%ebx) new_block->prev = block_before; 10c6e6: 89 4b 0c mov %ecx,0xc(%ebx) block_before->next = new_block; 10c6e9: 89 59 08 mov %ebx,0x8(%ecx) next->prev = new_block; 10c6ec: 89 5a 0c mov %ebx,0xc(%edx) _Heap_Free_list_insert_after( free_list_anchor, block ); free_list_anchor = block; /* Statistics */ ++stats->free_blocks; 10c6ef: ff 46 38 incl 0x38(%esi) 10c6f2: 89 d9 mov %ebx,%ecx 10c6f4: eb 8b jmp 10c681 <_Heap_Block_allocate+0x79> <== ALWAYS TAKEN 0010c524 <_Heap_Block_split>: Heap_Control *heap, Heap_Block *block, Heap_Block *free_list_anchor, uintptr_t alloc_size ) { 10c524: 55 push %ebp 10c525: 89 e5 mov %esp,%ebp 10c527: 57 push %edi 10c528: 56 push %esi 10c529: 53 push %ebx 10c52a: 83 ec 14 sub $0x14,%esp 10c52d: 8b 4d 08 mov 0x8(%ebp),%ecx 10c530: 8b 5d 0c mov 0xc(%ebp),%ebx Heap_Statistics *const stats = &heap->stats; uintptr_t const page_size = heap->page_size; 10c533: 8b 79 10 mov 0x10(%ecx),%edi uintptr_t const min_block_size = heap->min_block_size; 10c536: 8b 41 14 mov 0x14(%ecx),%eax 10c539: 89 45 e8 mov %eax,-0x18(%ebp) - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 10c53c: 8b 43 04 mov 0x4(%ebx),%eax 10c53f: 89 45 e4 mov %eax,-0x1c(%ebp) 10c542: 89 c6 mov %eax,%esi 10c544: 83 e6 fe and $0xfffffffe,%esi 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; 10c547: 8b 55 e8 mov -0x18(%ebp),%edx 10c54a: 83 ea 08 sub $0x8,%edx 10c54d: 8b 45 14 mov 0x14(%ebp),%eax 10c550: 39 d0 cmp %edx,%eax 10c552: 73 02 jae 10c556 <_Heap_Block_split+0x32> 10c554: 89 d0 mov %edx,%eax 10c556: 83 c0 08 add $0x8,%eax 10c559: 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; 10c55c: 31 d2 xor %edx,%edx 10c55e: f7 f7 div %edi if ( remainder != 0 ) { 10c560: 85 d2 test %edx,%edx 10c562: 75 70 jne 10c5d4 <_Heap_Block_split+0xb0> 10c564: 8b 7d f0 mov -0x10(%ebp),%edi 10c567: 89 7d ec mov %edi,-0x14(%ebp) RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 10c56a: 8d 04 33 lea (%ebx,%esi,1),%eax 10c56d: 89 45 e0 mov %eax,-0x20(%ebp) 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 ) { 10c570: 8d 56 04 lea 0x4(%esi),%edx 10c573: 2b 55 f0 sub -0x10(%ebp),%edx 10c576: 8b 7d e8 mov -0x18(%ebp),%edi 10c579: 83 c7 04 add $0x4,%edi 10c57c: 39 fa cmp %edi,%edx 10c57e: 72 60 jb 10c5e0 <_Heap_Block_split+0xbc> 10c580: 8b 55 ec mov -0x14(%ebp),%edx 10c583: 01 da add %ebx,%edx Heap_Block *const free_block = _Heap_Block_at( block, used_block_size ); uintptr_t free_block_size = block_size - used_block_size; 10c585: 2b 75 ec sub -0x14(%ebp),%esi uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; block->size_and_flag = size | flag; 10c588: 8b 7d e4 mov -0x1c(%ebp),%edi 10c58b: 83 e7 01 and $0x1,%edi 10c58e: 0b 7d ec or -0x14(%ebp),%edi 10c591: 89 7b 04 mov %edi,0x4(%ebx) _HAssert( used_block_size + free_block_size == block_size ); _Heap_Block_set_size( block, used_block_size ); /* Statistics */ stats->free_size += free_block_size; 10c594: 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; 10c597: 8b 58 04 mov 0x4(%eax),%ebx 10c59a: 83 e3 fe and $0xfffffffe,%ebx if ( _Heap_Is_used( next_block ) ) { 10c59d: f6 44 18 04 01 testb $0x1,0x4(%eax,%ebx,1) 10c5a2: 75 4c jne 10c5f0 <_Heap_Block_split+0xcc> RTEMS_INLINE_ROUTINE void _Heap_Free_list_replace( Heap_Block *old_block, Heap_Block *new_block ) { Heap_Block *next = old_block->next; 10c5a4: 8b 48 08 mov 0x8(%eax),%ecx Heap_Block *prev = old_block->prev; 10c5a7: 8b 40 0c mov 0xc(%eax),%eax new_block->next = next; 10c5aa: 89 4a 08 mov %ecx,0x8(%edx) new_block->prev = prev; 10c5ad: 89 42 0c mov %eax,0xc(%edx) next->prev = new_block; 10c5b0: 89 51 0c mov %edx,0xc(%ecx) prev->next = new_block; 10c5b3: 89 50 08 mov %edx,0x8(%eax) } else { uintptr_t const next_block_size = _Heap_Block_size( next_block ); _Heap_Free_list_replace( next_block, free_block ); free_block_size += next_block_size; 10c5b6: 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); 10c5b8: 8d 04 16 lea (%esi,%edx,1),%eax next_block = _Heap_Block_at( free_block, free_block_size ); } free_block->size_and_flag = free_block_size | HEAP_PREV_BLOCK_USED; 10c5bb: 89 f1 mov %esi,%ecx 10c5bd: 83 c9 01 or $0x1,%ecx 10c5c0: 89 4a 04 mov %ecx,0x4(%edx) next_block->prev_size = free_block_size; 10c5c3: 89 30 mov %esi,(%eax) next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 10c5c5: 83 60 04 fe andl $0xfffffffe,0x4(%eax) } else { next_block->size_and_flag |= HEAP_PREV_BLOCK_USED; } } 10c5c9: 83 c4 14 add $0x14,%esp 10c5cc: 5b pop %ebx 10c5cd: 5e pop %esi 10c5ce: 5f pop %edi 10c5cf: c9 leave 10c5d0: c3 ret 10c5d1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED ) { uintptr_t remainder = value % alignment; if ( remainder != 0 ) { return value - remainder + alignment; 10c5d4: 03 7d f0 add -0x10(%ebp),%edi 10c5d7: 29 d7 sub %edx,%edi 10c5d9: 89 7d ec mov %edi,-0x14(%ebp) 10c5dc: eb 8c jmp 10c56a <_Heap_Block_split+0x46> <== ALWAYS TAKEN 10c5de: 66 90 xchg %ax,%ax <== NOT EXECUTED free_block->size_and_flag = free_block_size | HEAP_PREV_BLOCK_USED; next_block->prev_size = free_block_size; next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; } else { next_block->size_and_flag |= HEAP_PREV_BLOCK_USED; 10c5e0: 8b 45 e0 mov -0x20(%ebp),%eax 10c5e3: 83 48 04 01 orl $0x1,0x4(%eax) } } 10c5e7: 83 c4 14 add $0x14,%esp 10c5ea: 5b pop %ebx 10c5eb: 5e pop %esi 10c5ec: 5f pop %edi 10c5ed: c9 leave 10c5ee: c3 ret 10c5ef: 90 nop <== NOT EXECUTED RTEMS_INLINE_ROUTINE void _Heap_Free_list_insert_after( Heap_Block *block_before, Heap_Block *new_block ) { Heap_Block *next = block_before->next; 10c5f0: 8b 7d 10 mov 0x10(%ebp),%edi 10c5f3: 8b 5f 08 mov 0x8(%edi),%ebx new_block->next = next; 10c5f6: 89 5a 08 mov %ebx,0x8(%edx) new_block->prev = block_before; 10c5f9: 89 7a 0c mov %edi,0xc(%edx) block_before->next = new_block; 10c5fc: 89 57 08 mov %edx,0x8(%edi) next->prev = new_block; 10c5ff: 89 53 0c mov %edx,0xc(%ebx) if ( _Heap_Is_used( next_block ) ) { _Heap_Free_list_insert_after( free_list_anchor, free_block ); /* Statistics */ ++stats->free_blocks; 10c602: ff 41 38 incl 0x38(%ecx) 10c605: eb b4 jmp 10c5bb <_Heap_Block_split+0x97> <== ALWAYS TAKEN 0011454c <_Heap_Extend>: Heap_Control *heap, void *area_begin_ptr, uintptr_t area_size, uintptr_t *amount_extended ) { 11454c: 55 push %ebp 11454d: 89 e5 mov %esp,%ebp 11454f: 56 push %esi 114550: 53 push %ebx 114551: 8b 4d 08 mov 0x8(%ebp),%ecx 114554: 8b 45 0c mov 0xc(%ebp),%eax 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; 114557: 8b 51 1c mov 0x1c(%ecx),%edx 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; 11455a: 8b 59 24 mov 0x24(%ecx),%ebx 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; 11455d: 3b 41 18 cmp 0x18(%ecx),%eax 114560: 73 3a jae 11459c <_Heap_Extend+0x50> * 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 ) { 114562: 39 d0 cmp %edx,%eax 114564: 74 0e je 114574 <_Heap_Extend+0x28> 114566: b8 02 00 00 00 mov $0x2,%eax _Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block )); } return HEAP_EXTEND_SUCCESSFUL; } 11456b: 8d 65 f8 lea -0x8(%ebp),%esp 11456e: 5b pop %ebx 11456f: 5e pop %esi 114570: c9 leave 114571: c3 ret 114572: 66 90 xchg %ax,%ax <== NOT EXECUTED { 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; 114574: 03 45 10 add 0x10(%ebp),%eax * 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; 114577: 89 41 1c mov %eax,0x1c(%ecx) extend_size = new_heap_area_end 11457a: 29 d8 sub %ebx,%eax 11457c: 8d 70 f8 lea -0x8(%eax),%esi RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 11457f: 89 f0 mov %esi,%eax 114581: 31 d2 xor %edx,%edx 114583: f7 71 10 divl 0x10(%ecx) 114586: 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; 114588: 8b 45 14 mov 0x14(%ebp),%eax 11458b: 89 30 mov %esi,(%eax) if( extend_size >= heap->min_block_size ) { 11458d: 39 71 14 cmp %esi,0x14(%ecx) 114590: 76 1a jbe 1145ac <_Heap_Extend+0x60> <== NEVER TAKEN 114592: 31 c0 xor %eax,%eax <== NOT EXECUTED _Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block )); } return HEAP_EXTEND_SUCCESSFUL; } 114594: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED 114597: 5b pop %ebx <== NOT EXECUTED 114598: 5e pop %esi <== NOT EXECUTED 114599: c9 leave <== NOT EXECUTED 11459a: c3 ret <== NOT EXECUTED 11459b: 90 nop <== NOT EXECUTED * 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 ) { 11459c: 39 d0 cmp %edx,%eax 11459e: 73 c2 jae 114562 <_Heap_Extend+0x16> 1145a0: b8 01 00 00 00 mov $0x1,%eax _Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block )); } return HEAP_EXTEND_SUCCESSFUL; } 1145a5: 8d 65 f8 lea -0x8(%ebp),%esp 1145a8: 5b pop %ebx 1145a9: 5e pop %esi 1145aa: c9 leave 1145ab: c3 ret RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 1145ac: 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; 1145af: 8b 43 04 mov 0x4(%ebx),%eax 1145b2: 83 e0 01 and $0x1,%eax 1145b5: 09 f0 or %esi,%eax 1145b7: 89 43 04 mov %eax,0x4(%ebx) if( extend_size >= heap->min_block_size ) { 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 = 1145ba: 8b 41 20 mov 0x20(%ecx),%eax 1145bd: 29 d0 sub %edx,%eax 1145bf: 83 c8 01 or $0x1,%eax 1145c2: 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; 1145c5: 89 51 24 mov %edx,0x24(%ecx) /* Statistics */ stats->size += extend_size; 1145c8: 01 71 2c add %esi,0x2c(%ecx) ++stats->used_blocks; 1145cb: ff 41 40 incl 0x40(%ecx) --stats->frees; /* Do not count subsequent call as actual free() */ 1145ce: ff 49 50 decl 0x50(%ecx) _Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block )); 1145d1: 83 ec 08 sub $0x8,%esp 1145d4: 83 c3 08 add $0x8,%ebx 1145d7: 53 push %ebx 1145d8: 51 push %ecx 1145d9: e8 f6 ad ff ff call 10f3d4 <_Heap_Free> <== ALWAYS TAKEN 1145de: 31 c0 xor %eax,%eax 1145e0: 83 c4 10 add $0x10,%esp } return HEAP_EXTEND_SUCCESSFUL; } 1145e3: 8d 65 f8 lea -0x8(%ebp),%esp 1145e6: 5b pop %ebx 1145e7: 5e pop %esi 1145e8: c9 leave 1145e9: c3 ret 00110e00 <_Heap_Free>: #include #include #include bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) { 110e00: 55 push %ebp 110e01: 89 e5 mov %esp,%ebp 110e03: 57 push %edi 110e04: 56 push %esi 110e05: 53 push %ebx 110e06: 83 ec 18 sub $0x18,%esp 110e09: 8b 5d 08 mov 0x8(%ebp),%ebx 110e0c: 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 ) 110e0f: 8d 48 f8 lea -0x8(%eax),%ecx 110e12: 31 d2 xor %edx,%edx 110e14: f7 73 10 divl 0x10(%ebx) 110e17: 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; 110e19: 8b 43 20 mov 0x20(%ebx),%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 110e1c: 39 c1 cmp %eax,%ecx 110e1e: 72 07 jb 110e27 <_Heap_Free+0x27> && (uintptr_t) block <= (uintptr_t) heap->last_block; 110e20: 8b 73 24 mov 0x24(%ebx),%esi 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 110e23: 39 f1 cmp %esi,%ecx 110e25: 76 0d jbe 110e34 <_Heap_Free+0x34> /* Statistics */ --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); 110e27: 31 c0 xor %eax,%eax } 110e29: 83 c4 18 add $0x18,%esp 110e2c: 5b pop %ebx 110e2d: 5e pop %esi 110e2e: 5f pop %edi 110e2f: c9 leave 110e30: c3 ret 110e31: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 110e34: 8b 51 04 mov 0x4(%ecx),%edx 110e37: 89 55 f0 mov %edx,-0x10(%ebp) 110e3a: 83 e2 fe and $0xfffffffe,%edx 110e3d: 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); 110e40: 01 ca add %ecx,%edx 110e42: 89 55 dc mov %edx,-0x24(%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 110e45: 39 d0 cmp %edx,%eax 110e47: 77 de ja 110e27 <_Heap_Free+0x27> <== ALWAYS TAKEN 110e49: 39 d6 cmp %edx,%esi 110e4b: 72 da jb 110e27 <_Heap_Free+0x27> <== 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; 110e4d: 8b 7a 04 mov 0x4(%edx),%edi if ( !_Heap_Is_block_in_heap( heap, next_block ) ) { _HAssert( false ); return false; } if ( !_Heap_Is_prev_used( next_block ) ) { 110e50: f7 c7 01 00 00 00 test $0x1,%edi 110e56: 74 cf je 110e27 <_Heap_Free+0x27> <== 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; 110e58: 83 e7 fe and $0xfffffffe,%edi 110e5b: 89 7d e8 mov %edi,-0x18(%ebp) _HAssert( false ); return false; } next_block_size = _Heap_Block_size( next_block ); next_is_free = next_block != heap->last_block 110e5e: 39 d6 cmp %edx,%esi 110e60: 0f 84 e2 00 00 00 je 110f48 <_Heap_Free+0x148> #include #include #include bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) 110e66: 8b 55 dc mov -0x24(%ebp),%edx 110e69: 8b 7d e8 mov -0x18(%ebp),%edi 110e6c: 8b 7c 3a 04 mov 0x4(%edx,%edi,1),%edi 110e70: 89 7d e0 mov %edi,-0x20(%ebp) 110e73: 8a 55 e0 mov -0x20(%ebp),%dl 110e76: 83 e2 01 and $0x1,%edx 110e79: 88 55 e7 mov %dl,-0x19(%ebp) 110e7c: 80 75 e7 01 xorb $0x1,-0x19(%ebp) next_block_size = _Heap_Block_size( next_block ); next_is_free = next_block != heap->last_block && !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size )); if ( !_Heap_Is_prev_used( block ) ) { 110e80: f6 45 f0 01 testb $0x1,-0x10(%ebp) 110e84: 75 46 jne 110ecc <_Heap_Free+0xcc> uintptr_t const prev_size = block->prev_size; 110e86: 8b 39 mov (%ecx),%edi 110e88: 89 7d f0 mov %edi,-0x10(%ebp) RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 110e8b: 29 f9 sub %edi,%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 110e8d: 39 c8 cmp %ecx,%eax 110e8f: 77 96 ja 110e27 <_Heap_Free+0x27> <== ALWAYS TAKEN 110e91: 39 ce cmp %ecx,%esi 110e93: 72 92 jb 110e27 <_Heap_Free+0x27> <== 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) ) { 110e95: f6 41 04 01 testb $0x1,0x4(%ecx) 110e99: 74 8c je 110e27 <_Heap_Free+0x27> <== ALWAYS TAKEN _HAssert( false ); return( false ); } if ( next_is_free ) { /* coalesce both */ 110e9b: 80 7d e7 00 cmpb $0x0,-0x19(%ebp) 110e9f: 0f 84 af 00 00 00 je 110f54 <_Heap_Free+0x154> uintptr_t const size = block_size + prev_size + next_block_size; 110ea5: 8b 45 ec mov -0x14(%ebp),%eax 110ea8: 03 45 e8 add -0x18(%ebp),%eax 110eab: 01 f8 add %edi,%eax return _Heap_Free_list_tail(heap)->prev; } RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block ) { Heap_Block *next = block->next; 110ead: 8b 55 dc mov -0x24(%ebp),%edx 110eb0: 8b 72 08 mov 0x8(%edx),%esi Heap_Block *prev = block->prev; 110eb3: 8b 52 0c mov 0xc(%edx),%edx prev->next = next; 110eb6: 89 72 08 mov %esi,0x8(%edx) next->prev = prev; 110eb9: 89 56 0c mov %edx,0xc(%esi) _Heap_Free_list_remove( next_block ); stats->free_blocks -= 1; 110ebc: ff 4b 38 decl 0x38(%ebx) prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 110ebf: 89 c2 mov %eax,%edx 110ec1: 83 ca 01 or $0x1,%edx 110ec4: 89 51 04 mov %edx,0x4(%ecx) next_block = _Heap_Block_at( prev_block, size ); _HAssert(!_Heap_Is_prev_used( next_block)); next_block->prev_size = size; 110ec7: 89 04 01 mov %eax,(%ecx,%eax,1) 110eca: eb 2c jmp 110ef8 <_Heap_Free+0xf8> <== ALWAYS TAKEN uintptr_t const size = block_size + prev_size; prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; next_block->prev_size = size; } } else if ( next_is_free ) { /* coalesce next */ 110ecc: 80 7d e7 00 cmpb $0x0,-0x19(%ebp) 110ed0: 74 3e je 110f10 <_Heap_Free+0x110> uintptr_t const size = block_size + next_block_size; 110ed2: 8b 7d e8 mov -0x18(%ebp),%edi 110ed5: 03 7d ec add -0x14(%ebp),%edi RTEMS_INLINE_ROUTINE void _Heap_Free_list_replace( Heap_Block *old_block, Heap_Block *new_block ) { Heap_Block *next = old_block->next; 110ed8: 8b 75 dc mov -0x24(%ebp),%esi 110edb: 8b 46 08 mov 0x8(%esi),%eax Heap_Block *prev = old_block->prev; 110ede: 8b 56 0c mov 0xc(%esi),%edx new_block->next = next; 110ee1: 89 41 08 mov %eax,0x8(%ecx) new_block->prev = prev; 110ee4: 89 51 0c mov %edx,0xc(%ecx) next->prev = new_block; 110ee7: 89 48 0c mov %ecx,0xc(%eax) prev->next = new_block; 110eea: 89 4a 08 mov %ecx,0x8(%edx) _Heap_Free_list_replace( next_block, block ); block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 110eed: 89 f8 mov %edi,%eax 110eef: 83 c8 01 or $0x1,%eax 110ef2: 89 41 04 mov %eax,0x4(%ecx) next_block = _Heap_Block_at( block, size ); next_block->prev_size = size; 110ef5: 89 3c 39 mov %edi,(%ecx,%edi,1) stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks; 110ef8: ff 4b 40 decl 0x40(%ebx) ++stats->frees; 110efb: ff 43 50 incl 0x50(%ebx) stats->free_size += block_size; 110efe: 8b 55 ec mov -0x14(%ebp),%edx 110f01: 01 53 30 add %edx,0x30(%ebx) 110f04: b0 01 mov $0x1,%al return( true ); } 110f06: 83 c4 18 add $0x18,%esp 110f09: 5b pop %ebx 110f0a: 5e pop %esi 110f0b: 5f pop %edi 110f0c: c9 leave 110f0d: c3 ret 110f0e: 66 90 xchg %ax,%ax <== NOT EXECUTED RTEMS_INLINE_ROUTINE void _Heap_Free_list_insert_after( Heap_Block *block_before, Heap_Block *new_block ) { Heap_Block *next = block_before->next; 110f10: 8b 43 08 mov 0x8(%ebx),%eax new_block->next = next; 110f13: 89 41 08 mov %eax,0x8(%ecx) new_block->prev = block_before; 110f16: 89 59 0c mov %ebx,0xc(%ecx) block_before->next = new_block; 110f19: 89 4b 08 mov %ecx,0x8(%ebx) next->prev = new_block; 110f1c: 89 48 0c mov %ecx,0xc(%eax) next_block->prev_size = size; } else { /* no coalesce */ /* Add 'block' to the head of the free blocks list as it tends to produce less fragmentation than adding to the tail. */ _Heap_Free_list_insert_after( _Heap_Free_list_head( heap), block ); block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED; 110f1f: 8b 45 ec mov -0x14(%ebp),%eax 110f22: 83 c8 01 or $0x1,%eax 110f25: 89 41 04 mov %eax,0x4(%ecx) next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 110f28: 8b 7d dc mov -0x24(%ebp),%edi 110f2b: 83 67 04 fe andl $0xfffffffe,0x4(%edi) next_block->prev_size = block_size; 110f2f: 8b 45 ec mov -0x14(%ebp),%eax 110f32: 89 07 mov %eax,(%edi) /* Statistics */ ++stats->free_blocks; 110f34: 8b 43 38 mov 0x38(%ebx),%eax 110f37: 40 inc %eax 110f38: 89 43 38 mov %eax,0x38(%ebx) #include #include bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) { Heap_Statistics *const stats = &heap->stats; 110f3b: 3b 43 3c cmp 0x3c(%ebx),%eax 110f3e: 76 b8 jbe 110ef8 <_Heap_Free+0xf8> 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; 110f40: 89 43 3c mov %eax,0x3c(%ebx) 110f43: eb b3 jmp 110ef8 <_Heap_Free+0xf8> <== ALWAYS TAKEN 110f45: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED _HAssert( false ); return false; } next_block_size = _Heap_Block_size( next_block ); next_is_free = next_block != heap->last_block 110f48: c6 45 e7 00 movb $0x0,-0x19(%ebp) 110f4c: e9 2f ff ff ff jmp 110e80 <_Heap_Free+0x80> <== ALWAYS TAKEN 110f51: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; next_block = _Heap_Block_at( prev_block, size ); _HAssert(!_Heap_Is_prev_used( next_block)); next_block->prev_size = size; } else { /* coalesce prev */ uintptr_t const size = block_size + prev_size; 110f54: 8b 45 ec mov -0x14(%ebp),%eax 110f57: 03 45 f0 add -0x10(%ebp),%eax prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 110f5a: 89 c6 mov %eax,%esi 110f5c: 83 ce 01 or $0x1,%esi 110f5f: 89 71 04 mov %esi,0x4(%ecx) next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 110f62: 8b 55 dc mov -0x24(%ebp),%edx 110f65: 83 62 04 fe andl $0xfffffffe,0x4(%edx) next_block->prev_size = size; 110f69: 89 02 mov %eax,(%edx) 110f6b: eb 8b jmp 110ef8 <_Heap_Free+0xf8> <== ALWAYS TAKEN 0012ed18 <_Heap_Get_free_information>: void _Heap_Get_free_information( Heap_Control *the_heap, Heap_Information *info ) { 12ed18: 55 push %ebp 12ed19: 89 e5 mov %esp,%ebp 12ed1b: 57 push %edi 12ed1c: 56 push %esi 12ed1d: 53 push %ebx 12ed1e: 8b 7d 08 mov 0x8(%ebp),%edi Heap_Block *the_block; Heap_Block *const tail = _Heap_Free_list_tail(the_heap); info->number = 0; 12ed21: 8b 45 0c mov 0xc(%ebp),%eax 12ed24: c7 00 00 00 00 00 movl $0x0,(%eax) info->largest = 0; 12ed2a: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax) info->total = 0; 12ed31: 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; 12ed38: 8b 57 08 mov 0x8(%edi),%edx for(the_block = _Heap_Free_list_first(the_heap); 12ed3b: 39 d7 cmp %edx,%edi 12ed3d: 74 2c je 12ed6b <_Heap_Get_free_information+0x53> <== ALWAYS TAKEN 12ed3f: 31 f6 xor %esi,%esi 12ed41: b9 01 00 00 00 mov $0x1,%ecx 12ed46: 31 db xor %ebx,%ebx - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 12ed48: 8b 42 04 mov 0x4(%edx),%eax 12ed4b: 83 e0 fe and $0xfffffffe,%eax /* As we always coalesce free blocks, prev block must have been used. */ _HAssert(_Heap_Is_prev_used(the_block)); info->number++; info->total += the_size; 12ed4e: 01 c3 add %eax,%ebx 12ed50: 39 c6 cmp %eax,%esi 12ed52: 73 02 jae 12ed56 <_Heap_Get_free_information+0x3e> 12ed54: 89 c6 mov %eax,%esi info->largest = 0; info->total = 0; for(the_block = _Heap_Free_list_first(the_heap); the_block != tail; the_block = the_block->next) 12ed56: 8b 52 08 mov 0x8(%edx),%edx 12ed59: 89 c8 mov %ecx,%eax 12ed5b: 41 inc %ecx info->number = 0; info->largest = 0; info->total = 0; for(the_block = _Heap_Free_list_first(the_heap); 12ed5c: 39 d7 cmp %edx,%edi 12ed5e: 75 e8 jne 12ed48 <_Heap_Get_free_information+0x30> 12ed60: 8b 55 0c mov 0xc(%ebp),%edx 12ed63: 89 02 mov %eax,(%edx) 12ed65: 89 5a 08 mov %ebx,0x8(%edx) 12ed68: 89 72 04 mov %esi,0x4(%edx) info->number++; info->total += the_size; if ( info->largest < the_size ) info->largest = the_size; } } 12ed6b: 5b pop %ebx 12ed6c: 5e pop %esi 12ed6d: 5f pop %edi 12ed6e: c9 leave 12ed6f: c3 ret 0013db48 <_Heap_Get_information>: void _Heap_Get_information( Heap_Control *the_heap, Heap_Information_block *the_info ) { 13db48: 55 push %ebp 13db49: 89 e5 mov %esp,%ebp 13db4b: 57 push %edi 13db4c: 56 push %esi 13db4d: 53 push %ebx 13db4e: 83 ec 04 sub $0x4,%esp 13db51: 8b 45 08 mov 0x8(%ebp),%eax 13db54: 8b 75 0c mov 0xc(%ebp),%esi Heap_Block *the_block = the_heap->first_block; 13db57: 8b 58 20 mov 0x20(%eax),%ebx Heap_Block *const end = the_heap->last_block; 13db5a: 8b 78 24 mov 0x24(%eax),%edi _HAssert(the_block->prev_size == the_heap->page_size); _HAssert(_Heap_Is_prev_used(the_block)); the_info->Free.number = 0; 13db5d: c7 06 00 00 00 00 movl $0x0,(%esi) the_info->Free.total = 0; 13db63: c7 46 08 00 00 00 00 movl $0x0,0x8(%esi) the_info->Free.largest = 0; 13db6a: c7 46 04 00 00 00 00 movl $0x0,0x4(%esi) the_info->Used.number = 0; 13db71: c7 46 0c 00 00 00 00 movl $0x0,0xc(%esi) the_info->Used.total = 0; 13db78: c7 46 14 00 00 00 00 movl $0x0,0x14(%esi) the_info->Used.largest = 0; 13db7f: c7 46 10 00 00 00 00 movl $0x0,0x10(%esi) while ( the_block != end ) { 13db86: 39 fb cmp %edi,%ebx 13db88: 74 45 je 13dbcf <_Heap_Get_information+0x87> <== ALWAYS TAKEN 13db8a: 8b 4b 04 mov 0x4(%ebx),%ecx 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; 13db8d: 8d 46 0c lea 0xc(%esi),%eax 13db90: 89 45 f0 mov %eax,-0x10(%ebp) 13db93: eb 16 jmp 13dbab <_Heap_Get_information+0x63> <== ALWAYS TAKEN 13db95: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED while ( the_block != end ) { uintptr_t const the_size = _Heap_Block_size(the_block); Heap_Block *const next_block = _Heap_Block_at(the_block, the_size); Heap_Information *info; if ( _Heap_Is_prev_used(next_block) ) 13db98: 89 f0 mov %esi,%eax info = &the_info->Used; else info = &the_info->Free; info->number++; 13db9a: ff 00 incl (%eax) info->total += the_size; 13db9c: 01 50 08 add %edx,0x8(%eax) if ( info->largest < the_size ) 13db9f: 39 50 04 cmp %edx,0x4(%eax) 13dba2: 73 03 jae 13dba7 <_Heap_Get_information+0x5f> info->largest = the_size; 13dba4: 89 50 04 mov %edx,0x4(%eax) the_info->Free.largest = 0; the_info->Used.number = 0; the_info->Used.total = 0; the_info->Used.largest = 0; while ( the_block != end ) { 13dba7: 39 df cmp %ebx,%edi 13dba9: 74 15 je 13dbc0 <_Heap_Get_information+0x78> - 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; 13dbab: 89 ca mov %ecx,%edx 13dbad: 83 e2 fe and $0xfffffffe,%edx RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 13dbb0: 01 d3 add %edx,%ebx 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; 13dbb2: 8b 4b 04 mov 0x4(%ebx),%ecx 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) ) 13dbb5: f6 c1 01 test $0x1,%cl 13dbb8: 74 de je 13db98 <_Heap_Get_information+0x50> 13dbba: 8b 45 f0 mov -0x10(%ebp),%eax 13dbbd: eb db jmp 13db9a <_Heap_Get_information+0x52> <== ALWAYS TAKEN 13dbbf: 90 nop <== NOT EXECUTED the_info->Free.largest = 0; the_info->Used.number = 0; the_info->Used.total = 0; the_info->Used.largest = 0; while ( the_block != end ) { 13dbc0: 8b 46 14 mov 0x14(%esi),%eax 13dbc3: 83 c0 08 add $0x8,%eax /* * 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; 13dbc6: 89 46 14 mov %eax,0x14(%esi) } 13dbc9: 58 pop %eax 13dbca: 5b pop %ebx 13dbcb: 5e pop %esi 13dbcc: 5f pop %edi 13dbcd: c9 leave 13dbce: c3 ret the_info->Free.largest = 0; the_info->Used.number = 0; the_info->Used.total = 0; the_info->Used.largest = 0; while ( the_block != end ) { 13dbcf: b8 08 00 00 00 mov $0x8,%eax <== NOT EXECUTED 13dbd4: eb f0 jmp 13dbc6 <_Heap_Get_information+0x7e> <== NOT EXECUTED 0010c3d4 <_Heap_Initialize>: Heap_Control *heap, void *heap_area_begin_ptr, uintptr_t heap_area_size, uintptr_t page_size ) { 10c3d4: 55 push %ebp 10c3d5: 89 e5 mov %esp,%ebp 10c3d7: 57 push %edi 10c3d8: 56 push %esi 10c3d9: 53 push %ebx 10c3da: 83 ec 10 sub $0x10,%esp 10c3dd: 8b 5d 08 mov 0x8(%ebp),%ebx 10c3e0: 8b 4d 14 mov 0x14(%ebp),%ecx uintptr_t min_block_size = 0; uintptr_t overhead = 0; Heap_Block *first_block = NULL; Heap_Block *last_block = NULL; if ( page_size == 0 ) { 10c3e3: 85 c9 test %ecx,%ecx 10c3e5: 0f 85 f5 00 00 00 jne 10c4e0 <_Heap_Initialize+0x10c> 10c3eb: b1 04 mov $0x4,%cl 10c3ed: c7 45 f0 10 00 00 00 movl $0x10,-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; 10c3f4: 8b 75 0c mov 0xc(%ebp),%esi 10c3f7: 83 c6 08 add $0x8,%esi RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_up( uintptr_t value, uintptr_t alignment ) { uintptr_t remainder = value % alignment; 10c3fa: 89 f0 mov %esi,%eax 10c3fc: 31 d2 xor %edx,%edx 10c3fe: f7 f1 div %ecx if ( remainder != 0 ) { 10c400: 85 d2 test %edx,%edx 10c402: 74 05 je 10c409 <_Heap_Initialize+0x35> return value - remainder + alignment; 10c404: 8d 34 31 lea (%ecx,%esi,1),%esi 10c407: 29 d6 sub %edx,%esi 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; if ( 10c409: 8b 55 0c mov 0xc(%ebp),%edx 10c40c: 03 55 10 add 0x10(%ebp),%edx 10c40f: 89 55 ec mov %edx,-0x14(%ebp) 10c412: 0f 82 d9 00 00 00 jb 10c4f1 <_Heap_Initialize+0x11d> } 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); 10c418: 8d 7e f8 lea -0x8(%esi),%edi 10c41b: 2b 75 0c sub 0xc(%ebp),%esi 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 ( 10c41e: 39 75 10 cmp %esi,0x10(%ebp) 10c421: 0f 86 ca 00 00 00 jbe 10c4f1 <_Heap_Initialize+0x11d> 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; 10c427: 8b 45 10 mov 0x10(%ebp),%eax 10c42a: 29 f0 sub %esi,%eax 10c42c: 89 c6 mov %eax,%esi RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 10c42e: 31 d2 xor %edx,%edx 10c430: f7 f1 div %ecx 10c432: 29 d6 sub %edx,%esi 10c434: 89 75 e4 mov %esi,-0x1c(%ebp) first_block_size = _Heap_Align_down ( first_block_size, page_size ); alloc_area_size = first_block_size - HEAP_BLOCK_HEADER_SIZE; if ( 10c437: 39 75 f0 cmp %esi,-0x10(%ebp) 10c43a: 0f 87 b1 00 00 00 ja 10c4f1 <_Heap_Initialize+0x11d> 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; 10c440: 89 f0 mov %esi,%eax 10c442: 83 e8 08 sub $0x8,%eax return 0; } /* First block */ first_block = (Heap_Block *) first_block_begin; first_block->prev_size = page_size; 10c445: 89 0f mov %ecx,(%edi) first_block->size_and_flag = first_block_size | HEAP_PREV_BLOCK_USED; 10c447: 89 f2 mov %esi,%edx 10c449: 83 ca 01 or $0x1,%edx 10c44c: 89 57 04 mov %edx,0x4(%edi) first_block->next = _Heap_Free_list_tail( heap ); 10c44f: 89 5f 08 mov %ebx,0x8(%edi) first_block->prev = _Heap_Free_list_head( heap ); 10c452: 89 5f 0c mov %ebx,0xc(%edi) RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 10c455: 01 fe add %edi,%esi 10c457: 89 73 24 mov %esi,0x24(%ebx) * 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; 10c45a: 8b 55 e4 mov -0x1c(%ebp),%edx 10c45d: 89 16 mov %edx,(%esi) last_block->size_and_flag = first_block_begin - (uintptr_t) last_block; 10c45f: 89 fa mov %edi,%edx 10c461: 29 f2 sub %esi,%edx 10c463: 89 56 04 mov %edx,0x4(%esi) /* Heap control */ heap->page_size = page_size; 10c466: 89 4b 10 mov %ecx,0x10(%ebx) heap->min_block_size = min_block_size; 10c469: 8b 75 f0 mov -0x10(%ebp),%esi 10c46c: 89 73 14 mov %esi,0x14(%ebx) heap->area_begin = heap_area_begin; 10c46f: 8b 55 0c mov 0xc(%ebp),%edx 10c472: 89 53 18 mov %edx,0x18(%ebx) heap->area_end = heap_area_end; 10c475: 8b 75 ec mov -0x14(%ebp),%esi 10c478: 89 73 1c mov %esi,0x1c(%ebx) heap->first_block = first_block; 10c47b: 89 7b 20 mov %edi,0x20(%ebx) heap->last_block = last_block; _Heap_Free_list_head( heap )->next = first_block; 10c47e: 89 7b 08 mov %edi,0x8(%ebx) _Heap_Free_list_tail( heap )->prev = first_block; 10c481: 89 7b 0c mov %edi,0xc(%ebx) /* Statistics */ stats->size = first_block_size; 10c484: 8b 55 e4 mov -0x1c(%ebp),%edx 10c487: 89 53 2c mov %edx,0x2c(%ebx) stats->free_size = first_block_size; 10c48a: 89 53 30 mov %edx,0x30(%ebx) stats->min_free_size = first_block_size; 10c48d: 89 53 34 mov %edx,0x34(%ebx) stats->free_blocks = 1; 10c490: c7 43 38 01 00 00 00 movl $0x1,0x38(%ebx) stats->max_free_blocks = 1; 10c497: c7 43 3c 01 00 00 00 movl $0x1,0x3c(%ebx) stats->used_blocks = 0; 10c49e: c7 43 40 00 00 00 00 movl $0x0,0x40(%ebx) stats->max_search = 0; 10c4a5: c7 43 44 00 00 00 00 movl $0x0,0x44(%ebx) stats->allocs = 0; 10c4ac: c7 43 48 00 00 00 00 movl $0x0,0x48(%ebx) stats->searches = 0; 10c4b3: c7 43 4c 00 00 00 00 movl $0x0,0x4c(%ebx) stats->frees = 0; 10c4ba: c7 43 50 00 00 00 00 movl $0x0,0x50(%ebx) stats->resizes = 0; 10c4c1: c7 43 54 00 00 00 00 movl $0x0,0x54(%ebx) stats->instance = instance++; 10c4c8: 8b 15 00 70 12 00 mov 0x127000,%edx 10c4ce: 89 53 28 mov %edx,0x28(%ebx) 10c4d1: 42 inc %edx 10c4d2: 89 15 00 70 12 00 mov %edx,0x127000 _HAssert( _Heap_Is_aligned( _Heap_Alloc_area_of_block( last_block ), page_size ) ); return alloc_area_size; } 10c4d8: 83 c4 10 add $0x10,%esp 10c4db: 5b pop %ebx 10c4dc: 5e pop %esi 10c4dd: 5f pop %edi 10c4de: c9 leave 10c4df: c3 ret uintptr_t alignment ) { uintptr_t remainder = value % alignment; if ( remainder != 0 ) { 10c4e0: 89 c8 mov %ecx,%eax 10c4e2: 83 e0 03 and $0x3,%eax 10c4e5: 74 05 je 10c4ec <_Heap_Initialize+0x118> return value - remainder + alignment; 10c4e7: 83 c1 04 add $0x4,%ecx 10c4ea: 29 c1 sub %eax,%ecx if ( page_size == 0 ) { page_size = CPU_ALIGNMENT; } else { page_size = _Heap_Align_up( page_size, CPU_ALIGNMENT ); if ( page_size < CPU_ALIGNMENT ) { 10c4ec: 83 f9 03 cmp $0x3,%ecx 10c4ef: 77 0b ja 10c4fc <_Heap_Initialize+0x128> ); _HAssert( _Heap_Is_aligned( _Heap_Alloc_area_of_block( last_block ), page_size ) ); return alloc_area_size; 10c4f1: 31 c0 xor %eax,%eax } 10c4f3: 83 c4 10 add $0x10,%esp 10c4f6: 5b pop %ebx 10c4f7: 5e pop %esi 10c4f8: 5f pop %edi 10c4f9: c9 leave 10c4fa: c3 ret 10c4fb: 90 nop <== NOT EXECUTED RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_up( uintptr_t value, uintptr_t alignment ) { uintptr_t remainder = value % alignment; 10c4fc: b8 10 00 00 00 mov $0x10,%eax 10c501: 31 d2 xor %edx,%edx 10c503: f7 f1 div %ecx if ( remainder != 0 ) { 10c505: 85 d2 test %edx,%edx 10c507: 74 0d je 10c516 <_Heap_Initialize+0x142> return value - remainder + alignment; 10c509: 8d 41 10 lea 0x10(%ecx),%eax 10c50c: 29 d0 sub %edx,%eax 10c50e: 89 45 f0 mov %eax,-0x10(%ebp) 10c511: e9 de fe ff ff jmp 10c3f4 <_Heap_Initialize+0x20> <== ALWAYS TAKEN uintptr_t alignment ) { uintptr_t remainder = value % alignment; if ( remainder != 0 ) { 10c516: c7 45 f0 10 00 00 00 movl $0x10,-0x10(%ebp) 10c51d: e9 d2 fe ff ff jmp 10c3f4 <_Heap_Initialize+0x20> <== ALWAYS TAKEN 0011efc0 <_Heap_Resize_block>: void *alloc_begin_ptr, uintptr_t new_alloc_size, uintptr_t *old_size, uintptr_t *new_size ) { 11efc0: 55 push %ebp 11efc1: 89 e5 mov %esp,%ebp 11efc3: 57 push %edi 11efc4: 56 push %esi 11efc5: 53 push %ebx 11efc6: 83 ec 2c sub $0x2c,%esp 11efc9: 8b 5d 08 mov 0x8(%ebp),%ebx 11efcc: 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 ) 11efcf: 8d 4e f8 lea -0x8(%esi),%ecx 11efd2: 89 f0 mov %esi,%eax 11efd4: 31 d2 xor %edx,%edx 11efd6: f7 73 10 divl 0x10(%ebx) 11efd9: 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; 11efdb: 8b 45 14 mov 0x14(%ebp),%eax 11efde: c7 00 00 00 00 00 movl $0x0,(%eax) *new_size = 0; 11efe4: 8b 55 18 mov 0x18(%ebp),%edx 11efe7: 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 11efed: 39 4b 20 cmp %ecx,0x20(%ebx) 11eff0: 76 0e jbe 11f000 <_Heap_Resize_block+0x40> 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; /* Statistics */ ++stats->resizes; 11eff2: b8 02 00 00 00 mov $0x2,%eax new_size ); } else { return HEAP_RESIZE_FATAL_ERROR; } } 11eff7: 8d 65 f4 lea -0xc(%ebp),%esp 11effa: 5b pop %ebx 11effb: 5e pop %esi 11effc: 5f pop %edi 11effd: c9 leave 11effe: c3 ret 11efff: 90 nop <== NOT EXECUTED 11f000: 39 4b 24 cmp %ecx,0x24(%ebx) 11f003: 72 ed jb 11eff2 <_Heap_Resize_block+0x32> - 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; 11f005: 8b 41 04 mov 0x4(%ecx),%eax 11f008: 83 e0 fe and $0xfffffffe,%eax { Heap_Statistics *const stats = &heap->stats; uintptr_t const block_begin = (uintptr_t) block; uintptr_t block_size = _Heap_Block_size( block ); uintptr_t block_end = block_begin + block_size; 11f00b: 8d 3c 01 lea (%ecx,%eax,1),%edi 11f00e: 89 7d d4 mov %edi,-0x2c(%ebp) uintptr_t alloc_size = block_end - alloc_begin + HEAP_BLOCK_SIZE_OFFSET; 11f011: 89 fa mov %edi,%edx 11f013: 29 f2 sub %esi,%edx 11f015: 83 c2 04 add $0x4,%edx 11f018: 89 55 dc mov %edx,-0x24(%ebp) 11f01b: 8b 57 04 mov 0x4(%edi),%edx 11f01e: 83 e2 fe and $0xfffffffe,%edx 11f021: 89 55 d0 mov %edx,-0x30(%ebp) RTEMS_INLINE_ROUTINE bool _Heap_Is_free( const Heap_Block *block ) { return !_Heap_Is_used( block ); 11f024: 8b 54 17 04 mov 0x4(%edi,%edx,1),%edx 11f028: 83 e2 01 and $0x1,%edx 11f02b: 89 55 e0 mov %edx,-0x20(%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; 11f02e: 8b 55 dc mov -0x24(%ebp),%edx 11f031: 8b 7d 14 mov 0x14(%ebp),%edi 11f034: 89 17 mov %edx,(%edi) if ( next_block_is_free ) { 11f036: 8a 55 e0 mov -0x20(%ebp),%dl 11f039: 80 f2 01 xor $0x1,%dl 11f03c: 88 55 e0 mov %dl,-0x20(%ebp) 11f03f: 75 17 jne 11f058 <_Heap_Resize_block+0x98> block_size += next_block_size; alloc_size += next_block_size; } if ( new_alloc_size > alloc_size ) { 11f041: 8b 55 dc mov -0x24(%ebp),%edx 11f044: 39 55 10 cmp %edx,0x10(%ebp) 11f047: 76 20 jbe 11f069 <_Heap_Resize_block+0xa9> 11f049: b8 01 00 00 00 mov $0x1,%eax new_size ); } else { return HEAP_RESIZE_FATAL_ERROR; } } 11f04e: 8d 65 f4 lea -0xc(%ebp),%esp 11f051: 5b pop %ebx 11f052: 5e pop %esi 11f053: 5f pop %edi 11f054: c9 leave 11f055: c3 ret 11f056: 66 90 xchg %ax,%ax <== NOT EXECUTED _HAssert( _Heap_Is_prev_used( next_block ) ); *old_size = alloc_size; if ( next_block_is_free ) { block_size += next_block_size; 11f058: 03 45 d0 add -0x30(%ebp),%eax alloc_size += next_block_size; 11f05b: 8b 7d d0 mov -0x30(%ebp),%edi 11f05e: 01 7d dc add %edi,-0x24(%ebp) } if ( new_alloc_size > alloc_size ) { 11f061: 8b 55 dc mov -0x24(%ebp),%edx 11f064: 39 55 10 cmp %edx,0x10(%ebp) 11f067: 77 e0 ja 11f049 <_Heap_Resize_block+0x89> return HEAP_RESIZE_UNSATISFIED; } if ( next_block_is_free ) { 11f069: 80 7d e0 00 cmpb $0x0,-0x20(%ebp) 11f06d: 74 31 je 11f0a0 <_Heap_Resize_block+0xe0> uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; block->size_and_flag = size | flag; 11f06f: 8b 79 04 mov 0x4(%ecx),%edi 11f072: 83 e7 01 and $0x1,%edi 11f075: 09 c7 or %eax,%edi 11f077: 89 79 04 mov %edi,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; 11f07a: 8b 7d d4 mov -0x2c(%ebp),%edi 11f07d: 8b 7f 08 mov 0x8(%edi),%edi 11f080: 89 7d e4 mov %edi,-0x1c(%ebp) Heap_Block *prev = block->prev; 11f083: 8b 55 d4 mov -0x2c(%ebp),%edx 11f086: 8b 7a 0c mov 0xc(%edx),%edi prev->next = next; 11f089: 8b 55 e4 mov -0x1c(%ebp),%edx 11f08c: 89 57 08 mov %edx,0x8(%edi) next->prev = prev; 11f08f: 89 7a 0c mov %edi,0xc(%edx) _Heap_Block_set_size( block, block_size ); _Heap_Free_list_remove( next_block ); next_block = _Heap_Block_at( block, block_size ); next_block->size_and_flag |= HEAP_PREV_BLOCK_USED; 11f092: 83 4c 08 04 01 orl $0x1,0x4(%eax,%ecx,1) /* Statistics */ --stats->free_blocks; 11f097: ff 4b 38 decl 0x38(%ebx) stats->free_size -= next_block_size; 11f09a: 8b 7d d0 mov -0x30(%ebp),%edi 11f09d: 29 7b 30 sub %edi,0x30(%ebx) } block = _Heap_Block_allocate( heap, block, alloc_begin, new_alloc_size ); 11f0a0: ff 75 10 pushl 0x10(%ebp) 11f0a3: 56 push %esi 11f0a4: 51 push %ecx 11f0a5: 53 push %ebx 11f0a6: e8 5d d5 fe ff call 10c608 <_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; 11f0ab: 8b 50 04 mov 0x4(%eax),%edx 11f0ae: 83 e2 fe and $0xfffffffe,%edx 11f0b1: 29 f0 sub %esi,%eax 11f0b3: 8d 44 10 04 lea 0x4(%eax,%edx,1),%eax 11f0b7: 8b 55 18 mov 0x18(%ebp),%edx 11f0ba: 89 02 mov %eax,(%edx) /* Statistics */ ++stats->resizes; 11f0bc: ff 43 54 incl 0x54(%ebx) 11f0bf: 31 c0 xor %eax,%eax 11f0c1: 83 c4 10 add $0x10,%esp new_size ); } else { return HEAP_RESIZE_FATAL_ERROR; } } 11f0c4: 8d 65 f4 lea -0xc(%ebp),%esp 11f0c7: 5b pop %ebx 11f0c8: 5e pop %esi 11f0c9: 5f pop %edi 11f0ca: c9 leave 11f0cb: c3 ret 0011f0cc <_Heap_Size_of_alloc_area>: bool _Heap_Size_of_alloc_area( Heap_Control *heap, void *alloc_begin_ptr, uintptr_t *alloc_size ) { 11f0cc: 55 push %ebp 11f0cd: 89 e5 mov %esp,%ebp 11f0cf: 56 push %esi 11f0d0: 53 push %ebx 11f0d1: 8b 5d 08 mov 0x8(%ebp),%ebx 11f0d4: 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 ) 11f0d7: 8d 4e f8 lea -0x8(%esi),%ecx 11f0da: 89 f0 mov %esi,%eax 11f0dc: 31 d2 xor %edx,%edx 11f0de: f7 73 10 divl 0x10(%ebx) 11f0e1: 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; 11f0e3: 8b 43 20 mov 0x20(%ebx),%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 11f0e6: 39 c1 cmp %eax,%ecx 11f0e8: 72 07 jb 11f0f1 <_Heap_Size_of_alloc_area+0x25> && (uintptr_t) block <= (uintptr_t) heap->last_block; 11f0ea: 8b 53 24 mov 0x24(%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 11f0ed: 39 d1 cmp %edx,%ecx 11f0ef: 76 07 jbe 11f0f8 <_Heap_Size_of_alloc_area+0x2c> <== NEVER TAKEN return false; } *alloc_size = (uintptr_t) next_block + HEAP_BLOCK_SIZE_OFFSET - alloc_begin; return true; 11f0f1: 31 c0 xor %eax,%eax } 11f0f3: 5b pop %ebx 11f0f4: 5e pop %esi 11f0f5: c9 leave 11f0f6: c3 ret 11f0f7: 90 nop <== NOT EXECUTED RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 11f0f8: 8b 59 04 mov 0x4(%ecx),%ebx 11f0fb: 83 e3 fe and $0xfffffffe,%ebx 11f0fe: 01 d9 add %ebx,%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 11f100: 39 c8 cmp %ecx,%eax 11f102: 77 ed ja 11f0f1 <_Heap_Size_of_alloc_area+0x25> <== ALWAYS TAKEN 11f104: 39 ca cmp %ecx,%edx 11f106: 72 e9 jb 11f0f1 <_Heap_Size_of_alloc_area+0x25> <== ALWAYS TAKEN } block_size = _Heap_Block_size( block ); next_block = _Heap_Block_at( block, block_size ); if ( 11f108: f6 41 04 01 testb $0x1,0x4(%ecx) 11f10c: 74 e3 je 11f0f1 <_Heap_Size_of_alloc_area+0x25> <== ALWAYS TAKEN || !_Heap_Is_prev_used( next_block ) ) { return false; } *alloc_size = (uintptr_t) next_block + HEAP_BLOCK_SIZE_OFFSET - alloc_begin; 11f10e: 29 f1 sub %esi,%ecx 11f110: 8d 51 04 lea 0x4(%ecx),%edx 11f113: 8b 45 10 mov 0x10(%ebp),%eax 11f116: 89 10 mov %edx,(%eax) 11f118: b0 01 mov $0x1,%al return true; } 11f11a: 5b pop %ebx 11f11b: 5e pop %esi 11f11c: c9 leave 11f11d: c3 ret 0010d170 <_Heap_Walk>: bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { 10d170: 55 push %ebp 10d171: 89 e5 mov %esp,%ebp 10d173: 57 push %edi 10d174: 56 push %esi 10d175: 53 push %ebx 10d176: 83 ec 3c sub $0x3c,%esp 10d179: 8b 5d 08 mov 0x8(%ebp),%ebx uintptr_t const page_size = heap->page_size; 10d17c: 8b 43 10 mov 0x10(%ebx),%eax 10d17f: 89 45 e0 mov %eax,-0x20(%ebp) uintptr_t const min_block_size = heap->min_block_size; 10d182: 8b 53 14 mov 0x14(%ebx),%edx 10d185: 89 55 dc mov %edx,-0x24(%ebp) Heap_Block *const last_block = heap->last_block; 10d188: 8b 43 24 mov 0x24(%ebx),%eax 10d18b: 89 45 d8 mov %eax,-0x28(%ebp) Heap_Block *block = heap->first_block; 10d18e: 8b 73 20 mov 0x20(%ebx),%esi Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; 10d191: 80 7d 10 00 cmpb $0x0,0x10(%ebp) 10d195: 75 1d jne 10d1b4 <_Heap_Walk+0x44> 10d197: c7 45 e4 68 d1 10 00 movl $0x10d168,-0x1c(%ebp) if ( !_System_state_Is_up( _System_state_Get() ) ) { 10d19e: 83 3d 00 9d 12 00 03 cmpl $0x3,0x129d00 10d1a5: 74 1d je 10d1c4 <_Heap_Walk+0x54> if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; } while ( block != last_block ) { 10d1a7: b0 01 mov $0x1,%al block = next_block; } return true; } 10d1a9: 8d 65 f4 lea -0xc(%ebp),%esp 10d1ac: 5b pop %ebx 10d1ad: 5e pop %esi 10d1ae: 5f pop %edi 10d1af: c9 leave 10d1b0: c3 ret 10d1b1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED uintptr_t const page_size = heap->page_size; uintptr_t const min_block_size = heap->min_block_size; Heap_Block *const last_block = heap->last_block; Heap_Block *block = heap->first_block; Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; 10d1b4: c7 45 e4 38 d5 10 00 movl $0x10d538,-0x1c(%ebp) if ( !_System_state_Is_up( _System_state_Get() ) ) { 10d1bb: 83 3d 00 9d 12 00 03 cmpl $0x3,0x129d00 10d1c2: 75 e3 jne 10d1a7 <_Heap_Walk+0x37> <== ALWAYS TAKEN 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)( 10d1c4: 52 push %edx 10d1c5: ff 73 0c pushl 0xc(%ebx) 10d1c8: ff 73 08 pushl 0x8(%ebx) 10d1cb: ff 75 d8 pushl -0x28(%ebp) 10d1ce: 56 push %esi 10d1cf: ff 73 1c pushl 0x1c(%ebx) 10d1d2: ff 73 18 pushl 0x18(%ebx) 10d1d5: ff 75 dc pushl -0x24(%ebp) 10d1d8: ff 75 e0 pushl -0x20(%ebp) 10d1db: 68 30 1e 12 00 push $0x121e30 10d1e0: 6a 00 push $0x0 10d1e2: ff 75 0c pushl 0xc(%ebp) 10d1e5: 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 ) { 10d1e8: 83 c4 30 add $0x30,%esp 10d1eb: 8b 45 e0 mov -0x20(%ebp),%eax 10d1ee: 85 c0 test %eax,%eax 10d1f0: 0f 84 b2 00 00 00 je 10d2a8 <_Heap_Walk+0x138> (*printer)( source, true, "page size is zero\n" ); return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { 10d1f6: f6 45 e0 03 testb $0x3,-0x20(%ebp) 10d1fa: 0f 85 b0 00 00 00 jne 10d2b0 <_Heap_Walk+0x140> ); return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { 10d200: 8b 45 dc mov -0x24(%ebp),%eax 10d203: 31 d2 xor %edx,%edx 10d205: f7 75 e0 divl -0x20(%ebp) 10d208: 85 d2 test %edx,%edx 10d20a: 0f 85 ac 00 00 00 jne 10d2bc <_Heap_Walk+0x14c> ); return false; } if ( 10d210: 8d 46 08 lea 0x8(%esi),%eax 10d213: 31 d2 xor %edx,%edx 10d215: f7 75 e0 divl -0x20(%ebp) 10d218: 85 d2 test %edx,%edx 10d21a: 0f 85 a8 00 00 00 jne 10d2c8 <_Heap_Walk+0x158> 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; 10d220: 8b 56 04 mov 0x4(%esi),%edx 10d223: 89 55 cc mov %edx,-0x34(%ebp) ); return false; } if ( !_Heap_Is_prev_used( first_block ) ) { 10d226: 83 e2 01 and $0x1,%edx 10d229: 0f 84 a1 00 00 00 je 10d2d0 <_Heap_Walk+0x160> ); return false; } if ( first_block->prev_size != page_size ) { 10d22f: 8b 06 mov (%esi),%eax 10d231: 39 45 e0 cmp %eax,-0x20(%ebp) 10d234: 75 4e jne 10d284 <_Heap_Walk+0x114> ); return false; } if ( _Heap_Is_free( last_block ) ) { 10d236: 8b 55 d8 mov -0x28(%ebp),%edx 10d239: 8b 42 04 mov 0x4(%edx),%eax 10d23c: 83 e0 fe and $0xfffffffe,%eax 10d23f: f6 44 02 04 01 testb $0x1,0x4(%edx,%eax,1) 10d244: 0f 84 bd 02 00 00 je 10d507 <_Heap_Walk+0x397> int source, Heap_Walk_printer printer, Heap_Control *heap ) { uintptr_t const page_size = heap->page_size; 10d24a: 8b 43 10 mov 0x10(%ebx),%eax 10d24d: 89 45 d4 mov %eax,-0x2c(%ebp) return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 10d250: 8b 4b 08 mov 0x8(%ebx),%ecx const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); const Heap_Block *const first_free_block = _Heap_Free_list_first( heap ); const Heap_Block *prev_block = free_list_tail; const Heap_Block *free_block = first_free_block; while ( free_block != free_list_tail ) { 10d253: 39 cb cmp %ecx,%ebx 10d255: 0f 84 08 01 00 00 je 10d363 <_Heap_Walk+0x1f3> 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; 10d25b: 8b 7b 20 mov 0x20(%ebx),%edi 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 10d25e: 39 cf cmp %ecx,%edi 10d260: 76 76 jbe 10d2d8 <_Heap_Walk+0x168> <== NEVER TAKEN 10d262: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( !_Heap_Is_block_in_heap( heap, free_block ) ) { (*printer)( 10d264: 51 push %ecx 10d265: 68 78 1f 12 00 push $0x121f78 10d26a: 66 90 xchg %ax,%ax return false; } if ( !prev_used ) { (*printer)( 10d26c: 6a 01 push $0x1 10d26e: ff 75 0c pushl 0xc(%ebp) 10d271: ff 55 e4 call *-0x1c(%ebp) 10d274: 31 c0 xor %eax,%eax 10d276: 83 c4 10 add $0x10,%esp block = next_block; } return true; } 10d279: 8d 65 f4 lea -0xc(%ebp),%esp 10d27c: 5b pop %ebx 10d27d: 5e pop %esi 10d27e: 5f pop %edi 10d27f: c9 leave 10d280: c3 ret 10d281: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED return false; } if ( first_block->prev_size != page_size ) { (*printer)( 10d284: 83 ec 0c sub $0xc,%esp 10d287: ff 75 e0 pushl -0x20(%ebp) 10d28a: 50 push %eax 10d28b: 68 4c 1f 12 00 push $0x121f4c return false; } if ( free_block->prev != prev_block ) { (*printer)( 10d290: 6a 01 push $0x1 10d292: ff 75 0c pushl 0xc(%ebp) 10d295: ff 55 e4 call *-0x1c(%ebp) 10d298: 31 c0 xor %eax,%eax 10d29a: 83 c4 20 add $0x20,%esp block = next_block; } return true; } 10d29d: 8d 65 f4 lea -0xc(%ebp),%esp 10d2a0: 5b pop %ebx 10d2a1: 5e pop %esi 10d2a2: 5f pop %edi 10d2a3: c9 leave 10d2a4: c3 ret 10d2a5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED first_block, last_block, first_free_block, last_free_block ); if ( page_size == 0 ) { (*printer)( source, true, "page size is zero\n" ); 10d2a8: 57 push %edi 10d2a9: 68 a7 21 12 00 push $0x1221a7 10d2ae: eb bc jmp 10d26c <_Heap_Walk+0xfc> <== ALWAYS TAKEN return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { (*printer)( 10d2b0: ff 75 e0 pushl -0x20(%ebp) 10d2b3: 68 ba 21 12 00 push $0x1221ba 10d2b8: eb b2 jmp 10d26c <_Heap_Walk+0xfc> <== ALWAYS TAKEN 10d2ba: 66 90 xchg %ax,%ax <== NOT EXECUTED return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { (*printer)( 10d2bc: ff 75 dc pushl -0x24(%ebp) 10d2bf: 68 c4 1e 12 00 push $0x121ec4 10d2c4: eb a6 jmp 10d26c <_Heap_Walk+0xfc> <== ALWAYS TAKEN 10d2c6: 66 90 xchg %ax,%ax <== NOT EXECUTED } if ( !_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size ) ) { (*printer)( 10d2c8: 56 push %esi 10d2c9: 68 e8 1e 12 00 push $0x121ee8 10d2ce: eb 9c jmp 10d26c <_Heap_Walk+0xfc> <== ALWAYS TAKEN return false; } if ( !_Heap_Is_prev_used( first_block ) ) { (*printer)( 10d2d0: 56 push %esi 10d2d1: 68 1c 1f 12 00 push $0x121f1c 10d2d6: eb 94 jmp 10d26c <_Heap_Walk+0xfc> <== ALWAYS TAKEN && (uintptr_t) block <= (uintptr_t) heap->last_block; 10d2d8: 8b 53 24 mov 0x24(%ebx),%edx 10d2db: 89 55 d0 mov %edx,-0x30(%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 10d2de: 39 ca cmp %ecx,%edx 10d2e0: 72 82 jb 10d264 <_Heap_Walk+0xf4> <== ALWAYS TAKEN ); return false; } if ( 10d2e2: 8d 41 08 lea 0x8(%ecx),%eax 10d2e5: 31 d2 xor %edx,%edx 10d2e7: f7 75 d4 divl -0x2c(%ebp) 10d2ea: 85 d2 test %edx,%edx 10d2ec: 0f 85 20 02 00 00 jne 10d512 <_Heap_Walk+0x3a2> <== ALWAYS TAKEN ); return false; } if ( _Heap_Is_used( free_block ) ) { 10d2f2: 8b 41 04 mov 0x4(%ecx),%eax 10d2f5: 83 e0 fe and $0xfffffffe,%eax 10d2f8: f6 44 01 04 01 testb $0x1,0x4(%ecx,%eax,1) 10d2fd: 0f 85 29 02 00 00 jne 10d52c <_Heap_Walk+0x3bc> <== ALWAYS TAKEN ); return false; } if ( free_block->prev != prev_block ) { 10d303: 8b 41 0c mov 0xc(%ecx),%eax 10d306: 39 c3 cmp %eax,%ebx 10d308: 0f 85 0f 02 00 00 jne 10d51d <_Heap_Walk+0x3ad> <== ALWAYS TAKEN 10d30e: 89 75 c8 mov %esi,-0x38(%ebp) 10d311: 89 de mov %ebx,%esi 10d313: eb 40 jmp 10d355 <_Heap_Walk+0x1e5> <== ALWAYS TAKEN 10d315: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 10d318: 39 f9 cmp %edi,%ecx 10d31a: 0f 82 44 ff ff ff jb 10d264 <_Heap_Walk+0xf4> 10d320: 39 4d d0 cmp %ecx,-0x30(%ebp) 10d323: 0f 82 3b ff ff ff jb 10d264 <_Heap_Walk+0xf4> <== ALWAYS TAKEN ); return false; } if ( 10d329: 8d 41 08 lea 0x8(%ecx),%eax 10d32c: 31 d2 xor %edx,%edx 10d32e: f7 75 d4 divl -0x2c(%ebp) 10d331: 85 d2 test %edx,%edx 10d333: 0f 85 d9 01 00 00 jne 10d512 <_Heap_Walk+0x3a2> ); return false; } if ( _Heap_Is_used( free_block ) ) { 10d339: 8b 41 04 mov 0x4(%ecx),%eax 10d33c: 83 e0 fe and $0xfffffffe,%eax 10d33f: f6 44 01 04 01 testb $0x1,0x4(%ecx,%eax,1) 10d344: 0f 85 e2 01 00 00 jne 10d52c <_Heap_Walk+0x3bc> ); return false; } if ( free_block->prev != prev_block ) { 10d34a: 8b 41 0c mov 0xc(%ecx),%eax 10d34d: 39 d8 cmp %ebx,%eax 10d34f: 0f 85 c8 01 00 00 jne 10d51d <_Heap_Walk+0x3ad> (*printer)( 10d355: 89 cb mov %ecx,%ebx return false; } prev_block = free_block; free_block = free_block->next; 10d357: 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 ) { 10d35a: 39 ce cmp %ecx,%esi 10d35c: 75 ba jne 10d318 <_Heap_Walk+0x1a8> 10d35e: 89 f3 mov %esi,%ebx 10d360: 8b 75 c8 mov -0x38(%ebp),%esi if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; } while ( block != last_block ) { 10d363: 39 75 d8 cmp %esi,-0x28(%ebp) 10d366: 0f 84 3b fe ff ff je 10d1a7 <_Heap_Walk+0x37> <== ALWAYS TAKEN 10d36c: 8b 45 cc mov -0x34(%ebp),%eax 10d36f: 90 nop - 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; 10d370: 89 c1 mov %eax,%ecx 10d372: 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); 10d375: 8d 3c 31 lea (%ecx,%esi,1),%edi 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 ) { 10d378: a8 01 test $0x1,%al 10d37a: 74 30 je 10d3ac <_Heap_Walk+0x23c> (*printer)( 10d37c: 83 ec 0c sub $0xc,%esp 10d37f: 51 push %ecx 10d380: 56 push %esi 10d381: 68 09 22 12 00 push $0x122209 "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( 10d386: 6a 00 push $0x0 10d388: ff 75 0c pushl 0xc(%ebp) 10d38b: 89 4d c4 mov %ecx,-0x3c(%ebp) 10d38e: ff 55 e4 call *-0x1c(%ebp) 10d391: 83 c4 20 add $0x20,%esp 10d394: 8b 4d c4 mov -0x3c(%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 10d397: 39 7b 20 cmp %edi,0x20(%ebx) 10d39a: 76 20 jbe 10d3bc <_Heap_Walk+0x24c> <== NEVER TAKEN block->prev_size ); } if ( !_Heap_Is_block_in_heap( heap, next_block ) ) { (*printer)( 10d39c: 83 ec 0c sub $0xc,%esp 10d39f: 57 push %edi 10d3a0: 56 push %esi 10d3a1: 68 24 20 12 00 push $0x122024 10d3a6: e9 e5 fe ff ff jmp 10d290 <_Heap_Walk+0x120> <== ALWAYS TAKEN 10d3ab: 90 nop <== NOT EXECUTED "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( 10d3ac: 83 ec 08 sub $0x8,%esp 10d3af: ff 36 pushl (%esi) 10d3b1: 51 push %ecx 10d3b2: 56 push %esi 10d3b3: 68 fc 1f 12 00 push $0x121ffc 10d3b8: eb cc jmp 10d386 <_Heap_Walk+0x216> <== ALWAYS TAKEN 10d3ba: 66 90 xchg %ax,%ax <== NOT EXECUTED 10d3bc: 39 7b 24 cmp %edi,0x24(%ebx) 10d3bf: 72 db jb 10d39c <_Heap_Walk+0x22c> ); return false; } if ( !_Heap_Is_aligned( block_size, page_size ) ) { 10d3c1: 89 c8 mov %ecx,%eax 10d3c3: 31 d2 xor %edx,%edx 10d3c5: f7 75 e0 divl -0x20(%ebp) 10d3c8: 85 d2 test %edx,%edx 10d3ca: 0f 85 02 01 00 00 jne 10d4d2 <_Heap_Walk+0x362> ); return false; } if ( block_size < min_block_size ) { 10d3d0: 39 4d dc cmp %ecx,-0x24(%ebp) 10d3d3: 0f 87 0b 01 00 00 ja 10d4e4 <_Heap_Walk+0x374> ); return false; } if ( next_block_begin <= block_begin ) { 10d3d9: 39 fe cmp %edi,%esi 10d3db: 0f 83 17 01 00 00 jae 10d4f8 <_Heap_Walk+0x388> ); return false; } if ( !_Heap_Is_prev_used( next_block ) ) { 10d3e1: f6 47 04 01 testb $0x1,0x4(%edi) 10d3e5: 0f 85 91 00 00 00 jne 10d47c <_Heap_Walk+0x30c> return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 10d3eb: 8b 4b 08 mov 0x8(%ebx),%ecx 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; 10d3ee: 8b 46 04 mov 0x4(%esi),%eax 10d3f1: 89 45 cc mov %eax,-0x34(%ebp) - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 10d3f4: 83 e0 fe and $0xfffffffe,%eax 10d3f7: 89 45 d4 mov %eax,-0x2c(%ebp) RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 10d3fa: 01 f0 add %esi,%eax 10d3fc: 89 45 d0 mov %eax,-0x30(%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)( 10d3ff: 8b 56 08 mov 0x8(%esi),%edx 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; 10d402: 39 53 0c cmp %edx,0xc(%ebx) 10d405: 0f 84 99 00 00 00 je 10d4a4 <_Heap_Walk+0x334> " (= first)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last)" : (block->next == free_list_tail ? " (= tail)" : "") 10d40b: 39 da cmp %ebx,%edx 10d40d: 0f 84 a9 00 00 00 je 10d4bc <_Heap_Walk+0x34c> 10d413: c7 45 c8 6f 1d 12 00 movl $0x121d6f,-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)( 10d41a: 8b 46 0c mov 0xc(%esi),%eax 10d41d: 39 c1 cmp %eax,%ecx 10d41f: 74 7b je 10d49c <_Heap_Walk+0x32c> "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)" : ""), 10d421: 39 d8 cmp %ebx,%eax 10d423: 0f 84 9f 00 00 00 je 10d4c8 <_Heap_Walk+0x358> 10d429: b9 6f 1d 12 00 mov $0x121d6f,%ecx 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)( 10d42e: ff 75 c8 pushl -0x38(%ebp) 10d431: 52 push %edx 10d432: 51 push %ecx 10d433: 50 push %eax 10d434: 56 push %esi 10d435: 68 e4 20 12 00 push $0x1220e4 10d43a: 6a 00 push $0x0 10d43c: ff 75 0c pushl 0xc(%ebp) 10d43f: 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 ) { 10d442: 8b 55 d0 mov -0x30(%ebp),%edx 10d445: 8b 02 mov (%edx),%eax 10d447: 83 c4 20 add $0x20,%esp 10d44a: 39 45 d4 cmp %eax,-0x2c(%ebp) 10d44d: 74 11 je 10d460 <_Heap_Walk+0x2f0> (*printer)( 10d44f: 51 push %ecx 10d450: 52 push %edx 10d451: 50 push %eax 10d452: ff 75 d4 pushl -0x2c(%ebp) 10d455: 56 push %esi 10d456: 68 10 21 12 00 push $0x122110 10d45b: e9 30 fe ff ff jmp 10d290 <_Heap_Walk+0x120> <== ALWAYS TAKEN ); return false; } if ( !prev_used ) { 10d460: f6 45 cc 01 testb $0x1,-0x34(%ebp) 10d464: 74 4a je 10d4b0 <_Heap_Walk+0x340> return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 10d466: 8b 43 08 mov 0x8(%ebx),%eax ) { const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); const Heap_Block *free_block = _Heap_Free_list_first( heap ); while ( free_block != free_list_tail ) { 10d469: 39 d8 cmp %ebx,%eax 10d46b: 75 0a jne 10d477 <_Heap_Walk+0x307> <== NEVER TAKEN 10d46d: eb 21 jmp 10d490 <_Heap_Walk+0x320> <== NOT EXECUTED 10d46f: 90 nop <== NOT EXECUTED if ( free_block == block ) { return true; } free_block = free_block->next; 10d470: 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 ) { 10d473: 39 d8 cmp %ebx,%eax 10d475: 74 19 je 10d490 <_Heap_Walk+0x320> if ( free_block == block ) { 10d477: 39 f0 cmp %esi,%eax 10d479: 75 f5 jne 10d470 <_Heap_Walk+0x300> 10d47b: 90 nop if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; } while ( block != last_block ) { 10d47c: 39 7d d8 cmp %edi,-0x28(%ebp) 10d47f: 0f 84 22 fd ff ff je 10d1a7 <_Heap_Walk+0x37> 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 ) { 10d485: 8b 47 04 mov 0x4(%edi),%eax 10d488: 89 fe mov %edi,%esi 10d48a: e9 e1 fe ff ff jmp 10d370 <_Heap_Walk+0x200> <== ALWAYS TAKEN 10d48f: 90 nop <== NOT EXECUTED return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( 10d490: 56 push %esi 10d491: 68 7c 21 12 00 push $0x12217c 10d496: e9 d1 fd ff ff jmp 10d26c <_Heap_Walk+0xfc> <== ALWAYS TAKEN 10d49b: 90 nop <== NOT EXECUTED Heap_Block *const last_free_block = _Heap_Free_list_last( heap ); bool const prev_used = _Heap_Is_prev_used( block ); uintptr_t const block_size = _Heap_Block_size( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); (*printer)( 10d49c: b9 34 22 12 00 mov $0x122234,%ecx 10d4a1: eb 8b jmp 10d42e <_Heap_Walk+0x2be> <== ALWAYS TAKEN 10d4a3: 90 nop <== NOT EXECUTED } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_last( Heap_Control *heap ) { return _Heap_Free_list_tail(heap)->prev; 10d4a4: c7 45 c8 20 22 12 00 movl $0x122220,-0x38(%ebp) 10d4ab: e9 6a ff ff ff jmp 10d41a <_Heap_Walk+0x2aa> <== ALWAYS TAKEN return false; } if ( !prev_used ) { (*printer)( 10d4b0: 56 push %esi 10d4b1: 68 4c 21 12 00 push $0x12214c 10d4b6: e9 b1 fd ff ff jmp 10d26c <_Heap_Walk+0xfc> <== ALWAYS TAKEN 10d4bb: 90 nop <== NOT EXECUTED " (= first)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last)" : (block->next == free_list_tail ? " (= tail)" : "") 10d4bc: c7 45 c8 2a 22 12 00 movl $0x12222a,-0x38(%ebp) 10d4c3: e9 52 ff ff ff jmp 10d41a <_Heap_Walk+0x2aa> <== ALWAYS TAKEN "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)" : ""), 10d4c8: b9 3f 22 12 00 mov $0x12223f,%ecx 10d4cd: e9 5c ff ff ff jmp 10d42e <_Heap_Walk+0x2be> <== ALWAYS TAKEN return false; } if ( !_Heap_Is_aligned( block_size, page_size ) ) { (*printer)( 10d4d2: 83 ec 0c sub $0xc,%esp 10d4d5: 51 push %ecx 10d4d6: 56 push %esi 10d4d7: 68 54 20 12 00 push $0x122054 10d4dc: e9 af fd ff ff jmp 10d290 <_Heap_Walk+0x120> <== ALWAYS TAKEN 10d4e1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED return false; } if ( block_size < min_block_size ) { (*printer)( 10d4e4: 83 ec 08 sub $0x8,%esp 10d4e7: ff 75 dc pushl -0x24(%ebp) 10d4ea: 51 push %ecx 10d4eb: 56 push %esi 10d4ec: 68 84 20 12 00 push $0x122084 10d4f1: e9 9a fd ff ff jmp 10d290 <_Heap_Walk+0x120> <== ALWAYS TAKEN 10d4f6: 66 90 xchg %ax,%ax <== NOT EXECUTED return false; } if ( next_block_begin <= block_begin ) { (*printer)( 10d4f8: 83 ec 0c sub $0xc,%esp 10d4fb: 57 push %edi 10d4fc: 56 push %esi 10d4fd: 68 b0 20 12 00 push $0x1220b0 10d502: e9 89 fd ff ff jmp 10d290 <_Heap_Walk+0x120> <== ALWAYS TAKEN return false; } if ( _Heap_Is_free( last_block ) ) { (*printer)( 10d507: 53 push %ebx 10d508: 68 d8 21 12 00 push $0x1221d8 10d50d: e9 5a fd ff ff jmp 10d26c <_Heap_Walk+0xfc> <== ALWAYS TAKEN } if ( !_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size ) ) { (*printer)( 10d512: 51 push %ecx 10d513: 68 98 1f 12 00 push $0x121f98 10d518: e9 4f fd ff ff jmp 10d26c <_Heap_Walk+0xfc> <== ALWAYS TAKEN return false; } if ( free_block->prev != prev_block ) { (*printer)( 10d51d: 83 ec 0c sub $0xc,%esp 10d520: 50 push %eax 10d521: 51 push %ecx 10d522: 68 c8 1f 12 00 push $0x121fc8 10d527: e9 64 fd ff ff jmp 10d290 <_Heap_Walk+0x120> <== ALWAYS TAKEN return false; } if ( _Heap_Is_used( free_block ) ) { (*printer)( 10d52c: 51 push %ecx 10d52d: 68 ed 21 12 00 push $0x1221ed 10d532: e9 35 fd ff ff jmp 10d26c <_Heap_Walk+0xfc> <== ALWAYS TAKEN 0010d538 <_Heap_Walk_print>: { /* Do nothing */ } static void _Heap_Walk_print( int source, bool error, const char *fmt, ... ) { 10d538: 55 push %ebp 10d539: 89 e5 mov %esp,%ebp 10d53b: 83 ec 08 sub $0x8,%esp 10d53e: 8b 45 08 mov 0x8(%ebp),%eax va_list ap; if ( error ) { 10d541: 80 7d 0c 00 cmpb $0x0,0xc(%ebp) 10d545: 75 25 jne 10d56c <_Heap_Walk_print+0x34> printk( "FAIL[%d]: ", source ); } else { printk( "PASS[%d]: ", source ); 10d547: 83 ec 08 sub $0x8,%esp 10d54a: 50 push %eax 10d54b: 68 54 22 12 00 push $0x122254 10d550: e8 3f bf ff ff call 109494 10d555: 83 c4 10 add $0x10,%esp ) { /* Do nothing */ } static void _Heap_Walk_print( int source, bool error, const char *fmt, ... ) 10d558: 8d 45 14 lea 0x14(%ebp),%eax } else { printk( "PASS[%d]: ", source ); } va_start( ap, fmt ); vprintk( fmt, ap ); 10d55b: 83 ec 08 sub $0x8,%esp 10d55e: 50 push %eax 10d55f: ff 75 10 pushl 0x10(%ebp) 10d562: e8 cd dc ff ff call 10b234 10d567: 83 c4 10 add $0x10,%esp va_end( ap ); } 10d56a: c9 leave 10d56b: c3 ret static void _Heap_Walk_print( int source, bool error, const char *fmt, ... ) { va_list ap; if ( error ) { printk( "FAIL[%d]: ", source ); 10d56c: 83 ec 08 sub $0x8,%esp 10d56f: 50 push %eax 10d570: 68 49 22 12 00 push $0x122249 10d575: e8 1a bf ff ff call 109494 10d57a: 83 c4 10 add $0x10,%esp 10d57d: eb d9 jmp 10d558 <_Heap_Walk_print+0x20> <== ALWAYS TAKEN 0010bbb0 <_IO_Initialize_all_drivers>: * * Output Parameters: NONE */ void _IO_Initialize_all_drivers( void ) { 10bbb0: 55 push %ebp 10bbb1: 89 e5 mov %esp,%ebp 10bbb3: 53 push %ebx 10bbb4: 83 ec 04 sub $0x4,%esp rtems_device_major_number major; for ( major=0 ; major < _IO_Number_of_drivers ; major ++ ) 10bbb7: 8b 15 00 7e 12 00 mov 0x127e00,%edx 10bbbd: 85 d2 test %edx,%edx 10bbbf: 74 1a je 10bbdb <_IO_Initialize_all_drivers+0x2b> <== ALWAYS TAKEN 10bbc1: 31 db xor %ebx,%ebx 10bbc3: 90 nop (void) rtems_io_initialize( major, 0, NULL ); 10bbc4: 50 push %eax 10bbc5: 6a 00 push $0x0 10bbc7: 6a 00 push $0x0 10bbc9: 53 push %ebx 10bbca: e8 79 4d 00 00 call 110948 <== ALWAYS TAKEN void _IO_Initialize_all_drivers( void ) { rtems_device_major_number major; for ( major=0 ; major < _IO_Number_of_drivers ; major ++ ) 10bbcf: 43 inc %ebx 10bbd0: 83 c4 10 add $0x10,%esp 10bbd3: 39 1d 00 7e 12 00 cmp %ebx,0x127e00 10bbd9: 77 e9 ja 10bbc4 <_IO_Initialize_all_drivers+0x14> (void) rtems_io_initialize( major, 0, NULL ); } 10bbdb: 8b 5d fc mov -0x4(%ebp),%ebx 10bbde: c9 leave 10bbdf: c3 ret 0010bbe0 <_IO_Manager_initialization>: * workspace. * */ void _IO_Manager_initialization(void) { 10bbe0: 55 push %ebp 10bbe1: 89 e5 mov %esp,%ebp 10bbe3: 57 push %edi 10bbe4: 56 push %esi 10bbe5: 53 push %ebx 10bbe6: 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; 10bbe9: 8b 1d 54 32 12 00 mov 0x123254,%ebx drivers_in_table = Configuration.number_of_device_drivers; 10bbef: a1 50 32 12 00 mov 0x123250,%eax 10bbf4: 89 45 e4 mov %eax,-0x1c(%ebp) number_of_drivers = Configuration.maximum_drivers; 10bbf7: 8b 35 4c 32 12 00 mov 0x12324c,%esi /* * If the user claims there are less drivers than are actually in * the table, then let's just go with the table's count. */ if ( number_of_drivers <= drivers_in_table ) 10bbfd: 39 f0 cmp %esi,%eax 10bbff: 72 17 jb 10bc18 <_IO_Manager_initialization+0x38> * 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; 10bc01: 89 1d 04 7e 12 00 mov %ebx,0x127e04 _IO_Number_of_drivers = number_of_drivers; 10bc07: 8b 45 e4 mov -0x1c(%ebp),%eax 10bc0a: a3 00 7e 12 00 mov %eax,0x127e00 ); for ( index = 0 ; index < drivers_in_table ; index++ ) _IO_Driver_address_table[index] = driver_table[index]; number_of_drivers = drivers_in_table; } 10bc0f: 8d 65 f4 lea -0xc(%ebp),%esp 10bc12: 5b pop %ebx 10bc13: 5e pop %esi 10bc14: 5f pop %edi 10bc15: c9 leave 10bc16: c3 ret 10bc17: 90 nop <== NOT EXECUTED /* * 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 *) 10bc18: 8d 0c 76 lea (%esi,%esi,2),%ecx 10bc1b: c1 e1 03 shl $0x3,%ecx 10bc1e: 83 ec 0c sub $0xc,%esp 10bc21: 51 push %ecx 10bc22: 89 4d dc mov %ecx,-0x24(%ebp) 10bc25: e8 e6 29 00 00 call 10e610 <_Workspace_Allocate_or_fatal_error> 10bc2a: 89 c2 mov %eax,%edx 10bc2c: a3 04 7e 12 00 mov %eax,0x127e04 _Workspace_Allocate_or_fatal_error( sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); _IO_Number_of_drivers = number_of_drivers; 10bc31: 89 35 00 7e 12 00 mov %esi,0x127e00 memset( 10bc37: 31 c0 xor %eax,%eax 10bc39: 8b 4d dc mov -0x24(%ebp),%ecx 10bc3c: 89 d7 mov %edx,%edi 10bc3e: f3 aa rep stos %al,%es:(%edi) _IO_Driver_address_table, 0, sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ ) 10bc40: 83 c4 10 add $0x10,%esp 10bc43: 8b 4d e4 mov -0x1c(%ebp),%ecx 10bc46: 85 c9 test %ecx,%ecx 10bc48: 74 c5 je 10bc0f <_IO_Manager_initialization+0x2f> <== ALWAYS TAKEN 10bc4a: a1 04 7e 12 00 mov 0x127e04,%eax 10bc4f: 89 45 e0 mov %eax,-0x20(%ebp) 10bc52: 31 c0 xor %eax,%eax 10bc54: 31 d2 xor %edx,%edx 10bc56: 66 90 xchg %ax,%ax _IO_Driver_address_table[index] = driver_table[index]; 10bc58: 8b 7d e0 mov -0x20(%ebp),%edi 10bc5b: 01 c7 add %eax,%edi 10bc5d: 8d 34 03 lea (%ebx,%eax,1),%esi 10bc60: b9 06 00 00 00 mov $0x6,%ecx 10bc65: 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++ ) 10bc67: 42 inc %edx 10bc68: 83 c0 18 add $0x18,%eax 10bc6b: 39 55 e4 cmp %edx,-0x1c(%ebp) 10bc6e: 77 e8 ja 10bc58 <_IO_Manager_initialization+0x78> _IO_Driver_address_table[index] = driver_table[index]; number_of_drivers = drivers_in_table; } 10bc70: 8d 65 f4 lea -0xc(%ebp),%esp 10bc73: 5b pop %ebx 10bc74: 5e pop %esi 10bc75: 5f pop %edi 10bc76: c9 leave 10bc77: c3 ret 0010c738 <_ISR_Handler_initialization>: * * Output parameters: NONE */ void _ISR_Handler_initialization( void ) { 10c738: 55 push %ebp 10c739: 89 e5 mov %esp,%ebp 10c73b: 83 ec 08 sub $0x8,%esp _ISR_Signals_to_thread_executing = false; 10c73e: c6 05 48 75 12 00 00 movb $0x0,0x127548 _ISR_Nest_level = 0; 10c745: c7 05 74 74 12 00 00 movl $0x0,0x127474 10c74c: 00 00 00 _CPU_Initialize_vectors(); #if ( CPU_ALLOCATE_INTERRUPT_STACK == TRUE ) if ( !_Stack_Is_enough(Configuration.interrupt_stack_size) ) 10c74f: a1 3c 32 12 00 mov 0x12323c,%eax 10c754: 3b 05 10 32 12 00 cmp 0x123210,%eax 10c75a: 72 25 jb 10c781 <_ISR_Handler_initialization+0x49> INTERNAL_ERROR_CORE, true, INTERNAL_ERROR_INTERRUPT_STACK_TOO_SMALL ); _CPU_Interrupt_stack_low = _Workspace_Allocate_or_fatal_error( 10c75c: 83 ec 0c sub $0xc,%esp 10c75f: 50 push %eax 10c760: e8 ab 1e 00 00 call 10e610 <_Workspace_Allocate_or_fatal_error> 10c765: a3 e8 73 12 00 mov %eax,0x1273e8 /* Interrupt stack might have to be aligned and/or setup * in a specific way. */ #if defined(_CPU_Interrupt_stack_setup) _CPU_Interrupt_stack_setup(_CPU_Interrupt_stack_low, _CPU_Interrupt_stack_high); 10c76a: 8b 15 3c 32 12 00 mov 0x12323c,%edx 10c770: 8d 44 10 fc lea -0x4(%eax,%edx,1),%eax 10c774: 83 e0 f0 and $0xfffffff0,%eax 10c777: a3 a8 73 12 00 mov %eax,0x1273a8 10c77c: 83 c4 10 add $0x10,%esp #if ( CPU_HAS_HARDWARE_INTERRUPT_STACK == TRUE ) _CPU_Install_interrupt_stack(); #endif } 10c77f: c9 leave 10c780: c3 ret _CPU_Initialize_vectors(); #if ( CPU_ALLOCATE_INTERRUPT_STACK == TRUE ) if ( !_Stack_Is_enough(Configuration.interrupt_stack_size) ) _Internal_error_Occurred( 10c781: 50 push %eax 10c782: 6a 05 push $0x5 10c784: 6a 01 push $0x1 10c786: 6a 00 push $0x0 10c788: e8 6b ff ff ff call 10c6f8 <_Internal_error_Occurred> <== ALWAYS TAKEN 0010c6f8 <_Internal_error_Occurred>: void _Internal_error_Occurred( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { 10c6f8: 55 push %ebp 10c6f9: 89 e5 mov %esp,%ebp 10c6fb: 53 push %ebx 10c6fc: 83 ec 08 sub $0x8,%esp 10c6ff: 8b 45 08 mov 0x8(%ebp),%eax 10c702: 8b 55 0c mov 0xc(%ebp),%edx 10c705: 8b 5d 10 mov 0x10(%ebp),%ebx _Internal_errors_What_happened.the_source = the_source; 10c708: a3 80 74 12 00 mov %eax,0x127480 _Internal_errors_What_happened.is_internal = is_internal; 10c70d: 88 15 84 74 12 00 mov %dl,0x127484 _Internal_errors_What_happened.the_error = the_error; 10c713: 89 1d 88 74 12 00 mov %ebx,0x127488 _User_extensions_Fatal( the_source, is_internal, the_error ); 10c719: 53 push %ebx 10c71a: 0f b6 d2 movzbl %dl,%edx 10c71d: 52 push %edx 10c71e: 50 push %eax 10c71f: e8 84 1b 00 00 call 10e2a8 <_User_extensions_Fatal> RTEMS_INLINE_ROUTINE void _System_state_Set ( System_state_Codes state ) { _System_state_Current = state; 10c724: c7 05 a0 75 12 00 05 movl $0x5,0x1275a0 <== NOT EXECUTED 10c72b: 00 00 00 <== NOT EXECUTED _System_state_Set( SYSTEM_STATE_FAILED ); _CPU_Fatal_halt( the_error ); 10c72e: fa cli <== NOT EXECUTED 10c72f: 89 d8 mov %ebx,%eax <== NOT EXECUTED 10c731: f4 hlt <== NOT EXECUTED 10c732: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10c735: eb fe jmp 10c735 <_Internal_error_Occurred+0x3d> <== NOT EXECUTED 00110f70 <_Objects_API_maximum_class>: #include unsigned int _Objects_API_maximum_class( uint32_t api ) { 110f70: 55 push %ebp 110f71: 89 e5 mov %esp,%ebp case OBJECTS_NO_API: default: break; } return 0; } 110f73: 8b 45 08 mov 0x8(%ebp),%eax 110f76: 48 dec %eax 110f77: 83 f8 03 cmp $0x3,%eax 110f7a: 77 0c ja 110f88 <_Objects_API_maximum_class+0x18> 110f7c: 8b 04 85 98 14 12 00 mov 0x121498(,%eax,4),%eax 110f83: c9 leave 110f84: c3 ret 110f85: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 110f88: 31 c0 xor %eax,%eax 110f8a: c9 leave 110f8b: c3 ret 0010c790 <_Objects_Allocate>: */ Objects_Control *_Objects_Allocate( Objects_Information *information ) { 10c790: 55 push %ebp 10c791: 89 e5 mov %esp,%ebp 10c793: 56 push %esi 10c794: 53 push %ebx 10c795: 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 ) 10c798: 8b 43 18 mov 0x18(%ebx),%eax 10c79b: 85 c0 test %eax,%eax 10c79d: 75 0d jne 10c7ac <_Objects_Allocate+0x1c> <== NEVER TAKEN 10c79f: 31 c9 xor %ecx,%ecx <== NOT EXECUTED information->inactive--; } } return the_object; } 10c7a1: 89 c8 mov %ecx,%eax 10c7a3: 8d 65 f8 lea -0x8(%ebp),%esp 10c7a6: 5b pop %ebx 10c7a7: 5e pop %esi 10c7a8: c9 leave 10c7a9: c3 ret 10c7aa: 66 90 xchg %ax,%ax <== NOT EXECUTED /* * OK. The manager should be initialized and configured to have objects. * With any luck, it is safe to attempt to allocate an object. */ the_object = (Objects_Control *) _Chain_Get( &information->Inactive ); 10c7ac: 8d 73 20 lea 0x20(%ebx),%esi 10c7af: 83 ec 0c sub $0xc,%esp 10c7b2: 56 push %esi 10c7b3: e8 e4 f6 ff ff call 10be9c <_Chain_Get> <== ALWAYS TAKEN 10c7b8: 89 c1 mov %eax,%ecx if ( information->auto_extend ) { 10c7ba: 83 c4 10 add $0x10,%esp 10c7bd: 80 7b 12 00 cmpb $0x0,0x12(%ebx) 10c7c1: 74 de je 10c7a1 <_Objects_Allocate+0x11> /* * If the list is empty then we are out of objects and need to * extend information base. */ if ( !the_object ) { 10c7c3: 85 c0 test %eax,%eax 10c7c5: 74 29 je 10c7f0 <_Objects_Allocate+0x60> } if ( the_object ) { uint32_t block; block = (uint32_t) _Objects_Get_index( the_object->id ) - 10c7c7: 0f b7 41 08 movzwl 0x8(%ecx),%eax 10c7cb: 0f b7 53 08 movzwl 0x8(%ebx),%edx 10c7cf: 29 d0 sub %edx,%eax _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; 10c7d1: 0f b7 73 14 movzwl 0x14(%ebx),%esi 10c7d5: 31 d2 xor %edx,%edx 10c7d7: f7 f6 div %esi 10c7d9: c1 e0 02 shl $0x2,%eax 10c7dc: 03 43 30 add 0x30(%ebx),%eax 10c7df: ff 08 decl (%eax) information->inactive--; 10c7e1: 66 ff 4b 2c decw 0x2c(%ebx) } } return the_object; } 10c7e5: 89 c8 mov %ecx,%eax 10c7e7: 8d 65 f8 lea -0x8(%ebp),%esp 10c7ea: 5b pop %ebx 10c7eb: 5e pop %esi 10c7ec: c9 leave 10c7ed: c3 ret 10c7ee: 66 90 xchg %ax,%ax <== NOT EXECUTED * If the list is empty then we are out of objects and need to * extend information base. */ if ( !the_object ) { _Objects_Extend_information( information ); 10c7f0: 83 ec 0c sub $0xc,%esp 10c7f3: 53 push %ebx 10c7f4: e8 3b 00 00 00 call 10c834 <_Objects_Extend_information> <== ALWAYS TAKEN the_object = (Objects_Control *) _Chain_Get( &information->Inactive ); 10c7f9: 89 34 24 mov %esi,(%esp) 10c7fc: e8 9b f6 ff ff call 10be9c <_Chain_Get> <== ALWAYS TAKEN 10c801: 89 c1 mov %eax,%ecx } if ( the_object ) { 10c803: 83 c4 10 add $0x10,%esp 10c806: 85 c0 test %eax,%eax 10c808: 74 97 je 10c7a1 <_Objects_Allocate+0x11> 10c80a: eb bb jmp 10c7c7 <_Objects_Allocate+0x37> <== ALWAYS TAKEN 0010c80c <_Objects_Close>: void _Objects_Close( Objects_Information *information, Objects_Control *the_object ) { 10c80c: 55 push %ebp 10c80d: 89 e5 mov %esp,%ebp 10c80f: 53 push %ebx 10c810: 83 ec 04 sub $0x4,%esp 10c813: 8b 45 08 mov 0x8(%ebp),%eax 10c816: 8b 55 0c mov 0xc(%ebp),%edx #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10c819: 0f b7 5a 08 movzwl 0x8(%edx),%ebx 10c81d: 8b 48 1c mov 0x1c(%eax),%ecx 10c820: c7 04 99 00 00 00 00 movl $0x0,(%ecx,%ebx,4) _Objects_Invalidate_Id( information, the_object ); _Objects_Namespace_remove( information, the_object ); 10c827: 89 55 0c mov %edx,0xc(%ebp) } 10c82a: 58 pop %eax 10c82b: 5b pop %ebx 10c82c: c9 leave Objects_Control *the_object ) { _Objects_Invalidate_Id( information, the_object ); _Objects_Namespace_remove( information, the_object ); 10c82d: e9 5e 05 00 00 jmp 10cd90 <_Objects_Namespace_remove> <== ALWAYS TAKEN 0010c834 <_Objects_Extend_information>: */ void _Objects_Extend_information( Objects_Information *information ) { 10c834: 55 push %ebp 10c835: 89 e5 mov %esp,%ebp 10c837: 57 push %edi 10c838: 56 push %esi 10c839: 53 push %ebx 10c83a: 83 ec 4c sub $0x4c,%esp 10c83d: 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 ); 10c840: 0f b7 43 08 movzwl 0x8(%ebx),%eax 10c844: 89 45 d0 mov %eax,-0x30(%ebp) index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) 10c847: 8b 4b 34 mov 0x34(%ebx),%ecx 10c84a: 85 c9 test %ecx,%ecx 10c84c: 0f 84 72 02 00 00 je 10cac4 <_Objects_Extend_information+0x290> block_count = 0; else { block_count = information->maximum / information->allocation_size; 10c852: 8b 7b 10 mov 0x10(%ebx),%edi 10c855: 66 89 7d d4 mov %di,-0x2c(%ebp) 10c859: 8b 7b 14 mov 0x14(%ebx),%edi 10c85c: 31 d2 xor %edx,%edx 10c85e: 8b 45 d4 mov -0x2c(%ebp),%eax 10c861: 66 f7 f7 div %di 10c864: 0f b7 f0 movzwl %ax,%esi for ( ; block < block_count; block++ ) { 10c867: 85 f6 test %esi,%esi 10c869: 0f 84 6c 02 00 00 je 10cadb <_Objects_Extend_information+0x2a7> <== ALWAYS TAKEN if ( information->object_blocks[ block ] == NULL ) 10c86f: 8b 01 mov (%ecx),%eax 10c871: 85 c0 test %eax,%eax 10c873: 0f 84 72 02 00 00 je 10caeb <_Objects_Extend_information+0x2b7> <== ALWAYS TAKEN 10c879: 0f b7 ff movzwl %di,%edi 10c87c: 8b 55 d0 mov -0x30(%ebp),%edx 10c87f: 89 55 cc mov %edx,-0x34(%ebp) 10c882: 31 d2 xor %edx,%edx 10c884: 8b 45 cc mov -0x34(%ebp),%eax 10c887: eb 09 jmp 10c892 <_Objects_Extend_information+0x5e> <== ALWAYS TAKEN 10c889: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 10c88c: 83 3c 91 00 cmpl $0x0,(%ecx,%edx,4) 10c890: 74 07 je 10c899 <_Objects_Extend_information+0x65> break; else index_base += information->allocation_size; 10c892: 01 f8 add %edi,%eax if ( information->object_blocks == NULL ) block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { 10c894: 42 inc %edx 10c895: 39 d6 cmp %edx,%esi 10c897: 77 f3 ja 10c88c <_Objects_Extend_information+0x58> 10c899: 89 45 cc mov %eax,-0x34(%ebp) else index_base += information->allocation_size; } } maximum = (uint32_t) information->maximum + information->allocation_size; 10c89c: 0f b7 45 d4 movzwl -0x2c(%ebp),%eax 10c8a0: 01 f8 add %edi,%eax 10c8a2: 89 45 d4 mov %eax,-0x2c(%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 ) { 10c8a5: 3d ff ff 00 00 cmp $0xffff,%eax 10c8aa: 0f 87 b1 01 00 00 ja 10ca61 <_Objects_Extend_information+0x22d> <== 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; 10c8b0: 0f af 7b 18 imul 0x18(%ebx),%edi if ( information->auto_extend ) { 10c8b4: 80 7b 12 00 cmpb $0x0,0x12(%ebx) 10c8b8: 0f 85 ae 01 00 00 jne 10ca6c <_Objects_Extend_information+0x238> new_object_block = _Workspace_Allocate( block_size ); if ( !new_object_block ) return; } else { new_object_block = _Workspace_Allocate_or_fatal_error( block_size ); 10c8be: 83 ec 0c sub $0xc,%esp 10c8c1: 57 push %edi 10c8c2: 89 55 b4 mov %edx,-0x4c(%ebp) 10c8c5: e8 46 1d 00 00 call 10e610 <_Workspace_Allocate_or_fatal_error> 10c8ca: 89 45 c4 mov %eax,-0x3c(%ebp) 10c8cd: 83 c4 10 add $0x10,%esp 10c8d0: 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 ) { 10c8d3: 0f b7 43 10 movzwl 0x10(%ebx),%eax 10c8d7: 39 45 cc cmp %eax,-0x34(%ebp) 10c8da: 0f 82 fe 00 00 00 jb 10c9de <_Objects_Extend_information+0x1aa> */ /* * Up the block count and maximum */ block_count++; 10c8e0: 8d 7e 01 lea 0x1(%esi),%edi * Allocate the tables and break it up. */ block_size = block_count * (sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) + ((maximum + minimum_index) * sizeof(Objects_Control *)); object_blocks = (void**) _Workspace_Allocate( block_size ); 10c8e3: 83 ec 0c sub $0xc,%esp 10c8e6: 8d 04 7f lea (%edi,%edi,2),%eax 10c8e9: 03 45 d4 add -0x2c(%ebp),%eax 10c8ec: 03 45 d0 add -0x30(%ebp),%eax 10c8ef: c1 e0 02 shl $0x2,%eax 10c8f2: 50 push %eax 10c8f3: 89 55 b4 mov %edx,-0x4c(%ebp) 10c8f6: e8 41 1d 00 00 call 10e63c <_Workspace_Allocate> 10c8fb: 89 45 c8 mov %eax,-0x38(%ebp) if ( !object_blocks ) { 10c8fe: 83 c4 10 add $0x10,%esp 10c901: 85 c0 test %eax,%eax 10c903: 8b 55 b4 mov -0x4c(%ebp),%edx 10c906: 0f 84 ef 01 00 00 je 10cafb <_Objects_Extend_information+0x2c7> RTEMS_INLINE_ROUTINE void *_Addresses_Add_offset ( const void *base, uintptr_t offset ) { return (void *)((uintptr_t)base + offset); 10c90c: 8b 45 c8 mov -0x38(%ebp),%eax 10c90f: 8d 04 b8 lea (%eax,%edi,4),%eax 10c912: 89 45 b8 mov %eax,-0x48(%ebp) 10c915: 8b 4d c8 mov -0x38(%ebp),%ecx 10c918: 8d 3c f9 lea (%ecx,%edi,8),%edi 10c91b: 89 7d bc mov %edi,-0x44(%ebp) * Take the block count down. Saves all the (block_count - 1) * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { 10c91e: 0f b7 43 10 movzwl 0x10(%ebx),%eax 10c922: 39 45 d0 cmp %eax,-0x30(%ebp) 10c925: 0f 82 60 01 00 00 jb 10ca8b <_Objects_Extend_information+0x257> } else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { 10c92b: 8b 45 d0 mov -0x30(%ebp),%eax 10c92e: 85 c0 test %eax,%eax 10c930: 74 16 je 10c948 <_Objects_Extend_information+0x114> <== ALWAYS TAKEN information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, 10c932: 31 c0 xor %eax,%eax 10c934: 8b 4d bc mov -0x44(%ebp),%ecx 10c937: 8b 7d d0 mov -0x30(%ebp),%edi 10c93a: 66 90 xchg %ax,%ax /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { local_table[ index ] = NULL; 10c93c: c7 04 81 00 00 00 00 movl $0x0,(%ecx,%eax,4) } else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { 10c943: 40 inc %eax 10c944: 39 c7 cmp %eax,%edi 10c946: 77 f4 ja 10c93c <_Objects_Extend_information+0x108> <== ALWAYS TAKEN 10c948: c1 e6 02 shl $0x2,%esi 10c94b: 89 75 c0 mov %esi,-0x40(%ebp) } /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; 10c94e: 8b 45 c8 mov -0x38(%ebp),%eax 10c951: 8b 7d c0 mov -0x40(%ebp),%edi 10c954: c7 04 38 00 00 00 00 movl $0x0,(%eax,%edi,1) inactive_per_block[block_count] = 0; 10c95b: 8b 4d b8 mov -0x48(%ebp),%ecx 10c95e: c7 04 39 00 00 00 00 movl $0x0,(%ecx,%edi,1) for ( index=index_base ; index < ( information->allocation_size + index_base ); 10c965: 0f b7 73 14 movzwl 0x14(%ebx),%esi 10c969: 03 75 cc add -0x34(%ebp),%esi * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; 10c96c: 39 75 cc cmp %esi,-0x34(%ebp) 10c96f: 73 19 jae 10c98a <_Objects_Extend_information+0x156> <== ALWAYS TAKEN 10c971: 8b 7d cc mov -0x34(%ebp),%edi 10c974: 8b 45 bc mov -0x44(%ebp),%eax 10c977: 8d 0c b8 lea (%eax,%edi,4),%ecx 10c97a: 89 f8 mov %edi,%eax index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL; 10c97c: 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++ ) { 10c982: 40 inc %eax 10c983: 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 ; 10c986: 39 f0 cmp %esi,%eax 10c988: 72 f2 jb 10c97c <_Objects_Extend_information+0x148> index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL; } _ISR_Disable( level ); 10c98a: 9c pushf 10c98b: fa cli 10c98c: 5f pop %edi old_tables = information->object_blocks; 10c98d: 8b 4b 34 mov 0x34(%ebx),%ecx information->object_blocks = object_blocks; 10c990: 8b 45 c8 mov -0x38(%ebp),%eax 10c993: 89 43 34 mov %eax,0x34(%ebx) information->inactive_per_block = inactive_per_block; 10c996: 8b 45 b8 mov -0x48(%ebp),%eax 10c999: 89 43 30 mov %eax,0x30(%ebx) information->local_table = local_table; 10c99c: 8b 45 bc mov -0x44(%ebp),%eax 10c99f: 89 43 1c mov %eax,0x1c(%ebx) information->maximum = (Objects_Maximum) maximum; 10c9a2: 8b 45 d4 mov -0x2c(%ebp),%eax 10c9a5: 66 89 43 10 mov %ax,0x10(%ebx) information->maximum_id = _Objects_Build_id( 10c9a9: 8b 33 mov (%ebx),%esi 10c9ab: c1 e6 18 shl $0x18,%esi 10c9ae: 81 ce 00 00 01 00 or $0x10000,%esi 10c9b4: 0f b7 43 04 movzwl 0x4(%ebx),%eax 10c9b8: c1 e0 1b shl $0x1b,%eax 10c9bb: 09 c6 or %eax,%esi 10c9bd: 0f b7 45 d4 movzwl -0x2c(%ebp),%eax 10c9c1: 09 c6 or %eax,%esi 10c9c3: 89 73 0c mov %esi,0xc(%ebx) information->the_class, _Objects_Local_node, information->maximum ); _ISR_Enable( level ); 10c9c6: 57 push %edi 10c9c7: 9d popf if ( old_tables ) 10c9c8: 85 c9 test %ecx,%ecx 10c9ca: 74 12 je 10c9de <_Objects_Extend_information+0x1aa> _Workspace_Free( old_tables ); 10c9cc: 83 ec 0c sub $0xc,%esp 10c9cf: 51 push %ecx 10c9d0: 89 55 b4 mov %edx,-0x4c(%ebp) 10c9d3: e8 80 1c 00 00 call 10e658 <_Workspace_Free> 10c9d8: 83 c4 10 add $0x10,%esp 10c9db: 8b 55 b4 mov -0x4c(%ebp),%edx } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; 10c9de: c1 e2 02 shl $0x2,%edx 10c9e1: 89 55 d0 mov %edx,-0x30(%ebp) 10c9e4: 8b 43 34 mov 0x34(%ebx),%eax 10c9e7: 8b 4d c4 mov -0x3c(%ebp),%ecx 10c9ea: 89 0c 10 mov %ecx,(%eax,%edx,1) /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 10c9ed: ff 73 18 pushl 0x18(%ebx) 10c9f0: 0f b7 53 14 movzwl 0x14(%ebx),%edx 10c9f4: 52 push %edx 10c9f5: 8b 7d d0 mov -0x30(%ebp),%edi 10c9f8: ff 34 38 pushl (%eax,%edi,1) 10c9fb: 8d 7d dc lea -0x24(%ebp),%edi 10c9fe: 57 push %edi 10c9ff: e8 a4 3f 00 00 call 1109a8 <_Chain_Initialize> <== ALWAYS TAKEN information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 10ca04: 8d 43 20 lea 0x20(%ebx),%eax 10ca07: 89 45 d4 mov %eax,-0x2c(%ebp) 10ca0a: 8b 75 cc mov -0x34(%ebp),%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 ) { 10ca0d: 83 c4 10 add $0x10,%esp 10ca10: eb 2b jmp 10ca3d <_Objects_Extend_information+0x209> <== ALWAYS TAKEN 10ca12: 66 90 xchg %ax,%ax <== NOT EXECUTED the_object->id = _Objects_Build_id( 10ca14: 8b 13 mov (%ebx),%edx 10ca16: c1 e2 18 shl $0x18,%edx 10ca19: 81 ca 00 00 01 00 or $0x10000,%edx 10ca1f: 0f b7 4b 04 movzwl 0x4(%ebx),%ecx 10ca23: c1 e1 1b shl $0x1b,%ecx 10ca26: 09 ca or %ecx,%edx 10ca28: 09 f2 or %esi,%edx 10ca2a: 89 50 08 mov %edx,0x8(%eax) information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 10ca2d: 83 ec 08 sub $0x8,%esp 10ca30: 50 push %eax 10ca31: ff 75 d4 pushl -0x2c(%ebp) 10ca34: e8 3f f4 ff ff call 10be78 <_Chain_Append> <== ALWAYS TAKEN index++; 10ca39: 46 inc %esi 10ca3a: 83 c4 10 add $0x10,%esp /* * Move from the local chain, initialise, then append to the inactive chain */ index = index_base; while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) { 10ca3d: 83 ec 0c sub $0xc,%esp 10ca40: 57 push %edi 10ca41: e8 56 f4 ff ff call 10be9c <_Chain_Get> <== ALWAYS TAKEN 10ca46: 83 c4 10 add $0x10,%esp 10ca49: 85 c0 test %eax,%eax 10ca4b: 75 c7 jne 10ca14 <_Objects_Extend_information+0x1e0> _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 10ca4d: 8b 43 30 mov 0x30(%ebx),%eax 10ca50: 0f b7 53 14 movzwl 0x14(%ebx),%edx 10ca54: 8b 4d d0 mov -0x30(%ebp),%ecx 10ca57: 89 14 08 mov %edx,(%eax,%ecx,1) information->inactive = 10ca5a: 8b 43 14 mov 0x14(%ebx),%eax 10ca5d: 66 01 43 2c add %ax,0x2c(%ebx) (Objects_Maximum)(information->inactive + information->allocation_size); } 10ca61: 8d 65 f4 lea -0xc(%ebp),%esp 10ca64: 5b pop %ebx 10ca65: 5e pop %esi 10ca66: 5f pop %edi 10ca67: c9 leave 10ca68: c3 ret 10ca69: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED * 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; if ( information->auto_extend ) { new_object_block = _Workspace_Allocate( block_size ); 10ca6c: 83 ec 0c sub $0xc,%esp 10ca6f: 57 push %edi 10ca70: 89 55 b4 mov %edx,-0x4c(%ebp) 10ca73: e8 c4 1b 00 00 call 10e63c <_Workspace_Allocate> 10ca78: 89 45 c4 mov %eax,-0x3c(%ebp) if ( !new_object_block ) 10ca7b: 83 c4 10 add $0x10,%esp 10ca7e: 85 c0 test %eax,%eax 10ca80: 8b 55 b4 mov -0x4c(%ebp),%edx 10ca83: 0f 85 4a fe ff ff jne 10c8d3 <_Objects_Extend_information+0x9f> 10ca89: eb d6 jmp 10ca61 <_Objects_Extend_information+0x22d> <== ALWAYS TAKEN /* * 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, 10ca8b: c1 e6 02 shl $0x2,%esi 10ca8e: 89 75 c0 mov %esi,-0x40(%ebp) 10ca91: 8b 73 34 mov 0x34(%ebx),%esi 10ca94: 8b 7d c8 mov -0x38(%ebp),%edi 10ca97: 8b 4d c0 mov -0x40(%ebp),%ecx 10ca9a: f3 a4 rep movsb %ds:(%esi),%es:(%edi) information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, 10ca9c: 8b 73 30 mov 0x30(%ebx),%esi 10ca9f: 8b 7d b8 mov -0x48(%ebp),%edi 10caa2: 8b 4d c0 mov -0x40(%ebp),%ecx 10caa5: f3 a4 rep movsb %ds:(%esi),%es:(%edi) information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, 10caa7: 0f b7 43 10 movzwl 0x10(%ebx),%eax 10caab: 03 45 d0 add -0x30(%ebp),%eax 10caae: 8d 0c 85 00 00 00 00 lea 0x0(,%eax,4),%ecx 10cab5: 8b 73 1c mov 0x1c(%ebx),%esi 10cab8: 8b 7d bc mov -0x44(%ebp),%edi 10cabb: f3 a4 rep movsb %ds:(%esi),%es:(%edi) 10cabd: e9 8c fe ff ff jmp 10c94e <_Objects_Extend_information+0x11a> <== ALWAYS TAKEN 10cac2: 66 90 xchg %ax,%ax <== NOT EXECUTED minimum_index = _Objects_Get_index( information->minimum_id ); index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) 10cac4: 8b 53 10 mov 0x10(%ebx),%edx 10cac7: 66 89 55 d4 mov %dx,-0x2c(%ebp) 10cacb: 0f b7 7b 14 movzwl 0x14(%ebx),%edi 10cacf: 89 45 cc mov %eax,-0x34(%ebp) 10cad2: 31 d2 xor %edx,%edx 10cad4: 31 f6 xor %esi,%esi 10cad6: e9 c1 fd ff ff jmp 10c89c <_Objects_Extend_information+0x68> <== ALWAYS TAKEN block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { 10cadb: 0f b7 ff movzwl %di,%edi <== NOT EXECUTED 10cade: 8b 45 d0 mov -0x30(%ebp),%eax <== NOT EXECUTED 10cae1: 89 45 cc mov %eax,-0x34(%ebp) <== NOT EXECUTED 10cae4: 31 d2 xor %edx,%edx <== NOT EXECUTED 10cae6: e9 b1 fd ff ff jmp 10c89c <_Objects_Extend_information+0x68> <== NOT EXECUTED if ( information->object_blocks[ block ] == NULL ) 10caeb: 0f b7 ff movzwl %di,%edi <== NOT EXECUTED 10caee: 8b 4d d0 mov -0x30(%ebp),%ecx <== NOT EXECUTED 10caf1: 89 4d cc mov %ecx,-0x34(%ebp) <== NOT EXECUTED 10caf4: 31 d2 xor %edx,%edx <== NOT EXECUTED 10caf6: e9 a1 fd ff ff jmp 10c89c <_Objects_Extend_information+0x68> <== NOT EXECUTED (sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) + ((maximum + minimum_index) * sizeof(Objects_Control *)); object_blocks = (void**) _Workspace_Allocate( block_size ); if ( !object_blocks ) { _Workspace_Free( new_object_block ); 10cafb: 83 ec 0c sub $0xc,%esp 10cafe: ff 75 c4 pushl -0x3c(%ebp) 10cb01: e8 52 1b 00 00 call 10e658 <_Workspace_Free> return; 10cb06: 83 c4 10 add $0x10,%esp 10cb09: e9 53 ff ff ff jmp 10ca61 <_Objects_Extend_information+0x22d> <== ALWAYS TAKEN 0010cb10 <_Objects_Free>: void _Objects_Free( Objects_Information *information, Objects_Control *the_object ) { 10cb10: 55 push %ebp 10cb11: 89 e5 mov %esp,%ebp 10cb13: 57 push %edi 10cb14: 56 push %esi 10cb15: 53 push %ebx 10cb16: 83 ec 14 sub $0x14,%esp 10cb19: 8b 5d 08 mov 0x8(%ebp),%ebx 10cb1c: 8b 75 0c mov 0xc(%ebp),%esi uint32_t allocation_size = information->allocation_size; 10cb1f: 8b 7b 14 mov 0x14(%ebx),%edi _Chain_Append( &information->Inactive, &the_object->Node ); 10cb22: 56 push %esi 10cb23: 8d 43 20 lea 0x20(%ebx),%eax 10cb26: 50 push %eax 10cb27: e8 4c f3 ff ff call 10be78 <_Chain_Append> <== ALWAYS TAKEN if ( information->auto_extend ) { 10cb2c: 83 c4 10 add $0x10,%esp 10cb2f: 80 7b 12 00 cmpb $0x0,0x12(%ebx) 10cb33: 74 33 je 10cb68 <_Objects_Free+0x58> void _Objects_Free( Objects_Information *information, Objects_Control *the_object ) { uint32_t allocation_size = information->allocation_size; 10cb35: 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 ) - 10cb38: 0f b7 46 08 movzwl 0x8(%esi),%eax 10cb3c: 0f b7 53 08 movzwl 0x8(%ebx),%edx 10cb40: 29 d0 sub %edx,%eax _Objects_Get_index( information->minimum_id )); block /= information->allocation_size; information->inactive_per_block[ block ]++; 10cb42: 0f b7 73 14 movzwl 0x14(%ebx),%esi 10cb46: 31 d2 xor %edx,%edx 10cb48: f7 f6 div %esi 10cb4a: c1 e0 02 shl $0x2,%eax 10cb4d: 03 43 30 add 0x30(%ebx),%eax 10cb50: ff 00 incl (%eax) information->inactive++; 10cb52: 8b 43 2c mov 0x2c(%ebx),%eax 10cb55: 40 inc %eax 10cb56: 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 ) ) ) { 10cb5a: 0f b7 c0 movzwl %ax,%eax 10cb5d: 89 ca mov %ecx,%edx 10cb5f: d1 ea shr %edx 10cb61: 8d 0c 0a lea (%edx,%ecx,1),%ecx 10cb64: 39 c8 cmp %ecx,%eax 10cb66: 77 08 ja 10cb70 <_Objects_Free+0x60> _Objects_Shrink_information( information ); } } } 10cb68: 8d 65 f4 lea -0xc(%ebp),%esp 10cb6b: 5b pop %ebx 10cb6c: 5e pop %esi 10cb6d: 5f pop %edi 10cb6e: c9 leave 10cb6f: c3 ret * 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 ); 10cb70: 89 5d 08 mov %ebx,0x8(%ebp) } } } 10cb73: 8d 65 f4 lea -0xc(%ebp),%esp 10cb76: 5b pop %ebx 10cb77: 5e pop %esi 10cb78: 5f pop %edi 10cb79: 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 ); 10cb7a: e9 bd 02 00 00 jmp 10ce3c <_Objects_Shrink_information> <== ALWAYS TAKEN 0010cc40 <_Objects_Get>: Objects_Control *_Objects_Get( Objects_Information *information, Objects_Id id, Objects_Locations *location ) { 10cc40: 55 push %ebp 10cc41: 89 e5 mov %esp,%ebp 10cc43: 53 push %ebx 10cc44: 83 ec 14 sub $0x14,%esp 10cc47: 8b 55 08 mov 0x8(%ebp),%edx 10cc4a: 8b 5d 10 mov 0x10(%ebp),%ebx * always NULL. * * If the Id is valid but the object has not been created yet, then * the local_table entry will be NULL. */ index = id - information->minimum_id + 1; 10cc4d: b8 01 00 00 00 mov $0x1,%eax 10cc52: 2b 42 08 sub 0x8(%edx),%eax 10cc55: 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 ) { 10cc58: 0f b7 4a 10 movzwl 0x10(%edx),%ecx 10cc5c: 39 c8 cmp %ecx,%eax 10cc5e: 77 24 ja 10cc84 <_Objects_Get+0x44> 10cc60: 8b 0d d8 73 12 00 mov 0x1273d8,%ecx 10cc66: 41 inc %ecx 10cc67: 89 0d d8 73 12 00 mov %ecx,0x1273d8 _Thread_Disable_dispatch(); if ( (the_object = information->local_table[ index ]) != NULL ) { 10cc6d: 8b 52 1c mov 0x1c(%edx),%edx 10cc70: 8b 04 82 mov (%edx,%eax,4),%eax 10cc73: 85 c0 test %eax,%eax 10cc75: 74 1b je 10cc92 <_Objects_Get+0x52> *location = OBJECTS_LOCAL; 10cc77: c7 03 00 00 00 00 movl $0x0,(%ebx) _Objects_MP_Is_remote( information, id, location, &the_object ); return the_object; #else return NULL; #endif } 10cc7d: 83 c4 14 add $0x14,%esp 10cc80: 5b pop %ebx 10cc81: c9 leave 10cc82: c3 ret 10cc83: 90 nop <== NOT EXECUTED /* * Object Id is not within this API and Class on this node. So * it may be global in a multiprocessing system. But it is clearly * invalid on a single processor system. */ *location = OBJECTS_ERROR; 10cc84: c7 03 01 00 00 00 movl $0x1,(%ebx) 10cc8a: 31 c0 xor %eax,%eax _Objects_MP_Is_remote( information, id, location, &the_object ); return the_object; #else return NULL; #endif } 10cc8c: 83 c4 14 add $0x14,%esp 10cc8f: 5b pop %ebx 10cc90: c9 leave 10cc91: c3 ret /* * Valid Id for this API, Class and Node but the object has not * been allocated yet. */ _Thread_Enable_dispatch(); 10cc92: 89 45 f4 mov %eax,-0xc(%ebp) 10cc95: e8 1a 08 00 00 call 10d4b4 <_Thread_Enable_dispatch> <== ALWAYS TAKEN *location = OBJECTS_ERROR; 10cc9a: c7 03 01 00 00 00 movl $0x1,(%ebx) return NULL; 10cca0: 8b 45 f4 mov -0xc(%ebp),%eax 10cca3: eb d8 jmp 10cc7d <_Objects_Get+0x3d> <== ALWAYS TAKEN 0010cba0 <_Objects_Get_information>: Objects_Information *_Objects_Get_information( Objects_APIs the_api, uint32_t the_class ) { 10cba0: 55 push %ebp 10cba1: 89 e5 mov %esp,%ebp 10cba3: 56 push %esi 10cba4: 53 push %ebx 10cba5: 8b 75 08 mov 0x8(%ebp),%esi 10cba8: 8b 5d 0c mov 0xc(%ebp),%ebx Objects_Information *info; int the_class_api_maximum; if ( !the_class ) 10cbab: 85 db test %ebx,%ebx 10cbad: 75 09 jne 10cbb8 <_Objects_Get_information+0x18> * 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 ) 10cbaf: 31 c0 xor %eax,%eax return NULL; #endif return info; } 10cbb1: 8d 65 f8 lea -0x8(%ebp),%esp 10cbb4: 5b pop %ebx 10cbb5: 5e pop %esi 10cbb6: c9 leave 10cbb7: c3 ret /* * This call implicitly validates the_api so we do not call * _Objects_Is_api_valid above here. */ the_class_api_maximum = _Objects_API_maximum_class( the_api ); 10cbb8: 83 ec 0c sub $0xc,%esp 10cbbb: 56 push %esi 10cbbc: e8 af 43 00 00 call 110f70 <_Objects_API_maximum_class> <== ALWAYS TAKEN if ( the_class_api_maximum == 0 ) 10cbc1: 83 c4 10 add $0x10,%esp 10cbc4: 85 c0 test %eax,%eax 10cbc6: 74 e7 je 10cbaf <_Objects_Get_information+0xf> return NULL; if ( the_class > (uint32_t) the_class_api_maximum ) 10cbc8: 39 c3 cmp %eax,%ebx 10cbca: 77 e3 ja 10cbaf <_Objects_Get_information+0xf> return NULL; if ( !_Objects_Information_table[ the_api ] ) 10cbcc: 8b 04 b5 ac 73 12 00 mov 0x1273ac(,%esi,4),%eax 10cbd3: 85 c0 test %eax,%eax 10cbd5: 74 d8 je 10cbaf <_Objects_Get_information+0xf> <== ALWAYS TAKEN return NULL; info = _Objects_Information_table[ the_api ][ the_class ]; 10cbd7: 8b 04 98 mov (%eax,%ebx,4),%eax if ( !info ) 10cbda: 85 c0 test %eax,%eax 10cbdc: 74 d3 je 10cbb1 <_Objects_Get_information+0x11> <== 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 ) 10cbde: 66 83 78 10 00 cmpw $0x0,0x10(%eax) 10cbe3: 75 cc jne 10cbb1 <_Objects_Get_information+0x11> 10cbe5: eb c8 jmp 10cbaf <_Objects_Get_information+0xf> <== ALWAYS TAKEN 0010cb80 <_Objects_Get_information_id>: #include Objects_Information *_Objects_Get_information_id( Objects_Id id ) { 10cb80: 55 push %ebp 10cb81: 89 e5 mov %esp,%ebp 10cb83: 83 ec 10 sub $0x10,%esp 10cb86: 8b 45 08 mov 0x8(%ebp),%eax return _Objects_Get_information( 10cb89: 89 c2 mov %eax,%edx 10cb8b: c1 ea 1b shr $0x1b,%edx 10cb8e: 52 push %edx 10cb8f: c1 e8 18 shr $0x18,%eax 10cb92: 83 e0 07 and $0x7,%eax 10cb95: 50 push %eax 10cb96: e8 05 00 00 00 call 10cba0 <_Objects_Get_information> <== ALWAYS TAKEN _Objects_Get_API( id ), _Objects_Get_class( id ) ); } 10cb9b: c9 leave 10cb9c: c3 ret 0010cbe8 <_Objects_Get_isr_disable>: Objects_Information *information, Objects_Id id, Objects_Locations *location, ISR_Level *level_p ) { 10cbe8: 55 push %ebp 10cbe9: 89 e5 mov %esp,%ebp 10cbeb: 56 push %esi 10cbec: 53 push %ebx 10cbed: 8b 55 08 mov 0x8(%ebp),%edx 10cbf0: 8b 5d 10 mov 0x10(%ebp),%ebx Objects_Control *the_object; uint32_t index; ISR_Level level; index = id - information->minimum_id + 1; 10cbf3: b8 01 00 00 00 mov $0x1,%eax 10cbf8: 2b 42 08 sub 0x8(%edx),%eax 10cbfb: 03 45 0c add 0xc(%ebp),%eax _ISR_Disable( level ); 10cbfe: 9c pushf 10cbff: fa cli 10cc00: 5e pop %esi if ( information->maximum >= index ) { 10cc01: 0f b7 4a 10 movzwl 0x10(%edx),%ecx 10cc05: 39 c8 cmp %ecx,%eax 10cc07: 77 1b ja 10cc24 <_Objects_Get_isr_disable+0x3c> if ( (the_object = information->local_table[ index ]) != NULL ) { 10cc09: 8b 52 1c mov 0x1c(%edx),%edx 10cc0c: 8b 04 82 mov (%edx,%eax,4),%eax 10cc0f: 85 c0 test %eax,%eax 10cc11: 74 21 je 10cc34 <_Objects_Get_isr_disable+0x4c> *location = OBJECTS_LOCAL; 10cc13: c7 03 00 00 00 00 movl $0x0,(%ebx) *level_p = level; 10cc19: 8b 55 14 mov 0x14(%ebp),%edx 10cc1c: 89 32 mov %esi,(%edx) _Objects_MP_Is_remote( information, id, location, &the_object ); return the_object; #else return NULL; #endif } 10cc1e: 5b pop %ebx 10cc1f: 5e pop %esi 10cc20: c9 leave 10cc21: c3 ret 10cc22: 66 90 xchg %ax,%ax <== NOT EXECUTED } _ISR_Enable( level ); *location = OBJECTS_ERROR; return NULL; } _ISR_Enable( level ); 10cc24: 56 push %esi 10cc25: 9d popf *location = OBJECTS_ERROR; 10cc26: c7 03 01 00 00 00 movl $0x1,(%ebx) 10cc2c: 31 c0 xor %eax,%eax _Objects_MP_Is_remote( information, id, location, &the_object ); return the_object; #else return NULL; #endif } 10cc2e: 5b pop %ebx 10cc2f: 5e pop %esi 10cc30: c9 leave 10cc31: c3 ret 10cc32: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( (the_object = information->local_table[ index ]) != NULL ) { *location = OBJECTS_LOCAL; *level_p = level; return the_object; } _ISR_Enable( level ); 10cc34: 56 push %esi 10cc35: 9d popf *location = OBJECTS_ERROR; 10cc36: c7 03 01 00 00 00 movl $0x1,(%ebx) return NULL; 10cc3c: eb e0 jmp 10cc1e <_Objects_Get_isr_disable+0x36> <== ALWAYS TAKEN 00118784 <_Objects_Get_name_as_string>: char *_Objects_Get_name_as_string( Objects_Id id, size_t length, char *name ) { 118784: 55 push %ebp 118785: 89 e5 mov %esp,%ebp 118787: 57 push %edi 118788: 56 push %esi 118789: 53 push %ebx 11878a: 83 ec 2c sub $0x2c,%esp 11878d: 8b 55 08 mov 0x8(%ebp),%edx 118790: 8b 75 0c mov 0xc(%ebp),%esi 118793: 8b 5d 10 mov 0x10(%ebp),%ebx char lname[5]; Objects_Control *the_object; Objects_Locations location; Objects_Id tmpId; if ( length == 0 ) 118796: 85 f6 test %esi,%esi 118798: 75 0e jne 1187a8 <_Objects_Get_name_as_string+0x24> } } *d = '\0'; _Thread_Enable_dispatch(); return name; 11879a: 31 db xor %ebx,%ebx } return NULL; /* unreachable path */ } 11879c: 89 d8 mov %ebx,%eax 11879e: 8d 65 f4 lea -0xc(%ebp),%esp 1187a1: 5b pop %ebx 1187a2: 5e pop %esi 1187a3: 5f pop %edi 1187a4: c9 leave 1187a5: c3 ret 1187a6: 66 90 xchg %ax,%ax <== NOT EXECUTED Objects_Id tmpId; if ( length == 0 ) return NULL; if ( name == NULL ) 1187a8: 85 db test %ebx,%ebx 1187aa: 74 f0 je 11879c <_Objects_Get_name_as_string+0x18> return NULL; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 1187ac: 85 d2 test %edx,%edx 1187ae: 75 08 jne 1187b8 <_Objects_Get_name_as_string+0x34> 1187b0: a1 b8 50 13 00 mov 0x1350b8,%eax 1187b5: 8b 50 08 mov 0x8(%eax),%edx information = _Objects_Get_information_id( tmpId ); 1187b8: 83 ec 0c sub $0xc,%esp 1187bb: 52 push %edx 1187bc: 89 55 cc mov %edx,-0x34(%ebp) 1187bf: e8 bc 90 ff ff call 111880 <_Objects_Get_information_id> <== ALWAYS TAKEN 1187c4: 89 c7 mov %eax,%edi if ( !information ) 1187c6: 83 c4 10 add $0x10,%esp 1187c9: 85 c0 test %eax,%eax 1187cb: 8b 55 cc mov -0x34(%ebp),%edx 1187ce: 74 ca je 11879a <_Objects_Get_name_as_string+0x16> return NULL; the_object = _Objects_Get( information, tmpId, &location ); 1187d0: 51 push %ecx 1187d1: 8d 45 e4 lea -0x1c(%ebp),%eax 1187d4: 50 push %eax 1187d5: 52 push %edx 1187d6: 57 push %edi 1187d7: e8 64 91 ff ff call 111940 <_Objects_Get> <== ALWAYS TAKEN switch ( location ) { 1187dc: 83 c4 10 add $0x10,%esp 1187df: 8b 55 e4 mov -0x1c(%ebp),%edx 1187e2: 85 d2 test %edx,%edx 1187e4: 75 b4 jne 11879a <_Objects_Get_name_as_string+0x16> return NULL; case OBJECTS_LOCAL: #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) { 1187e6: 80 7f 38 00 cmpb $0x0,0x38(%edi) 1187ea: 74 4e je 11883a <_Objects_Get_name_as_string+0xb6> s = the_object->name.name_p; 1187ec: 8b 78 0c mov 0xc(%eax),%edi lname[ 4 ] = '\0'; s = lname; } d = name; if ( s ) { 1187ef: 85 ff test %edi,%edi 1187f1: 74 6e je 118861 <_Objects_Get_name_as_string+0xdd> for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { 1187f3: 4e dec %esi 1187f4: 89 75 d4 mov %esi,-0x2c(%ebp) 1187f7: 74 68 je 118861 <_Objects_Get_name_as_string+0xdd> <== ALWAYS TAKEN 1187f9: 8a 07 mov (%edi),%al 1187fb: 84 c0 test %al,%al 1187fd: 74 62 je 118861 <_Objects_Get_name_as_string+0xdd> 1187ff: 89 d9 mov %ebx,%ecx 118801: 31 d2 xor %edx,%edx 118803: 89 5d d0 mov %ebx,-0x30(%ebp) 118806: eb 07 jmp 11880f <_Objects_Get_name_as_string+0x8b> <== ALWAYS TAKEN 118808: 8a 04 17 mov (%edi,%edx,1),%al 11880b: 84 c0 test %al,%al 11880d: 74 1b je 11882a <_Objects_Get_name_as_string+0xa6> *d = (isprint((unsigned char)*s)) ? *s : '*'; 11880f: 0f b6 d8 movzbl %al,%ebx 118812: 8b 35 f8 25 13 00 mov 0x1325f8,%esi 118818: f6 44 1e 01 97 testb $0x97,0x1(%esi,%ebx,1) 11881d: 75 02 jne 118821 <_Objects_Get_name_as_string+0x9d> 11881f: b0 2a mov $0x2a,%al 118821: 88 01 mov %al,(%ecx) s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { 118823: 42 inc %edx 118824: 41 inc %ecx 118825: 3b 55 d4 cmp -0x2c(%ebp),%edx 118828: 72 de jb 118808 <_Objects_Get_name_as_string+0x84> 11882a: 8b 5d d0 mov -0x30(%ebp),%ebx *d = (isprint((unsigned char)*s)) ? *s : '*'; } } *d = '\0'; 11882d: c6 01 00 movb $0x0,(%ecx) _Thread_Enable_dispatch(); 118830: e8 ef 99 ff ff call 112224 <_Thread_Enable_dispatch> <== ALWAYS TAKEN return name; 118835: e9 62 ff ff ff jmp 11879c <_Objects_Get_name_as_string+0x18> <== 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; 11883a: 8b 40 0c mov 0xc(%eax),%eax lname[ 0 ] = (u32_name >> 24) & 0xff; 11883d: 89 c2 mov %eax,%edx 11883f: c1 ea 18 shr $0x18,%edx 118842: 88 55 df mov %dl,-0x21(%ebp) lname[ 1 ] = (u32_name >> 16) & 0xff; 118845: 89 c2 mov %eax,%edx 118847: c1 ea 10 shr $0x10,%edx 11884a: 88 55 e0 mov %dl,-0x20(%ebp) lname[ 2 ] = (u32_name >> 8) & 0xff; 11884d: 89 c2 mov %eax,%edx 11884f: c1 ea 08 shr $0x8,%edx 118852: 88 55 e1 mov %dl,-0x1f(%ebp) lname[ 3 ] = (u32_name >> 0) & 0xff; 118855: 88 45 e2 mov %al,-0x1e(%ebp) lname[ 4 ] = '\0'; 118858: c6 45 e3 00 movb $0x0,-0x1d(%ebp) 11885c: 8d 7d df lea -0x21(%ebp),%edi 11885f: eb 92 jmp 1187f3 <_Objects_Get_name_as_string+0x6f> <== ALWAYS TAKEN s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { 118861: 89 d9 mov %ebx,%ecx 118863: eb c8 jmp 11882d <_Objects_Get_name_as_string+0xa9> <== ALWAYS TAKEN 0011b314 <_Objects_Get_next>: Objects_Information *information, Objects_Id id, Objects_Locations *location_p, Objects_Id *next_id_p ) { 11b314: 55 push %ebp 11b315: 89 e5 mov %esp,%ebp 11b317: 57 push %edi 11b318: 56 push %esi 11b319: 53 push %ebx 11b31a: 83 ec 0c sub $0xc,%esp 11b31d: 8b 5d 08 mov 0x8(%ebp),%ebx 11b320: 8b 75 0c mov 0xc(%ebp),%esi 11b323: 8b 7d 10 mov 0x10(%ebp),%edi Objects_Control *object; Objects_Id next_id; if ( !information ) 11b326: 85 db test %ebx,%ebx 11b328: 75 0a jne 11b334 <_Objects_Get_next+0x20> *next_id_p = next_id; return object; final: *next_id_p = OBJECTS_ID_FINAL; return 0; 11b32a: 31 c0 xor %eax,%eax } 11b32c: 8d 65 f4 lea -0xc(%ebp),%esp 11b32f: 5b pop %ebx 11b330: 5e pop %esi 11b331: 5f pop %edi 11b332: c9 leave 11b333: c3 ret Objects_Id next_id; if ( !information ) return NULL; if ( !location_p ) 11b334: 85 ff test %edi,%edi 11b336: 74 f2 je 11b32a <_Objects_Get_next+0x16> return NULL; if ( !next_id_p ) 11b338: 8b 45 14 mov 0x14(%ebp),%eax 11b33b: 85 c0 test %eax,%eax 11b33d: 74 eb je 11b32a <_Objects_Get_next+0x16> return NULL; if (_Objects_Get_index(id) == OBJECTS_ID_INITIAL_INDEX) 11b33f: 66 85 f6 test %si,%si 11b342: 75 04 jne 11b348 <_Objects_Get_next+0x34> next_id = information->minimum_id; 11b344: 8b 73 08 mov 0x8(%ebx),%esi 11b347: 90 nop else next_id = id; do { /* walked off end of list? */ if (_Objects_Get_index(next_id) > information->maximum) 11b348: 66 39 73 10 cmp %si,0x10(%ebx) 11b34c: 72 22 jb 11b370 <_Objects_Get_next+0x5c> *location_p = OBJECTS_ERROR; goto final; } /* try to grab one */ object = _Objects_Get(information, next_id, location_p); 11b34e: 51 push %ecx 11b34f: 57 push %edi 11b350: 56 push %esi 11b351: 53 push %ebx 11b352: e8 e9 65 ff ff call 111940 <_Objects_Get> <== ALWAYS TAKEN next_id++; 11b357: 46 inc %esi } while (*location_p != OBJECTS_LOCAL); 11b358: 83 c4 10 add $0x10,%esp 11b35b: 8b 17 mov (%edi),%edx 11b35d: 85 d2 test %edx,%edx 11b35f: 75 e7 jne 11b348 <_Objects_Get_next+0x34> *next_id_p = next_id; 11b361: 8b 55 14 mov 0x14(%ebp),%edx 11b364: 89 32 mov %esi,(%edx) return object; final: *next_id_p = OBJECTS_ID_FINAL; return 0; } 11b366: 8d 65 f4 lea -0xc(%ebp),%esp 11b369: 5b pop %ebx 11b36a: 5e pop %esi 11b36b: 5f pop %edi 11b36c: c9 leave 11b36d: c3 ret 11b36e: 66 90 xchg %ax,%ax <== NOT EXECUTED do { /* walked off end of list? */ if (_Objects_Get_index(next_id) > information->maximum) { *location_p = OBJECTS_ERROR; 11b370: c7 07 01 00 00 00 movl $0x1,(%edi) *next_id_p = next_id; return object; final: *next_id_p = OBJECTS_ID_FINAL; 11b376: 8b 45 14 mov 0x14(%ebp),%eax 11b379: c7 00 ff ff ff ff movl $0xffffffff,(%eax) 11b37f: 31 c0 xor %eax,%eax return 0; 11b381: eb a9 jmp 11b32c <_Objects_Get_next+0x18> <== ALWAYS TAKEN 0011ac1c <_Objects_Get_no_protection>: Objects_Control *_Objects_Get_no_protection( Objects_Information *information, Objects_Id id, Objects_Locations *location ) { 11ac1c: 55 push %ebp 11ac1d: 89 e5 mov %esp,%ebp 11ac1f: 53 push %ebx 11ac20: 8b 55 08 mov 0x8(%ebp),%edx 11ac23: 8b 5d 10 mov 0x10(%ebp),%ebx /* * You can't just extract the index portion or you can get tricked * by a value between 1 and maximum. */ index = id - information->minimum_id + 1; 11ac26: b8 01 00 00 00 mov $0x1,%eax 11ac2b: 2b 42 08 sub 0x8(%edx),%eax 11ac2e: 03 45 0c add 0xc(%ebp),%eax if ( information->maximum >= index ) { 11ac31: 0f b7 4a 10 movzwl 0x10(%edx),%ecx 11ac35: 39 c8 cmp %ecx,%eax 11ac37: 77 13 ja 11ac4c <_Objects_Get_no_protection+0x30> if ( (the_object = information->local_table[ index ]) != NULL ) { 11ac39: 8b 52 1c mov 0x1c(%edx),%edx 11ac3c: 8b 04 82 mov (%edx,%eax,4),%eax 11ac3f: 85 c0 test %eax,%eax 11ac41: 74 09 je 11ac4c <_Objects_Get_no_protection+0x30> <== ALWAYS TAKEN *location = OBJECTS_LOCAL; 11ac43: c7 03 00 00 00 00 movl $0x0,(%ebx) * This isn't supported or required yet for Global objects so * if it isn't local, we don't find it. */ *location = OBJECTS_ERROR; return NULL; } 11ac49: 5b pop %ebx 11ac4a: c9 leave 11ac4b: c3 ret /* * This isn't supported or required yet for Global objects so * if it isn't local, we don't find it. */ *location = OBJECTS_ERROR; 11ac4c: c7 03 01 00 00 00 movl $0x1,(%ebx) 11ac52: 31 c0 xor %eax,%eax return NULL; } 11ac54: 5b pop %ebx 11ac55: c9 leave 11ac56: c3 ret 001119a8 <_Objects_Id_to_name>: */ Objects_Name_or_id_lookup_errors _Objects_Id_to_name ( Objects_Id id, Objects_Name *name ) { 1119a8: 55 push %ebp 1119a9: 89 e5 mov %esp,%ebp 1119ab: 83 ec 18 sub $0x18,%esp 1119ae: 8b 55 08 mov 0x8(%ebp),%edx /* * Caller is trusted for name != NULL. */ tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 1119b1: 85 d2 test %edx,%edx 1119b3: 75 08 jne 1119bd <_Objects_Id_to_name+0x15> 1119b5: a1 b8 50 13 00 mov 0x1350b8,%eax 1119ba: 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); 1119bd: 89 d0 mov %edx,%eax 1119bf: c1 e8 18 shr $0x18,%eax 1119c2: 83 e0 07 and $0x7,%eax */ RTEMS_INLINE_ROUTINE bool _Objects_Is_api_valid( uint32_t the_api ) { if ( !the_api || the_api > OBJECTS_APIS_LAST ) 1119c5: 8d 48 ff lea -0x1(%eax),%ecx 1119c8: 83 f9 03 cmp $0x3,%ecx 1119cb: 77 1d ja 1119ea <_Objects_Id_to_name+0x42> the_api = _Objects_Get_API( tmpId ); if ( !_Objects_Is_api_valid( the_api ) ) return OBJECTS_INVALID_ID; if ( !_Objects_Information_table[ the_api ] ) 1119cd: 8b 04 85 cc 4f 13 00 mov 0x134fcc(,%eax,4),%eax 1119d4: 85 c0 test %eax,%eax 1119d6: 74 12 je 1119ea <_Objects_Id_to_name+0x42> return OBJECTS_INVALID_ID; the_class = _Objects_Get_class( tmpId ); information = _Objects_Information_table[ the_api ][ the_class ]; 1119d8: 89 d1 mov %edx,%ecx 1119da: c1 e9 1b shr $0x1b,%ecx 1119dd: 8b 04 88 mov (%eax,%ecx,4),%eax if ( !information ) 1119e0: 85 c0 test %eax,%eax 1119e2: 74 06 je 1119ea <_Objects_Id_to_name+0x42> <== ALWAYS TAKEN return OBJECTS_INVALID_ID; #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) 1119e4: 80 78 38 00 cmpb $0x0,0x38(%eax) 1119e8: 74 0a je 1119f4 <_Objects_Id_to_name+0x4c> <== NEVER TAKEN if ( !the_object ) return OBJECTS_INVALID_ID; *name = the_object->name; _Thread_Enable_dispatch(); return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; 1119ea: b8 03 00 00 00 mov $0x3,%eax } 1119ef: c9 leave 1119f0: c3 ret 1119f1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) return OBJECTS_INVALID_ID; #endif the_object = _Objects_Get( information, tmpId, &ignored_location ); 1119f4: 51 push %ecx 1119f5: 8d 4d f4 lea -0xc(%ebp),%ecx 1119f8: 51 push %ecx 1119f9: 52 push %edx 1119fa: 50 push %eax 1119fb: e8 40 ff ff ff call 111940 <_Objects_Get> <== ALWAYS TAKEN if ( !the_object ) 111a00: 83 c4 10 add $0x10,%esp 111a03: 85 c0 test %eax,%eax 111a05: 74 e3 je 1119ea <_Objects_Id_to_name+0x42> return OBJECTS_INVALID_ID; *name = the_object->name; 111a07: 8b 50 0c mov 0xc(%eax),%edx 111a0a: 8b 45 0c mov 0xc(%ebp),%eax 111a0d: 89 10 mov %edx,(%eax) _Thread_Enable_dispatch(); 111a0f: e8 10 08 00 00 call 112224 <_Thread_Enable_dispatch> 111a14: 31 c0 xor %eax,%eax return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; } 111a16: c9 leave 111a17: c3 ret 0010cca8 <_Objects_Initialize_information>: , bool supports_global, Objects_Thread_queue_Extract_callout extract #endif ) { 10cca8: 55 push %ebp 10cca9: 89 e5 mov %esp,%ebp 10ccab: 57 push %edi 10ccac: 56 push %esi 10ccad: 53 push %ebx 10ccae: 83 ec 0c sub $0xc,%esp 10ccb1: 8b 45 08 mov 0x8(%ebp),%eax 10ccb4: 8b 55 0c mov 0xc(%ebp),%edx 10ccb7: 8b 5d 10 mov 0x10(%ebp),%ebx 10ccba: 8b 75 20 mov 0x20(%ebp),%esi 10ccbd: 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; 10ccc1: 89 10 mov %edx,(%eax) information->the_class = the_class; 10ccc3: 66 89 58 04 mov %bx,0x4(%eax) information->size = size; 10ccc7: 89 78 18 mov %edi,0x18(%eax) information->local_table = 0; 10ccca: c7 40 1c 00 00 00 00 movl $0x0,0x1c(%eax) information->inactive_per_block = 0; 10ccd1: c7 40 30 00 00 00 00 movl $0x0,0x30(%eax) information->object_blocks = 0; 10ccd8: c7 40 34 00 00 00 00 movl $0x0,0x34(%eax) information->inactive = 0; 10ccdf: 66 c7 40 2c 00 00 movw $0x0,0x2c(%eax) #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) information->is_string = is_string; 10cce5: 8b 7d 1c mov 0x1c(%ebp),%edi 10cce8: 89 f9 mov %edi,%ecx 10ccea: 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; 10cced: 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; 10ccf3: 8b 3c 95 ac 73 12 00 mov 0x1273ac(,%edx,4),%edi 10ccfa: 89 04 9f mov %eax,(%edi,%ebx,4) /* * Are we operating in limited or unlimited (e.g. auto-extend) mode. */ information->auto_extend = (maximum & OBJECTS_UNLIMITED_OBJECTS) ? true : false; 10ccfd: 8b 7d 14 mov 0x14(%ebp),%edi 10cd00: 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 = 10cd03: 89 f9 mov %edi,%ecx 10cd05: 88 48 12 mov %cl,0x12(%eax) (maximum & OBJECTS_UNLIMITED_OBJECTS) ? true : false; maximum_per_allocation = maximum & ~OBJECTS_UNLIMITED_OBJECTS; 10cd08: 8b 4d 14 mov 0x14(%ebp),%ecx 10cd0b: 81 e1 ff ff ff 7f and $0x7fffffff,%ecx /* * Unlimited and maximum of zero is illogical. */ if ( information->auto_extend && maximum_per_allocation == 0) { 10cd11: 85 ff test %edi,%edi 10cd13: 74 04 je 10cd19 <_Objects_Initialize_information+0x71> 10cd15: 85 c9 test %ecx,%ecx 10cd17: 74 6a je 10cd83 <_Objects_Initialize_information+0xdb> } /* * The allocation unit is the maximum value */ information->allocation_size = maximum_per_allocation; 10cd19: 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; 10cd1d: c7 40 1c 04 70 12 00 movl $0x127004,0x1c(%eax) /* * Calculate minimum and maximum Id's */ minimum_index = (maximum_per_allocation == 0) ? 0 : 1; information->minimum_id = 10cd24: c1 e2 18 shl $0x18,%edx 10cd27: 81 ca 00 00 01 00 or $0x10000,%edx 10cd2d: c1 e3 1b shl $0x1b,%ebx 10cd30: 09 da or %ebx,%edx 10cd32: 31 db xor %ebx,%ebx 10cd34: 85 c9 test %ecx,%ecx 10cd36: 0f 95 c3 setne %bl 10cd39: 09 da or %ebx,%edx 10cd3b: 89 50 08 mov %edx,0x8(%eax) /* * Calculate the maximum name length */ name_length = maximum_name_length; if ( name_length & (OBJECTS_NAME_ALIGNMENT-1) ) 10cd3e: f7 c6 03 00 00 00 test $0x3,%esi 10cd44: 75 26 jne 10cd6c <_Objects_Initialize_information+0xc4> name_length = (name_length + OBJECTS_NAME_ALIGNMENT) & ~(OBJECTS_NAME_ALIGNMENT-1); information->name_length = name_length; 10cd46: 66 89 70 3a mov %si,0x3a(%eax) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 10cd4a: 8d 50 24 lea 0x24(%eax),%edx 10cd4d: 89 50 20 mov %edx,0x20(%eax) the_chain->permanent_null = NULL; 10cd50: c7 40 24 00 00 00 00 movl $0x0,0x24(%eax) the_chain->last = _Chain_Head(the_chain); 10cd57: 8d 50 20 lea 0x20(%eax),%edx 10cd5a: 89 50 28 mov %edx,0x28(%eax) _Chain_Initialize_empty( &information->Inactive ); /* * Initialize objects .. if there are any */ if ( maximum_per_allocation ) { 10cd5d: 85 c9 test %ecx,%ecx 10cd5f: 75 13 jne 10cd74 <_Objects_Initialize_information+0xcc> _Chain_Initialize_empty( &information->global_table[ index ] ); } else information->global_table = NULL; #endif } 10cd61: 8d 65 f4 lea -0xc(%ebp),%esp 10cd64: 5b pop %ebx 10cd65: 5e pop %esi 10cd66: 5f pop %edi 10cd67: c9 leave 10cd68: c3 ret 10cd69: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED * Calculate the maximum name length */ name_length = maximum_name_length; if ( name_length & (OBJECTS_NAME_ALIGNMENT-1) ) name_length = (name_length + OBJECTS_NAME_ALIGNMENT) & 10cd6c: 83 c6 04 add $0x4,%esi 10cd6f: 83 e6 fc and $0xfffffffc,%esi 10cd72: eb d2 jmp 10cd46 <_Objects_Initialize_information+0x9e> <== ALWAYS TAKEN /* * 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 ); 10cd74: 89 45 08 mov %eax,0x8(%ebp) _Chain_Initialize_empty( &information->global_table[ index ] ); } else information->global_table = NULL; #endif } 10cd77: 8d 65 f4 lea -0xc(%ebp),%esp 10cd7a: 5b pop %ebx 10cd7b: 5e pop %esi 10cd7c: 5f pop %edi 10cd7d: 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 ); 10cd7e: e9 b1 fa ff ff jmp 10c834 <_Objects_Extend_information> <== ALWAYS TAKEN /* * Unlimited and maximum of zero is illogical. */ if ( information->auto_extend && maximum_per_allocation == 0) { _Internal_error_Occurred( 10cd83: 50 push %eax 10cd84: 6a 14 push $0x14 10cd86: 6a 01 push $0x1 10cd88: 6a 00 push $0x0 10cd8a: e8 69 f9 ff ff call 10c6f8 <_Internal_error_Occurred> <== ALWAYS TAKEN 00117088 <_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 ) { 117088: 55 push %ebp 117089: 89 e5 mov %esp,%ebp 11708b: 57 push %edi 11708c: 56 push %esi 11708d: 53 push %ebx 11708e: 83 ec 1c sub $0x1c,%esp 117091: 8b 7d 08 mov 0x8(%ebp),%edi uint32_t index; uint32_t name_length; /* ASSERT: information->is_string == true */ if ( !id ) 117094: 8b 5d 10 mov 0x10(%ebp),%ebx 117097: 85 db test %ebx,%ebx 117099: 74 75 je 117110 <_Objects_Name_to_id_string+0x88> return OBJECTS_INVALID_ADDRESS; if ( !name ) 11709b: 8b 4d 0c mov 0xc(%ebp),%ecx 11709e: 85 c9 test %ecx,%ecx 1170a0: 74 4b je 1170ed <_Objects_Name_to_id_string+0x65> return OBJECTS_INVALID_NAME; if ( information->maximum != 0 ) { 1170a2: 8b 47 10 mov 0x10(%edi),%eax 1170a5: 66 85 c0 test %ax,%ax 1170a8: 74 43 je 1170ed <_Objects_Name_to_id_string+0x65> name_length = information->name_length; for ( index = 1; index <= information->maximum; index++ ) { 1170aa: 0f b7 c0 movzwl %ax,%eax 1170ad: 89 45 e4 mov %eax,-0x1c(%ebp) 1170b0: 8b 47 1c mov 0x1c(%edi),%eax 1170b3: bb 01 00 00 00 mov $0x1,%ebx 1170b8: 89 7d e0 mov %edi,-0x20(%ebp) 1170bb: 89 c7 mov %eax,%edi 1170bd: 8d 76 00 lea 0x0(%esi),%esi the_object = information->local_table[ index ]; 1170c0: 8b 34 9f mov (%edi,%ebx,4),%esi if ( !the_object ) 1170c3: 85 f6 test %esi,%esi 1170c5: 74 20 je 1170e7 <_Objects_Name_to_id_string+0x5f> continue; if ( !the_object->name.name_p ) 1170c7: 8b 46 0c mov 0xc(%esi),%eax 1170ca: 85 c0 test %eax,%eax 1170cc: 74 19 je 1170e7 <_Objects_Name_to_id_string+0x5f> continue; if (!strncmp( name, the_object->name.name_p, information->name_length)) { 1170ce: 52 push %edx 1170cf: 8b 4d e0 mov -0x20(%ebp),%ecx 1170d2: 0f b7 51 3a movzwl 0x3a(%ecx),%edx 1170d6: 52 push %edx 1170d7: 50 push %eax 1170d8: ff 75 0c pushl 0xc(%ebp) 1170db: e8 a0 39 00 00 call 11aa80 1170e0: 83 c4 10 add $0x10,%esp 1170e3: 85 c0 test %eax,%eax 1170e5: 74 15 je 1170fc <_Objects_Name_to_id_string+0x74> return OBJECTS_INVALID_NAME; if ( information->maximum != 0 ) { name_length = information->name_length; for ( index = 1; index <= information->maximum; index++ ) { 1170e7: 43 inc %ebx 1170e8: 3b 5d e4 cmp -0x1c(%ebp),%ebx 1170eb: 76 d3 jbe 1170c0 <_Objects_Name_to_id_string+0x38> 1170ed: b8 01 00 00 00 mov $0x1,%eax } } } return OBJECTS_INVALID_NAME; } 1170f2: 8d 65 f4 lea -0xc(%ebp),%esp 1170f5: 5b pop %ebx 1170f6: 5e pop %esi 1170f7: 5f pop %edi 1170f8: c9 leave 1170f9: c3 ret 1170fa: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( !the_object->name.name_p ) continue; if (!strncmp( name, the_object->name.name_p, information->name_length)) { *id = the_object->id; 1170fc: 8b 46 08 mov 0x8(%esi),%eax 1170ff: 8b 55 10 mov 0x10(%ebp),%edx 117102: 89 02 mov %eax,(%edx) 117104: 31 c0 xor %eax,%eax } } } return OBJECTS_INVALID_NAME; } 117106: 8d 65 f4 lea -0xc(%ebp),%esp 117109: 5b pop %ebx 11710a: 5e pop %esi 11710b: 5f pop %edi 11710c: c9 leave 11710d: c3 ret 11710e: 66 90 xchg %ax,%ax <== NOT EXECUTED uint32_t index; uint32_t name_length; /* ASSERT: information->is_string == true */ if ( !id ) 117110: b8 02 00 00 00 mov $0x2,%eax } } } return OBJECTS_INVALID_NAME; } 117115: 8d 65 f4 lea -0xc(%ebp),%esp 117118: 5b pop %ebx 117119: 5e pop %esi 11711a: 5f pop %edi 11711b: c9 leave 11711c: c3 ret 0010cdc4 <_Objects_Name_to_id_u32>: Objects_Information *information, uint32_t name, uint32_t node, Objects_Id *id ) { 10cdc4: 55 push %ebp 10cdc5: 89 e5 mov %esp,%ebp 10cdc7: 57 push %edi 10cdc8: 56 push %esi 10cdc9: 53 push %ebx 10cdca: 8b 45 08 mov 0x8(%ebp),%eax 10cdcd: 8b 4d 0c mov 0xc(%ebp),%ecx 10cdd0: 8b 55 10 mov 0x10(%ebp),%edx 10cdd3: 8b 7d 14 mov 0x14(%ebp),%edi Objects_Name name_for_mp; #endif /* ASSERT: information->is_string == false */ if ( !id ) 10cdd6: 85 ff test %edi,%edi 10cdd8: 74 56 je 10ce30 <_Objects_Name_to_id_u32+0x6c> return OBJECTS_INVALID_ADDRESS; if ( name == 0 ) 10cdda: 85 c9 test %ecx,%ecx 10cddc: 74 08 je 10cde6 <_Objects_Name_to_id_u32+0x22> return OBJECTS_INVALID_NAME; search_local_node = false; if ( information->maximum != 0 && 10cdde: 8b 70 10 mov 0x10(%eax),%esi 10cde1: 66 85 f6 test %si,%si 10cde4: 75 0a jne 10cdf0 <_Objects_Name_to_id_u32+0x2c> search_local_node = true; if ( search_local_node ) { name_length = information->name_length; for ( index = 1; index <= information->maximum; index++ ) { 10cde6: 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 } 10cdeb: 5b pop %ebx 10cdec: 5e pop %esi 10cded: 5f pop %edi 10cdee: c9 leave 10cdef: c3 ret if ( name == 0 ) return OBJECTS_INVALID_NAME; search_local_node = false; if ( information->maximum != 0 && 10cdf0: 85 d2 test %edx,%edx 10cdf2: 75 20 jne 10ce14 <_Objects_Name_to_id_u32+0x50> search_local_node = true; if ( search_local_node ) { name_length = information->name_length; for ( index = 1; index <= information->maximum; index++ ) { 10cdf4: 0f b7 f6 movzwl %si,%esi 10cdf7: 8b 58 1c mov 0x1c(%eax),%ebx 10cdfa: b8 01 00 00 00 mov $0x1,%eax 10cdff: 90 nop the_object = information->local_table[ index ]; 10ce00: 8b 14 83 mov (%ebx,%eax,4),%edx if ( !the_object ) 10ce03: 85 d2 test %edx,%edx 10ce05: 74 05 je 10ce0c <_Objects_Name_to_id_u32+0x48> continue; if ( name == the_object->name.name_u32 ) { 10ce07: 39 4a 0c cmp %ecx,0xc(%edx) 10ce0a: 74 18 je 10ce24 <_Objects_Name_to_id_u32+0x60> search_local_node = true; if ( search_local_node ) { name_length = information->name_length; for ( index = 1; index <= information->maximum; index++ ) { 10ce0c: 40 inc %eax 10ce0d: 39 c6 cmp %eax,%esi 10ce0f: 73 ef jae 10ce00 <_Objects_Name_to_id_u32+0x3c> 10ce11: eb d3 jmp 10cde6 <_Objects_Name_to_id_u32+0x22> <== ALWAYS TAKEN 10ce13: 90 nop <== NOT EXECUTED if ( name == 0 ) return OBJECTS_INVALID_NAME; search_local_node = false; if ( information->maximum != 0 && 10ce14: 81 fa ff ff ff 7f cmp $0x7fffffff,%edx 10ce1a: 74 d8 je 10cdf4 <_Objects_Name_to_id_u32+0x30> 10ce1c: 4a dec %edx 10ce1d: 75 c7 jne 10cde6 <_Objects_Name_to_id_u32+0x22> 10ce1f: eb d3 jmp 10cdf4 <_Objects_Name_to_id_u32+0x30> <== ALWAYS TAKEN 10ce21: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED the_object = information->local_table[ index ]; if ( !the_object ) continue; if ( name == the_object->name.name_u32 ) { *id = the_object->id; 10ce24: 8b 42 08 mov 0x8(%edx),%eax 10ce27: 89 07 mov %eax,(%edi) 10ce29: 31 c0 xor %eax,%eax name_for_mp.name_u32 = name; return _Objects_MP_Global_name_search( information, name_for_mp, node, id ); #else return OBJECTS_INVALID_NAME; #endif } 10ce2b: 5b pop %ebx 10ce2c: 5e pop %esi 10ce2d: 5f pop %edi 10ce2e: c9 leave 10ce2f: c3 ret Objects_Name name_for_mp; #endif /* ASSERT: information->is_string == false */ if ( !id ) 10ce30: b8 02 00 00 00 mov $0x2,%eax name_for_mp.name_u32 = name; return _Objects_MP_Global_name_search( information, name_for_mp, node, id ); #else return OBJECTS_INVALID_NAME; #endif } 10ce35: 5b pop %ebx 10ce36: 5e pop %esi 10ce37: 5f pop %edi 10ce38: c9 leave 10ce39: c3 ret 0010d484 <_Objects_Set_name>: bool _Objects_Set_name( Objects_Information *information, Objects_Control *the_object, const char *name ) { 10d484: 55 push %ebp 10d485: 89 e5 mov %esp,%ebp 10d487: 57 push %edi 10d488: 56 push %esi 10d489: 53 push %ebx 10d48a: 83 ec 14 sub $0x14,%esp 10d48d: 8b 7d 08 mov 0x8(%ebp),%edi 10d490: 8b 5d 10 mov 0x10(%ebp),%ebx size_t length; const char *s; s = name; length = strnlen( name, information->name_length ); 10d493: 0f b7 47 3a movzwl 0x3a(%edi),%eax 10d497: 50 push %eax 10d498: 53 push %ebx 10d499: e8 de 7d 00 00 call 11527c 10d49e: 89 c6 mov %eax,%esi #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) { 10d4a0: 83 c4 10 add $0x10,%esp 10d4a3: 80 7f 38 00 cmpb $0x0,0x38(%edi) 10d4a7: 75 53 jne 10d4fc <_Objects_Set_name+0x78> d[length] = '\0'; the_object->name.name_p = d; } else #endif { the_object->name.name_u32 = _Objects_Build_name( 10d4a9: 0f be 13 movsbl (%ebx),%edx 10d4ac: c1 e2 18 shl $0x18,%edx 10d4af: 83 f8 01 cmp $0x1,%eax 10d4b2: 76 34 jbe 10d4e8 <_Objects_Set_name+0x64> 10d4b4: 0f be 43 01 movsbl 0x1(%ebx),%eax 10d4b8: c1 e0 10 shl $0x10,%eax 10d4bb: 09 d0 or %edx,%eax 10d4bd: 83 fe 02 cmp $0x2,%esi 10d4c0: 74 2d je 10d4ef <_Objects_Set_name+0x6b> 10d4c2: 0f be 53 02 movsbl 0x2(%ebx),%edx 10d4c6: c1 e2 08 shl $0x8,%edx 10d4c9: 09 c2 or %eax,%edx 10d4cb: 83 fe 03 cmp $0x3,%esi 10d4ce: 74 24 je 10d4f4 <_Objects_Set_name+0x70> 10d4d0: 0f be 43 03 movsbl 0x3(%ebx),%eax 10d4d4: 09 c2 or %eax,%edx 10d4d6: 8b 45 0c mov 0xc(%ebp),%eax 10d4d9: 89 50 0c mov %edx,0xc(%eax) 10d4dc: b0 01 mov $0x1,%al ); } return true; } 10d4de: 8d 65 f4 lea -0xc(%ebp),%esp 10d4e1: 5b pop %ebx 10d4e2: 5e pop %esi 10d4e3: 5f pop %edi 10d4e4: c9 leave 10d4e5: c3 ret 10d4e6: 66 90 xchg %ax,%ax <== NOT EXECUTED d[length] = '\0'; the_object->name.name_p = d; } else #endif { the_object->name.name_u32 = _Objects_Build_name( 10d4e8: 89 d0 mov %edx,%eax 10d4ea: 0d 00 00 20 00 or $0x200000,%eax 10d4ef: 89 c2 mov %eax,%edx 10d4f1: 80 ce 20 or $0x20,%dh 10d4f4: b8 20 00 00 00 mov $0x20,%eax 10d4f9: eb d9 jmp 10d4d4 <_Objects_Set_name+0x50> <== ALWAYS TAKEN 10d4fb: 90 nop <== NOT EXECUTED #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) { char *d; d = _Workspace_Allocate( length + 1 ); 10d4fc: 83 ec 0c sub $0xc,%esp 10d4ff: 8d 40 01 lea 0x1(%eax),%eax 10d502: 50 push %eax 10d503: e8 50 18 00 00 call 10ed58 <_Workspace_Allocate> 10d508: 89 c7 mov %eax,%edi if ( !d ) 10d50a: 83 c4 10 add $0x10,%esp 10d50d: 85 c0 test %eax,%eax 10d50f: 74 43 je 10d554 <_Objects_Set_name+0xd0> <== ALWAYS TAKEN return false; if ( the_object->name.name_p ) { 10d511: 8b 55 0c mov 0xc(%ebp),%edx 10d514: 8b 42 0c mov 0xc(%edx),%eax 10d517: 85 c0 test %eax,%eax 10d519: 74 16 je 10d531 <_Objects_Set_name+0xad> _Workspace_Free( (void *)the_object->name.name_p ); 10d51b: 83 ec 0c sub $0xc,%esp 10d51e: 50 push %eax 10d51f: e8 50 18 00 00 call 10ed74 <_Workspace_Free> the_object->name.name_p = NULL; 10d524: 8b 45 0c mov 0xc(%ebp),%eax 10d527: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax) 10d52e: 83 c4 10 add $0x10,%esp } strncpy( d, name, length ); 10d531: 50 push %eax 10d532: 56 push %esi 10d533: 53 push %ebx 10d534: 57 push %edi 10d535: e8 c6 7c 00 00 call 115200 d[length] = '\0'; 10d53a: c6 04 37 00 movb $0x0,(%edi,%esi,1) the_object->name.name_p = d; 10d53e: 8b 55 0c mov 0xc(%ebp),%edx 10d541: 89 7a 0c mov %edi,0xc(%edx) 10d544: b0 01 mov $0x1,%al 10d546: 83 c4 10 add $0x10,%esp ); } return true; } 10d549: 8d 65 f4 lea -0xc(%ebp),%esp 10d54c: 5b pop %ebx 10d54d: 5e pop %esi 10d54e: 5f pop %edi 10d54f: c9 leave 10d550: c3 ret 10d551: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) { char *d; d = _Workspace_Allocate( length + 1 ); if ( !d ) 10d554: 31 c0 xor %eax,%eax <== NOT EXECUTED 10d556: eb 86 jmp 10d4de <_Objects_Set_name+0x5a> <== NOT EXECUTED 0010ce3c <_Objects_Shrink_information>: */ void _Objects_Shrink_information( Objects_Information *information ) { 10ce3c: 55 push %ebp 10ce3d: 89 e5 mov %esp,%ebp 10ce3f: 57 push %edi 10ce40: 56 push %esi 10ce41: 53 push %ebx 10ce42: 83 ec 1c sub $0x1c,%esp /* * Search the list to find block or chunk with all objects inactive. */ index_base = _Objects_Get_index( information->minimum_id ); 10ce45: 8b 45 08 mov 0x8(%ebp),%eax 10ce48: 0f b7 58 08 movzwl 0x8(%eax),%ebx block_count = (information->maximum - index_base) / 10ce4c: 0f b7 48 14 movzwl 0x14(%eax),%ecx 10ce50: 0f b7 40 10 movzwl 0x10(%eax),%eax 10ce54: 29 d8 sub %ebx,%eax 10ce56: 31 d2 xor %edx,%edx 10ce58: f7 f1 div %ecx information->allocation_size; for ( block = 0; block < block_count; block++ ) { 10ce5a: 85 c0 test %eax,%eax 10ce5c: 74 21 je 10ce7f <_Objects_Shrink_information+0x43> <== ALWAYS TAKEN if ( information->inactive_per_block[ block ] == 10ce5e: 8b 55 08 mov 0x8(%ebp),%edx 10ce61: 8b 7a 30 mov 0x30(%edx),%edi 10ce64: 3b 0f cmp (%edi),%ecx 10ce66: 74 1f je 10ce87 <_Objects_Shrink_information+0x4b> <== ALWAYS TAKEN information->object_blocks[ block ] = NULL; information->inactive_per_block[ block ] = 0; information->inactive -= information->allocation_size; return; 10ce68: 31 d2 xor %edx,%edx 10ce6a: eb 0e jmp 10ce7a <_Objects_Shrink_information+0x3e> <== ALWAYS TAKEN } index_base += information->allocation_size; 10ce6c: 01 cb add %ecx,%ebx 10ce6e: 8d 34 95 00 00 00 00 lea 0x0(,%edx,4),%esi index_base = _Objects_Get_index( information->minimum_id ); block_count = (information->maximum - index_base) / information->allocation_size; for ( block = 0; block < block_count; block++ ) { if ( information->inactive_per_block[ block ] == 10ce75: 3b 0c 97 cmp (%edi,%edx,4),%ecx 10ce78: 74 12 je 10ce8c <_Objects_Shrink_information+0x50> index_base = _Objects_Get_index( information->minimum_id ); block_count = (information->maximum - index_base) / information->allocation_size; for ( block = 0; block < block_count; block++ ) { 10ce7a: 42 inc %edx 10ce7b: 39 d0 cmp %edx,%eax 10ce7d: 77 ed ja 10ce6c <_Objects_Shrink_information+0x30> return; } index_base += information->allocation_size; } } 10ce7f: 8d 65 f4 lea -0xc(%ebp),%esp 10ce82: 5b pop %ebx 10ce83: 5e pop %esi 10ce84: 5f pop %edi 10ce85: c9 leave 10ce86: c3 ret index_base = _Objects_Get_index( information->minimum_id ); block_count = (information->maximum - index_base) / information->allocation_size; for ( block = 0; block < block_count; block++ ) { if ( information->inactive_per_block[ block ] == 10ce87: 31 f6 xor %esi,%esi <== NOT EXECUTED 10ce89: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED information->allocation_size ) { /* * Assume the Inactive chain is never empty at this point */ the_object = (Objects_Control *) information->Inactive.first; 10ce8c: 8b 55 08 mov 0x8(%ebp),%edx 10ce8f: 8b 42 20 mov 0x20(%edx),%eax 10ce92: 89 75 e4 mov %esi,-0x1c(%ebp) 10ce95: eb 07 jmp 10ce9e <_Objects_Shrink_information+0x62> <== ALWAYS TAKEN 10ce97: 90 nop <== NOT EXECUTED if ((index >= index_base) && (index < (index_base + information->allocation_size))) { _Chain_Extract( &extract_me->Node ); } } while ( the_object ); 10ce98: 85 ff test %edi,%edi 10ce9a: 74 2c je 10cec8 <_Objects_Shrink_information+0x8c> 10ce9c: 89 f8 mov %edi,%eax * Assume the Inactive chain is never empty at this point */ the_object = (Objects_Control *) information->Inactive.first; do { index = _Objects_Get_index( the_object->id ); 10ce9e: 0f b7 50 08 movzwl 0x8(%eax),%edx /* * Get the next node before the node is extracted */ extract_me = the_object; the_object = (Objects_Control *) the_object->Node.next; 10cea2: 8b 38 mov (%eax),%edi if ((index >= index_base) && 10cea4: 39 da cmp %ebx,%edx 10cea6: 72 f0 jb 10ce98 <_Objects_Shrink_information+0x5c> (index < (index_base + information->allocation_size))) { 10cea8: 8b 75 08 mov 0x8(%ebp),%esi 10ceab: 0f b7 4e 14 movzwl 0x14(%esi),%ecx 10ceaf: 8d 0c 0b lea (%ebx,%ecx,1),%ecx 10ceb2: 39 ca cmp %ecx,%edx 10ceb4: 73 e2 jae 10ce98 <_Objects_Shrink_information+0x5c> _Chain_Extract( &extract_me->Node ); 10ceb6: 83 ec 0c sub $0xc,%esp 10ceb9: 50 push %eax 10ceba: e8 d1 3a 00 00 call 110990 <_Chain_Extract> 10cebf: 83 c4 10 add $0x10,%esp } } while ( the_object ); 10cec2: 85 ff test %edi,%edi 10cec4: 75 d6 jne 10ce9c <_Objects_Shrink_information+0x60> 10cec6: 66 90 xchg %ax,%ax 10cec8: 8b 75 e4 mov -0x1c(%ebp),%esi /* * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); 10cecb: 83 ec 0c sub $0xc,%esp 10cece: 8b 55 08 mov 0x8(%ebp),%edx 10ced1: 8b 42 34 mov 0x34(%edx),%eax 10ced4: ff 34 30 pushl (%eax,%esi,1) 10ced7: e8 7c 17 00 00 call 10e658 <_Workspace_Free> information->object_blocks[ block ] = NULL; 10cedc: 8b 55 08 mov 0x8(%ebp),%edx 10cedf: 8b 42 34 mov 0x34(%edx),%eax 10cee2: c7 04 30 00 00 00 00 movl $0x0,(%eax,%esi,1) information->inactive_per_block[ block ] = 0; 10cee9: 8b 42 30 mov 0x30(%edx),%eax 10ceec: c7 04 30 00 00 00 00 movl $0x0,(%eax,%esi,1) information->inactive -= information->allocation_size; 10cef3: 8b 42 14 mov 0x14(%edx),%eax 10cef6: 66 29 42 2c sub %ax,0x2c(%edx) return; 10cefa: 83 c4 10 add $0x10,%esp } index_base += information->allocation_size; } } 10cefd: 8d 65 f4 lea -0xc(%ebp),%esp 10cf00: 5b pop %ebx 10cf01: 5e pop %esi 10cf02: 5f pop %edi 10cf03: c9 leave 10cf04: c3 ret 0010d428 <_POSIX_Absolute_timeout_to_ticks>: */ POSIX_Absolute_timeout_conversion_results_t _POSIX_Absolute_timeout_to_ticks( const struct timespec *abstime, Watchdog_Interval *ticks_out ) { 10d428: 55 push %ebp 10d429: 89 e5 mov %esp,%ebp 10d42b: 57 push %edi 10d42c: 56 push %esi 10d42d: 53 push %ebx 10d42e: 83 ec 38 sub $0x38,%esp 10d431: 8b 5d 08 mov 0x8(%ebp),%ebx 10d434: 8b 75 0c mov 0xc(%ebp),%esi /* * Make sure there is always a value returned. */ *ticks_out = 0; 10d437: c7 06 00 00 00 00 movl $0x0,(%esi) /* * Is the absolute time even valid? */ if ( !_Timespec_Is_valid(abstime) ) 10d43d: 53 push %ebx 10d43e: e8 f1 3b 00 00 call 111034 <_Timespec_Is_valid> 10d443: 83 c4 10 add $0x10,%esp 10d446: 84 c0 test %al,%al 10d448: 75 0a jne 10d454 <_POSIX_Absolute_timeout_to_ticks+0x2c> 10d44a: 31 c0 xor %eax,%eax /* * This is the case we were expecting and it took this long to * get here. */ return POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE; } 10d44c: 8d 65 f4 lea -0xc(%ebp),%esp 10d44f: 5b pop %ebx 10d450: 5e pop %esi 10d451: 5f pop %edi 10d452: c9 leave 10d453: c3 ret return POSIX_ABSOLUTE_TIMEOUT_INVALID; /* * Is the absolute time in the past? */ _TOD_Get( ¤t_time ); 10d454: 83 ec 0c sub $0xc,%esp 10d457: 8d 7d e0 lea -0x20(%ebp),%edi 10d45a: 57 push %edi 10d45b: e8 04 1d 00 00 call 10f164 <_TOD_Get> if ( _Timespec_Less_than( abstime, ¤t_time ) ) 10d460: 5a pop %edx 10d461: 59 pop %ecx 10d462: 57 push %edi 10d463: 53 push %ebx 10d464: e8 f3 3b 00 00 call 11105c <_Timespec_Less_than> 10d469: 83 c4 10 add $0x10,%esp 10d46c: 84 c0 test %al,%al 10d46e: 74 10 je 10d480 <_POSIX_Absolute_timeout_to_ticks+0x58> 10d470: b8 01 00 00 00 mov $0x1,%eax /* * This is the case we were expecting and it took this long to * get here. */ return POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE; } 10d475: 8d 65 f4 lea -0xc(%ebp),%esp 10d478: 5b pop %ebx 10d479: 5e pop %esi 10d47a: 5f pop %edi 10d47b: c9 leave 10d47c: c3 ret 10d47d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED return POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST; /* * How long until the requested absolute time? */ _Timespec_Subtract( ¤t_time, abstime, &difference ); 10d480: 50 push %eax 10d481: 8d 45 d8 lea -0x28(%ebp),%eax 10d484: 50 push %eax 10d485: 53 push %ebx 10d486: 57 push %edi 10d487: 89 45 d4 mov %eax,-0x2c(%ebp) 10d48a: e8 f1 3b 00 00 call 111080 <_Timespec_Subtract> /* * Internally the SuperCore uses ticks, so convert to them. */ *ticks_out = _Timespec_To_ticks( &difference ); 10d48f: 8b 45 d4 mov -0x2c(%ebp),%eax 10d492: 89 04 24 mov %eax,(%esp) 10d495: e8 22 3c 00 00 call 1110bc <_Timespec_To_ticks> 10d49a: 89 06 mov %eax,(%esi) /* * If the difference was 0, then the future is now. It is so bright * we better wear shades. */ if ( !*ticks_out ) 10d49c: 83 c4 10 add $0x10,%esp 10d49f: 83 f8 01 cmp $0x1,%eax 10d4a2: 19 c0 sbb %eax,%eax 10d4a4: 83 c0 03 add $0x3,%eax /* * This is the case we were expecting and it took this long to * get here. */ return POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE; } 10d4a7: 8d 65 f4 lea -0xc(%ebp),%esp 10d4aa: 5b pop %ebx 10d4ab: 5e pop %esi 10d4ac: 5f pop %edi 10d4ad: c9 leave 10d4ae: c3 ret 0010bf80 <_POSIX_Condition_variables_Get>: POSIX_Condition_variables_Control *_POSIX_Condition_variables_Get ( pthread_cond_t *cond, Objects_Locations *location ) { 10bf80: 55 push %ebp 10bf81: 89 e5 mov %esp,%ebp 10bf83: 56 push %esi 10bf84: 53 push %ebx 10bf85: 8b 5d 08 mov 0x8(%ebp),%ebx 10bf88: 8b 75 0c mov 0xc(%ebp),%esi int status; if ( !cond ) { 10bf8b: 85 db test %ebx,%ebx 10bf8d: 74 39 je 10bfc8 <_POSIX_Condition_variables_Get+0x48> *location = OBJECTS_ERROR; return (POSIX_Condition_variables_Control *) 0; } if ( *cond == PTHREAD_COND_INITIALIZER ) { 10bf8f: 8b 03 mov (%ebx),%eax 10bf91: 83 f8 ff cmp $0xffffffff,%eax 10bf94: 74 1a je 10bfb0 <_POSIX_Condition_variables_Get+0x30> } /* * Now call Objects_Get() */ return (POSIX_Condition_variables_Control *)_Objects_Get( 10bf96: 52 push %edx 10bf97: 56 push %esi 10bf98: 50 push %eax 10bf99: 68 e0 a1 12 00 push $0x12a1e0 10bf9e: e8 d9 2a 00 00 call 10ea7c <_Objects_Get> 10bfa3: 83 c4 10 add $0x10,%esp &_POSIX_Condition_variables_Information, (Objects_Id) *cond, location ); } 10bfa6: 8d 65 f8 lea -0x8(%ebp),%esp 10bfa9: 5b pop %ebx 10bfaa: 5e pop %esi 10bfab: c9 leave 10bfac: c3 ret 10bfad: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if ( *cond == PTHREAD_COND_INITIALIZER ) { /* * Do an "auto-create" here. */ status = pthread_cond_init( cond, 0 ); 10bfb0: 83 ec 08 sub $0x8,%esp 10bfb3: 6a 00 push $0x0 10bfb5: 53 push %ebx 10bfb6: e8 19 00 00 00 call 10bfd4 <== ALWAYS TAKEN if ( status ) { 10bfbb: 83 c4 10 add $0x10,%esp 10bfbe: 85 c0 test %eax,%eax 10bfc0: 75 06 jne 10bfc8 <_POSIX_Condition_variables_Get+0x48> 10bfc2: 8b 03 mov (%ebx),%eax 10bfc4: eb d0 jmp 10bf96 <_POSIX_Condition_variables_Get+0x16> <== ALWAYS TAKEN 10bfc6: 66 90 xchg %ax,%ax <== NOT EXECUTED *location = OBJECTS_ERROR; 10bfc8: c7 06 01 00 00 00 movl $0x1,(%esi) 10bfce: 31 c0 xor %eax,%eax return (POSIX_Condition_variables_Control *) 0; 10bfd0: eb d4 jmp 10bfa6 <_POSIX_Condition_variables_Get+0x26> <== ALWAYS TAKEN 0010c09c <_POSIX_Condition_variables_Signal_support>: int _POSIX_Condition_variables_Signal_support( pthread_cond_t *cond, bool is_broadcast ) { 10c09c: 55 push %ebp 10c09d: 89 e5 mov %esp,%ebp 10c09f: 57 push %edi 10c0a0: 56 push %esi 10c0a1: 53 push %ebx 10c0a2: 83 ec 24 sub $0x24,%esp 10c0a5: 8a 5d 0c mov 0xc(%ebp),%bl register POSIX_Condition_variables_Control *the_cond; Objects_Locations location; Thread_Control *the_thread; the_cond = _POSIX_Condition_variables_Get( cond, &location ); 10c0a8: 8d 45 e4 lea -0x1c(%ebp),%eax 10c0ab: 50 push %eax 10c0ac: ff 75 08 pushl 0x8(%ebp) 10c0af: e8 cc fe ff ff call 10bf80 <_POSIX_Condition_variables_Get> <== ALWAYS TAKEN 10c0b4: 89 c7 mov %eax,%edi switch ( location ) { 10c0b6: 83 c4 10 add $0x10,%esp 10c0b9: 8b 45 e4 mov -0x1c(%ebp),%eax 10c0bc: 85 c0 test %eax,%eax 10c0be: 74 10 je 10c0d0 <_POSIX_Condition_variables_Signal_support+0x34> 10c0c0: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10c0c5: 8d 65 f4 lea -0xc(%ebp),%esp 10c0c8: 5b pop %ebx 10c0c9: 5e pop %esi 10c0ca: 5f pop %edi 10c0cb: c9 leave 10c0cc: c3 ret 10c0cd: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED the_cond = _POSIX_Condition_variables_Get( cond, &location ); switch ( location ) { case OBJECTS_LOCAL: do { the_thread = _Thread_queue_Dequeue( &the_cond->Wait_queue ); 10c0d0: 8d 77 18 lea 0x18(%edi),%esi 10c0d3: eb 0b jmp 10c0e0 <_POSIX_Condition_variables_Signal_support+0x44> <== ALWAYS TAKEN 10c0d5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if ( !the_thread ) the_cond->Mutex = POSIX_CONDITION_VARIABLES_NO_MUTEX; } while ( is_broadcast && the_thread ); 10c0d8: 84 db test %bl,%bl 10c0da: 74 20 je 10c0fc <_POSIX_Condition_variables_Signal_support+0x60> 10c0dc: 85 c0 test %eax,%eax 10c0de: 74 1c je 10c0fc <_POSIX_Condition_variables_Signal_support+0x60> the_cond = _POSIX_Condition_variables_Get( cond, &location ); switch ( location ) { case OBJECTS_LOCAL: do { the_thread = _Thread_queue_Dequeue( &the_cond->Wait_queue ); 10c0e0: 83 ec 0c sub $0xc,%esp 10c0e3: 56 push %esi 10c0e4: e8 fb 35 00 00 call 10f6e4 <_Thread_queue_Dequeue> if ( !the_thread ) 10c0e9: 83 c4 10 add $0x10,%esp 10c0ec: 85 c0 test %eax,%eax 10c0ee: 75 e8 jne 10c0d8 <_POSIX_Condition_variables_Signal_support+0x3c> the_cond->Mutex = POSIX_CONDITION_VARIABLES_NO_MUTEX; 10c0f0: c7 47 14 00 00 00 00 movl $0x0,0x14(%edi) } while ( is_broadcast && the_thread ); 10c0f7: 84 db test %bl,%bl 10c0f9: 75 e1 jne 10c0dc <_POSIX_Condition_variables_Signal_support+0x40> 10c0fb: 90 nop _Thread_Enable_dispatch(); 10c0fc: e8 ef 31 00 00 call 10f2f0 <_Thread_Enable_dispatch> 10c101: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10c103: 8d 65 f4 lea -0xc(%ebp),%esp 10c106: 5b pop %ebx 10c107: 5e pop %esi 10c108: 5f pop %edi 10c109: c9 leave 10c10a: c3 ret 0010c164 <_POSIX_Condition_variables_Wait_support>: pthread_cond_t *cond, pthread_mutex_t *mutex, Watchdog_Interval timeout, bool already_timedout ) { 10c164: 55 push %ebp 10c165: 89 e5 mov %esp,%ebp 10c167: 57 push %edi 10c168: 56 push %esi 10c169: 53 push %ebx 10c16a: 83 ec 34 sub $0x34,%esp 10c16d: 8b 7d 08 mov 0x8(%ebp),%edi 10c170: 8b 5d 0c mov 0xc(%ebp),%ebx 10c173: 8a 45 14 mov 0x14(%ebp),%al 10c176: 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 ) ) { 10c179: 8d 75 e4 lea -0x1c(%ebp),%esi 10c17c: 56 push %esi 10c17d: 53 push %ebx 10c17e: e8 b1 01 00 00 call 10c334 <_POSIX_Mutex_Get> <== ALWAYS TAKEN 10c183: 83 c4 10 add $0x10,%esp 10c186: 85 c0 test %eax,%eax 10c188: 74 21 je 10c1ab <_POSIX_Condition_variables_Wait_support+0x47> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 10c18a: a1 f8 9c 12 00 mov 0x129cf8,%eax 10c18f: 48 dec %eax 10c190: a3 f8 9c 12 00 mov %eax,0x129cf8 return EINVAL; } _Thread_Unnest_dispatch(); the_cond = _POSIX_Condition_variables_Get( cond, &location ); 10c195: 83 ec 08 sub $0x8,%esp 10c198: 56 push %esi 10c199: 57 push %edi 10c19a: e8 e1 fd ff ff call 10bf80 <_POSIX_Condition_variables_Get> 10c19f: 89 c6 mov %eax,%esi switch ( location ) { 10c1a1: 83 c4 10 add $0x10,%esp 10c1a4: 8b 55 e4 mov -0x1c(%ebp),%edx 10c1a7: 85 d2 test %edx,%edx 10c1a9: 74 11 je 10c1bc <_POSIX_Condition_variables_Wait_support+0x58> /* * When we get here the dispatch disable level is 0. */ mutex_status = pthread_mutex_lock( mutex ); if ( mutex_status ) 10c1ab: be 16 00 00 00 mov $0x16,%esi case OBJECTS_ERROR: break; } return EINVAL; } 10c1b0: 89 f0 mov %esi,%eax 10c1b2: 8d 65 f4 lea -0xc(%ebp),%esp 10c1b5: 5b pop %ebx 10c1b6: 5e pop %esi 10c1b7: 5f pop %edi 10c1b8: c9 leave 10c1b9: c3 ret 10c1ba: 66 90 xchg %ax,%ax <== NOT EXECUTED the_cond = _POSIX_Condition_variables_Get( cond, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( the_cond->Mutex && ( the_cond->Mutex != *mutex ) ) { 10c1bc: 8b 40 14 mov 0x14(%eax),%eax 10c1bf: 85 c0 test %eax,%eax 10c1c1: 74 19 je 10c1dc <_POSIX_Condition_variables_Wait_support+0x78> 10c1c3: 3b 03 cmp (%ebx),%eax 10c1c5: 74 15 je 10c1dc <_POSIX_Condition_variables_Wait_support+0x78> _Thread_Enable_dispatch(); 10c1c7: e8 24 31 00 00 call 10f2f0 <_Thread_Enable_dispatch> 10c1cc: be 16 00 00 00 mov $0x16,%esi case OBJECTS_ERROR: break; } return EINVAL; } 10c1d1: 89 f0 mov %esi,%eax 10c1d3: 8d 65 f4 lea -0xc(%ebp),%esp 10c1d6: 5b pop %ebx 10c1d7: 5e pop %esi 10c1d8: 5f pop %edi 10c1d9: c9 leave 10c1da: c3 ret 10c1db: 90 nop <== NOT EXECUTED if ( the_cond->Mutex && ( the_cond->Mutex != *mutex ) ) { _Thread_Enable_dispatch(); return EINVAL; } (void) pthread_mutex_unlock( mutex ); 10c1dc: 83 ec 0c sub $0xc,%esp 10c1df: 53 push %ebx 10c1e0: e8 73 03 00 00 call 10c558 <== ALWAYS TAKEN _Thread_Enable_dispatch(); return EINVAL; } */ if ( !already_timedout ) { 10c1e5: 83 c4 10 add $0x10,%esp 10c1e8: 80 7d d7 00 cmpb $0x0,-0x29(%ebp) 10c1ec: 74 26 je 10c214 <_POSIX_Condition_variables_Wait_support+0xb0> status = _Thread_Executing->Wait.return_code; if ( status && status != ETIMEDOUT ) return status; } else { _Thread_Enable_dispatch(); 10c1ee: e8 fd 30 00 00 call 10f2f0 <_Thread_Enable_dispatch> 10c1f3: be 74 00 00 00 mov $0x74,%esi /* * When we get here the dispatch disable level is 0. */ mutex_status = pthread_mutex_lock( mutex ); 10c1f8: 83 ec 0c sub $0xc,%esp 10c1fb: 53 push %ebx 10c1fc: e8 cf 02 00 00 call 10c4d0 <== ALWAYS TAKEN if ( mutex_status ) 10c201: 83 c4 10 add $0x10,%esp 10c204: 85 c0 test %eax,%eax 10c206: 75 a3 jne 10c1ab <_POSIX_Condition_variables_Wait_support+0x47> case OBJECTS_ERROR: break; } return EINVAL; } 10c208: 89 f0 mov %esi,%eax 10c20a: 8d 65 f4 lea -0xc(%ebp),%esp 10c20d: 5b pop %ebx 10c20e: 5e pop %esi 10c20f: 5f pop %edi 10c210: c9 leave 10c211: c3 ret 10c212: 66 90 xchg %ax,%ax <== NOT EXECUTED return EINVAL; } */ if ( !already_timedout ) { the_cond->Mutex = *mutex; 10c214: 8b 03 mov (%ebx),%eax 10c216: 89 46 14 mov %eax,0x14(%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; 10c219: c7 46 48 01 00 00 00 movl $0x1,0x48(%esi) _Thread_queue_Enter_critical_section( &the_cond->Wait_queue ); _Thread_Executing->Wait.return_code = 0; 10c220: a1 b8 9d 12 00 mov 0x129db8,%eax 10c225: c7 40 34 00 00 00 00 movl $0x0,0x34(%eax) _Thread_Executing->Wait.queue = &the_cond->Wait_queue; 10c22c: 83 c6 18 add $0x18,%esi 10c22f: 89 70 44 mov %esi,0x44(%eax) _Thread_Executing->Wait.id = *cond; 10c232: 8b 17 mov (%edi),%edx 10c234: 89 50 20 mov %edx,0x20(%eax) _Thread_queue_Enqueue( &the_cond->Wait_queue, timeout ); 10c237: 50 push %eax 10c238: 68 64 fb 10 00 push $0x10fb64 10c23d: ff 75 10 pushl 0x10(%ebp) 10c240: 56 push %esi 10c241: e8 ba 35 00 00 call 10f800 <_Thread_queue_Enqueue_with_handler> _Thread_Enable_dispatch(); 10c246: e8 a5 30 00 00 call 10f2f0 <_Thread_Enable_dispatch> /* * Switch ourself out because we blocked as a result of the * _Thread_queue_Enqueue. */ status = _Thread_Executing->Wait.return_code; 10c24b: a1 b8 9d 12 00 mov 0x129db8,%eax 10c250: 8b 70 34 mov 0x34(%eax),%esi if ( status && status != ETIMEDOUT ) 10c253: 83 c4 10 add $0x10,%esp 10c256: 85 f6 test %esi,%esi 10c258: 74 9e je 10c1f8 <_POSIX_Condition_variables_Wait_support+0x94> 10c25a: 83 fe 74 cmp $0x74,%esi 10c25d: 0f 85 4d ff ff ff jne 10c1b0 <_POSIX_Condition_variables_Wait_support+0x4c> <== ALWAYS TAKEN 10c263: eb 93 jmp 10c1f8 <_POSIX_Condition_variables_Wait_support+0x94> <== ALWAYS TAKEN 00115be0 <_POSIX_Message_queue_Create_support>: const char *name_arg, int pshared, struct mq_attr *attr_ptr, POSIX_Message_queue_Control **message_queue ) { 115be0: 55 push %ebp 115be1: 89 e5 mov %esp,%ebp 115be3: 57 push %edi 115be4: 56 push %esi 115be5: 53 push %ebx 115be6: 83 ec 34 sub $0x34,%esp 115be9: 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 ); 115bec: 68 ff 00 00 00 push $0xff 115bf1: ff 75 08 pushl 0x8(%ebp) 115bf4: e8 7f 4f 00 00 call 11ab78 115bf9: 89 c3 mov %eax,%ebx 115bfb: a1 f8 ff 12 00 mov 0x12fff8,%eax 115c00: 40 inc %eax 115c01: a3 f8 ff 12 00 mov %eax,0x12fff8 * 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 ) { 115c06: 83 c4 10 add $0x10,%esp 115c09: 85 f6 test %esi,%esi 115c0b: 0f 84 c3 00 00 00 je 115cd4 <_POSIX_Message_queue_Create_support+0xf4> attr.mq_maxmsg = 10; attr.mq_msgsize = 16; } else { if ( attr_ptr->mq_maxmsg <= 0 ){ 115c11: 8b 4e 04 mov 0x4(%esi),%ecx 115c14: 85 c9 test %ecx,%ecx 115c16: 0f 8e fc 00 00 00 jle 115d18 <_POSIX_Message_queue_Create_support+0x138> _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EINVAL ); } if ( attr_ptr->mq_msgsize <= 0 ){ 115c1c: 8b 56 08 mov 0x8(%esi),%edx 115c1f: 85 d2 test %edx,%edx 115c21: 0f 8e f1 00 00 00 jle 115d18 <_POSIX_Message_queue_Create_support+0x138> _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EINVAL ); } attr = *attr_ptr; 115c27: 8d 7d d8 lea -0x28(%ebp),%edi 115c2a: b9 04 00 00 00 mov $0x4,%ecx 115c2f: f3 a5 rep movsl %ds:(%esi),%es:(%edi) 115c31: 8b 45 dc mov -0x24(%ebp),%eax 115c34: 89 45 d4 mov %eax,-0x2c(%ebp) 115c37: 8b 45 e0 mov -0x20(%ebp),%eax 115c3a: 89 45 d0 mov %eax,-0x30(%ebp) */ RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control *_POSIX_Message_queue_Allocate( void ) { return (POSIX_Message_queue_Control *) 115c3d: 83 ec 0c sub $0xc,%esp 115c40: 68 c0 03 13 00 push $0x1303c0 115c45: e8 e2 c7 ff ff call 11242c <_Objects_Allocate> 115c4a: 89 c6 mov %eax,%esi } the_mq = _POSIX_Message_queue_Allocate(); if ( !the_mq ) { 115c4c: 83 c4 10 add $0x10,%esp 115c4f: 85 c0 test %eax,%eax 115c51: 0f 84 03 01 00 00 je 115d5a <_POSIX_Message_queue_Create_support+0x17a> _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( ENFILE ); } the_mq->process_shared = pshared; 115c57: 8b 45 0c mov 0xc(%ebp),%eax 115c5a: 89 46 10 mov %eax,0x10(%esi) the_mq->named = true; 115c5d: c6 46 14 01 movb $0x1,0x14(%esi) the_mq->open_count = 1; 115c61: c7 46 18 01 00 00 00 movl $0x1,0x18(%esi) the_mq->linked = true; 115c68: 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); 115c6c: 43 inc %ebx 115c6d: 83 ec 0c sub $0xc,%esp 115c70: 53 push %ebx 115c71: e8 8e e7 ff ff call 114404 <_Workspace_Allocate> 115c76: 89 c7 mov %eax,%edi if (!name) { 115c78: 83 c4 10 add $0x10,%esp 115c7b: 85 c0 test %eax,%eax 115c7d: 0f 84 ac 00 00 00 je 115d2f <_POSIX_Message_queue_Create_support+0x14f> _POSIX_Message_queue_Free( the_mq ); _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( ENOMEM ); } strncpy( name, name_arg, n+1 ); 115c83: 50 push %eax 115c84: 53 push %ebx 115c85: ff 75 08 pushl 0x8(%ebp) 115c88: 57 push %edi 115c89: e8 6e 4e 00 00 call 11aafc * * 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; 115c8e: c7 46 5c 00 00 00 00 movl $0x0,0x5c(%esi) if ( !_CORE_message_queue_Initialize( 115c95: ff 75 d0 pushl -0x30(%ebp) 115c98: ff 75 d4 pushl -0x2c(%ebp) 115c9b: 8d 46 5c lea 0x5c(%esi),%eax 115c9e: 50 push %eax 115c9f: 8d 46 1c lea 0x1c(%esi),%eax 115ca2: 50 push %eax 115ca3: e8 dc 0d 00 00 call 116a84 <_CORE_message_queue_Initialize> 115ca8: 83 c4 20 add $0x20,%esp 115cab: 84 c0 test %al,%al 115cad: 74 39 je 115ce8 <_POSIX_Message_queue_Create_support+0x108> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 115caf: 0f b7 56 08 movzwl 0x8(%esi),%edx 115cb3: a1 dc 03 13 00 mov 0x1303dc,%eax 115cb8: 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; 115cbb: 89 7e 0c mov %edi,0xc(%esi) &_POSIX_Message_queue_Information, &the_mq->Object, name ); *message_queue = the_mq; 115cbe: 8b 45 14 mov 0x14(%ebp),%eax 115cc1: 89 30 mov %esi,(%eax) _Thread_Enable_dispatch(); 115cc3: e8 d8 d4 ff ff call 1131a0 <_Thread_Enable_dispatch> 115cc8: 31 c0 xor %eax,%eax return 0; } 115cca: 8d 65 f4 lea -0xc(%ebp),%esp 115ccd: 5b pop %ebx 115cce: 5e pop %esi 115ccf: 5f pop %edi 115cd0: c9 leave 115cd1: c3 ret 115cd2: 66 90 xchg %ax,%ax <== NOT EXECUTED * 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 ) { 115cd4: c7 45 d4 0a 00 00 00 movl $0xa,-0x2c(%ebp) 115cdb: c7 45 d0 10 00 00 00 movl $0x10,-0x30(%ebp) 115ce2: e9 56 ff ff ff jmp 115c3d <_POSIX_Message_queue_Create_support+0x5d> <== ALWAYS TAKEN 115ce7: 90 nop <== NOT EXECUTED RTEMS_INLINE_ROUTINE void _POSIX_Message_queue_Free ( POSIX_Message_queue_Control *the_mq ) { _Objects_Free( &_POSIX_Message_queue_Information, &the_mq->Object ); 115ce8: 83 ec 08 sub $0x8,%esp 115ceb: 56 push %esi 115cec: 68 c0 03 13 00 push $0x1303c0 115cf1: e8 b6 ca ff ff call 1127ac <_Objects_Free> attr.mq_maxmsg, attr.mq_msgsize ) ) { _POSIX_Message_queue_Free( the_mq ); _Workspace_Free(name); 115cf6: 89 3c 24 mov %edi,(%esp) 115cf9: e8 22 e7 ff ff call 114420 <_Workspace_Free> _Thread_Enable_dispatch(); 115cfe: e8 9d d4 ff ff call 1131a0 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( ENOSPC ); 115d03: e8 5c 39 00 00 call 119664 <__errno> 115d08: c7 00 1c 00 00 00 movl $0x1c,(%eax) 115d0e: b8 ff ff ff ff mov $0xffffffff,%eax 115d13: 83 c4 10 add $0x10,%esp 115d16: eb b2 jmp 115cca <_POSIX_Message_queue_Create_support+0xea> <== ALWAYS TAKEN _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EINVAL ); } if ( attr_ptr->mq_msgsize <= 0 ){ _Thread_Enable_dispatch(); 115d18: e8 83 d4 ff ff call 1131a0 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EINVAL ); 115d1d: e8 42 39 00 00 call 119664 <__errno> 115d22: c7 00 16 00 00 00 movl $0x16,(%eax) 115d28: b8 ff ff ff ff mov $0xffffffff,%eax 115d2d: eb 9b jmp 115cca <_POSIX_Message_queue_Create_support+0xea> <== ALWAYS TAKEN 115d2f: 83 ec 08 sub $0x8,%esp 115d32: 56 push %esi 115d33: 68 c0 03 13 00 push $0x1303c0 115d38: e8 6f ca ff ff call 1127ac <_Objects_Free> * dynamically constructed. */ name = _Workspace_Allocate(n+1); if (!name) { _POSIX_Message_queue_Free( the_mq ); _Thread_Enable_dispatch(); 115d3d: e8 5e d4 ff ff call 1131a0 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( ENOMEM ); 115d42: e8 1d 39 00 00 call 119664 <__errno> 115d47: c7 00 0c 00 00 00 movl $0xc,(%eax) 115d4d: b8 ff ff ff ff mov $0xffffffff,%eax 115d52: 83 c4 10 add $0x10,%esp 115d55: e9 70 ff ff ff jmp 115cca <_POSIX_Message_queue_Create_support+0xea> <== ALWAYS TAKEN attr = *attr_ptr; } the_mq = _POSIX_Message_queue_Allocate(); if ( !the_mq ) { _Thread_Enable_dispatch(); 115d5a: e8 41 d4 ff ff call 1131a0 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( ENFILE ); 115d5f: e8 00 39 00 00 call 119664 <__errno> 115d64: c7 00 17 00 00 00 movl $0x17,(%eax) 115d6a: b8 ff ff ff ff mov $0xffffffff,%eax 115d6f: e9 56 ff ff ff jmp 115cca <_POSIX_Message_queue_Create_support+0xea> <== ALWAYS TAKEN 00115d74 <_POSIX_Message_queue_Name_to_id>: */ int _POSIX_Message_queue_Name_to_id( const char *name, Objects_Id *id ) { 115d74: 55 push %ebp 115d75: 89 e5 mov %esp,%ebp 115d77: 53 push %ebx 115d78: 83 ec 14 sub $0x14,%esp 115d7b: 8b 5d 08 mov 0x8(%ebp),%ebx Objects_Name_or_id_lookup_errors status; Objects_Id the_id; if ( !name ) 115d7e: 85 db test %ebx,%ebx 115d80: 74 05 je 115d87 <_POSIX_Message_queue_Name_to_id+0x13> return EINVAL; if ( !name[0] ) 115d82: 80 3b 00 cmpb $0x0,(%ebx) 115d85: 75 0d jne 115d94 <_POSIX_Message_queue_Name_to_id+0x20> name, &the_id ); *id = the_id; if ( status == OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL ) 115d87: b8 16 00 00 00 mov $0x16,%eax return 0; return ENOENT; } 115d8c: 8b 5d fc mov -0x4(%ebp),%ebx 115d8f: c9 leave 115d90: c3 ret 115d91: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED return EINVAL; if ( !name[0] ) return EINVAL; if ( strnlen( name, NAME_MAX ) >= NAME_MAX ) 115d94: 83 ec 08 sub $0x8,%esp 115d97: 68 ff 00 00 00 push $0xff 115d9c: 53 push %ebx 115d9d: e8 d6 4d 00 00 call 11ab78 115da2: 83 c4 10 add $0x10,%esp 115da5: 3d fe 00 00 00 cmp $0xfe,%eax 115daa: 76 0c jbe 115db8 <_POSIX_Message_queue_Name_to_id+0x44> 115dac: b8 5b 00 00 00 mov $0x5b,%eax if ( status == OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL ) return 0; return ENOENT; } 115db1: 8b 5d fc mov -0x4(%ebp),%ebx 115db4: c9 leave 115db5: c3 ret 115db6: 66 90 xchg %ax,%ax <== NOT EXECUTED return EINVAL; if ( strnlen( name, NAME_MAX ) >= NAME_MAX ) return ENAMETOOLONG; status = _Objects_Name_to_id_string( 115db8: 50 push %eax 115db9: 8d 45 f4 lea -0xc(%ebp),%eax 115dbc: 50 push %eax 115dbd: 53 push %ebx 115dbe: 68 c0 03 13 00 push $0x1303c0 115dc3: e8 c0 12 00 00 call 117088 <_Objects_Name_to_id_string> &_POSIX_Message_queue_Information, name, &the_id ); *id = the_id; 115dc8: 8b 4d f4 mov -0xc(%ebp),%ecx 115dcb: 8b 55 0c mov 0xc(%ebp),%edx 115dce: 89 0a mov %ecx,(%edx) if ( status == OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL ) 115dd0: 83 c4 10 add $0x10,%esp 115dd3: 83 f8 01 cmp $0x1,%eax 115dd6: 19 c0 sbb %eax,%eax 115dd8: f7 d0 not %eax 115dda: 83 e0 02 and $0x2,%eax return 0; return ENOENT; } 115ddd: 8b 5d fc mov -0x4(%ebp),%ebx 115de0: c9 leave 115de1: c3 ret 0010fa20 <_POSIX_Message_queue_Receive_support>: size_t msg_len, unsigned int *msg_prio, bool wait, Watchdog_Interval timeout ) { 10fa20: 55 push %ebp 10fa21: 89 e5 mov %esp,%ebp 10fa23: 56 push %esi 10fa24: 53 push %ebx 10fa25: 83 ec 24 sub $0x24,%esp 10fa28: 8b 5d 08 mov 0x8(%ebp),%ebx 10fa2b: 8b 75 14 mov 0x14(%ebp),%esi 10fa2e: 8a 45 18 mov 0x18(%ebp),%al 10fa31: 88 45 e7 mov %al,-0x19(%ebp) 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( 10fa34: 8d 45 f4 lea -0xc(%ebp),%eax 10fa37: 50 push %eax 10fa38: 53 push %ebx 10fa39: 68 60 05 13 00 push $0x130560 10fa3e: e8 99 2e 00 00 call 1128dc <_Objects_Get> Objects_Locations location; size_t length_out; bool do_wait; the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { 10fa43: 83 c4 10 add $0x10,%esp 10fa46: 8b 55 f4 mov -0xc(%ebp),%edx 10fa49: 85 d2 test %edx,%edx 10fa4b: 74 17 je 10fa64 <_POSIX_Message_queue_Receive_support+0x44> #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); 10fa4d: e8 12 9c 00 00 call 119664 <__errno> 10fa52: c7 00 09 00 00 00 movl $0x9,(%eax) 10fa58: b8 ff ff ff ff mov $0xffffffff,%eax } 10fa5d: 8d 65 f8 lea -0x8(%ebp),%esp 10fa60: 5b pop %ebx 10fa61: 5e pop %esi 10fa62: c9 leave 10fa63: c3 ret the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( (the_mq_fd->oflag & O_ACCMODE) == O_WRONLY ) { 10fa64: 8b 48 14 mov 0x14(%eax),%ecx 10fa67: 89 ca mov %ecx,%edx 10fa69: 83 e2 03 and $0x3,%edx 10fa6c: 4a dec %edx 10fa6d: 0f 84 af 00 00 00 je 10fb22 <_POSIX_Message_queue_Receive_support+0x102> _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EBADF ); } the_mq = the_mq_fd->Queue; 10fa73: 8b 50 10 mov 0x10(%eax),%edx if ( msg_len < the_mq->Message_queue.maximum_message_size ) { 10fa76: 8b 45 10 mov 0x10(%ebp),%eax 10fa79: 39 42 68 cmp %eax,0x68(%edx) 10fa7c: 77 62 ja 10fae0 <_POSIX_Message_queue_Receive_support+0xc0> length_out = -1; /* * A timed receive with a bad time will do a poll regardless. */ if ( wait ) 10fa7e: 80 7d e7 00 cmpb $0x0,-0x19(%ebp) 10fa82: 75 48 jne 10facc <_POSIX_Message_queue_Receive_support+0xac> <== NEVER TAKEN 10fa84: 31 c0 xor %eax,%eax <== NOT EXECUTED /* * Now if something goes wrong, we return a "length" of -1 * to indicate an error. */ length_out = -1; 10fa86: c7 45 f0 ff ff ff ff movl $0xffffffff,-0x10(%ebp) do_wait = wait; /* * Now perform the actual message receive */ _CORE_message_queue_Seize( 10fa8d: 83 ec 08 sub $0x8,%esp 10fa90: ff 75 1c pushl 0x1c(%ebp) 10fa93: 50 push %eax 10fa94: 8d 45 f0 lea -0x10(%ebp),%eax 10fa97: 50 push %eax 10fa98: ff 75 0c pushl 0xc(%ebp) 10fa9b: 53 push %ebx 10fa9c: 83 c2 1c add $0x1c,%edx 10fa9f: 52 push %edx 10faa0: e8 0f 1f 00 00 call 1119b4 <_CORE_message_queue_Seize> &length_out, do_wait, timeout ); _Thread_Enable_dispatch(); 10faa5: 83 c4 20 add $0x20,%esp 10faa8: e8 f3 36 00 00 call 1131a0 <_Thread_Enable_dispatch> *msg_prio = _POSIX_Message_queue_Priority_from_core(_Thread_Executing->Wait.count); 10faad: a1 b8 00 13 00 mov 0x1300b8,%eax do_wait, timeout ); _Thread_Enable_dispatch(); *msg_prio = 10fab2: 8b 50 24 mov 0x24(%eax),%edx 10fab5: 89 16 mov %edx,(%esi) 10fab7: 85 d2 test %edx,%edx 10fab9: 78 21 js 10fadc <_POSIX_Message_queue_Receive_support+0xbc> _POSIX_Message_queue_Priority_from_core(_Thread_Executing->Wait.count); if ( !_Thread_Executing->Wait.return_code ) 10fabb: 8b 40 34 mov 0x34(%eax),%eax 10fabe: 85 c0 test %eax,%eax 10fac0: 75 3a jne 10fafc <_POSIX_Message_queue_Receive_support+0xdc> return length_out; 10fac2: 8b 45 f0 mov -0x10(%ebp),%eax case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); } 10fac5: 8d 65 f8 lea -0x8(%ebp),%esp 10fac8: 5b pop %ebx 10fac9: 5e pop %esi 10faca: c9 leave 10facb: c3 ret length_out = -1; /* * A timed receive with a bad time will do a poll regardless. */ if ( wait ) 10facc: 89 c8 mov %ecx,%eax 10face: c1 e8 0e shr $0xe,%eax 10fad1: 83 f0 01 xor $0x1,%eax 10fad4: 83 e0 01 and $0x1,%eax 10fad7: eb ad jmp 10fa86 <_POSIX_Message_queue_Receive_support+0x66> <== ALWAYS TAKEN 10fad9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED do_wait, timeout ); _Thread_Enable_dispatch(); *msg_prio = 10fadc: f7 1e negl (%esi) 10fade: eb db jmp 10fabb <_POSIX_Message_queue_Receive_support+0x9b> <== ALWAYS TAKEN } the_mq = the_mq_fd->Queue; if ( msg_len < the_mq->Message_queue.maximum_message_size ) { _Thread_Enable_dispatch(); 10fae0: e8 bb 36 00 00 call 1131a0 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EMSGSIZE ); 10fae5: e8 7a 9b 00 00 call 119664 <__errno> 10faea: c7 00 7a 00 00 00 movl $0x7a,(%eax) 10faf0: b8 ff ff ff ff mov $0xffffffff,%eax 10faf5: e9 63 ff ff ff jmp 10fa5d <_POSIX_Message_queue_Receive_support+0x3d> <== ALWAYS TAKEN 10fafa: 66 90 xchg %ax,%ax <== NOT EXECUTED _POSIX_Message_queue_Priority_from_core(_Thread_Executing->Wait.count); if ( !_Thread_Executing->Wait.return_code ) return length_out; rtems_set_errno_and_return_minus_one( 10fafc: e8 63 9b 00 00 call 119664 <__errno> 10fb01: 89 c3 mov %eax,%ebx 10fb03: 83 ec 0c sub $0xc,%esp 10fb06: a1 b8 00 13 00 mov 0x1300b8,%eax 10fb0b: ff 70 34 pushl 0x34(%eax) 10fb0e: e8 39 02 00 00 call 10fd4c <_POSIX_Message_queue_Translate_core_message_queue_return_code> <== ALWAYS TAKEN 10fb13: 89 03 mov %eax,(%ebx) 10fb15: b8 ff ff ff ff mov $0xffffffff,%eax 10fb1a: 83 c4 10 add $0x10,%esp 10fb1d: e9 3b ff ff ff jmp 10fa5d <_POSIX_Message_queue_Receive_support+0x3d> <== ALWAYS TAKEN the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( (the_mq_fd->oflag & O_ACCMODE) == O_WRONLY ) { _Thread_Enable_dispatch(); 10fb22: e8 79 36 00 00 call 1131a0 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EBADF ); 10fb27: e8 38 9b 00 00 call 119664 <__errno> 10fb2c: c7 00 09 00 00 00 movl $0x9,(%eax) 10fb32: b8 ff ff ff ff mov $0xffffffff,%eax 10fb37: e9 21 ff ff ff jmp 10fa5d <_POSIX_Message_queue_Receive_support+0x3d> <== ALWAYS TAKEN 0010fb5c <_POSIX_Message_queue_Send_support>: size_t msg_len, uint32_t msg_prio, bool wait, Watchdog_Interval timeout ) { 10fb5c: 55 push %ebp 10fb5d: 89 e5 mov %esp,%ebp 10fb5f: 57 push %edi 10fb60: 56 push %esi 10fb61: 53 push %ebx 10fb62: 83 ec 2c sub $0x2c,%esp 10fb65: 8b 75 08 mov 0x8(%ebp),%esi 10fb68: 8b 5d 14 mov 0x14(%ebp),%ebx 10fb6b: 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 ) 10fb6e: 83 fb 20 cmp $0x20,%ebx 10fb71: 0f 87 9d 00 00 00 ja 10fc14 <_POSIX_Message_queue_Send_support+0xb8> 10fb77: 51 push %ecx 10fb78: 8d 45 e4 lea -0x1c(%ebp),%eax 10fb7b: 50 push %eax 10fb7c: 56 push %esi 10fb7d: 68 60 05 13 00 push $0x130560 10fb82: 88 55 d4 mov %dl,-0x2c(%ebp) 10fb85: e8 52 2d 00 00 call 1128dc <_Objects_Get> rtems_set_errno_and_return_minus_one( EINVAL ); the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { 10fb8a: 83 c4 10 add $0x10,%esp 10fb8d: 8b 55 e4 mov -0x1c(%ebp),%edx 10fb90: 85 d2 test %edx,%edx 10fb92: 8a 55 d4 mov -0x2c(%ebp),%dl 10fb95: 75 69 jne 10fc00 <_POSIX_Message_queue_Send_support+0xa4> case OBJECTS_LOCAL: if ( (the_mq_fd->oflag & O_ACCMODE) == O_RDONLY ) { 10fb97: 8b 48 14 mov 0x14(%eax),%ecx 10fb9a: f6 c1 03 test $0x3,%cl 10fb9d: 0f 84 85 00 00 00 je 10fc28 <_POSIX_Message_queue_Send_support+0xcc> _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EBADF ); } the_mq = the_mq_fd->Queue; 10fba3: 8b 78 10 mov 0x10(%eax),%edi /* * A timed receive with a bad time will do a poll regardless. */ if ( wait ) 10fba6: 84 d2 test %dl,%dl 10fba8: 75 3a jne 10fbe4 <_POSIX_Message_queue_Send_support+0x88> 10fbaa: 31 c0 xor %eax,%eax do_wait = wait; /* * Now perform the actual message receive */ msg_status = _CORE_message_queue_Submit( 10fbac: ff 75 1c pushl 0x1c(%ebp) 10fbaf: 50 push %eax 10fbb0: f7 db neg %ebx 10fbb2: 53 push %ebx 10fbb3: 6a 00 push $0x0 10fbb5: 56 push %esi 10fbb6: ff 75 10 pushl 0x10(%ebp) 10fbb9: ff 75 0c pushl 0xc(%ebp) 10fbbc: 8d 47 1c lea 0x1c(%edi),%eax 10fbbf: 50 push %eax 10fbc0: e8 1b 1f 00 00 call 111ae0 <_CORE_message_queue_Submit> 10fbc5: 89 c3 mov %eax,%ebx _POSIX_Message_queue_Priority_to_core( msg_prio ), do_wait, timeout /* no timeout */ ); _Thread_Enable_dispatch(); 10fbc7: 83 c4 20 add $0x20,%esp 10fbca: e8 d1 35 00 00 call 1131a0 <_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 ) 10fbcf: 83 fb 07 cmp $0x7,%ebx 10fbd2: 74 20 je 10fbf4 <_POSIX_Message_queue_Send_support+0x98> msg_status = _Thread_Executing->Wait.return_code; if ( !msg_status ) 10fbd4: 85 db test %ebx,%ebx 10fbd6: 75 68 jne 10fc40 <_POSIX_Message_queue_Send_support+0xe4> 10fbd8: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); } 10fbda: 8d 65 f4 lea -0xc(%ebp),%esp 10fbdd: 5b pop %ebx 10fbde: 5e pop %esi 10fbdf: 5f pop %edi 10fbe0: c9 leave 10fbe1: c3 ret 10fbe2: 66 90 xchg %ax,%ax <== NOT EXECUTED the_mq = the_mq_fd->Queue; /* * A timed receive with a bad time will do a poll regardless. */ if ( wait ) 10fbe4: 89 c8 mov %ecx,%eax 10fbe6: c1 e8 0e shr $0xe,%eax 10fbe9: 83 f0 01 xor $0x1,%eax 10fbec: 83 e0 01 and $0x1,%eax 10fbef: eb bb jmp 10fbac <_POSIX_Message_queue_Send_support+0x50> <== ALWAYS TAKEN 10fbf1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED * 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 ) msg_status = _Thread_Executing->Wait.return_code; 10fbf4: a1 b8 00 13 00 mov 0x1300b8,%eax 10fbf9: 8b 58 34 mov 0x34(%eax),%ebx 10fbfc: eb d6 jmp 10fbd4 <_POSIX_Message_queue_Send_support+0x78> <== ALWAYS TAKEN 10fbfe: 66 90 xchg %ax,%ax <== NOT EXECUTED #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); 10fc00: e8 5f 9a 00 00 call 119664 <__errno> 10fc05: c7 00 09 00 00 00 movl $0x9,(%eax) 10fc0b: b8 ff ff ff ff mov $0xffffffff,%eax 10fc10: eb c8 jmp 10fbda <_POSIX_Message_queue_Send_support+0x7e> <== ALWAYS TAKEN 10fc12: 66 90 xchg %ax,%ax <== NOT EXECUTED * Validate the priority. * XXX - Do not validate msg_prio is not less than 0. */ if ( msg_prio > MQ_PRIO_MAX ) rtems_set_errno_and_return_minus_one( EINVAL ); 10fc14: e8 4b 9a 00 00 call 119664 <__errno> 10fc19: c7 00 16 00 00 00 movl $0x16,(%eax) 10fc1f: b8 ff ff ff ff mov $0xffffffff,%eax 10fc24: eb b4 jmp 10fbda <_POSIX_Message_queue_Send_support+0x7e> <== ALWAYS TAKEN 10fc26: 66 90 xchg %ax,%ax <== NOT EXECUTED the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( (the_mq_fd->oflag & O_ACCMODE) == O_RDONLY ) { _Thread_Enable_dispatch(); 10fc28: e8 73 35 00 00 call 1131a0 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EBADF ); 10fc2d: e8 32 9a 00 00 call 119664 <__errno> 10fc32: c7 00 09 00 00 00 movl $0x9,(%eax) 10fc38: b8 ff ff ff ff mov $0xffffffff,%eax 10fc3d: eb 9b jmp 10fbda <_POSIX_Message_queue_Send_support+0x7e> <== ALWAYS TAKEN 10fc3f: 90 nop <== NOT EXECUTED msg_status = _Thread_Executing->Wait.return_code; if ( !msg_status ) return msg_status; rtems_set_errno_and_return_minus_one( 10fc40: e8 1f 9a 00 00 call 119664 <__errno> 10fc45: 89 c6 mov %eax,%esi 10fc47: 83 ec 0c sub $0xc,%esp 10fc4a: 53 push %ebx 10fc4b: e8 fc 00 00 00 call 10fd4c <_POSIX_Message_queue_Translate_core_message_queue_return_code> <== ALWAYS TAKEN 10fc50: 89 06 mov %eax,(%esi) 10fc52: b8 ff ff ff ff mov $0xffffffff,%eax 10fc57: 83 c4 10 add $0x10,%esp 10fc5a: e9 7b ff ff ff jmp 10fbda <_POSIX_Message_queue_Send_support+0x7e> <== ALWAYS TAKEN 0010d078 <_POSIX_Mutex_Get>: POSIX_Mutex_Control *_POSIX_Mutex_Get ( pthread_mutex_t *mutex, Objects_Locations *location ) { 10d078: 55 push %ebp 10d079: 89 e5 mov %esp,%ebp 10d07b: 56 push %esi 10d07c: 53 push %ebx 10d07d: 8b 5d 08 mov 0x8(%ebp),%ebx 10d080: 8b 75 0c mov 0xc(%ebp),%esi ___POSIX_Mutex_Get_support_error_check( mutex, location ); 10d083: 85 db test %ebx,%ebx 10d085: 74 39 je 10d0c0 <_POSIX_Mutex_Get+0x48> ___POSIX_Mutex_Get_support_auto_initialization( mutex, location ); 10d087: 8b 03 mov (%ebx),%eax 10d089: 83 f8 ff cmp $0xffffffff,%eax 10d08c: 74 1a je 10d0a8 <_POSIX_Mutex_Get+0x30> return (POSIX_Mutex_Control *) 10d08e: 52 push %edx 10d08f: 56 push %esi 10d090: 50 push %eax 10d091: 68 40 b8 12 00 push $0x12b840 10d096: e8 a9 2a 00 00 call 10fb44 <_Objects_Get> 10d09b: 83 c4 10 add $0x10,%esp _Objects_Get( &_POSIX_Mutex_Information, (Objects_Id) *mutex, location ); } 10d09e: 8d 65 f8 lea -0x8(%ebp),%esp 10d0a1: 5b pop %ebx 10d0a2: 5e pop %esi 10d0a3: c9 leave 10d0a4: c3 ret 10d0a5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED Objects_Locations *location ) { ___POSIX_Mutex_Get_support_error_check( mutex, location ); ___POSIX_Mutex_Get_support_auto_initialization( mutex, location ); 10d0a8: 83 ec 08 sub $0x8,%esp 10d0ab: 6a 00 push $0x0 10d0ad: 53 push %ebx 10d0ae: e8 65 00 00 00 call 10d118 <== ALWAYS TAKEN 10d0b3: 83 c4 10 add $0x10,%esp 10d0b6: 85 c0 test %eax,%eax 10d0b8: 75 06 jne 10d0c0 <_POSIX_Mutex_Get+0x48> 10d0ba: 8b 03 mov (%ebx),%eax 10d0bc: eb d0 jmp 10d08e <_POSIX_Mutex_Get+0x16> <== ALWAYS TAKEN 10d0be: 66 90 xchg %ax,%ax <== NOT EXECUTED 10d0c0: c7 06 01 00 00 00 movl $0x1,(%esi) 10d0c6: 31 c0 xor %eax,%eax 10d0c8: eb d4 jmp 10d09e <_POSIX_Mutex_Get+0x26> <== ALWAYS TAKEN 0010d024 <_POSIX_Mutex_Get_interrupt_disable>: POSIX_Mutex_Control *_POSIX_Mutex_Get_interrupt_disable ( pthread_mutex_t *mutex, Objects_Locations *location, ISR_Level *level ) { 10d024: 55 push %ebp 10d025: 89 e5 mov %esp,%ebp 10d027: 56 push %esi 10d028: 53 push %ebx 10d029: 8b 5d 08 mov 0x8(%ebp),%ebx 10d02c: 8b 75 0c mov 0xc(%ebp),%esi ___POSIX_Mutex_Get_support_error_check( mutex, location ); 10d02f: 85 db test %ebx,%ebx 10d031: 74 39 je 10d06c <_POSIX_Mutex_Get_interrupt_disable+0x48> ___POSIX_Mutex_Get_support_auto_initialization( mutex, location ); 10d033: 8b 03 mov (%ebx),%eax 10d035: 83 f8 ff cmp $0xffffffff,%eax 10d038: 74 1a je 10d054 <_POSIX_Mutex_Get_interrupt_disable+0x30> return (POSIX_Mutex_Control *) _Objects_Get_isr_disable( 10d03a: ff 75 10 pushl 0x10(%ebp) 10d03d: 56 push %esi 10d03e: 50 push %eax 10d03f: 68 40 b8 12 00 push $0x12b840 10d044: e8 a3 2a 00 00 call 10faec <_Objects_Get_isr_disable> 10d049: 83 c4 10 add $0x10,%esp &_POSIX_Mutex_Information, (Objects_Id) *mutex, location, level ); } 10d04c: 8d 65 f8 lea -0x8(%ebp),%esp 10d04f: 5b pop %ebx 10d050: 5e pop %esi 10d051: c9 leave 10d052: c3 ret 10d053: 90 nop <== NOT EXECUTED ISR_Level *level ) { ___POSIX_Mutex_Get_support_error_check( mutex, location ); ___POSIX_Mutex_Get_support_auto_initialization( mutex, location ); 10d054: 83 ec 08 sub $0x8,%esp 10d057: 6a 00 push $0x0 10d059: 53 push %ebx 10d05a: e8 b9 00 00 00 call 10d118 <== ALWAYS TAKEN 10d05f: 83 c4 10 add $0x10,%esp 10d062: 85 c0 test %eax,%eax 10d064: 75 06 jne 10d06c <_POSIX_Mutex_Get_interrupt_disable+0x48> 10d066: 8b 03 mov (%ebx),%eax 10d068: eb d0 jmp 10d03a <_POSIX_Mutex_Get_interrupt_disable+0x16> <== ALWAYS TAKEN 10d06a: 66 90 xchg %ax,%ax <== NOT EXECUTED 10d06c: c7 06 01 00 00 00 movl $0x1,(%esi) 10d072: 31 c0 xor %eax,%eax 10d074: eb d6 jmp 10d04c <_POSIX_Mutex_Get_interrupt_disable+0x28> <== ALWAYS TAKEN 0010d274 <_POSIX_Mutex_Lock_support>: int _POSIX_Mutex_Lock_support( pthread_mutex_t *mutex, bool blocking, Watchdog_Interval timeout ) { 10d274: 55 push %ebp 10d275: 89 e5 mov %esp,%ebp 10d277: 53 push %ebx 10d278: 83 ec 18 sub $0x18,%esp 10d27b: 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 ); 10d27e: 8d 45 f0 lea -0x10(%ebp),%eax 10d281: 50 push %eax 10d282: 8d 45 f4 lea -0xc(%ebp),%eax 10d285: 50 push %eax 10d286: ff 75 08 pushl 0x8(%ebp) 10d289: e8 96 fd ff ff call 10d024 <_POSIX_Mutex_Get_interrupt_disable> <== ALWAYS TAKEN switch ( location ) { 10d28e: 83 c4 10 add $0x10,%esp 10d291: 8b 55 f4 mov -0xc(%ebp),%edx 10d294: 85 d2 test %edx,%edx 10d296: 75 34 jne 10d2cc <_POSIX_Mutex_Lock_support+0x58> case OBJECTS_LOCAL: _CORE_mutex_Seize( 10d298: 83 ec 0c sub $0xc,%esp 10d29b: ff 75 f0 pushl -0x10(%ebp) 10d29e: ff 75 10 pushl 0x10(%ebp) 10d2a1: 0f b6 db movzbl %bl,%ebx 10d2a4: 53 push %ebx 10d2a5: ff 70 08 pushl 0x8(%eax) 10d2a8: 83 c0 14 add $0x14,%eax 10d2ab: 50 push %eax 10d2ac: e8 87 1c 00 00 call 10ef38 <_CORE_mutex_Seize> the_mutex->Object.id, blocking, timeout, level ); return _POSIX_Mutex_Translate_core_mutex_return_code( 10d2b1: 83 c4 14 add $0x14,%esp 10d2b4: a1 f8 b4 12 00 mov 0x12b4f8,%eax 10d2b9: ff 70 34 pushl 0x34(%eax) 10d2bc: e8 f3 00 00 00 call 10d3b4 <_POSIX_Mutex_Translate_core_mutex_return_code> <== ALWAYS TAKEN 10d2c1: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return EINVAL; } 10d2c4: 8b 5d fc mov -0x4(%ebp),%ebx 10d2c7: c9 leave 10d2c8: c3 ret 10d2c9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED register POSIX_Mutex_Control *the_mutex; Objects_Locations location; ISR_Level level; the_mutex = _POSIX_Mutex_Get_interrupt_disable( mutex, &location, &level ); switch ( location ) { 10d2cc: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10d2d1: 8b 5d fc mov -0x4(%ebp),%ebx 10d2d4: c9 leave 10d2d5: c3 ret 00113dec <_POSIX_Semaphore_Create_support>: const char *name, int pshared, unsigned int value, POSIX_Semaphore_Control **the_sem ) { 113dec: 55 push %ebp 113ded: 89 e5 mov %esp,%ebp 113def: 56 push %esi 113df0: 53 push %ebx 113df1: 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) 113df4: 8b 55 0c mov 0xc(%ebp),%edx 113df7: 85 d2 test %edx,%edx 113df9: 0f 85 b9 00 00 00 jne 113eb8 <_POSIX_Semaphore_Create_support+0xcc> rtems_set_errno_and_return_minus_one( ENOSYS ); if ( name ) { 113dff: 85 db test %ebx,%ebx 113e01: 74 1c je 113e1f <_POSIX_Semaphore_Create_support+0x33> if ( strnlen( name, NAME_MAX ) >= NAME_MAX ) 113e03: 83 ec 08 sub $0x8,%esp 113e06: 68 ff 00 00 00 push $0xff 113e0b: 53 push %ebx 113e0c: e8 3b 48 00 00 call 11864c 113e11: 83 c4 10 add $0x10,%esp 113e14: 3d fe 00 00 00 cmp $0xfe,%eax 113e19: 0f 87 ad 00 00 00 ja 113ecc <_POSIX_Semaphore_Create_support+0xe0> 113e1f: a1 18 d0 12 00 mov 0x12d018,%eax 113e24: 40 inc %eax 113e25: a3 18 d0 12 00 mov %eax,0x12d018 * _POSIX_Semaphore_Allocate */ RTEMS_INLINE_ROUTINE POSIX_Semaphore_Control *_POSIX_Semaphore_Allocate( void ) { return (POSIX_Semaphore_Control *) 113e2a: 83 ec 0c sub $0xc,%esp 113e2d: 68 60 d3 12 00 push $0x12d360 113e32: e8 11 c0 ff ff call 10fe48 <_Objects_Allocate> 113e37: 89 c6 mov %eax,%esi _Thread_Disable_dispatch(); the_semaphore = _POSIX_Semaphore_Allocate(); if ( !the_semaphore ) { 113e39: 83 c4 10 add $0x10,%esp 113e3c: 85 c0 test %eax,%eax 113e3e: 0f 84 9a 00 00 00 je 113ede <_POSIX_Semaphore_Create_support+0xf2> _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( ENOSPC ); } the_semaphore->process_shared = pshared; 113e44: c7 40 10 00 00 00 00 movl $0x0,0x10(%eax) if ( name ) { 113e4b: 85 db test %ebx,%ebx 113e4d: 74 55 je 113ea4 <_POSIX_Semaphore_Create_support+0xb8> the_semaphore->named = true; 113e4f: c6 40 14 01 movb $0x1,0x14(%eax) the_semaphore->open_count = 1; 113e53: c7 40 18 01 00 00 00 movl $0x1,0x18(%eax) the_semaphore->linked = true; 113e5a: c6 40 15 01 movb $0x1,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; 113e5e: c7 46 60 00 00 00 00 movl $0x0,0x60(%esi) /* * This effectively disables limit checking. */ the_sem_attr->maximum_count = 0xFFFFFFFF; 113e65: c7 46 5c ff ff ff ff movl $0xffffffff,0x5c(%esi) _CORE_semaphore_Initialize( &the_semaphore->Semaphore, the_sem_attr, value ); 113e6c: 50 push %eax 113e6d: ff 75 10 pushl 0x10(%ebp) 113e70: 8d 46 5c lea 0x5c(%esi),%eax 113e73: 50 push %eax 113e74: 8d 46 1c lea 0x1c(%esi),%eax 113e77: 50 push %eax 113e78: e8 df ba ff ff call 10f95c <_CORE_semaphore_Initialize> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 113e7d: 0f b7 56 08 movzwl 0x8(%esi),%edx 113e81: a1 7c d3 12 00 mov 0x12d37c,%eax 113e86: 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; 113e89: 89 5e 0c mov %ebx,0xc(%esi) &_POSIX_Semaphore_Information, &the_semaphore->Object, name_p ); *the_sem = the_semaphore; 113e8c: 8b 45 14 mov 0x14(%ebp),%eax 113e8f: 89 30 mov %esi,(%eax) _Thread_Enable_dispatch(); 113e91: e8 26 cd ff ff call 110bbc <_Thread_Enable_dispatch> 113e96: 31 c0 xor %eax,%eax return 0; 113e98: 83 c4 10 add $0x10,%esp } 113e9b: 8d 65 f8 lea -0x8(%ebp),%esp 113e9e: 5b pop %ebx 113e9f: 5e pop %esi 113ea0: c9 leave 113ea1: c3 ret 113ea2: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( name ) { the_semaphore->named = true; the_semaphore->open_count = 1; the_semaphore->linked = true; } else { the_semaphore->named = false; 113ea4: c6 40 14 00 movb $0x0,0x14(%eax) the_semaphore->open_count = 0; 113ea8: c7 40 18 00 00 00 00 movl $0x0,0x18(%eax) the_semaphore->linked = false; 113eaf: c6 40 15 00 movb $0x0,0x15(%eax) 113eb3: eb a9 jmp 113e5e <_POSIX_Semaphore_Create_support+0x72> <== ALWAYS TAKEN 113eb5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED CORE_semaphore_Attributes *the_sem_attr; char *name_p = (char *)name; /* Sharing semaphores among processes is not currently supported */ if (pshared != 0) rtems_set_errno_and_return_minus_one( ENOSYS ); 113eb8: e8 2f 39 00 00 call 1177ec <__errno> 113ebd: c7 00 58 00 00 00 movl $0x58,(%eax) 113ec3: b8 ff ff ff ff mov $0xffffffff,%eax 113ec8: eb d1 jmp 113e9b <_POSIX_Semaphore_Create_support+0xaf> <== ALWAYS TAKEN 113eca: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( name ) { if ( strnlen( name, NAME_MAX ) >= NAME_MAX ) rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); 113ecc: e8 1b 39 00 00 call 1177ec <__errno> 113ed1: c7 00 5b 00 00 00 movl $0x5b,(%eax) 113ed7: b8 ff ff ff ff mov $0xffffffff,%eax 113edc: eb bd jmp 113e9b <_POSIX_Semaphore_Create_support+0xaf> <== ALWAYS TAKEN _Thread_Disable_dispatch(); the_semaphore = _POSIX_Semaphore_Allocate(); if ( !the_semaphore ) { _Thread_Enable_dispatch(); 113ede: e8 d9 cc ff ff call 110bbc <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( ENOSPC ); 113ee3: e8 04 39 00 00 call 1177ec <__errno> 113ee8: c7 00 1c 00 00 00 movl $0x1c,(%eax) 113eee: b8 ff ff ff ff mov $0xffffffff,%eax 113ef3: eb a6 jmp 113e9b <_POSIX_Semaphore_Create_support+0xaf> <== ALWAYS TAKEN 00113f48 <_POSIX_Semaphore_Name_to_id>: int _POSIX_Semaphore_Name_to_id( const char *name, sem_t *id ) { 113f48: 55 push %ebp 113f49: 89 e5 mov %esp,%ebp 113f4b: 83 ec 18 sub $0x18,%esp 113f4e: 8b 45 08 mov 0x8(%ebp),%eax Objects_Name_or_id_lookup_errors status; Objects_Id the_id; if ( !name ) 113f51: 85 c0 test %eax,%eax 113f53: 74 05 je 113f5a <_POSIX_Semaphore_Name_to_id+0x12> return EINVAL; if ( !name[0] ) 113f55: 80 38 00 cmpb $0x0,(%eax) 113f58: 75 0a jne 113f64 <_POSIX_Semaphore_Name_to_id+0x1c> name, &the_id ); *id = the_id; if ( status == OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL ) 113f5a: b8 16 00 00 00 mov $0x16,%eax return 0; return ENOENT; } 113f5f: c9 leave 113f60: c3 ret 113f61: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED return EINVAL; if ( !name[0] ) return EINVAL; status = _Objects_Name_to_id_string( 113f64: 52 push %edx 113f65: 8d 55 f4 lea -0xc(%ebp),%edx 113f68: 52 push %edx 113f69: 50 push %eax 113f6a: 68 60 d3 12 00 push $0x12d360 113f6f: e8 f8 0d 00 00 call 114d6c <_Objects_Name_to_id_string> &_POSIX_Semaphore_Information, name, &the_id ); *id = the_id; 113f74: 8b 4d f4 mov -0xc(%ebp),%ecx 113f77: 8b 55 0c mov 0xc(%ebp),%edx 113f7a: 89 0a mov %ecx,(%edx) if ( status == OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL ) 113f7c: 83 c4 10 add $0x10,%esp 113f7f: 83 f8 01 cmp $0x1,%eax 113f82: 19 c0 sbb %eax,%eax 113f84: f7 d0 not %eax 113f86: 83 e0 02 and $0x2,%eax return 0; return ENOENT; } 113f89: c9 leave 113f8a: c3 ret 00113fb4 <_POSIX_Semaphore_Wait_support>: int _POSIX_Semaphore_Wait_support( sem_t *sem, bool blocking, Watchdog_Interval timeout ) { 113fb4: 55 push %ebp 113fb5: 89 e5 mov %esp,%ebp 113fb7: 53 push %ebx 113fb8: 83 ec 18 sub $0x18,%esp 113fbb: 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 *) 113fbe: 8d 45 f4 lea -0xc(%ebp),%eax 113fc1: 50 push %eax 113fc2: 8b 45 08 mov 0x8(%ebp),%eax 113fc5: ff 30 pushl (%eax) 113fc7: 68 60 d3 12 00 push $0x12d360 113fcc: e8 27 c3 ff ff call 1102f8 <_Objects_Get> POSIX_Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _POSIX_Semaphore_Get( sem, &location ); switch ( location ) { 113fd1: 83 c4 10 add $0x10,%esp 113fd4: 8b 55 f4 mov -0xc(%ebp),%edx 113fd7: 85 d2 test %edx,%edx 113fd9: 74 15 je 113ff0 <_POSIX_Semaphore_Wait_support+0x3c> #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 113fdb: e8 0c 38 00 00 call 1177ec <__errno> 113fe0: c7 00 16 00 00 00 movl $0x16,(%eax) 113fe6: b8 ff ff ff ff mov $0xffffffff,%eax } 113feb: 8b 5d fc mov -0x4(%ebp),%ebx 113fee: c9 leave 113fef: c3 ret the_semaphore = _POSIX_Semaphore_Get( sem, &location ); switch ( location ) { case OBJECTS_LOCAL: _CORE_semaphore_Seize( 113ff0: ff 75 10 pushl 0x10(%ebp) 113ff3: 0f b6 db movzbl %bl,%ebx 113ff6: 53 push %ebx 113ff7: ff 70 08 pushl 0x8(%eax) 113ffa: 83 c0 1c add $0x1c,%eax 113ffd: 50 push %eax 113ffe: e8 65 08 00 00 call 114868 <_CORE_semaphore_Seize> <== ALWAYS TAKEN &the_semaphore->Semaphore, the_semaphore->Object.id, blocking, timeout ); _Thread_Enable_dispatch(); 114003: e8 b4 cb ff ff call 110bbc <_Thread_Enable_dispatch> if ( !_Thread_Executing->Wait.return_code ) 114008: 83 c4 10 add $0x10,%esp 11400b: a1 d8 d0 12 00 mov 0x12d0d8,%eax 114010: 8b 40 34 mov 0x34(%eax),%eax 114013: 85 c0 test %eax,%eax 114015: 75 09 jne 114020 <_POSIX_Semaphore_Wait_support+0x6c> 114017: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); } 114019: 8b 5d fc mov -0x4(%ebp),%ebx 11401c: c9 leave 11401d: c3 ret 11401e: 66 90 xchg %ax,%ax <== NOT EXECUTED _Thread_Enable_dispatch(); if ( !_Thread_Executing->Wait.return_code ) return 0; rtems_set_errno_and_return_minus_one( 114020: e8 c7 37 00 00 call 1177ec <__errno> 114025: 89 c3 mov %eax,%ebx 114027: 83 ec 0c sub $0xc,%esp 11402a: a1 d8 d0 12 00 mov 0x12d0d8,%eax 11402f: ff 70 34 pushl 0x34(%eax) 114032: e8 c1 26 00 00 call 1166f8 <_POSIX_Semaphore_Translate_core_semaphore_return_code> 114037: 89 03 mov %eax,(%ebx) 114039: b8 ff ff ff ff mov $0xffffffff,%eax 11403e: 83 c4 10 add $0x10,%esp 114041: eb a8 jmp 113feb <_POSIX_Semaphore_Wait_support+0x37> 00110164 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch>: #include void _POSIX_Thread_Evaluate_cancellation_and_enable_dispatch( Thread_Control *the_thread ) { 110164: 55 push %ebp 110165: 89 e5 mov %esp,%ebp 110167: 83 ec 08 sub $0x8,%esp 11016a: 8b 55 08 mov 0x8(%ebp),%edx POSIX_API_Control *thread_support; thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ]; 11016d: 8b 82 f8 00 00 00 mov 0xf8(%edx),%eax if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && 110173: 8b 88 cc 00 00 00 mov 0xcc(%eax),%ecx 110179: 85 c9 test %ecx,%ecx 11017b: 75 09 jne 110186 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x22> <== ALWAYS TAKEN thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS && 11017d: 83 b8 d0 00 00 00 01 cmpl $0x1,0xd0(%eax) 110184: 74 06 je 11018c <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x28> _Thread_Unnest_dispatch(); _POSIX_Thread_Exit( the_thread, PTHREAD_CANCELED ); } else _Thread_Enable_dispatch(); } 110186: 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(); 110187: e9 74 d7 ff ff jmp 10d900 <_Thread_Enable_dispatch> thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ]; if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS && thread_support->cancelation_requested ) { 11018c: 8b 80 d4 00 00 00 mov 0xd4(%eax),%eax 110192: 85 c0 test %eax,%eax 110194: 74 f0 je 110186 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x22> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 110196: a1 b8 88 12 00 mov 0x1288b8,%eax 11019b: 48 dec %eax 11019c: a3 b8 88 12 00 mov %eax,0x1288b8 _Thread_Unnest_dispatch(); _POSIX_Thread_Exit( the_thread, PTHREAD_CANCELED ); 1101a1: 83 ec 08 sub $0x8,%esp 1101a4: 6a ff push $0xffffffff 1101a6: 52 push %edx 1101a7: e8 18 06 00 00 call 1107c4 <_POSIX_Thread_Exit> <== ALWAYS TAKEN { POSIX_API_Control *thread_support; thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ]; if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && 1101ac: 83 c4 10 add $0x10,%esp _Thread_Unnest_dispatch(); _POSIX_Thread_Exit( the_thread, PTHREAD_CANCELED ); } else _Thread_Enable_dispatch(); } 1101af: c9 leave 1101b0: c3 ret 001111f0 <_POSIX_Thread_Translate_sched_param>: int policy, struct sched_param *param, Thread_CPU_budget_algorithms *budget_algorithm, Thread_CPU_budget_algorithm_callout *budget_callout ) { 1111f0: 55 push %ebp 1111f1: 89 e5 mov %esp,%ebp 1111f3: 57 push %edi 1111f4: 56 push %esi 1111f5: 53 push %ebx 1111f6: 83 ec 18 sub $0x18,%esp 1111f9: 8b 5d 08 mov 0x8(%ebp),%ebx 1111fc: 8b 75 0c mov 0xc(%ebp),%esi 1111ff: 8b 7d 10 mov 0x10(%ebp),%edi if ( !_POSIX_Priority_Is_valid( param->sched_priority ) ) 111202: ff 36 pushl (%esi) 111204: e8 cb ff ff ff call 1111d4 <_POSIX_Priority_Is_valid> <== ALWAYS TAKEN 111209: 83 c4 10 add $0x10,%esp 11120c: 84 c0 test %al,%al 11120e: 74 2a je 11123a <_POSIX_Thread_Translate_sched_param+0x4a> <== ALWAYS TAKEN return EINVAL; *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; 111210: c7 07 00 00 00 00 movl $0x0,(%edi) *budget_callout = NULL; 111216: 8b 45 14 mov 0x14(%ebp),%eax 111219: c7 00 00 00 00 00 movl $0x0,(%eax) if ( policy == SCHED_OTHER ) { 11121f: 85 db test %ebx,%ebx 111221: 74 25 je 111248 <_POSIX_Thread_Translate_sched_param+0x58> *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; return 0; } if ( policy == SCHED_FIFO ) { 111223: 83 fb 01 cmp $0x1,%ebx 111226: 0f 84 90 00 00 00 je 1112bc <_POSIX_Thread_Translate_sched_param+0xcc> *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; return 0; } if ( policy == SCHED_RR ) { 11122c: 83 fb 02 cmp $0x2,%ebx 11122f: 0f 84 97 00 00 00 je 1112cc <_POSIX_Thread_Translate_sched_param+0xdc> *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE; return 0; } if ( policy == SCHED_SPORADIC ) { 111235: 83 fb 03 cmp $0x3,%ebx 111238: 74 1e je 111258 <_POSIX_Thread_Translate_sched_param+0x68> if ( !_POSIX_Priority_Is_valid( param->ss_low_priority ) ) return EINVAL; *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_CALLOUT; *budget_callout = _POSIX_Threads_Sporadic_budget_callout; return 0; 11123a: b8 16 00 00 00 mov $0x16,%eax } return EINVAL; } 11123f: 8d 65 f4 lea -0xc(%ebp),%esp 111242: 5b pop %ebx 111243: 5e pop %esi 111244: 5f pop %edi 111245: c9 leave 111246: c3 ret 111247: 90 nop <== NOT EXECUTED *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; *budget_callout = NULL; if ( policy == SCHED_OTHER ) { *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; 111248: c7 07 01 00 00 00 movl $0x1,(%edi) 11124e: 31 c0 xor %eax,%eax *budget_callout = _POSIX_Threads_Sporadic_budget_callout; return 0; } return EINVAL; } 111250: 8d 65 f4 lea -0xc(%ebp),%esp 111253: 5b pop %ebx 111254: 5e pop %esi 111255: 5f pop %edi 111256: c9 leave 111257: c3 ret *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE; return 0; } if ( policy == SCHED_SPORADIC ) { if ( (param->ss_replenish_period.tv_sec == 0) && 111258: 8b 5e 08 mov 0x8(%esi),%ebx 11125b: 85 db test %ebx,%ebx 11125d: 75 07 jne 111266 <_POSIX_Thread_Translate_sched_param+0x76> (param->ss_replenish_period.tv_nsec == 0) ) 11125f: 8b 4e 0c mov 0xc(%esi),%ecx 111262: 85 c9 test %ecx,%ecx 111264: 74 d4 je 11123a <_POSIX_Thread_Translate_sched_param+0x4a> return EINVAL; if ( (param->ss_initial_budget.tv_sec == 0) && 111266: 8b 56 10 mov 0x10(%esi),%edx 111269: 85 d2 test %edx,%edx 11126b: 75 07 jne 111274 <_POSIX_Thread_Translate_sched_param+0x84> (param->ss_initial_budget.tv_nsec == 0) ) 11126d: 8b 46 14 mov 0x14(%esi),%eax 111270: 85 c0 test %eax,%eax 111272: 74 c6 je 11123a <_POSIX_Thread_Translate_sched_param+0x4a> return EINVAL; if ( _Timespec_To_ticks( ¶m->ss_replenish_period ) < 111274: 83 ec 0c sub $0xc,%esp 111277: 8d 46 08 lea 0x8(%esi),%eax 11127a: 50 push %eax 11127b: e8 08 df ff ff call 10f188 <_Timespec_To_ticks> 111280: 89 c3 mov %eax,%ebx 111282: 8d 46 10 lea 0x10(%esi),%eax 111285: 89 04 24 mov %eax,(%esp) 111288: e8 fb de ff ff call 10f188 <_Timespec_To_ticks> 11128d: 83 c4 10 add $0x10,%esp 111290: 39 c3 cmp %eax,%ebx 111292: 72 a6 jb 11123a <_POSIX_Thread_Translate_sched_param+0x4a> _Timespec_To_ticks( ¶m->ss_initial_budget ) ) return EINVAL; if ( !_POSIX_Priority_Is_valid( param->ss_low_priority ) ) 111294: 83 ec 0c sub $0xc,%esp 111297: ff 76 04 pushl 0x4(%esi) 11129a: e8 35 ff ff ff call 1111d4 <_POSIX_Priority_Is_valid> <== ALWAYS TAKEN 11129f: 83 c4 10 add $0x10,%esp 1112a2: 84 c0 test %al,%al 1112a4: 74 94 je 11123a <_POSIX_Thread_Translate_sched_param+0x4a> return EINVAL; *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_CALLOUT; 1112a6: c7 07 03 00 00 00 movl $0x3,(%edi) *budget_callout = _POSIX_Threads_Sporadic_budget_callout; 1112ac: 8b 45 14 mov 0x14(%ebp),%eax 1112af: c7 00 3c bb 10 00 movl $0x10bb3c,(%eax) 1112b5: 31 c0 xor %eax,%eax return 0; 1112b7: eb 86 jmp 11123f <_POSIX_Thread_Translate_sched_param+0x4f> <== ALWAYS TAKEN 1112b9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; return 0; } if ( policy == SCHED_FIFO ) { *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; 1112bc: c7 07 00 00 00 00 movl $0x0,(%edi) 1112c2: 31 c0 xor %eax,%eax return 0; 1112c4: e9 76 ff ff ff jmp 11123f <_POSIX_Thread_Translate_sched_param+0x4f> <== ALWAYS TAKEN 1112c9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED } if ( policy == SCHED_RR ) { *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE; 1112cc: c7 07 02 00 00 00 movl $0x2,(%edi) 1112d2: 31 c0 xor %eax,%eax return 0; 1112d4: e9 66 ff ff ff jmp 11123f <_POSIX_Thread_Translate_sched_param+0x4f> <== ALWAYS TAKEN 00110124 <_POSIX_Threads_Create_extension>: bool _POSIX_Threads_Create_extension( Thread_Control *executing __attribute__((unused)), Thread_Control *created ) { 110124: 55 push %ebp 110125: 89 e5 mov %esp,%ebp 110127: 57 push %edi 110128: 56 push %esi 110129: 53 push %ebx 11012a: 83 ec 28 sub $0x28,%esp 11012d: 8b 55 0c mov 0xc(%ebp),%edx POSIX_API_Control *api; POSIX_API_Control *executing_api; api = _Workspace_Allocate( sizeof( POSIX_API_Control ) ); 110130: 68 e4 00 00 00 push $0xe4 110135: 89 55 e4 mov %edx,-0x1c(%ebp) 110138: e8 ff e4 ff ff call 10e63c <_Workspace_Allocate> 11013d: 89 c3 mov %eax,%ebx if ( !api ) 11013f: 83 c4 10 add $0x10,%esp 110142: 85 c0 test %eax,%eax 110144: 8b 55 e4 mov -0x1c(%ebp),%edx 110147: 0f 84 07 01 00 00 je 110254 <_POSIX_Threads_Create_extension+0x130> return false; created->API_Extensions[ THREAD_API_POSIX ] = api; 11014d: 89 82 f8 00 00 00 mov %eax,0xf8(%edx) /* XXX check all fields are touched */ api->Attributes = _POSIX_Threads_Default_attributes; 110153: be 60 14 12 00 mov $0x121460,%esi 110158: b9 0e 00 00 00 mov $0xe,%ecx 11015d: 89 c7 mov %eax,%edi 11015f: f3 a5 rep movsl %ds:(%esi),%es:(%edi) api->detachstate = _POSIX_Threads_Default_attributes.detachstate; 110161: c7 40 38 01 00 00 00 movl $0x1,0x38(%eax) api->schedpolicy = _POSIX_Threads_Default_attributes.schedpolicy; 110168: c7 40 7c 01 00 00 00 movl $0x1,0x7c(%eax) api->schedparam = _POSIX_Threads_Default_attributes.schedparam; 11016f: be 78 14 12 00 mov $0x121478,%esi 110174: 8d b8 80 00 00 00 lea 0x80(%eax),%edi 11017a: b1 06 mov $0x6,%cl 11017c: f3 a5 rep movsl %ds:(%esi),%es:(%edi) api->schedparam.sched_priority = 11017e: 0f b6 05 14 32 12 00 movzbl 0x123214,%eax 110185: 2b 42 14 sub 0x14(%edx),%eax 110188: 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; 11018e: c7 83 d4 00 00 00 00 movl $0x0,0xd4(%ebx) 110195: 00 00 00 api->cancelability_state = PTHREAD_CANCEL_ENABLE; 110198: c7 83 cc 00 00 00 00 movl $0x0,0xcc(%ebx) 11019f: 00 00 00 api->cancelability_type = PTHREAD_CANCEL_DEFERRED; 1101a2: c7 83 d0 00 00 00 00 movl $0x0,0xd0(%ebx) 1101a9: 00 00 00 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 1101ac: 8d 83 dc 00 00 00 lea 0xdc(%ebx),%eax 1101b2: 89 83 d8 00 00 00 mov %eax,0xd8(%ebx) the_chain->permanent_null = NULL; 1101b8: c7 83 dc 00 00 00 00 movl $0x0,0xdc(%ebx) 1101bf: 00 00 00 the_chain->last = _Chain_Head(the_chain); 1101c2: 8d 83 d8 00 00 00 lea 0xd8(%ebx),%eax 1101c8: 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; 1101ce: c7 83 c8 00 00 00 00 movl $0x0,0xc8(%ebx) 1101d5: 00 00 00 if ( _Objects_Get_API( created->Object.id ) == OBJECTS_POSIX_API 1101d8: 0f b6 42 0b movzbl 0xb(%edx),%eax 1101dc: 83 e0 07 and $0x7,%eax 1101df: 83 f8 03 cmp $0x3,%eax 1101e2: 74 54 je 110238 <_POSIX_Threads_Create_extension+0x114> #endif ) { executing_api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; api->signals_blocked = executing_api->signals_blocked; } else { api->signals_blocked = 0xffffffff; 1101e4: c7 83 c4 00 00 00 ff movl $0xffffffff,0xc4(%ebx) 1101eb: ff ff ff } _Thread_queue_Initialize( 1101ee: 6a 00 push $0x0 1101f0: 68 00 10 00 00 push $0x1000 1101f5: 6a 00 push $0x0 1101f7: 8d 43 3c lea 0x3c(%ebx),%eax 1101fa: 50 push %eax 1101fb: 89 55 e4 mov %edx,-0x1c(%ebp) 1101fe: e8 21 da ff ff call 10dc24 <_Thread_queue_Initialize> THREAD_QUEUE_DISCIPLINE_FIFO, STATES_WAITING_FOR_JOIN_AT_EXIT, 0 ); _Watchdog_Initialize( 110203: 8b 55 e4 mov -0x1c(%ebp),%edx 110206: 8b 42 08 mov 0x8(%edx),%eax Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 110209: c7 83 a4 00 00 00 00 movl $0x0,0xa4(%ebx) 110210: 00 00 00 the_watchdog->routine = routine; 110213: c7 83 b8 00 00 00 a4 movl $0x1102a4,0xb8(%ebx) 11021a: 02 11 00 the_watchdog->id = id; 11021d: 89 83 bc 00 00 00 mov %eax,0xbc(%ebx) the_watchdog->user_data = user_data; 110223: 89 93 c0 00 00 00 mov %edx,0xc0(%ebx) 110229: b0 01 mov $0x1,%al _POSIX_Threads_Sporadic_budget_TSR, created->Object.id, created ); return true; 11022b: 83 c4 10 add $0x10,%esp } 11022e: 8d 65 f4 lea -0xc(%ebp),%esp 110231: 5b pop %ebx 110232: 5e pop %esi 110233: 5f pop %edi 110234: c9 leave 110235: c3 ret 110236: 66 90 xchg %ax,%ax <== NOT EXECUTED #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; 110238: a1 98 74 12 00 mov 0x127498,%eax 11023d: 8b 80 f8 00 00 00 mov 0xf8(%eax),%eax 110243: 8b 80 c4 00 00 00 mov 0xc4(%eax),%eax 110249: 89 83 c4 00 00 00 mov %eax,0xc4(%ebx) 11024f: eb 9d jmp 1101ee <_POSIX_Threads_Create_extension+0xca> <== ALWAYS TAKEN 110251: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED POSIX_API_Control *api; POSIX_API_Control *executing_api; api = _Workspace_Allocate( sizeof( POSIX_API_Control ) ); if ( !api ) 110254: 31 c0 xor %eax,%eax created->Object.id, created ); return true; } 110256: 8d 65 f4 lea -0xc(%ebp),%esp 110259: 5b pop %ebx 11025a: 5e pop %esi 11025b: 5f pop %edi 11025c: c9 leave 11025d: c3 ret 001100a0 <_POSIX_Threads_Delete_extension>: */ void _POSIX_Threads_Delete_extension( Thread_Control *executing __attribute__((unused)), Thread_Control *deleted ) { 1100a0: 55 push %ebp 1100a1: 89 e5 mov %esp,%ebp 1100a3: 57 push %edi 1100a4: 56 push %esi 1100a5: 53 push %ebx 1100a6: 83 ec 28 sub $0x28,%esp 1100a9: 8b 7d 0c mov 0xc(%ebp),%edi Thread_Control *the_thread; POSIX_API_Control *api; void **value_ptr; api = deleted->API_Extensions[ THREAD_API_POSIX ]; 1100ac: 8b 87 f8 00 00 00 mov 0xf8(%edi),%eax 1100b2: 89 45 e4 mov %eax,-0x1c(%ebp) /* * Run the POSIX cancellation handlers */ _POSIX_Threads_cancel_run( deleted ); 1100b5: 57 push %edi 1100b6: e8 41 23 00 00 call 1123fc <_POSIX_Threads_cancel_run> /* * Run all the key destructors */ _POSIX_Keys_Run_destructors( deleted ); 1100bb: 89 3c 24 mov %edi,(%esp) 1100be: e8 9d 23 00 00 call 112460 <_POSIX_Keys_Run_destructors> /* * Wakeup all the tasks which joined with this one */ value_ptr = (void **) deleted->Wait.return_argument; 1100c3: 8b 77 28 mov 0x28(%edi),%esi while ( (the_thread = _Thread_queue_Dequeue( &api->Join_List )) ) 1100c6: 8b 5d e4 mov -0x1c(%ebp),%ebx 1100c9: 83 c3 3c add $0x3c,%ebx 1100cc: 83 c4 10 add $0x10,%esp 1100cf: eb 08 jmp 1100d9 <_POSIX_Threads_Delete_extension+0x39> <== ALWAYS TAKEN 1100d1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED *(void **)the_thread->Wait.return_argument = value_ptr; 1100d4: 8b 40 28 mov 0x28(%eax),%eax 1100d7: 89 30 mov %esi,(%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 )) ) 1100d9: 83 ec 0c sub $0xc,%esp 1100dc: 53 push %ebx 1100dd: e8 c6 d7 ff ff call 10d8a8 <_Thread_queue_Dequeue> 1100e2: 83 c4 10 add $0x10,%esp 1100e5: 85 c0 test %eax,%eax 1100e7: 75 eb jne 1100d4 <_POSIX_Threads_Delete_extension+0x34> *(void **)the_thread->Wait.return_argument = value_ptr; if ( api->schedpolicy == SCHED_SPORADIC ) 1100e9: 8b 45 e4 mov -0x1c(%ebp),%eax 1100ec: 83 78 7c 03 cmpl $0x3,0x7c(%eax) 1100f0: 74 1e je 110110 <_POSIX_Threads_Delete_extension+0x70> (void) _Watchdog_Remove( &api->Sporadic_timer ); deleted->API_Extensions[ THREAD_API_POSIX ] = NULL; 1100f2: c7 87 f8 00 00 00 00 movl $0x0,0xf8(%edi) 1100f9: 00 00 00 (void) _Workspace_Free( api ); 1100fc: 8b 45 e4 mov -0x1c(%ebp),%eax 1100ff: 89 45 08 mov %eax,0x8(%ebp) } 110102: 8d 65 f4 lea -0xc(%ebp),%esp 110105: 5b pop %ebx 110106: 5e pop %esi 110107: 5f pop %edi 110108: c9 leave if ( api->schedpolicy == SCHED_SPORADIC ) (void) _Watchdog_Remove( &api->Sporadic_timer ); deleted->API_Extensions[ THREAD_API_POSIX ] = NULL; (void) _Workspace_Free( api ); 110109: e9 4a e5 ff ff jmp 10e658 <_Workspace_Free> 11010e: 66 90 xchg %ax,%ax <== NOT EXECUTED while ( (the_thread = _Thread_queue_Dequeue( &api->Join_List )) ) *(void **)the_thread->Wait.return_argument = value_ptr; if ( api->schedpolicy == SCHED_SPORADIC ) (void) _Watchdog_Remove( &api->Sporadic_timer ); 110110: 83 ec 0c sub $0xc,%esp 110113: 05 9c 00 00 00 add $0x9c,%eax 110118: 50 push %eax 110119: e8 1a e4 ff ff call 10e538 <_Watchdog_Remove> 11011e: 83 c4 10 add $0x10,%esp 110121: eb cf jmp 1100f2 <_POSIX_Threads_Delete_extension+0x52> <== ALWAYS TAKEN 0011007c <_POSIX_Threads_Exitted_extension>: * This method is invoked each time a thread exits. */ void _POSIX_Threads_Exitted_extension( Thread_Control *executing ) { 11007c: 55 push %ebp 11007d: 89 e5 mov %esp,%ebp 11007f: 83 ec 08 sub $0x8,%esp 110082: 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 ) 110085: 0f b6 42 0b movzbl 0xb(%edx),%eax 110089: 83 e0 07 and $0x7,%eax 11008c: 83 f8 03 cmp $0x3,%eax 11008f: 74 03 je 110094 <_POSIX_Threads_Exitted_extension+0x18> pthread_exit( executing->Wait.return_argument ); } 110091: c9 leave 110092: c3 ret 110093: 90 nop <== NOT EXECUTED /* * 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 ); 110094: 8b 42 28 mov 0x28(%edx),%eax 110097: 89 45 08 mov %eax,0x8(%ebp) } 11009a: 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 ); 11009b: e9 70 26 00 00 jmp 112710 <== ALWAYS TAKEN 00110020 <_POSIX_Threads_Initialize_user_threads>: * * This routine creates and starts all configured user * initialzation threads. */ void _POSIX_Threads_Initialize_user_threads( void ) { 110020: 55 push %ebp 110021: 89 e5 mov %esp,%ebp 110023: 83 ec 08 sub $0x8,%esp if ( _POSIX_Threads_Initialize_user_threads_p ) 110026: a1 58 56 12 00 mov 0x125658,%eax 11002b: 85 c0 test %eax,%eax 11002d: 74 05 je 110034 <_POSIX_Threads_Initialize_user_threads+0x14> (*_POSIX_Threads_Initialize_user_threads_p)(); } 11002f: c9 leave * initialzation threads. */ void _POSIX_Threads_Initialize_user_threads( void ) { if ( _POSIX_Threads_Initialize_user_threads_p ) (*_POSIX_Threads_Initialize_user_threads_p)(); 110030: ff e0 jmp *%eax 110032: 66 90 xchg %ax,%ax <== NOT EXECUTED } 110034: c9 leave 110035: c3 ret 0010b888 <_POSIX_Threads_Initialize_user_threads_body>: * * Output parameters: NONE */ void _POSIX_Threads_Initialize_user_threads_body(void) { 10b888: 55 push %ebp 10b889: 89 e5 mov %esp,%ebp 10b88b: 57 push %edi 10b88c: 56 push %esi 10b88d: 53 push %ebx 10b88e: 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; 10b891: 8b 3d 54 45 12 00 mov 0x124554,%edi maximum = Configuration_POSIX_API.number_of_initialization_threads; 10b897: a1 50 45 12 00 mov 0x124550,%eax 10b89c: 89 45 a4 mov %eax,-0x5c(%ebp) if ( !user_threads || maximum == 0 ) 10b89f: 85 ff test %edi,%edi 10b8a1: 74 44 je 10b8e7 <_POSIX_Threads_Initialize_user_threads_body+0x5f> <== ALWAYS TAKEN 10b8a3: 85 c0 test %eax,%eax 10b8a5: 74 40 je 10b8e7 <_POSIX_Threads_Initialize_user_threads_body+0x5f> <== ALWAYS TAKEN 10b8a7: 31 db xor %ebx,%ebx 10b8a9: 8d 75 ac lea -0x54(%ebp),%esi for ( index=0 ; index < maximum ; index++ ) { /* * There is no way for these calls to fail in this situation. */ (void) pthread_attr_init( &attr ); 10b8ac: 83 ec 0c sub $0xc,%esp 10b8af: 56 push %esi 10b8b0: e8 27 5a 00 00 call 1112dc <== ALWAYS TAKEN (void) pthread_attr_setinheritsched( &attr, PTHREAD_EXPLICIT_SCHED ); 10b8b5: 5a pop %edx 10b8b6: 59 pop %ecx 10b8b7: 6a 02 push $0x2 10b8b9: 56 push %esi 10b8ba: e8 45 5a 00 00 call 111304 <== ALWAYS TAKEN (void) pthread_attr_setstacksize(&attr, user_threads[ index ].stack_size); 10b8bf: 59 pop %ecx 10b8c0: 58 pop %eax 10b8c1: ff 74 df 04 pushl 0x4(%edi,%ebx,8) 10b8c5: 56 push %esi 10b8c6: e8 6d 5a 00 00 call 111338 <== ALWAYS TAKEN status = pthread_create( 10b8cb: 6a 00 push $0x0 10b8cd: ff 34 df pushl (%edi,%ebx,8) 10b8d0: 56 push %esi 10b8d1: 8d 45 e4 lea -0x1c(%ebp),%eax 10b8d4: 50 push %eax 10b8d5: e8 aa fc ff ff call 10b584 <== ALWAYS TAKEN &thread_id, &attr, user_threads[ index ].thread_entry, NULL ); if ( status ) 10b8da: 83 c4 20 add $0x20,%esp 10b8dd: 85 c0 test %eax,%eax 10b8df: 75 0e jne 10b8ef <_POSIX_Threads_Initialize_user_threads_body+0x67> * * Setting the attributes explicitly is critical, since we don't want * to inherit the idle tasks attributes. */ for ( index=0 ; index < maximum ; index++ ) { 10b8e1: 43 inc %ebx 10b8e2: 39 5d a4 cmp %ebx,-0x5c(%ebp) 10b8e5: 77 c5 ja 10b8ac <_POSIX_Threads_Initialize_user_threads_body+0x24> <== ALWAYS TAKEN NULL ); if ( status ) _Internal_error_Occurred( INTERNAL_ERROR_POSIX_API, true, status ); } } 10b8e7: 8d 65 f4 lea -0xc(%ebp),%esp 10b8ea: 5b pop %ebx 10b8eb: 5e pop %esi 10b8ec: 5f pop %edi 10b8ed: c9 leave 10b8ee: c3 ret &attr, user_threads[ index ].thread_entry, NULL ); if ( status ) _Internal_error_Occurred( INTERNAL_ERROR_POSIX_API, true, status ); 10b8ef: 52 push %edx 10b8f0: 50 push %eax 10b8f1: 6a 01 push $0x1 10b8f3: 6a 02 push $0x2 10b8f5: e8 a6 1d 00 00 call 10d6a0 <_Internal_error_Occurred> 001102a4 <_POSIX_Threads_Sporadic_budget_TSR>: */ void _POSIX_Threads_Sporadic_budget_TSR( Objects_Id id __attribute__((unused)), void *argument ) { 1102a4: 55 push %ebp 1102a5: 89 e5 mov %esp,%ebp 1102a7: 56 push %esi 1102a8: 53 push %ebx 1102a9: 8b 75 0c mov 0xc(%ebp),%esi Thread_Control *the_thread; POSIX_API_Control *api; the_thread = argument; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 1102ac: 8b 9e f8 00 00 00 mov 0xf8(%esi),%ebx /* ticks is guaranteed to be at least one */ ticks = _Timespec_To_ticks( &api->schedparam.ss_initial_budget ); 1102b2: 83 ec 0c sub $0xc,%esp 1102b5: 8d 83 90 00 00 00 lea 0x90(%ebx),%eax 1102bb: 50 push %eax 1102bc: e8 77 11 00 00 call 111438 <_Timespec_To_ticks> the_thread->cpu_time_budget = ticks; 1102c1: 89 46 78 mov %eax,0x78(%esi) 1102c4: 0f b6 05 14 32 12 00 movzbl 0x123214,%eax 1102cb: 2b 83 98 00 00 00 sub 0x98(%ebx),%eax new_priority = _POSIX_Priority_To_core( api->ss_high_priority ); the_thread->real_priority = new_priority; 1102d1: 89 46 18 mov %eax,0x18(%esi) */ #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 ) { 1102d4: 83 c4 10 add $0x10,%esp 1102d7: 8b 4e 1c mov 0x1c(%esi),%ecx 1102da: 85 c9 test %ecx,%ecx 1102dc: 75 05 jne 1102e3 <_POSIX_Threads_Sporadic_budget_TSR+0x3f> <== ALWAYS TAKEN /* * If this would make them less important, then do not change it. */ if ( the_thread->current_priority > new_priority ) { 1102de: 39 46 14 cmp %eax,0x14(%esi) 1102e1: 77 35 ja 110318 <_POSIX_Threads_Sporadic_budget_TSR+0x74> #endif } } /* ticks is guaranteed to be at least one */ ticks = _Timespec_To_ticks( &api->schedparam.ss_replenish_period ); 1102e3: 83 ec 0c sub $0xc,%esp 1102e6: 8d 83 88 00 00 00 lea 0x88(%ebx),%eax 1102ec: 50 push %eax 1102ed: e8 46 11 00 00 call 111438 <_Timespec_To_ticks> Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 1102f2: 89 83 a8 00 00 00 mov %eax,0xa8(%ebx) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 1102f8: 83 c4 10 add $0x10,%esp 1102fb: 81 c3 9c 00 00 00 add $0x9c,%ebx 110301: 89 5d 0c mov %ebx,0xc(%ebp) 110304: c7 45 08 b8 74 12 00 movl $0x1274b8,0x8(%ebp) _Watchdog_Insert_ticks( &api->Sporadic_timer, ticks ); } 11030b: 8d 65 f8 lea -0x8(%ebp),%esp 11030e: 5b pop %ebx 11030f: 5e pop %esi 110310: c9 leave 110311: e9 ea e0 ff ff jmp 10e400 <_Watchdog_Insert> 110316: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( the_thread->resource_count == 0 ) { /* * If this would make them less important, then do not change it. */ if ( the_thread->current_priority > new_priority ) { _Thread_Change_priority( the_thread, new_priority, true ); 110318: 52 push %edx 110319: 6a 01 push $0x1 11031b: 50 push %eax 11031c: 56 push %esi 11031d: e8 aa cc ff ff call 10cfcc <_Thread_Change_priority> 110322: 83 c4 10 add $0x10,%esp 110325: eb bc jmp 1102e3 <_POSIX_Threads_Sporadic_budget_TSR+0x3f> <== ALWAYS TAKEN 00110260 <_POSIX_Threads_Sporadic_budget_callout>: * _POSIX_Threads_Sporadic_budget_callout */ void _POSIX_Threads_Sporadic_budget_callout( Thread_Control *the_thread ) { 110260: 55 push %ebp 110261: 89 e5 mov %esp,%ebp 110263: 83 ec 08 sub $0x8,%esp 110266: 8b 45 08 mov 0x8(%ebp),%eax POSIX_API_Control *api; uint32_t new_priority; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 110269: 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 */ 11026f: 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); 110276: 0f b6 15 14 32 12 00 movzbl 0x123214,%edx 11027d: 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; 110283: 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 ) { 110286: 8b 48 1c mov 0x1c(%eax),%ecx 110289: 85 c9 test %ecx,%ecx 11028b: 75 05 jne 110292 <_POSIX_Threads_Sporadic_budget_callout+0x32> <== 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 ) { 11028d: 39 50 14 cmp %edx,0x14(%eax) 110290: 72 02 jb 110294 <_POSIX_Threads_Sporadic_budget_callout+0x34> #if 0 printk( "lower priority\n" ); #endif } } } 110292: c9 leave 110293: c3 ret * 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 ) { _Thread_Change_priority( the_thread, new_priority, true ); 110294: 51 push %ecx 110295: 6a 01 push $0x1 110297: 52 push %edx 110298: 50 push %eax 110299: e8 2e cd ff ff call 10cfcc <_Thread_Change_priority> 11029e: 83 c4 10 add $0x10,%esp #if 0 printk( "lower priority\n" ); #endif } } } 1102a1: c9 leave 1102a2: c3 ret 001123fc <_POSIX_Threads_cancel_run>: #include void _POSIX_Threads_cancel_run( Thread_Control *the_thread ) { 1123fc: 55 push %ebp 1123fd: 89 e5 mov %esp,%ebp 1123ff: 57 push %edi 112400: 56 push %esi 112401: 53 push %ebx 112402: 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 ]; 112405: 8b 45 08 mov 0x8(%ebp),%eax 112408: 8b b0 f8 00 00 00 mov 0xf8(%eax),%esi handler_stack = &thread_support->Cancellation_Handlers; thread_support->cancelability_state = PTHREAD_CANCEL_DISABLE; 11240e: c7 86 cc 00 00 00 01 movl $0x1,0xcc(%esi) 112415: 00 00 00 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 112418: 8d 9e dc 00 00 00 lea 0xdc(%esi),%ebx POSIX_API_Control *thread_support; ISR_Level level; thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ]; handler_stack = &thread_support->Cancellation_Handlers; 11241e: 39 9e d8 00 00 00 cmp %ebx,0xd8(%esi) 112424: 74 30 je 112456 <_POSIX_Threads_cancel_run+0x5a> 112426: 66 90 xchg %ax,%ax thread_support->cancelability_state = PTHREAD_CANCEL_DISABLE; while ( !_Chain_Is_empty( handler_stack ) ) { _ISR_Disable( level ); 112428: 9c pushf 112429: fa cli 11242a: 59 pop %ecx handler = (POSIX_Cancel_Handler_control *) 11242b: 8b 7b 04 mov 0x4(%ebx),%edi ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 11242e: 8b 17 mov (%edi),%edx previous = the_node->previous; 112430: 8b 47 04 mov 0x4(%edi),%eax next->previous = previous; 112433: 89 42 04 mov %eax,0x4(%edx) previous->next = next; 112436: 89 10 mov %edx,(%eax) _Chain_Tail( handler_stack )->previous; _Chain_Extract_unprotected( &handler->Node ); _ISR_Enable( level ); 112438: 51 push %ecx 112439: 9d popf (*handler->routine)( handler->arg ); 11243a: 83 ec 0c sub $0xc,%esp 11243d: ff 77 0c pushl 0xc(%edi) 112440: ff 57 08 call *0x8(%edi) _Workspace_Free( handler ); 112443: 89 3c 24 mov %edi,(%esp) 112446: e8 0d c2 ff ff call 10e658 <_Workspace_Free> POSIX_API_Control *thread_support; ISR_Level level; thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ]; handler_stack = &thread_support->Cancellation_Handlers; 11244b: 83 c4 10 add $0x10,%esp 11244e: 39 9e d8 00 00 00 cmp %ebx,0xd8(%esi) 112454: 75 d2 jne 112428 <_POSIX_Threads_cancel_run+0x2c> <== ALWAYS TAKEN (*handler->routine)( handler->arg ); _Workspace_Free( handler ); } } 112456: 8d 65 f4 lea -0xc(%ebp),%esp 112459: 5b pop %ebx 11245a: 5e pop %esi 11245b: 5f pop %edi 11245c: c9 leave 11245d: c3 ret 00111004 <_POSIX_Timer_Insert_helper>: Watchdog_Interval ticks, Objects_Id id, Watchdog_Service_routine_entry TSR, void *arg ) { 111004: 55 push %ebp 111005: 89 e5 mov %esp,%ebp 111007: 56 push %esi 111008: 53 push %ebx 111009: 8b 5d 08 mov 0x8(%ebp),%ebx ISR_Level level; (void) _Watchdog_Remove( timer ); 11100c: 83 ec 0c sub $0xc,%esp 11100f: 53 push %ebx 111010: e8 2f e0 ff ff call 10f044 <_Watchdog_Remove> _ISR_Disable( level ); 111015: 9c pushf 111016: fa cli 111017: 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 ) { 111018: 83 c4 10 add $0x10,%esp 11101b: 8b 43 08 mov 0x8(%ebx),%eax 11101e: 85 c0 test %eax,%eax 111020: 74 0e je 111030 <_POSIX_Timer_Insert_helper+0x2c> _ISR_Enable( level ); 111022: 56 push %esi 111023: 9d popf 111024: 31 c0 xor %eax,%eax */ _Watchdog_Initialize( timer, TSR, id, arg ); _Watchdog_Insert_ticks( timer, ticks ); _ISR_Enable( level ); return true; } 111026: 8d 65 f8 lea -0x8(%ebp),%esp 111029: 5b pop %ebx 11102a: 5e pop %esi 11102b: c9 leave 11102c: c3 ret 11102d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 111030: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx) the_watchdog->routine = routine; 111037: 8b 45 14 mov 0x14(%ebp),%eax 11103a: 89 43 1c mov %eax,0x1c(%ebx) the_watchdog->id = id; 11103d: 8b 45 10 mov 0x10(%ebp),%eax 111040: 89 43 20 mov %eax,0x20(%ebx) the_watchdog->user_data = user_data; 111043: 8b 45 18 mov 0x18(%ebp),%eax 111046: 89 43 24 mov %eax,0x24(%ebx) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 111049: 8b 45 0c mov 0xc(%ebp),%eax 11104c: 89 43 0c mov %eax,0xc(%ebx) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 11104f: 83 ec 08 sub $0x8,%esp 111052: 53 push %ebx 111053: 68 98 94 12 00 push $0x129498 111058: e8 af de ff ff call 10ef0c <_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 ); 11105d: 56 push %esi 11105e: 9d popf 11105f: b0 01 mov $0x1,%al return true; 111061: 83 c4 10 add $0x10,%esp } 111064: 8d 65 f8 lea -0x8(%ebp),%esp 111067: 5b pop %ebx 111068: 5e pop %esi 111069: c9 leave 11106a: c3 ret 0010b694 <_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) { 10b694: 55 push %ebp 10b695: 89 e5 mov %esp,%ebp 10b697: 53 push %ebx 10b698: 83 ec 04 sub $0x4,%esp 10b69b: 8b 5d 0c mov 0xc(%ebp),%ebx bool activated; ptimer = (POSIX_Timer_Control *)data; /* Increment the number of expirations. */ ptimer->overrun = ptimer->overrun + 1; 10b69e: ff 43 68 incl 0x68(%ebx) /* The timer must be reprogrammed */ if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) || 10b6a1: 8b 53 54 mov 0x54(%ebx),%edx 10b6a4: 85 d2 test %edx,%edx 10b6a6: 75 28 jne 10b6d0 <_POSIX_Timer_TSR+0x3c> ( ptimer->timer_data.it_interval.tv_nsec != 0 ) ) { 10b6a8: 8b 43 58 mov 0x58(%ebx),%eax 10b6ab: 85 c0 test %eax,%eax 10b6ad: 75 21 jne 10b6d0 <_POSIX_Timer_TSR+0x3c> <== NEVER 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; 10b6af: 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 ) ) { 10b6b3: 83 ec 08 sub $0x8,%esp 10b6b6: ff 73 44 pushl 0x44(%ebx) 10b6b9: ff 73 38 pushl 0x38(%ebx) 10b6bc: e8 f7 54 00 00 call 110bb8 } /* After the signal handler returns, the count of expirations of the * timer must be set to 0. */ ptimer->overrun = 0; 10b6c1: c7 43 68 00 00 00 00 movl $0x0,0x68(%ebx) 10b6c8: 83 c4 10 add $0x10,%esp } 10b6cb: 8b 5d fc mov -0x4(%ebp),%ebx 10b6ce: c9 leave 10b6cf: c3 ret ptimer->overrun = ptimer->overrun + 1; /* The timer must be reprogrammed */ if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) || ( ptimer->timer_data.it_interval.tv_nsec != 0 ) ) { activated = _POSIX_Timer_Insert_helper( 10b6d0: 83 ec 0c sub $0xc,%esp 10b6d3: 53 push %ebx 10b6d4: 68 94 b6 10 00 push $0x10b694 10b6d9: ff 73 08 pushl 0x8(%ebx) 10b6dc: ff 73 64 pushl 0x64(%ebx) 10b6df: 8d 43 10 lea 0x10(%ebx),%eax 10b6e2: 50 push %eax 10b6e3: e8 1c 59 00 00 call 111004 <_POSIX_Timer_Insert_helper> ptimer->ticks, ptimer->Object.id, _POSIX_Timer_TSR, ptimer ); if ( !activated ) 10b6e8: 83 c4 20 add $0x20,%esp 10b6eb: 84 c0 test %al,%al 10b6ed: 74 dc je 10b6cb <_POSIX_Timer_TSR+0x37> <== ALWAYS TAKEN return; /* Store the time when the timer was started again */ _TOD_Get( &ptimer->time ); 10b6ef: 83 ec 0c sub $0xc,%esp 10b6f2: 8d 43 6c lea 0x6c(%ebx),%eax 10b6f5: 50 push %eax 10b6f6: e8 65 16 00 00 call 10cd60 <_TOD_Get> /* The state really did not change but just to be safe */ ptimer->state = POSIX_TIMER_STATE_CREATE_RUN; 10b6fb: 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 ) || 10b6ff: 83 c4 10 add $0x10,%esp 10b702: eb af jmp 10b6b3 <_POSIX_Timer_TSR+0x1f> <== ALWAYS TAKEN 001123e0 <_POSIX_signals_Alarm_TSR>: void _POSIX_signals_Alarm_TSR( Objects_Id id __attribute__((unused)), void *argument __attribute__((unused)) ) { 1123e0: 55 push %ebp 1123e1: 89 e5 mov %esp,%ebp 1123e3: 83 ec 08 sub $0x8,%esp int status; status = kill( getpid(), SIGALRM ); 1123e6: e8 35 ff ff ff call 112320 1123eb: c7 45 0c 0e 00 00 00 movl $0xe,0xc(%ebp) 1123f2: 89 45 08 mov %eax,0x8(%ebp) /* XXX can't print from an ISR, should this be fatal? */ } 1123f5: c9 leave void *argument __attribute__((unused)) ) { int status; status = kill( getpid(), SIGALRM ); 1123f6: e9 05 01 00 00 jmp 112500 <== ALWAYS TAKEN 00112518 <_POSIX_signals_Check_signal>: bool _POSIX_signals_Check_signal( POSIX_API_Control *api, int signo, bool is_global ) { 112518: 55 push %ebp 112519: 89 e5 mov %esp,%ebp 11251b: 57 push %edi 11251c: 56 push %esi 11251d: 53 push %ebx 11251e: 83 ec 48 sub $0x48,%esp 112521: 8b 75 08 mov 0x8(%ebp),%esi 112524: 8b 5d 0c mov 0xc(%ebp),%ebx siginfo_t siginfo_struct; sigset_t saved_signals_blocked; if ( ! _POSIX_signals_Clear_signals( api, signo, &siginfo_struct, 112527: 6a 01 push $0x1 112529: 0f b6 45 10 movzbl 0x10(%ebp),%eax 11252d: 50 push %eax 11252e: 8d 7d dc lea -0x24(%ebp),%edi 112531: 57 push %edi 112532: 53 push %ebx 112533: 56 push %esi 112534: e8 6b 00 00 00 call 1125a4 <_POSIX_signals_Clear_signals> <== ALWAYS TAKEN 112539: 83 c4 20 add $0x20,%esp 11253c: 84 c0 test %al,%al 11253e: 74 58 je 112598 <_POSIX_signals_Check_signal+0x80> #endif /* * Just to prevent sending a signal which is currently being ignored. */ if ( _POSIX_signals_Vectors[ signo ].sa_handler == SIG_IGN ) 112540: 8d 04 5b lea (%ebx,%ebx,2),%eax 112543: c1 e0 02 shl $0x2,%eax 112546: 8b 90 c8 79 12 00 mov 0x1279c8(%eax),%edx 11254c: 89 55 c4 mov %edx,-0x3c(%ebp) 11254f: 4a dec %edx 112550: 74 46 je 112598 <_POSIX_signals_Check_signal+0x80> <== ALWAYS TAKEN return false; /* * Block the signals requested in sa_mask */ saved_signals_blocked = api->signals_blocked; 112552: 8b 8e c4 00 00 00 mov 0xc4(%esi),%ecx api->signals_blocked |= _POSIX_signals_Vectors[ signo ].sa_mask; 112558: 8b 90 c4 79 12 00 mov 0x1279c4(%eax),%edx 11255e: 09 ca or %ecx,%edx 112560: 89 96 c4 00 00 00 mov %edx,0xc4(%esi) /* * Here, the signal handler function executes */ switch ( _POSIX_signals_Vectors[ signo ].sa_flags ) { 112566: 83 b8 c0 79 12 00 02 cmpl $0x2,0x1279c0(%eax) 11256d: 74 21 je 112590 <_POSIX_signals_Check_signal+0x78> &siginfo_struct, NULL /* context is undefined per 1003.1b-1993, p. 66 */ ); break; default: (*_POSIX_signals_Vectors[ signo ].sa_handler)( signo ); 11256f: 83 ec 0c sub $0xc,%esp 112572: 53 push %ebx 112573: 89 4d d4 mov %ecx,-0x2c(%ebp) 112576: ff 55 c4 call *-0x3c(%ebp) 112579: 83 c4 10 add $0x10,%esp 11257c: 8b 4d d4 mov -0x2c(%ebp),%ecx } /* * Restore the previous set of blocked signals */ api->signals_blocked = saved_signals_blocked; 11257f: 89 8e c4 00 00 00 mov %ecx,0xc4(%esi) 112585: b0 01 mov $0x1,%al return true; } 112587: 8d 65 f4 lea -0xc(%ebp),%esp 11258a: 5b pop %ebx 11258b: 5e pop %esi 11258c: 5f pop %edi 11258d: c9 leave 11258e: c3 ret 11258f: 90 nop <== NOT EXECUTED /* * Here, the signal handler function executes */ switch ( _POSIX_signals_Vectors[ signo ].sa_flags ) { case SA_SIGINFO: (*_POSIX_signals_Vectors[ signo ].sa_sigaction)( 112590: 50 push %eax 112591: 6a 00 push $0x0 112593: 57 push %edi 112594: eb dc jmp 112572 <_POSIX_signals_Check_signal+0x5a> <== ALWAYS TAKEN 112596: 66 90 xchg %ax,%ax <== NOT EXECUTED /* * Restore the previous set of blocked signals */ api->signals_blocked = saved_signals_blocked; return true; 112598: 31 c0 xor %eax,%eax } 11259a: 8d 65 f4 lea -0xc(%ebp),%esp 11259d: 5b pop %ebx 11259e: 5e pop %esi 11259f: 5f pop %edi 1125a0: c9 leave 1125a1: c3 ret 0011352c <_POSIX_signals_Clear_process_signals>: */ void _POSIX_signals_Clear_process_signals( int signo ) { 11352c: 55 push %ebp 11352d: 89 e5 mov %esp,%ebp 11352f: 53 push %ebx 113530: 8b 4d 08 mov 0x8(%ebp),%ecx clear_signal = true; mask = signo_to_mask( signo ); ISR_Level level; _ISR_Disable( level ); 113533: 9c pushf 113534: fa cli 113535: 5a pop %edx if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) { 113536: 8d 04 49 lea (%ecx,%ecx,2),%eax 113539: c1 e0 02 shl $0x2,%eax 11353c: 83 b8 c0 79 12 00 02 cmpl $0x2,0x1279c0(%eax) 113543: 74 23 je 113568 <_POSIX_signals_Clear_process_signals+0x3c> if ( !_Chain_Is_empty( &_POSIX_signals_Siginfo[ signo ] ) ) clear_signal = false; } if ( clear_signal ) { _POSIX_signals_Pending &= ~mask; 113545: 49 dec %ecx 113546: b8 fe ff ff ff mov $0xfffffffe,%eax 11354b: d3 c0 rol %cl,%eax 11354d: 23 05 a0 7b 12 00 and 0x127ba0,%eax 113553: a3 a0 7b 12 00 mov %eax,0x127ba0 if ( !_POSIX_signals_Pending ) 113558: 85 c0 test %eax,%eax 11355a: 75 06 jne 113562 <_POSIX_signals_Clear_process_signals+0x36> <== ALWAYS TAKEN _Thread_Do_post_task_switch_extension--; 11355c: ff 0d 7c 74 12 00 decl 0x12747c } _ISR_Enable( level ); 113562: 52 push %edx 113563: 9d popf } 113564: 5b pop %ebx 113565: c9 leave 113566: c3 ret 113567: 90 nop <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 113568: 8d 98 c4 7b 12 00 lea 0x127bc4(%eax),%ebx 11356e: 39 98 c0 7b 12 00 cmp %ebx,0x127bc0(%eax) 113574: 75 ec jne 113562 <_POSIX_signals_Clear_process_signals+0x36> <== ALWAYS TAKEN 113576: eb cd jmp 113545 <_POSIX_signals_Clear_process_signals+0x19> <== ALWAYS TAKEN 001125a4 <_POSIX_signals_Clear_signals>: int signo, siginfo_t *info, bool is_global, bool check_blocked ) { 1125a4: 55 push %ebp 1125a5: 89 e5 mov %esp,%ebp 1125a7: 57 push %edi 1125a8: 56 push %esi 1125a9: 53 push %ebx 1125aa: 83 ec 1c sub $0x1c,%esp 1125ad: 8b 5d 0c mov 0xc(%ebp),%ebx 1125b0: 0f b6 7d 14 movzbl 0x14(%ebp),%edi static inline sigset_t signo_to_mask( uint32_t sig ) { return 1u << (sig - 1); 1125b4: 8d 4b ff lea -0x1(%ebx),%ecx 1125b7: b8 01 00 00 00 mov $0x1,%eax 1125bc: d3 e0 shl %cl,%eax /* 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 ) 1125be: 80 7d 18 00 cmpb $0x0,0x18(%ebp) 1125c2: 75 3c jne 112600 <_POSIX_signals_Clear_signals+0x5c> 1125c4: b9 ff ff ff ff mov $0xffffffff,%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 ); 1125c9: 9c pushf 1125ca: fa cli 1125cb: 8f 45 e4 popl -0x1c(%ebp) if ( is_global ) { 1125ce: 89 fa mov %edi,%edx 1125d0: 84 d2 test %dl,%dl 1125d2: 74 3c je 112610 <_POSIX_signals_Clear_signals+0x6c> if ( mask & (_POSIX_signals_Pending & signals_blocked) ) { 1125d4: 23 05 a0 7b 12 00 and 0x127ba0,%eax 1125da: 85 c8 test %ecx,%eax 1125dc: 74 5e je 11263c <_POSIX_signals_Clear_signals+0x98> if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) { 1125de: 8d 14 5b lea (%ebx,%ebx,2),%edx 1125e1: c1 e2 02 shl $0x2,%edx 1125e4: 83 ba c0 79 12 00 02 cmpl $0x2,0x1279c0(%edx) 1125eb: 74 53 je 112640 <_POSIX_signals_Clear_signals+0x9c> &psiginfo->Node ); } else do_callout = false; } _POSIX_signals_Clear_process_signals( signo ); 1125ed: 83 ec 0c sub $0xc,%esp 1125f0: 53 push %ebx 1125f1: e8 36 0f 00 00 call 11352c <_POSIX_signals_Clear_process_signals> <== ALWAYS TAKEN 1125f6: b0 01 mov $0x1,%al 1125f8: 83 c4 10 add $0x10,%esp 1125fb: eb 30 jmp 11262d <_POSIX_signals_Clear_signals+0x89> <== ALWAYS TAKEN 1125fd: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED /* 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 ) signals_blocked = ~api->signals_blocked; 112600: 8b 55 08 mov 0x8(%ebp),%edx 112603: 8b 8a c4 00 00 00 mov 0xc4(%edx),%ecx 112609: f7 d1 not %ecx 11260b: eb bc jmp 1125c9 <_POSIX_signals_Clear_signals+0x25> <== ALWAYS TAKEN 11260d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED } _POSIX_signals_Clear_process_signals( signo ); do_callout = true; } } else { if ( mask & (api->signals_pending & signals_blocked) ) { 112610: 8b 55 08 mov 0x8(%ebp),%edx 112613: 8b 9a c8 00 00 00 mov 0xc8(%edx),%ebx 112619: 89 c6 mov %eax,%esi 11261b: 21 de and %ebx,%esi 11261d: 85 ce test %ecx,%esi 11261f: 74 1b je 11263c <_POSIX_signals_Clear_signals+0x98> api->signals_pending &= ~mask; 112621: f7 d0 not %eax 112623: 21 d8 and %ebx,%eax 112625: 89 82 c8 00 00 00 mov %eax,0xc8(%edx) 11262b: b0 01 mov $0x1,%al do_callout = true; } } _ISR_Enable( level ); 11262d: ff 75 e4 pushl -0x1c(%ebp) 112630: 9d popf return do_callout; } 112631: 8d 65 f4 lea -0xc(%ebp),%esp 112634: 5b pop %ebx 112635: 5e pop %esi 112636: 5f pop %edi 112637: c9 leave 112638: c3 ret 112639: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED _POSIX_signals_Clear_process_signals( signo ); do_callout = true; } } else { if ( mask & (api->signals_pending & signals_blocked) ) { api->signals_pending &= ~mask; 11263c: 31 c0 xor %eax,%eax 11263e: eb ed jmp 11262d <_POSIX_signals_Clear_signals+0x89> <== ALWAYS TAKEN _ISR_Disable( level ); if ( is_global ) { if ( mask & (_POSIX_signals_Pending & signals_blocked) ) { if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) { psiginfo = (POSIX_signals_Siginfo_node *) 112640: 8d 8a c0 7b 12 00 lea 0x127bc0(%edx),%ecx */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 112646: 8b 82 c0 7b 12 00 mov 0x127bc0(%edx),%eax */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 11264c: 8d 71 04 lea 0x4(%ecx),%esi 11264f: 39 f0 cmp %esi,%eax 112651: 74 45 je 112698 <_POSIX_signals_Clear_signals+0xf4> { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; 112653: 8b 30 mov (%eax),%esi the_chain->first = new_first; 112655: 89 b2 c0 7b 12 00 mov %esi,0x127bc0(%edx) new_first->previous = _Chain_Head(the_chain); 11265b: 89 4e 04 mov %ecx,0x4(%esi) _Chain_Get_unprotected( &_POSIX_signals_Siginfo[ signo ] ); _POSIX_signals_Clear_process_signals( signo ); 11265e: 83 ec 0c sub $0xc,%esp 112661: 53 push %ebx 112662: 89 45 e0 mov %eax,-0x20(%ebp) 112665: e8 c2 0e 00 00 call 11352c <_POSIX_signals_Clear_process_signals> <== ALWAYS TAKEN * 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 ) { *info = psiginfo->Info; 11266a: 8b 45 e0 mov -0x20(%ebp),%eax 11266d: 8d 70 08 lea 0x8(%eax),%esi 112670: b9 03 00 00 00 mov $0x3,%ecx 112675: 8b 7d 10 mov 0x10(%ebp),%edi 112678: f3 a5 rep movsl %ds:(%esi),%es:(%edi) Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 11267a: c7 00 44 7b 12 00 movl $0x127b44,(%eax) old_last_node = the_chain->last; 112680: 8b 15 48 7b 12 00 mov 0x127b48,%edx the_chain->last = the_node; 112686: a3 48 7b 12 00 mov %eax,0x127b48 old_last_node->next = the_node; 11268b: 89 02 mov %eax,(%edx) the_node->previous = old_last_node; 11268d: 89 50 04 mov %edx,0x4(%eax) 112690: 83 c4 10 add $0x10,%esp 112693: e9 55 ff ff ff jmp 1125ed <_POSIX_signals_Clear_signals+0x49> <== ALWAYS TAKEN if ( is_global ) { if ( mask & (_POSIX_signals_Pending & signals_blocked) ) { if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) { psiginfo = (POSIX_signals_Siginfo_node *) _Chain_Get_unprotected( &_POSIX_signals_Siginfo[ signo ] ); _POSIX_signals_Clear_process_signals( signo ); 112698: 83 ec 0c sub $0xc,%esp 11269b: 53 push %ebx 11269c: e8 8b 0e 00 00 call 11352c <_POSIX_signals_Clear_process_signals> 1126a1: 83 c4 10 add $0x10,%esp 1126a4: e9 44 ff ff ff jmp 1125ed <_POSIX_signals_Clear_signals+0x49> <== ALWAYS TAKEN 0010bf44 <_POSIX_signals_Get_highest>: #include int _POSIX_signals_Get_highest( sigset_t set ) { 10bf44: 55 push %ebp 10bf45: 89 e5 mov %esp,%ebp 10bf47: 56 push %esi 10bf48: 53 push %ebx 10bf49: 8b 55 08 mov 0x8(%ebp),%edx 10bf4c: b8 1b 00 00 00 mov $0x1b,%eax int signo; for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { if ( set & signo_to_mask( signo ) ) { 10bf51: bb 01 00 00 00 mov $0x1,%ebx 10bf56: 8d 48 ff lea -0x1(%eax),%ecx 10bf59: 89 de mov %ebx,%esi 10bf5b: d3 e6 shl %cl,%esi 10bf5d: 85 d6 test %edx,%esi 10bf5f: 75 20 jne 10bf81 <_POSIX_signals_Get_highest+0x3d> <== ALWAYS TAKEN sigset_t set ) { int signo; for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { 10bf61: 40 inc %eax 10bf62: 83 f8 20 cmp $0x20,%eax 10bf65: 75 ef jne 10bf56 <_POSIX_signals_Get_highest+0x12> 10bf67: 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 ) ) { 10bf69: bb 01 00 00 00 mov $0x1,%ebx 10bf6e: eb 06 jmp 10bf76 <_POSIX_signals_Get_highest+0x32> <== ALWAYS TAKEN */ #if (SIGHUP != 1) #error "Assumption that SIGHUP==1 violated!!" #endif for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) { 10bf70: 40 inc %eax 10bf71: 83 f8 1b cmp $0x1b,%eax 10bf74: 74 0b je 10bf81 <_POSIX_signals_Get_highest+0x3d> <== ALWAYS TAKEN if ( set & signo_to_mask( signo ) ) { 10bf76: 8d 48 ff lea -0x1(%eax),%ecx 10bf79: 89 de mov %ebx,%esi 10bf7b: d3 e6 shl %cl,%esi 10bf7d: 85 d6 test %edx,%esi 10bf7f: 74 ef je 10bf70 <_POSIX_signals_Get_highest+0x2c> * a return 0. This routine will NOT be called unless a signal * is pending in the set passed in. */ found_it: return signo; } 10bf81: 5b pop %ebx 10bf82: 5e pop %esi 10bf83: c9 leave 10bf84: c3 ret 0010fe68 <_POSIX_signals_Manager_Initialization>: * * _POSIX_signals_Manager_Initialization */ void _POSIX_signals_Manager_Initialization(void) { 10fe68: 55 push %ebp 10fe69: 89 e5 mov %esp,%ebp 10fe6b: 57 push %edi 10fe6c: 56 push %esi 10fe6d: 53 push %ebx 10fe6e: 83 ec 18 sub $0x18,%esp uint32_t signo; uint32_t maximum_queued_signals; maximum_queued_signals = Configuration_POSIX_API.maximum_queued_signals; 10fe71: 8b 1d 34 56 12 00 mov 0x125634,%ebx assert( sizeof(_POSIX_signals_Vectors) == sizeof(_POSIX_signals_Default_vectors) ); #endif memcpy( 10fe77: b8 c0 79 12 00 mov $0x1279c0,%eax 10fe7c: be e0 12 12 00 mov $0x1212e0,%esi 10fe81: b9 60 00 00 00 mov $0x60,%ecx 10fe86: 89 c7 mov %eax,%edi 10fe88: f3 a5 rep movsl %ds:(%esi),%es:(%edi) ); /* * Initialize the set of pending signals for the entire process */ sigemptyset( &_POSIX_signals_Pending ); 10fe8a: 68 a0 7b 12 00 push $0x127ba0 10fe8f: e8 e4 04 00 00 call 110378 <== ALWAYS TAKEN /* * Initialize the queue we use to block for signals */ _Thread_queue_Initialize( 10fe94: 6a 0b push $0xb 10fe96: 68 00 80 00 10 push $0x10008000 10fe9b: 6a 00 push $0x0 10fe9d: 68 60 7b 12 00 push $0x127b60 10fea2: e8 7d dd ff ff call 10dc24 <_Thread_queue_Initialize> 10fea7: b8 cc 7b 12 00 mov $0x127bcc,%eax /*PAGE * * _POSIX_signals_Manager_Initialization */ void _POSIX_signals_Manager_Initialization(void) 10feac: 83 c4 20 add $0x20,%esp 10feaf: 90 nop */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 10feb0: 8d 50 04 lea 0x4(%eax),%edx 10feb3: 89 10 mov %edx,(%eax) the_chain->permanent_null = NULL; 10feb5: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax) the_chain->last = _Chain_Head(the_chain); 10febc: 89 40 08 mov %eax,0x8(%eax) 10febf: 83 c0 0c add $0xc,%eax /* XXX status codes */ /* * Allocate the siginfo pools. */ for ( signo=1 ; signo<= SIGRTMAX ; signo++ ) 10fec2: 3d 40 7d 12 00 cmp $0x127d40,%eax 10fec7: 75 e7 jne 10feb0 <_POSIX_signals_Manager_Initialization+0x48> _Chain_Initialize_empty( &_POSIX_signals_Siginfo[ signo ] ); if ( maximum_queued_signals ) { 10fec9: 85 db test %ebx,%ebx 10fecb: 75 76 jne 10ff43 <_POSIX_signals_Manager_Initialization+0xdb> */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 10fecd: c7 05 40 7b 12 00 44 movl $0x127b44,0x127b40 10fed4: 7b 12 00 the_chain->permanent_null = NULL; 10fed7: c7 05 44 7b 12 00 00 movl $0x0,0x127b44 10fede: 00 00 00 the_chain->last = _Chain_Head(the_chain); 10fee1: c7 05 48 7b 12 00 40 movl $0x127b40,0x127b48 10fee8: 7b 12 00 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 10feeb: c7 05 28 7e 12 00 00 movl $0x0,0x127e28 10fef2: 00 00 00 the_watchdog->routine = routine; 10fef5: c7 05 3c 7e 12 00 00 movl $0x0,0x127e3c 10fefc: 00 00 00 the_watchdog->id = id; 10feff: c7 05 40 7e 12 00 00 movl $0x0,0x127e40 10ff06: 00 00 00 the_watchdog->user_data = user_data; 10ff09: c7 05 44 7e 12 00 00 movl $0x0,0x127e44 10ff10: 00 00 00 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 10ff13: c7 05 48 7d 12 00 00 movl $0x0,0x127d48 10ff1a: 00 00 00 the_watchdog->routine = routine; 10ff1d: c7 05 5c 7d 12 00 00 movl $0x0,0x127d5c 10ff24: 00 00 00 the_watchdog->id = id; 10ff27: c7 05 60 7d 12 00 00 movl $0x0,0x127d60 10ff2e: 00 00 00 the_watchdog->user_data = user_data; 10ff31: c7 05 64 7d 12 00 00 movl $0x0,0x127d64 10ff38: 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 ); } 10ff3b: 8d 65 f4 lea -0xc(%ebp),%esp 10ff3e: 5b pop %ebx 10ff3f: 5e pop %esi 10ff40: 5f pop %edi 10ff41: c9 leave 10ff42: c3 ret */ for ( signo=1 ; signo<= SIGRTMAX ; signo++ ) _Chain_Initialize_empty( &_POSIX_signals_Siginfo[ signo ] ); if ( maximum_queued_signals ) { _Chain_Initialize( 10ff43: 83 ec 0c sub $0xc,%esp 10ff46: 8d 04 9b lea (%ebx,%ebx,4),%eax 10ff49: c1 e0 02 shl $0x2,%eax 10ff4c: 50 push %eax 10ff4d: e8 be e6 ff ff call 10e610 <_Workspace_Allocate_or_fatal_error> 10ff52: 6a 14 push $0x14 10ff54: 53 push %ebx 10ff55: 50 push %eax 10ff56: 68 40 7b 12 00 push $0x127b40 10ff5b: e8 48 0a 00 00 call 1109a8 <_Chain_Initialize> <== ALWAYS TAKEN 10ff60: 83 c4 20 add $0x20,%esp 10ff63: eb 86 jmp 10feeb <_POSIX_signals_Manager_Initialization+0x83> <== ALWAYS TAKEN 0010ff68 <_POSIX_signals_Post_switch_extension>: */ void _POSIX_signals_Post_switch_extension( Thread_Control *the_thread ) { 10ff68: 55 push %ebp 10ff69: 89 e5 mov %esp,%ebp 10ff6b: 56 push %esi 10ff6c: 53 push %ebx POSIX_API_Control *api; int signo; ISR_Level level; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 10ff6d: 8b 45 08 mov 0x8(%ebp),%eax 10ff70: 8b b0 f8 00 00 00 mov 0xf8(%eax),%esi 10ff76: 66 90 xchg %ax,%ax * * 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 ); 10ff78: 9c pushf 10ff79: fa cli 10ff7a: 59 pop %ecx if ( !(~api->signals_blocked & (api->signals_pending | _POSIX_signals_Pending)) ) { 10ff7b: 8b 15 a0 7b 12 00 mov 0x127ba0,%edx 10ff81: 0b 96 c8 00 00 00 or 0xc8(%esi),%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 & 10ff87: 8b 86 c4 00 00 00 mov 0xc4(%esi),%eax 10ff8d: f7 d0 not %eax 10ff8f: 85 c2 test %eax,%edx 10ff91: 74 4a je 10ffdd <_POSIX_signals_Post_switch_extension+0x75> (api->signals_pending | _POSIX_signals_Pending)) ) { _ISR_Enable( level ); break; } _ISR_Enable( level ); 10ff93: 51 push %ecx 10ff94: 9d popf 10ff95: bb 1b 00 00 00 mov $0x1b,%ebx for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { _POSIX_signals_Check_signal( api, signo, false ); 10ff9a: 52 push %edx 10ff9b: 6a 00 push $0x0 10ff9d: 53 push %ebx 10ff9e: 56 push %esi 10ff9f: e8 74 25 00 00 call 112518 <_POSIX_signals_Check_signal> _POSIX_signals_Check_signal( api, signo, true ); 10ffa4: 83 c4 0c add $0xc,%esp 10ffa7: 6a 01 push $0x1 10ffa9: 53 push %ebx 10ffaa: 56 push %esi 10ffab: e8 68 25 00 00 call 112518 <_POSIX_signals_Check_signal> _ISR_Enable( level ); break; } _ISR_Enable( level ); for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { 10ffb0: 43 inc %ebx 10ffb1: 83 c4 10 add $0x10,%esp 10ffb4: 83 fb 20 cmp $0x20,%ebx 10ffb7: 75 e1 jne 10ff9a <_POSIX_signals_Post_switch_extension+0x32> 10ffb9: b3 01 mov $0x1,%bl 10ffbb: 90 nop _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 ); 10ffbc: 50 push %eax 10ffbd: 6a 00 push $0x0 10ffbf: 53 push %ebx 10ffc0: 56 push %esi 10ffc1: e8 52 25 00 00 call 112518 <_POSIX_signals_Check_signal> _POSIX_signals_Check_signal( api, signo, true ); 10ffc6: 83 c4 0c add $0xc,%esp 10ffc9: 6a 01 push $0x1 10ffcb: 53 push %ebx 10ffcc: 56 push %esi 10ffcd: e8 46 25 00 00 call 112518 <_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++ ) { 10ffd2: 43 inc %ebx 10ffd3: 83 c4 10 add $0x10,%esp 10ffd6: 83 fb 1b cmp $0x1b,%ebx 10ffd9: 75 e1 jne 10ffbc <_POSIX_signals_Post_switch_extension+0x54> 10ffdb: eb 9b jmp 10ff78 <_POSIX_signals_Post_switch_extension+0x10> <== ALWAYS TAKEN */ while (1) { _ISR_Disable( level ); if ( !(~api->signals_blocked & (api->signals_pending | _POSIX_signals_Pending)) ) { _ISR_Enable( level ); 10ffdd: 51 push %ecx 10ffde: 9d popf for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) { _POSIX_signals_Check_signal( api, signo, false ); _POSIX_signals_Check_signal( api, signo, true ); } } } 10ffdf: 8d 65 f8 lea -0x8(%ebp),%esp 10ffe2: 5b pop %ebx 10ffe3: 5e pop %esi 10ffe4: c9 leave 10ffe5: c3 ret 001104d8 <_POSIX_signals_Ualarm_TSR>: void _POSIX_signals_Ualarm_TSR( Objects_Id id __attribute__((unused)), void *argument __attribute__((unused)) ) { 1104d8: 55 push %ebp 1104d9: 89 e5 mov %esp,%ebp 1104db: 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 ); 1104de: e8 3d 1e 00 00 call 112320 1104e3: 83 ec 08 sub $0x8,%esp 1104e6: 6a 0e push $0xe 1104e8: 50 push %eax 1104e9: e8 12 20 00 00 call 112500 <== ALWAYS TAKEN RTEMS_INLINE_ROUTINE void _Watchdog_Reset( Watchdog_Control *the_watchdog ) { (void) _Watchdog_Remove( the_watchdog ); 1104ee: c7 04 24 40 7d 12 00 movl $0x127d40,(%esp) 1104f5: e8 3e e0 ff ff call 10e538 <_Watchdog_Remove> _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 1104fa: 83 c4 10 add $0x10,%esp 1104fd: c7 45 0c 40 7d 12 00 movl $0x127d40,0xc(%ebp) 110504: c7 45 08 b8 74 12 00 movl $0x1274b8,0x8(%ebp) /* * If the reset interval is non-zero, reschedule ourselves. */ _Watchdog_Reset( &_POSIX_signals_Ualarm_timer ); } 11050b: c9 leave 11050c: e9 ef de ff ff jmp 10e400 <_Watchdog_Insert> 0011359c <_POSIX_signals_Unblock_thread>: bool _POSIX_signals_Unblock_thread( Thread_Control *the_thread, int signo, siginfo_t *info ) { 11359c: 55 push %ebp 11359d: 89 e5 mov %esp,%ebp 11359f: 57 push %edi 1135a0: 56 push %esi 1135a1: 53 push %ebx 1135a2: 83 ec 0c sub $0xc,%esp 1135a5: 8b 5d 08 mov 0x8(%ebp),%ebx 1135a8: 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 ]; 1135ab: 8b b3 f8 00 00 00 mov 0xf8(%ebx),%esi 1135b1: 8d 4a ff lea -0x1(%edx),%ecx 1135b4: b8 01 00 00 00 mov $0x1,%eax 1135b9: d3 e0 shl %cl,%eax /* * Is the thread is specifically waiting for a signal? */ if ( _States_Is_interruptible_signal( the_thread->current_state ) ) { 1135bb: 8b 4b 10 mov 0x10(%ebx),%ecx 1135be: 89 cf mov %ecx,%edi 1135c0: 81 e7 00 80 00 10 and $0x10008000,%edi 1135c6: 81 ff 00 80 00 10 cmp $0x10008000,%edi 1135cc: 74 6e je 11363c <_POSIX_signals_Unblock_thread+0xa0> } /* * Thread is not waiting due to a sigwait. */ if ( ~api->signals_blocked & mask ) { 1135ce: 8b 96 c4 00 00 00 mov 0xc4(%esi),%edx 1135d4: f7 d2 not %edx 1135d6: 85 d0 test %edx,%eax 1135d8: 74 56 je 113630 <_POSIX_signals_Unblock_thread+0x94> * 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; 1135da: c6 43 74 01 movb $0x1,0x74(%ebx) if ( the_thread->current_state & STATES_INTERRUPTIBLE_BY_SIGNAL ) { 1135de: f7 c1 00 00 00 10 test $0x10000000,%ecx 1135e4: 74 32 je 113618 <_POSIX_signals_Unblock_thread+0x7c> the_thread->Wait.return_code = EINTR; 1135e6: 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) ){ 1135ed: 83 e1 08 and $0x8,%ecx 1135f0: 74 3e je 113630 <_POSIX_signals_Unblock_thread+0x94> <== ALWAYS TAKEN if ( _Watchdog_Is_active( &the_thread->Timer ) ) 1135f2: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 1135f6: 0f 84 a8 00 00 00 je 1136a4 <_POSIX_signals_Unblock_thread+0x108> <== NEVER TAKEN RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 1135fc: 83 ec 08 sub $0x8,%esp 1135ff: 68 f8 ff 03 10 push $0x1003fff8 113604: 53 push %ebx 113605: e8 02 9b ff ff call 10d10c <_Thread_Clear_state> 11360a: 31 c0 xor %eax,%eax 11360c: 83 c4 10 add $0x10,%esp if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) _ISR_Signals_to_thread_executing = true; } } return false; } 11360f: 8d 65 f4 lea -0xc(%ebp),%esp 113612: 5b pop %ebx 113613: 5e pop %esi 113614: 5f pop %edi 113615: c9 leave 113616: c3 ret 113617: 90 nop <== NOT EXECUTED if ( _States_Is_delaying(the_thread->current_state) ){ if ( _Watchdog_Is_active( &the_thread->Timer ) ) (void) _Watchdog_Remove( &the_thread->Timer ); _Thread_Unblock( the_thread ); } } else if ( the_thread->current_state == STATES_READY ) { 113618: 85 c9 test %ecx,%ecx 11361a: 75 14 jne 113630 <_POSIX_signals_Unblock_thread+0x94> <== ALWAYS TAKEN if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) 11361c: a1 74 74 12 00 mov 0x127474,%eax 113621: 85 c0 test %eax,%eax 113623: 74 0b je 113630 <_POSIX_signals_Unblock_thread+0x94> 113625: 3b 1d 98 74 12 00 cmp 0x127498,%ebx 11362b: 74 6b je 113698 <_POSIX_signals_Unblock_thread+0xfc> <== NEVER TAKEN 11362d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED _ISR_Signals_to_thread_executing = true; 113630: 31 c0 xor %eax,%eax } } return false; } 113632: 8d 65 f4 lea -0xc(%ebp),%esp 113635: 5b pop %ebx 113636: 5e pop %esi 113637: 5f pop %edi 113638: c9 leave 113639: c3 ret 11363a: 66 90 xchg %ax,%ax <== NOT EXECUTED * Is the thread is specifically waiting for a signal? */ if ( _States_Is_interruptible_signal( the_thread->current_state ) ) { if ( (the_thread->Wait.option & mask) || (~api->signals_blocked & mask) ) { 11363c: 85 43 30 test %eax,0x30(%ebx) 11363f: 74 33 je 113674 <_POSIX_signals_Unblock_thread+0xd8> the_thread->Wait.return_code = EINTR; 113641: c7 43 34 04 00 00 00 movl $0x4,0x34(%ebx) the_info = (siginfo_t *) the_thread->Wait.return_argument; 113648: 8b 43 28 mov 0x28(%ebx),%eax if ( !info ) { 11364b: 8b 4d 10 mov 0x10(%ebp),%ecx 11364e: 85 c9 test %ecx,%ecx 113650: 74 32 je 113684 <_POSIX_signals_Unblock_thread+0xe8> the_info->si_signo = signo; the_info->si_code = SI_USER; the_info->si_value.sival_int = 0; } else { *the_info = *info; 113652: b9 03 00 00 00 mov $0x3,%ecx 113657: 89 c7 mov %eax,%edi 113659: 8b 75 10 mov 0x10(%ebp),%esi 11365c: f3 a5 rep movsl %ds:(%esi),%es:(%edi) } _Thread_queue_Extract_with_proxy( the_thread ); 11365e: 83 ec 0c sub $0xc,%esp 113661: 53 push %ebx 113662: e8 65 a5 ff ff call 10dbcc <_Thread_queue_Extract_with_proxy> 113667: b0 01 mov $0x1,%al return true; 113669: 83 c4 10 add $0x10,%esp if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) _ISR_Signals_to_thread_executing = true; } } return false; } 11366c: 8d 65 f4 lea -0xc(%ebp),%esp 11366f: 5b pop %ebx 113670: 5e pop %esi 113671: 5f pop %edi 113672: c9 leave 113673: c3 ret * Is the thread is specifically waiting for a signal? */ if ( _States_Is_interruptible_signal( the_thread->current_state ) ) { if ( (the_thread->Wait.option & mask) || (~api->signals_blocked & mask) ) { 113674: 8b 8e c4 00 00 00 mov 0xc4(%esi),%ecx 11367a: f7 d1 not %ecx 11367c: 85 c8 test %ecx,%eax 11367e: 75 c1 jne 113641 <_POSIX_signals_Unblock_thread+0xa5> 113680: eb ae jmp 113630 <_POSIX_signals_Unblock_thread+0x94> <== ALWAYS TAKEN 113682: 66 90 xchg %ax,%ax <== NOT EXECUTED the_thread->Wait.return_code = EINTR; the_info = (siginfo_t *) the_thread->Wait.return_argument; if ( !info ) { the_info->si_signo = signo; 113684: 89 10 mov %edx,(%eax) the_info->si_code = SI_USER; 113686: c7 40 04 01 00 00 00 movl $0x1,0x4(%eax) the_info->si_value.sival_int = 0; 11368d: c7 40 08 00 00 00 00 movl $0x0,0x8(%eax) 113694: eb c8 jmp 11365e <_POSIX_signals_Unblock_thread+0xc2> <== ALWAYS TAKEN 113696: 66 90 xchg %ax,%ax <== NOT EXECUTED (void) _Watchdog_Remove( &the_thread->Timer ); _Thread_Unblock( the_thread ); } } else if ( the_thread->current_state == STATES_READY ) { if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) _ISR_Signals_to_thread_executing = true; 113698: c6 05 48 75 12 00 01 movb $0x1,0x127548 11369f: 31 c0 xor %eax,%eax 1136a1: eb 8f jmp 113632 <_POSIX_signals_Unblock_thread+0x96> <== ALWAYS TAKEN 1136a3: 90 nop <== NOT EXECUTED _Thread_queue_Extract_with_proxy( the_thread ); else #endif if ( _States_Is_delaying(the_thread->current_state) ){ if ( _Watchdog_Is_active( &the_thread->Timer ) ) (void) _Watchdog_Remove( &the_thread->Timer ); 1136a4: 83 ec 0c sub $0xc,%esp 1136a7: 8d 43 48 lea 0x48(%ebx),%eax 1136aa: 50 push %eax 1136ab: e8 88 ae ff ff call 10e538 <_Watchdog_Remove> 1136b0: 83 c4 10 add $0x10,%esp 1136b3: e9 44 ff ff ff jmp 1135fc <_POSIX_signals_Unblock_thread+0x60> <== ALWAYS TAKEN 0012eeec <_Protected_heap_Get_information>: bool _Protected_heap_Get_information( Heap_Control *the_heap, Heap_Information_block *the_info ) { 12eeec: 55 push %ebp 12eeed: 89 e5 mov %esp,%ebp 12eeef: 56 push %esi 12eef0: 53 push %ebx 12eef1: 8b 5d 08 mov 0x8(%ebp),%ebx 12eef4: 8b 75 0c mov 0xc(%ebp),%esi if ( !the_heap ) 12eef7: 85 db test %ebx,%ebx 12eef9: 74 35 je 12ef30 <_Protected_heap_Get_information+0x44> return false; if ( !the_info ) 12eefb: 85 f6 test %esi,%esi 12eefd: 74 31 je 12ef30 <_Protected_heap_Get_information+0x44> return false; _RTEMS_Lock_allocator(); 12eeff: 83 ec 0c sub $0xc,%esp 12ef02: ff 35 f0 f0 16 00 pushl 0x16f0f0 12ef08: e8 0f 2f fe ff call 111e1c <_API_Mutex_Lock> _Heap_Get_information( the_heap, the_info ); 12ef0d: 5a pop %edx 12ef0e: 59 pop %ecx 12ef0f: 56 push %esi 12ef10: 53 push %ebx 12ef11: e8 32 ec 00 00 call 13db48 <_Heap_Get_information> _RTEMS_Unlock_allocator(); 12ef16: 58 pop %eax 12ef17: ff 35 f0 f0 16 00 pushl 0x16f0f0 12ef1d: e8 42 2f fe ff call 111e64 <_API_Mutex_Unlock> 12ef22: b0 01 mov $0x1,%al return true; 12ef24: 83 c4 10 add $0x10,%esp } 12ef27: 8d 65 f8 lea -0x8(%ebp),%esp 12ef2a: 5b pop %ebx 12ef2b: 5e pop %esi 12ef2c: c9 leave 12ef2d: c3 ret 12ef2e: 66 90 xchg %ax,%ax <== NOT EXECUTED _RTEMS_Lock_allocator(); _Heap_Get_information( the_heap, the_info ); _RTEMS_Unlock_allocator(); return true; 12ef30: 31 c0 xor %eax,%eax } 12ef32: 8d 65 f8 lea -0x8(%ebp),%esp 12ef35: 5b pop %ebx 12ef36: 5e pop %esi 12ef37: c9 leave 12ef38: c3 ret 00110758 <_Protected_heap_Walk>: bool _Protected_heap_Walk( Heap_Control *the_heap, int source, bool do_dump ) { 110758: 55 push %ebp 110759: 89 e5 mov %esp,%ebp 11075b: 56 push %esi 11075c: 53 push %ebx 11075d: 83 ec 10 sub $0x10,%esp 110760: 8b 5d 08 mov 0x8(%ebp),%ebx 110763: 8b 75 0c mov 0xc(%ebp),%esi 110766: 8a 45 10 mov 0x10(%ebp),%al * then it is forbidden to lock a mutex. But since we are inside * a critical section, it should be safe to walk it unlocked. * * NOTE: Dispatching is also disabled during initialization. */ if ( !_Thread_Dispatch_disable_level ) { 110769: 8b 15 38 e0 12 00 mov 0x12e038,%edx 11076f: 85 d2 test %edx,%edx 110771: 74 19 je 11078c <_Protected_heap_Walk+0x34> _RTEMS_Lock_allocator(); status = _Heap_Walk( the_heap, source, do_dump ); _RTEMS_Unlock_allocator(); } else { status = _Heap_Walk( the_heap, source, do_dump ); 110773: 0f b6 c0 movzbl %al,%eax 110776: 89 45 10 mov %eax,0x10(%ebp) 110779: 89 75 0c mov %esi,0xc(%ebp) 11077c: 89 5d 08 mov %ebx,0x8(%ebp) } return status; } 11077f: 8d 65 f8 lea -0x8(%ebp),%esp 110782: 5b pop %ebx 110783: 5e pop %esi 110784: c9 leave if ( !_Thread_Dispatch_disable_level ) { _RTEMS_Lock_allocator(); status = _Heap_Walk( the_heap, source, do_dump ); _RTEMS_Unlock_allocator(); } else { status = _Heap_Walk( the_heap, source, do_dump ); 110785: e9 f2 f1 ff ff jmp 10f97c <_Heap_Walk> 11078a: 66 90 xchg %ax,%ax <== NOT EXECUTED * a critical section, it should be safe to walk it unlocked. * * NOTE: Dispatching is also disabled during initialization. */ if ( !_Thread_Dispatch_disable_level ) { _RTEMS_Lock_allocator(); 11078c: 83 ec 0c sub $0xc,%esp 11078f: ff 35 f0 e0 12 00 pushl 0x12e0f0 110795: 88 45 f4 mov %al,-0xc(%ebp) 110798: e8 eb e3 ff ff call 10eb88 <_API_Mutex_Lock> status = _Heap_Walk( the_heap, source, do_dump ); 11079d: 83 c4 0c add $0xc,%esp 1107a0: 8a 45 f4 mov -0xc(%ebp),%al 1107a3: 0f b6 c0 movzbl %al,%eax 1107a6: 50 push %eax 1107a7: 56 push %esi 1107a8: 53 push %ebx 1107a9: e8 ce f1 ff ff call 10f97c <_Heap_Walk> _RTEMS_Unlock_allocator(); 1107ae: 5a pop %edx 1107af: ff 35 f0 e0 12 00 pushl 0x12e0f0 1107b5: 88 45 f4 mov %al,-0xc(%ebp) 1107b8: e8 13 e4 ff ff call 10ebd0 <_API_Mutex_Unlock> 1107bd: 83 c4 10 add $0x10,%esp } else { status = _Heap_Walk( the_heap, source, do_dump ); } return status; } 1107c0: 8a 45 f4 mov -0xc(%ebp),%al 1107c3: 8d 65 f8 lea -0x8(%ebp),%esp 1107c6: 5b pop %ebx 1107c7: 5e pop %esi 1107c8: c9 leave 1107c9: c3 ret 001108c4 <_RTEMS_Tasks_Invoke_task_variable_dtor>: void _RTEMS_Tasks_Invoke_task_variable_dtor( Thread_Control *the_thread, rtems_task_variable_t *tvp ) { 1108c4: 55 push %ebp 1108c5: 89 e5 mov %esp,%ebp 1108c7: 56 push %esi 1108c8: 53 push %ebx 1108c9: 8b 5d 0c mov 0xc(%ebp),%ebx void (*dtor)(void *); void *value; dtor = tvp->dtor; 1108cc: 8b 43 10 mov 0x10(%ebx),%eax if (_Thread_Is_executing(the_thread)) { 1108cf: 8b 55 08 mov 0x8(%ebp),%edx 1108d2: 3b 15 98 74 12 00 cmp 0x127498,%edx 1108d8: 74 1e je 1108f8 <_RTEMS_Tasks_Invoke_task_variable_dtor+0x34> value = *tvp->ptr; *tvp->ptr = tvp->gval; } else { value = tvp->tval; 1108da: 8b 53 0c mov 0xc(%ebx),%edx } if ( dtor ) 1108dd: 85 c0 test %eax,%eax 1108df: 74 09 je 1108ea <_RTEMS_Tasks_Invoke_task_variable_dtor+0x26> (*dtor)(value); 1108e1: 83 ec 0c sub $0xc,%esp 1108e4: 52 push %edx 1108e5: ff d0 call *%eax 1108e7: 83 c4 10 add $0x10,%esp _Workspace_Free(tvp); 1108ea: 89 5d 08 mov %ebx,0x8(%ebp) } 1108ed: 8d 65 f8 lea -0x8(%ebp),%esp 1108f0: 5b pop %ebx 1108f1: 5e pop %esi 1108f2: c9 leave } if ( dtor ) (*dtor)(value); _Workspace_Free(tvp); 1108f3: e9 60 dd ff ff jmp 10e658 <_Workspace_Free> void (*dtor)(void *); void *value; dtor = tvp->dtor; if (_Thread_Is_executing(the_thread)) { value = *tvp->ptr; 1108f8: 8b 4b 04 mov 0x4(%ebx),%ecx 1108fb: 8b 11 mov (%ecx),%edx *tvp->ptr = tvp->gval; 1108fd: 8b 73 08 mov 0x8(%ebx),%esi 110900: 89 31 mov %esi,(%ecx) 110902: eb d9 jmp 1108dd <_RTEMS_Tasks_Invoke_task_variable_dtor+0x19> <== ALWAYS TAKEN 001106d0 <_RTEMS_tasks_Initialize_user_tasks>: * * Output parameters: NONE */ void _RTEMS_tasks_Initialize_user_tasks( void ) { 1106d0: 55 push %ebp 1106d1: 89 e5 mov %esp,%ebp 1106d3: 83 ec 08 sub $0x8,%esp if ( _RTEMS_tasks_Initialize_user_tasks_p ) 1106d6: a1 60 32 12 00 mov 0x123260,%eax 1106db: 85 c0 test %eax,%eax 1106dd: 74 05 je 1106e4 <_RTEMS_tasks_Initialize_user_tasks+0x14> (*_RTEMS_tasks_Initialize_user_tasks_p)(); } 1106df: c9 leave */ void _RTEMS_tasks_Initialize_user_tasks( void ) { if ( _RTEMS_tasks_Initialize_user_tasks_p ) (*_RTEMS_tasks_Initialize_user_tasks_p)(); 1106e0: ff e0 jmp *%eax 1106e2: 66 90 xchg %ax,%ax <== NOT EXECUTED } 1106e4: c9 leave 1106e5: c3 ret 0010b92c <_RTEMS_tasks_Initialize_user_tasks_body>: * * Output parameters: NONE */ void _RTEMS_tasks_Initialize_user_tasks_body( void ) { 10b92c: 55 push %ebp 10b92d: 89 e5 mov %esp,%ebp 10b92f: 57 push %edi 10b930: 56 push %esi 10b931: 53 push %ebx 10b932: 83 ec 1c sub $0x1c,%esp rtems_initialization_tasks_table *user_tasks; /* * Move information into local variables */ user_tasks = Configuration_RTEMS_API.User_initialization_tasks_table; 10b935: 8b 1d 0c 32 12 00 mov 0x12320c,%ebx maximum = Configuration_RTEMS_API.number_of_initialization_tasks; 10b93b: 8b 3d 08 32 12 00 mov 0x123208,%edi /* * Verify that we have a set of user tasks to iterate */ if ( !user_tasks ) 10b941: 85 db test %ebx,%ebx 10b943: 74 46 je 10b98b <_RTEMS_tasks_Initialize_user_tasks_body+0x5f> return; /* * Now iterate over the initialization tasks and create/start them. */ for ( index=0 ; index < maximum ; index++ ) { 10b945: 85 ff test %edi,%edi 10b947: 74 42 je 10b98b <_RTEMS_tasks_Initialize_user_tasks_body+0x5f> <== ALWAYS TAKEN 10b949: 31 f6 xor %esi,%esi 10b94b: 90 nop return_value = rtems_task_create( 10b94c: 83 ec 08 sub $0x8,%esp 10b94f: 8d 45 e4 lea -0x1c(%ebp),%eax 10b952: 50 push %eax 10b953: ff 73 0c pushl 0xc(%ebx) 10b956: ff 73 14 pushl 0x14(%ebx) 10b959: ff 73 04 pushl 0x4(%ebx) 10b95c: ff 73 08 pushl 0x8(%ebx) 10b95f: ff 33 pushl (%ebx) 10b961: e8 96 fd ff ff call 10b6fc <== 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 ) ) 10b966: 83 c4 20 add $0x20,%esp 10b969: 85 c0 test %eax,%eax 10b96b: 75 26 jne 10b993 <_RTEMS_tasks_Initialize_user_tasks_body+0x67> _Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value ); return_value = rtems_task_start( 10b96d: 51 push %ecx 10b96e: ff 73 18 pushl 0x18(%ebx) 10b971: ff 73 10 pushl 0x10(%ebx) 10b974: ff 75 e4 pushl -0x1c(%ebp) 10b977: e8 24 00 00 00 call 10b9a0 <== ALWAYS TAKEN id, user_tasks[ index ].entry_point, user_tasks[ index ].argument ); if ( !rtems_is_status_successful( return_value ) ) 10b97c: 83 c4 10 add $0x10,%esp 10b97f: 85 c0 test %eax,%eax 10b981: 75 10 jne 10b993 <_RTEMS_tasks_Initialize_user_tasks_body+0x67> return; /* * Now iterate over the initialization tasks and create/start them. */ for ( index=0 ; index < maximum ; index++ ) { 10b983: 46 inc %esi 10b984: 83 c3 1c add $0x1c,%ebx 10b987: 39 f7 cmp %esi,%edi 10b989: 77 c1 ja 10b94c <_RTEMS_tasks_Initialize_user_tasks_body+0x20> <== ALWAYS TAKEN user_tasks[ index ].argument ); if ( !rtems_is_status_successful( return_value ) ) _Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value ); } } 10b98b: 8d 65 f4 lea -0xc(%ebp),%esp 10b98e: 5b pop %ebx 10b98f: 5e pop %esi 10b990: 5f pop %edi 10b991: c9 leave 10b992: c3 ret id, user_tasks[ index ].entry_point, user_tasks[ index ].argument ); if ( !rtems_is_status_successful( return_value ) ) _Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value ); 10b993: 52 push %edx 10b994: 50 push %eax 10b995: 6a 01 push $0x1 10b997: 6a 01 push $0x1 10b999: e8 5a 0d 00 00 call 10c6f8 <_Internal_error_Occurred> 001106e8 <_RTEMS_tasks_Manager_initialization>: * * Output parameters: NONE */ void _RTEMS_tasks_Manager_initialization(void) { 1106e8: 55 push %ebp 1106e9: 89 e5 mov %esp,%ebp 1106eb: 83 ec 0c sub $0xc,%esp _Objects_Initialize_information( 1106ee: 6a 04 push $0x4 1106f0: 6a 00 push $0x0 1106f2: 68 08 01 00 00 push $0x108 1106f7: ff 35 e0 31 12 00 pushl 0x1231e0 1106fd: 6a 01 push $0x1 1106ff: 6a 02 push $0x2 110701: 68 60 73 12 00 push $0x127360 110706: e8 9d c5 ff ff call 10cca8 <_Objects_Initialize_information> RTEMS_INLINE_ROUTINE void _User_extensions_Add_API_set( User_extensions_Control *extension ) { _User_extensions_Add_set( extension ); 11070b: 83 c4 14 add $0x14,%esp 11070e: 68 a0 50 12 00 push $0x1250a0 110713: e8 74 0d 00 00 call 11148c <_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 ); 110718: c7 04 24 80 50 12 00 movl $0x125080,(%esp) 11071f: e8 6c b6 ff ff call 10bd90 <_API_extensions_Add> 110724: 83 c4 10 add $0x10,%esp MP_PACKET_TASKS, _RTEMS_tasks_MP_Process_packet ); #endif } 110727: c9 leave 110728: c3 ret 0011072c <_RTEMS_tasks_Post_switch_extension>: */ void _RTEMS_tasks_Post_switch_extension( Thread_Control *executing ) { 11072c: 55 push %ebp 11072d: 89 e5 mov %esp,%ebp 11072f: 57 push %edi 110730: 56 push %esi 110731: 53 push %ebx 110732: 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 ]; 110735: 8b 45 08 mov 0x8(%ebp),%eax 110738: 8b 98 f4 00 00 00 mov 0xf4(%eax),%ebx if ( !api ) 11073e: 85 db test %ebx,%ebx 110740: 74 45 je 110787 <_RTEMS_tasks_Post_switch_extension+0x5b> <== ALWAYS TAKEN * Signal Processing */ asr = &api->Signal; _ISR_Disable( level ); 110742: 9c pushf 110743: fa cli 110744: 58 pop %eax signal_set = asr->signals_posted; 110745: 8b 73 14 mov 0x14(%ebx),%esi asr->signals_posted = 0; 110748: c7 43 14 00 00 00 00 movl $0x0,0x14(%ebx) _ISR_Enable( level ); 11074f: 50 push %eax 110750: 9d popf if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */ 110751: 85 f6 test %esi,%esi 110753: 74 32 je 110787 <_RTEMS_tasks_Post_switch_extension+0x5b> return; asr->nest_level += 1; 110755: ff 43 1c incl 0x1c(%ebx) rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode ); 110758: 50 push %eax 110759: 8d 7d e4 lea -0x1c(%ebp),%edi 11075c: 57 push %edi 11075d: 68 ff ff 00 00 push $0xffff 110762: ff 73 10 pushl 0x10(%ebx) 110765: e8 da 21 00 00 call 112944 (*asr->handler)( signal_set ); 11076a: 89 34 24 mov %esi,(%esp) 11076d: ff 53 0c call *0xc(%ebx) asr->nest_level -= 1; 110770: ff 4b 1c decl 0x1c(%ebx) rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode ); 110773: 83 c4 0c add $0xc,%esp 110776: 57 push %edi 110777: 68 ff ff 00 00 push $0xffff 11077c: ff 75 e4 pushl -0x1c(%ebp) 11077f: e8 c0 21 00 00 call 112944 110784: 83 c4 10 add $0x10,%esp } 110787: 8d 65 f4 lea -0xc(%ebp),%esp 11078a: 5b pop %ebx 11078b: 5e pop %esi 11078c: 5f pop %edi 11078d: c9 leave 11078e: c3 ret 00110688 <_RTEMS_tasks_Switch_extension>: void _RTEMS_tasks_Switch_extension( Thread_Control *executing, Thread_Control *heir ) { 110688: 55 push %ebp 110689: 89 e5 mov %esp,%ebp /* * Per Task Variables */ tvp = executing->task_variables; 11068b: 8b 45 08 mov 0x8(%ebp),%eax 11068e: 8b 80 04 01 00 00 mov 0x104(%eax),%eax while (tvp) { 110694: 85 c0 test %eax,%eax 110696: 74 13 je 1106ab <_RTEMS_tasks_Switch_extension+0x23> tvp->tval = *tvp->ptr; 110698: 8b 50 04 mov 0x4(%eax),%edx 11069b: 8b 0a mov (%edx),%ecx 11069d: 89 48 0c mov %ecx,0xc(%eax) *tvp->ptr = tvp->gval; 1106a0: 8b 48 08 mov 0x8(%eax),%ecx 1106a3: 89 0a mov %ecx,(%edx) tvp = (rtems_task_variable_t *)tvp->next; 1106a5: 8b 00 mov (%eax),%eax /* * Per Task Variables */ tvp = executing->task_variables; while (tvp) { 1106a7: 85 c0 test %eax,%eax 1106a9: 75 ed jne 110698 <_RTEMS_tasks_Switch_extension+0x10> <== ALWAYS TAKEN tvp->tval = *tvp->ptr; *tvp->ptr = tvp->gval; tvp = (rtems_task_variable_t *)tvp->next; } tvp = heir->task_variables; 1106ab: 8b 45 0c mov 0xc(%ebp),%eax 1106ae: 8b 80 04 01 00 00 mov 0x104(%eax),%eax while (tvp) { 1106b4: 85 c0 test %eax,%eax 1106b6: 74 13 je 1106cb <_RTEMS_tasks_Switch_extension+0x43> tvp->gval = *tvp->ptr; 1106b8: 8b 50 04 mov 0x4(%eax),%edx 1106bb: 8b 0a mov (%edx),%ecx 1106bd: 89 48 08 mov %ecx,0x8(%eax) *tvp->ptr = tvp->tval; 1106c0: 8b 48 0c mov 0xc(%eax),%ecx 1106c3: 89 0a mov %ecx,(%edx) tvp = (rtems_task_variable_t *)tvp->next; 1106c5: 8b 00 mov (%eax),%eax *tvp->ptr = tvp->gval; tvp = (rtems_task_variable_t *)tvp->next; } tvp = heir->task_variables; while (tvp) { 1106c7: 85 c0 test %eax,%eax 1106c9: 75 ed jne 1106b8 <_RTEMS_tasks_Switch_extension+0x30> <== ALWAYS TAKEN tvp->gval = *tvp->ptr; *tvp->ptr = tvp->tval; tvp = (rtems_task_variable_t *)tvp->next; } } 1106cb: c9 leave 1106cc: c3 ret 0013d5e4 <_Rate_monotonic_Get_status>: bool _Rate_monotonic_Get_status( Rate_monotonic_Control *the_period, Rate_monotonic_Period_time_t *wall_since_last_period, Thread_CPU_usage_t *cpu_since_last_period ) { 13d5e4: 55 push %ebp 13d5e5: 89 e5 mov %esp,%ebp 13d5e7: 57 push %edi 13d5e8: 56 push %esi 13d5e9: 53 push %ebx 13d5ea: 83 ec 38 sub $0x38,%esp 13d5ed: 8b 5d 08 mov 0x8(%ebp),%ebx #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ Timestamp_Control uptime; #endif Thread_Control *owning_thread = the_period->owner; 13d5f0: 8b 7b 40 mov 0x40(%ebx),%edi /* * Determine elapsed wall time since period initiated. */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _TOD_Get_uptime( &uptime ); 13d5f3: 8d 75 e0 lea -0x20(%ebp),%esi 13d5f6: 56 push %esi 13d5f7: e8 10 13 ff ff call 12e90c <_TOD_Get_uptime> _Timestamp_Subtract( 13d5fc: 83 c4 0c add $0xc,%esp 13d5ff: ff 75 0c pushl 0xc(%ebp) 13d602: 56 push %esi 13d603: 8d 43 4c lea 0x4c(%ebx),%eax 13d606: 50 push %eax 13d607: e8 1c 70 fd ff call 114628 <_Timespec_Subtract> #endif /* * Determine cpu usage since period initiated. */ used = owning_thread->cpu_time_used; 13d60c: 8b 87 84 00 00 00 mov 0x84(%edi),%eax 13d612: 8b 97 88 00 00 00 mov 0x88(%edi),%edx 13d618: 89 45 d8 mov %eax,-0x28(%ebp) 13d61b: 89 55 dc mov %edx,-0x24(%ebp) #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ if (owning_thread == _Thread_Executing) { 13d61e: 83 c4 10 add $0x10,%esp 13d621: 3b 3d f8 f0 16 00 cmp 0x16f0f8,%edi 13d627: 74 0b je 13d634 <_Rate_monotonic_Get_status+0x50> 13d629: b0 01 mov $0x1,%al return false; *cpu_since_last_period = used - the_period->cpu_usage_period_initiated; #endif return true; } 13d62b: 8d 65 f4 lea -0xc(%ebp),%esp 13d62e: 5b pop %ebx 13d62f: 5e pop %esi 13d630: 5f pop %edi 13d631: c9 leave 13d632: c3 ret 13d633: 90 nop <== NOT EXECUTED if (owning_thread == _Thread_Executing) { Thread_CPU_usage_t ran; /* How much time time since last context switch */ _Timestamp_Subtract( 13d634: 57 push %edi 13d635: 8d 7d d0 lea -0x30(%ebp),%edi 13d638: 57 push %edi 13d639: 56 push %esi 13d63a: 68 00 f1 16 00 push $0x16f100 13d63f: e8 e4 6f fd ff call 114628 <_Timespec_Subtract> &_Thread_Time_of_last_context_switch, &uptime, &ran ); /* cpu usage += ran */ _Timestamp_Add_to( &used, &ran ); 13d644: 59 pop %ecx 13d645: 5e pop %esi 13d646: 57 push %edi 13d647: 8d 75 d8 lea -0x28(%ebp),%esi 13d64a: 56 push %esi 13d64b: e8 9c 6f fd ff call 1145ec <_Timespec_Add_to> /* * The cpu usage info was reset while executing. Can't * determine a status. */ if (_Timestamp_Less_than(&used, &the_period->cpu_usage_period_initiated)) 13d650: 83 c3 44 add $0x44,%ebx 13d653: 58 pop %eax 13d654: 5a pop %edx 13d655: 53 push %ebx 13d656: 56 push %esi 13d657: e8 dc 06 00 00 call 13dd38 <_Timespec_Less_than> 13d65c: 83 c4 10 add $0x10,%esp 13d65f: 84 c0 test %al,%al 13d661: 74 05 je 13d668 <_Rate_monotonic_Get_status+0x84> 13d663: 31 c0 xor %eax,%eax 13d665: eb c4 jmp 13d62b <_Rate_monotonic_Get_status+0x47> <== ALWAYS TAKEN 13d667: 90 nop <== NOT EXECUTED return false; /* used = current cpu usage - cpu usage at start of period */ _Timestamp_Subtract( 13d668: 57 push %edi 13d669: ff 75 10 pushl 0x10(%ebp) 13d66c: 56 push %esi 13d66d: 53 push %ebx 13d66e: e8 b5 6f fd ff call 114628 <_Timespec_Subtract> 13d673: b0 01 mov $0x1,%al 13d675: 83 c4 10 add $0x10,%esp 13d678: eb b1 jmp 13d62b <_Rate_monotonic_Get_status+0x47> <== ALWAYS TAKEN 0013d570 <_Rate_monotonic_Initiate_statistics>: } void _Rate_monotonic_Initiate_statistics( Rate_monotonic_Control *the_period ) { 13d570: 55 push %ebp 13d571: 89 e5 mov %esp,%ebp 13d573: 57 push %edi 13d574: 56 push %esi 13d575: 53 push %ebx 13d576: 83 ec 28 sub $0x28,%esp 13d579: 8b 5d 08 mov 0x8(%ebp),%ebx Thread_Control *owning_thread = the_period->owner; 13d57c: 8b 73 40 mov 0x40(%ebx),%esi * If using nanosecond statistics, we need to obtain the uptime. */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ Timestamp_Control uptime; _TOD_Get_uptime( &uptime ); 13d57f: 8d 7d e0 lea -0x20(%ebp),%edi 13d582: 57 push %edi 13d583: e8 84 13 ff ff call 12e90c <_TOD_Get_uptime> /* * Set the starting point and the CPU time used for the statistics. */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ the_period->time_period_initiated = uptime; 13d588: 8b 45 e0 mov -0x20(%ebp),%eax 13d58b: 8b 55 e4 mov -0x1c(%ebp),%edx 13d58e: 89 43 4c mov %eax,0x4c(%ebx) 13d591: 89 53 50 mov %edx,0x50(%ebx) #else the_period->time_period_initiated = _Watchdog_Ticks_since_boot; #endif the_period->cpu_usage_period_initiated = owning_thread->cpu_time_used; 13d594: 8b 86 84 00 00 00 mov 0x84(%esi),%eax 13d59a: 8b 96 88 00 00 00 mov 0x88(%esi),%edx 13d5a0: 89 43 44 mov %eax,0x44(%ebx) 13d5a3: 89 53 48 mov %edx,0x48(%ebx) * routine is invoked from rtems_rate_monotonic_period, the owner will * be the executing thread. When this routine is invoked from * _Rate_monotonic_Timeout, it will not. */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ if (owning_thread == _Thread_Executing) { 13d5a6: 83 c4 10 add $0x10,%esp 13d5a9: 3b 35 f8 f0 16 00 cmp 0x16f0f8,%esi 13d5af: 74 0b je 13d5bc <_Rate_monotonic_Initiate_statistics+0x4c> ); _Timespec_Add_to( &the_period->cpu_usage_period_initiated, &ran ); } #endif } 13d5b1: 8d 65 f4 lea -0xc(%ebp),%esp 13d5b4: 5b pop %ebx 13d5b5: 5e pop %esi 13d5b6: 5f pop %edi 13d5b7: c9 leave 13d5b8: c3 ret 13d5b9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED /* * Adjust the CPU time used to account for the time since last * context switch. */ _Timespec_Subtract( 13d5bc: 51 push %ecx 13d5bd: 8d 75 d8 lea -0x28(%ebp),%esi 13d5c0: 56 push %esi 13d5c1: 57 push %edi 13d5c2: 68 00 f1 16 00 push $0x16f100 13d5c7: e8 5c 70 fd ff call 114628 <_Timespec_Subtract> &_Thread_Time_of_last_context_switch, &uptime, &ran ); _Timespec_Add_to( &the_period->cpu_usage_period_initiated, &ran ); 13d5cc: 58 pop %eax 13d5cd: 5a pop %edx 13d5ce: 56 push %esi 13d5cf: 83 c3 44 add $0x44,%ebx 13d5d2: 53 push %ebx 13d5d3: e8 14 70 fd ff call 1145ec <_Timespec_Add_to> 13d5d8: 83 c4 10 add $0x10,%esp } #endif } 13d5db: 8d 65 f4 lea -0xc(%ebp),%esp 13d5de: 5b pop %ebx 13d5df: 5e pop %esi 13d5e0: 5f pop %edi 13d5e1: c9 leave 13d5e2: c3 ret 0013d91c <_Rate_monotonic_Timeout>: void _Rate_monotonic_Timeout( Objects_Id id, void *ignored ) { 13d91c: 55 push %ebp 13d91d: 89 e5 mov %esp,%ebp 13d91f: 83 ec 2c sub $0x2c,%esp 13d922: 8d 45 f4 lea -0xc(%ebp),%eax 13d925: 50 push %eax 13d926: ff 75 08 pushl 0x8(%ebp) 13d929: 68 e0 fc 16 00 push $0x16fce0 13d92e: e8 55 57 fd ff call 113088 <_Objects_Get> /* * 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 ) { 13d933: 83 c4 10 add $0x10,%esp 13d936: 8b 55 f4 mov -0xc(%ebp),%edx 13d939: 85 d2 test %edx,%edx 13d93b: 75 29 jne 13d966 <_Rate_monotonic_Timeout+0x4a> <== ALWAYS TAKEN case OBJECTS_LOCAL: the_thread = the_period->owner; 13d93d: 8b 50 40 mov 0x40(%eax),%edx if ( _States_Is_waiting_for_period( the_thread->current_state ) && 13d940: f6 42 11 40 testb $0x40,0x11(%edx) 13d944: 74 08 je 13d94e <_Rate_monotonic_Timeout+0x32> the_thread->Wait.id == the_period->Object.id ) { 13d946: 8b 4a 20 mov 0x20(%edx),%ecx 13d949: 3b 48 08 cmp 0x8(%eax),%ecx 13d94c: 74 4e je 13d99c <_Rate_monotonic_Timeout+0x80> _Thread_Unblock( the_thread ); _Rate_monotonic_Initiate_statistics( the_period ); _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); } else if ( the_period->state == RATE_MONOTONIC_OWNER_IS_BLOCKING ) { 13d94e: 83 78 38 01 cmpl $0x1,0x38(%eax) 13d952: 74 14 je 13d968 <_Rate_monotonic_Timeout+0x4c> _Rate_monotonic_Initiate_statistics( the_period ); _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); } else the_period->state = RATE_MONOTONIC_EXPIRED; 13d954: c7 40 38 04 00 00 00 movl $0x4,0x38(%eax) */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 13d95b: a1 38 f0 16 00 mov 0x16f038,%eax 13d960: 48 dec %eax 13d961: a3 38 f0 16 00 mov %eax,0x16f038 case OBJECTS_REMOTE: /* impossible */ #endif case OBJECTS_ERROR: break; } } 13d966: c9 leave 13d967: c3 ret _Rate_monotonic_Initiate_statistics( the_period ); _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); } else if ( the_period->state == RATE_MONOTONIC_OWNER_IS_BLOCKING ) { the_period->state = RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING; 13d968: c7 40 38 03 00 00 00 movl $0x3,0x38(%eax) _Rate_monotonic_Initiate_statistics( the_period ); 13d96f: 83 ec 0c sub $0xc,%esp 13d972: 50 push %eax 13d973: 89 45 e4 mov %eax,-0x1c(%ebp) 13d976: e8 f5 fb ff ff call 13d570 <_Rate_monotonic_Initiate_statistics> <== ALWAYS TAKEN Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 13d97b: 8b 45 e4 mov -0x1c(%ebp),%eax 13d97e: 8b 50 3c mov 0x3c(%eax),%edx 13d981: 89 50 1c mov %edx,0x1c(%eax) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 13d984: 5a pop %edx 13d985: 59 pop %ecx 13d986: 83 c0 10 add $0x10,%eax 13d989: 50 push %eax 13d98a: 68 18 f1 16 00 push $0x16f118 13d98f: e8 64 6f fd ff call 1148f8 <_Watchdog_Insert> 13d994: 83 c4 10 add $0x10,%esp 13d997: eb c2 jmp 13d95b <_Rate_monotonic_Timeout+0x3f> <== ALWAYS TAKEN 13d999: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 13d99c: 83 ec 08 sub $0x8,%esp 13d99f: 68 f8 ff 03 10 push $0x1003fff8 13d9a4: 52 push %edx 13d9a5: 89 45 e4 mov %eax,-0x1c(%ebp) 13d9a8: e8 57 5c fd ff call 113604 <_Thread_Clear_state> the_thread = the_period->owner; if ( _States_Is_waiting_for_period( the_thread->current_state ) && the_thread->Wait.id == the_period->Object.id ) { _Thread_Unblock( the_thread ); _Rate_monotonic_Initiate_statistics( the_period ); 13d9ad: 8b 45 e4 mov -0x1c(%ebp),%eax 13d9b0: 89 04 24 mov %eax,(%esp) 13d9b3: eb c1 jmp 13d976 <_Rate_monotonic_Timeout+0x5a> <== ALWAYS TAKEN 0013d67c <_Rate_monotonic_Update_statistics>: } void _Rate_monotonic_Update_statistics( Rate_monotonic_Control *the_period ) { 13d67c: 55 push %ebp 13d67d: 89 e5 mov %esp,%ebp 13d67f: 57 push %edi 13d680: 56 push %esi 13d681: 53 push %ebx 13d682: 83 ec 1c sub $0x1c,%esp 13d685: 8b 5d 08 mov 0x8(%ebp),%ebx /* * Update the counts. */ stats = &the_period->Statistics; stats->count++; 13d688: ff 43 54 incl 0x54(%ebx) if ( the_period->state == RATE_MONOTONIC_EXPIRED ) 13d68b: 83 7b 38 04 cmpl $0x4,0x38(%ebx) 13d68f: 0f 84 bf 00 00 00 je 13d754 <_Rate_monotonic_Update_statistics+0xd8> /* * Grab status for time statistics. */ valid_status = _Rate_monotonic_Get_status( the_period, &since_last_period, &executed ); 13d695: 52 push %edx 13d696: 8d 7d e0 lea -0x20(%ebp),%edi 13d699: 57 push %edi 13d69a: 8d 75 d8 lea -0x28(%ebp),%esi 13d69d: 56 push %esi 13d69e: 53 push %ebx 13d69f: e8 40 ff ff ff call 13d5e4 <_Rate_monotonic_Get_status> <== ALWAYS TAKEN if (!valid_status) 13d6a4: 83 c4 10 add $0x10,%esp 13d6a7: 84 c0 test %al,%al 13d6a9: 75 09 jne 13d6b4 <_Rate_monotonic_Update_statistics+0x38> stats->min_wall_time = since_last_period; if ( since_last_period > stats->max_wall_time ) stats->max_wall_time = since_last_period; #endif } 13d6ab: 8d 65 f4 lea -0xc(%ebp),%esp 13d6ae: 5b pop %ebx 13d6af: 5e pop %esi 13d6b0: 5f pop %edi 13d6b1: c9 leave 13d6b2: c3 ret 13d6b3: 90 nop <== NOT EXECUTED /* * Update CPU time */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_Add_to( &stats->total_cpu_time, &executed ); 13d6b4: 83 ec 08 sub $0x8,%esp 13d6b7: 57 push %edi 13d6b8: 8d 43 6c lea 0x6c(%ebx),%eax 13d6bb: 50 push %eax 13d6bc: e8 2b 6f fd ff call 1145ec <_Timespec_Add_to> if ( _Timestamp_Less_than( &executed, &stats->min_cpu_time ) ) 13d6c1: 59 pop %ecx 13d6c2: 58 pop %eax 13d6c3: 8d 43 5c lea 0x5c(%ebx),%eax 13d6c6: 50 push %eax 13d6c7: 57 push %edi 13d6c8: e8 6b 06 00 00 call 13dd38 <_Timespec_Less_than> 13d6cd: 83 c4 10 add $0x10,%esp 13d6d0: 84 c0 test %al,%al 13d6d2: 74 0c je 13d6e0 <_Rate_monotonic_Update_statistics+0x64> stats->min_cpu_time = executed; 13d6d4: 8b 45 e0 mov -0x20(%ebp),%eax 13d6d7: 8b 55 e4 mov -0x1c(%ebp),%edx 13d6da: 89 43 5c mov %eax,0x5c(%ebx) 13d6dd: 89 53 60 mov %edx,0x60(%ebx) if ( _Timestamp_Greater_than( &executed, &stats->max_cpu_time ) ) 13d6e0: 83 ec 08 sub $0x8,%esp 13d6e3: 8d 43 64 lea 0x64(%ebx),%eax 13d6e6: 50 push %eax 13d6e7: 57 push %edi 13d6e8: e8 27 06 00 00 call 13dd14 <_Timespec_Greater_than> 13d6ed: 83 c4 10 add $0x10,%esp 13d6f0: 84 c0 test %al,%al 13d6f2: 74 0c je 13d700 <_Rate_monotonic_Update_statistics+0x84> stats->max_cpu_time = executed; 13d6f4: 8b 45 e0 mov -0x20(%ebp),%eax 13d6f7: 8b 55 e4 mov -0x1c(%ebp),%edx 13d6fa: 89 43 64 mov %eax,0x64(%ebx) 13d6fd: 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 ); 13d700: 83 ec 08 sub $0x8,%esp 13d703: 56 push %esi 13d704: 8d 83 84 00 00 00 lea 0x84(%ebx),%eax 13d70a: 50 push %eax 13d70b: e8 dc 6e fd ff call 1145ec <_Timespec_Add_to> if ( _Timestamp_Less_than( &since_last_period, &stats->min_wall_time ) ) 13d710: 58 pop %eax 13d711: 5a pop %edx 13d712: 8d 43 74 lea 0x74(%ebx),%eax 13d715: 50 push %eax 13d716: 56 push %esi 13d717: e8 1c 06 00 00 call 13dd38 <_Timespec_Less_than> 13d71c: 83 c4 10 add $0x10,%esp 13d71f: 84 c0 test %al,%al 13d721: 75 39 jne 13d75c <_Rate_monotonic_Update_statistics+0xe0> stats->min_wall_time = since_last_period; if ( _Timestamp_Greater_than( &since_last_period, &stats->max_wall_time ) ) 13d723: 83 ec 08 sub $0x8,%esp 13d726: 8d 43 7c lea 0x7c(%ebx),%eax 13d729: 50 push %eax 13d72a: 56 push %esi 13d72b: e8 e4 05 00 00 call 13dd14 <_Timespec_Greater_than> 13d730: 83 c4 10 add $0x10,%esp 13d733: 84 c0 test %al,%al 13d735: 0f 84 70 ff ff ff je 13d6ab <_Rate_monotonic_Update_statistics+0x2f> stats->max_wall_time = since_last_period; 13d73b: 8b 45 d8 mov -0x28(%ebp),%eax 13d73e: 8b 55 dc mov -0x24(%ebp),%edx 13d741: 89 43 7c mov %eax,0x7c(%ebx) 13d744: 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 } 13d74a: 8d 65 f4 lea -0xc(%ebp),%esp 13d74d: 5b pop %ebx 13d74e: 5e pop %esi 13d74f: 5f pop %edi 13d750: c9 leave 13d751: c3 ret 13d752: 66 90 xchg %ax,%ax <== NOT EXECUTED */ stats = &the_period->Statistics; stats->count++; if ( the_period->state == RATE_MONOTONIC_EXPIRED ) stats->missed_count++; 13d754: ff 43 58 incl 0x58(%ebx) 13d757: e9 39 ff ff ff jmp 13d695 <_Rate_monotonic_Update_statistics+0x19> <== ALWAYS TAKEN */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_Add_to( &stats->total_wall_time, &since_last_period ); if ( _Timestamp_Less_than( &since_last_period, &stats->min_wall_time ) ) stats->min_wall_time = since_last_period; 13d75c: 8b 45 d8 mov -0x28(%ebp),%eax 13d75f: 8b 55 dc mov -0x24(%ebp),%edx 13d762: 89 43 74 mov %eax,0x74(%ebx) 13d765: 89 53 78 mov %edx,0x78(%ebx) 13d768: eb b9 jmp 13d723 <_Rate_monotonic_Update_statistics+0xa7> <== ALWAYS TAKEN 0011eb00 <_Region_Process_queue>: */ void _Region_Process_queue( Region_Control *the_region ) { 11eb00: 55 push %ebp 11eb01: 89 e5 mov %esp,%ebp 11eb03: 57 push %edi 11eb04: 56 push %esi 11eb05: 53 push %ebx 11eb06: 83 ec 28 sub $0x28,%esp 11eb09: 8b 75 08 mov 0x8(%ebp),%esi 11eb0c: a1 b8 1b 14 00 mov 0x141bb8,%eax 11eb11: 40 inc %eax 11eb12: a3 b8 1b 14 00 mov %eax,0x141bb8 * 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(); 11eb17: ff 35 70 1c 14 00 pushl 0x141c70 11eb1d: e8 62 a8 ff ff call 119384 <_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 ); 11eb22: 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 ); 11eb25: 8d 46 68 lea 0x68(%esi),%eax 11eb28: 89 45 e4 mov %eax,-0x1c(%ebp) 11eb2b: 83 c4 10 add $0x10,%esp 11eb2e: eb 32 jmp 11eb62 <_Region_Process_queue+0x62> <== ALWAYS TAKEN 11eb30: 6a 00 push $0x0 11eb32: 6a 00 push $0x0 11eb34: ff 70 24 pushl 0x24(%eax) 11eb37: ff 75 e4 pushl -0x1c(%ebp) 11eb3a: e8 65 b2 ff ff call 119da4 <_Heap_Allocate_aligned_with_boundary> the_segment = (void **) _Region_Allocate_segment( the_region, the_thread->Wait.count ); if ( the_segment == NULL ) 11eb3f: 83 c4 10 add $0x10,%esp 11eb42: 85 c0 test %eax,%eax 11eb44: 74 2e je 11eb74 <_Region_Process_queue+0x74> break; *(void **)the_thread->Wait.return_argument = the_segment; 11eb46: 8b 53 28 mov 0x28(%ebx),%edx 11eb49: 89 02 mov %eax,(%edx) the_region->number_of_used_blocks += 1; 11eb4b: ff 46 64 incl 0x64(%esi) _Thread_queue_Extract( &the_region->Wait_queue, the_thread ); 11eb4e: 83 ec 08 sub $0x8,%esp 11eb51: 53 push %ebx 11eb52: 57 push %edi 11eb53: e8 fc 05 00 00 call 11f154 <_Thread_queue_Extract> <== ALWAYS TAKEN the_thread->Wait.return_code = RTEMS_SUCCESSFUL; 11eb58: c7 43 34 00 00 00 00 movl $0x0,0x34(%ebx) } 11eb5f: 83 c4 10 add $0x10,%esp /* * 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 ); 11eb62: 83 ec 0c sub $0xc,%esp 11eb65: 57 push %edi 11eb66: e8 d5 06 00 00 call 11f240 <_Thread_queue_First> <== ALWAYS TAKEN 11eb6b: 89 c3 mov %eax,%ebx if ( the_thread == NULL ) 11eb6d: 83 c4 10 add $0x10,%esp 11eb70: 85 c0 test %eax,%eax 11eb72: 75 bc jne 11eb30 <_Region_Process_queue+0x30> 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(); } 11eb74: 8d 65 f4 lea -0xc(%ebp),%esp 11eb77: 5b pop %ebx 11eb78: 5e pop %esi 11eb79: 5f pop %edi 11eb7a: 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(); 11eb7b: e9 bc c9 ff ff jmp 11b53c <_Thread_Enable_dispatch> 0010d8cc <_TOD_Set>: */ void _TOD_Set( const struct timespec *time ) { 10d8cc: 55 push %ebp 10d8cd: 89 e5 mov %esp,%ebp 10d8cf: 53 push %ebx 10d8d0: 83 ec 04 sub $0x4,%esp 10d8d3: 8b 5d 08 mov 0x8(%ebp),%ebx 10d8d6: a1 18 22 13 00 mov 0x132218,%eax 10d8db: 40 inc %eax 10d8dc: a3 18 22 13 00 mov %eax,0x132218 long seconds; _Thread_Disable_dispatch(); _TOD_Deactivate(); seconds = _TOD_Seconds_since_epoch(); 10d8e1: a1 ac 22 13 00 mov 0x1322ac,%eax if ( time->tv_sec < seconds ) 10d8e6: 8b 13 mov (%ebx),%edx 10d8e8: 39 d0 cmp %edx,%eax 10d8ea: 7f 34 jg 10d920 <_TOD_Set+0x54> Watchdog_Adjust_directions direction, Watchdog_Interval units ) { _Watchdog_Adjust( &_Watchdog_Seconds_chain, direction, units ); 10d8ec: 51 push %ecx 10d8ed: 29 c2 sub %eax,%edx 10d8ef: 52 push %edx 10d8f0: 6a 00 push $0x0 10d8f2: 68 ec 22 13 00 push $0x1322ec 10d8f7: e8 dc 24 00 00 call 10fdd8 <_Watchdog_Adjust> 10d8fc: 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 ); 10d8ff: 8b 03 mov (%ebx),%eax 10d901: a3 ac 22 13 00 mov %eax,0x1322ac 10d906: 8b 43 04 mov 0x4(%ebx),%eax 10d909: a3 b0 22 13 00 mov %eax,0x1322b0 _TOD_Is_set = true; 10d90e: c6 05 2c 22 13 00 01 movb $0x1,0x13222c _TOD_Activate(); _Thread_Enable_dispatch(); } 10d915: 8b 5d fc mov -0x4(%ebp),%ebx 10d918: c9 leave _Timestamp_Set( &_TOD_Now, time->tv_sec, time->tv_nsec ); _TOD_Is_set = true; _TOD_Activate(); _Thread_Enable_dispatch(); 10d919: e9 c2 12 00 00 jmp 10ebe0 <_Thread_Enable_dispatch> 10d91e: 66 90 xchg %ax,%ax <== NOT EXECUTED 10d920: 51 push %ecx 10d921: 29 d0 sub %edx,%eax 10d923: 50 push %eax 10d924: 6a 01 push $0x1 10d926: 68 ec 22 13 00 push $0x1322ec 10d92b: e8 a8 24 00 00 call 10fdd8 <_Watchdog_Adjust> 10d930: 83 c4 10 add $0x10,%esp 10d933: eb ca jmp 10d8ff <_TOD_Set+0x33> <== ALWAYS TAKEN 0010c01c <_TOD_To_seconds>: */ uint32_t _TOD_To_seconds( const rtems_time_of_day *the_tod ) { 10c01c: 55 push %ebp 10c01d: 89 e5 mov %esp,%ebp 10c01f: 56 push %esi 10c020: 53 push %ebx 10c021: 8b 55 08 mov 0x8(%ebp),%edx uint32_t time; uint32_t year_mod_4; time = the_tod->day - 1; 10c024: 8b 72 08 mov 0x8(%edx),%esi 10c027: 4e dec %esi year_mod_4 = the_tod->year & 3; 10c028: 8b 02 mov (%edx),%eax if ( year_mod_4 == 0 ) 10c02a: 89 c3 mov %eax,%ebx 10c02c: 83 e3 03 and $0x3,%ebx 10c02f: 74 67 je 10c098 <_TOD_To_seconds+0x7c> time += _TOD_Days_to_date[ 1 ][ the_tod->month ]; else time += _TOD_Days_to_date[ 0 ][ the_tod->month ]; 10c031: 8b 4a 04 mov 0x4(%edx),%ecx 10c034: 0f b7 8c 09 20 37 12 movzwl 0x123720(%ecx,%ecx,1),%ecx 10c03b: 00 10c03c: 8d 34 31 lea (%ecx,%esi,1),%esi time += ( (the_tod->year - TOD_BASE_YEAR) / 4 ) * 10c03f: 0f b7 8c 1b 54 37 12 movzwl 0x123754(%ebx,%ebx,1),%ecx 10c046: 00 10c047: 2d c4 07 00 00 sub $0x7c4,%eax 10c04c: c1 e8 02 shr $0x2,%eax 10c04f: 8d 1c c0 lea (%eax,%eax,8),%ebx 10c052: 8d 1c d8 lea (%eax,%ebx,8),%ebx 10c055: 8d 1c 9b lea (%ebx,%ebx,4),%ebx 10c058: 8d 04 98 lea (%eax,%ebx,4),%eax 10c05b: 01 c1 add %eax,%ecx ( (TOD_DAYS_PER_YEAR * 4) + 1); time += _TOD_Days_since_last_leap_year[ year_mod_4 ]; 10c05d: 01 f1 add %esi,%ecx time *= TOD_SECONDS_PER_DAY; 10c05f: 8d 04 89 lea (%ecx,%ecx,4),%eax 10c062: 8d 04 81 lea (%ecx,%eax,4),%eax 10c065: 8d 04 c1 lea (%ecx,%eax,8),%eax 10c068: c1 e0 02 shl $0x2,%eax 10c06b: 29 c8 sub %ecx,%eax 10c06d: c1 e0 07 shl $0x7,%eax time += ((the_tod->hour * TOD_MINUTES_PER_HOUR) + the_tod->minute) 10c070: 8b 5a 14 mov 0x14(%edx),%ebx * TOD_SECONDS_PER_MINUTE; time += the_tod->second; 10c073: 8b 4a 0c mov 0xc(%edx),%ecx 10c076: 8d 0c 49 lea (%ecx,%ecx,2),%ecx 10c079: 8d 0c 89 lea (%ecx,%ecx,4),%ecx 10c07c: c1 e1 02 shl $0x2,%ecx 10c07f: 03 4a 10 add 0x10(%edx),%ecx 10c082: 8d 14 49 lea (%ecx,%ecx,2),%edx 10c085: 8d 14 92 lea (%edx,%edx,4),%edx 10c088: 8d 94 93 00 e5 da 21 lea 0x21dae500(%ebx,%edx,4),%edx 10c08f: 8d 04 02 lea (%edx,%eax,1),%eax time += TOD_SECONDS_1970_THROUGH_1988; return( time ); } 10c092: 5b pop %ebx 10c093: 5e pop %esi 10c094: c9 leave 10c095: c3 ret 10c096: 66 90 xchg %ax,%ax <== NOT EXECUTED time = the_tod->day - 1; year_mod_4 = the_tod->year & 3; if ( year_mod_4 == 0 ) time += _TOD_Days_to_date[ 1 ][ the_tod->month ]; 10c098: 8b 4a 04 mov 0x4(%edx),%ecx 10c09b: 0f b7 8c 09 3a 37 12 movzwl 0x12373a(%ecx,%ecx,1),%ecx 10c0a2: 00 10c0a3: 8d 34 31 lea (%ecx,%esi,1),%esi 10c0a6: eb 97 jmp 10c03f <_TOD_To_seconds+0x23> <== ALWAYS TAKEN 0010c0a8 <_TOD_Validate>: */ bool _TOD_Validate( const rtems_time_of_day *the_tod ) { 10c0a8: 55 push %ebp 10c0a9: 89 e5 mov %esp,%ebp 10c0ab: 53 push %ebx 10c0ac: 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(); 10c0af: 8b 1d 2c 62 12 00 mov 0x12622c,%ebx if ((!the_tod) || 10c0b5: 85 c9 test %ecx,%ecx 10c0b7: 74 53 je 10c10c <_TOD_Validate+0x64> <== ALWAYS TAKEN 10c0b9: b8 40 42 0f 00 mov $0xf4240,%eax 10c0be: 31 d2 xor %edx,%edx 10c0c0: f7 f3 div %ebx (the_tod->ticks >= ticks_per_second) || 10c0c2: 3b 41 18 cmp 0x18(%ecx),%eax 10c0c5: 76 45 jbe 10c10c <_TOD_Validate+0x64> (the_tod->second >= TOD_SECONDS_PER_MINUTE) || 10c0c7: 83 79 14 3b cmpl $0x3b,0x14(%ecx) 10c0cb: 77 3f ja 10c10c <_TOD_Validate+0x64> (the_tod->minute >= TOD_MINUTES_PER_HOUR) || 10c0cd: 83 79 10 3b cmpl $0x3b,0x10(%ecx) 10c0d1: 77 39 ja 10c10c <_TOD_Validate+0x64> (the_tod->hour >= TOD_HOURS_PER_DAY) || 10c0d3: 83 79 0c 17 cmpl $0x17,0xc(%ecx) 10c0d7: 77 33 ja 10c10c <_TOD_Validate+0x64> (the_tod->month == 0) || 10c0d9: 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) || 10c0dc: 85 c0 test %eax,%eax 10c0de: 74 2c je 10c10c <_TOD_Validate+0x64> <== ALWAYS TAKEN 10c0e0: 83 f8 0c cmp $0xc,%eax 10c0e3: 77 27 ja 10c10c <_TOD_Validate+0x64> (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) || 10c0e5: 8b 11 mov (%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) || 10c0e7: 81 fa c3 07 00 00 cmp $0x7c3,%edx 10c0ed: 76 1d jbe 10c10c <_TOD_Validate+0x64> (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) ) 10c0ef: 8b 49 08 mov 0x8(%ecx),%ecx 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) || 10c0f2: 85 c9 test %ecx,%ecx 10c0f4: 74 16 je 10c10c <_TOD_Validate+0x64> <== 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 ) 10c0f6: 83 e2 03 and $0x3,%edx 10c0f9: 75 16 jne 10c111 <_TOD_Validate+0x69> days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ]; 10c0fb: 8b 04 85 94 37 12 00 mov 0x123794(,%eax,4),%eax * false - if the the_tod is invalid * * NOTE: This routine only works for leap-years through 2099. */ bool _TOD_Validate( 10c102: 39 c8 cmp %ecx,%eax 10c104: 0f 93 c0 setae %al 10c107: eb 05 jmp 10c10e <_TOD_Validate+0x66> <== ALWAYS TAKEN 10c109: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 10c10c: 31 c0 xor %eax,%eax if ( the_tod->day > days_in_month ) return false; return true; } 10c10e: 5b pop %ebx 10c10f: c9 leave 10c110: c3 ret return false; if ( (the_tod->year % 4) == 0 ) days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ]; else days_in_month = _TOD_Days_per_month[ 0 ][ the_tod->month ]; 10c111: 8b 04 85 60 37 12 00 mov 0x123760(,%eax,4),%eax 10c118: eb e8 jmp 10c102 <_TOD_Validate+0x5a> <== ALWAYS TAKEN 0010cfcc <_Thread_Change_priority>: void _Thread_Change_priority( Thread_Control *the_thread, Priority_Control new_priority, bool prepend_it ) { 10cfcc: 55 push %ebp 10cfcd: 89 e5 mov %esp,%ebp 10cfcf: 57 push %edi 10cfd0: 56 push %esi 10cfd1: 53 push %ebx 10cfd2: 83 ec 28 sub $0x28,%esp 10cfd5: 8b 5d 08 mov 0x8(%ebp),%ebx 10cfd8: 8b 75 0c mov 0xc(%ebp),%esi 10cfdb: 8a 45 10 mov 0x10(%ebp),%al 10cfde: 88 45 e7 mov %al,-0x19(%ebp) */ /* * Save original state */ original_state = the_thread->current_state; 10cfe1: 8b 7b 10 mov 0x10(%ebx),%edi /* * Set a transient state for the thread so it is pulled off the Ready chains. * This will prevent it from being scheduled no matter what happens in an * ISR. */ _Thread_Set_transient( the_thread ); 10cfe4: 53 push %ebx 10cfe5: e8 6a 0e 00 00 call 10de54 <_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 ) 10cfea: 83 c4 10 add $0x10,%esp 10cfed: 39 73 14 cmp %esi,0x14(%ebx) 10cff0: 74 0d je 10cfff <_Thread_Change_priority+0x33> _Thread_Set_priority( the_thread, new_priority ); 10cff2: 83 ec 08 sub $0x8,%esp 10cff5: 56 push %esi 10cff6: 53 push %ebx 10cff7: e8 10 0d 00 00 call 10dd0c <_Thread_Set_priority> <== ALWAYS TAKEN 10cffc: 83 c4 10 add $0x10,%esp _ISR_Disable( level ); 10cfff: 9c pushf 10d000: fa cli 10d001: 5a pop %edx /* * If the thread has more than STATES_TRANSIENT set, then it is blocked, * If it is blocked on a thread queue, then we need to requeue it. */ state = the_thread->current_state; 10d002: 8b 43 10 mov 0x10(%ebx),%eax if ( state != STATES_TRANSIENT ) { 10d005: 83 f8 04 cmp $0x4,%eax 10d008: 74 26 je 10d030 <_Thread_Change_priority+0x64> /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) 10d00a: 83 e7 04 and $0x4,%edi 10d00d: 74 15 je 10d024 <_Thread_Change_priority+0x58> <== NEVER TAKEN the_thread->current_state = _States_Clear( STATES_TRANSIENT, state ); _ISR_Enable( level ); 10d00f: 52 push %edx 10d010: 9d popf if ( _States_Is_waiting_on_thread_queue( state ) ) { 10d011: a9 e0 be 03 00 test $0x3bee0,%eax 10d016: 0f 85 bc 00 00 00 jne 10d0d8 <_Thread_Change_priority+0x10c> if ( !_Thread_Is_executing_also_the_heir() && _Thread_Executing->is_preemptible ) _Context_Switch_necessary = true; _ISR_Enable( level ); } 10d01c: 8d 65 f4 lea -0xc(%ebp),%esp 10d01f: 5b pop %ebx 10d020: 5e pop %esi 10d021: 5f pop %edi 10d022: c9 leave 10d023: c3 ret */ state = the_thread->current_state; if ( state != STATES_TRANSIENT ) { /* 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 ); 10d024: 89 c1 mov %eax,%ecx 10d026: 83 e1 fb and $0xfffffffb,%ecx 10d029: 89 4b 10 mov %ecx,0x10(%ebx) 10d02c: eb e1 jmp 10d00f <_Thread_Change_priority+0x43> <== ALWAYS TAKEN 10d02e: 66 90 xchg %ax,%ax <== NOT EXECUTED } return; } /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) { 10d030: 83 e7 04 and $0x4,%edi 10d033: 75 45 jne 10d07a <_Thread_Change_priority+0xae> <== 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 ); 10d035: 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; 10d03c: 8b 83 90 00 00 00 mov 0x90(%ebx),%eax 10d042: 66 8b 8b 96 00 00 00 mov 0x96(%ebx),%cx 10d049: 66 09 08 or %cx,(%eax) _Priority_Major_bit_map |= the_priority_map->ready_major; 10d04c: 66 a1 8c 74 12 00 mov 0x12748c,%ax 10d052: 0b 83 94 00 00 00 or 0x94(%ebx),%eax 10d058: 66 a3 8c 74 12 00 mov %ax,0x12748c _Priority_Add_to_bit_map( &the_thread->Priority_map ); if ( prepend_it ) 10d05e: 80 7d e7 00 cmpb $0x0,-0x19(%ebp) 10d062: 0f 84 88 00 00 00 je 10d0f0 <_Thread_Change_priority+0x124> */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Head( Chain_Control *the_chain ) { return (Chain_Node *) the_chain; 10d068: 8b 83 8c 00 00 00 mov 0x8c(%ebx),%eax Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 10d06e: 89 43 04 mov %eax,0x4(%ebx) before_node = after_node->next; 10d071: 8b 08 mov (%eax),%ecx after_node->next = the_node; 10d073: 89 18 mov %ebx,(%eax) the_node->next = before_node; 10d075: 89 0b mov %ecx,(%ebx) before_node->previous = the_node; 10d077: 89 59 04 mov %ebx,0x4(%ecx) _Chain_Prepend_unprotected( the_thread->ready, &the_thread->Object.Node ); else _Chain_Append_unprotected( the_thread->ready, &the_thread->Object.Node ); } _ISR_Flash( level ); 10d07a: 52 push %edx 10d07b: 9d popf 10d07c: 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 ); 10d07d: 66 8b 1d 8c 74 12 00 mov 0x12748c,%bx 10d084: 31 c0 xor %eax,%eax 10d086: 89 c1 mov %eax,%ecx 10d088: 66 0f bc cb bsf %bx,%cx _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); 10d08c: 0f b7 c9 movzwl %cx,%ecx 10d08f: 66 8b 9c 09 20 75 12 mov 0x127520(%ecx,%ecx,1),%bx 10d096: 00 10d097: 66 0f bc c3 bsf %bx,%ax * ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) 10d09b: c1 e1 04 shl $0x4,%ecx 10d09e: 0f b7 c0 movzwl %ax,%eax 10d0a1: 8d 04 01 lea (%ecx,%eax,1),%eax 10d0a4: 8d 0c 40 lea (%eax,%eax,2),%ecx 10d0a7: a1 a0 73 12 00 mov 0x1273a0,%eax 10d0ac: 8b 04 88 mov (%eax,%ecx,4),%eax 10d0af: a3 68 74 12 00 mov %eax,0x127468 * is also the heir thread, and false otherwise. */ RTEMS_INLINE_ROUTINE bool _Thread_Is_executing_also_the_heir( void ) { return ( _Thread_Executing == _Thread_Heir ); 10d0b4: 8b 0d 98 74 12 00 mov 0x127498,%ecx * We altered the set of thread priorities. So let's figure out * who is the heir and if we need to switch to them. */ _Thread_Calculate_heir(); if ( !_Thread_Is_executing_also_the_heir() && 10d0ba: 39 c8 cmp %ecx,%eax 10d0bc: 74 0d je 10d0cb <_Thread_Change_priority+0xff> _Thread_Executing->is_preemptible ) 10d0be: 80 79 75 00 cmpb $0x0,0x75(%ecx) 10d0c2: 74 07 je 10d0cb <_Thread_Change_priority+0xff> _Context_Switch_necessary = true; 10d0c4: c6 05 a8 74 12 00 01 movb $0x1,0x1274a8 _ISR_Enable( level ); 10d0cb: 52 push %edx 10d0cc: 9d popf } 10d0cd: 8d 65 f4 lea -0xc(%ebp),%esp 10d0d0: 5b pop %ebx 10d0d1: 5e pop %esi 10d0d2: 5f pop %edi 10d0d3: c9 leave 10d0d4: c3 ret 10d0d5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED /* 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 ); 10d0d8: 89 5d 0c mov %ebx,0xc(%ebp) 10d0db: 8b 43 44 mov 0x44(%ebx),%eax 10d0de: 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 ); } 10d0e1: 8d 65 f4 lea -0xc(%ebp),%esp 10d0e4: 5b pop %ebx 10d0e5: 5e pop %esi 10d0e6: 5f pop %edi 10d0e7: 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 ); 10d0e8: e9 87 0b 00 00 jmp 10dc74 <_Thread_queue_Requeue> 10d0ed: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED _Priority_Add_to_bit_map( &the_thread->Priority_map ); if ( prepend_it ) _Chain_Prepend_unprotected( the_thread->ready, &the_thread->Object.Node ); else _Chain_Append_unprotected( the_thread->ready, &the_thread->Object.Node ); 10d0f0: 8b 83 8c 00 00 00 mov 0x8c(%ebx),%eax Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 10d0f6: 8d 48 04 lea 0x4(%eax),%ecx 10d0f9: 89 0b mov %ecx,(%ebx) old_last_node = the_chain->last; 10d0fb: 8b 48 08 mov 0x8(%eax),%ecx the_chain->last = the_node; 10d0fe: 89 58 08 mov %ebx,0x8(%eax) old_last_node->next = the_node; 10d101: 89 19 mov %ebx,(%ecx) the_node->previous = old_last_node; 10d103: 89 4b 04 mov %ecx,0x4(%ebx) 10d106: e9 6f ff ff ff jmp 10d07a <_Thread_Change_priority+0xae> <== ALWAYS TAKEN 0010d10c <_Thread_Clear_state>: void _Thread_Clear_state( Thread_Control *the_thread, States_Control state ) { 10d10c: 55 push %ebp 10d10d: 89 e5 mov %esp,%ebp 10d10f: 53 push %ebx 10d110: 8b 45 08 mov 0x8(%ebp),%eax 10d113: 8b 55 0c mov 0xc(%ebp),%edx ISR_Level level; States_Control current_state; _ISR_Disable( level ); 10d116: 9c pushf 10d117: fa cli 10d118: 5b pop %ebx current_state = the_thread->current_state; 10d119: 8b 48 10 mov 0x10(%eax),%ecx if ( current_state & state ) { 10d11c: 85 ca test %ecx,%edx 10d11e: 74 70 je 10d190 <_Thread_Clear_state+0x84> RTEMS_INLINE_ROUTINE States_Control _States_Clear ( States_Control states_to_clear, States_Control current_state ) { return (current_state & ~states_to_clear); 10d120: f7 d2 not %edx 10d122: 21 ca and %ecx,%edx current_state = 10d124: 89 50 10 mov %edx,0x10(%eax) the_thread->current_state = _States_Clear( state, current_state ); if ( _States_Is_ready( current_state ) ) { 10d127: 85 d2 test %edx,%edx 10d129: 75 65 jne 10d190 <_Thread_Clear_state+0x84> RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; 10d12b: 8b 90 90 00 00 00 mov 0x90(%eax),%edx 10d131: 66 8b 88 96 00 00 00 mov 0x96(%eax),%cx 10d138: 66 09 0a or %cx,(%edx) _Priority_Major_bit_map |= the_priority_map->ready_major; 10d13b: 66 8b 15 8c 74 12 00 mov 0x12748c,%dx 10d142: 0b 90 94 00 00 00 or 0x94(%eax),%edx 10d148: 66 89 15 8c 74 12 00 mov %dx,0x12748c _Priority_Add_to_bit_map( &the_thread->Priority_map ); _Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node); 10d14f: 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); 10d155: 8d 4a 04 lea 0x4(%edx),%ecx 10d158: 89 08 mov %ecx,(%eax) old_last_node = the_chain->last; 10d15a: 8b 4a 08 mov 0x8(%edx),%ecx the_chain->last = the_node; 10d15d: 89 42 08 mov %eax,0x8(%edx) old_last_node->next = the_node; 10d160: 89 01 mov %eax,(%ecx) the_node->previous = old_last_node; 10d162: 89 48 04 mov %ecx,0x4(%eax) _ISR_Flash( level ); 10d165: 53 push %ebx 10d166: 9d popf 10d167: 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 ) { 10d168: 8b 50 14 mov 0x14(%eax),%edx 10d16b: 8b 0d 68 74 12 00 mov 0x127468,%ecx 10d171: 3b 51 14 cmp 0x14(%ecx),%edx 10d174: 73 1a jae 10d190 <_Thread_Clear_state+0x84> _Thread_Heir = the_thread; 10d176: a3 68 74 12 00 mov %eax,0x127468 if ( _Thread_Executing->is_preemptible || 10d17b: a1 98 74 12 00 mov 0x127498,%eax 10d180: 80 78 75 00 cmpb $0x0,0x75(%eax) 10d184: 74 12 je 10d198 <_Thread_Clear_state+0x8c> the_thread->current_priority == 0 ) _Context_Switch_necessary = true; 10d186: c6 05 a8 74 12 00 01 movb $0x1,0x1274a8 10d18d: 8d 76 00 lea 0x0(%esi),%esi } } } _ISR_Enable( level ); 10d190: 53 push %ebx 10d191: 9d popf } 10d192: 5b pop %ebx 10d193: c9 leave 10d194: c3 ret 10d195: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED * Even if the thread isn't preemptible, if the new heir is * a pseudo-ISR system task, we need to do a context switch. */ if ( the_thread->current_priority < _Thread_Heir->current_priority ) { _Thread_Heir = the_thread; if ( _Thread_Executing->is_preemptible || 10d198: 85 d2 test %edx,%edx 10d19a: 74 ea je 10d186 <_Thread_Clear_state+0x7a> <== ALWAYS TAKEN 10d19c: eb f2 jmp 10d190 <_Thread_Clear_state+0x84> <== ALWAYS TAKEN 0010d1a0 <_Thread_Close>: void _Thread_Close( Objects_Information *information, Thread_Control *the_thread ) { 10d1a0: 55 push %ebp 10d1a1: 89 e5 mov %esp,%ebp 10d1a3: 56 push %esi 10d1a4: 53 push %ebx 10d1a5: 8b 75 08 mov 0x8(%ebp),%esi 10d1a8: 8b 5d 0c mov 0xc(%ebp),%ebx 10d1ab: 0f b7 53 08 movzwl 0x8(%ebx),%edx 10d1af: 8b 46 1c mov 0x1c(%esi),%eax 10d1b2: 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; 10d1b9: a1 d8 73 12 00 mov 0x1273d8,%eax 10d1be: 48 dec %eax 10d1bf: a3 d8 73 12 00 mov %eax,0x1273d8 * disappear and set a transient state on it. So we temporarily * unnest dispatching. */ _Thread_Unnest_dispatch(); _User_extensions_Thread_delete( the_thread ); 10d1c4: 83 ec 0c sub $0xc,%esp 10d1c7: 53 push %ebx 10d1c8: e8 73 11 00 00 call 10e340 <_User_extensions_Thread_delete> rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10d1cd: a1 d8 73 12 00 mov 0x1273d8,%eax 10d1d2: 40 inc %eax 10d1d3: a3 d8 73 12 00 mov %eax,0x1273d8 /* * 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 ); 10d1d8: 59 pop %ecx 10d1d9: 58 pop %eax 10d1da: 53 push %ebx 10d1db: 56 push %esi 10d1dc: e8 2b f6 ff ff call 10c80c <_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 ); 10d1e1: 58 pop %eax 10d1e2: 5a pop %edx 10d1e3: 6a 01 push $0x1 10d1e5: 53 push %ebx 10d1e6: e8 8d 0b 00 00 call 10dd78 <_Thread_Set_state> <== ALWAYS TAKEN if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) { 10d1eb: 89 1c 24 mov %ebx,(%esp) 10d1ee: e8 d9 09 00 00 call 10dbcc <_Thread_queue_Extract_with_proxy> <== ALWAYS TAKEN 10d1f3: 83 c4 10 add $0x10,%esp 10d1f6: 84 c0 test %al,%al 10d1f8: 75 06 jne 10d200 <_Thread_Close+0x60> if ( _Watchdog_Is_active( &the_thread->Timer ) ) 10d1fa: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 10d1fe: 74 68 je 10d268 <_Thread_Close+0xc8> /* * The thread might have been FP. So deal with that. */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( _Thread_Is_allocated_fp( the_thread ) ) 10d200: 3b 1d 60 74 12 00 cmp 0x127460,%ebx 10d206: 74 74 je 10d27c <_Thread_Close+0xdc> _Thread_Deallocate_fp(); #endif the_thread->fp_context = NULL; 10d208: c7 83 ec 00 00 00 00 movl $0x0,0xec(%ebx) 10d20f: 00 00 00 if ( the_thread->Start.fp_context ) 10d212: 8b 83 cc 00 00 00 mov 0xcc(%ebx),%eax 10d218: 85 c0 test %eax,%eax 10d21a: 74 0c je 10d228 <_Thread_Close+0x88> (void) _Workspace_Free( the_thread->Start.fp_context ); 10d21c: 83 ec 0c sub $0xc,%esp 10d21f: 50 push %eax 10d220: e8 33 14 00 00 call 10e658 <_Workspace_Free> 10d225: 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 ); 10d228: 83 ec 0c sub $0xc,%esp 10d22b: 53 push %ebx 10d22c: e8 fb 0c 00 00 call 10df2c <_Thread_Stack_Free> <== ALWAYS TAKEN the_thread->Start.stack = NULL; 10d231: c7 83 d0 00 00 00 00 movl $0x0,0xd0(%ebx) 10d238: 00 00 00 if ( the_thread->extensions ) 10d23b: 8b 83 00 01 00 00 mov 0x100(%ebx),%eax 10d241: 83 c4 10 add $0x10,%esp 10d244: 85 c0 test %eax,%eax 10d246: 74 0c je 10d254 <_Thread_Close+0xb4> (void) _Workspace_Free( the_thread->extensions ); 10d248: 83 ec 0c sub $0xc,%esp 10d24b: 50 push %eax 10d24c: e8 07 14 00 00 call 10e658 <_Workspace_Free> 10d251: 83 c4 10 add $0x10,%esp the_thread->extensions = NULL; 10d254: c7 83 00 01 00 00 00 movl $0x0,0x100(%ebx) 10d25b: 00 00 00 } 10d25e: 8d 65 f8 lea -0x8(%ebp),%esp 10d261: 5b pop %ebx 10d262: 5e pop %esi 10d263: c9 leave 10d264: c3 ret 10d265: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED */ _Thread_Set_state( the_thread, STATES_DORMANT ); if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) { if ( _Watchdog_Is_active( &the_thread->Timer ) ) (void) _Watchdog_Remove( &the_thread->Timer ); 10d268: 83 ec 0c sub $0xc,%esp 10d26b: 8d 43 48 lea 0x48(%ebx),%eax 10d26e: 50 push %eax 10d26f: e8 c4 12 00 00 call 10e538 <_Watchdog_Remove> 10d274: 83 c4 10 add $0x10,%esp 10d277: eb 87 jmp 10d200 <_Thread_Close+0x60> <== ALWAYS TAKEN 10d279: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Deallocate_fp( void ) { _Thread_Allocated_fp = NULL; 10d27c: c7 05 60 74 12 00 00 movl $0x0,0x127460 10d283: 00 00 00 10d286: eb 80 jmp 10d208 <_Thread_Close+0x68> <== ALWAYS TAKEN 0010d288 <_Thread_Create_idle>: * * _Thread_Create_idle */ void _Thread_Create_idle( void ) { 10d288: 55 push %ebp 10d289: 89 e5 mov %esp,%ebp 10d28b: 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 ); 10d28e: 68 60 75 12 00 push $0x127560 10d293: e8 f8 f4 ff ff call 10c790 <_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(); 10d298: a3 a8 75 12 00 mov %eax,0x1275a8 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10d29d: a1 d8 73 12 00 mov 0x1273d8,%eax 10d2a2: 40 inc %eax 10d2a3: a3 d8 73 12 00 mov %eax,0x1273d8 * that when _Thread_Initialize unnests dispatch that we do not * do anything stupid. */ _Thread_Disable_dispatch(); _Thread_Initialize( 10d2a8: 8b 15 38 32 12 00 mov 0x123238,%edx 10d2ae: 83 c4 0c add $0xc,%esp 10d2b1: 68 45 4c 44 49 push $0x49444c45 10d2b6: 6a 00 push $0x0 10d2b8: 6a 00 push $0x0 10d2ba: 6a 00 push $0x0 10d2bc: 6a 01 push $0x1 10d2be: 0f b6 05 14 32 12 00 movzbl 0x123214,%eax 10d2c5: 50 push %eax 10d2c6: 6a 00 push $0x0 10d2c8: a1 10 32 12 00 mov 0x123210,%eax 10d2cd: 39 d0 cmp %edx,%eax 10d2cf: 73 02 jae 10d2d3 <_Thread_Create_idle+0x4b> 10d2d1: 89 d0 mov %edx,%eax 10d2d3: 50 push %eax 10d2d4: 6a 00 push $0x0 10d2d6: ff 35 a8 75 12 00 pushl 0x1275a8 10d2dc: 68 60 75 12 00 push $0x127560 10d2e1: e8 6a 02 00 00 call 10d550 <_Thread_Initialize> <== ALWAYS TAKEN */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 10d2e6: a1 d8 73 12 00 mov 0x1273d8,%eax 10d2eb: 48 dec %eax 10d2ec: a3 d8 73 12 00 mov %eax,0x1273d8 /* * WARNING!!! This is necessary to "kick" start the system and * MUST be done before _Thread_Start is invoked. */ _Thread_Heir = _Thread_Executing = _Thread_Idle; 10d2f1: a1 a8 75 12 00 mov 0x1275a8,%eax /* * WARNING!!! This is necessary to "kick" start the system and * MUST be done before _Thread_Start is invoked. */ _Thread_Heir = 10d2f6: a3 98 74 12 00 mov %eax,0x127498 10d2fb: a3 68 74 12 00 mov %eax,0x127468 _Thread_Executing = _Thread_Idle; _Thread_Start( 10d300: 83 c4 24 add $0x24,%esp 10d303: 6a 00 push $0x0 10d305: 6a 00 push $0x0 10d307: ff 35 34 32 12 00 pushl 0x123234 10d30d: 6a 00 push $0x0 10d30f: 50 push %eax 10d310: e8 af 0c 00 00 call 10dfc4 <_Thread_Start> <== ALWAYS TAKEN 10d315: 83 c4 20 add $0x20,%esp Configuration.idle_task, NULL, 0 ); } 10d318: c9 leave 10d319: c3 ret 0010d31c <_Thread_Delay_ended>: void _Thread_Delay_ended( Objects_Id id, void *ignored __attribute__((unused)) ) { 10d31c: 55 push %ebp 10d31d: 89 e5 mov %esp,%ebp 10d31f: 83 ec 20 sub $0x20,%esp Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 10d322: 8d 45 f4 lea -0xc(%ebp),%eax 10d325: 50 push %eax 10d326: ff 75 08 pushl 0x8(%ebp) 10d329: e8 aa 01 00 00 call 10d4d8 <_Thread_Get> <== ALWAYS TAKEN switch ( location ) { 10d32e: 83 c4 10 add $0x10,%esp 10d331: 8b 55 f4 mov -0xc(%ebp),%edx 10d334: 85 d2 test %edx,%edx 10d336: 75 1c jne 10d354 <_Thread_Delay_ended+0x38> <== ALWAYS TAKEN #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_Clear_state( 10d338: 83 ec 08 sub $0x8,%esp 10d33b: 68 18 00 00 10 push $0x10000018 10d340: 50 push %eax 10d341: e8 c6 fd ff ff call 10d10c <_Thread_Clear_state> <== ALWAYS TAKEN 10d346: a1 d8 73 12 00 mov 0x1273d8,%eax 10d34b: 48 dec %eax 10d34c: a3 d8 73 12 00 mov %eax,0x1273d8 10d351: 83 c4 10 add $0x10,%esp | STATES_INTERRUPTIBLE_BY_SIGNAL ); _Thread_Unnest_dispatch(); break; } } 10d354: c9 leave 10d355: c3 ret 0010d358 <_Thread_Dispatch>: * dispatch thread * no dispatch thread */ void _Thread_Dispatch( void ) { 10d358: 55 push %ebp 10d359: 89 e5 mov %esp,%ebp 10d35b: 57 push %edi 10d35c: 56 push %esi 10d35d: 53 push %ebx 10d35e: 83 ec 1c sub $0x1c,%esp Thread_Control *executing; Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; 10d361: 8b 1d 98 74 12 00 mov 0x127498,%ebx _ISR_Disable( level ); 10d367: 9c pushf 10d368: fa cli 10d369: 58 pop %eax while ( _Context_Switch_necessary == true ) { 10d36a: 8a 15 a8 74 12 00 mov 0x1274a8,%dl 10d370: 84 d2 test %dl,%dl 10d372: 0f 84 10 01 00 00 je 10d488 <_Thread_Dispatch+0x130> 10d378: 8d 7d d8 lea -0x28(%ebp),%edi 10d37b: e9 d1 00 00 00 jmp 10d451 <_Thread_Dispatch+0xf9> <== ALWAYS TAKEN 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 ) heir->cpu_time_budget = _Thread_Ticks_per_timeslice; _ISR_Enable( level ); 10d380: 50 push %eax 10d381: 9d popf #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ { Timestamp_Control uptime, ran; _TOD_Get_uptime( &uptime ); 10d382: 83 ec 0c sub $0xc,%esp 10d385: 8d 45 e0 lea -0x20(%ebp),%eax 10d388: 50 push %eax 10d389: e8 66 38 00 00 call 110bf4 <_TOD_Get_uptime> _Timestamp_Subtract( 10d38e: 83 c4 0c add $0xc,%esp 10d391: 57 push %edi 10d392: 8d 45 e0 lea -0x20(%ebp),%eax 10d395: 50 push %eax 10d396: 68 a0 74 12 00 push $0x1274a0 10d39b: e8 90 0d 00 00 call 10e130 <_Timespec_Subtract> <== ALWAYS TAKEN &_Thread_Time_of_last_context_switch, &uptime, &ran ); _Timestamp_Add_to( &executing->cpu_time_used, &ran ); 10d3a0: 5a pop %edx 10d3a1: 59 pop %ecx 10d3a2: 57 push %edi 10d3a3: 8d 83 84 00 00 00 lea 0x84(%ebx),%eax 10d3a9: 50 push %eax 10d3aa: e8 45 0d 00 00 call 10e0f4 <_Timespec_Add_to> <== ALWAYS TAKEN _Thread_Time_of_last_context_switch = uptime; 10d3af: 8b 45 e0 mov -0x20(%ebp),%eax 10d3b2: 8b 55 e4 mov -0x1c(%ebp),%edx 10d3b5: a3 a0 74 12 00 mov %eax,0x1274a0 10d3ba: 89 15 a4 74 12 00 mov %edx,0x1274a4 #endif /* * Switch libc's task specific data. */ if ( _Thread_libc_reent ) { 10d3c0: a1 64 74 12 00 mov 0x127464,%eax 10d3c5: 83 c4 10 add $0x10,%esp 10d3c8: 85 c0 test %eax,%eax 10d3ca: 74 10 je 10d3dc <_Thread_Dispatch+0x84> <== ALWAYS TAKEN executing->libc_reent = *_Thread_libc_reent; 10d3cc: 8b 10 mov (%eax),%edx 10d3ce: 89 93 f0 00 00 00 mov %edx,0xf0(%ebx) *_Thread_libc_reent = heir->libc_reent; 10d3d4: 8b 96 f0 00 00 00 mov 0xf0(%esi),%edx 10d3da: 89 10 mov %edx,(%eax) } _User_extensions_Thread_switch( executing, heir ); 10d3dc: 83 ec 08 sub $0x8,%esp 10d3df: 56 push %esi 10d3e0: 53 push %ebx 10d3e1: e8 da 0f 00 00 call 10e3c0 <_User_extensions_Thread_switch> if ( executing->fp_context != NULL ) _Context_Save_fp( &executing->fp_context ); #endif #endif _Context_Switch( &executing->Registers, &heir->Registers ); 10d3e6: 59 pop %ecx 10d3e7: 58 pop %eax 10d3e8: 81 c6 d4 00 00 00 add $0xd4,%esi 10d3ee: 56 push %esi 10d3ef: 8d 83 d4 00 00 00 lea 0xd4(%ebx),%eax 10d3f5: 50 push %eax 10d3f6: e8 c5 12 00 00 call 10e6c0 <_CPU_Context_switch> #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( (executing->fp_context != NULL) && 10d3fb: 83 c4 10 add $0x10,%esp 10d3fe: 8b 93 ec 00 00 00 mov 0xec(%ebx),%edx 10d404: 85 d2 test %edx,%edx 10d406: 74 36 je 10d43e <_Thread_Dispatch+0xe6> #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 ); 10d408: a1 60 74 12 00 mov 0x127460,%eax 10d40d: 39 c3 cmp %eax,%ebx 10d40f: 74 2d je 10d43e <_Thread_Dispatch+0xe6> !_Thread_Is_allocated_fp( executing ) ) { if ( _Thread_Allocated_fp != NULL ) 10d411: 85 c0 test %eax,%eax 10d413: 74 11 je 10d426 <_Thread_Dispatch+0xce> _Context_Save_fp( &_Thread_Allocated_fp->fp_context ); 10d415: 83 ec 0c sub $0xc,%esp 10d418: 05 ec 00 00 00 add $0xec,%eax 10d41d: 50 push %eax 10d41e: e8 d1 12 00 00 call 10e6f4 <_CPU_Context_save_fp> 10d423: 83 c4 10 add $0x10,%esp _Context_Restore_fp( &executing->fp_context ); 10d426: 83 ec 0c sub $0xc,%esp 10d429: 8d 83 ec 00 00 00 lea 0xec(%ebx),%eax 10d42f: 50 push %eax 10d430: e8 c9 12 00 00 call 10e6fe <_CPU_Context_restore_fp> _Thread_Allocated_fp = executing; 10d435: 89 1d 60 74 12 00 mov %ebx,0x127460 10d43b: 83 c4 10 add $0x10,%esp if ( executing->fp_context != NULL ) _Context_Restore_fp( &executing->fp_context ); #endif #endif executing = _Thread_Executing; 10d43e: 8b 1d 98 74 12 00 mov 0x127498,%ebx _ISR_Disable( level ); 10d444: 9c pushf 10d445: fa cli 10d446: 58 pop %eax Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; _ISR_Disable( level ); while ( _Context_Switch_necessary == true ) { 10d447: 8a 15 a8 74 12 00 mov 0x1274a8,%dl 10d44d: 84 d2 test %dl,%dl 10d44f: 74 37 je 10d488 <_Thread_Dispatch+0x130> heir = _Thread_Heir; 10d451: 8b 35 68 74 12 00 mov 0x127468,%esi _Thread_Dispatch_disable_level = 1; 10d457: c7 05 d8 73 12 00 01 movl $0x1,0x1273d8 10d45e: 00 00 00 _Context_Switch_necessary = false; 10d461: c6 05 a8 74 12 00 00 movb $0x0,0x1274a8 _Thread_Executing = heir; 10d468: 89 35 98 74 12 00 mov %esi,0x127498 #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 ) 10d46e: 83 7e 7c 01 cmpl $0x1,0x7c(%esi) 10d472: 0f 85 08 ff ff ff jne 10d380 <_Thread_Dispatch+0x28> heir->cpu_time_budget = _Thread_Ticks_per_timeslice; 10d478: 8b 15 a4 73 12 00 mov 0x1273a4,%edx 10d47e: 89 56 78 mov %edx,0x78(%esi) 10d481: e9 fa fe ff ff jmp 10d380 <_Thread_Dispatch+0x28> <== ALWAYS TAKEN 10d486: 66 90 xchg %ax,%ax <== NOT EXECUTED executing = _Thread_Executing; _ISR_Disable( level ); } _Thread_Dispatch_disable_level = 0; 10d488: c7 05 d8 73 12 00 00 movl $0x0,0x1273d8 10d48f: 00 00 00 _ISR_Enable( level ); 10d492: 50 push %eax 10d493: 9d popf if ( _Thread_Do_post_task_switch_extension || 10d494: a1 7c 74 12 00 mov 0x12747c,%eax 10d499: 85 c0 test %eax,%eax 10d49b: 75 06 jne 10d4a3 <_Thread_Dispatch+0x14b> executing->do_post_task_switch_extension ) { 10d49d: 80 7b 74 00 cmpb $0x0,0x74(%ebx) 10d4a1: 74 09 je 10d4ac <_Thread_Dispatch+0x154> executing->do_post_task_switch_extension = false; 10d4a3: c6 43 74 00 movb $0x0,0x74(%ebx) _API_extensions_Run_postswitch(); 10d4a7: e8 ac e8 ff ff call 10bd58 <_API_extensions_Run_postswitch> } } 10d4ac: 8d 65 f4 lea -0xc(%ebp),%esp 10d4af: 5b pop %ebx 10d4b0: 5e pop %esi 10d4b1: 5f pop %edi 10d4b2: c9 leave 10d4b3: c3 ret 0010d4b4 <_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 ) { 10d4b4: 55 push %ebp 10d4b5: 89 e5 mov %esp,%ebp 10d4b7: 83 ec 08 sub $0x8,%esp if ( --_Thread_Dispatch_disable_level ) 10d4ba: a1 d8 73 12 00 mov 0x1273d8,%eax 10d4bf: 48 dec %eax 10d4c0: a3 d8 73 12 00 mov %eax,0x1273d8 10d4c5: a1 d8 73 12 00 mov 0x1273d8,%eax 10d4ca: 85 c0 test %eax,%eax 10d4cc: 74 02 je 10d4d0 <_Thread_Enable_dispatch+0x1c> return; _Thread_Dispatch(); } 10d4ce: c9 leave 10d4cf: c3 ret 10d4d0: c9 leave (__RTEMS_DO_NOT_INLINE_THREAD_ENABLE_DISPATCH__ == 1) ) void _Thread_Enable_dispatch( void ) { if ( --_Thread_Dispatch_disable_level ) return; _Thread_Dispatch(); 10d4d1: e9 82 fe ff ff jmp 10d358 <_Thread_Dispatch> <== ALWAYS TAKEN 00112cfc <_Thread_Evaluate_mode>: * * XXX */ bool _Thread_Evaluate_mode( void ) { 112cfc: 55 push %ebp 112cfd: 89 e5 mov %esp,%ebp Thread_Control *executing; executing = _Thread_Executing; 112cff: a1 98 74 12 00 mov 0x127498,%eax if ( !_States_Is_ready( executing->current_state ) || 112d04: 8b 50 10 mov 0x10(%eax),%edx 112d07: 85 d2 test %edx,%edx 112d09: 75 0e jne 112d19 <_Thread_Evaluate_mode+0x1d> <== ALWAYS TAKEN 112d0b: 3b 05 68 74 12 00 cmp 0x127468,%eax 112d11: 74 11 je 112d24 <_Thread_Evaluate_mode+0x28> ( !_Thread_Is_heir( executing ) && executing->is_preemptible ) ) { 112d13: 80 78 75 00 cmpb $0x0,0x75(%eax) 112d17: 74 0b je 112d24 <_Thread_Evaluate_mode+0x28> <== ALWAYS TAKEN _Context_Switch_necessary = true; 112d19: c6 05 a8 74 12 00 01 movb $0x1,0x1274a8 112d20: b0 01 mov $0x1,%al return true; } return false; } 112d22: c9 leave 112d23: c3 ret executing = _Thread_Executing; if ( !_States_Is_ready( executing->current_state ) || ( !_Thread_Is_heir( executing ) && executing->is_preemptible ) ) { _Context_Switch_necessary = true; return true; 112d24: 31 c0 xor %eax,%eax } return false; } 112d26: c9 leave 112d27: c3 ret 0010d4d8 <_Thread_Get>: Thread_Control *_Thread_Get ( Objects_Id id, Objects_Locations *location ) { 10d4d8: 55 push %ebp 10d4d9: 89 e5 mov %esp,%ebp 10d4db: 53 push %ebx 10d4dc: 83 ec 04 sub $0x4,%esp 10d4df: 8b 45 08 mov 0x8(%ebp),%eax 10d4e2: 8b 4d 0c mov 0xc(%ebp),%ecx uint32_t the_class; Objects_Information **api_information; Objects_Information *information; Thread_Control *tp = (Thread_Control *) 0; if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) { 10d4e5: 85 c0 test %eax,%eax 10d4e7: 74 4b je 10d534 <_Thread_Get+0x5c> */ RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API( Objects_Id id ) { return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS); 10d4e9: 89 c2 mov %eax,%edx 10d4eb: c1 ea 18 shr $0x18,%edx 10d4ee: 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 ) 10d4f1: 8d 5a ff lea -0x1(%edx),%ebx 10d4f4: 83 fb 03 cmp $0x3,%ebx 10d4f7: 77 2b ja 10d524 <_Thread_Get+0x4c> *location = OBJECTS_ERROR; goto done; } the_class = _Objects_Get_class( id ); if ( the_class != 1 ) { /* threads are always first class :) */ 10d4f9: 89 c3 mov %eax,%ebx 10d4fb: c1 eb 1b shr $0x1b,%ebx 10d4fe: 4b dec %ebx 10d4ff: 75 23 jne 10d524 <_Thread_Get+0x4c> *location = OBJECTS_ERROR; goto done; } api_information = _Objects_Information_table[ the_api ]; 10d501: 8b 14 95 ac 73 12 00 mov 0x1273ac(,%edx,4),%edx if ( !api_information ) { 10d508: 85 d2 test %edx,%edx 10d50a: 74 18 je 10d524 <_Thread_Get+0x4c> *location = OBJECTS_ERROR; goto done; } information = api_information[ the_class ]; 10d50c: 8b 52 04 mov 0x4(%edx),%edx if ( !information ) { 10d50f: 85 d2 test %edx,%edx 10d511: 74 11 je 10d524 <_Thread_Get+0x4c> *location = OBJECTS_ERROR; goto done; } tp = (Thread_Control *) _Objects_Get( information, id, location ); 10d513: 53 push %ebx 10d514: 51 push %ecx 10d515: 50 push %eax 10d516: 52 push %edx 10d517: e8 24 f7 ff ff call 10cc40 <_Objects_Get> <== ALWAYS TAKEN 10d51c: 83 c4 10 add $0x10,%esp done: return tp; } 10d51f: 8b 5d fc mov -0x4(%ebp),%ebx 10d522: c9 leave 10d523: c3 ret goto done; } information = api_information[ the_class ]; if ( !information ) { *location = OBJECTS_ERROR; 10d524: c7 01 01 00 00 00 movl $0x1,(%ecx) 10d52a: 31 c0 xor %eax,%eax tp = (Thread_Control *) _Objects_Get( information, id, location ); done: return tp; } 10d52c: 8b 5d fc mov -0x4(%ebp),%ebx 10d52f: c9 leave 10d530: c3 ret 10d531: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10d534: a1 d8 73 12 00 mov 0x1273d8,%eax 10d539: 40 inc %eax 10d53a: a3 d8 73 12 00 mov %eax,0x1273d8 Objects_Information *information; Thread_Control *tp = (Thread_Control *) 0; if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) { _Thread_Disable_dispatch(); *location = OBJECTS_LOCAL; 10d53f: c7 01 00 00 00 00 movl $0x0,(%ecx) tp = _Thread_Executing; 10d545: a1 98 74 12 00 mov 0x127498,%eax tp = (Thread_Control *) _Objects_Get( information, id, location ); done: return tp; } 10d54a: 8b 5d fc mov -0x4(%ebp),%ebx 10d54d: c9 leave 10d54e: c3 ret 00112d28 <_Thread_Handler>: * * Output parameters: NONE */ void _Thread_Handler( void ) { 112d28: 55 push %ebp 112d29: 89 e5 mov %esp,%ebp 112d2b: 53 push %ebx 112d2c: 83 ec 14 sub $0x14,%esp #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) static char doneConstructors; char doneCons; #endif executing = _Thread_Executing; 112d2f: 8b 1d 98 74 12 00 mov 0x127498,%ebx /* * have to put level into a register for those cpu's that use * inline asm here */ level = executing->Start.isr_level; 112d35: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax _ISR_Set_level(level); 112d3b: 85 c0 test %eax,%eax 112d3d: 74 79 je 112db8 <_Thread_Handler+0x90> 112d3f: fa cli #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) doneCons = doneConstructors; 112d40: a0 10 70 12 00 mov 0x127010,%al 112d45: 88 45 f7 mov %al,-0x9(%ebp) doneConstructors = 1; 112d48: c6 05 10 70 12 00 01 movb $0x1,0x127010 #endif #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( (executing->fp_context != NULL) && 112d4f: 8b 83 ec 00 00 00 mov 0xec(%ebx),%eax 112d55: 85 c0 test %eax,%eax 112d57: 74 24 je 112d7d <_Thread_Handler+0x55> #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) RTEMS_INLINE_ROUTINE bool _Thread_Is_allocated_fp ( const Thread_Control *the_thread ) { return ( the_thread == _Thread_Allocated_fp ); 112d59: a1 60 74 12 00 mov 0x127460,%eax 112d5e: 39 c3 cmp %eax,%ebx 112d60: 74 1b je 112d7d <_Thread_Handler+0x55> !_Thread_Is_allocated_fp( executing ) ) { if ( _Thread_Allocated_fp != NULL ) 112d62: 85 c0 test %eax,%eax 112d64: 74 11 je 112d77 <_Thread_Handler+0x4f> _Context_Save_fp( &_Thread_Allocated_fp->fp_context ); 112d66: 83 ec 0c sub $0xc,%esp 112d69: 05 ec 00 00 00 add $0xec,%eax 112d6e: 50 push %eax 112d6f: e8 80 b9 ff ff call 10e6f4 <_CPU_Context_save_fp> 112d74: 83 c4 10 add $0x10,%esp _Thread_Allocated_fp = executing; 112d77: 89 1d 60 74 12 00 mov %ebx,0x127460 /* * 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 ); 112d7d: 83 ec 0c sub $0xc,%esp 112d80: 53 push %ebx 112d81: e8 aa b4 ff ff call 10e230 <_User_extensions_Thread_begin> /* * At this point, the dispatch disable level BETTER be 1. */ _Thread_Enable_dispatch(); 112d86: e8 29 a7 ff ff call 10d4b4 <_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) */ { 112d8b: 83 c4 10 add $0x10,%esp 112d8e: 80 7d f7 00 cmpb $0x0,-0x9(%ebp) 112d92: 74 28 je 112dbc <_Thread_Handler+0x94> INIT_NAME (); } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { 112d94: 8b 83 a0 00 00 00 mov 0xa0(%ebx),%eax 112d9a: 85 c0 test %eax,%eax 112d9c: 74 2d je 112dcb <_Thread_Handler+0xa3> (*(Thread_Entry_numeric) executing->Start.entry_point)( executing->Start.numeric_argument ); } #if defined(RTEMS_POSIX_API) else if ( executing->Start.prototype == THREAD_START_POINTER ) { 112d9e: 48 dec %eax 112d9f: 74 43 je 112de4 <_Thread_Handler+0xbc> <== NEVER TAKEN * was placed in return_argument. This assumed that if it returned * anything (which is not supporting in all APIs), then it would be * able to fit in a (void *). */ _User_extensions_Thread_exitted( executing ); 112da1: 83 ec 0c sub $0xc,%esp 112da4: 53 push %ebx 112da5: e8 c2 b4 ff ff call 10e26c <_User_extensions_Thread_exitted> _Internal_error_Occurred( 112daa: 83 c4 0c add $0xc,%esp 112dad: 6a 06 push $0x6 112daf: 6a 01 push $0x1 112db1: 6a 00 push $0x0 112db3: e8 40 99 ff ff call 10c6f8 <_Internal_error_Occurred> * have to put level into a register for those cpu's that use * inline asm here */ level = executing->Start.isr_level; _ISR_Set_level(level); 112db8: fb sti 112db9: eb 85 jmp 112d40 <_Thread_Handler+0x18> 112dbb: 90 nop <== NOT EXECUTED * _init could be a weak symbol and we SHOULD test it but it isn't * in any configuration I know of and it generates a warning on every * RTEMS target configuration. --joel (12 May 2007) */ if (!doneCons) /* && (volatile void *)_init) */ { INIT_NAME (); 112dbc: e8 5f c5 00 00 call 11f320 <__start_set_sysctl_set> } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { 112dc1: 8b 83 a0 00 00 00 mov 0xa0(%ebx),%eax 112dc7: 85 c0 test %eax,%eax 112dc9: 75 d3 jne 112d9e <_Thread_Handler+0x76> executing->Wait.return_argument = (*(Thread_Entry_numeric) executing->Start.entry_point)( 112dcb: 83 ec 0c sub $0xc,%esp 112dce: ff b3 a8 00 00 00 pushl 0xa8(%ebx) 112dd4: ff 93 9c 00 00 00 call *0x9c(%ebx) INIT_NAME (); } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { executing->Wait.return_argument = 112dda: 89 43 28 mov %eax,0x28(%ebx) 112ddd: 83 c4 10 add $0x10,%esp 112de0: eb bf jmp 112da1 <_Thread_Handler+0x79> <== ALWAYS TAKEN 112de2: 66 90 xchg %ax,%ax <== NOT EXECUTED ); } #if defined(RTEMS_POSIX_API) else if ( executing->Start.prototype == THREAD_START_POINTER ) { executing->Wait.return_argument = (*(Thread_Entry_pointer) executing->Start.entry_point)( 112de4: 83 ec 0c sub $0xc,%esp 112de7: ff b3 a4 00 00 00 pushl 0xa4(%ebx) 112ded: 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 = 112df3: 89 43 28 mov %eax,0x28(%ebx) 112df6: 83 c4 10 add $0x10,%esp 112df9: eb a6 jmp 112da1 <_Thread_Handler+0x79> <== ALWAYS TAKEN 0010d7cc <_Thread_Handler_initialization>: * * Output parameters: NONE */ void _Thread_Handler_initialization(void) { 10d7cc: 55 push %ebp 10d7cd: 89 e5 mov %esp,%ebp 10d7cf: 53 push %ebx 10d7d0: 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; 10d7d3: a1 30 32 12 00 mov 0x123230,%eax maximum_extensions = Configuration.maximum_extensions; 10d7d8: 8b 15 28 32 12 00 mov 0x123228,%edx #endif /* * BOTH stacks hooks must be set or both must be NULL. * Do not allow mixture. */ if ( !( (!Configuration.stack_allocate_hook) 10d7de: 8b 1d 44 32 12 00 mov 0x123244,%ebx 10d7e4: 85 db test %ebx,%ebx 10d7e6: 0f 94 c3 sete %bl 10d7e9: 8b 0d 40 32 12 00 mov 0x123240,%ecx 10d7ef: 85 c9 test %ecx,%ecx 10d7f1: 0f 94 c1 sete %cl 10d7f4: 38 cb cmp %cl,%bl 10d7f6: 0f 85 9d 00 00 00 jne 10d899 <_Thread_Handler_initialization+0xcd> INTERNAL_ERROR_CORE, true, INTERNAL_ERROR_BAD_STACK_HOOK ); _Context_Switch_necessary = false; 10d7fc: c6 05 a8 74 12 00 00 movb $0x0,0x1274a8 _Thread_Executing = NULL; 10d803: c7 05 98 74 12 00 00 movl $0x0,0x127498 10d80a: 00 00 00 _Thread_Heir = NULL; 10d80d: c7 05 68 74 12 00 00 movl $0x0,0x127468 10d814: 00 00 00 #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) _Thread_Allocated_fp = NULL; 10d817: c7 05 60 74 12 00 00 movl $0x0,0x127460 10d81e: 00 00 00 #endif _Thread_Do_post_task_switch_extension = 0; 10d821: c7 05 7c 74 12 00 00 movl $0x0,0x12747c 10d828: 00 00 00 _Thread_Maximum_extensions = maximum_extensions; 10d82b: 89 15 78 74 12 00 mov %edx,0x127478 _Thread_Ticks_per_timeslice = ticks_per_timeslice; 10d831: a3 a4 73 12 00 mov %eax,0x1273a4 _Thread_Ready_chain = (Chain_Control *) _Workspace_Allocate_or_fatal_error( 10d836: 83 ec 0c sub $0xc,%esp 10d839: 0f b6 05 14 32 12 00 movzbl 0x123214,%eax 10d840: 8d 44 40 03 lea 0x3(%eax,%eax,2),%eax 10d844: c1 e0 02 shl $0x2,%eax 10d847: 50 push %eax 10d848: e8 c3 0d 00 00 call 10e610 <_Workspace_Allocate_or_fatal_error> <== ALWAYS TAKEN 10d84d: a3 a0 73 12 00 mov %eax,0x1273a0 (PRIORITY_MAXIMUM + 1) * sizeof(Chain_Control) ); for ( index=0; index <= PRIORITY_MAXIMUM ; index++ ) 10d852: 0f b6 1d 14 32 12 00 movzbl 0x123214,%ebx 10d859: 31 d2 xor %edx,%edx 10d85b: 83 c4 10 add $0x10,%esp 10d85e: 66 90 xchg %ax,%ax */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 10d860: 8d 48 04 lea 0x4(%eax),%ecx 10d863: 89 08 mov %ecx,(%eax) the_chain->permanent_null = NULL; 10d865: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax) the_chain->last = _Chain_Head(the_chain); 10d86c: 89 40 08 mov %eax,0x8(%eax) 10d86f: 42 inc %edx 10d870: 83 c0 0c add $0xc,%eax 10d873: 39 da cmp %ebx,%edx 10d875: 76 e9 jbe 10d860 <_Thread_Handler_initialization+0x94> /* * Initialize this class of objects. */ _Objects_Initialize_information( 10d877: 50 push %eax 10d878: 6a 08 push $0x8 10d87a: 6a 00 push $0x0 10d87c: 68 08 01 00 00 push $0x108 10d881: 6a 01 push $0x1 10d883: 6a 01 push $0x1 10d885: 6a 01 push $0x1 10d887: 68 60 75 12 00 push $0x127560 10d88c: e8 17 f4 ff ff call 10cca8 <_Objects_Initialize_information> <== ALWAYS TAKEN 10d891: 83 c4 20 add $0x20,%esp false, /* true if this is a global object class */ NULL /* Proxy extraction support callout */ #endif ); } 10d894: 8b 5d fc mov -0x4(%ebp),%ebx 10d897: c9 leave 10d898: c3 ret * BOTH stacks hooks must be set or both must be NULL. * Do not allow mixture. */ if ( !( (!Configuration.stack_allocate_hook) == (!Configuration.stack_free_hook) ) ) _Internal_error_Occurred( 10d899: 52 push %edx 10d89a: 6a 0f push $0xf 10d89c: 6a 01 push $0x1 10d89e: 6a 00 push $0x0 10d8a0: e8 53 ee ff ff call 10c6f8 <_Internal_error_Occurred> 0010d550 <_Thread_Initialize>: Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { 10d550: 55 push %ebp 10d551: 89 e5 mov %esp,%ebp 10d553: 57 push %edi 10d554: 56 push %esi 10d555: 53 push %ebx 10d556: 83 ec 1c sub $0x1c,%esp 10d559: 8b 5d 0c mov 0xc(%ebp),%ebx 10d55c: 8b 4d 10 mov 0x10(%ebp),%ecx 10d55f: 8b 7d 14 mov 0x14(%ebp),%edi 10d562: 8b 75 1c mov 0x1c(%ebp),%esi 10d565: 8a 55 18 mov 0x18(%ebp),%dl 10d568: 8a 45 20 mov 0x20(%ebp),%al 10d56b: 88 45 df mov %al,-0x21(%ebp) /* * Zero out all the allocated memory fields */ for ( i=0 ; i <= THREAD_API_LAST ; i++ ) the_thread->API_Extensions[i] = NULL; 10d56e: c7 83 f4 00 00 00 00 movl $0x0,0xf4(%ebx) 10d575: 00 00 00 10d578: c7 83 f8 00 00 00 00 movl $0x0,0xf8(%ebx) 10d57f: 00 00 00 10d582: c7 83 fc 00 00 00 00 movl $0x0,0xfc(%ebx) 10d589: 00 00 00 extensions_area = NULL; the_thread->libc_reent = NULL; 10d58c: c7 83 f0 00 00 00 00 movl $0x0,0xf0(%ebx) 10d593: 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 ) { 10d596: 85 c9 test %ecx,%ecx 10d598: 0f 84 eb 01 00 00 je 10d789 <_Thread_Initialize+0x239> stack = the_thread->Start.stack; the_thread->Start.core_allocated_stack = true; } else { stack = stack_area; actual_stack_size = stack_size; the_thread->Start.core_allocated_stack = false; 10d59e: c6 83 c0 00 00 00 00 movb $0x0,0xc0(%ebx) 10d5a5: 89 f8 mov %edi,%eax Stack_Control *the_stack, void *starting_address, size_t size ) { the_stack->area = starting_address; 10d5a7: 89 8b c8 00 00 00 mov %ecx,0xc8(%ebx) the_stack->size = size; 10d5ad: 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 ) { 10d5b3: 84 d2 test %dl,%dl 10d5b5: 0f 85 61 01 00 00 jne 10d71c <_Thread_Initialize+0x1cc> 10d5bb: 31 c0 xor %eax,%eax 10d5bd: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE ); if ( !fp_area ) goto failed; fp_area = _Context_Fp_start( fp_area, 0 ); } the_thread->fp_context = fp_area; 10d5c4: 89 83 ec 00 00 00 mov %eax,0xec(%ebx) the_thread->Start.fp_context = fp_area; 10d5ca: 89 83 cc 00 00 00 mov %eax,0xcc(%ebx) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 10d5d0: c7 43 50 00 00 00 00 movl $0x0,0x50(%ebx) the_watchdog->routine = routine; 10d5d7: c7 43 64 00 00 00 00 movl $0x0,0x64(%ebx) the_watchdog->id = id; 10d5de: c7 43 68 00 00 00 00 movl $0x0,0x68(%ebx) the_watchdog->user_data = user_data; 10d5e5: c7 43 6c 00 00 00 00 movl $0x0,0x6c(%ebx) #endif /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { 10d5ec: a1 78 74 12 00 mov 0x127478,%eax 10d5f1: 85 c0 test %eax,%eax 10d5f3: 0f 85 43 01 00 00 jne 10d73c <_Thread_Initialize+0x1ec> (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) goto failed; } the_thread->extensions = (void **) extensions_area; 10d5f9: c7 83 00 01 00 00 00 movl $0x0,0x100(%ebx) 10d600: 00 00 00 10d603: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) /* * General initialization */ the_thread->Start.is_preemptible = is_preemptible; 10d60a: 8a 45 df mov -0x21(%ebp),%al 10d60d: 88 83 ac 00 00 00 mov %al,0xac(%ebx) the_thread->Start.budget_algorithm = budget_algorithm; 10d613: 8b 45 24 mov 0x24(%ebp),%eax 10d616: 89 83 b0 00 00 00 mov %eax,0xb0(%ebx) the_thread->Start.budget_callout = budget_callout; 10d61c: 8b 45 28 mov 0x28(%ebp),%eax 10d61f: 89 83 b4 00 00 00 mov %eax,0xb4(%ebx) switch ( budget_algorithm ) { 10d625: 83 7d 24 02 cmpl $0x2,0x24(%ebp) 10d629: 75 08 jne 10d633 <_Thread_Initialize+0xe3> 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; 10d62b: a1 a4 73 12 00 mov 0x1273a4,%eax 10d630: 89 43 78 mov %eax,0x78(%ebx) case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: break; #endif } the_thread->Start.isr_level = isr_level; 10d633: 8b 45 2c mov 0x2c(%ebp),%eax 10d636: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) the_thread->current_state = STATES_DORMANT; 10d63c: c7 43 10 01 00 00 00 movl $0x1,0x10(%ebx) the_thread->Wait.queue = NULL; 10d643: c7 43 44 00 00 00 00 movl $0x0,0x44(%ebx) the_thread->resource_count = 0; 10d64a: 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; 10d651: 89 73 18 mov %esi,0x18(%ebx) the_thread->Start.initial_priority = priority; 10d654: 89 b3 bc 00 00 00 mov %esi,0xbc(%ebx) _Thread_Set_priority( the_thread, priority ); 10d65a: 83 ec 08 sub $0x8,%esp 10d65d: 56 push %esi 10d65e: 53 push %ebx 10d65f: e8 a8 06 00 00 call 10dd0c <_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 ); 10d664: c7 83 84 00 00 00 00 movl $0x0,0x84(%ebx) 10d66b: 00 00 00 10d66e: c7 83 88 00 00 00 00 movl $0x0,0x88(%ebx) 10d675: 00 00 00 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10d678: 0f b7 53 08 movzwl 0x8(%ebx),%edx 10d67c: 8b 45 08 mov 0x8(%ebp),%eax 10d67f: 8b 40 1c mov 0x1c(%eax),%eax 10d682: 89 1c 90 mov %ebx,(%eax,%edx,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 10d685: 8b 45 30 mov 0x30(%ebp),%eax 10d688: 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 ); 10d68b: 89 1c 24 mov %ebx,(%esp) 10d68e: e8 65 0c 00 00 call 10e2f8 <_User_extensions_Thread_create> <== ALWAYS TAKEN if ( extension_status ) 10d693: 83 c4 10 add $0x10,%esp 10d696: 84 c0 test %al,%al 10d698: 75 76 jne 10d710 <_Thread_Initialize+0x1c0> return true; failed: if ( the_thread->libc_reent ) 10d69a: 8b 83 f0 00 00 00 mov 0xf0(%ebx),%eax 10d6a0: 85 c0 test %eax,%eax 10d6a2: 74 0c je 10d6b0 <_Thread_Initialize+0x160> _Workspace_Free( the_thread->libc_reent ); 10d6a4: 83 ec 0c sub $0xc,%esp 10d6a7: 50 push %eax 10d6a8: e8 ab 0f 00 00 call 10e658 <_Workspace_Free> 10d6ad: 83 c4 10 add $0x10,%esp 10d6b0: 31 f6 xor %esi,%esi for ( i=0 ; i <= THREAD_API_LAST ; i++ ) if ( the_thread->API_Extensions[i] ) 10d6b2: 8b 84 b3 f4 00 00 00 mov 0xf4(%ebx,%esi,4),%eax 10d6b9: 85 c0 test %eax,%eax 10d6bb: 74 0c je 10d6c9 <_Thread_Initialize+0x179> _Workspace_Free( the_thread->API_Extensions[i] ); 10d6bd: 83 ec 0c sub $0xc,%esp 10d6c0: 50 push %eax 10d6c1: e8 92 0f 00 00 call 10e658 <_Workspace_Free> 10d6c6: 83 c4 10 add $0x10,%esp failed: if ( the_thread->libc_reent ) _Workspace_Free( the_thread->libc_reent ); for ( i=0 ; i <= THREAD_API_LAST ; i++ ) 10d6c9: 46 inc %esi 10d6ca: 83 fe 03 cmp $0x3,%esi 10d6cd: 75 e3 jne 10d6b2 <_Thread_Initialize+0x162> if ( the_thread->API_Extensions[i] ) _Workspace_Free( the_thread->API_Extensions[i] ); if ( extensions_area ) 10d6cf: 8b 55 e4 mov -0x1c(%ebp),%edx 10d6d2: 85 d2 test %edx,%edx 10d6d4: 74 0e je 10d6e4 <_Thread_Initialize+0x194> (void) _Workspace_Free( extensions_area ); 10d6d6: 83 ec 0c sub $0xc,%esp 10d6d9: ff 75 e4 pushl -0x1c(%ebp) 10d6dc: e8 77 0f 00 00 call 10e658 <_Workspace_Free> 10d6e1: 83 c4 10 add $0x10,%esp #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( fp_area ) 10d6e4: 8b 45 e0 mov -0x20(%ebp),%eax 10d6e7: 85 c0 test %eax,%eax 10d6e9: 74 0e je 10d6f9 <_Thread_Initialize+0x1a9> (void) _Workspace_Free( fp_area ); 10d6eb: 83 ec 0c sub $0xc,%esp 10d6ee: ff 75 e0 pushl -0x20(%ebp) 10d6f1: e8 62 0f 00 00 call 10e658 <_Workspace_Free> 10d6f6: 83 c4 10 add $0x10,%esp #endif _Thread_Stack_Free( the_thread ); 10d6f9: 83 ec 0c sub $0xc,%esp 10d6fc: 53 push %ebx 10d6fd: e8 2a 08 00 00 call 10df2c <_Thread_Stack_Free> 10d702: 31 c0 xor %eax,%eax return false; 10d704: 83 c4 10 add $0x10,%esp } 10d707: 8d 65 f4 lea -0xc(%ebp),%esp 10d70a: 5b pop %ebx 10d70b: 5e pop %esi 10d70c: 5f pop %edi 10d70d: c9 leave 10d70e: c3 ret 10d70f: 90 nop <== NOT EXECUTED * user extensions with dispatching enabled. The Allocator * Mutex provides sufficient protection to let the user extensions * run safely. */ extension_status = _User_extensions_Thread_create( the_thread ); if ( extension_status ) 10d710: b0 01 mov $0x1,%al _Thread_Stack_Free( the_thread ); return false; } 10d712: 8d 65 f4 lea -0xc(%ebp),%esp 10d715: 5b pop %ebx 10d716: 5e pop %esi 10d717: 5f pop %edi 10d718: c9 leave 10d719: c3 ret 10d71a: 66 90 xchg %ax,%ax <== NOT EXECUTED /* * Allocate the floating point area for this thread */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( is_fp ) { fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE ); 10d71c: 83 ec 0c sub $0xc,%esp 10d71f: 6a 6c push $0x6c 10d721: e8 16 0f 00 00 call 10e63c <_Workspace_Allocate> <== ALWAYS TAKEN 10d726: 89 45 e0 mov %eax,-0x20(%ebp) if ( !fp_area ) 10d729: 83 c4 10 add $0x10,%esp 10d72c: 85 c0 test %eax,%eax 10d72e: 0f 84 89 00 00 00 je 10d7bd <_Thread_Initialize+0x26d> 10d734: 8b 45 e0 mov -0x20(%ebp),%eax 10d737: e9 88 fe ff ff jmp 10d5c4 <_Thread_Initialize+0x74> <== ALWAYS TAKEN /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { extensions_area = _Workspace_Allocate( 10d73c: 83 ec 0c sub $0xc,%esp 10d73f: 8d 04 85 04 00 00 00 lea 0x4(,%eax,4),%eax 10d746: 50 push %eax 10d747: e8 f0 0e 00 00 call 10e63c <_Workspace_Allocate> 10d74c: 89 45 e4 mov %eax,-0x1c(%ebp) (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) 10d74f: 83 c4 10 add $0x10,%esp 10d752: 85 c0 test %eax,%eax 10d754: 0f 84 40 ff ff ff je 10d69a <_Thread_Initialize+0x14a> goto failed; } the_thread->extensions = (void **) extensions_area; 10d75a: 89 c1 mov %eax,%ecx 10d75c: 89 83 00 01 00 00 mov %eax,0x100(%ebx) * 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++ ) 10d762: 8b 3d 78 74 12 00 mov 0x127478,%edi 10d768: 31 d2 xor %edx,%edx 10d76a: 31 c0 xor %eax,%eax 10d76c: eb 08 jmp 10d776 <_Thread_Initialize+0x226> <== ALWAYS TAKEN 10d76e: 66 90 xchg %ax,%ax <== NOT EXECUTED 10d770: 8b 8b 00 01 00 00 mov 0x100(%ebx),%ecx the_thread->extensions[i] = NULL; 10d776: c7 04 91 00 00 00 00 movl $0x0,(%ecx,%edx,4) * create the extension long after tasks have been created * so they cannot rely on the thread create user extension * call. */ if ( the_thread->extensions ) { for ( i = 0; i <= _Thread_Maximum_extensions ; i++ ) 10d77d: 40 inc %eax 10d77e: 89 c2 mov %eax,%edx 10d780: 39 f8 cmp %edi,%eax 10d782: 76 ec jbe 10d770 <_Thread_Initialize+0x220> 10d784: e9 81 fe ff ff jmp 10d60a <_Thread_Initialize+0xba> <== ALWAYS TAKEN return false; /* stack allocation failed */ stack = the_thread->Start.stack; #else if ( !stack_area ) { actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size ); 10d789: 83 ec 08 sub $0x8,%esp 10d78c: 57 push %edi 10d78d: 53 push %ebx 10d78e: 88 55 d8 mov %dl,-0x28(%ebp) 10d791: e8 32 07 00 00 call 10dec8 <_Thread_Stack_Allocate> <== ALWAYS TAKEN if ( !actual_stack_size || actual_stack_size < stack_size ) 10d796: 83 c4 10 add $0x10,%esp 10d799: 85 c0 test %eax,%eax 10d79b: 8a 55 d8 mov -0x28(%ebp),%dl 10d79e: 74 16 je 10d7b6 <_Thread_Initialize+0x266> 10d7a0: 39 c7 cmp %eax,%edi 10d7a2: 77 12 ja 10d7b6 <_Thread_Initialize+0x266> <== ALWAYS TAKEN return false; /* stack allocation failed */ stack = the_thread->Start.stack; 10d7a4: 8b 8b d0 00 00 00 mov 0xd0(%ebx),%ecx the_thread->Start.core_allocated_stack = true; 10d7aa: c6 83 c0 00 00 00 01 movb $0x1,0xc0(%ebx) 10d7b1: e9 f1 fd ff ff jmp 10d5a7 <_Thread_Initialize+0x57> <== ALWAYS TAKEN if ( fp_area ) (void) _Workspace_Free( fp_area ); #endif _Thread_Stack_Free( the_thread ); return false; 10d7b6: 31 c0 xor %eax,%eax 10d7b8: e9 4a ff ff ff jmp 10d707 <_Thread_Initialize+0x1b7> <== ALWAYS TAKEN * Allocate the floating point area for this thread */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( is_fp ) { fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE ); if ( !fp_area ) 10d7bd: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) 10d7c4: e9 d1 fe ff ff jmp 10d69a <_Thread_Initialize+0x14a> <== ALWAYS TAKEN 00111ee8 <_Thread_Reset>: void _Thread_Reset( Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { 111ee8: 55 push %ebp 111ee9: 89 e5 mov %esp,%ebp 111eeb: 53 push %ebx 111eec: 83 ec 10 sub $0x10,%esp 111eef: 8b 5d 08 mov 0x8(%ebp),%ebx the_thread->resource_count = 0; 111ef2: c7 43 1c 00 00 00 00 movl $0x0,0x1c(%ebx) #if defined(RTEMS_ITRON_API) the_thread->suspend_count = 0; #endif the_thread->is_preemptible = the_thread->Start.is_preemptible; 111ef9: 8a 83 ac 00 00 00 mov 0xac(%ebx),%al 111eff: 88 43 75 mov %al,0x75(%ebx) the_thread->budget_algorithm = the_thread->Start.budget_algorithm; 111f02: 8b 83 b0 00 00 00 mov 0xb0(%ebx),%eax 111f08: 89 43 7c mov %eax,0x7c(%ebx) the_thread->budget_callout = the_thread->Start.budget_callout; 111f0b: 8b 83 b4 00 00 00 mov 0xb4(%ebx),%eax 111f11: 89 83 80 00 00 00 mov %eax,0x80(%ebx) the_thread->Start.pointer_argument = pointer_argument; 111f17: 8b 45 0c mov 0xc(%ebp),%eax 111f1a: 89 83 a4 00 00 00 mov %eax,0xa4(%ebx) the_thread->Start.numeric_argument = numeric_argument; 111f20: 8b 45 10 mov 0x10(%ebp),%eax 111f23: 89 83 a8 00 00 00 mov %eax,0xa8(%ebx) if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) { 111f29: 53 push %ebx 111f2a: e8 75 c7 ff ff call 10e6a4 <_Thread_queue_Extract_with_proxy> 111f2f: 83 c4 10 add $0x10,%esp 111f32: 84 c0 test %al,%al 111f34: 75 06 jne 111f3c <_Thread_Reset+0x54> if ( _Watchdog_Is_active( &the_thread->Timer ) ) 111f36: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 111f3a: 74 28 je 111f64 <_Thread_Reset+0x7c> (void) _Watchdog_Remove( &the_thread->Timer ); } if ( the_thread->current_priority != the_thread->Start.initial_priority ) { 111f3c: 8b 83 bc 00 00 00 mov 0xbc(%ebx),%eax 111f42: 39 43 14 cmp %eax,0x14(%ebx) 111f45: 74 15 je 111f5c <_Thread_Reset+0x74> the_thread->real_priority = the_thread->Start.initial_priority; 111f47: 89 43 18 mov %eax,0x18(%ebx) _Thread_Set_priority( the_thread, the_thread->Start.initial_priority ); 111f4a: 89 45 0c mov %eax,0xc(%ebp) 111f4d: 89 5d 08 mov %ebx,0x8(%ebp) } } 111f50: 8b 5d fc mov -0x4(%ebp),%ebx 111f53: c9 leave (void) _Watchdog_Remove( &the_thread->Timer ); } if ( the_thread->current_priority != the_thread->Start.initial_priority ) { the_thread->real_priority = the_thread->Start.initial_priority; _Thread_Set_priority( the_thread, the_thread->Start.initial_priority ); 111f54: e9 17 c9 ff ff jmp 10e870 <_Thread_Set_priority> 111f59: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED } } 111f5c: 8b 5d fc mov -0x4(%ebp),%ebx 111f5f: c9 leave 111f60: c3 ret 111f61: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED the_thread->Start.numeric_argument = numeric_argument; if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) { if ( _Watchdog_Is_active( &the_thread->Timer ) ) (void) _Watchdog_Remove( &the_thread->Timer ); 111f64: 83 ec 0c sub $0xc,%esp 111f67: 8d 43 48 lea 0x48(%ebx),%eax 111f6a: 50 push %eax 111f6b: e8 6c d1 ff ff call 10f0dc <_Watchdog_Remove> 111f70: 83 c4 10 add $0x10,%esp 111f73: eb c7 jmp 111f3c <_Thread_Reset+0x54> <== ALWAYS TAKEN 001112b0 <_Thread_Reset_timeslice>: * ready chain * select heir */ void _Thread_Reset_timeslice( void ) { 1112b0: 55 push %ebp 1112b1: 89 e5 mov %esp,%ebp 1112b3: 56 push %esi 1112b4: 53 push %ebx ISR_Level level; Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; 1112b5: a1 98 74 12 00 mov 0x127498,%eax ready = executing->ready; 1112ba: 8b 90 8c 00 00 00 mov 0x8c(%eax),%edx _ISR_Disable( level ); 1112c0: 9c pushf 1112c1: fa cli 1112c2: 59 pop %ecx if ( _Chain_Has_only_one_node( ready ) ) { 1112c3: 8b 1a mov (%edx),%ebx 1112c5: 3b 5a 08 cmp 0x8(%edx),%ebx 1112c8: 74 3e je 111308 <_Thread_Reset_timeslice+0x58> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 1112ca: 8b 30 mov (%eax),%esi previous = the_node->previous; 1112cc: 8b 58 04 mov 0x4(%eax),%ebx next->previous = previous; 1112cf: 89 5e 04 mov %ebx,0x4(%esi) previous->next = next; 1112d2: 89 33 mov %esi,(%ebx) Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 1112d4: 8d 5a 04 lea 0x4(%edx),%ebx 1112d7: 89 18 mov %ebx,(%eax) old_last_node = the_chain->last; 1112d9: 8b 5a 08 mov 0x8(%edx),%ebx the_chain->last = the_node; 1112dc: 89 42 08 mov %eax,0x8(%edx) old_last_node->next = the_node; 1112df: 89 03 mov %eax,(%ebx) the_node->previous = old_last_node; 1112e1: 89 58 04 mov %ebx,0x4(%eax) return; } _Chain_Extract_unprotected( &executing->Object.Node ); _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); 1112e4: 51 push %ecx 1112e5: 9d popf 1112e6: fa cli if ( _Thread_Is_heir( executing ) ) 1112e7: 3b 05 68 74 12 00 cmp 0x127468,%eax 1112ed: 74 0d je 1112fc <_Thread_Reset_timeslice+0x4c> _Thread_Heir = (Thread_Control *) ready->first; _Context_Switch_necessary = true; 1112ef: c6 05 a8 74 12 00 01 movb $0x1,0x1274a8 _ISR_Enable( level ); 1112f6: 51 push %ecx 1112f7: 9d popf } 1112f8: 5b pop %ebx 1112f9: 5e pop %esi 1112fa: c9 leave 1112fb: c3 ret _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); if ( _Thread_Is_heir( executing ) ) _Thread_Heir = (Thread_Control *) ready->first; 1112fc: 8b 02 mov (%edx),%eax 1112fe: a3 68 74 12 00 mov %eax,0x127468 111303: eb ea jmp 1112ef <_Thread_Reset_timeslice+0x3f> <== ALWAYS TAKEN 111305: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED executing = _Thread_Executing; ready = executing->ready; _ISR_Disable( level ); if ( _Chain_Has_only_one_node( ready ) ) { _ISR_Enable( level ); 111308: 51 push %ecx 111309: 9d popf _Thread_Heir = (Thread_Control *) ready->first; _Context_Switch_necessary = true; _ISR_Enable( level ); } 11130a: 5b pop %ebx 11130b: 5e pop %esi 11130c: c9 leave 11130d: c3 ret 0010e7e4 <_Thread_Restart>: bool _Thread_Restart( Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { 10e7e4: 55 push %ebp 10e7e5: 89 e5 mov %esp,%ebp 10e7e7: 53 push %ebx 10e7e8: 83 ec 04 sub $0x4,%esp 10e7eb: 8b 5d 08 mov 0x8(%ebp),%ebx if ( !_States_Is_dormant( the_thread->current_state ) ) { 10e7ee: f6 43 10 01 testb $0x1,0x10(%ebx) 10e7f2: 74 08 je 10e7fc <_Thread_Restart+0x18> 10e7f4: 31 c0 xor %eax,%eax return true; } return false; } 10e7f6: 8b 5d fc mov -0x4(%ebp),%ebx 10e7f9: c9 leave 10e7fa: c3 ret 10e7fb: 90 nop <== NOT EXECUTED Thread_Entry_numeric_type numeric_argument ) { if ( !_States_Is_dormant( the_thread->current_state ) ) { _Thread_Set_transient( the_thread ); 10e7fc: 83 ec 0c sub $0xc,%esp 10e7ff: 53 push %ebx 10e800: e8 b3 01 00 00 call 10e9b8 <_Thread_Set_transient> <== ALWAYS TAKEN _Thread_Reset( the_thread, pointer_argument, numeric_argument ); 10e805: 83 c4 0c add $0xc,%esp 10e808: ff 75 10 pushl 0x10(%ebp) 10e80b: ff 75 0c pushl 0xc(%ebp) 10e80e: 53 push %ebx 10e80f: e8 d4 36 00 00 call 111ee8 <_Thread_Reset> _Thread_Load_environment( the_thread ); 10e814: 89 1c 24 mov %ebx,(%esp) 10e817: e8 a8 33 00 00 call 111bc4 <_Thread_Load_environment> _Thread_Ready( the_thread ); 10e81c: 89 1c 24 mov %ebx,(%esp) 10e81f: e8 20 36 00 00 call 111e44 <_Thread_Ready> _User_extensions_Thread_restart( the_thread ); 10e824: 89 1c 24 mov %ebx,(%esp) 10e827: e8 b8 06 00 00 call 10eee4 <_User_extensions_Thread_restart> <== ALWAYS TAKEN if ( _Thread_Is_executing ( the_thread ) ) 10e82c: 83 c4 10 add $0x10,%esp 10e82f: 3b 1d 58 94 12 00 cmp 0x129458,%ebx 10e835: 74 07 je 10e83e <_Thread_Restart+0x5a> #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 ); 10e837: b0 01 mov $0x1,%al return true; } return false; } 10e839: 8b 5d fc mov -0x4(%ebp),%ebx 10e83c: c9 leave 10e83d: c3 ret */ RTEMS_INLINE_ROUTINE void _Thread_Restart_self( void ) { #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( _Thread_Executing->fp_context != NULL ) 10e83e: 83 bb ec 00 00 00 00 cmpl $0x0,0xec(%ebx) 10e845: 74 18 je 10e85f <_Thread_Restart+0x7b> _Context_Restore_fp( &_Thread_Executing->fp_context ); 10e847: 83 ec 0c sub $0xc,%esp 10e84a: 81 c3 ec 00 00 00 add $0xec,%ebx 10e850: 53 push %ebx 10e851: e8 58 0a 00 00 call 10f2ae <_CPU_Context_restore_fp> 10e856: 8b 1d 58 94 12 00 mov 0x129458,%ebx 10e85c: 83 c4 10 add $0x10,%esp #endif _CPU_Context_Restart_self( &_Thread_Executing->Registers ); 10e85f: 83 ec 0c sub $0xc,%esp 10e862: 81 c3 d4 00 00 00 add $0xd4,%ebx 10e868: 53 push %ebx 10e869: e8 2f 0a 00 00 call 10f29d <_CPU_Context_restore> 00111640 <_Thread_Resume>: void _Thread_Resume( Thread_Control *the_thread, bool force ) { 111640: 55 push %ebp 111641: 89 e5 mov %esp,%ebp 111643: 53 push %ebx 111644: 8b 45 08 mov 0x8(%ebp),%eax ISR_Level level; States_Control current_state; _ISR_Disable( level ); 111647: 9c pushf 111648: fa cli 111649: 59 pop %ecx _ISR_Enable( level ); return; } #endif current_state = the_thread->current_state; 11164a: 8b 50 10 mov 0x10(%eax),%edx if ( current_state & STATES_SUSPENDED ) { 11164d: f6 c2 02 test $0x2,%dl 111650: 74 6e je 1116c0 <_Thread_Resume+0x80> <== ALWAYS TAKEN 111652: 83 e2 fd and $0xfffffffd,%edx current_state = 111655: 89 50 10 mov %edx,0x10(%eax) the_thread->current_state = _States_Clear(STATES_SUSPENDED, current_state); if ( _States_Is_ready( current_state ) ) { 111658: 85 d2 test %edx,%edx 11165a: 75 64 jne 1116c0 <_Thread_Resume+0x80> RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; 11165c: 8b 90 90 00 00 00 mov 0x90(%eax),%edx 111662: 66 8b 98 96 00 00 00 mov 0x96(%eax),%bx 111669: 66 09 1a or %bx,(%edx) _Priority_Major_bit_map |= the_priority_map->ready_major; 11166c: 66 8b 15 cc c9 12 00 mov 0x12c9cc,%dx 111673: 0b 90 94 00 00 00 or 0x94(%eax),%edx 111679: 66 89 15 cc c9 12 00 mov %dx,0x12c9cc _Priority_Add_to_bit_map( &the_thread->Priority_map ); _Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node); 111680: 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); 111686: 8d 5a 04 lea 0x4(%edx),%ebx 111689: 89 18 mov %ebx,(%eax) old_last_node = the_chain->last; 11168b: 8b 5a 08 mov 0x8(%edx),%ebx the_chain->last = the_node; 11168e: 89 42 08 mov %eax,0x8(%edx) old_last_node->next = the_node; 111691: 89 03 mov %eax,(%ebx) the_node->previous = old_last_node; 111693: 89 58 04 mov %ebx,0x4(%eax) _ISR_Flash( level ); 111696: 51 push %ecx 111697: 9d popf 111698: fa cli if ( the_thread->current_priority < _Thread_Heir->current_priority ) { 111699: 8b 50 14 mov 0x14(%eax),%edx 11169c: 8b 1d a8 c9 12 00 mov 0x12c9a8,%ebx 1116a2: 3b 53 14 cmp 0x14(%ebx),%edx 1116a5: 73 19 jae 1116c0 <_Thread_Resume+0x80> _Thread_Heir = the_thread; 1116a7: a3 a8 c9 12 00 mov %eax,0x12c9a8 if ( _Thread_Executing->is_preemptible || 1116ac: a1 d8 c9 12 00 mov 0x12c9d8,%eax 1116b1: 80 78 75 00 cmpb $0x0,0x75(%eax) 1116b5: 74 11 je 1116c8 <_Thread_Resume+0x88> the_thread->current_priority == 0 ) _Context_Switch_necessary = true; 1116b7: c6 05 e8 c9 12 00 01 movb $0x1,0x12c9e8 1116be: 66 90 xchg %ax,%ax } } } _ISR_Enable( level ); 1116c0: 51 push %ecx 1116c1: 9d popf } 1116c2: 5b pop %ebx 1116c3: c9 leave 1116c4: c3 ret 1116c5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED _ISR_Flash( level ); if ( the_thread->current_priority < _Thread_Heir->current_priority ) { _Thread_Heir = the_thread; if ( _Thread_Executing->is_preemptible || 1116c8: 85 d2 test %edx,%edx 1116ca: 74 eb je 1116b7 <_Thread_Resume+0x77> <== ALWAYS TAKEN 1116cc: eb f2 jmp 1116c0 <_Thread_Resume+0x80> <== ALWAYS TAKEN 0010dd78 <_Thread_Set_state>: void _Thread_Set_state( Thread_Control *the_thread, States_Control state ) { 10dd78: 55 push %ebp 10dd79: 89 e5 mov %esp,%ebp 10dd7b: 56 push %esi 10dd7c: 53 push %ebx 10dd7d: 8b 45 08 mov 0x8(%ebp),%eax 10dd80: 8b 75 0c mov 0xc(%ebp),%esi ISR_Level level; Chain_Control *ready; ready = the_thread->ready; 10dd83: 8b 90 8c 00 00 00 mov 0x8c(%eax),%edx _ISR_Disable( level ); 10dd89: 9c pushf 10dd8a: fa cli 10dd8b: 59 pop %ecx if ( !_States_Is_ready( the_thread->current_state ) ) { 10dd8c: 8b 58 10 mov 0x10(%eax),%ebx 10dd8f: 85 db test %ebx,%ebx 10dd91: 75 2d jne 10ddc0 <_Thread_Set_state+0x48> _States_Set( state, the_thread->current_state ); _ISR_Enable( level ); return; } the_thread->current_state = state; 10dd93: 89 70 10 mov %esi,0x10(%eax) if ( _Chain_Has_only_one_node( ready ) ) { 10dd96: 8b 1a mov (%edx),%ebx 10dd98: 3b 5a 08 cmp 0x8(%edx),%ebx 10dd9b: 74 3b je 10ddd8 <_Thread_Set_state+0x60> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 10dd9d: 8b 18 mov (%eax),%ebx previous = the_node->previous; 10dd9f: 8b 50 04 mov 0x4(%eax),%edx next->previous = previous; 10dda2: 89 53 04 mov %edx,0x4(%ebx) previous->next = next; 10dda5: 89 1a mov %ebx,(%edx) _Priority_Remove_from_bit_map( &the_thread->Priority_map ); } else _Chain_Extract_unprotected( &the_thread->Object.Node ); _ISR_Flash( level ); 10dda7: 51 push %ecx 10dda8: 9d popf 10dda9: fa cli if ( _Thread_Is_heir( the_thread ) ) 10ddaa: 3b 05 68 74 12 00 cmp 0x127468,%eax 10ddb0: 74 62 je 10de14 <_Thread_Set_state+0x9c> _Thread_Calculate_heir(); if ( _Thread_Is_executing( the_thread ) ) 10ddb2: 3b 05 98 74 12 00 cmp 0x127498,%eax 10ddb8: 74 12 je 10ddcc <_Thread_Set_state+0x54> _Context_Switch_necessary = true; _ISR_Enable( level ); 10ddba: 51 push %ecx 10ddbb: 9d popf } 10ddbc: 5b pop %ebx 10ddbd: 5e pop %esi 10ddbe: c9 leave 10ddbf: c3 ret Chain_Control *ready; ready = the_thread->ready; _ISR_Disable( level ); if ( !_States_Is_ready( the_thread->current_state ) ) { the_thread->current_state = 10ddc0: 09 f3 or %esi,%ebx 10ddc2: 89 58 10 mov %ebx,0x10(%eax) _States_Set( state, the_thread->current_state ); _ISR_Enable( level ); 10ddc5: 51 push %ecx 10ddc6: 9d popf if ( _Thread_Is_executing( the_thread ) ) _Context_Switch_necessary = true; _ISR_Enable( level ); } 10ddc7: 5b pop %ebx 10ddc8: 5e pop %esi 10ddc9: c9 leave 10ddca: c3 ret 10ddcb: 90 nop <== NOT EXECUTED if ( _Thread_Is_heir( the_thread ) ) _Thread_Calculate_heir(); if ( _Thread_Is_executing( the_thread ) ) _Context_Switch_necessary = true; 10ddcc: c6 05 a8 74 12 00 01 movb $0x1,0x1274a8 10ddd3: eb e5 jmp 10ddba <_Thread_Set_state+0x42> <== ALWAYS TAKEN 10ddd5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 10ddd8: 8d 5a 04 lea 0x4(%edx),%ebx 10dddb: 89 1a mov %ebx,(%edx) the_chain->permanent_null = NULL; 10dddd: c7 42 04 00 00 00 00 movl $0x0,0x4(%edx) the_chain->last = _Chain_Head(the_chain); 10dde4: 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; 10dde7: 8b 90 90 00 00 00 mov 0x90(%eax),%edx 10dded: 66 8b 98 9a 00 00 00 mov 0x9a(%eax),%bx 10ddf4: 66 21 1a and %bx,(%edx) the_thread->current_state = state; if ( _Chain_Has_only_one_node( ready ) ) { _Chain_Initialize_empty( ready ); _Priority_Remove_from_bit_map( &the_thread->Priority_map ); 10ddf7: 66 83 3a 00 cmpw $0x0,(%edx) 10ddfb: 75 aa jne 10dda7 <_Thread_Set_state+0x2f> if ( *the_priority_map->minor == 0 ) _Priority_Major_bit_map &= the_priority_map->block_major; 10ddfd: 66 8b 15 8c 74 12 00 mov 0x12748c,%dx 10de04: 23 90 98 00 00 00 and 0x98(%eax),%edx 10de0a: 66 89 15 8c 74 12 00 mov %dx,0x12748c 10de11: eb 94 jmp 10dda7 <_Thread_Set_state+0x2f> <== ALWAYS TAKEN 10de13: 90 nop <== NOT EXECUTED RTEMS_INLINE_ROUTINE Priority_Control _Priority_Get_highest( void ) { Priority_Bit_map_control minor; Priority_Bit_map_control major; _Bitfield_Find_first_bit( _Priority_Major_bit_map, major ); 10de14: 66 8b 35 8c 74 12 00 mov 0x12748c,%si 10de1b: 31 d2 xor %edx,%edx 10de1d: 89 d3 mov %edx,%ebx 10de1f: 66 0f bc de bsf %si,%bx _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); 10de23: 0f b7 db movzwl %bx,%ebx 10de26: 66 8b b4 1b 20 75 12 mov 0x127520(%ebx,%ebx,1),%si 10de2d: 00 10de2e: 66 0f bc d6 bsf %si,%dx * ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) 10de32: c1 e3 04 shl $0x4,%ebx 10de35: 0f b7 d2 movzwl %dx,%edx 10de38: 8d 14 13 lea (%ebx,%edx,1),%edx 10de3b: 8d 1c 52 lea (%edx,%edx,2),%ebx 10de3e: 8b 15 a0 73 12 00 mov 0x1273a0,%edx 10de44: 8b 14 9a mov (%edx,%ebx,4),%edx 10de47: 89 15 68 74 12 00 mov %edx,0x127468 10de4d: e9 60 ff ff ff jmp 10ddb2 <_Thread_Set_state+0x3a> <== ALWAYS TAKEN 0010de54 <_Thread_Set_transient>: */ void _Thread_Set_transient( Thread_Control *the_thread ) { 10de54: 55 push %ebp 10de55: 89 e5 mov %esp,%ebp 10de57: 56 push %esi 10de58: 53 push %ebx 10de59: 8b 45 08 mov 0x8(%ebp),%eax ISR_Level level; uint32_t old_state; Chain_Control *ready; ready = the_thread->ready; 10de5c: 8b 88 8c 00 00 00 mov 0x8c(%eax),%ecx _ISR_Disable( level ); 10de62: 9c pushf 10de63: fa cli 10de64: 5b pop %ebx old_state = the_thread->current_state; 10de65: 8b 50 10 mov 0x10(%eax),%edx the_thread->current_state = _States_Set( STATES_TRANSIENT, old_state ); 10de68: 89 d6 mov %edx,%esi 10de6a: 83 ce 04 or $0x4,%esi 10de6d: 89 70 10 mov %esi,0x10(%eax) if ( _States_Is_ready( old_state ) ) { 10de70: 85 d2 test %edx,%edx 10de72: 75 11 jne 10de85 <_Thread_Set_transient+0x31> if ( _Chain_Has_only_one_node( ready ) ) { 10de74: 8b 11 mov (%ecx),%edx 10de76: 3b 51 08 cmp 0x8(%ecx),%edx 10de79: 74 11 je 10de8c <_Thread_Set_transient+0x38> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 10de7b: 8b 10 mov (%eax),%edx previous = the_node->previous; 10de7d: 8b 40 04 mov 0x4(%eax),%eax next->previous = previous; 10de80: 89 42 04 mov %eax,0x4(%edx) previous->next = next; 10de83: 89 10 mov %edx,(%eax) } else _Chain_Extract_unprotected( &the_thread->Object.Node ); } _ISR_Enable( level ); 10de85: 53 push %ebx 10de86: 9d popf } 10de87: 5b pop %ebx 10de88: 5e pop %esi 10de89: c9 leave 10de8a: c3 ret 10de8b: 90 nop <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 10de8c: 8d 51 04 lea 0x4(%ecx),%edx 10de8f: 89 11 mov %edx,(%ecx) the_chain->permanent_null = NULL; 10de91: c7 41 04 00 00 00 00 movl $0x0,0x4(%ecx) the_chain->last = _Chain_Head(the_chain); 10de98: 89 49 08 mov %ecx,0x8(%ecx) RTEMS_INLINE_ROUTINE void _Priority_Remove_from_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor &= the_priority_map->block_minor; 10de9b: 8b 90 90 00 00 00 mov 0x90(%eax),%edx 10dea1: 66 8b 88 9a 00 00 00 mov 0x9a(%eax),%cx 10dea8: 66 21 0a and %cx,(%edx) if ( _States_Is_ready( old_state ) ) { if ( _Chain_Has_only_one_node( ready ) ) { _Chain_Initialize_empty( ready ); _Priority_Remove_from_bit_map( &the_thread->Priority_map ); 10deab: 66 83 3a 00 cmpw $0x0,(%edx) 10deaf: 75 d4 jne 10de85 <_Thread_Set_transient+0x31> if ( *the_priority_map->minor == 0 ) _Priority_Major_bit_map &= the_priority_map->block_major; 10deb1: 66 8b 15 8c 74 12 00 mov 0x12748c,%dx 10deb8: 23 90 98 00 00 00 and 0x98(%eax),%edx 10debe: 66 89 15 8c 74 12 00 mov %dx,0x12748c 10dec5: eb be jmp 10de85 <_Thread_Set_transient+0x31> <== ALWAYS TAKEN 0010dec8 <_Thread_Stack_Allocate>: size_t _Thread_Stack_Allocate( Thread_Control *the_thread, size_t stack_size ) { 10dec8: 55 push %ebp 10dec9: 89 e5 mov %esp,%ebp 10decb: 53 push %ebx 10decc: 83 ec 04 sub $0x4,%esp 10decf: a1 10 32 12 00 mov 0x123210,%eax 10ded4: 8b 5d 0c mov 0xc(%ebp),%ebx 10ded7: 39 c3 cmp %eax,%ebx 10ded9: 73 02 jae 10dedd <_Thread_Stack_Allocate+0x15> 10dedb: 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 ) { 10dedd: a1 40 32 12 00 mov 0x123240,%eax 10dee2: 85 c0 test %eax,%eax 10dee4: 74 32 je 10df18 <_Thread_Stack_Allocate+0x50> stack_addr = (*Configuration.stack_allocate_hook)( the_stack_size ); 10dee6: 83 ec 0c sub $0xc,%esp 10dee9: 53 push %ebx 10deea: ff d0 call *%eax 10deec: 83 c4 10 add $0x10,%esp the_stack_size = _Stack_Adjust_size( the_stack_size ); stack_addr = _Workspace_Allocate( the_stack_size ); } if ( !stack_addr ) 10deef: 85 c0 test %eax,%eax 10def1: 74 11 je 10df04 <_Thread_Stack_Allocate+0x3c> the_stack_size = 0; the_thread->Start.stack = stack_addr; 10def3: 8b 55 08 mov 0x8(%ebp),%edx 10def6: 89 82 d0 00 00 00 mov %eax,0xd0(%edx) return the_stack_size; } 10defc: 89 d8 mov %ebx,%eax 10defe: 8b 5d fc mov -0x4(%ebp),%ebx 10df01: c9 leave 10df02: c3 ret 10df03: 90 nop <== NOT EXECUTED the_stack_size = _Stack_Adjust_size( the_stack_size ); stack_addr = _Workspace_Allocate( the_stack_size ); } if ( !stack_addr ) 10df04: 31 db xor %ebx,%ebx the_stack_size = 0; the_thread->Start.stack = stack_addr; 10df06: 8b 55 08 mov 0x8(%ebp),%edx 10df09: 89 82 d0 00 00 00 mov %eax,0xd0(%edx) return the_stack_size; } 10df0f: 89 d8 mov %ebx,%eax 10df11: 8b 5d fc mov -0x4(%ebp),%ebx 10df14: c9 leave 10df15: c3 ret 10df16: 66 90 xchg %ax,%ax <== NOT EXECUTED RTEMS_INLINE_ROUTINE uint32_t _Stack_Adjust_size ( size_t size ) { return size + CPU_STACK_ALIGNMENT; 10df18: 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 ); 10df1b: 83 ec 0c sub $0xc,%esp 10df1e: 53 push %ebx 10df1f: e8 18 07 00 00 call 10e63c <_Workspace_Allocate> <== ALWAYS TAKEN 10df24: 83 c4 10 add $0x10,%esp 10df27: eb c6 jmp 10deef <_Thread_Stack_Allocate+0x27> <== ALWAYS TAKEN 0010df2c <_Thread_Stack_Free>: */ void _Thread_Stack_Free( Thread_Control *the_thread ) { 10df2c: 55 push %ebp 10df2d: 89 e5 mov %esp,%ebp 10df2f: 83 ec 08 sub $0x8,%esp 10df32: 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 ) 10df35: 80 b8 c0 00 00 00 00 cmpb $0x0,0xc0(%eax) 10df3c: 74 16 je 10df54 <_Thread_Stack_Free+0x28> * 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 ) 10df3e: 8b 15 44 32 12 00 mov 0x123244,%edx 10df44: 85 d2 test %edx,%edx 10df46: 74 10 je 10df58 <_Thread_Stack_Free+0x2c> (*Configuration.stack_free_hook)( the_thread->Start.Initial_stack.area ); 10df48: 8b 80 c8 00 00 00 mov 0xc8(%eax),%eax 10df4e: 89 45 08 mov %eax,0x8(%ebp) else _Workspace_Free( the_thread->Start.Initial_stack.area ); } 10df51: 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 ); 10df52: ff e2 jmp *%edx else _Workspace_Free( the_thread->Start.Initial_stack.area ); } 10df54: c9 leave 10df55: c3 ret 10df56: 66 90 xchg %ax,%ax <== NOT EXECUTED */ if ( Configuration.stack_free_hook ) (*Configuration.stack_free_hook)( the_thread->Start.Initial_stack.area ); else _Workspace_Free( the_thread->Start.Initial_stack.area ); 10df58: 8b 80 c8 00 00 00 mov 0xc8(%eax),%eax 10df5e: 89 45 08 mov %eax,0x8(%ebp) } 10df61: 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 ); 10df62: e9 f1 06 00 00 jmp 10e658 <_Workspace_Free> <== ALWAYS TAKEN 0010dfc4 <_Thread_Start>: Thread_Start_types the_prototype, void *entry_point, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { 10dfc4: 55 push %ebp 10dfc5: 89 e5 mov %esp,%ebp 10dfc7: 53 push %ebx 10dfc8: 83 ec 04 sub $0x4,%esp 10dfcb: 8b 5d 08 mov 0x8(%ebp),%ebx if ( _States_Is_dormant( the_thread->current_state ) ) { 10dfce: f6 43 10 01 testb $0x1,0x10(%ebx) 10dfd2: 75 08 jne 10dfdc <_Thread_Start+0x18> 10dfd4: 31 c0 xor %eax,%eax return true; } return false; } 10dfd6: 8b 5d fc mov -0x4(%ebp),%ebx 10dfd9: c9 leave 10dfda: c3 ret 10dfdb: 90 nop <== NOT EXECUTED Thread_Entry_numeric_type numeric_argument ) { if ( _States_Is_dormant( the_thread->current_state ) ) { the_thread->Start.entry_point = (Thread_Entry) entry_point; 10dfdc: 8b 45 10 mov 0x10(%ebp),%eax 10dfdf: 89 83 9c 00 00 00 mov %eax,0x9c(%ebx) the_thread->Start.prototype = the_prototype; 10dfe5: 8b 45 0c mov 0xc(%ebp),%eax 10dfe8: 89 83 a0 00 00 00 mov %eax,0xa0(%ebx) the_thread->Start.pointer_argument = pointer_argument; 10dfee: 8b 45 14 mov 0x14(%ebp),%eax 10dff1: 89 83 a4 00 00 00 mov %eax,0xa4(%ebx) the_thread->Start.numeric_argument = numeric_argument; 10dff7: 8b 45 18 mov 0x18(%ebp),%eax 10dffa: 89 83 a8 00 00 00 mov %eax,0xa8(%ebx) _Thread_Load_environment( the_thread ); 10e000: 83 ec 0c sub $0xc,%esp 10e003: 53 push %ebx 10e004: e8 83 2f 00 00 call 110f8c <_Thread_Load_environment> _Thread_Ready( the_thread ); 10e009: 89 1c 24 mov %ebx,(%esp) 10e00c: e8 fb 31 00 00 call 11120c <_Thread_Ready> _User_extensions_Thread_start( the_thread ); 10e011: 89 1c 24 mov %ebx,(%esp) 10e014: e8 67 03 00 00 call 10e380 <_User_extensions_Thread_start> <== ALWAYS TAKEN 10e019: b0 01 mov $0x1,%al return true; 10e01b: 83 c4 10 add $0x10,%esp } return false; } 10e01e: 8b 5d fc mov -0x4(%ebp),%ebx 10e021: c9 leave 10e022: c3 ret 0010df68 <_Thread_Start_multitasking>: * ready chain * select heir */ void _Thread_Start_multitasking( void ) { 10df68: 55 push %ebp 10df69: 89 e5 mov %esp,%ebp 10df6b: 83 ec 08 sub $0x8,%esp 10df6e: c7 05 a0 75 12 00 03 movl $0x3,0x1275a0 10df75: 00 00 00 * the system is shut down. */ _System_state_Set( SYSTEM_STATE_UP ); _Context_Switch_necessary = false; 10df78: c6 05 a8 74 12 00 00 movb $0x0,0x1274a8 _Thread_Executing = _Thread_Heir; 10df7f: a1 68 74 12 00 mov 0x127468,%eax 10df84: a3 98 74 12 00 mov %eax,0x127498 #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 ) 10df89: 8b 90 ec 00 00 00 mov 0xec(%eax),%edx 10df8f: 85 d2 test %edx,%edx 10df91: 74 16 je 10dfa9 <_Thread_Start_multitasking+0x41> _Context_Restore_fp( &_Thread_Heir->fp_context ); 10df93: 83 ec 0c sub $0xc,%esp 10df96: 05 ec 00 00 00 add $0xec,%eax 10df9b: 50 push %eax 10df9c: e8 5d 07 00 00 call 10e6fe <_CPU_Context_restore_fp> <== ALWAYS TAKEN 10dfa1: a1 68 74 12 00 mov 0x127468,%eax 10dfa6: 83 c4 10 add $0x10,%esp #endif _Context_Switch( &_Thread_BSP_context, &_Thread_Heir->Registers ); 10dfa9: 83 ec 08 sub $0x8,%esp 10dfac: 05 d4 00 00 00 add $0xd4,%eax 10dfb1: 50 push %eax 10dfb2: 68 c0 73 12 00 push $0x1273c0 10dfb7: e8 04 07 00 00 call 10e6c0 <_CPU_Context_switch> <== ALWAYS TAKEN 10dfbc: 83 c4 10 add $0x10,%esp } 10dfbf: c9 leave 10dfc0: c3 ret 00111310 <_Thread_Suspend>: */ void _Thread_Suspend( Thread_Control *the_thread ) { 111310: 55 push %ebp 111311: 89 e5 mov %esp,%ebp 111313: 56 push %esi 111314: 53 push %ebx 111315: 8b 45 08 mov 0x8(%ebp),%eax ISR_Level level; Chain_Control *ready; ready = the_thread->ready; 111318: 8b 90 8c 00 00 00 mov 0x8c(%eax),%edx _ISR_Disable( level ); 11131e: 9c pushf 11131f: fa cli 111320: 59 pop %ecx #if defined(RTEMS_ITRON_API) the_thread->suspend_count++; #endif if ( !_States_Is_ready( the_thread->current_state ) ) { 111321: 8b 58 10 mov 0x10(%eax),%ebx 111324: 85 db test %ebx,%ebx 111326: 75 34 jne 11135c <_Thread_Suspend+0x4c> _States_Set( STATES_SUSPENDED, the_thread->current_state ); _ISR_Enable( level ); return; } the_thread->current_state = STATES_SUSPENDED; 111328: c7 40 10 02 00 00 00 movl $0x2,0x10(%eax) if ( _Chain_Has_only_one_node( ready ) ) { 11132f: 8b 1a mov (%edx),%ebx 111331: 3b 5a 08 cmp 0x8(%edx),%ebx 111334: 74 3e je 111374 <_Thread_Suspend+0x64> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 111336: 8b 18 mov (%eax),%ebx previous = the_node->previous; 111338: 8b 50 04 mov 0x4(%eax),%edx next->previous = previous; 11133b: 89 53 04 mov %edx,0x4(%ebx) previous->next = next; 11133e: 89 1a mov %ebx,(%edx) _Priority_Remove_from_bit_map( &the_thread->Priority_map ); } else _Chain_Extract_unprotected( &the_thread->Object.Node ); _ISR_Flash( level ); 111340: 51 push %ecx 111341: 9d popf 111342: fa cli if ( _Thread_Is_heir( the_thread ) ) 111343: 3b 05 68 74 12 00 cmp 0x127468,%eax 111349: 74 65 je 1113b0 <_Thread_Suspend+0xa0> _Thread_Calculate_heir(); if ( _Thread_Is_executing( the_thread ) ) 11134b: 3b 05 98 74 12 00 cmp 0x127498,%eax 111351: 74 15 je 111368 <_Thread_Suspend+0x58> _Context_Switch_necessary = true; _ISR_Enable( level ); 111353: 51 push %ecx 111354: 9d popf } 111355: 5b pop %ebx 111356: 5e pop %esi 111357: c9 leave 111358: c3 ret 111359: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED _ISR_Disable( level ); #if defined(RTEMS_ITRON_API) the_thread->suspend_count++; #endif if ( !_States_Is_ready( the_thread->current_state ) ) { the_thread->current_state = 11135c: 83 cb 02 or $0x2,%ebx 11135f: 89 58 10 mov %ebx,0x10(%eax) _States_Set( STATES_SUSPENDED, the_thread->current_state ); _ISR_Enable( level ); 111362: 51 push %ecx 111363: 9d popf if ( _Thread_Is_executing( the_thread ) ) _Context_Switch_necessary = true; _ISR_Enable( level ); } 111364: 5b pop %ebx 111365: 5e pop %esi 111366: c9 leave 111367: c3 ret if ( _Thread_Is_heir( the_thread ) ) _Thread_Calculate_heir(); if ( _Thread_Is_executing( the_thread ) ) _Context_Switch_necessary = true; 111368: c6 05 a8 74 12 00 01 movb $0x1,0x1274a8 11136f: eb e2 jmp 111353 <_Thread_Suspend+0x43> <== ALWAYS TAKEN 111371: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 111374: 8d 5a 04 lea 0x4(%edx),%ebx 111377: 89 1a mov %ebx,(%edx) the_chain->permanent_null = NULL; 111379: c7 42 04 00 00 00 00 movl $0x0,0x4(%edx) the_chain->last = _Chain_Head(the_chain); 111380: 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; 111383: 8b 90 90 00 00 00 mov 0x90(%eax),%edx 111389: 66 8b 98 9a 00 00 00 mov 0x9a(%eax),%bx 111390: 66 21 1a and %bx,(%edx) the_thread->current_state = STATES_SUSPENDED; if ( _Chain_Has_only_one_node( ready ) ) { _Chain_Initialize_empty( ready ); _Priority_Remove_from_bit_map( &the_thread->Priority_map ); 111393: 66 83 3a 00 cmpw $0x0,(%edx) 111397: 75 a7 jne 111340 <_Thread_Suspend+0x30> if ( *the_priority_map->minor == 0 ) _Priority_Major_bit_map &= the_priority_map->block_major; 111399: 66 8b 15 8c 74 12 00 mov 0x12748c,%dx 1113a0: 23 90 98 00 00 00 and 0x98(%eax),%edx 1113a6: 66 89 15 8c 74 12 00 mov %dx,0x12748c 1113ad: eb 91 jmp 111340 <_Thread_Suspend+0x30> <== ALWAYS TAKEN 1113af: 90 nop <== NOT EXECUTED RTEMS_INLINE_ROUTINE Priority_Control _Priority_Get_highest( void ) { Priority_Bit_map_control minor; Priority_Bit_map_control major; _Bitfield_Find_first_bit( _Priority_Major_bit_map, major ); 1113b0: 66 8b 35 8c 74 12 00 mov 0x12748c,%si 1113b7: 31 d2 xor %edx,%edx 1113b9: 89 d3 mov %edx,%ebx 1113bb: 66 0f bc de bsf %si,%bx _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); 1113bf: 0f b7 db movzwl %bx,%ebx 1113c2: 66 8b b4 1b 20 75 12 mov 0x127520(%ebx,%ebx,1),%si 1113c9: 00 1113ca: 66 0f bc d6 bsf %si,%dx * ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) 1113ce: c1 e3 04 shl $0x4,%ebx 1113d1: 0f b7 d2 movzwl %dx,%edx 1113d4: 8d 14 13 lea (%ebx,%edx,1),%edx 1113d7: 8d 1c 52 lea (%edx,%edx,2),%ebx 1113da: 8b 15 a0 73 12 00 mov 0x1273a0,%edx 1113e0: 8b 14 9a mov (%edx,%ebx,4),%edx 1113e3: 89 15 68 74 12 00 mov %edx,0x127468 1113e9: e9 5d ff ff ff jmp 11134b <_Thread_Suspend+0x3b> <== ALWAYS TAKEN 0010e024 <_Thread_Tickle_timeslice>: * * Output parameters: NONE */ void _Thread_Tickle_timeslice( void ) { 10e024: 55 push %ebp 10e025: 89 e5 mov %esp,%ebp 10e027: 53 push %ebx 10e028: 83 ec 04 sub $0x4,%esp Thread_Control *executing; executing = _Thread_Executing; 10e02b: 8b 1d 98 74 12 00 mov 0x127498,%ebx /* * If the thread is not preemptible or is not ready, then * just return. */ if ( !executing->is_preemptible ) 10e031: 80 7b 75 00 cmpb $0x0,0x75(%ebx) 10e035: 74 19 je 10e050 <_Thread_Tickle_timeslice+0x2c> return; if ( !_States_Is_ready( executing->current_state ) ) 10e037: 8b 43 10 mov 0x10(%ebx),%eax 10e03a: 85 c0 test %eax,%eax 10e03c: 75 12 jne 10e050 <_Thread_Tickle_timeslice+0x2c> /* * The cpu budget algorithm determines what happens next. */ switch ( executing->budget_algorithm ) { 10e03e: 8b 43 7c mov 0x7c(%ebx),%eax 10e041: 83 f8 01 cmp $0x1,%eax 10e044: 72 0a jb 10e050 <_Thread_Tickle_timeslice+0x2c> 10e046: 83 f8 02 cmp $0x2,%eax 10e049: 76 29 jbe 10e074 <_Thread_Tickle_timeslice+0x50> 10e04b: 83 f8 03 cmp $0x3,%eax 10e04e: 74 08 je 10e058 <_Thread_Tickle_timeslice+0x34> <== NEVER TAKEN if ( --executing->cpu_time_budget == 0 ) (*executing->budget_callout)( executing ); break; #endif } } 10e050: 8b 5d fc mov -0x4(%ebp),%ebx 10e053: c9 leave 10e054: c3 ret 10e055: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED } break; #if defined(RTEMS_SCORE_THREAD_ENABLE_SCHEDULER_CALLOUT) case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: if ( --executing->cpu_time_budget == 0 ) 10e058: 8b 43 78 mov 0x78(%ebx),%eax 10e05b: 48 dec %eax 10e05c: 89 43 78 mov %eax,0x78(%ebx) 10e05f: 85 c0 test %eax,%eax 10e061: 75 ed jne 10e050 <_Thread_Tickle_timeslice+0x2c> (*executing->budget_callout)( executing ); 10e063: 83 ec 0c sub $0xc,%esp 10e066: 53 push %ebx 10e067: ff 93 80 00 00 00 call *0x80(%ebx) 10e06d: 83 c4 10 add $0x10,%esp 10e070: eb de jmp 10e050 <_Thread_Tickle_timeslice+0x2c> <== ALWAYS TAKEN 10e072: 66 90 xchg %ax,%ax <== NOT EXECUTED 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 ) { 10e074: 8b 43 78 mov 0x78(%ebx),%eax 10e077: 48 dec %eax 10e078: 89 43 78 mov %eax,0x78(%ebx) 10e07b: 85 c0 test %eax,%eax 10e07d: 7f d1 jg 10e050 <_Thread_Tickle_timeslice+0x2c> _Thread_Reset_timeslice(); 10e07f: e8 2c 32 00 00 call 1112b0 <_Thread_Reset_timeslice> executing->cpu_time_budget = _Thread_Ticks_per_timeslice; 10e084: a1 a4 73 12 00 mov 0x1273a4,%eax 10e089: 89 43 78 mov %eax,0x78(%ebx) 10e08c: eb c2 jmp 10e050 <_Thread_Tickle_timeslice+0x2c> <== ALWAYS TAKEN 0010e090 <_Thread_Yield_processor>: * ready chain * select heir */ void _Thread_Yield_processor( void ) { 10e090: 55 push %ebp 10e091: 89 e5 mov %esp,%ebp 10e093: 56 push %esi 10e094: 53 push %ebx ISR_Level level; Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; 10e095: a1 98 74 12 00 mov 0x127498,%eax ready = executing->ready; 10e09a: 8b 90 8c 00 00 00 mov 0x8c(%eax),%edx _ISR_Disable( level ); 10e0a0: 9c pushf 10e0a1: fa cli 10e0a2: 59 pop %ecx if ( !_Chain_Has_only_one_node( ready ) ) { 10e0a3: 8b 1a mov (%edx),%ebx 10e0a5: 3b 5a 08 cmp 0x8(%edx),%ebx 10e0a8: 74 3e je 10e0e8 <_Thread_Yield_processor+0x58> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 10e0aa: 8b 30 mov (%eax),%esi previous = the_node->previous; 10e0ac: 8b 58 04 mov 0x4(%eax),%ebx next->previous = previous; 10e0af: 89 5e 04 mov %ebx,0x4(%esi) previous->next = next; 10e0b2: 89 33 mov %esi,(%ebx) Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 10e0b4: 8d 5a 04 lea 0x4(%edx),%ebx 10e0b7: 89 18 mov %ebx,(%eax) old_last_node = the_chain->last; 10e0b9: 8b 5a 08 mov 0x8(%edx),%ebx the_chain->last = the_node; 10e0bc: 89 42 08 mov %eax,0x8(%edx) old_last_node->next = the_node; 10e0bf: 89 03 mov %eax,(%ebx) the_node->previous = old_last_node; 10e0c1: 89 58 04 mov %ebx,0x4(%eax) _Chain_Extract_unprotected( &executing->Object.Node ); _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); 10e0c4: 51 push %ecx 10e0c5: 9d popf 10e0c6: fa cli if ( _Thread_Is_heir( executing ) ) 10e0c7: 3b 05 68 74 12 00 cmp 0x127468,%eax 10e0cd: 74 0d je 10e0dc <_Thread_Yield_processor+0x4c> <== NEVER TAKEN _Thread_Heir = (Thread_Control *) ready->first; _Context_Switch_necessary = true; } else if ( !_Thread_Is_heir( executing ) ) _Context_Switch_necessary = true; 10e0cf: c6 05 a8 74 12 00 01 movb $0x1,0x1274a8 _ISR_Enable( level ); 10e0d6: 51 push %ecx 10e0d7: 9d popf } 10e0d8: 5b pop %ebx 10e0d9: 5e pop %esi 10e0da: c9 leave 10e0db: c3 ret _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); if ( _Thread_Is_heir( executing ) ) _Thread_Heir = (Thread_Control *) ready->first; 10e0dc: 8b 02 mov (%edx),%eax 10e0de: a3 68 74 12 00 mov %eax,0x127468 10e0e3: eb ea jmp 10e0cf <_Thread_Yield_processor+0x3f> <== ALWAYS TAKEN 10e0e5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED _Context_Switch_necessary = true; } else if ( !_Thread_Is_heir( executing ) ) 10e0e8: 3b 05 68 74 12 00 cmp 0x127468,%eax 10e0ee: 75 df jne 10e0cf <_Thread_Yield_processor+0x3f> <== ALWAYS TAKEN 10e0f0: eb e4 jmp 10e0d6 <_Thread_Yield_processor+0x46> <== ALWAYS TAKEN 0010cf80 <_Thread_blocking_operation_Cancel>: Thread_blocking_operation_States sync_state __attribute__((unused)), #endif Thread_Control *the_thread, ISR_Level level ) { 10cf80: 55 push %ebp 10cf81: 89 e5 mov %esp,%ebp 10cf83: 53 push %ebx 10cf84: 83 ec 04 sub $0x4,%esp 10cf87: 8b 5d 0c mov 0xc(%ebp),%ebx 10cf8a: 8b 45 10 mov 0x10(%ebp),%eax #endif /* * The thread is not waiting on anything after this completes. */ the_thread->Wait.queue = NULL; 10cf8d: 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 ) ) { 10cf94: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 10cf98: 74 16 je 10cfb0 <_Thread_blocking_operation_Cancel+0x30> _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); (void) _Watchdog_Remove( &the_thread->Timer ); } else _ISR_Enable( level ); 10cf9a: 50 push %eax 10cf9b: 9d popf RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 10cf9c: c7 45 0c f8 ff 03 10 movl $0x1003fff8,0xc(%ebp) 10cfa3: 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 } 10cfa6: 8b 5d fc mov -0x4(%ebp),%ebx 10cfa9: c9 leave 10cfaa: e9 5d 01 00 00 jmp 10d10c <_Thread_Clear_state> <== ALWAYS TAKEN 10cfaf: 90 nop <== NOT EXECUTED RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 10cfb0: c7 43 50 03 00 00 00 movl $0x3,0x50(%ebx) * If the sync state is timed out, this is very likely not needed. * But better safe than sorry when it comes to critical sections. */ if ( _Watchdog_Is_active( &the_thread->Timer ) ) { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 10cfb7: 50 push %eax 10cfb8: 9d popf (void) _Watchdog_Remove( &the_thread->Timer ); 10cfb9: 83 ec 0c sub $0xc,%esp 10cfbc: 8d 43 48 lea 0x48(%ebx),%eax 10cfbf: 50 push %eax 10cfc0: e8 73 15 00 00 call 10e538 <_Watchdog_Remove> 10cfc5: 83 c4 10 add $0x10,%esp 10cfc8: eb d2 jmp 10cf9c <_Thread_blocking_operation_Cancel+0x1c> <== ALWAYS TAKEN 0010d8a8 <_Thread_queue_Dequeue>: */ Thread_Control *_Thread_queue_Dequeue( Thread_queue_Control *the_thread_queue ) { 10d8a8: 55 push %ebp 10d8a9: 89 e5 mov %esp,%ebp 10d8ab: 53 push %ebx 10d8ac: 83 ec 04 sub $0x4,%esp 10d8af: 8b 5d 08 mov 0x8(%ebp),%ebx Thread_Control *(*dequeue_p)( Thread_queue_Control * ); Thread_Control *the_thread; ISR_Level level; Thread_blocking_operation_States sync_state; if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) 10d8b2: 83 7b 34 01 cmpl $0x1,0x34(%ebx) 10d8b6: 74 1c je 10d8d4 <_Thread_queue_Dequeue+0x2c> 10d8b8: b8 1c 10 11 00 mov $0x11101c,%eax dequeue_p = _Thread_queue_Dequeue_priority; else /* must be THREAD_QUEUE_DISCIPLINE_FIFO */ dequeue_p = _Thread_queue_Dequeue_fifo; the_thread = (*dequeue_p)( the_thread_queue ); 10d8bd: 83 ec 0c sub $0xc,%esp 10d8c0: 53 push %ebx 10d8c1: ff d0 call *%eax _ISR_Disable( level ); 10d8c3: 9c pushf 10d8c4: fa cli 10d8c5: 5a pop %edx if ( !the_thread ) { 10d8c6: 83 c4 10 add $0x10,%esp 10d8c9: 85 c0 test %eax,%eax 10d8cb: 74 0f je 10d8dc <_Thread_queue_Dequeue+0x34> (sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) ) { the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; the_thread = _Thread_Executing; } } _ISR_Enable( level ); 10d8cd: 52 push %edx 10d8ce: 9d popf return the_thread; } 10d8cf: 8b 5d fc mov -0x4(%ebp),%ebx 10d8d2: c9 leave 10d8d3: c3 ret Thread_Control *(*dequeue_p)( Thread_queue_Control * ); Thread_Control *the_thread; ISR_Level level; Thread_blocking_operation_States sync_state; if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) 10d8d4: b8 f4 d8 10 00 mov $0x10d8f4,%eax 10d8d9: eb e2 jmp 10d8bd <_Thread_queue_Dequeue+0x15> <== ALWAYS TAKEN 10d8db: 90 nop <== NOT EXECUTED dequeue_p = _Thread_queue_Dequeue_fifo; the_thread = (*dequeue_p)( the_thread_queue ); _ISR_Disable( level ); if ( !the_thread ) { sync_state = the_thread_queue->sync_state; 10d8dc: 8b 4b 30 mov 0x30(%ebx),%ecx 10d8df: 49 dec %ecx 10d8e0: 83 f9 01 cmp $0x1,%ecx 10d8e3: 77 e8 ja 10d8cd <_Thread_queue_Dequeue+0x25> if ( (sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || (sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) ) { the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; 10d8e5: c7 43 30 03 00 00 00 movl $0x3,0x30(%ebx) the_thread = _Thread_Executing; 10d8ec: a1 98 74 12 00 mov 0x127498,%eax 10d8f1: eb da jmp 10d8cd <_Thread_queue_Dequeue+0x25> <== ALWAYS TAKEN 0011101c <_Thread_queue_Dequeue_fifo>: */ Thread_Control *_Thread_queue_Dequeue_fifo( Thread_queue_Control *the_thread_queue ) { 11101c: 55 push %ebp 11101d: 89 e5 mov %esp,%ebp 11101f: 53 push %ebx 111020: 83 ec 04 sub $0x4,%esp 111023: 8b 45 08 mov 0x8(%ebp),%eax ISR_Level level; Thread_Control *the_thread; _ISR_Disable( level ); 111026: 9c pushf 111027: fa cli 111028: 59 pop %ecx */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 111029: 8b 18 mov (%eax),%ebx */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 11102b: 8d 50 04 lea 0x4(%eax),%edx 11102e: 39 d3 cmp %edx,%ebx 111030: 74 5a je 11108c <_Thread_queue_Dequeue_fifo+0x70> { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; 111032: 8b 13 mov (%ebx),%edx the_chain->first = new_first; 111034: 89 10 mov %edx,(%eax) new_first->previous = _Chain_Head(the_chain); 111036: 89 42 04 mov %eax,0x4(%edx) 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; 111039: c7 43 44 00 00 00 00 movl $0x0,0x44(%ebx) if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 111040: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 111044: 74 1a je 111060 <_Thread_queue_Dequeue_fifo+0x44> _ISR_Enable( level ); 111046: 51 push %ecx 111047: 9d popf RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 111048: 83 ec 08 sub $0x8,%esp 11104b: 68 f8 ff 03 10 push $0x1003fff8 111050: 53 push %ebx 111051: e8 b6 c0 ff ff call 10d10c <_Thread_Clear_state> 111056: 83 c4 10 add $0x10,%esp return the_thread; } _ISR_Enable( level ); return NULL; } 111059: 89 d8 mov %ebx,%eax 11105b: 8b 5d fc mov -0x4(%ebp),%ebx 11105e: c9 leave 11105f: c3 ret RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 111060: c7 43 50 03 00 00 00 movl $0x3,0x50(%ebx) if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { _ISR_Enable( level ); _Thread_Unblock( the_thread ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 111067: 51 push %ecx 111068: 9d popf (void) _Watchdog_Remove( &the_thread->Timer ); 111069: 83 ec 0c sub $0xc,%esp 11106c: 8d 43 48 lea 0x48(%ebx),%eax 11106f: 50 push %eax 111070: e8 c3 d4 ff ff call 10e538 <_Watchdog_Remove> 111075: 58 pop %eax 111076: 5a pop %edx 111077: 68 f8 ff 03 10 push $0x1003fff8 11107c: 53 push %ebx 11107d: e8 8a c0 ff ff call 10d10c <_Thread_Clear_state> 111082: 83 c4 10 add $0x10,%esp return the_thread; } _ISR_Enable( level ); return NULL; } 111085: 89 d8 mov %ebx,%eax 111087: 8b 5d fc mov -0x4(%ebp),%ebx 11108a: c9 leave 11108b: c3 ret #endif return the_thread; } _ISR_Enable( level ); 11108c: 51 push %ecx 11108d: 9d popf 11108e: 31 db xor %ebx,%ebx return NULL; 111090: eb c7 jmp 111059 <_Thread_queue_Dequeue_fifo+0x3d> <== ALWAYS TAKEN 0010d8f4 <_Thread_queue_Dequeue_priority>: */ Thread_Control *_Thread_queue_Dequeue_priority( Thread_queue_Control *the_thread_queue ) { 10d8f4: 55 push %ebp 10d8f5: 89 e5 mov %esp,%ebp 10d8f7: 57 push %edi 10d8f8: 56 push %esi 10d8f9: 53 push %ebx 10d8fa: 83 ec 1c sub $0x1c,%esp 10d8fd: 8b 75 08 mov 0x8(%ebp),%esi Chain_Node *new_second_node; Chain_Node *last_node; Chain_Node *next_node; Chain_Node *previous_node; _ISR_Disable( level ); 10d900: 9c pushf 10d901: fa cli 10d902: 58 pop %eax 10d903: 89 f2 mov %esi,%edx 10d905: 31 c9 xor %ecx,%ecx */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10d907: 8d 5a 04 lea 0x4(%edx),%ebx 10d90a: 39 1a cmp %ebx,(%edx) 10d90c: 75 1a jne 10d928 <_Thread_queue_Dequeue_priority+0x34> for( index=0 ; index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ; index++ ) { 10d90e: 41 inc %ecx 10d90f: 83 c2 0c add $0xc,%edx Chain_Node *last_node; Chain_Node *next_node; Chain_Node *previous_node; _ISR_Disable( level ); for( index=0 ; 10d912: 83 f9 04 cmp $0x4,%ecx 10d915: 75 f0 jne 10d907 <_Thread_queue_Dequeue_priority+0x13> } /* * We did not find a thread to unblock. */ _ISR_Enable( level ); 10d917: 50 push %eax 10d918: 9d popf 10d919: 31 db xor %ebx,%ebx #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif return( the_thread ); } 10d91b: 89 d8 mov %ebx,%eax 10d91d: 8d 65 f4 lea -0xc(%ebp),%esp 10d920: 5b pop %ebx 10d921: 5e pop %esi 10d922: 5f pop %edi 10d923: c9 leave 10d924: c3 ret 10d925: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED _ISR_Disable( level ); for( index=0 ; index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ; index++ ) { if ( !_Chain_Is_empty( &the_thread_queue->Queues.Priority[ index ] ) ) { the_thread = (Thread_Control *) 10d928: 8d 14 49 lea (%ecx,%ecx,2),%edx 10d92b: 8b 1c 96 mov (%esi,%edx,4),%ebx */ _ISR_Enable( level ); return NULL; dequeue: the_thread->Wait.queue = NULL; 10d92e: c7 43 44 00 00 00 00 movl $0x0,0x44(%ebx) new_first_node = the_thread->Wait.Block2n.first; 10d935: 8b 53 38 mov 0x38(%ebx),%edx new_first_thread = (Thread_Control *) new_first_node; next_node = the_thread->Object.Node.next; 10d938: 8b 0b mov (%ebx),%ecx previous_node = the_thread->Object.Node.previous; 10d93a: 8b 73 04 mov 0x4(%ebx),%esi 10d93d: 8d 7b 3c lea 0x3c(%ebx),%edi 10d940: 39 fa cmp %edi,%edx 10d942: 74 76 je 10d9ba <_Thread_queue_Dequeue_priority+0xc6> if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) { last_node = the_thread->Wait.Block2n.last; 10d944: 8b 7b 40 mov 0x40(%ebx),%edi 10d947: 89 7d e4 mov %edi,-0x1c(%ebp) new_second_node = new_first_node->next; 10d94a: 8b 3a mov (%edx),%edi previous_node->next = new_first_node; 10d94c: 89 16 mov %edx,(%esi) next_node->previous = new_first_node; 10d94e: 89 51 04 mov %edx,0x4(%ecx) new_first_node->next = next_node; 10d951: 89 0a mov %ecx,(%edx) new_first_node->previous = previous_node; 10d953: 89 72 04 mov %esi,0x4(%edx) if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) { 10d956: 8b 4b 38 mov 0x38(%ebx),%ecx 10d959: 3b 4b 40 cmp 0x40(%ebx),%ecx 10d95c: 74 14 je 10d972 <_Thread_queue_Dequeue_priority+0x7e> /* > two threads on 2-n */ new_second_node->previous = 10d95e: 8d 4a 38 lea 0x38(%edx),%ecx 10d961: 89 4f 04 mov %ecx,0x4(%edi) _Chain_Head( &new_first_thread->Wait.Block2n ); new_first_thread->Wait.Block2n.first = new_second_node; 10d964: 89 7a 38 mov %edi,0x38(%edx) new_first_thread->Wait.Block2n.last = last_node; 10d967: 8b 4d e4 mov -0x1c(%ebp),%ecx 10d96a: 89 4a 40 mov %ecx,0x40(%edx) last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n ); 10d96d: 83 c2 3c add $0x3c,%edx 10d970: 89 11 mov %edx,(%ecx) } else { previous_node->next = next_node; next_node->previous = previous_node; } if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 10d972: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 10d976: 74 18 je 10d990 <_Thread_queue_Dequeue_priority+0x9c> _ISR_Enable( level ); 10d978: 50 push %eax 10d979: 9d popf RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 10d97a: 83 ec 08 sub $0x8,%esp 10d97d: 68 f8 ff 03 10 push $0x1003fff8 10d982: 53 push %ebx 10d983: e8 84 f7 ff ff call 10d10c <_Thread_Clear_state> <== ALWAYS TAKEN 10d988: 83 c4 10 add $0x10,%esp 10d98b: eb 8e jmp 10d91b <_Thread_queue_Dequeue_priority+0x27> <== ALWAYS TAKEN 10d98d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 10d990: c7 43 50 03 00 00 00 movl $0x3,0x50(%ebx) _Thread_Unblock( the_thread ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 10d997: 50 push %eax 10d998: 9d popf (void) _Watchdog_Remove( &the_thread->Timer ); 10d999: 83 ec 0c sub $0xc,%esp 10d99c: 8d 43 48 lea 0x48(%ebx),%eax 10d99f: 50 push %eax 10d9a0: e8 93 0b 00 00 call 10e538 <_Watchdog_Remove> <== ALWAYS TAKEN 10d9a5: 58 pop %eax 10d9a6: 5a pop %edx 10d9a7: 68 f8 ff 03 10 push $0x1003fff8 10d9ac: 53 push %ebx 10d9ad: e8 5a f7 ff ff call 10d10c <_Thread_Clear_state> 10d9b2: 83 c4 10 add $0x10,%esp 10d9b5: e9 61 ff ff ff jmp 10d91b <_Thread_queue_Dequeue_priority+0x27> <== ALWAYS TAKEN new_first_thread->Wait.Block2n.last = last_node; last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n ); } } else { previous_node->next = next_node; 10d9ba: 89 0e mov %ecx,(%esi) next_node->previous = previous_node; 10d9bc: 89 71 04 mov %esi,0x4(%ecx) 10d9bf: eb b1 jmp 10d972 <_Thread_queue_Dequeue_priority+0x7e> <== ALWAYS TAKEN 00111094 <_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 ) { 111094: 55 push %ebp 111095: 89 e5 mov %esp,%ebp 111097: 56 push %esi 111098: 53 push %ebx 111099: 8b 55 08 mov 0x8(%ebp),%edx 11109c: 8b 5d 0c mov 0xc(%ebp),%ebx Thread_blocking_operation_States sync_state; ISR_Level level; _ISR_Disable( level ); 11109f: 9c pushf 1110a0: fa cli 1110a1: 59 pop %ecx sync_state = the_thread_queue->sync_state; 1110a2: 8b 42 30 mov 0x30(%edx),%eax the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 1110a5: c7 42 30 00 00 00 00 movl $0x0,0x30(%edx) if (sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) { 1110ac: 83 f8 01 cmp $0x1,%eax 1110af: 74 0b je 1110bc <_Thread_queue_Enqueue_fifo+0x28> * For example, the blocking thread could have been given * the mutex by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ *level_p = level; 1110b1: 8b 55 10 mov 0x10(%ebp),%edx 1110b4: 89 0a mov %ecx,(%edx) return sync_state; } 1110b6: 5b pop %ebx 1110b7: 5e pop %esi 1110b8: c9 leave 1110b9: c3 ret 1110ba: 66 90 xchg %ax,%ax <== NOT EXECUTED Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 1110bc: 8d 72 04 lea 0x4(%edx),%esi 1110bf: 89 33 mov %esi,(%ebx) old_last_node = the_chain->last; 1110c1: 8b 72 08 mov 0x8(%edx),%esi the_chain->last = the_node; 1110c4: 89 5a 08 mov %ebx,0x8(%edx) old_last_node->next = the_node; 1110c7: 89 1e mov %ebx,(%esi) the_node->previous = old_last_node; 1110c9: 89 73 04 mov %esi,0x4(%ebx) if (sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) { _Chain_Append_unprotected( &the_thread_queue->Queues.Fifo, &the_thread->Object.Node ); the_thread->Wait.queue = the_thread_queue; 1110cc: 89 53 44 mov %edx,0x44(%ebx) the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; _ISR_Enable( level ); 1110cf: 51 push %ecx 1110d0: 9d popf * * WARNING! Returning with interrupts disabled! */ *level_p = level; return sync_state; } 1110d1: 5b pop %ebx 1110d2: 5e pop %esi 1110d3: c9 leave 1110d4: c3 ret 0010da5c <_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 ) { 10da5c: 55 push %ebp 10da5d: 89 e5 mov %esp,%ebp 10da5f: 57 push %edi 10da60: 56 push %esi 10da61: 53 push %ebx 10da62: 83 ec 08 sub $0x8,%esp 10da65: 8b 7d 0c mov 0xc(%ebp),%edi */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 10da68: 8d 47 3c lea 0x3c(%edi),%eax 10da6b: 89 47 38 mov %eax,0x38(%edi) the_chain->permanent_null = NULL; 10da6e: c7 47 3c 00 00 00 00 movl $0x0,0x3c(%edi) the_chain->last = _Chain_Head(the_chain); 10da75: 8d 47 38 lea 0x38(%edi),%eax 10da78: 89 47 40 mov %eax,0x40(%edi) Priority_Control priority; States_Control block_state; _Chain_Initialize_empty( &the_thread->Wait.Block2n ); priority = the_thread->current_priority; 10da7b: 8b 57 14 mov 0x14(%edi),%edx header_index = _Thread_queue_Header_number( priority ); header = &the_thread_queue->Queues.Priority[ header_index ]; 10da7e: 89 d0 mov %edx,%eax 10da80: c1 e8 06 shr $0x6,%eax 10da83: 8d 04 40 lea (%eax,%eax,2),%eax 10da86: 8b 4d 08 mov 0x8(%ebp),%ecx 10da89: 8d 34 81 lea (%ecx,%eax,4),%esi block_state = the_thread_queue->state; 10da8c: 8b 59 38 mov 0x38(%ecx),%ebx if ( _Thread_queue_Is_reverse_search( priority ) ) 10da8f: f6 c2 20 test $0x20,%dl 10da92: 75 60 jne 10daf4 <_Thread_queue_Enqueue_priority+0x98> */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10da94: 8d 46 04 lea 0x4(%esi),%eax 10da97: 89 75 f0 mov %esi,-0x10(%ebp) 10da9a: 89 7d ec mov %edi,-0x14(%ebp) 10da9d: 89 c7 mov %eax,%edi goto restart_reverse_search; restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); 10da9f: 9c pushf 10daa0: fa cli 10daa1: 5e pop %esi search_thread = (Thread_Control *) header->first; 10daa2: 8b 4d f0 mov -0x10(%ebp),%ecx 10daa5: 8b 01 mov (%ecx),%eax while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 10daa7: 39 f8 cmp %edi,%eax 10daa9: 75 17 jne 10dac2 <_Thread_queue_Enqueue_priority+0x66> 10daab: e9 09 01 00 00 jmp 10dbb9 <_Thread_queue_Enqueue_priority+0x15d> <== ALWAYS TAKEN break; search_priority = search_thread->current_priority; if ( priority <= search_priority ) break; #endif _ISR_Flash( level ); 10dab0: 56 push %esi 10dab1: 9d popf 10dab2: fa cli if ( !_States_Are_set( search_thread->current_state, block_state) ) { 10dab3: 85 58 10 test %ebx,0x10(%eax) 10dab6: 0f 84 a8 00 00 00 je 10db64 <_Thread_queue_Enqueue_priority+0x108> <== ALWAYS TAKEN _ISR_Enable( level ); goto restart_forward_search; } search_thread = (Thread_Control *)search_thread->Object.Node.next; 10dabc: 8b 00 mov (%eax),%eax restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->first; while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 10dabe: 39 f8 cmp %edi,%eax 10dac0: 74 07 je 10dac9 <_Thread_queue_Enqueue_priority+0x6d> search_priority = search_thread->current_priority; 10dac2: 8b 48 14 mov 0x14(%eax),%ecx if ( priority <= search_priority ) 10dac5: 39 ca cmp %ecx,%edx 10dac7: 77 e7 ja 10dab0 <_Thread_queue_Enqueue_priority+0x54> 10dac9: 89 4d f0 mov %ecx,-0x10(%ebp) 10dacc: 8b 7d ec mov -0x14(%ebp),%edi 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 ) ) { 10dacf: 89 f3 mov %esi,%ebx } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != 10dad1: 8b 4d 08 mov 0x8(%ebp),%ecx 10dad4: 83 79 30 01 cmpl $0x1,0x30(%ecx) 10dad8: 0f 84 8e 00 00 00 je 10db6c <_Thread_queue_Enqueue_priority+0x110> * 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; 10dade: 8b 45 10 mov 0x10(%ebp),%eax 10dae1: 89 18 mov %ebx,(%eax) return the_thread_queue->sync_state; 10dae3: 8b 55 08 mov 0x8(%ebp),%edx 10dae6: 8b 42 30 mov 0x30(%edx),%eax } 10dae9: 83 c4 08 add $0x8,%esp 10daec: 5b pop %ebx 10daed: 5e pop %esi 10daee: 5f pop %edi 10daef: c9 leave 10daf0: c3 ret 10daf1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 10daf4: 89 7d f0 mov %edi,-0x10(%ebp) the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; 10daf7: 0f b6 0d 14 32 12 00 movzbl 0x123214,%ecx 10dafe: 41 inc %ecx _ISR_Disable( level ); 10daff: 9c pushf 10db00: fa cli 10db01: 5f pop %edi search_thread = (Thread_Control *) header->last; 10db02: 8b 46 08 mov 0x8(%esi),%eax while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { 10db05: 39 f0 cmp %esi,%eax 10db07: 75 12 jne 10db1b <_Thread_queue_Enqueue_priority+0xbf> 10db09: eb 17 jmp 10db22 <_Thread_queue_Enqueue_priority+0xc6> <== ALWAYS TAKEN 10db0b: 90 nop <== NOT EXECUTED break; search_priority = search_thread->current_priority; if ( priority >= search_priority ) break; #endif _ISR_Flash( level ); 10db0c: 57 push %edi 10db0d: 9d popf 10db0e: fa cli if ( !_States_Are_set( search_thread->current_state, block_state) ) { 10db0f: 85 58 10 test %ebx,0x10(%eax) 10db12: 74 4c je 10db60 <_Thread_queue_Enqueue_priority+0x104> _ISR_Enable( level ); goto restart_reverse_search; } search_thread = (Thread_Control *) 10db14: 8b 40 04 mov 0x4(%eax),%eax restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->last; while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { 10db17: 39 f0 cmp %esi,%eax 10db19: 74 07 je 10db22 <_Thread_queue_Enqueue_priority+0xc6> search_priority = search_thread->current_priority; 10db1b: 8b 48 14 mov 0x14(%eax),%ecx if ( priority >= search_priority ) 10db1e: 39 ca cmp %ecx,%edx 10db20: 72 ea jb 10db0c <_Thread_queue_Enqueue_priority+0xb0> 10db22: 89 fe mov %edi,%esi 10db24: 89 4d ec mov %ecx,-0x14(%ebp) 10db27: 8b 7d f0 mov -0x10(%ebp),%edi 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 ) ) { 10db2a: 89 f3 mov %esi,%ebx } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != 10db2c: 8b 4d 08 mov 0x8(%ebp),%ecx 10db2f: 83 79 30 01 cmpl $0x1,0x30(%ecx) 10db33: 75 a9 jne 10dade <_Thread_queue_Enqueue_priority+0x82> THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 10db35: c7 41 30 00 00 00 00 movl $0x0,0x30(%ecx) if ( priority == search_priority ) 10db3c: 3b 55 ec cmp -0x14(%ebp),%edx 10db3f: 74 56 je 10db97 <_Thread_queue_Enqueue_priority+0x13b> goto equal_priority; search_node = (Chain_Node *) search_thread; next_node = search_node->next; 10db41: 8b 10 mov (%eax),%edx the_node = (Chain_Node *) the_thread; the_node->next = next_node; 10db43: 89 17 mov %edx,(%edi) the_node->previous = search_node; 10db45: 89 47 04 mov %eax,0x4(%edi) search_node->next = the_node; 10db48: 89 38 mov %edi,(%eax) next_node->previous = the_node; 10db4a: 89 7a 04 mov %edi,0x4(%edx) the_thread->Wait.queue = the_thread_queue; 10db4d: 89 4f 44 mov %ecx,0x44(%edi) _ISR_Enable( level ); 10db50: 56 push %esi 10db51: 9d popf 10db52: b8 01 00 00 00 mov $0x1,%eax * * WARNING! Returning with interrupts disabled! */ *level_p = level; return the_thread_queue->sync_state; } 10db57: 83 c4 08 add $0x8,%esp 10db5a: 5b pop %ebx 10db5b: 5e pop %esi 10db5c: 5f pop %edi 10db5d: c9 leave 10db5e: c3 ret 10db5f: 90 nop <== NOT EXECUTED if ( priority >= search_priority ) break; #endif _ISR_Flash( level ); if ( !_States_Are_set( search_thread->current_state, block_state) ) { _ISR_Enable( level ); 10db60: 57 push %edi 10db61: 9d popf goto restart_reverse_search; 10db62: eb 93 jmp 10daf7 <_Thread_queue_Enqueue_priority+0x9b> <== ALWAYS TAKEN if ( priority <= search_priority ) break; #endif _ISR_Flash( level ); if ( !_States_Are_set( search_thread->current_state, block_state) ) { _ISR_Enable( level ); 10db64: 56 push %esi <== NOT EXECUTED 10db65: 9d popf <== NOT EXECUTED goto restart_forward_search; 10db66: e9 34 ff ff ff jmp 10da9f <_Thread_queue_Enqueue_priority+0x43> <== NOT EXECUTED 10db6b: 90 nop <== NOT EXECUTED if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 10db6c: c7 41 30 00 00 00 00 movl $0x0,0x30(%ecx) if ( priority == search_priority ) 10db73: 3b 55 f0 cmp -0x10(%ebp),%edx 10db76: 74 1f je 10db97 <_Thread_queue_Enqueue_priority+0x13b> goto equal_priority; search_node = (Chain_Node *) search_thread; previous_node = search_node->previous; 10db78: 8b 50 04 mov 0x4(%eax),%edx the_node = (Chain_Node *) the_thread; the_node->next = search_node; 10db7b: 89 07 mov %eax,(%edi) the_node->previous = previous_node; 10db7d: 89 57 04 mov %edx,0x4(%edi) previous_node->next = the_node; 10db80: 89 3a mov %edi,(%edx) search_node->previous = the_node; 10db82: 89 78 04 mov %edi,0x4(%eax) the_thread->Wait.queue = the_thread_queue; 10db85: 89 4f 44 mov %ecx,0x44(%edi) _ISR_Enable( level ); 10db88: 56 push %esi 10db89: 9d popf 10db8a: b8 01 00 00 00 mov $0x1,%eax * * WARNING! Returning with interrupts disabled! */ *level_p = level; return the_thread_queue->sync_state; } 10db8f: 83 c4 08 add $0x8,%esp 10db92: 5b pop %ebx 10db93: 5e pop %esi 10db94: 5f pop %edi 10db95: c9 leave 10db96: c3 ret 10db97: 83 c0 3c add $0x3c,%eax _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; equal_priority: /* add at end of priority group */ search_node = _Chain_Tail( &search_thread->Wait.Block2n ); previous_node = search_node->previous; 10db9a: 8b 50 04 mov 0x4(%eax),%edx the_node = (Chain_Node *) the_thread; the_node->next = search_node; 10db9d: 89 07 mov %eax,(%edi) the_node->previous = previous_node; 10db9f: 89 57 04 mov %edx,0x4(%edi) previous_node->next = the_node; 10dba2: 89 3a mov %edi,(%edx) search_node->previous = the_node; 10dba4: 89 78 04 mov %edi,0x4(%eax) the_thread->Wait.queue = the_thread_queue; 10dba7: 8b 45 08 mov 0x8(%ebp),%eax 10dbaa: 89 47 44 mov %eax,0x44(%edi) _ISR_Enable( level ); 10dbad: 53 push %ebx 10dbae: 9d popf 10dbaf: b8 01 00 00 00 mov $0x1,%eax return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 10dbb4: e9 30 ff ff ff jmp 10dae9 <_Thread_queue_Enqueue_priority+0x8d> <== ALWAYS TAKEN 10dbb9: 8b 7d ec mov -0x14(%ebp),%edi 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 ) ) { 10dbbc: 89 f3 mov %esi,%ebx 10dbbe: c7 45 f0 ff ff ff ff movl $0xffffffff,-0x10(%ebp) 10dbc5: e9 07 ff ff ff jmp 10dad1 <_Thread_queue_Enqueue_priority+0x75> <== ALWAYS TAKEN 0010d9c4 <_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 ) { 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 24 sub $0x24,%esp 10d9cd: 8b 75 08 mov 0x8(%ebp),%esi 10d9d0: 8b 7d 0c mov 0xc(%ebp),%edi Thread_queue_Control *, Thread_Control *, ISR_Level * ); the_thread = _Thread_Executing; 10d9d3: 8b 1d 98 74 12 00 mov 0x127498,%ebx else #endif /* * Set the blocking state for this thread queue in the thread. */ _Thread_Set_state( the_thread, the_thread_queue->state ); 10d9d9: ff 76 38 pushl 0x38(%esi) 10d9dc: 53 push %ebx 10d9dd: e8 96 03 00 00 call 10dd78 <_Thread_Set_state> <== ALWAYS TAKEN /* * If the thread wants to timeout, then schedule its timer. */ if ( timeout ) { 10d9e2: 83 c4 10 add $0x10,%esp 10d9e5: 85 ff test %edi,%edi 10d9e7: 75 33 jne 10da1c <_Thread_queue_Enqueue_with_handler+0x58> } /* * Now enqueue the thread per the discipline for this thread queue. */ if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) 10d9e9: 83 7e 34 01 cmpl $0x1,0x34(%esi) 10d9ed: 74 64 je 10da53 <_Thread_queue_Enqueue_with_handler+0x8f> 10d9ef: b8 94 10 11 00 mov $0x111094,%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 ); 10d9f4: 51 push %ecx 10d9f5: 8d 55 e4 lea -0x1c(%ebp),%edx 10d9f8: 52 push %edx 10d9f9: 53 push %ebx 10d9fa: 56 push %esi 10d9fb: ff d0 call *%eax if ( sync_state != THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) 10d9fd: 83 c4 10 add $0x10,%esp 10da00: 83 f8 01 cmp $0x1,%eax 10da03: 74 0e je 10da13 <_Thread_queue_Enqueue_with_handler+0x4f> _Thread_blocking_operation_Cancel( sync_state, the_thread, level ); 10da05: 52 push %edx 10da06: ff 75 e4 pushl -0x1c(%ebp) 10da09: 53 push %ebx 10da0a: 50 push %eax 10da0b: e8 70 f5 ff ff call 10cf80 <_Thread_blocking_operation_Cancel> 10da10: 83 c4 10 add $0x10,%esp } 10da13: 8d 65 f4 lea -0xc(%ebp),%esp 10da16: 5b pop %ebx 10da17: 5e pop %esi 10da18: 5f pop %edi 10da19: c9 leave 10da1a: c3 ret 10da1b: 90 nop <== NOT EXECUTED /* * If the thread wants to timeout, then schedule its timer. */ if ( timeout ) { _Watchdog_Initialize( 10da1c: 8b 43 08 mov 0x8(%ebx),%eax Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 10da1f: c7 43 50 00 00 00 00 movl $0x0,0x50(%ebx) the_watchdog->routine = routine; 10da26: 8b 55 10 mov 0x10(%ebp),%edx 10da29: 89 53 64 mov %edx,0x64(%ebx) the_watchdog->id = id; 10da2c: 89 43 68 mov %eax,0x68(%ebx) the_watchdog->user_data = user_data; 10da2f: c7 43 6c 00 00 00 00 movl $0x0,0x6c(%ebx) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 10da36: 89 7b 54 mov %edi,0x54(%ebx) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 10da39: 83 ec 08 sub $0x8,%esp 10da3c: 8d 43 48 lea 0x48(%ebx),%eax 10da3f: 50 push %eax 10da40: 68 b8 74 12 00 push $0x1274b8 10da45: e8 b6 09 00 00 call 10e400 <_Watchdog_Insert> <== ALWAYS TAKEN 10da4a: 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 ) 10da4d: 83 7e 34 01 cmpl $0x1,0x34(%esi) 10da51: 75 9c jne 10d9ef <_Thread_queue_Enqueue_with_handler+0x2b> 10da53: b8 5c da 10 00 mov $0x10da5c,%eax 10da58: eb 9a jmp 10d9f4 <_Thread_queue_Enqueue_with_handler+0x30> <== ALWAYS TAKEN 001110d8 <_Thread_queue_Extract>: void _Thread_queue_Extract( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { 1110d8: 55 push %ebp 1110d9: 89 e5 mov %esp,%ebp 1110db: 83 ec 08 sub $0x8,%esp 1110de: 8b 45 08 mov 0x8(%ebp),%eax 1110e1: 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 ) 1110e4: 83 78 34 01 cmpl $0x1,0x34(%eax) 1110e8: 74 0e je 1110f8 <_Thread_queue_Extract+0x20> _Thread_queue_Extract_priority( the_thread_queue, the_thread ); else /* must be THREAD_QUEUE_DISCIPLINE_FIFO */ _Thread_queue_Extract_fifo( the_thread_queue, the_thread ); 1110ea: 89 55 0c mov %edx,0xc(%ebp) 1110ed: 89 45 08 mov %eax,0x8(%ebp) } 1110f0: 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 ); 1110f1: e9 06 1d 00 00 jmp 112dfc <_Thread_queue_Extract_fifo> 1110f6: 66 90 xchg %ax,%ax <== NOT EXECUTED /* * Can not use indirect function pointer here since Extract priority * is a macro and the underlying methods do not have the same signature. */ if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) _Thread_queue_Extract_priority( the_thread_queue, the_thread ); 1110f8: 51 push %ecx 1110f9: 6a 00 push $0x0 1110fb: 52 push %edx 1110fc: 50 push %eax 1110fd: e8 06 00 00 00 call 111108 <_Thread_queue_Extract_priority_helper> <== ALWAYS TAKEN 111102: 83 c4 10 add $0x10,%esp else /* must be THREAD_QUEUE_DISCIPLINE_FIFO */ _Thread_queue_Extract_fifo( the_thread_queue, the_thread ); } 111105: c9 leave 111106: c3 ret 00112dfc <_Thread_queue_Extract_fifo>: void _Thread_queue_Extract_fifo( Thread_queue_Control *the_thread_queue __attribute__((unused)), Thread_Control *the_thread ) { 112dfc: 55 push %ebp 112dfd: 89 e5 mov %esp,%ebp 112dff: 53 push %ebx 112e00: 83 ec 04 sub $0x4,%esp 112e03: 8b 5d 0c mov 0xc(%ebp),%ebx ISR_Level level; _ISR_Disable( level ); 112e06: 9c pushf 112e07: fa cli 112e08: 58 pop %eax if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 112e09: f7 43 10 e0 be 03 00 testl $0x3bee0,0x10(%ebx) 112e10: 74 2e je 112e40 <_Thread_queue_Extract_fifo+0x44> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 112e12: 8b 0b mov (%ebx),%ecx previous = the_node->previous; 112e14: 8b 53 04 mov 0x4(%ebx),%edx next->previous = previous; 112e17: 89 51 04 mov %edx,0x4(%ecx) previous->next = next; 112e1a: 89 0a mov %ecx,(%edx) return; } _Chain_Extract_unprotected( &the_thread->Object.Node ); the_thread->Wait.queue = NULL; 112e1c: c7 43 44 00 00 00 00 movl $0x0,0x44(%ebx) if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 112e23: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 112e27: 74 1f je 112e48 <_Thread_queue_Extract_fifo+0x4c> _ISR_Enable( level ); 112e29: 50 push %eax 112e2a: 9d popf RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 112e2b: c7 45 0c f8 ff 03 10 movl $0x1003fff8,0xc(%ebp) 112e32: 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 } 112e35: 8b 5d fc mov -0x4(%ebp),%ebx 112e38: c9 leave 112e39: e9 ce a2 ff ff jmp 10d10c <_Thread_Clear_state> 112e3e: 66 90 xchg %ax,%ax <== NOT EXECUTED ISR_Level level; _ISR_Disable( level ); if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { _ISR_Enable( level ); 112e40: 50 push %eax 112e41: 9d popf #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 112e42: 8b 5d fc mov -0x4(%ebp),%ebx 112e45: c9 leave 112e46: c3 ret 112e47: 90 nop <== NOT EXECUTED 112e48: c7 43 50 03 00 00 00 movl $0x3,0x50(%ebx) if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { _ISR_Enable( level ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 112e4f: 50 push %eax 112e50: 9d popf (void) _Watchdog_Remove( &the_thread->Timer ); 112e51: 83 ec 0c sub $0xc,%esp 112e54: 8d 43 48 lea 0x48(%ebx),%eax 112e57: 50 push %eax 112e58: e8 db b6 ff ff call 10e538 <_Watchdog_Remove> 112e5d: 83 c4 10 add $0x10,%esp 112e60: eb c9 jmp 112e2b <_Thread_queue_Extract_fifo+0x2f> <== ALWAYS TAKEN 00111108 <_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 ) { 111108: 55 push %ebp 111109: 89 e5 mov %esp,%ebp 11110b: 57 push %edi 11110c: 56 push %esi 11110d: 53 push %ebx 11110e: 83 ec 1c sub $0x1c,%esp 111111: 8b 5d 0c mov 0xc(%ebp),%ebx 111114: 8a 45 10 mov 0x10(%ebp),%al 111117: 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 ); 11111a: 9c pushf 11111b: fa cli 11111c: 8f 45 e4 popl -0x1c(%ebp) if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 11111f: f7 43 10 e0 be 03 00 testl $0x3bee0,0x10(%ebx) 111126: 74 6c je 111194 <_Thread_queue_Extract_priority_helper+0x8c> /* * The thread was actually waiting on a thread queue so let's remove it. */ next_node = the_node->next; 111128: 8b 13 mov (%ebx),%edx previous_node = the_node->previous; 11112a: 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)); 11112d: 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; 111130: 8d 73 3c lea 0x3c(%ebx),%esi 111133: 39 f0 cmp %esi,%eax 111135: 74 69 je 1111a0 <_Thread_queue_Extract_priority_helper+0x98> 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; 111137: 8b 7b 40 mov 0x40(%ebx),%edi new_second_node = new_first_node->next; 11113a: 8b 30 mov (%eax),%esi previous_node->next = new_first_node; 11113c: 89 01 mov %eax,(%ecx) next_node->previous = new_first_node; 11113e: 89 42 04 mov %eax,0x4(%edx) new_first_node->next = next_node; 111141: 89 10 mov %edx,(%eax) new_first_node->previous = previous_node; 111143: 89 48 04 mov %ecx,0x4(%eax) if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) { 111146: 8b 53 38 mov 0x38(%ebx),%edx 111149: 3b 53 40 cmp 0x40(%ebx),%edx 11114c: 74 11 je 11115f <_Thread_queue_Extract_priority_helper+0x57> /* > two threads on 2-n */ new_second_node->previous = 11114e: 8d 50 38 lea 0x38(%eax),%edx 111151: 89 56 04 mov %edx,0x4(%esi) _Chain_Head( &new_first_thread->Wait.Block2n ); new_first_thread->Wait.Block2n.first = new_second_node; 111154: 89 70 38 mov %esi,0x38(%eax) new_first_thread->Wait.Block2n.last = last_node; 111157: 89 78 40 mov %edi,0x40(%eax) last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n ); 11115a: 83 c0 3c add $0x3c,%eax 11115d: 89 07 mov %eax,(%edi) /* * If we are not supposed to touch timers or the thread's state, return. */ if ( requeuing ) { 11115f: 80 7d e3 00 cmpb $0x0,-0x1d(%ebp) 111163: 75 23 jne 111188 <_Thread_queue_Extract_priority_helper+0x80> _ISR_Enable( level ); return; } if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 111165: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 111169: 74 3d je 1111a8 <_Thread_queue_Extract_priority_helper+0xa0> _ISR_Enable( level ); 11116b: ff 75 e4 pushl -0x1c(%ebp) 11116e: 9d popf 11116f: c7 45 0c f8 ff 03 10 movl $0x1003fff8,0xc(%ebp) 111176: 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 } 111179: 8d 65 f4 lea -0xc(%ebp),%esp 11117c: 5b pop %ebx 11117d: 5e pop %esi 11117e: 5f pop %edi 11117f: c9 leave 111180: e9 87 bf ff ff jmp 10d10c <_Thread_Clear_state> 111185: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED /* * If we are not supposed to touch timers or the thread's state, return. */ if ( requeuing ) { _ISR_Enable( level ); 111188: ff 75 e4 pushl -0x1c(%ebp) 11118b: 9d popf #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 11118c: 8d 65 f4 lea -0xc(%ebp),%esp 11118f: 5b pop %ebx 111190: 5e pop %esi 111191: 5f pop %edi 111192: c9 leave 111193: c3 ret Chain_Node *last_node; the_node = (Chain_Node *) the_thread; _ISR_Disable( level ); if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { _ISR_Enable( level ); 111194: ff 75 e4 pushl -0x1c(%ebp) 111197: 9d popf #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 111198: 8d 65 f4 lea -0xc(%ebp),%esp 11119b: 5b pop %ebx 11119c: 5e pop %esi 11119d: 5f pop %edi 11119e: c9 leave 11119f: c3 ret new_first_thread->Wait.Block2n.last = last_node; last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n ); } } else { previous_node->next = next_node; 1111a0: 89 11 mov %edx,(%ecx) next_node->previous = previous_node; 1111a2: 89 4a 04 mov %ecx,0x4(%edx) 1111a5: eb b8 jmp 11115f <_Thread_queue_Extract_priority_helper+0x57> <== ALWAYS TAKEN 1111a7: 90 nop <== NOT EXECUTED 1111a8: c7 43 50 03 00 00 00 movl $0x3,0x50(%ebx) if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { _ISR_Enable( level ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 1111af: ff 75 e4 pushl -0x1c(%ebp) 1111b2: 9d popf (void) _Watchdog_Remove( &the_thread->Timer ); 1111b3: 83 ec 0c sub $0xc,%esp 1111b6: 8d 43 48 lea 0x48(%ebx),%eax 1111b9: 50 push %eax 1111ba: e8 79 d3 ff ff call 10e538 <_Watchdog_Remove> 1111bf: 83 c4 10 add $0x10,%esp 1111c2: eb ab jmp 11116f <_Thread_queue_Extract_priority_helper+0x67> <== ALWAYS TAKEN 0010dbcc <_Thread_queue_Extract_with_proxy>: */ bool _Thread_queue_Extract_with_proxy( Thread_Control *the_thread ) { 10dbcc: 55 push %ebp 10dbcd: 89 e5 mov %esp,%ebp 10dbcf: 83 ec 08 sub $0x8,%esp 10dbd2: 8b 45 08 mov 0x8(%ebp),%eax States_Control state; state = the_thread->current_state; 10dbd5: f7 40 10 e0 be 03 00 testl $0x3bee0,0x10(%eax) 10dbdc: 75 06 jne 10dbe4 <_Thread_queue_Extract_with_proxy+0x18> 10dbde: 31 c0 xor %eax,%eax _Thread_queue_Extract( the_thread->Wait.queue, the_thread ); return true; } return false; } 10dbe0: c9 leave 10dbe1: c3 ret 10dbe2: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( proxy_extract_callout ) (*proxy_extract_callout)( the_thread ); } #endif _Thread_queue_Extract( the_thread->Wait.queue, the_thread ); 10dbe4: 83 ec 08 sub $0x8,%esp 10dbe7: 50 push %eax 10dbe8: ff 70 44 pushl 0x44(%eax) 10dbeb: e8 e8 34 00 00 call 1110d8 <_Thread_queue_Extract> 10dbf0: b0 01 mov $0x1,%al return true; 10dbf2: 83 c4 10 add $0x10,%esp } return false; } 10dbf5: c9 leave 10dbf6: c3 ret 0010fa34 <_Thread_queue_First>: */ Thread_Control *_Thread_queue_First( Thread_queue_Control *the_thread_queue ) { 10fa34: 55 push %ebp 10fa35: 89 e5 mov %esp,%ebp 10fa37: 83 ec 08 sub $0x8,%esp 10fa3a: 8b 45 08 mov 0x8(%ebp),%eax Thread_Control * (*first_p)(Thread_queue_Control *); if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) 10fa3d: 83 78 34 01 cmpl $0x1,0x34(%eax) 10fa41: 74 0d je 10fa50 <_Thread_queue_First+0x1c> 10fa43: ba 6c 30 11 00 mov $0x11306c,%edx first_p = _Thread_queue_First_priority; else /* must be THREAD_QUEUE_DISCIPLINE_FIFO */ first_p = _Thread_queue_First_fifo; return (*first_p)( the_thread_queue ); 10fa48: 89 45 08 mov %eax,0x8(%ebp) } 10fa4b: c9 leave if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) first_p = _Thread_queue_First_priority; else /* must be THREAD_QUEUE_DISCIPLINE_FIFO */ first_p = _Thread_queue_First_fifo; return (*first_p)( the_thread_queue ); 10fa4c: ff e2 jmp *%edx 10fa4e: 66 90 xchg %ax,%ax <== NOT EXECUTED Thread_queue_Control *the_thread_queue ) { Thread_Control * (*first_p)(Thread_queue_Control *); if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) 10fa50: ba 5c fa 10 00 mov $0x10fa5c,%edx first_p = _Thread_queue_First_priority; else /* must be THREAD_QUEUE_DISCIPLINE_FIFO */ first_p = _Thread_queue_First_fifo; return (*first_p)( the_thread_queue ); 10fa55: 89 45 08 mov %eax,0x8(%ebp) } 10fa58: c9 leave if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) first_p = _Thread_queue_First_priority; else /* must be THREAD_QUEUE_DISCIPLINE_FIFO */ first_p = _Thread_queue_First_fifo; return (*first_p)( the_thread_queue ); 10fa59: ff e2 jmp *%edx 0011306c <_Thread_queue_First_fifo>: */ Thread_Control *_Thread_queue_First_fifo( Thread_queue_Control *the_thread_queue ) { 11306c: 55 push %ebp 11306d: 89 e5 mov %esp,%ebp 11306f: 8b 55 08 mov 0x8(%ebp),%edx */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 113072: 8b 02 mov (%edx),%eax */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 113074: 83 c2 04 add $0x4,%edx 113077: 39 d0 cmp %edx,%eax 113079: 74 05 je 113080 <_Thread_queue_First_fifo+0x14> if ( !_Chain_Is_empty( &the_thread_queue->Queues.Fifo ) ) return (Thread_Control *) the_thread_queue->Queues.Fifo.first; return NULL; } 11307b: c9 leave 11307c: c3 ret 11307d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 113080: 31 c0 xor %eax,%eax 113082: c9 leave 113083: c3 ret 0010dbf8 <_Thread_queue_Flush>: #else Thread_queue_Flush_callout remote_extract_callout __attribute__((unused)), #endif uint32_t status ) { 10dbf8: 55 push %ebp 10dbf9: 89 e5 mov %esp,%ebp 10dbfb: 56 push %esi 10dbfc: 53 push %ebx 10dbfd: 8b 5d 08 mov 0x8(%ebp),%ebx 10dc00: 8b 75 10 mov 0x10(%ebp),%esi Thread_Control *the_thread; while ( (the_thread = _Thread_queue_Dequeue( the_thread_queue )) ) { 10dc03: eb 06 jmp 10dc0b <_Thread_queue_Flush+0x13> <== ALWAYS TAKEN 10dc05: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) ( *remote_extract_callout )( the_thread ); else #endif the_thread->Wait.return_code = status; 10dc08: 89 70 34 mov %esi,0x34(%eax) uint32_t status ) { Thread_Control *the_thread; while ( (the_thread = _Thread_queue_Dequeue( the_thread_queue )) ) { 10dc0b: 83 ec 0c sub $0xc,%esp 10dc0e: 53 push %ebx 10dc0f: e8 94 fc ff ff call 10d8a8 <_Thread_queue_Dequeue> <== ALWAYS TAKEN 10dc14: 83 c4 10 add $0x10,%esp 10dc17: 85 c0 test %eax,%eax 10dc19: 75 ed jne 10dc08 <_Thread_queue_Flush+0x10> ( *remote_extract_callout )( the_thread ); else #endif the_thread->Wait.return_code = status; } } 10dc1b: 8d 65 f8 lea -0x8(%ebp),%esp 10dc1e: 5b pop %ebx 10dc1f: 5e pop %esi 10dc20: c9 leave 10dc21: c3 ret 0010dc24 <_Thread_queue_Initialize>: Thread_queue_Control *the_thread_queue, Thread_queue_Disciplines the_discipline, States_Control state, uint32_t timeout_status ) { 10dc24: 55 push %ebp 10dc25: 89 e5 mov %esp,%ebp 10dc27: 8b 45 08 mov 0x8(%ebp),%eax 10dc2a: 8b 55 0c mov 0xc(%ebp),%edx the_thread_queue->state = state; 10dc2d: 8b 4d 10 mov 0x10(%ebp),%ecx 10dc30: 89 48 38 mov %ecx,0x38(%eax) the_thread_queue->discipline = the_discipline; 10dc33: 89 50 34 mov %edx,0x34(%eax) the_thread_queue->timeout_status = timeout_status; 10dc36: 8b 4d 14 mov 0x14(%ebp),%ecx 10dc39: 89 48 3c mov %ecx,0x3c(%eax) the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 10dc3c: c7 40 30 00 00 00 00 movl $0x0,0x30(%eax) if ( the_discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) { 10dc43: 4a dec %edx 10dc44: 74 12 je 10dc58 <_Thread_queue_Initialize+0x34> */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 10dc46: 8d 50 04 lea 0x4(%eax),%edx 10dc49: 89 10 mov %edx,(%eax) the_chain->permanent_null = NULL; 10dc4b: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax) the_chain->last = _Chain_Head(the_chain); 10dc52: 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 ); } } 10dc55: c9 leave 10dc56: c3 ret 10dc57: 90 nop <== NOT EXECUTED * timeout_status - return on a timeout * * Output parameters: NONE */ void _Thread_queue_Initialize( 10dc58: 8d 48 30 lea 0x30(%eax),%ecx */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 10dc5b: 8d 50 04 lea 0x4(%eax),%edx 10dc5e: 89 10 mov %edx,(%eax) the_chain->permanent_null = NULL; 10dc60: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax) the_chain->last = _Chain_Head(the_chain); 10dc67: 89 40 08 mov %eax,0x8(%eax) 10dc6a: 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 ; 10dc6d: 39 c8 cmp %ecx,%eax 10dc6f: 75 ea jne 10dc5b <_Thread_queue_Initialize+0x37> _Chain_Initialize_empty( &the_thread_queue->Queues.Priority[index] ); } else { /* must be THREAD_QUEUE_DISCIPLINE_FIFO */ _Chain_Initialize_empty( &the_thread_queue->Queues.Fifo ); } } 10dc71: c9 leave 10dc72: c3 ret 001111c4 <_Thread_queue_Process_timeout>: #include void _Thread_queue_Process_timeout( Thread_Control *the_thread ) { 1111c4: 55 push %ebp 1111c5: 89 e5 mov %esp,%ebp 1111c7: 83 ec 08 sub $0x8,%esp 1111ca: 8b 45 08 mov 0x8(%ebp),%eax Thread_queue_Control *the_thread_queue = the_thread->Wait.queue; 1111cd: 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 && 1111d0: 8b 4a 30 mov 0x30(%edx),%ecx 1111d3: 85 c9 test %ecx,%ecx 1111d5: 74 08 je 1111df <_Thread_queue_Process_timeout+0x1b> 1111d7: 3b 05 98 74 12 00 cmp 0x127498,%eax 1111dd: 74 19 je 1111f8 <_Thread_queue_Process_timeout+0x34> if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SATISFIED ) { the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; } } else { the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; 1111df: 8b 52 3c mov 0x3c(%edx),%edx 1111e2: 89 50 34 mov %edx,0x34(%eax) _Thread_queue_Extract( the_thread->Wait.queue, the_thread ); 1111e5: 83 ec 08 sub $0x8,%esp 1111e8: 50 push %eax 1111e9: ff 70 44 pushl 0x44(%eax) 1111ec: e8 e7 fe ff ff call 1110d8 <_Thread_queue_Extract> <== ALWAYS TAKEN 1111f1: 83 c4 10 add $0x10,%esp } } 1111f4: c9 leave 1111f5: c3 ret 1111f6: 66 90 xchg %ax,%ax <== NOT EXECUTED * a timeout is not allowed to occur. */ if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SYNCHRONIZED && _Thread_Is_executing( the_thread ) ) { if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SATISFIED ) { 1111f8: 83 f9 03 cmp $0x3,%ecx 1111fb: 74 f7 je 1111f4 <_Thread_queue_Process_timeout+0x30> the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; 1111fd: 8b 4a 3c mov 0x3c(%edx),%ecx 111200: 89 48 34 mov %ecx,0x34(%eax) the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; 111203: c7 42 30 02 00 00 00 movl $0x2,0x30(%edx) } } else { the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; _Thread_queue_Extract( the_thread->Wait.queue, the_thread ); } } 11120a: c9 leave 11120b: c3 ret 0010dc74 <_Thread_queue_Requeue>: void _Thread_queue_Requeue( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { 10dc74: 55 push %ebp 10dc75: 89 e5 mov %esp,%ebp 10dc77: 57 push %edi 10dc78: 56 push %esi 10dc79: 53 push %ebx 10dc7a: 83 ec 1c sub $0x1c,%esp 10dc7d: 8b 75 08 mov 0x8(%ebp),%esi 10dc80: 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 ) 10dc83: 85 f6 test %esi,%esi 10dc85: 74 06 je 10dc8d <_Thread_queue_Requeue+0x19> <== 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 ) { 10dc87: 83 7e 34 01 cmpl $0x1,0x34(%esi) 10dc8b: 74 0b je 10dc98 <_Thread_queue_Requeue+0x24> <== NEVER TAKEN _Thread_queue_Extract_priority_helper( tq, the_thread, true ); (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); } _ISR_Enable( level ); } } 10dc8d: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 10dc90: 5b pop %ebx <== NOT EXECUTED 10dc91: 5e pop %esi <== NOT EXECUTED 10dc92: 5f pop %edi <== NOT EXECUTED 10dc93: c9 leave <== NOT EXECUTED 10dc94: c3 ret <== NOT EXECUTED 10dc95: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) { Thread_queue_Control *tq = the_thread_queue; ISR_Level level; ISR_Level level_ignored; _ISR_Disable( level ); 10dc98: 9c pushf 10dc99: fa cli 10dc9a: 5b pop %ebx if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 10dc9b: f7 47 10 e0 be 03 00 testl $0x3bee0,0x10(%edi) 10dca2: 75 0c jne 10dcb0 <_Thread_queue_Requeue+0x3c> <== NEVER TAKEN _Thread_queue_Enter_critical_section( tq ); _Thread_queue_Extract_priority_helper( tq, the_thread, true ); (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); } _ISR_Enable( level ); 10dca4: 53 push %ebx 10dca5: 9d popf } } 10dca6: 8d 65 f4 lea -0xc(%ebp),%esp 10dca9: 5b pop %ebx 10dcaa: 5e pop %esi 10dcab: 5f pop %edi 10dcac: c9 leave 10dcad: c3 ret 10dcae: 66 90 xchg %ax,%ax <== NOT EXECUTED 10dcb0: c7 46 30 01 00 00 00 movl $0x1,0x30(%esi) ISR_Level level_ignored; _ISR_Disable( level ); if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { _Thread_queue_Enter_critical_section( tq ); _Thread_queue_Extract_priority_helper( tq, the_thread, true ); 10dcb7: 50 push %eax 10dcb8: 6a 01 push $0x1 10dcba: 57 push %edi 10dcbb: 56 push %esi 10dcbc: e8 47 34 00 00 call 111108 <_Thread_queue_Extract_priority_helper> (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); 10dcc1: 83 c4 0c add $0xc,%esp 10dcc4: 8d 45 e4 lea -0x1c(%ebp),%eax 10dcc7: 50 push %eax 10dcc8: 57 push %edi 10dcc9: 56 push %esi 10dcca: e8 8d fd ff ff call 10da5c <_Thread_queue_Enqueue_priority> <== ALWAYS TAKEN 10dccf: 83 c4 10 add $0x10,%esp 10dcd2: eb d0 jmp 10dca4 <_Thread_queue_Requeue+0x30> <== ALWAYS TAKEN 0010dcd4 <_Thread_queue_Timeout>: void _Thread_queue_Timeout( Objects_Id id, void *ignored __attribute__((unused)) ) { 10dcd4: 55 push %ebp 10dcd5: 89 e5 mov %esp,%ebp 10dcd7: 83 ec 20 sub $0x20,%esp Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 10dcda: 8d 45 f4 lea -0xc(%ebp),%eax 10dcdd: 50 push %eax 10dcde: ff 75 08 pushl 0x8(%ebp) 10dce1: e8 f2 f7 ff ff call 10d4d8 <_Thread_Get> <== ALWAYS TAKEN switch ( location ) { 10dce6: 83 c4 10 add $0x10,%esp 10dce9: 8b 55 f4 mov -0xc(%ebp),%edx 10dcec: 85 d2 test %edx,%edx 10dcee: 75 17 jne 10dd07 <_Thread_queue_Timeout+0x33> <== ALWAYS TAKEN #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_queue_Process_timeout( the_thread ); 10dcf0: 83 ec 0c sub $0xc,%esp 10dcf3: 50 push %eax 10dcf4: e8 cb 34 00 00 call 1111c4 <_Thread_queue_Process_timeout> <== ALWAYS TAKEN */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 10dcf9: a1 d8 73 12 00 mov 0x1273d8,%eax 10dcfe: 48 dec %eax 10dcff: a3 d8 73 12 00 mov %eax,0x1273d8 10dd04: 83 c4 10 add $0x10,%esp _Thread_Unnest_dispatch(); break; } } 10dd07: c9 leave 10dd08: c3 ret 00118ac4 <_Timer_server_Body>: * @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) { 118ac4: 55 push %ebp 118ac5: 89 e5 mov %esp,%ebp 118ac7: 57 push %edi 118ac8: 56 push %esi 118ac9: 53 push %ebx 118aca: 83 ec 4c sub $0x4c,%esp 118acd: 8b 5d 08 mov 0x8(%ebp),%ebx 118ad0: 8d 45 e0 lea -0x20(%ebp),%eax 118ad3: 89 45 b4 mov %eax,-0x4c(%ebp) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 118ad6: 89 45 dc mov %eax,-0x24(%ebp) the_chain->permanent_null = NULL; 118ad9: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) the_chain->last = _Chain_Head(the_chain); 118ae0: 8d 4d dc lea -0x24(%ebp),%ecx 118ae3: 89 4d e4 mov %ecx,-0x1c(%ebp) */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 118ae6: 8d 7d d0 lea -0x30(%ebp),%edi 118ae9: 8d 45 d4 lea -0x2c(%ebp),%eax 118aec: 89 45 b0 mov %eax,-0x50(%ebp) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 118aef: 89 45 d0 mov %eax,-0x30(%ebp) the_chain->permanent_null = NULL; 118af2: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp) the_chain->last = _Chain_Head(the_chain); 118af9: 89 7d d8 mov %edi,-0x28(%ebp) */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 118afc: 8d 73 30 lea 0x30(%ebx),%esi /* * 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 ); 118aff: 8d 4b 68 lea 0x68(%ebx),%ecx 118b02: 89 4d c4 mov %ecx,-0x3c(%ebp) static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); 118b05: 8d 43 08 lea 0x8(%ebx),%eax 118b08: 89 45 bc mov %eax,-0x44(%ebp) static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 118b0b: 8d 53 40 lea 0x40(%ebx),%edx 118b0e: 89 55 c0 mov %edx,-0x40(%ebp) 118b11: 8d 76 00 lea 0x0(%esi),%esi { /* * Afterwards all timer inserts are directed to this chain and the interval * and TOD chains will be no more modified by other parties. */ ts->insert_chain = insert_chain; 118b14: 8d 4d dc lea -0x24(%ebp),%ecx 118b17: 89 4b 78 mov %ecx,0x78(%ebx) 118b1a: 66 90 xchg %ax,%ax static void _Timer_server_Process_interval_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot; 118b1c: a1 24 1d 14 00 mov 0x141d24,%eax /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; 118b21: 8b 53 3c mov 0x3c(%ebx),%edx watchdogs->last_snapshot = snapshot; 118b24: 89 43 3c mov %eax,0x3c(%ebx) _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 118b27: 51 push %ecx 118b28: 57 push %edi 118b29: 29 d0 sub %edx,%eax 118b2b: 50 push %eax 118b2c: 56 push %esi 118b2d: e8 7e 3c 00 00 call 11c7b0 <_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(); 118b32: a1 4c 1c 14 00 mov 0x141c4c,%eax Watchdog_Interval last_snapshot = watchdogs->last_snapshot; 118b37: 8b 53 74 mov 0x74(%ebx),%edx /* * Process the seconds chain. Start by checking that the Time * of Day (TOD) has not been set backwards. If it has then * we want to adjust the watchdogs->Chain to indicate this. */ if ( snapshot > last_snapshot ) { 118b3a: 83 c4 10 add $0x10,%esp 118b3d: 39 d0 cmp %edx,%eax 118b3f: 77 63 ja 118ba4 <_Timer_server_Body+0xe0> * TOD has been set forward. */ delta = snapshot - last_snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); } else if ( snapshot < last_snapshot ) { 118b41: 72 7d jb 118bc0 <_Timer_server_Body+0xfc> */ delta = last_snapshot - snapshot; _Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta ); } watchdogs->last_snapshot = snapshot; 118b43: 89 43 74 mov %eax,0x74(%ebx) 118b46: 66 90 xchg %ax,%ax } static void _Timer_server_Process_insertions( Timer_server_Control *ts ) { while ( true ) { Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain ); 118b48: 8b 43 78 mov 0x78(%ebx),%eax 118b4b: 83 ec 0c sub $0xc,%esp 118b4e: 50 push %eax 118b4f: e8 84 08 00 00 call 1193d8 <_Chain_Get> <== ALWAYS TAKEN if ( timer == NULL ) { 118b54: 83 c4 10 add $0x10,%esp 118b57: 85 c0 test %eax,%eax 118b59: 74 35 je 118b90 <_Timer_server_Body+0xcc> static void _Timer_server_Insert_timer( Timer_server_Control *ts, Timer_Control *timer ) { if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { 118b5b: 8b 50 38 mov 0x38(%eax),%edx 118b5e: 83 fa 01 cmp $0x1,%edx 118b61: 74 19 je 118b7c <_Timer_server_Body+0xb8> _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { 118b63: 83 fa 03 cmp $0x3,%edx 118b66: 75 e0 jne 118b48 <_Timer_server_Body+0x84> <== ALWAYS TAKEN _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 118b68: 83 ec 08 sub $0x8,%esp 118b6b: 83 c0 10 add $0x10,%eax 118b6e: 50 push %eax 118b6f: ff 75 c4 pushl -0x3c(%ebp) 118b72: e8 d1 3c 00 00 call 11c848 <_Watchdog_Insert> 118b77: 83 c4 10 add $0x10,%esp 118b7a: eb cc jmp 118b48 <_Timer_server_Body+0x84> <== ALWAYS TAKEN Timer_server_Control *ts, Timer_Control *timer ) { if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); 118b7c: 83 ec 08 sub $0x8,%esp 118b7f: 83 c0 10 add $0x10,%eax 118b82: 50 push %eax 118b83: 56 push %esi 118b84: e8 bf 3c 00 00 call 11c848 <_Watchdog_Insert> 118b89: 83 c4 10 add $0x10,%esp 118b8c: eb ba jmp 118b48 <_Timer_server_Body+0x84> <== ALWAYS TAKEN 118b8e: 66 90 xchg %ax,%ax <== NOT EXECUTED * of zero it will be processed in the next iteration of the timer server * body loop. */ _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); 118b90: 9c pushf 118b91: fa cli 118b92: 58 pop %eax if ( _Chain_Is_empty( insert_chain ) ) { 118b93: 8b 55 b4 mov -0x4c(%ebp),%edx 118b96: 3b 55 dc cmp -0x24(%ebp),%edx 118b99: 74 41 je 118bdc <_Timer_server_Body+0x118> ts->insert_chain = NULL; _ISR_Enable( level ); break; } else { _ISR_Enable( level ); 118b9b: 50 push %eax 118b9c: 9d popf 118b9d: e9 7a ff ff ff jmp 118b1c <_Timer_server_Body+0x58> <== ALWAYS TAKEN 118ba2: 66 90 xchg %ax,%ax <== NOT EXECUTED /* * This path is for normal forward movement and cases where the * TOD has been set forward. */ delta = snapshot - last_snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 118ba4: 51 push %ecx 118ba5: 57 push %edi 118ba6: 89 c1 mov %eax,%ecx 118ba8: 29 d1 sub %edx,%ecx 118baa: 51 push %ecx 118bab: ff 75 c4 pushl -0x3c(%ebp) 118bae: 89 45 b8 mov %eax,-0x48(%ebp) 118bb1: e8 fa 3b 00 00 call 11c7b0 <_Watchdog_Adjust_to_chain> 118bb6: 83 c4 10 add $0x10,%esp 118bb9: 8b 45 b8 mov -0x48(%ebp),%eax 118bbc: eb 85 jmp 118b43 <_Timer_server_Body+0x7f> <== ALWAYS TAKEN 118bbe: 66 90 xchg %ax,%ax <== NOT EXECUTED /* * The current TOD is before the last TOD which indicates that * TOD has been set backwards. */ delta = last_snapshot - snapshot; _Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta ); 118bc0: 51 push %ecx 118bc1: 29 c2 sub %eax,%edx 118bc3: 52 push %edx 118bc4: 6a 01 push $0x1 118bc6: ff 75 c4 pushl -0x3c(%ebp) 118bc9: 89 45 b8 mov %eax,-0x48(%ebp) 118bcc: e8 67 3b 00 00 call 11c738 <_Watchdog_Adjust> 118bd1: 83 c4 10 add $0x10,%esp 118bd4: 8b 45 b8 mov -0x48(%ebp),%eax 118bd7: e9 67 ff ff ff jmp 118b43 <_Timer_server_Body+0x7f> <== ALWAYS TAKEN */ _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); if ( _Chain_Is_empty( insert_chain ) ) { ts->insert_chain = NULL; 118bdc: c7 43 78 00 00 00 00 movl $0x0,0x78(%ebx) _ISR_Enable( level ); 118be3: 50 push %eax 118be4: 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 ) ) { 118be5: 8b 4d b0 mov -0x50(%ebp),%ecx 118be8: 3b 4d d0 cmp -0x30(%ebp),%ecx 118beb: 75 23 jne 118c10 <_Timer_server_Body+0x14c> 118bed: eb 33 jmp 118c22 <_Timer_server_Body+0x15e> <== ALWAYS TAKEN 118bef: 90 nop <== NOT EXECUTED { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; 118bf0: 8b 10 mov (%eax),%edx the_chain->first = new_first; 118bf2: 89 55 d0 mov %edx,-0x30(%ebp) new_first->previous = _Chain_Head(the_chain); 118bf5: 89 7a 04 mov %edi,0x4(%edx) * service routine may remove a watchdog from the chain. */ _ISR_Disable( level ); watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain ); if ( watchdog != NULL ) { watchdog->state = WATCHDOG_INACTIVE; 118bf8: c7 40 08 00 00 00 00 movl $0x0,0x8(%eax) _ISR_Enable( level ); 118bff: 51 push %ecx 118c00: 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 ); 118c01: 83 ec 08 sub $0x8,%esp 118c04: ff 70 24 pushl 0x24(%eax) 118c07: ff 70 20 pushl 0x20(%eax) 118c0a: ff 50 1c call *0x1c(%eax) } 118c0d: 83 c4 10 add $0x10,%esp /* * It is essential that interrupts are disable here since an interrupt * service routine may remove a watchdog from the chain. */ _ISR_Disable( level ); 118c10: 9c pushf 118c11: fa cli 118c12: 59 pop %ecx */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 118c13: 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)) 118c16: 39 45 b0 cmp %eax,-0x50(%ebp) 118c19: 75 d5 jne 118bf0 <_Timer_server_Body+0x12c> watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain ); if ( watchdog != NULL ) { watchdog->state = WATCHDOG_INACTIVE; _ISR_Enable( level ); } else { _ISR_Enable( level ); 118c1b: 51 push %ecx 118c1c: 9d popf 118c1d: e9 f2 fe ff ff jmp 118b14 <_Timer_server_Body+0x50> <== ALWAYS TAKEN * the active flag of the timer server is true. */ (*watchdog->routine)( watchdog->id, watchdog->user_data ); } } else { ts->active = false; 118c22: c6 43 7c 00 movb $0x0,0x7c(%ebx) 118c26: a1 b8 1b 14 00 mov 0x141bb8,%eax 118c2b: 40 inc %eax 118c2c: a3 b8 1b 14 00 mov %eax,0x141bb8 /* * Block until there is something to do. */ _Thread_Disable_dispatch(); _Thread_Set_state( ts->thread, STATES_DELAYING ); 118c31: 83 ec 08 sub $0x8,%esp 118c34: 6a 08 push $0x8 118c36: ff 33 pushl (%ebx) 118c38: e8 0b 33 00 00 call 11bf48 <_Thread_Set_state> _Timer_server_Reset_interval_system_watchdog( ts ); 118c3d: 89 d8 mov %ebx,%eax 118c3f: e8 e0 fd ff ff call 118a24 <_Timer_server_Reset_interval_system_watchdog> <== ALWAYS TAKEN _Timer_server_Reset_tod_system_watchdog( ts ); 118c44: 89 d8 mov %ebx,%eax 118c46: e8 29 fe ff ff call 118a74 <_Timer_server_Reset_tod_system_watchdog> <== ALWAYS TAKEN _Thread_Enable_dispatch(); 118c4b: e8 ec 28 00 00 call 11b53c <_Thread_Enable_dispatch> ts->active = true; 118c50: 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 ); 118c54: 58 pop %eax 118c55: ff 75 bc pushl -0x44(%ebp) 118c58: e8 23 3d 00 00 call 11c980 <_Watchdog_Remove> static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 118c5d: 59 pop %ecx 118c5e: ff 75 c0 pushl -0x40(%ebp) 118c61: e8 1a 3d 00 00 call 11c980 <_Watchdog_Remove> 118c66: 83 c4 10 add $0x10,%esp 118c69: e9 a6 fe ff ff jmp 118b14 <_Timer_server_Body+0x50> <== ALWAYS TAKEN 00118a24 <_Timer_server_Reset_interval_system_watchdog>: } static void _Timer_server_Reset_interval_system_watchdog( Timer_server_Control *ts ) { 118a24: 55 push %ebp 118a25: 89 e5 mov %esp,%ebp 118a27: 56 push %esi 118a28: 53 push %ebx 118a29: 89 c3 mov %eax,%ebx static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); 118a2b: 8d 70 08 lea 0x8(%eax),%esi 118a2e: 83 ec 0c sub $0xc,%esp 118a31: 56 push %esi 118a32: e8 49 3f 00 00 call 11c980 <_Watchdog_Remove> { ISR_Level level; _Timer_server_Stop_interval_system_watchdog( ts ); _ISR_Disable( level ); 118a37: 9c pushf 118a38: fa cli 118a39: 59 pop %ecx */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 118a3a: 8b 43 30 mov 0x30(%ebx),%eax */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 118a3d: 8d 53 34 lea 0x34(%ebx),%edx 118a40: 83 c4 10 add $0x10,%esp 118a43: 39 d0 cmp %edx,%eax 118a45: 74 21 je 118a68 <_Timer_server_Reset_interval_system_watchdog+0x44> if ( !_Chain_Is_empty( &ts->Interval_watchdogs.Chain ) ) { Watchdog_Interval delta_interval = _Watchdog_First( &ts->Interval_watchdogs.Chain )->delta_interval; 118a47: 8b 40 10 mov 0x10(%eax),%eax _ISR_Enable( level ); 118a4a: 51 push %ecx 118a4b: 9d popf Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 118a4c: 89 43 14 mov %eax,0x14(%ebx) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 118a4f: 83 ec 08 sub $0x8,%esp 118a52: 56 push %esi 118a53: 68 98 1c 14 00 push $0x141c98 118a58: e8 eb 3d 00 00 call 11c848 <_Watchdog_Insert> 118a5d: 83 c4 10 add $0x10,%esp delta_interval ); } else { _ISR_Enable( level ); } } 118a60: 8d 65 f8 lea -0x8(%ebp),%esp 118a63: 5b pop %ebx 118a64: 5e pop %esi 118a65: c9 leave 118a66: c3 ret 118a67: 90 nop <== NOT EXECUTED _Watchdog_Insert_ticks( &ts->Interval_watchdogs.System_watchdog, delta_interval ); } else { _ISR_Enable( level ); 118a68: 51 push %ecx 118a69: 9d popf } } 118a6a: 8d 65 f8 lea -0x8(%ebp),%esp 118a6d: 5b pop %ebx 118a6e: 5e pop %esi 118a6f: c9 leave 118a70: c3 ret 00118a74 <_Timer_server_Reset_tod_system_watchdog>: } static void _Timer_server_Reset_tod_system_watchdog( Timer_server_Control *ts ) { 118a74: 55 push %ebp 118a75: 89 e5 mov %esp,%ebp 118a77: 56 push %esi 118a78: 53 push %ebx 118a79: 89 c3 mov %eax,%ebx static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 118a7b: 8d 70 40 lea 0x40(%eax),%esi 118a7e: 83 ec 0c sub $0xc,%esp 118a81: 56 push %esi 118a82: e8 f9 3e 00 00 call 11c980 <_Watchdog_Remove> { ISR_Level level; _Timer_server_Stop_tod_system_watchdog( ts ); _ISR_Disable( level ); 118a87: 9c pushf 118a88: fa cli 118a89: 59 pop %ecx */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 118a8a: 8b 43 68 mov 0x68(%ebx),%eax */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 118a8d: 8d 53 6c lea 0x6c(%ebx),%edx 118a90: 83 c4 10 add $0x10,%esp 118a93: 39 d0 cmp %edx,%eax 118a95: 74 21 je 118ab8 <_Timer_server_Reset_tod_system_watchdog+0x44> if ( !_Chain_Is_empty( &ts->TOD_watchdogs.Chain ) ) { Watchdog_Interval delta_interval = _Watchdog_First( &ts->TOD_watchdogs.Chain )->delta_interval; 118a97: 8b 40 10 mov 0x10(%eax),%eax _ISR_Enable( level ); 118a9a: 51 push %ecx 118a9b: 9d popf Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 118a9c: 89 43 4c mov %eax,0x4c(%ebx) _Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog ); 118a9f: 83 ec 08 sub $0x8,%esp 118aa2: 56 push %esi 118aa3: 68 8c 1c 14 00 push $0x141c8c 118aa8: e8 9b 3d 00 00 call 11c848 <_Watchdog_Insert> 118aad: 83 c4 10 add $0x10,%esp delta_interval ); } else { _ISR_Enable( level ); } } 118ab0: 8d 65 f8 lea -0x8(%ebp),%esp 118ab3: 5b pop %ebx 118ab4: 5e pop %esi 118ab5: c9 leave 118ab6: c3 ret 118ab7: 90 nop <== NOT EXECUTED _Watchdog_Insert_seconds( &ts->TOD_watchdogs.System_watchdog, delta_interval ); } else { _ISR_Enable( level ); 118ab8: 51 push %ecx 118ab9: 9d popf } } 118aba: 8d 65 f8 lea -0x8(%ebp),%esp 118abd: 5b pop %ebx 118abe: 5e pop %esi 118abf: c9 leave 118ac0: c3 ret 00118c70 <_Timer_server_Schedule_operation_method>: static void _Timer_server_Schedule_operation_method( Timer_server_Control *ts, Timer_Control *timer ) { 118c70: 55 push %ebp 118c71: 89 e5 mov %esp,%ebp 118c73: 57 push %edi 118c74: 56 push %esi 118c75: 53 push %ebx 118c76: 83 ec 2c sub $0x2c,%esp 118c79: 8b 5d 08 mov 0x8(%ebp),%ebx 118c7c: 8b 45 0c mov 0xc(%ebp),%eax if ( ts->insert_chain == NULL ) { 118c7f: 8b 53 78 mov 0x78(%ebx),%edx 118c82: 85 d2 test %edx,%edx 118c84: 74 16 je 118c9c <_Timer_server_Schedule_operation_method+0x2c> * 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 ); 118c86: 8b 53 78 mov 0x78(%ebx),%edx 118c89: 89 45 0c mov %eax,0xc(%ebp) 118c8c: 89 55 08 mov %edx,0x8(%ebp) } } 118c8f: 8d 65 f4 lea -0xc(%ebp),%esp 118c92: 5b pop %ebx 118c93: 5e pop %esi 118c94: 5f pop %edi 118c95: 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 ); 118c96: e9 19 07 00 00 jmp 1193b4 <_Chain_Append> 118c9b: 90 nop <== NOT EXECUTED 118c9c: 8b 15 b8 1b 14 00 mov 0x141bb8,%edx 118ca2: 42 inc %edx 118ca3: 89 15 b8 1b 14 00 mov %edx,0x141bb8 * being inserted. This could result in an integer overflow. */ _Thread_Disable_dispatch(); if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { 118ca9: 8b 50 38 mov 0x38(%eax),%edx 118cac: 83 fa 01 cmp $0x1,%edx 118caf: 74 77 je 118d28 <_Timer_server_Schedule_operation_method+0xb8> _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); if ( !ts->active ) { _Timer_server_Reset_interval_system_watchdog( ts ); } } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { 118cb1: 83 fa 03 cmp $0x3,%edx 118cb4: 74 0e je 118cc4 <_Timer_server_Schedule_operation_method+0x54> * critical section. We have to use the protected chain methods because * we may be interrupted by a higher priority interrupt. */ _Chain_Append( ts->insert_chain, &timer->Object.Node ); } } 118cb6: 8d 65 f4 lea -0xc(%ebp),%esp 118cb9: 5b pop %ebx 118cba: 5e pop %esi 118cbb: 5f pop %edi 118cbc: c9 leave if ( !ts->active ) { _Timer_server_Reset_tod_system_watchdog( ts ); } } _Thread_Enable_dispatch(); 118cbd: e9 7a 28 00 00 jmp 11b53c <_Thread_Enable_dispatch> 118cc2: 66 90 xchg %ax,%ax <== NOT EXECUTED } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { /* * We have to advance the last known seconds value of the server and update * the watchdog chain accordingly. */ _ISR_Disable( level ); 118cc4: 9c pushf 118cc5: fa cli 118cc6: 8f 45 e4 popl -0x1c(%ebp) snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); 118cc9: 8b 0d 4c 1c 14 00 mov 0x141c4c,%ecx last_snapshot = ts->TOD_watchdogs.last_snapshot; 118ccf: 8b 73 74 mov 0x74(%ebx),%esi */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 118cd2: 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; 118cd5: 8d 7b 6c lea 0x6c(%ebx),%edi 118cd8: 39 fa cmp %edi,%edx 118cda: 74 22 je 118cfe <_Timer_server_Schedule_operation_method+0x8e> if ( !_Chain_Is_empty( &ts->TOD_watchdogs.Chain ) ) { first_watchdog = _Watchdog_First( &ts->TOD_watchdogs.Chain ); delta_interval = first_watchdog->delta_interval; 118cdc: 8b 7a 10 mov 0x10(%edx),%edi 118cdf: 89 7d d4 mov %edi,-0x2c(%ebp) if ( snapshot > last_snapshot ) { 118ce2: 39 f1 cmp %esi,%ecx 118ce4: 0f 86 9e 00 00 00 jbe 118d88 <_Timer_server_Schedule_operation_method+0x118> /* * We advanced in time. */ delta = snapshot - last_snapshot; 118cea: 89 cf mov %ecx,%edi 118cec: 29 f7 sub %esi,%edi 118cee: 89 fe mov %edi,%esi if (delta_interval > delta) { 118cf0: 39 7d d4 cmp %edi,-0x2c(%ebp) 118cf3: 0f 87 9b 00 00 00 ja 118d94 <_Timer_server_Schedule_operation_method+0x124> <== NEVER TAKEN 118cf9: 31 ff xor %edi,%edi <== NOT EXECUTED * Someone put us in the past. */ delta = last_snapshot - snapshot; delta_interval += delta; } first_watchdog->delta_interval = delta_interval; 118cfb: 89 7a 10 mov %edi,0x10(%edx) } ts->TOD_watchdogs.last_snapshot = snapshot; 118cfe: 89 4b 74 mov %ecx,0x74(%ebx) _ISR_Enable( level ); 118d01: ff 75 e4 pushl -0x1c(%ebp) 118d04: 9d popf _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 118d05: 83 ec 08 sub $0x8,%esp 118d08: 83 c0 10 add $0x10,%eax 118d0b: 50 push %eax 118d0c: 8d 43 68 lea 0x68(%ebx),%eax 118d0f: 50 push %eax 118d10: e8 33 3b 00 00 call 11c848 <_Watchdog_Insert> if ( !ts->active ) { 118d15: 8a 43 7c mov 0x7c(%ebx),%al 118d18: 83 c4 10 add $0x10,%esp 118d1b: 84 c0 test %al,%al 118d1d: 75 97 jne 118cb6 <_Timer_server_Schedule_operation_method+0x46> _Timer_server_Reset_tod_system_watchdog( ts ); 118d1f: 89 d8 mov %ebx,%eax 118d21: e8 4e fd ff ff call 118a74 <_Timer_server_Reset_tod_system_watchdog> <== ALWAYS TAKEN 118d26: eb 8e jmp 118cb6 <_Timer_server_Schedule_operation_method+0x46> <== ALWAYS TAKEN if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { /* * We have to advance the last known ticks value of the server and update * the watchdog chain accordingly. */ _ISR_Disable( level ); 118d28: 9c pushf 118d29: fa cli 118d2a: 8f 45 e4 popl -0x1c(%ebp) snapshot = _Watchdog_Ticks_since_boot; 118d2d: 8b 0d 24 1d 14 00 mov 0x141d24,%ecx last_snapshot = ts->Interval_watchdogs.last_snapshot; 118d33: 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)); 118d36: 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; 118d39: 8d 7b 34 lea 0x34(%ebx),%edi 118d3c: 39 fa cmp %edi,%edx 118d3e: 74 12 je 118d52 <_Timer_server_Schedule_operation_method+0xe2> first_watchdog = _Watchdog_First( &ts->Interval_watchdogs.Chain ); /* * We assume adequate unsigned arithmetic here. */ delta = snapshot - last_snapshot; 118d40: 89 cf mov %ecx,%edi 118d42: 29 f7 sub %esi,%edi 118d44: 89 fe mov %edi,%esi delta_interval = first_watchdog->delta_interval; 118d46: 8b 7a 10 mov 0x10(%edx),%edi if (delta_interval > delta) { 118d49: 39 fe cmp %edi,%esi 118d4b: 72 37 jb 118d84 <_Timer_server_Schedule_operation_method+0x114> 118d4d: 31 ff xor %edi,%edi delta_interval -= delta; } else { delta_interval = 0; } first_watchdog->delta_interval = delta_interval; 118d4f: 89 7a 10 mov %edi,0x10(%edx) } ts->Interval_watchdogs.last_snapshot = snapshot; 118d52: 89 4b 3c mov %ecx,0x3c(%ebx) _ISR_Enable( level ); 118d55: ff 75 e4 pushl -0x1c(%ebp) 118d58: 9d popf _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); 118d59: 83 ec 08 sub $0x8,%esp 118d5c: 83 c0 10 add $0x10,%eax 118d5f: 50 push %eax 118d60: 8d 43 30 lea 0x30(%ebx),%eax 118d63: 50 push %eax 118d64: e8 df 3a 00 00 call 11c848 <_Watchdog_Insert> if ( !ts->active ) { 118d69: 8a 43 7c mov 0x7c(%ebx),%al 118d6c: 83 c4 10 add $0x10,%esp 118d6f: 84 c0 test %al,%al 118d71: 0f 85 3f ff ff ff jne 118cb6 <_Timer_server_Schedule_operation_method+0x46> _Timer_server_Reset_interval_system_watchdog( ts ); 118d77: 89 d8 mov %ebx,%eax 118d79: e8 a6 fc ff ff call 118a24 <_Timer_server_Reset_interval_system_watchdog> <== ALWAYS TAKEN 118d7e: e9 33 ff ff ff jmp 118cb6 <_Timer_server_Schedule_operation_method+0x46> <== ALWAYS TAKEN 118d83: 90 nop <== NOT EXECUTED */ delta = snapshot - last_snapshot; delta_interval = first_watchdog->delta_interval; if (delta_interval > delta) { delta_interval -= delta; 118d84: 29 f7 sub %esi,%edi 118d86: eb c7 jmp 118d4f <_Timer_server_Schedule_operation_method+0xdf> <== ALWAYS TAKEN } } else { /* * Someone put us in the past. */ delta = last_snapshot - snapshot; 118d88: 8b 7d d4 mov -0x2c(%ebp),%edi 118d8b: 01 f7 add %esi,%edi delta_interval += delta; 118d8d: 29 cf sub %ecx,%edi 118d8f: e9 67 ff ff ff jmp 118cfb <_Timer_server_Schedule_operation_method+0x8b> <== ALWAYS TAKEN /* * We advanced in time. */ delta = snapshot - last_snapshot; if (delta_interval > delta) { delta_interval -= delta; 118d94: 8b 7d d4 mov -0x2c(%ebp),%edi 118d97: 29 f7 sub %esi,%edi 118d99: e9 5d ff ff ff jmp 118cfb <_Timer_server_Schedule_operation_method+0x8b> <== ALWAYS TAKEN 0010f9f8 <_Timespec_Divide>: const struct timespec *lhs, const struct timespec *rhs, uint32_t *ival_percentage, uint32_t *fval_percentage ) { 10f9f8: 55 push %ebp 10f9f9: 89 e5 mov %esp,%ebp 10f9fb: 57 push %edi 10f9fc: 56 push %esi 10f9fd: 53 push %ebx 10f9fe: 83 ec 2c sub $0x2c,%esp 10fa01: 8b 45 08 mov 0x8(%ebp),%eax 10fa04: 8b 5d 0c mov 0xc(%ebp),%ebx /* * For math simplicity just convert the timespec to nanoseconds * in a 64-bit integer. */ left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; 10fa07: 8b 10 mov (%eax),%edx 10fa09: 89 55 e0 mov %edx,-0x20(%ebp) left += lhs->tv_nsec; 10fa0c: 8b 78 04 mov 0x4(%eax),%edi right = rhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; 10fa0f: b9 00 ca 9a 3b mov $0x3b9aca00,%ecx 10fa14: 8b 03 mov (%ebx),%eax 10fa16: f7 e9 imul %ecx 10fa18: 89 45 d0 mov %eax,-0x30(%ebp) 10fa1b: 89 55 d4 mov %edx,-0x2c(%ebp) right += rhs->tv_nsec; 10fa1e: 8b 5b 04 mov 0x4(%ebx),%ebx 10fa21: 89 de mov %ebx,%esi 10fa23: c1 fe 1f sar $0x1f,%esi 10fa26: 01 5d d0 add %ebx,-0x30(%ebp) 10fa29: 11 75 d4 adc %esi,-0x2c(%ebp) if ( right == 0 ) { 10fa2c: 8b 55 d4 mov -0x2c(%ebp),%edx 10fa2f: 0b 55 d0 or -0x30(%ebp),%edx 10fa32: 74 7c je 10fab0 <_Timespec_Divide+0xb8> /* * For math simplicity just convert the timespec to nanoseconds * in a 64-bit integer. */ left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; 10fa34: 8b 45 e0 mov -0x20(%ebp),%eax 10fa37: f7 e9 imul %ecx 10fa39: 89 45 e0 mov %eax,-0x20(%ebp) 10fa3c: 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; 10fa3f: 89 fb mov %edi,%ebx 10fa41: c1 fb 1f sar $0x1f,%ebx 10fa44: 01 7d e0 add %edi,-0x20(%ebp) 10fa47: 11 5d e4 adc %ebx,-0x1c(%ebp) 10fa4a: 69 5d e4 a0 86 01 00 imul $0x186a0,-0x1c(%ebp),%ebx 10fa51: b9 a0 86 01 00 mov $0x186a0,%ecx 10fa56: 8b 45 e0 mov -0x20(%ebp),%eax 10fa59: f7 e1 mul %ecx 10fa5b: 89 45 e0 mov %eax,-0x20(%ebp) 10fa5e: 01 da add %ebx,%edx 10fa60: 89 55 e4 mov %edx,-0x1c(%ebp) 10fa63: ff 75 d4 pushl -0x2c(%ebp) 10fa66: ff 75 d0 pushl -0x30(%ebp) 10fa69: ff 75 e4 pushl -0x1c(%ebp) 10fa6c: ff 75 e0 pushl -0x20(%ebp) 10fa6f: e8 b8 0e 01 00 call 12092c <__udivdi3> 10fa74: 83 c4 10 add $0x10,%esp 10fa77: 89 c3 mov %eax,%ebx 10fa79: 89 d6 mov %edx,%esi *ival_percentage = answer / 1000; 10fa7b: 6a 00 push $0x0 10fa7d: 68 e8 03 00 00 push $0x3e8 10fa82: 52 push %edx 10fa83: 50 push %eax 10fa84: e8 a3 0e 01 00 call 12092c <__udivdi3> 10fa89: 83 c4 10 add $0x10,%esp 10fa8c: 8b 55 10 mov 0x10(%ebp),%edx 10fa8f: 89 02 mov %eax,(%edx) *fval_percentage = answer % 1000; 10fa91: 6a 00 push $0x0 10fa93: 68 e8 03 00 00 push $0x3e8 10fa98: 56 push %esi 10fa99: 53 push %ebx 10fa9a: e8 9d 0f 01 00 call 120a3c <__umoddi3> 10fa9f: 83 c4 10 add $0x10,%esp 10faa2: 8b 55 14 mov 0x14(%ebp),%edx 10faa5: 89 02 mov %eax,(%edx) } 10faa7: 8d 65 f4 lea -0xc(%ebp),%esp 10faaa: 5b pop %ebx 10faab: 5e pop %esi 10faac: 5f pop %edi 10faad: c9 leave 10faae: c3 ret 10faaf: 90 nop <== NOT EXECUTED left += lhs->tv_nsec; right = rhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; right += rhs->tv_nsec; if ( right == 0 ) { *ival_percentage = 0; 10fab0: 8b 45 10 mov 0x10(%ebp),%eax 10fab3: c7 00 00 00 00 00 movl $0x0,(%eax) *fval_percentage = 0; 10fab9: 8b 55 14 mov 0x14(%ebp),%edx 10fabc: c7 02 00 00 00 00 movl $0x0,(%edx) answer = (left * 100000) / right; *ival_percentage = answer / 1000; *fval_percentage = answer % 1000; } 10fac2: 8d 65 f4 lea -0xc(%ebp),%esp 10fac5: 5b pop %ebx 10fac6: 5e pop %esi 10fac7: 5f pop %edi 10fac8: c9 leave 10fac9: c3 ret 0012912c <_Timespec_Is_valid>: #include bool _Timespec_Is_valid( const struct timespec *time ) { 12912c: 55 push %ebp 12912d: 89 e5 mov %esp,%ebp 12912f: 8b 45 08 mov 0x8(%ebp),%eax if ( !time ) 129132: 85 c0 test %eax,%eax 129134: 74 1a je 129150 <_Timespec_Is_valid+0x24> return false; if ( time->tv_sec < 0 ) 129136: 8b 10 mov (%eax),%edx 129138: 85 d2 test %edx,%edx 12913a: 78 14 js 129150 <_Timespec_Is_valid+0x24> return false; if ( time->tv_nsec < 0 ) 12913c: 8b 40 04 mov 0x4(%eax),%eax 12913f: 85 c0 test %eax,%eax 129141: 78 0d js 129150 <_Timespec_Is_valid+0x24> #include #include #include bool _Timespec_Is_valid( 129143: 3d ff c9 9a 3b cmp $0x3b9ac9ff,%eax 129148: 0f 96 c0 setbe %al if ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) return false; return true; } 12914b: c9 leave 12914c: c3 ret 12914d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED #include #include #include bool _Timespec_Is_valid( 129150: 31 c0 xor %eax,%eax if ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) return false; return true; } 129152: c9 leave 129153: c3 ret 00111438 <_Timespec_To_ticks>: */ uint32_t _Timespec_To_ticks( const struct timespec *time ) { 111438: 55 push %ebp 111439: 89 e5 mov %esp,%ebp 11143b: 56 push %esi 11143c: 53 push %ebx 11143d: 8b 5d 08 mov 0x8(%ebp),%ebx uint32_t ticks; if ( (time->tv_sec == 0) && (time->tv_nsec == 0) ) 111440: 8b 33 mov (%ebx),%esi 111442: 85 f6 test %esi,%esi 111444: 75 07 jne 11144d <_Timespec_To_ticks+0x15> 111446: 8b 43 04 mov 0x4(%ebx),%eax 111449: 85 c0 test %eax,%eax 11144b: 74 37 je 111484 <_Timespec_To_ticks+0x4c> return 0; ticks = time->tv_sec * TOD_TICKS_PER_SECOND; 11144d: e8 96 18 00 00 call 112ce8 111452: 89 c1 mov %eax,%ecx 111454: 0f af ce imul %esi,%ecx ticks += time->tv_nsec / rtems_configuration_get_nanoseconds_per_tick(); 111457: a1 2c 32 12 00 mov 0x12322c,%eax 11145c: 8d 04 80 lea (%eax,%eax,4),%eax 11145f: 8d 04 80 lea (%eax,%eax,4),%eax 111462: 8d 34 80 lea (%eax,%eax,4),%esi 111465: c1 e6 03 shl $0x3,%esi 111468: 8b 43 04 mov 0x4(%ebx),%eax 11146b: 31 d2 xor %edx,%edx 11146d: f7 f6 div %esi if (ticks) 11146f: 01 c8 add %ecx,%eax 111471: 74 05 je 111478 <_Timespec_To_ticks+0x40> return ticks; return 1; } 111473: 5b pop %ebx 111474: 5e pop %esi 111475: c9 leave 111476: c3 ret 111477: 90 nop <== NOT EXECUTED ticks = time->tv_sec * TOD_TICKS_PER_SECOND; ticks += time->tv_nsec / rtems_configuration_get_nanoseconds_per_tick(); if (ticks) 111478: b8 01 00 00 00 mov $0x1,%eax return ticks; return 1; } 11147d: 5b pop %ebx 11147e: 5e pop %esi 11147f: c9 leave 111480: c3 ret 111481: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED const struct timespec *time ) { uint32_t ticks; if ( (time->tv_sec == 0) && (time->tv_nsec == 0) ) 111484: 31 c0 xor %eax,%eax if (ticks) return ticks; return 1; } 111486: 5b pop %ebx 111487: 5e pop %esi 111488: c9 leave 111489: c3 ret 0010e2a8 <_User_extensions_Fatal>: void _User_extensions_Fatal ( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { 10e2a8: 55 push %ebp 10e2a9: 89 e5 mov %esp,%ebp 10e2ab: 57 push %edi 10e2ac: 56 push %esi 10e2ad: 53 push %ebx 10e2ae: 83 ec 1c sub $0x1c,%esp 10e2b1: 8b 75 08 mov 0x8(%ebp),%esi 10e2b4: 8b 7d 10 mov 0x10(%ebp),%edi 10e2b7: 8a 45 0c mov 0xc(%ebp),%al Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 10e2ba: 8b 1d 34 76 12 00 mov 0x127634,%ebx 10e2c0: 81 fb 2c 76 12 00 cmp $0x12762c,%ebx 10e2c6: 74 25 je 10e2ed <_User_extensions_Fatal+0x45> <== ALWAYS TAKEN the_node = the_node->previous ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.fatal != NULL ) (*the_extension->Callouts.fatal)( the_source, is_internal, the_error ); 10e2c8: 0f b6 c0 movzbl %al,%eax 10e2cb: 89 45 e4 mov %eax,-0x1c(%ebp) 10e2ce: 66 90 xchg %ax,%ax !_Chain_Is_head( &_User_extensions_List, the_node ) ; the_node = the_node->previous ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.fatal != NULL ) 10e2d0: 8b 43 30 mov 0x30(%ebx),%eax 10e2d3: 85 c0 test %eax,%eax 10e2d5: 74 0b je 10e2e2 <_User_extensions_Fatal+0x3a> (*the_extension->Callouts.fatal)( the_source, is_internal, the_error ); 10e2d7: 52 push %edx 10e2d8: 57 push %edi 10e2d9: ff 75 e4 pushl -0x1c(%ebp) 10e2dc: 56 push %esi 10e2dd: ff d0 call *%eax 10e2df: 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 ) { 10e2e2: 8b 5b 04 mov 0x4(%ebx),%ebx ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 10e2e5: 81 fb 2c 76 12 00 cmp $0x12762c,%ebx 10e2eb: 75 e3 jne 10e2d0 <_User_extensions_Fatal+0x28> the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.fatal != NULL ) (*the_extension->Callouts.fatal)( the_source, is_internal, the_error ); } } 10e2ed: 8d 65 f4 lea -0xc(%ebp),%esp 10e2f0: 5b pop %ebx 10e2f1: 5e pop %esi 10e2f2: 5f pop %edi 10e2f3: c9 leave 10e2f4: c3 ret 0010e16c <_User_extensions_Handler_initialization>: #include #include #include void _User_extensions_Handler_initialization(void) { 10e16c: 55 push %ebp 10e16d: 89 e5 mov %esp,%ebp 10e16f: 57 push %edi 10e170: 56 push %esi 10e171: 53 push %ebx 10e172: 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; 10e175: a1 58 32 12 00 mov 0x123258,%eax 10e17a: 89 45 dc mov %eax,-0x24(%ebp) initial_extensions = Configuration.User_extension_table; 10e17d: 8b 35 5c 32 12 00 mov 0x12325c,%esi */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 10e183: c7 05 2c 76 12 00 30 movl $0x127630,0x12762c 10e18a: 76 12 00 the_chain->permanent_null = NULL; 10e18d: c7 05 30 76 12 00 00 movl $0x0,0x127630 10e194: 00 00 00 the_chain->last = _Chain_Head(the_chain); 10e197: c7 05 34 76 12 00 2c movl $0x12762c,0x127634 10e19e: 76 12 00 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 10e1a1: c7 05 dc 73 12 00 e0 movl $0x1273e0,0x1273dc 10e1a8: 73 12 00 the_chain->permanent_null = NULL; 10e1ab: c7 05 e0 73 12 00 00 movl $0x0,0x1273e0 10e1b2: 00 00 00 the_chain->last = _Chain_Head(the_chain); 10e1b5: c7 05 e4 73 12 00 dc movl $0x1273dc,0x1273e4 10e1bc: 73 12 00 _Chain_Initialize_empty( &_User_extensions_List ); _Chain_Initialize_empty( &_User_extensions_Switches_list ); if ( initial_extensions ) { 10e1bf: 85 f6 test %esi,%esi 10e1c1: 74 64 je 10e227 <_User_extensions_Handler_initialization+0xbb> extension = (User_extensions_Control *) 10e1c3: 89 c2 mov %eax,%edx 10e1c5: 8d 04 40 lea (%eax,%eax,2),%eax 10e1c8: 8d 0c 82 lea (%edx,%eax,4),%ecx 10e1cb: c1 e1 02 shl $0x2,%ecx 10e1ce: 83 ec 0c sub $0xc,%esp 10e1d1: 51 push %ecx 10e1d2: 89 4d d8 mov %ecx,-0x28(%ebp) 10e1d5: e8 36 04 00 00 call 10e610 <_Workspace_Allocate_or_fatal_error> <== ALWAYS TAKEN 10e1da: 89 c3 mov %eax,%ebx _Workspace_Allocate_or_fatal_error( number_of_extensions * sizeof( User_extensions_Control ) ); memset ( 10e1dc: 31 c0 xor %eax,%eax 10e1de: 8b 4d d8 mov -0x28(%ebp),%ecx 10e1e1: 89 df mov %ebx,%edi 10e1e3: f3 aa rep stos %al,%es:(%edi) extension, 0, number_of_extensions * sizeof( User_extensions_Control ) ); for ( i = 0 ; i < number_of_extensions ; i++ ) { 10e1e5: 83 c4 10 add $0x10,%esp 10e1e8: 8b 45 dc mov -0x24(%ebp),%eax 10e1eb: 85 c0 test %eax,%eax 10e1ed: 74 38 je 10e227 <_User_extensions_Handler_initialization+0xbb> <== ALWAYS TAKEN 10e1ef: 89 75 e4 mov %esi,-0x1c(%ebp) 10e1f2: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) 10e1f9: 8d 76 00 lea 0x0(%esi),%esi RTEMS_INLINE_ROUTINE void _User_extensions_Add_set_with_table( User_extensions_Control *extension, const User_extensions_Table *extension_table ) { extension->Callouts = *extension_table; 10e1fc: 8d 7b 14 lea 0x14(%ebx),%edi 10e1ff: 8b 75 e4 mov -0x1c(%ebp),%esi 10e202: b9 08 00 00 00 mov $0x8,%ecx 10e207: f3 a5 rep movsl %ds:(%esi),%es:(%edi) _User_extensions_Add_set( extension ); 10e209: 83 ec 0c sub $0xc,%esp 10e20c: 53 push %ebx 10e20d: e8 7a 32 00 00 call 11148c <_User_extensions_Add_set> <== ALWAYS TAKEN _User_extensions_Add_set_with_table (extension, &initial_extensions[i]); extension++; 10e212: 83 c3 34 add $0x34,%ebx extension, 0, number_of_extensions * sizeof( User_extensions_Control ) ); for ( i = 0 ; i < number_of_extensions ; i++ ) { 10e215: ff 45 e0 incl -0x20(%ebp) 10e218: 83 45 e4 20 addl $0x20,-0x1c(%ebp) 10e21c: 83 c4 10 add $0x10,%esp 10e21f: 8b 45 e0 mov -0x20(%ebp),%eax 10e222: 39 45 dc cmp %eax,-0x24(%ebp) 10e225: 77 d5 ja 10e1fc <_User_extensions_Handler_initialization+0x90> _User_extensions_Add_set_with_table (extension, &initial_extensions[i]); extension++; } } } 10e227: 8d 65 f4 lea -0xc(%ebp),%esp 10e22a: 5b pop %ebx 10e22b: 5e pop %esi 10e22c: 5f pop %edi 10e22d: c9 leave 10e22e: c3 ret 00113008 <_User_extensions_Remove_set>: #include void _User_extensions_Remove_set ( User_extensions_Control *the_extension ) { 113008: 55 push %ebp 113009: 89 e5 mov %esp,%ebp 11300b: 53 push %ebx 11300c: 83 ec 10 sub $0x10,%esp 11300f: 8b 5d 08 mov 0x8(%ebp),%ebx _Chain_Extract( &the_extension->Node ); 113012: 53 push %ebx 113013: e8 c0 4f 00 00 call 117fd8 <_Chain_Extract> /* * If a switch handler is present, remove it. */ if ( the_extension->Callouts.thread_switch != NULL ) 113018: 83 c4 10 add $0x10,%esp 11301b: 8b 43 24 mov 0x24(%ebx),%eax 11301e: 85 c0 test %eax,%eax 113020: 74 12 je 113034 <_User_extensions_Remove_set+0x2c> _Chain_Extract( &the_extension->Switch.Node ); 113022: 83 c3 08 add $0x8,%ebx 113025: 89 5d 08 mov %ebx,0x8(%ebp) } 113028: 8b 5d fc mov -0x4(%ebp),%ebx 11302b: c9 leave /* * If a switch handler is present, remove it. */ if ( the_extension->Callouts.thread_switch != NULL ) _Chain_Extract( &the_extension->Switch.Node ); 11302c: e9 a7 4f 00 00 jmp 117fd8 <_Chain_Extract> 113031: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED } 113034: 8b 5d fc mov -0x4(%ebp),%ebx 113037: c9 leave 113038: c3 ret 0010e230 <_User_extensions_Thread_begin>: #include void _User_extensions_Thread_begin ( Thread_Control *executing ) { 10e230: 55 push %ebp 10e231: 89 e5 mov %esp,%ebp 10e233: 56 push %esi 10e234: 53 push %ebx 10e235: 8b 75 08 mov 0x8(%ebp),%esi Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 10e238: 8b 1d 2c 76 12 00 mov 0x12762c,%ebx 10e23e: 81 fb 30 76 12 00 cmp $0x127630,%ebx 10e244: 74 1c je 10e262 <_User_extensions_Thread_begin+0x32> <== ALWAYS TAKEN 10e246: 66 90 xchg %ax,%ax !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_begin != NULL ) 10e248: 8b 43 28 mov 0x28(%ebx),%eax 10e24b: 85 c0 test %eax,%eax 10e24d: 74 09 je 10e258 <_User_extensions_Thread_begin+0x28> (*the_extension->Callouts.thread_begin)( executing ); 10e24f: 83 ec 0c sub $0xc,%esp 10e252: 56 push %esi 10e253: ff d0 call *%eax 10e255: 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 ) { 10e258: 8b 1b mov (%ebx),%ebx ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 10e25a: 81 fb 30 76 12 00 cmp $0x127630,%ebx 10e260: 75 e6 jne 10e248 <_User_extensions_Thread_begin+0x18> the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_begin != NULL ) (*the_extension->Callouts.thread_begin)( executing ); } } 10e262: 8d 65 f8 lea -0x8(%ebp),%esp 10e265: 5b pop %ebx 10e266: 5e pop %esi 10e267: c9 leave 10e268: c3 ret 0010e2f8 <_User_extensions_Thread_create>: #include bool _User_extensions_Thread_create ( Thread_Control *the_thread ) { 10e2f8: 55 push %ebp 10e2f9: 89 e5 mov %esp,%ebp 10e2fb: 56 push %esi 10e2fc: 53 push %ebx 10e2fd: 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 ; 10e300: 8b 1d 2c 76 12 00 mov 0x12762c,%ebx 10e306: 81 fb 30 76 12 00 cmp $0x127630,%ebx 10e30c: 74 26 je 10e334 <_User_extensions_Thread_create+0x3c> <== ALWAYS TAKEN 10e30e: 66 90 xchg %ax,%ax !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_create != NULL ) { 10e310: 8b 43 14 mov 0x14(%ebx),%eax 10e313: 85 c0 test %eax,%eax 10e315: 74 13 je 10e32a <_User_extensions_Thread_create+0x32> status = (*the_extension->Callouts.thread_create)( 10e317: 83 ec 08 sub $0x8,%esp 10e31a: 56 push %esi 10e31b: ff 35 98 74 12 00 pushl 0x127498 10e321: ff d0 call *%eax _Thread_Executing, the_thread ); if ( !status ) 10e323: 83 c4 10 add $0x10,%esp 10e326: 84 c0 test %al,%al 10e328: 74 0c je 10e336 <_User_extensions_Thread_create+0x3e> 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 ) { 10e32a: 8b 1b mov (%ebx),%ebx { Chain_Node *the_node; User_extensions_Control *the_extension; bool status; for ( the_node = _User_extensions_List.first ; 10e32c: 81 fb 30 76 12 00 cmp $0x127630,%ebx 10e332: 75 dc jne 10e310 <_User_extensions_Thread_create+0x18> 10e334: b0 01 mov $0x1,%al return false; } } return true; } 10e336: 8d 65 f8 lea -0x8(%ebp),%esp 10e339: 5b pop %ebx 10e33a: 5e pop %esi 10e33b: c9 leave 10e33c: c3 ret 0010e340 <_User_extensions_Thread_delete>: #include void _User_extensions_Thread_delete ( Thread_Control *the_thread ) { 10e340: 55 push %ebp 10e341: 89 e5 mov %esp,%ebp 10e343: 56 push %esi 10e344: 53 push %ebx 10e345: 8b 75 08 mov 0x8(%ebp),%esi Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 10e348: 8b 1d 34 76 12 00 mov 0x127634,%ebx 10e34e: 81 fb 2c 76 12 00 cmp $0x12762c,%ebx 10e354: 74 23 je 10e379 <_User_extensions_Thread_delete+0x39> <== ALWAYS TAKEN 10e356: 66 90 xchg %ax,%ax !_Chain_Is_head( &_User_extensions_List, the_node ) ; the_node = the_node->previous ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_delete != NULL ) 10e358: 8b 43 20 mov 0x20(%ebx),%eax 10e35b: 85 c0 test %eax,%eax 10e35d: 74 0f je 10e36e <_User_extensions_Thread_delete+0x2e> (*the_extension->Callouts.thread_delete)( 10e35f: 83 ec 08 sub $0x8,%esp 10e362: 56 push %esi 10e363: ff 35 98 74 12 00 pushl 0x127498 10e369: ff d0 call *%eax 10e36b: 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 ) { 10e36e: 8b 5b 04 mov 0x4(%ebx),%ebx ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 10e371: 81 fb 2c 76 12 00 cmp $0x12762c,%ebx 10e377: 75 df jne 10e358 <_User_extensions_Thread_delete+0x18> (*the_extension->Callouts.thread_delete)( _Thread_Executing, the_thread ); } } 10e379: 8d 65 f8 lea -0x8(%ebp),%esp 10e37c: 5b pop %ebx 10e37d: 5e pop %esi 10e37e: c9 leave 10e37f: c3 ret 0010e26c <_User_extensions_Thread_exitted>: void _User_extensions_Thread_exitted ( Thread_Control *executing ) { 10e26c: 55 push %ebp 10e26d: 89 e5 mov %esp,%ebp 10e26f: 56 push %esi 10e270: 53 push %ebx 10e271: 8b 75 08 mov 0x8(%ebp),%esi Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 10e274: 8b 1d 34 76 12 00 mov 0x127634,%ebx 10e27a: 81 fb 2c 76 12 00 cmp $0x12762c,%ebx 10e280: 74 1d je 10e29f <_User_extensions_Thread_exitted+0x33> <== ALWAYS TAKEN 10e282: 66 90 xchg %ax,%ax !_Chain_Is_head( &_User_extensions_List, the_node ) ; the_node = the_node->previous ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_exitted != NULL ) 10e284: 8b 43 2c mov 0x2c(%ebx),%eax 10e287: 85 c0 test %eax,%eax 10e289: 74 09 je 10e294 <_User_extensions_Thread_exitted+0x28> (*the_extension->Callouts.thread_exitted)( executing ); 10e28b: 83 ec 0c sub $0xc,%esp 10e28e: 56 push %esi 10e28f: ff d0 call *%eax 10e291: 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 ) { 10e294: 8b 5b 04 mov 0x4(%ebx),%ebx ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 10e297: 81 fb 2c 76 12 00 cmp $0x12762c,%ebx 10e29d: 75 e5 jne 10e284 <_User_extensions_Thread_exitted+0x18> the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_exitted != NULL ) (*the_extension->Callouts.thread_exitted)( executing ); } } 10e29f: 8d 65 f8 lea -0x8(%ebp),%esp 10e2a2: 5b pop %ebx 10e2a3: 5e pop %esi 10e2a4: c9 leave 10e2a5: c3 ret 0010eee4 <_User_extensions_Thread_restart>: #include void _User_extensions_Thread_restart ( Thread_Control *the_thread ) { 10eee4: 55 push %ebp 10eee5: 89 e5 mov %esp,%ebp 10eee7: 56 push %esi 10eee8: 53 push %ebx 10eee9: 8b 75 08 mov 0x8(%ebp),%esi Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 10eeec: 8b 1d ec 95 12 00 mov 0x1295ec,%ebx 10eef2: 81 fb f0 95 12 00 cmp $0x1295f0,%ebx 10eef8: 74 22 je 10ef1c <_User_extensions_Thread_restart+0x38> <== ALWAYS TAKEN 10eefa: 66 90 xchg %ax,%ax !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_restart != NULL ) 10eefc: 8b 43 1c mov 0x1c(%ebx),%eax 10eeff: 85 c0 test %eax,%eax 10ef01: 74 0f je 10ef12 <_User_extensions_Thread_restart+0x2e> (*the_extension->Callouts.thread_restart)( 10ef03: 83 ec 08 sub $0x8,%esp 10ef06: 56 push %esi 10ef07: ff 35 58 94 12 00 pushl 0x129458 10ef0d: ff d0 call *%eax 10ef0f: 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 ) { 10ef12: 8b 1b mov (%ebx),%ebx ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 10ef14: 81 fb f0 95 12 00 cmp $0x1295f0,%ebx 10ef1a: 75 e0 jne 10eefc <_User_extensions_Thread_restart+0x18> (*the_extension->Callouts.thread_restart)( _Thread_Executing, the_thread ); } } 10ef1c: 8d 65 f8 lea -0x8(%ebp),%esp 10ef1f: 5b pop %ebx 10ef20: 5e pop %esi 10ef21: c9 leave 10ef22: c3 ret 0010e380 <_User_extensions_Thread_start>: #include void _User_extensions_Thread_start ( Thread_Control *the_thread ) { 10e380: 55 push %ebp 10e381: 89 e5 mov %esp,%ebp 10e383: 56 push %esi 10e384: 53 push %ebx 10e385: 8b 75 08 mov 0x8(%ebp),%esi Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 10e388: 8b 1d 2c 76 12 00 mov 0x12762c,%ebx 10e38e: 81 fb 30 76 12 00 cmp $0x127630,%ebx 10e394: 74 22 je 10e3b8 <_User_extensions_Thread_start+0x38> <== ALWAYS TAKEN 10e396: 66 90 xchg %ax,%ax !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_start != NULL ) 10e398: 8b 43 18 mov 0x18(%ebx),%eax 10e39b: 85 c0 test %eax,%eax 10e39d: 74 0f je 10e3ae <_User_extensions_Thread_start+0x2e> (*the_extension->Callouts.thread_start)( 10e39f: 83 ec 08 sub $0x8,%esp 10e3a2: 56 push %esi 10e3a3: ff 35 98 74 12 00 pushl 0x127498 10e3a9: ff d0 call *%eax 10e3ab: 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 ) { 10e3ae: 8b 1b mov (%ebx),%ebx ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 10e3b0: 81 fb 30 76 12 00 cmp $0x127630,%ebx 10e3b6: 75 e0 jne 10e398 <_User_extensions_Thread_start+0x18> (*the_extension->Callouts.thread_start)( _Thread_Executing, the_thread ); } } 10e3b8: 8d 65 f8 lea -0x8(%ebp),%esp 10e3bb: 5b pop %ebx 10e3bc: 5e pop %esi 10e3bd: c9 leave 10e3be: c3 ret 0010e3c0 <_User_extensions_Thread_switch>: void _User_extensions_Thread_switch ( Thread_Control *executing, Thread_Control *heir ) { 10e3c0: 55 push %ebp 10e3c1: 89 e5 mov %esp,%ebp 10e3c3: 57 push %edi 10e3c4: 56 push %esi 10e3c5: 53 push %ebx 10e3c6: 83 ec 0c sub $0xc,%esp 10e3c9: 8b 7d 08 mov 0x8(%ebp),%edi 10e3cc: 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 ; 10e3cf: 8b 1d dc 73 12 00 mov 0x1273dc,%ebx 10e3d5: 81 fb e0 73 12 00 cmp $0x1273e0,%ebx 10e3db: 74 18 je 10e3f5 <_User_extensions_Thread_switch+0x35> <== ALWAYS TAKEN 10e3dd: 8d 76 00 lea 0x0(%esi),%esi !_Chain_Is_tail( &_User_extensions_Switches_list, the_node ) ; the_node = the_node->next ) { the_extension_switch = (User_extensions_Switch_control *) the_node; (*the_extension_switch->thread_switch)( executing, heir ); 10e3e0: 83 ec 08 sub $0x8,%esp 10e3e3: 56 push %esi 10e3e4: 57 push %edi 10e3e5: 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 ) { 10e3e8: 8b 1b mov (%ebx),%ebx ) { Chain_Node *the_node; User_extensions_Switch_control *the_extension_switch; for ( the_node = _User_extensions_Switches_list.first ; 10e3ea: 83 c4 10 add $0x10,%esp 10e3ed: 81 fb e0 73 12 00 cmp $0x1273e0,%ebx 10e3f3: 75 eb jne 10e3e0 <_User_extensions_Thread_switch+0x20> the_extension_switch = (User_extensions_Switch_control *) the_node; (*the_extension_switch->thread_switch)( executing, heir ); } } 10e3f5: 8d 65 f4 lea -0xc(%ebp),%esp 10e3f8: 5b pop %ebx 10e3f9: 5e pop %esi 10e3fa: 5f pop %edi 10e3fb: c9 leave 10e3fc: c3 ret 0010fdd8 <_Watchdog_Adjust>: void _Watchdog_Adjust( Chain_Control *header, Watchdog_Adjust_directions direction, Watchdog_Interval units ) { 10fdd8: 55 push %ebp 10fdd9: 89 e5 mov %esp,%ebp 10fddb: 57 push %edi 10fddc: 56 push %esi 10fddd: 53 push %ebx 10fdde: 83 ec 1c sub $0x1c,%esp 10fde1: 8b 75 08 mov 0x8(%ebp),%esi 10fde4: 8b 4d 0c mov 0xc(%ebp),%ecx 10fde7: 8b 5d 10 mov 0x10(%ebp),%ebx ISR_Level level; _ISR_Disable( level ); 10fdea: 9c pushf 10fdeb: fa cli 10fdec: 58 pop %eax */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 10fded: 8b 16 mov (%esi),%edx */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10fdef: 8d 7e 04 lea 0x4(%esi),%edi 10fdf2: 89 7d e4 mov %edi,-0x1c(%ebp) * hence the compiler must not assume *header to remain * unmodified across that call. * * Till Straumann, 7/2003 */ if ( !_Chain_Is_empty( header ) ) { 10fdf5: 39 fa cmp %edi,%edx 10fdf7: 74 3d je 10fe36 <_Watchdog_Adjust+0x5e> switch ( direction ) { 10fdf9: 85 c9 test %ecx,%ecx 10fdfb: 75 43 jne 10fe40 <_Watchdog_Adjust+0x68> case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { 10fdfd: 85 db test %ebx,%ebx 10fdff: 74 35 je 10fe36 <_Watchdog_Adjust+0x5e> <== ALWAYS TAKEN if ( units < _Watchdog_First( header )->delta_interval ) { 10fe01: 8b 7a 10 mov 0x10(%edx),%edi 10fe04: 39 fb cmp %edi,%ebx 10fe06: 73 0f jae 10fe17 <_Watchdog_Adjust+0x3f> <== NEVER TAKEN 10fe08: eb 3e jmp 10fe48 <_Watchdog_Adjust+0x70> <== NOT EXECUTED 10fe0a: 66 90 xchg %ax,%ax <== NOT EXECUTED switch ( direction ) { case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { 10fe0c: 29 fb sub %edi,%ebx 10fe0e: 74 26 je 10fe36 <_Watchdog_Adjust+0x5e> <== ALWAYS TAKEN if ( units < _Watchdog_First( header )->delta_interval ) { 10fe10: 8b 7a 10 mov 0x10(%edx),%edi 10fe13: 39 df cmp %ebx,%edi 10fe15: 77 31 ja 10fe48 <_Watchdog_Adjust+0x70> _Watchdog_First( header )->delta_interval -= units; break; } else { units -= _Watchdog_First( header )->delta_interval; _Watchdog_First( header )->delta_interval = 1; 10fe17: c7 42 10 01 00 00 00 movl $0x1,0x10(%edx) _ISR_Enable( level ); 10fe1e: 50 push %eax 10fe1f: 9d popf _Watchdog_Tickle( header ); 10fe20: 83 ec 0c sub $0xc,%esp 10fe23: 56 push %esi 10fe24: e8 cb 01 00 00 call 10fff4 <_Watchdog_Tickle> <== ALWAYS TAKEN _ISR_Disable( level ); 10fe29: 9c pushf 10fe2a: fa cli 10fe2b: 58 pop %eax */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 10fe2c: 8b 16 mov (%esi),%edx if ( _Chain_Is_empty( header ) ) 10fe2e: 83 c4 10 add $0x10,%esp 10fe31: 39 55 e4 cmp %edx,-0x1c(%ebp) 10fe34: 75 d6 jne 10fe0c <_Watchdog_Adjust+0x34> } break; } } _ISR_Enable( level ); 10fe36: 50 push %eax 10fe37: 9d popf } 10fe38: 8d 65 f4 lea -0xc(%ebp),%esp 10fe3b: 5b pop %ebx 10fe3c: 5e pop %esi 10fe3d: 5f pop %edi 10fe3e: c9 leave 10fe3f: c3 ret * unmodified across that call. * * Till Straumann, 7/2003 */ if ( !_Chain_Is_empty( header ) ) { switch ( direction ) { 10fe40: 49 dec %ecx 10fe41: 75 f3 jne 10fe36 <_Watchdog_Adjust+0x5e> <== ALWAYS TAKEN case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; 10fe43: 01 5a 10 add %ebx,0x10(%edx) break; 10fe46: eb ee jmp 10fe36 <_Watchdog_Adjust+0x5e> <== ALWAYS TAKEN case WATCHDOG_FORWARD: while ( units ) { if ( units < _Watchdog_First( header )->delta_interval ) { _Watchdog_First( header )->delta_interval -= units; 10fe48: 29 df sub %ebx,%edi 10fe4a: 89 7a 10 mov %edi,0x10(%edx) break; 10fe4d: eb e7 jmp 10fe36 <_Watchdog_Adjust+0x5e> <== ALWAYS TAKEN 0011c7b0 <_Watchdog_Adjust_to_chain>: Chain_Control *header, Watchdog_Interval units_arg, Chain_Control *to_fire ) { 11c7b0: 55 push %ebp 11c7b1: 89 e5 mov %esp,%ebp 11c7b3: 57 push %edi 11c7b4: 56 push %esi 11c7b5: 53 push %ebx 11c7b6: 83 ec 0c sub $0xc,%esp 11c7b9: 8b 75 08 mov 0x8(%ebp),%esi 11c7bc: 8b 55 0c mov 0xc(%ebp),%edx 11c7bf: 8b 5d 10 mov 0x10(%ebp),%ebx Watchdog_Interval units = units_arg; ISR_Level level; Watchdog_Control *first; if ( units <= 0 ) { 11c7c2: 85 d2 test %edx,%edx 11c7c4: 74 63 je 11c829 <_Watchdog_Adjust_to_chain+0x79> return; } _ISR_Disable( level ); 11c7c6: 9c pushf 11c7c7: fa cli 11c7c8: 8f 45 ec popl -0x14(%ebp) 11c7cb: 8b 06 mov (%esi),%eax */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 11c7cd: 8d 4e 04 lea 0x4(%esi),%ecx 11c7d0: 89 4d f0 mov %ecx,-0x10(%ebp) 11c7d3: 8d 7b 04 lea 0x4(%ebx),%edi 11c7d6: 89 55 e8 mov %edx,-0x18(%ebp) 11c7d9: 8d 76 00 lea 0x0(%esi),%esi while ( 1 ) { if ( units <= 0 ) { break; } if ( _Chain_Is_empty( header ) ) { 11c7dc: 39 45 f0 cmp %eax,-0x10(%ebp) 11c7df: 74 44 je 11c825 <_Watchdog_Adjust_to_chain+0x75> /* * If it is longer than "units" until the first element on the chain * fires, then bump it and quit. */ if ( units < first->delta_interval ) { 11c7e1: 8b 50 10 mov 0x10(%eax),%edx 11c7e4: 3b 55 e8 cmp -0x18(%ebp),%edx 11c7e7: 77 57 ja 11c840 <_Watchdog_Adjust_to_chain+0x90> /* * 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; 11c7e9: 29 55 e8 sub %edx,-0x18(%ebp) first->delta_interval = 0; 11c7ec: c7 40 10 00 00 00 00 movl $0x0,0x10(%eax) 11c7f3: 90 nop ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 11c7f4: 8b 08 mov (%eax),%ecx previous = the_node->previous; 11c7f6: 8b 50 04 mov 0x4(%eax),%edx next->previous = previous; 11c7f9: 89 51 04 mov %edx,0x4(%ecx) previous->next = next; 11c7fc: 89 0a mov %ecx,(%edx) Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 11c7fe: 89 38 mov %edi,(%eax) old_last_node = the_chain->last; 11c800: 8b 53 08 mov 0x8(%ebx),%edx the_chain->last = the_node; 11c803: 89 43 08 mov %eax,0x8(%ebx) old_last_node->next = the_node; 11c806: 89 02 mov %eax,(%edx) the_node->previous = old_last_node; 11c808: 89 50 04 mov %edx,0x4(%eax) while ( 1 ) { _Chain_Extract_unprotected( &first->Node ); _Chain_Append_unprotected( to_fire, &first->Node ); _ISR_Flash( level ); 11c80b: ff 75 ec pushl -0x14(%ebp) 11c80e: 9d popf 11c80f: fa cli */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 11c810: 8b 06 mov (%esi),%eax if ( _Chain_Is_empty( header ) ) 11c812: 39 45 f0 cmp %eax,-0x10(%ebp) 11c815: 74 1d je 11c834 <_Watchdog_Adjust_to_chain+0x84> break; first = _Watchdog_First( header ); if ( first->delta_interval != 0 ) 11c817: 8b 50 10 mov 0x10(%eax),%edx 11c81a: 85 d2 test %edx,%edx 11c81c: 74 d6 je 11c7f4 <_Watchdog_Adjust_to_chain+0x44> } _ISR_Disable( level ); while ( 1 ) { if ( units <= 0 ) { 11c81e: 8b 4d e8 mov -0x18(%ebp),%ecx 11c821: 85 c9 test %ecx,%ecx 11c823: 75 b7 jne 11c7dc <_Watchdog_Adjust_to_chain+0x2c> if ( first->delta_interval != 0 ) break; } } _ISR_Enable( level ); 11c825: ff 75 ec pushl -0x14(%ebp) 11c828: 9d popf } 11c829: 83 c4 0c add $0xc,%esp 11c82c: 5b pop %ebx 11c82d: 5e pop %esi 11c82e: 5f pop %edi 11c82f: c9 leave 11c830: c3 ret 11c831: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 11c834: 8b 45 f0 mov -0x10(%ebp),%eax } _ISR_Disable( level ); while ( 1 ) { if ( units <= 0 ) { 11c837: 8b 4d e8 mov -0x18(%ebp),%ecx 11c83a: 85 c9 test %ecx,%ecx 11c83c: 75 9e jne 11c7dc <_Watchdog_Adjust_to_chain+0x2c> 11c83e: eb e5 jmp 11c825 <_Watchdog_Adjust_to_chain+0x75> <== ALWAYS TAKEN /* * If it is longer than "units" until the first element on the chain * fires, then bump it and quit. */ if ( units < first->delta_interval ) { first->delta_interval -= units; 11c840: 2b 55 e8 sub -0x18(%ebp),%edx 11c843: 89 50 10 mov %edx,0x10(%eax) break; 11c846: eb dd jmp 11c825 <_Watchdog_Adjust_to_chain+0x75> <== ALWAYS TAKEN 0010e400 <_Watchdog_Insert>: void _Watchdog_Insert( Chain_Control *header, Watchdog_Control *the_watchdog ) { 10e400: 55 push %ebp 10e401: 89 e5 mov %esp,%ebp 10e403: 57 push %edi 10e404: 56 push %esi 10e405: 53 push %ebx 10e406: 83 ec 04 sub $0x4,%esp 10e409: 8b 5d 0c mov 0xc(%ebp),%ebx Watchdog_Control *after; uint32_t insert_isr_nest_level; Watchdog_Interval delta_interval; insert_isr_nest_level = _ISR_Nest_level; 10e40c: 8b 3d 74 74 12 00 mov 0x127474,%edi _ISR_Disable( level ); 10e412: 9c pushf 10e413: fa cli 10e414: 8f 45 f0 popl -0x10(%ebp) /* * Check to see if the watchdog has just been inserted by a * higher priority interrupt. If so, abandon this insert. */ if ( the_watchdog->state != WATCHDOG_INACTIVE ) { 10e417: 8b 43 08 mov 0x8(%ebx),%eax 10e41a: 85 c0 test %eax,%eax 10e41c: 0f 85 9e 00 00 00 jne 10e4c0 <_Watchdog_Insert+0xc0> _ISR_Enable( level ); return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; 10e422: c7 43 08 01 00 00 00 movl $0x1,0x8(%ebx) _Watchdog_Sync_count++; 10e429: a1 40 75 12 00 mov 0x127540,%eax 10e42e: 40 inc %eax 10e42f: a3 40 75 12 00 mov %eax,0x127540 restart: delta_interval = the_watchdog->initial; 10e434: 8b 43 0c mov 0xc(%ebx),%eax * cache *header!! * * Till Straumann, 7/2003 (gcc-3.2.2 -O4 on powerpc) * */ for ( after = (Watchdog_Control *) ((volatile Chain_Control *)header)->first ; 10e437: 8b 4d 08 mov 0x8(%ebp),%ecx 10e43a: 8b 11 mov (%ecx),%edx ; after = _Watchdog_Next( after ) ) { if ( delta_interval == 0 || !_Watchdog_Next( after ) ) 10e43c: 85 c0 test %eax,%eax 10e43e: 74 5d je 10e49d <_Watchdog_Insert+0x9d> 10e440: 8b 32 mov (%edx),%esi 10e442: 85 f6 test %esi,%esi 10e444: 74 57 je 10e49d <_Watchdog_Insert+0x9d> break; if ( delta_interval < after->delta_interval ) { 10e446: 8b 4a 10 mov 0x10(%edx),%ecx 10e449: 39 c8 cmp %ecx,%eax 10e44b: 73 22 jae 10e46f <_Watchdog_Insert+0x6f> 10e44d: eb 49 jmp 10e498 <_Watchdog_Insert+0x98> <== ALWAYS TAKEN 10e44f: 90 nop <== NOT EXECUTED if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) { 10e450: 8b 35 94 74 12 00 mov 0x127494,%esi 10e456: 39 f7 cmp %esi,%edi 10e458: 72 72 jb 10e4cc <_Watchdog_Insert+0xcc> if ( delta_interval < after->delta_interval ) { after->delta_interval -= delta_interval; break; } delta_interval -= after->delta_interval; 10e45a: 29 c8 sub %ecx,%eax RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_Next( Watchdog_Control *the_watchdog ) { return ( (Watchdog_Control *) the_watchdog->Node.next ); 10e45c: 8b 12 mov (%edx),%edx */ for ( after = (Watchdog_Control *) ((volatile Chain_Control *)header)->first ; ; after = _Watchdog_Next( after ) ) { if ( delta_interval == 0 || !_Watchdog_Next( after ) ) 10e45e: 85 c0 test %eax,%eax 10e460: 74 3b je 10e49d <_Watchdog_Insert+0x9d> 10e462: 8b 0a mov (%edx),%ecx 10e464: 85 c9 test %ecx,%ecx 10e466: 74 35 je 10e49d <_Watchdog_Insert+0x9d> break; if ( delta_interval < after->delta_interval ) { 10e468: 8b 4a 10 mov 0x10(%edx),%ecx 10e46b: 39 c1 cmp %eax,%ecx 10e46d: 77 29 ja 10e498 <_Watchdog_Insert+0x98> * used around this flash point allowed interrupts to execute * which violated the design assumptions. The critical section * mechanism used here WAS redesigned to address this. */ _ISR_Flash( level ); 10e46f: ff 75 f0 pushl -0x10(%ebp) 10e472: 9d popf 10e473: fa cli if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { 10e474: 83 7b 08 01 cmpl $0x1,0x8(%ebx) 10e478: 74 d6 je 10e450 <_Watchdog_Insert+0x50> _Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node ); the_watchdog->start_time = _Watchdog_Ticks_since_boot; exit_insert: _Watchdog_Sync_level = insert_isr_nest_level; 10e47a: 89 3d 94 74 12 00 mov %edi,0x127494 _Watchdog_Sync_count--; 10e480: a1 40 75 12 00 mov 0x127540,%eax 10e485: 48 dec %eax 10e486: a3 40 75 12 00 mov %eax,0x127540 _ISR_Enable( level ); 10e48b: ff 75 f0 pushl -0x10(%ebp) 10e48e: 9d popf } 10e48f: 58 pop %eax 10e490: 5b pop %ebx 10e491: 5e pop %esi 10e492: 5f pop %edi 10e493: c9 leave 10e494: c3 ret 10e495: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if ( delta_interval == 0 || !_Watchdog_Next( after ) ) break; if ( delta_interval < after->delta_interval ) { after->delta_interval -= delta_interval; 10e498: 29 c1 sub %eax,%ecx 10e49a: 89 4a 10 mov %ecx,0x10(%edx) RTEMS_INLINE_ROUTINE void _Watchdog_Activate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_ACTIVE; 10e49d: c7 43 08 02 00 00 00 movl $0x2,0x8(%ebx) } } _Watchdog_Activate( the_watchdog ); the_watchdog->delta_interval = delta_interval; 10e4a4: 89 43 10 mov %eax,0x10(%ebx) _Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node ); 10e4a7: 8b 42 04 mov 0x4(%edx),%eax Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 10e4aa: 89 43 04 mov %eax,0x4(%ebx) before_node = after_node->next; 10e4ad: 8b 10 mov (%eax),%edx after_node->next = the_node; 10e4af: 89 18 mov %ebx,(%eax) the_node->next = before_node; 10e4b1: 89 13 mov %edx,(%ebx) before_node->previous = the_node; 10e4b3: 89 5a 04 mov %ebx,0x4(%edx) the_watchdog->start_time = _Watchdog_Ticks_since_boot; 10e4b6: a1 44 75 12 00 mov 0x127544,%eax 10e4bb: 89 43 14 mov %eax,0x14(%ebx) 10e4be: eb ba jmp 10e47a <_Watchdog_Insert+0x7a> <== ALWAYS TAKEN * Check to see if the watchdog has just been inserted by a * higher priority interrupt. If so, abandon this insert. */ if ( the_watchdog->state != WATCHDOG_INACTIVE ) { _ISR_Enable( level ); 10e4c0: ff 75 f0 pushl -0x10(%ebp) 10e4c3: 9d popf exit_insert: _Watchdog_Sync_level = insert_isr_nest_level; _Watchdog_Sync_count--; _ISR_Enable( level ); } 10e4c4: 58 pop %eax 10e4c5: 5b pop %ebx 10e4c6: 5e pop %esi 10e4c7: 5f pop %edi 10e4c8: c9 leave 10e4c9: c3 ret 10e4ca: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) { _Watchdog_Sync_level = insert_isr_nest_level; 10e4cc: 89 3d 94 74 12 00 mov %edi,0x127494 goto restart; 10e4d2: e9 5d ff ff ff jmp 10e434 <_Watchdog_Insert+0x34> <== ALWAYS TAKEN 0010e538 <_Watchdog_Remove>: */ Watchdog_States _Watchdog_Remove( Watchdog_Control *the_watchdog ) { 10e538: 55 push %ebp 10e539: 89 e5 mov %esp,%ebp 10e53b: 56 push %esi 10e53c: 53 push %ebx 10e53d: 8b 55 08 mov 0x8(%ebp),%edx ISR_Level level; Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); 10e540: 9c pushf 10e541: fa cli 10e542: 59 pop %ecx previous_state = the_watchdog->state; 10e543: 8b 42 08 mov 0x8(%edx),%eax switch ( previous_state ) { 10e546: 83 f8 01 cmp $0x1,%eax 10e549: 74 4d je 10e598 <_Watchdog_Remove+0x60> 10e54b: 73 0f jae 10e55c <_Watchdog_Remove+0x24> _Watchdog_Sync_level = _ISR_Nest_level; _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; 10e54d: 8b 1d 44 75 12 00 mov 0x127544,%ebx 10e553: 89 5a 18 mov %ebx,0x18(%edx) _ISR_Enable( level ); 10e556: 51 push %ecx 10e557: 9d popf return( previous_state ); } 10e558: 5b pop %ebx 10e559: 5e pop %esi 10e55a: c9 leave 10e55b: c3 ret Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); previous_state = the_watchdog->state; switch ( previous_state ) { 10e55c: 83 f8 03 cmp $0x3,%eax 10e55f: 77 ec ja 10e54d <_Watchdog_Remove+0x15> <== ALWAYS TAKEN break; case WATCHDOG_ACTIVE: case WATCHDOG_REMOVE_IT: the_watchdog->state = WATCHDOG_INACTIVE; 10e561: 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 ); 10e568: 8b 1a mov (%edx),%ebx next_watchdog = _Watchdog_Next( the_watchdog ); if ( _Watchdog_Next(next_watchdog) ) 10e56a: 8b 33 mov (%ebx),%esi 10e56c: 85 f6 test %esi,%esi 10e56e: 74 06 je 10e576 <_Watchdog_Remove+0x3e> next_watchdog->delta_interval += the_watchdog->delta_interval; 10e570: 8b 72 10 mov 0x10(%edx),%esi 10e573: 01 73 10 add %esi,0x10(%ebx) if ( _Watchdog_Sync_count ) 10e576: 8b 35 40 75 12 00 mov 0x127540,%esi 10e57c: 85 f6 test %esi,%esi 10e57e: 74 0c je 10e58c <_Watchdog_Remove+0x54> _Watchdog_Sync_level = _ISR_Nest_level; 10e580: 8b 35 74 74 12 00 mov 0x127474,%esi 10e586: 89 35 94 74 12 00 mov %esi,0x127494 { Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; 10e58c: 8b 72 04 mov 0x4(%edx),%esi next->previous = previous; 10e58f: 89 73 04 mov %esi,0x4(%ebx) previous->next = next; 10e592: 89 1e mov %ebx,(%esi) 10e594: eb b7 jmp 10e54d <_Watchdog_Remove+0x15> <== ALWAYS TAKEN 10e596: 66 90 xchg %ax,%ax <== NOT EXECUTED /* * It is not actually on the chain so just change the state and * the Insert operation we interrupted will be aborted. */ the_watchdog->state = WATCHDOG_INACTIVE; 10e598: c7 42 08 00 00 00 00 movl $0x0,0x8(%edx) break; 10e59f: eb ac jmp 10e54d <_Watchdog_Remove+0x15> <== ALWAYS TAKEN 0010f9cc <_Watchdog_Report>: void _Watchdog_Report( const char *name, Watchdog_Control *watch ) { 10f9cc: 55 push %ebp 10f9cd: 89 e5 mov %esp,%ebp 10f9cf: 57 push %edi 10f9d0: 56 push %esi 10f9d1: 53 push %ebx 10f9d2: 83 ec 2c sub $0x2c,%esp 10f9d5: 8b 55 08 mov 0x8(%ebp),%edx 10f9d8: 8b 45 0c mov 0xc(%ebp),%eax printk( 10f9db: 8b 78 24 mov 0x24(%eax),%edi 10f9de: 8b 70 20 mov 0x20(%eax),%esi 10f9e1: 8b 58 1c mov 0x1c(%eax),%ebx 10f9e4: 8b 48 0c mov 0xc(%eax),%ecx 10f9e7: 89 4d d4 mov %ecx,-0x2c(%ebp) 10f9ea: 8b 48 10 mov 0x10(%eax),%ecx 10f9ed: 89 4d e0 mov %ecx,-0x20(%ebp) 10f9f0: 85 d2 test %edx,%edx 10f9f2: 74 2c je 10fa20 <_Watchdog_Report+0x54> 10f9f4: b9 23 2a 12 00 mov $0x122a23,%ecx 10f9f9: 83 ec 0c sub $0xc,%esp 10f9fc: 57 push %edi 10f9fd: 56 push %esi 10f9fe: 53 push %ebx 10f9ff: 50 push %eax 10fa00: ff 75 d4 pushl -0x2c(%ebp) 10fa03: ff 75 e0 pushl -0x20(%ebp) 10fa06: 51 push %ecx 10fa07: 52 push %edx 10fa08: 68 26 33 12 00 push $0x123326 10fa0d: e8 82 9e ff ff call 109894 10fa12: 83 c4 30 add $0x30,%esp watch, watch->routine, watch->id, watch->user_data ); } 10fa15: 8d 65 f4 lea -0xc(%ebp),%esp 10fa18: 5b pop %ebx 10fa19: 5e pop %esi 10fa1a: 5f pop %edi 10fa1b: c9 leave 10fa1c: c3 ret 10fa1d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED void _Watchdog_Report( const char *name, Watchdog_Control *watch ) { printk( 10fa20: b9 87 31 12 00 mov $0x123187,%ecx 10fa25: 89 ca mov %ecx,%edx 10fa27: eb d0 jmp 10f9f9 <_Watchdog_Report+0x2d> <== ALWAYS TAKEN 0010f95c <_Watchdog_Report_chain>: void _Watchdog_Report_chain( const char *name, Chain_Control *header ) { 10f95c: 55 push %ebp 10f95d: 89 e5 mov %esp,%ebp 10f95f: 57 push %edi 10f960: 56 push %esi 10f961: 53 push %ebx 10f962: 83 ec 20 sub $0x20,%esp 10f965: 8b 7d 08 mov 0x8(%ebp),%edi 10f968: 8b 75 0c mov 0xc(%ebp),%esi ISR_Level level; Chain_Node *node; _ISR_Disable( level ); 10f96b: 9c pushf 10f96c: fa cli 10f96d: 8f 45 e4 popl -0x1c(%ebp) printk( "Watchdog Chain: %s %p\n", name, header ); 10f970: 56 push %esi 10f971: 57 push %edi 10f972: 68 f0 32 12 00 push $0x1232f0 10f977: e8 18 9f ff ff call 109894 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 10f97c: 8b 1e mov (%esi),%ebx */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10f97e: 83 c6 04 add $0x4,%esi if ( !_Chain_Is_empty( header ) ) { 10f981: 83 c4 10 add $0x10,%esp 10f984: 39 f3 cmp %esi,%ebx 10f986: 74 31 je 10f9b9 <_Watchdog_Report_chain+0x5d> node != _Chain_Tail(header) ; node = node->next ) { Watchdog_Control *watch = (Watchdog_Control *) node; _Watchdog_Report( NULL, watch ); 10f988: 83 ec 08 sub $0x8,%esp 10f98b: 53 push %ebx 10f98c: 6a 00 push $0x0 10f98e: e8 39 00 00 00 call 10f9cc <_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 ) 10f993: 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 ; 10f995: 83 c4 10 add $0x10,%esp 10f998: 39 f3 cmp %esi,%ebx 10f99a: 75 ec jne 10f988 <_Watchdog_Report_chain+0x2c> <== ALWAYS TAKEN { Watchdog_Control *watch = (Watchdog_Control *) node; _Watchdog_Report( NULL, watch ); } printk( "== end of %s \n", name ); 10f99c: 83 ec 08 sub $0x8,%esp 10f99f: 57 push %edi 10f9a0: 68 07 33 12 00 push $0x123307 10f9a5: e8 ea 9e ff ff call 109894 10f9aa: 83 c4 10 add $0x10,%esp } else { printk( "Chain is empty\n" ); } _ISR_Enable( level ); 10f9ad: ff 75 e4 pushl -0x1c(%ebp) 10f9b0: 9d popf } 10f9b1: 8d 65 f4 lea -0xc(%ebp),%esp 10f9b4: 5b pop %ebx 10f9b5: 5e pop %esi 10f9b6: 5f pop %edi 10f9b7: c9 leave 10f9b8: c3 ret _Watchdog_Report( NULL, watch ); } printk( "== end of %s \n", name ); } else { printk( "Chain is empty\n" ); 10f9b9: 83 ec 0c sub $0xc,%esp 10f9bc: 68 16 33 12 00 push $0x123316 10f9c1: e8 ce 9e ff ff call 109894 10f9c6: 83 c4 10 add $0x10,%esp 10f9c9: eb e2 jmp 10f9ad <_Watchdog_Report_chain+0x51> <== ALWAYS TAKEN 0010e5a4 <_Watchdog_Tickle>: */ void _Watchdog_Tickle( Chain_Control *header ) { 10e5a4: 55 push %ebp 10e5a5: 89 e5 mov %esp,%ebp 10e5a7: 57 push %edi 10e5a8: 56 push %esi 10e5a9: 53 push %ebx 10e5aa: 83 ec 1c sub $0x1c,%esp 10e5ad: 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 ); 10e5b0: 9c pushf 10e5b1: fa cli 10e5b2: 5e pop %esi */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 10e5b3: 8b 1f mov (%edi),%ebx */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10e5b5: 8d 47 04 lea 0x4(%edi),%eax 10e5b8: 89 45 e4 mov %eax,-0x1c(%ebp) if ( _Chain_Is_empty( header ) ) 10e5bb: 39 c3 cmp %eax,%ebx 10e5bd: 74 11 je 10e5d0 <_Watchdog_Tickle+0x2c> * to be inserted has already had its delta_interval adjusted to 0, and * so is added to the head of the chain with a delta_interval of 0. * * Steven Johnson - 12/2005 (gcc-3.2.3 -O3 on powerpc) */ if (the_watchdog->delta_interval != 0) { 10e5bf: 8b 43 10 mov 0x10(%ebx),%eax 10e5c2: 85 c0 test %eax,%eax 10e5c4: 74 34 je 10e5fa <_Watchdog_Tickle+0x56> the_watchdog->delta_interval--; 10e5c6: 48 dec %eax 10e5c7: 89 43 10 mov %eax,0x10(%ebx) if ( the_watchdog->delta_interval != 0 ) 10e5ca: 85 c0 test %eax,%eax 10e5cc: 74 2c je 10e5fa <_Watchdog_Tickle+0x56> 10e5ce: 66 90 xchg %ax,%ax the_watchdog = _Watchdog_First( header ); } while ( !_Chain_Is_empty( header ) && (the_watchdog->delta_interval == 0) ); leave: _ISR_Enable(level); 10e5d0: 56 push %esi 10e5d1: 9d popf } 10e5d2: 8d 65 f4 lea -0xc(%ebp),%esp 10e5d5: 5b pop %ebx 10e5d6: 5e pop %esi 10e5d7: 5f pop %edi 10e5d8: c9 leave 10e5d9: c3 ret _ISR_Enable( level ); switch( watchdog_state ) { case WATCHDOG_ACTIVE: (*the_watchdog->routine)( 10e5da: 83 ec 08 sub $0x8,%esp 10e5dd: ff 73 24 pushl 0x24(%ebx) 10e5e0: ff 73 20 pushl 0x20(%ebx) 10e5e3: ff 53 1c call *0x1c(%ebx) 10e5e6: 83 c4 10 add $0x10,%esp case WATCHDOG_REMOVE_IT: break; } _ISR_Disable( level ); 10e5e9: 9c pushf 10e5ea: fa cli 10e5eb: 5e pop %esi RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_First( Chain_Control *header ) { return ( (Watchdog_Control *) header->first ); 10e5ec: 8b 1f mov (%edi),%ebx the_watchdog = _Watchdog_First( header ); } while ( !_Chain_Is_empty( header ) && (the_watchdog->delta_interval == 0) ); 10e5ee: 39 5d e4 cmp %ebx,-0x1c(%ebp) 10e5f1: 74 dd je 10e5d0 <_Watchdog_Tickle+0x2c> 10e5f3: 8b 43 10 mov 0x10(%ebx),%eax 10e5f6: 85 c0 test %eax,%eax 10e5f8: 75 d6 jne 10e5d0 <_Watchdog_Tickle+0x2c> if ( the_watchdog->delta_interval != 0 ) goto leave; } do { watchdog_state = _Watchdog_Remove( the_watchdog ); 10e5fa: 83 ec 0c sub $0xc,%esp 10e5fd: 53 push %ebx 10e5fe: e8 35 ff ff ff call 10e538 <_Watchdog_Remove> <== ALWAYS TAKEN _ISR_Enable( level ); 10e603: 56 push %esi 10e604: 9d popf switch( watchdog_state ) { 10e605: 83 c4 10 add $0x10,%esp 10e608: 83 f8 02 cmp $0x2,%eax 10e60b: 75 dc jne 10e5e9 <_Watchdog_Tickle+0x45> 10e60d: eb cb jmp 10e5da <_Watchdog_Tickle+0x36> <== ALWAYS TAKEN 0010e670 <_Workspace_Handler_initialization>: /* * _Workspace_Handler_initialization */ void _Workspace_Handler_initialization(void) { 10e670: 55 push %ebp 10e671: 89 e5 mov %esp,%ebp 10e673: 57 push %edi 10e674: 53 push %ebx uintptr_t memory_available = 0; void *starting_address = Configuration.work_space_start; 10e675: 8b 1d 20 32 12 00 mov 0x123220,%ebx uintptr_t size = Configuration.work_space_size; 10e67b: 8b 15 24 32 12 00 mov 0x123224,%edx if ( Configuration.do_zero_of_workspace ) 10e681: 80 3d 48 32 12 00 00 cmpb $0x0,0x123248 10e688: 75 1e jne 10e6a8 <_Workspace_Handler_initialization+0x38> memset( starting_address, 0, size ); memory_available = _Heap_Initialize( 10e68a: 6a 04 push $0x4 10e68c: 52 push %edx 10e68d: 53 push %ebx 10e68e: 68 00 74 12 00 push $0x127400 10e693: e8 3c dd ff ff call 10c3d4 <_Heap_Initialize> starting_address, size, CPU_HEAP_ALIGNMENT ); if ( memory_available == 0 ) 10e698: 83 c4 10 add $0x10,%esp 10e69b: 85 c0 test %eax,%eax 10e69d: 74 13 je 10e6b2 <_Workspace_Handler_initialization+0x42> _Internal_error_Occurred( INTERNAL_ERROR_CORE, true, INTERNAL_ERROR_TOO_LITTLE_WORKSPACE ); } 10e69f: 8d 65 f8 lea -0x8(%ebp),%esp 10e6a2: 5b pop %ebx 10e6a3: 5f pop %edi 10e6a4: c9 leave 10e6a5: c3 ret 10e6a6: 66 90 xchg %ax,%ax <== NOT EXECUTED uintptr_t memory_available = 0; void *starting_address = Configuration.work_space_start; uintptr_t size = Configuration.work_space_size; if ( Configuration.do_zero_of_workspace ) memset( starting_address, 0, size ); 10e6a8: 31 c0 xor %eax,%eax 10e6aa: 89 df mov %ebx,%edi 10e6ac: 89 d1 mov %edx,%ecx 10e6ae: f3 aa rep stos %al,%es:(%edi) 10e6b0: eb d8 jmp 10e68a <_Workspace_Handler_initialization+0x1a> <== ALWAYS TAKEN size, CPU_HEAP_ALIGNMENT ); if ( memory_available == 0 ) _Internal_error_Occurred( 10e6b2: 52 push %edx 10e6b3: 6a 03 push $0x3 10e6b5: 6a 01 push $0x1 10e6b7: 6a 00 push $0x0 10e6b9: e8 3a e0 ff ff call 10c6f8 <_Internal_error_Occurred> 00107c88 <__assert_func>: const char *file, int line, const char *func, const char *failedexpr ) { 107c88: 55 push %ebp 107c89: 89 e5 mov %esp,%ebp 107c8b: 83 ec 08 sub $0x8,%esp 107c8e: 8b 45 10 mov 0x10(%ebp),%eax printk("assertion \"%s\" failed: file \"%s\", line %d%s%s\n", 107c91: 85 c0 test %eax,%eax 107c93: 74 27 je 107cbc <__assert_func+0x34> 107c95: ba 4b 0c 12 00 mov $0x120c4b,%edx 107c9a: 83 ec 08 sub $0x8,%esp 107c9d: 50 push %eax 107c9e: 52 push %edx 107c9f: ff 75 0c pushl 0xc(%ebp) 107ca2: ff 75 08 pushl 0x8(%ebp) 107ca5: ff 75 14 pushl 0x14(%ebp) 107ca8: 68 58 0c 12 00 push $0x120c58 107cad: e8 52 10 00 00 call 108d04 file, line, (func) ? ", function: " : "", (func) ? func : "" ); rtems_fatal_error_occurred(0); 107cb2: 83 c4 14 add $0x14,%esp 107cb5: 6a 00 push $0x0 107cb7: e8 e0 3e 00 00 call 10bb9c int line, const char *func, const char *failedexpr ) { printk("assertion \"%s\" failed: file \"%s\", line %d%s%s\n", 107cbc: b8 cf 0c 12 00 mov $0x120ccf,%eax 107cc1: 89 c2 mov %eax,%edx 107cc3: eb d5 jmp 107c9a <__assert_func+0x12> <== ALWAYS TAKEN 0010f974 <_close_r>: int _close_r( struct _reent *ptr __attribute__((unused)), int fd ) { 10f974: 55 push %ebp 10f975: 89 e5 mov %esp,%ebp 10f977: 83 ec 08 sub $0x8,%esp return close( fd ); 10f97a: 8b 45 0c mov 0xc(%ebp),%eax 10f97d: 89 45 08 mov %eax,0x8(%ebp) } 10f980: c9 leave int _close_r( struct _reent *ptr __attribute__((unused)), int fd ) { return close( fd ); 10f981: e9 72 ff ff ff jmp 10f8f8 <== ALWAYS TAKEN 0011ec70 <_exit>: /* * If the toolset uses init/fini sections, then we need to * run the global destructors now. */ #if defined(__USE_INIT_FINI__) FINI_SYMBOL(); 11ec70: 55 push %ebp 11ec71: 89 e5 mov %esp,%ebp 11ec73: 83 ec 08 sub $0x8,%esp 11ec76: e8 b2 06 00 00 call 11f32d <_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(); 11ec7b: e8 88 ff ff ff call 11ec08 <== ALWAYS TAKEN rtems_shutdown_executive(status); 11ec80: 83 ec 0c sub $0xc,%esp 11ec83: ff 75 08 pushl 0x8(%ebp) 11ec86: e8 fd 00 00 00 call 11ed88 <== ALWAYS TAKEN 11ec8b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 11ec8e: eb fe jmp 11ec8e <_exit+0x1e> <== NOT EXECUTED 0013cb50 <_fcntl_r>: struct _reent *ptr __attribute__((unused)), int fd, int cmd, int arg ) { 13cb50: 55 push %ebp <== NOT EXECUTED 13cb51: 89 e5 mov %esp,%ebp <== NOT EXECUTED 13cb53: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 13cb56: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED 13cb59: 8b 55 10 mov 0x10(%ebp),%edx <== NOT EXECUTED return fcntl( fd, cmd, arg ); 13cb5c: 8b 4d 14 mov 0x14(%ebp),%ecx <== NOT EXECUTED 13cb5f: 89 4d 10 mov %ecx,0x10(%ebp) <== NOT EXECUTED 13cb62: 89 55 0c mov %edx,0xc(%ebp) <== NOT EXECUTED 13cb65: 89 45 08 mov %eax,0x8(%ebp) <== NOT EXECUTED } 13cb68: c9 leave <== NOT EXECUTED int fd, int cmd, int arg ) { return fcntl( fd, cmd, arg ); 13cb69: e9 4a fe ff ff jmp 13c9b8 <== NOT EXECUTED 0011eaa4 <_fstat_r>: int _fstat_r( struct _reent *ptr __attribute__((unused)), int fd, struct stat *buf ) { 11eaa4: 55 push %ebp 11eaa5: 89 e5 mov %esp,%ebp 11eaa7: 83 ec 08 sub $0x8,%esp 11eaaa: 8b 45 0c mov 0xc(%ebp),%eax return fstat( fd, buf ); 11eaad: 8b 55 10 mov 0x10(%ebp),%edx 11eab0: 89 55 0c mov %edx,0xc(%ebp) 11eab3: 89 45 08 mov %eax,0x8(%ebp) } 11eab6: c9 leave struct _reent *ptr __attribute__((unused)), int fd, struct stat *buf ) { return fstat( fd, buf ); 11eab7: e9 64 ff ff ff jmp 11ea20 <== ALWAYS TAKEN 0011232c <_getpid_r>: #include pid_t _getpid_r( struct _reent *ptr __attribute__((unused)) ) { 11232c: 55 push %ebp <== NOT EXECUTED 11232d: 89 e5 mov %esp,%ebp <== NOT EXECUTED return getpid(); } 11232f: b8 01 00 00 00 mov $0x1,%eax <== NOT EXECUTED 112334: c9 leave <== NOT EXECUTED 112335: c3 ret <== NOT EXECUTED 0010facc <_gettimeofday>: int _gettimeofday( struct timeval *tp, struct timezone *tzp ) { 10facc: 55 push %ebp <== NOT EXECUTED 10facd: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10facf: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED return gettimeofday( tp, tzp ); } 10fad2: c9 leave <== NOT EXECUTED int _gettimeofday( struct timeval *tp, struct timezone *tzp ) { return gettimeofday( tp, tzp ); 10fad3: e9 90 ff ff ff jmp 10fa68 <== NOT EXECUTED 0010fad8 <_gettimeofday_r>: int _gettimeofday_r( struct _reent *ignored_reentrancy_stuff __attribute__((unused)), struct timeval *tp, struct timezone *tzp ) { 10fad8: 55 push %ebp 10fad9: 89 e5 mov %esp,%ebp 10fadb: 83 ec 08 sub $0x8,%esp 10fade: 8b 45 0c mov 0xc(%ebp),%eax return gettimeofday( tp, tzp ); 10fae1: 8b 55 10 mov 0x10(%ebp),%edx 10fae4: 89 55 0c mov %edx,0xc(%ebp) 10fae7: 89 45 08 mov %eax,0x8(%ebp) } 10faea: c9 leave struct _reent *ignored_reentrancy_stuff __attribute__((unused)), struct timeval *tp, struct timezone *tzp ) { return gettimeofday( tp, tzp ); 10faeb: e9 78 ff ff ff jmp 10fa68 <== ALWAYS TAKEN 0011eabc <_isatty_r>: int _isatty_r( struct _reent *ptr __attribute__((unused)), int fd ) { 11eabc: 55 push %ebp 11eabd: 89 e5 mov %esp,%ebp 11eabf: 83 ec 08 sub $0x8,%esp return isatty( fd ); 11eac2: 8b 45 0c mov 0xc(%ebp),%eax 11eac5: 89 45 08 mov %eax,0x8(%ebp) } 11eac8: c9 leave int _isatty_r( struct _reent *ptr __attribute__((unused)), int fd ) { return isatty( fd ); 11eac9: e9 52 06 00 00 jmp 11f120 <== ALWAYS TAKEN 0012c350 <_link_r>: int _link_r( struct _reent *ptr __attribute__((unused)), const char *existing, const char *new ) { 12c350: 55 push %ebp <== NOT EXECUTED 12c351: 89 e5 mov %esp,%ebp <== NOT EXECUTED 12c353: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 12c356: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED return link( existing, new ); 12c359: 8b 55 10 mov 0x10(%ebp),%edx <== NOT EXECUTED 12c35c: 89 55 0c mov %edx,0xc(%ebp) <== NOT EXECUTED 12c35f: 89 45 08 mov %eax,0x8(%ebp) <== NOT EXECUTED } 12c362: c9 leave <== NOT EXECUTED struct _reent *ptr __attribute__((unused)), const char *existing, const char *new ) { return link( existing, new ); 12c363: e9 e8 fd ff ff jmp 12c150 <== NOT EXECUTED 0011ebd4 <_lseek_r>: struct _reent *ptr __attribute__((unused)), int fd, off_t offset, int whence ) { 11ebd4: 55 push %ebp 11ebd5: 89 e5 mov %esp,%ebp 11ebd7: 83 ec 08 sub $0x8,%esp 11ebda: 8b 45 0c mov 0xc(%ebp),%eax 11ebdd: 8b 55 10 mov 0x10(%ebp),%edx return lseek( fd, offset, whence ); 11ebe0: 8b 4d 14 mov 0x14(%ebp),%ecx 11ebe3: 89 4d 10 mov %ecx,0x10(%ebp) 11ebe6: 89 55 0c mov %edx,0xc(%ebp) 11ebe9: 89 45 08 mov %eax,0x8(%ebp) } 11ebec: c9 leave int fd, off_t offset, int whence ) { return lseek( fd, offset, whence ); 11ebed: e9 de fe ff ff jmp 11ead0 <== ALWAYS TAKEN 0012c55c <_lstat_r>: int _STAT_R_NAME( struct _reent *ptr __attribute__((unused)), const char *path, struct stat *buf ) { 12c55c: 55 push %ebp <== NOT EXECUTED 12c55d: 89 e5 mov %esp,%ebp <== NOT EXECUTED 12c55f: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 12c562: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED return _STAT_NAME( path, buf ); 12c565: 8b 55 10 mov 0x10(%ebp),%edx <== NOT EXECUTED 12c568: 89 55 0c mov %edx,0xc(%ebp) <== NOT EXECUTED 12c56b: 89 45 08 mov %eax,0x8(%ebp) <== NOT EXECUTED } 12c56e: c9 leave <== NOT EXECUTED struct _reent *ptr __attribute__((unused)), const char *path, struct stat *buf ) { return _STAT_NAME( path, buf ); 12c56f: e9 18 ff ff ff jmp 12c48c <== NOT EXECUTED 00108ce4 <_open_r>: struct _reent *ptr __attribute__((unused)), const char *buf, int flags, int mode ) { 108ce4: 55 push %ebp 108ce5: 89 e5 mov %esp,%ebp 108ce7: 83 ec 08 sub $0x8,%esp 108cea: 8b 45 0c mov 0xc(%ebp),%eax 108ced: 8b 55 10 mov 0x10(%ebp),%edx return open( buf, flags, mode ); 108cf0: 8b 4d 14 mov 0x14(%ebp),%ecx 108cf3: 89 4d 10 mov %ecx,0x10(%ebp) 108cf6: 89 55 0c mov %edx,0xc(%ebp) 108cf9: 89 45 08 mov %eax,0x8(%ebp) } 108cfc: c9 leave const char *buf, int flags, int mode ) { return open( buf, flags, mode ); 108cfd: e9 a6 fd ff ff jmp 108aa8 <== ALWAYS TAKEN 0011ed30 <_read_r>: struct _reent *ptr __attribute__((unused)), int fd, void *buf, size_t nbytes ) { 11ed30: 55 push %ebp 11ed31: 89 e5 mov %esp,%ebp 11ed33: 83 ec 08 sub $0x8,%esp 11ed36: 8b 45 0c mov 0xc(%ebp),%eax 11ed39: 8b 55 10 mov 0x10(%ebp),%edx return read( fd, buf, nbytes ); 11ed3c: 8b 4d 14 mov 0x14(%ebp),%ecx 11ed3f: 89 4d 10 mov %ecx,0x10(%ebp) 11ed42: 89 55 0c mov %edx,0xc(%ebp) 11ed45: 89 45 08 mov %eax,0x8(%ebp) } 11ed48: c9 leave int fd, void *buf, size_t nbytes ) { return read( fd, buf, nbytes ); 11ed49: e9 42 ff ff ff jmp 11ec90 <== ALWAYS TAKEN 0011ed50 <_realloc_r>: void *_realloc_r( struct _reent *ignored __attribute__((unused)), void *ptr, size_t size ) { 11ed50: 55 push %ebp <== NOT EXECUTED 11ed51: 89 e5 mov %esp,%ebp <== NOT EXECUTED 11ed53: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 11ed56: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED return realloc( ptr, size ); 11ed59: 8b 55 10 mov 0x10(%ebp),%edx <== NOT EXECUTED 11ed5c: 89 55 0c mov %edx,0xc(%ebp) <== NOT EXECUTED 11ed5f: 89 45 08 mov %eax,0x8(%ebp) <== NOT EXECUTED } 11ed62: c9 leave <== NOT EXECUTED struct _reent *ignored __attribute__((unused)), void *ptr, size_t size ) { return realloc( ptr, size ); 11ed63: e9 48 00 00 00 jmp 11edb0 <== NOT EXECUTED 00158274 <_rename_r>: int _rename_r( struct _reent *ptr __attribute__((unused)), const char *old, const char *new ) { 158274: 55 push %ebp <== NOT EXECUTED 158275: 89 e5 mov %esp,%ebp <== NOT EXECUTED 158277: 57 push %edi <== NOT EXECUTED 158278: 56 push %esi <== NOT EXECUTED 158279: 53 push %ebx <== NOT EXECUTED 15827a: 83 ec 68 sub $0x68,%esp <== NOT EXECUTED 15827d: 8b 55 0c mov 0xc(%ebp),%edx <== NOT EXECUTED /* * Get the parent node of the old path to be renamed. Find the parent path. */ old_parent_pathlen = rtems_filesystem_dirname ( old ); 158280: 52 push %edx <== NOT EXECUTED 158281: 89 55 9c mov %edx,-0x64(%ebp) <== NOT EXECUTED 158284: e8 93 4a fb ff call 10cd1c <== NOT EXECUTED 158289: 89 c3 mov %eax,%ebx <== NOT EXECUTED if ( old_parent_pathlen == 0 ) 15828b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 15828e: 85 c0 test %eax,%eax <== NOT EXECUTED 158290: 8b 55 9c mov -0x64(%ebp),%edx <== NOT EXECUTED 158293: 0f 85 fb 02 00 00 jne 158594 <_rename_r+0x320> <== NOT EXECUTED rtems_filesystem_get_start_loc( old, &i, &old_parent_loc ); 158299: 8a 02 mov (%edx),%al <== NOT EXECUTED 15829b: 3c 2f cmp $0x2f,%al <== NOT EXECUTED 15829d: 74 0c je 1582ab <_rename_r+0x37> <== NOT EXECUTED 15829f: 3c 5c cmp $0x5c,%al <== NOT EXECUTED 1582a1: 74 08 je 1582ab <_rename_r+0x37> <== NOT EXECUTED 1582a3: 84 c0 test %al,%al <== NOT EXECUTED 1582a5: 0f 85 75 01 00 00 jne 158420 <_rename_r+0x1ac> <== NOT EXECUTED 1582ab: 8d 45 bc lea -0x44(%ebp),%eax <== NOT EXECUTED 1582ae: 89 45 a4 mov %eax,-0x5c(%ebp) <== NOT EXECUTED 1582b1: 8b 35 c4 93 16 00 mov 0x1693c4,%esi <== NOT EXECUTED 1582b7: 83 c6 18 add $0x18,%esi <== NOT EXECUTED 1582ba: b9 05 00 00 00 mov $0x5,%ecx <== NOT EXECUTED 1582bf: 89 c7 mov %eax,%edi <== NOT EXECUTED 1582c1: f3 a5 rep movsl %ds:(%esi),%es:(%edi) <== NOT EXECUTED 1582c3: c6 45 a3 00 movb $0x0,-0x5d(%ebp) <== NOT EXECUTED /* * Start from the parent to find the node that should be under it. */ old_loc = old_parent_loc; 1582c7: 8d 7d d0 lea -0x30(%ebp),%edi <== NOT EXECUTED 1582ca: b9 05 00 00 00 mov $0x5,%ecx <== NOT EXECUTED 1582cf: 8b 75 a4 mov -0x5c(%ebp),%esi <== NOT EXECUTED 1582d2: f3 a5 rep movsl %ds:(%esi),%es:(%edi) <== NOT EXECUTED name = old + old_parent_pathlen; 1582d4: 8d 1c 1a lea (%edx,%ebx,1),%ebx <== NOT EXECUTED 1582d7: 89 5d e4 mov %ebx,-0x1c(%ebp) <== NOT EXECUTED name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 1582da: be ff ff ff ff mov $0xffffffff,%esi <== NOT EXECUTED 1582df: 89 f1 mov %esi,%ecx <== NOT EXECUTED 1582e1: 89 df mov %ebx,%edi <== NOT EXECUTED 1582e3: 31 c0 xor %eax,%eax <== NOT EXECUTED 1582e5: f2 ae repnz scas %es:(%edi),%al <== NOT EXECUTED 1582e7: f7 d1 not %ecx <== NOT EXECUTED 1582e9: 49 dec %ecx <== NOT EXECUTED 1582ea: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 1582ed: 51 push %ecx <== NOT EXECUTED 1582ee: 53 push %ebx <== NOT EXECUTED 1582ef: e8 ec 49 fb ff call 10cce0 <== NOT EXECUTED 1582f4: 01 c3 add %eax,%ebx <== NOT EXECUTED 1582f6: 89 5d e4 mov %ebx,-0x1c(%ebp) <== NOT EXECUTED result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 1582f9: 89 f1 mov %esi,%ecx <== NOT EXECUTED 1582fb: 89 df mov %ebx,%edi <== NOT EXECUTED 1582fd: 31 c0 xor %eax,%eax <== NOT EXECUTED 1582ff: f2 ae repnz scas %es:(%edi),%al <== NOT EXECUTED 158301: 89 ce mov %ecx,%esi <== NOT EXECUTED 158303: f7 d6 not %esi <== NOT EXECUTED 158305: 4e dec %esi <== NOT EXECUTED 158306: c7 04 24 00 00 00 00 movl $0x0,(%esp) <== NOT EXECUTED 15830d: 8d 45 d0 lea -0x30(%ebp),%eax <== NOT EXECUTED 158310: 50 push %eax <== NOT EXECUTED 158311: 6a 00 push $0x0 <== NOT EXECUTED 158313: 56 push %esi <== NOT EXECUTED 158314: 53 push %ebx <== NOT EXECUTED 158315: e8 52 4a fb ff call 10cd6c <== NOT EXECUTED 15831a: 89 c3 mov %eax,%ebx <== NOT EXECUTED 0, &old_loc, false ); if ( result != 0 ) { 15831c: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 15831f: 85 c0 test %eax,%eax <== NOT EXECUTED 158321: 0f 85 89 01 00 00 jne 1584b0 <_rename_r+0x23c> <== NOT EXECUTED /* * Get the parent of the new node we are renaming to. */ rtems_filesystem_get_start_loc( new, &i, &new_parent_loc ); 158327: 8b 55 10 mov 0x10(%ebp),%edx <== NOT EXECUTED 15832a: 8a 02 mov (%edx),%al <== NOT EXECUTED 15832c: 3c 2f cmp $0x2f,%al <== NOT EXECUTED 15832e: 74 24 je 158354 <_rename_r+0xe0> <== NOT EXECUTED 158330: 3c 5c cmp $0x5c,%al <== NOT EXECUTED 158332: 74 20 je 158354 <_rename_r+0xe0> <== NOT EXECUTED 158334: 84 c0 test %al,%al <== NOT EXECUTED 158336: 74 1c je 158354 <_rename_r+0xe0> <== NOT EXECUTED 158338: 8d 5d a8 lea -0x58(%ebp),%ebx <== NOT EXECUTED 15833b: 8b 35 c4 93 16 00 mov 0x1693c4,%esi <== NOT EXECUTED 158341: 83 c6 04 add $0x4,%esi <== NOT EXECUTED 158344: b9 05 00 00 00 mov $0x5,%ecx <== NOT EXECUTED 158349: 89 df mov %ebx,%edi <== NOT EXECUTED 15834b: f3 a5 rep movsl %ds:(%esi),%es:(%edi) <== NOT EXECUTED 15834d: 31 d2 xor %edx,%edx <== NOT EXECUTED 15834f: eb 1d jmp 15836e <_rename_r+0xfa> <== NOT EXECUTED 158351: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 158354: 8d 5d a8 lea -0x58(%ebp),%ebx <== NOT EXECUTED 158357: 8b 35 c4 93 16 00 mov 0x1693c4,%esi <== NOT EXECUTED 15835d: 83 c6 18 add $0x18,%esi <== NOT EXECUTED 158360: b9 05 00 00 00 mov $0x5,%ecx <== NOT EXECUTED 158365: 89 df mov %ebx,%edi <== NOT EXECUTED 158367: f3 a5 rep movsl %ds:(%esi),%es:(%edi) <== NOT EXECUTED 158369: ba 01 00 00 00 mov $0x1,%edx <== NOT EXECUTED if ( !new_parent_loc.ops->evalformake_h ) { 15836e: 8b 45 b4 mov -0x4c(%ebp),%eax <== NOT EXECUTED 158371: 8b 40 04 mov 0x4(%eax),%eax <== NOT EXECUTED 158374: 85 c0 test %eax,%eax <== NOT EXECUTED 158376: 0f 84 c8 01 00 00 je 158544 <_rename_r+0x2d0> <== 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->evalformake_h)( &new[i], &new_parent_loc, &name ); 15837c: 51 push %ecx <== NOT EXECUTED 15837d: 8d 4d e4 lea -0x1c(%ebp),%ecx <== NOT EXECUTED 158380: 51 push %ecx <== NOT EXECUTED 158381: 53 push %ebx <== NOT EXECUTED 158382: 03 55 10 add 0x10(%ebp),%edx <== NOT EXECUTED 158385: 52 push %edx <== NOT EXECUTED 158386: ff d0 call *%eax <== NOT EXECUTED 158388: 89 c6 mov %eax,%esi <== NOT EXECUTED if ( result != 0 ) { 15838a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 15838d: 85 c0 test %eax,%eax <== NOT EXECUTED 15838f: 0f 85 4b 01 00 00 jne 1584e0 <_rename_r+0x26c> <== 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 ) { 158395: 8b 45 cc mov -0x34(%ebp),%eax <== NOT EXECUTED 158398: 3b 45 b8 cmp -0x48(%ebp),%eax <== NOT EXECUTED 15839b: 0f 85 a3 00 00 00 jne 158444 <_rename_r+0x1d0> <== NOT EXECUTED rtems_filesystem_freenode( &old_parent_loc ); rtems_filesystem_freenode( &old_loc ); rtems_set_errno_and_return_minus_one( EXDEV ); } if ( !new_parent_loc.ops->rename_h ) { 1583a1: 8b 55 b4 mov -0x4c(%ebp),%edx <== NOT EXECUTED 1583a4: 8b 42 40 mov 0x40(%edx),%eax <== NOT EXECUTED 1583a7: 85 c0 test %eax,%eax <== NOT EXECUTED 1583a9: 0f 84 15 02 00 00 je 1585c4 <_rename_r+0x350> <== 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 ); 1583af: ff 75 e4 pushl -0x1c(%ebp) <== NOT EXECUTED 1583b2: 53 push %ebx <== NOT EXECUTED 1583b3: 8d 4d d0 lea -0x30(%ebp),%ecx <== NOT EXECUTED 1583b6: 51 push %ecx <== NOT EXECUTED 1583b7: ff 75 a4 pushl -0x5c(%ebp) <== NOT EXECUTED 1583ba: ff d0 call *%eax <== NOT EXECUTED 1583bc: 89 c6 mov %eax,%esi <== NOT EXECUTED rtems_filesystem_freenode( &new_parent_loc ); 1583be: 8b 45 b4 mov -0x4c(%ebp),%eax <== NOT EXECUTED 1583c1: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 1583c4: 85 c0 test %eax,%eax <== NOT EXECUTED 1583c6: 74 10 je 1583d8 <_rename_r+0x164> <== NOT EXECUTED 1583c8: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 1583cb: 85 c0 test %eax,%eax <== NOT EXECUTED 1583cd: 74 09 je 1583d8 <_rename_r+0x164> <== NOT EXECUTED 1583cf: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1583d2: 53 push %ebx <== NOT EXECUTED 1583d3: ff d0 call *%eax <== NOT EXECUTED 1583d5: 83 c4 10 add $0x10,%esp <== NOT EXECUTED if ( free_old_parentloc ) 1583d8: 80 7d a3 00 cmpb $0x0,-0x5d(%ebp) <== NOT EXECUTED 1583dc: 75 26 jne 158404 <_rename_r+0x190> <== NOT EXECUTED rtems_filesystem_freenode( &old_parent_loc ); rtems_filesystem_freenode( &old_loc ); 1583de: 8b 45 dc mov -0x24(%ebp),%eax <== NOT EXECUTED 1583e1: 85 c0 test %eax,%eax <== NOT EXECUTED 1583e3: 74 13 je 1583f8 <_rename_r+0x184> <== NOT EXECUTED 1583e5: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 1583e8: 85 c0 test %eax,%eax <== NOT EXECUTED 1583ea: 74 0c je 1583f8 <_rename_r+0x184> <== NOT EXECUTED 1583ec: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1583ef: 8d 55 d0 lea -0x30(%ebp),%edx <== NOT EXECUTED 1583f2: 52 push %edx <== NOT EXECUTED 1583f3: ff d0 call *%eax <== NOT EXECUTED 1583f5: 83 c4 10 add $0x10,%esp <== NOT EXECUTED return result; } 1583f8: 89 f0 mov %esi,%eax <== NOT EXECUTED 1583fa: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 1583fd: 5b pop %ebx <== NOT EXECUTED 1583fe: 5e pop %esi <== NOT EXECUTED 1583ff: 5f pop %edi <== NOT EXECUTED 158400: c9 leave <== NOT EXECUTED 158401: c3 ret <== NOT EXECUTED 158402: 66 90 xchg %ax,%ax <== NOT EXECUTED result = (*new_parent_loc.ops->rename_h)( &old_parent_loc, &old_loc, &new_parent_loc, name ); rtems_filesystem_freenode( &new_parent_loc ); if ( free_old_parentloc ) rtems_filesystem_freenode( &old_parent_loc ); 158404: 8b 45 c8 mov -0x38(%ebp),%eax <== NOT EXECUTED 158407: 85 c0 test %eax,%eax <== NOT EXECUTED 158409: 74 d3 je 1583de <_rename_r+0x16a> <== NOT EXECUTED 15840b: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 15840e: 85 c0 test %eax,%eax <== NOT EXECUTED 158410: 74 cc je 1583de <_rename_r+0x16a> <== NOT EXECUTED 158412: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 158415: ff 75 a4 pushl -0x5c(%ebp) <== NOT EXECUTED 158418: ff d0 call *%eax <== NOT EXECUTED 15841a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 15841d: eb bf jmp 1583de <_rename_r+0x16a> <== NOT EXECUTED 15841f: 90 nop <== NOT EXECUTED */ old_parent_pathlen = rtems_filesystem_dirname ( old ); if ( old_parent_pathlen == 0 ) rtems_filesystem_get_start_loc( old, &i, &old_parent_loc ); 158420: 8d 4d bc lea -0x44(%ebp),%ecx <== NOT EXECUTED 158423: 89 4d a4 mov %ecx,-0x5c(%ebp) <== NOT EXECUTED 158426: 8b 35 c4 93 16 00 mov 0x1693c4,%esi <== NOT EXECUTED 15842c: 83 c6 04 add $0x4,%esi <== NOT EXECUTED 15842f: b9 05 00 00 00 mov $0x5,%ecx <== NOT EXECUTED 158434: 8b 7d a4 mov -0x5c(%ebp),%edi <== NOT EXECUTED 158437: f3 a5 rep movsl %ds:(%esi),%es:(%edi) <== NOT EXECUTED 158439: c6 45 a3 00 movb $0x0,-0x5d(%ebp) <== NOT EXECUTED 15843d: e9 85 fe ff ff jmp 1582c7 <_rename_r+0x53> <== NOT EXECUTED 158442: 66 90 xchg %ax,%ax <== NOT EXECUTED * Check to see if the caller is trying to rename across file system * boundaries. */ if ( old_parent_loc.mt_entry != new_parent_loc.mt_entry ) { rtems_filesystem_freenode( &new_parent_loc ); 158444: 8b 45 b4 mov -0x4c(%ebp),%eax <== NOT EXECUTED 158447: 85 c0 test %eax,%eax <== NOT EXECUTED 158449: 74 10 je 15845b <_rename_r+0x1e7> <== NOT EXECUTED 15844b: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 15844e: 85 c0 test %eax,%eax <== NOT EXECUTED 158450: 74 09 je 15845b <_rename_r+0x1e7> <== NOT EXECUTED 158452: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 158455: 53 push %ebx <== NOT EXECUTED 158456: ff d0 call *%eax <== NOT EXECUTED 158458: 83 c4 10 add $0x10,%esp <== NOT EXECUTED if ( free_old_parentloc ) 15845b: 80 7d a3 00 cmpb $0x0,-0x5d(%ebp) <== NOT EXECUTED 15845f: 74 19 je 15847a <_rename_r+0x206> <== NOT EXECUTED rtems_filesystem_freenode( &old_parent_loc ); 158461: 8b 45 c8 mov -0x38(%ebp),%eax <== NOT EXECUTED 158464: 85 c0 test %eax,%eax <== NOT EXECUTED 158466: 74 12 je 15847a <_rename_r+0x206> <== NOT EXECUTED 158468: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 15846b: 85 c0 test %eax,%eax <== NOT EXECUTED 15846d: 74 0b je 15847a <_rename_r+0x206> <== NOT EXECUTED 15846f: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 158472: ff 75 a4 pushl -0x5c(%ebp) <== NOT EXECUTED 158475: ff d0 call *%eax <== NOT EXECUTED 158477: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_filesystem_freenode( &old_loc ); 15847a: 8b 45 dc mov -0x24(%ebp),%eax <== NOT EXECUTED 15847d: 85 c0 test %eax,%eax <== NOT EXECUTED 15847f: 74 13 je 158494 <_rename_r+0x220> <== NOT EXECUTED 158481: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 158484: 85 c0 test %eax,%eax <== NOT EXECUTED 158486: 74 0c je 158494 <_rename_r+0x220> <== NOT EXECUTED 158488: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 15848b: 8d 4d d0 lea -0x30(%ebp),%ecx <== NOT EXECUTED 15848e: 51 push %ecx <== NOT EXECUTED 15848f: ff d0 call *%eax <== NOT EXECUTED 158491: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EXDEV ); 158494: e8 77 a0 fe ff call 142510 <__errno> <== NOT EXECUTED 158499: c7 00 12 00 00 00 movl $0x12,(%eax) <== NOT EXECUTED 15849f: be ff ff ff ff mov $0xffffffff,%esi <== NOT EXECUTED if ( free_old_parentloc ) rtems_filesystem_freenode( &old_parent_loc ); rtems_filesystem_freenode( &old_loc ); return result; } 1584a4: 89 f0 mov %esi,%eax <== NOT EXECUTED 1584a6: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 1584a9: 5b pop %ebx <== NOT EXECUTED 1584aa: 5e pop %esi <== NOT EXECUTED 1584ab: 5f pop %edi <== NOT EXECUTED 1584ac: c9 leave <== NOT EXECUTED 1584ad: c3 ret <== NOT EXECUTED 1584ae: 66 90 xchg %ax,%ax <== NOT EXECUTED name += rtems_filesystem_prefix_separators( name, strlen( name ) ); result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 0, &old_loc, false ); if ( result != 0 ) { if ( free_old_parentloc ) 1584b0: 80 7d a3 00 cmpb $0x0,-0x5d(%ebp) <== NOT EXECUTED 1584b4: 74 19 je 1584cf <_rename_r+0x25b> <== NOT EXECUTED rtems_filesystem_freenode( &old_parent_loc ); 1584b6: 8b 45 c8 mov -0x38(%ebp),%eax <== NOT EXECUTED 1584b9: 85 c0 test %eax,%eax <== NOT EXECUTED 1584bb: 74 12 je 1584cf <_rename_r+0x25b> <== NOT EXECUTED 1584bd: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 1584c0: 85 c0 test %eax,%eax <== NOT EXECUTED 1584c2: 74 0b je 1584cf <_rename_r+0x25b> <== NOT EXECUTED 1584c4: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1584c7: ff 75 a4 pushl -0x5c(%ebp) <== NOT EXECUTED 1584ca: ff d0 call *%eax <== NOT EXECUTED 1584cc: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( result ); 1584cf: e8 3c a0 fe ff call 142510 <__errno> <== NOT EXECUTED 1584d4: 89 18 mov %ebx,(%eax) <== NOT EXECUTED 1584d6: be ff ff ff ff mov $0xffffffff,%esi <== NOT EXECUTED 1584db: e9 18 ff ff ff jmp 1583f8 <_rename_r+0x184> <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*new_parent_loc.ops->evalformake_h)( &new[i], &new_parent_loc, &name ); if ( result != 0 ) { rtems_filesystem_freenode( &new_parent_loc ); 1584e0: 8b 45 b4 mov -0x4c(%ebp),%eax <== NOT EXECUTED 1584e3: 85 c0 test %eax,%eax <== NOT EXECUTED 1584e5: 74 10 je 1584f7 <_rename_r+0x283> <== NOT EXECUTED 1584e7: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 1584ea: 85 c0 test %eax,%eax <== NOT EXECUTED 1584ec: 74 09 je 1584f7 <_rename_r+0x283> <== NOT EXECUTED 1584ee: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1584f1: 53 push %ebx <== NOT EXECUTED 1584f2: ff d0 call *%eax <== NOT EXECUTED 1584f4: 83 c4 10 add $0x10,%esp <== NOT EXECUTED if ( free_old_parentloc ) 1584f7: 80 7d a3 00 cmpb $0x0,-0x5d(%ebp) <== NOT EXECUTED 1584fb: 74 19 je 158516 <_rename_r+0x2a2> <== NOT EXECUTED rtems_filesystem_freenode( &old_parent_loc ); 1584fd: 8b 45 c8 mov -0x38(%ebp),%eax <== NOT EXECUTED 158500: 85 c0 test %eax,%eax <== NOT EXECUTED 158502: 74 12 je 158516 <_rename_r+0x2a2> <== NOT EXECUTED 158504: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 158507: 85 c0 test %eax,%eax <== NOT EXECUTED 158509: 74 0b je 158516 <_rename_r+0x2a2> <== NOT EXECUTED 15850b: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 15850e: ff 75 a4 pushl -0x5c(%ebp) <== NOT EXECUTED 158511: ff d0 call *%eax <== NOT EXECUTED 158513: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_filesystem_freenode( &old_loc ); 158516: 8b 45 dc mov -0x24(%ebp),%eax <== NOT EXECUTED 158519: 85 c0 test %eax,%eax <== NOT EXECUTED 15851b: 74 13 je 158530 <_rename_r+0x2bc> <== NOT EXECUTED 15851d: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 158520: 85 c0 test %eax,%eax <== NOT EXECUTED 158522: 74 0c je 158530 <_rename_r+0x2bc> <== NOT EXECUTED 158524: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 158527: 8d 55 d0 lea -0x30(%ebp),%edx <== NOT EXECUTED 15852a: 52 push %edx <== NOT EXECUTED 15852b: ff d0 call *%eax <== NOT EXECUTED 15852d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( result ); 158530: e8 db 9f fe ff call 142510 <__errno> <== NOT EXECUTED 158535: 89 30 mov %esi,(%eax) <== NOT EXECUTED 158537: be ff ff ff ff mov $0xffffffff,%esi <== NOT EXECUTED 15853c: e9 b7 fe ff ff jmp 1583f8 <_rename_r+0x184> <== NOT EXECUTED 158541: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED */ rtems_filesystem_get_start_loc( new, &i, &new_parent_loc ); if ( !new_parent_loc.ops->evalformake_h ) { if ( free_old_parentloc ) 158544: 80 7d a3 00 cmpb $0x0,-0x5d(%ebp) <== NOT EXECUTED 158548: 74 19 je 158563 <_rename_r+0x2ef> <== NOT EXECUTED rtems_filesystem_freenode( &old_parent_loc ); 15854a: 8b 45 c8 mov -0x38(%ebp),%eax <== NOT EXECUTED 15854d: 85 c0 test %eax,%eax <== NOT EXECUTED 15854f: 74 12 je 158563 <_rename_r+0x2ef> <== NOT EXECUTED 158551: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 158554: 85 c0 test %eax,%eax <== NOT EXECUTED 158556: 74 0b je 158563 <_rename_r+0x2ef> <== NOT EXECUTED 158558: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 15855b: ff 75 a4 pushl -0x5c(%ebp) <== NOT EXECUTED 15855e: ff d0 call *%eax <== NOT EXECUTED 158560: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_filesystem_freenode( &old_loc ); 158563: 8b 45 dc mov -0x24(%ebp),%eax <== NOT EXECUTED 158566: 85 c0 test %eax,%eax <== NOT EXECUTED 158568: 74 13 je 15857d <_rename_r+0x309> <== NOT EXECUTED 15856a: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 15856d: 85 c0 test %eax,%eax <== NOT EXECUTED 15856f: 74 0c je 15857d <_rename_r+0x309> <== NOT EXECUTED 158571: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 158574: 8d 4d d0 lea -0x30(%ebp),%ecx <== NOT EXECUTED 158577: 51 push %ecx <== NOT EXECUTED 158578: ff d0 call *%eax <== NOT EXECUTED 15857a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED if ( !new_parent_loc.ops->rename_h ) { rtems_filesystem_freenode( &new_parent_loc ); if ( free_old_parentloc ) rtems_filesystem_freenode( &old_parent_loc ); rtems_filesystem_freenode( &old_loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); 15857d: e8 8e 9f fe ff call 142510 <__errno> <== NOT EXECUTED 158582: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 158588: be ff ff ff ff mov $0xffffffff,%esi <== NOT EXECUTED 15858d: e9 66 fe ff ff jmp 1583f8 <_rename_r+0x184> <== NOT EXECUTED 158592: 66 90 xchg %ax,%ax <== NOT EXECUTED old_parent_pathlen = rtems_filesystem_dirname ( old ); if ( old_parent_pathlen == 0 ) rtems_filesystem_get_start_loc( old, &i, &old_parent_loc ); else { result = rtems_filesystem_evaluate_path( old, old_parent_pathlen, 158594: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 158597: 6a 00 push $0x0 <== NOT EXECUTED 158599: 8d 45 bc lea -0x44(%ebp),%eax <== NOT EXECUTED 15859c: 89 45 a4 mov %eax,-0x5c(%ebp) <== NOT EXECUTED 15859f: 50 push %eax <== NOT EXECUTED 1585a0: 6a 02 push $0x2 <== NOT EXECUTED 1585a2: 53 push %ebx <== NOT EXECUTED 1585a3: 52 push %edx <== NOT EXECUTED 1585a4: 89 55 9c mov %edx,-0x64(%ebp) <== NOT EXECUTED 1585a7: e8 94 48 fb ff call 10ce40 <== NOT EXECUTED RTEMS_LIBIO_PERMS_WRITE, &old_parent_loc, false ); if ( result != 0 ) 1585ac: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 1585af: 85 c0 test %eax,%eax <== NOT EXECUTED 1585b1: 8b 55 9c mov -0x64(%ebp),%edx <== NOT EXECUTED 1585b4: 0f 85 1c ff ff ff jne 1584d6 <_rename_r+0x262> <== NOT EXECUTED 1585ba: c6 45 a3 01 movb $0x1,-0x5d(%ebp) <== NOT EXECUTED 1585be: e9 04 fd ff ff jmp 1582c7 <_rename_r+0x53> <== NOT EXECUTED 1585c3: 90 nop <== NOT EXECUTED rtems_filesystem_freenode( &old_loc ); rtems_set_errno_and_return_minus_one( EXDEV ); } if ( !new_parent_loc.ops->rename_h ) { rtems_filesystem_freenode( &new_parent_loc ); 1585c4: 8b 42 1c mov 0x1c(%edx),%eax <== NOT EXECUTED 1585c7: 85 c0 test %eax,%eax <== NOT EXECUTED 1585c9: 74 09 je 1585d4 <_rename_r+0x360> <== NOT EXECUTED 1585cb: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1585ce: 53 push %ebx <== NOT EXECUTED 1585cf: ff d0 call *%eax <== NOT EXECUTED 1585d1: 83 c4 10 add $0x10,%esp <== NOT EXECUTED if ( free_old_parentloc ) 1585d4: 80 7d a3 00 cmpb $0x0,-0x5d(%ebp) <== NOT EXECUTED 1585d8: 74 19 je 1585f3 <_rename_r+0x37f> <== NOT EXECUTED rtems_filesystem_freenode( &old_parent_loc ); 1585da: 8b 45 c8 mov -0x38(%ebp),%eax <== NOT EXECUTED 1585dd: 85 c0 test %eax,%eax <== NOT EXECUTED 1585df: 74 12 je 1585f3 <_rename_r+0x37f> <== NOT EXECUTED 1585e1: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 1585e4: 85 c0 test %eax,%eax <== NOT EXECUTED 1585e6: 74 0b je 1585f3 <_rename_r+0x37f> <== NOT EXECUTED 1585e8: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1585eb: ff 75 a4 pushl -0x5c(%ebp) <== NOT EXECUTED 1585ee: ff d0 call *%eax <== NOT EXECUTED 1585f0: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_filesystem_freenode( &old_loc ); 1585f3: 8b 45 dc mov -0x24(%ebp),%eax <== NOT EXECUTED 1585f6: 85 c0 test %eax,%eax <== NOT EXECUTED 1585f8: 74 83 je 15857d <_rename_r+0x309> <== NOT EXECUTED 1585fa: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 1585fd: 85 c0 test %eax,%eax <== NOT EXECUTED 1585ff: 0f 84 78 ff ff ff je 15857d <_rename_r+0x309> <== NOT EXECUTED 158605: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 158608: 8d 55 d0 lea -0x30(%ebp),%edx <== NOT EXECUTED 15860b: 52 push %edx <== NOT EXECUTED 15860c: ff d0 call *%eax <== NOT EXECUTED 15860e: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 158611: e9 67 ff ff ff jmp 15857d <_rename_r+0x309> <== NOT EXECUTED 0010e4b0 <_stat_r>: int _STAT_R_NAME( struct _reent *ptr __attribute__((unused)), const char *path, struct stat *buf ) { 10e4b0: 55 push %ebp <== NOT EXECUTED 10e4b1: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10e4b3: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 10e4b6: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED return _STAT_NAME( path, buf ); 10e4b9: 8b 55 10 mov 0x10(%ebp),%edx <== NOT EXECUTED 10e4bc: 89 55 0c mov %edx,0xc(%ebp) <== NOT EXECUTED 10e4bf: 89 45 08 mov %eax,0x8(%ebp) <== NOT EXECUTED } 10e4c2: c9 leave <== NOT EXECUTED struct _reent *ptr __attribute__((unused)), const char *path, struct stat *buf ) { return _STAT_NAME( path, buf ); 10e4c3: e9 18 ff ff ff jmp 10e3e0 <== NOT EXECUTED 00113288 <_unlink_r>: int _unlink_r( struct _reent *ptr __attribute__((unused)), const char *path ) { 113288: 55 push %ebp <== NOT EXECUTED 113289: 89 e5 mov %esp,%ebp <== NOT EXECUTED 11328b: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED return unlink( path ); 11328e: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED 113291: 89 45 08 mov %eax,0x8(%ebp) <== NOT EXECUTED } 113294: c9 leave <== NOT EXECUTED int _unlink_r( struct _reent *ptr __attribute__((unused)), const char *path ) { return unlink( path ); 113295: e9 ae fd ff ff jmp 113048 <== NOT EXECUTED 0011ed68 <_write_r>: struct _reent *ptr __attribute__((unused)), int fd, const void *buf, size_t nbytes ) { 11ed68: 55 push %ebp 11ed69: 89 e5 mov %esp,%ebp 11ed6b: 83 ec 08 sub $0x8,%esp 11ed6e: 8b 45 0c mov 0xc(%ebp),%eax 11ed71: 8b 55 10 mov 0x10(%ebp),%edx return write( fd, buf, nbytes ); 11ed74: 8b 4d 14 mov 0x14(%ebp),%ecx 11ed77: 89 4d 10 mov %ecx,0x10(%ebp) 11ed7a: 89 55 0c mov %edx,0xc(%ebp) 11ed7d: 89 45 08 mov %eax,0x8(%ebp) } 11ed80: c9 leave int fd, const void *buf, size_t nbytes ) { return write( fd, buf, nbytes ); 11ed81: e9 1a 01 00 00 jmp 11eea0 <== ALWAYS TAKEN 0012afc8 : int access( const char *path, int amode ) { 12afc8: 55 push %ebp 12afc9: 89 e5 mov %esp,%ebp 12afcb: 53 push %ebx 12afcc: 83 ec 5c sub $0x5c,%esp 12afcf: 8b 5d 0c mov 0xc(%ebp),%ebx struct stat statbuf; if ( stat(path, &statbuf) ) 12afd2: 8d 45 b4 lea -0x4c(%ebp),%eax 12afd5: 50 push %eax 12afd6: ff 75 08 pushl 0x8(%ebp) 12afd9: e8 02 34 fe ff call 10e3e0 12afde: 83 c4 10 add $0x10,%esp 12afe1: 85 c0 test %eax,%eax 12afe3: 75 1f jne 12b004 return -1; if ( amode & R_OK ) { 12afe5: f6 c3 04 test $0x4,%bl 12afe8: 75 12 jne 12affc if (!( statbuf.st_mode & S_IREAD )) return -1; } if ( amode & W_OK ) { 12afea: f6 c3 02 test $0x2,%bl 12afed: 75 29 jne 12b018 if ( !( statbuf.st_mode & S_IWRITE ) ) return -1; } if ( amode & X_OK ) { 12afef: 83 e3 01 and $0x1,%ebx 12aff2: 75 1c jne 12b010 if ( !( statbuf.st_mode & S_IEXEC ) ) 12aff4: 31 c0 xor %eax,%eax return -1; } return 0; } 12aff6: 8b 5d fc mov -0x4(%ebp),%ebx 12aff9: c9 leave 12affa: c3 ret 12affb: 90 nop <== NOT EXECUTED if ( stat(path, &statbuf) ) return -1; if ( amode & R_OK ) { if (!( statbuf.st_mode & S_IREAD )) 12affc: f6 45 c1 01 testb $0x1,-0x3f(%ebp) 12b000: 75 e8 jne 12afea 12b002: 66 90 xchg %ax,%ax if ( !( statbuf.st_mode & S_IWRITE ) ) return -1; } if ( amode & X_OK ) { if ( !( statbuf.st_mode & S_IEXEC ) ) 12b004: b8 ff ff ff ff mov $0xffffffff,%eax return -1; } return 0; } 12b009: 8b 5d fc mov -0x4(%ebp),%ebx 12b00c: c9 leave 12b00d: c3 ret 12b00e: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( !( statbuf.st_mode & S_IWRITE ) ) return -1; } if ( amode & X_OK ) { if ( !( statbuf.st_mode & S_IEXEC ) ) 12b010: f6 45 c0 40 testb $0x40,-0x40(%ebp) 12b014: 75 de jne 12aff4 12b016: eb ec jmp 12b004 <== ALWAYS TAKEN if (!( statbuf.st_mode & S_IREAD )) return -1; } if ( amode & W_OK ) { if ( !( statbuf.st_mode & S_IWRITE ) ) 12b018: 80 7d c0 00 cmpb $0x0,-0x40(%ebp) 12b01c: 78 d1 js 12afef 12b01e: eb e4 jmp 12b004 <== ALWAYS TAKEN 0010b3f8 : int adjtime( struct timeval *delta, struct timeval *olddelta ) { 10b3f8: 55 push %ebp 10b3f9: 89 e5 mov %esp,%ebp 10b3fb: 57 push %edi 10b3fc: 56 push %esi 10b3fd: 53 push %ebx 10b3fe: 83 ec 1c sub $0x1c,%esp 10b401: 8b 5d 08 mov 0x8(%ebp),%ebx 10b404: 8b 75 0c mov 0xc(%ebp),%esi long adjustment; /* * Simple validations */ if ( !delta ) 10b407: 85 db test %ebx,%ebx 10b409: 0f 84 f1 00 00 00 je 10b500 rtems_set_errno_and_return_minus_one( EINVAL ); if ( delta->tv_usec >= TOD_MICROSECONDS_PER_SECOND ) 10b40f: 8b 53 04 mov 0x4(%ebx),%edx 10b412: 81 fa 3f 42 0f 00 cmp $0xf423f,%edx 10b418: 0f 87 e2 00 00 00 ja 10b500 rtems_set_errno_and_return_minus_one( EINVAL ); if ( olddelta ) { 10b41e: 85 f6 test %esi,%esi 10b420: 74 10 je 10b432 olddelta->tv_sec = 0; 10b422: c7 06 00 00 00 00 movl $0x0,(%esi) olddelta->tv_usec = 0; 10b428: c7 46 04 00 00 00 00 movl $0x0,0x4(%esi) 10b42f: 8b 53 04 mov 0x4(%ebx),%edx } /* convert delta to microseconds */ adjustment = (delta->tv_sec * TOD_MICROSECONDS_PER_SECOND); 10b432: 8b 03 mov (%ebx),%eax 10b434: 8d 04 80 lea (%eax,%eax,4),%eax 10b437: 8d 04 80 lea (%eax,%eax,4),%eax 10b43a: 8d 04 80 lea (%eax,%eax,4),%eax 10b43d: 8d 04 80 lea (%eax,%eax,4),%eax 10b440: 8d 04 80 lea (%eax,%eax,4),%eax 10b443: 8d 04 80 lea (%eax,%eax,4),%eax 10b446: c1 e0 06 shl $0x6,%eax adjustment += delta->tv_usec; /* too small to account for */ if ( adjustment < rtems_configuration_get_microseconds_per_tick() ) 10b449: 8d 04 02 lea (%edx,%eax,1),%eax 10b44c: 3b 05 0c 48 12 00 cmp 0x12480c,%eax 10b452: 73 0c jae 10b460 _Thread_Enable_dispatch(); /* set the user's output */ if ( olddelta ) *olddelta = *delta; 10b454: 31 c0 xor %eax,%eax return 0; } 10b456: 8d 65 f4 lea -0xc(%ebp),%esp 10b459: 5b pop %ebx 10b45a: 5e pop %esi 10b45b: 5f pop %edi 10b45c: c9 leave 10b45d: c3 ret 10b45e: 66 90 xchg %ax,%ax <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10b460: a1 f8 8a 12 00 mov 0x128af8,%eax 10b465: 40 inc %eax 10b466: a3 f8 8a 12 00 mov %eax,0x128af8 * This prevents context switches while we are adjusting the TOD */ _Thread_Disable_dispatch(); _TOD_Get( &ts ); 10b46b: 83 ec 0c sub $0xc,%esp 10b46e: 8d 7d e0 lea -0x20(%ebp),%edi 10b471: 57 push %edi 10b472: e8 71 17 00 00 call 10cbe8 <_TOD_Get> ts.tv_sec += delta->tv_sec; 10b477: 8b 03 mov (%ebx),%eax 10b479: 01 45 e0 add %eax,-0x20(%ebp) ts.tv_nsec += delta->tv_usec * TOD_NANOSECONDS_PER_MICROSECOND; 10b47c: 8b 43 04 mov 0x4(%ebx),%eax 10b47f: 8d 04 80 lea (%eax,%eax,4),%eax 10b482: 8d 04 80 lea (%eax,%eax,4),%eax 10b485: 8d 04 80 lea (%eax,%eax,4),%eax 10b488: c1 e0 03 shl $0x3,%eax 10b48b: 03 45 e4 add -0x1c(%ebp),%eax 10b48e: 89 45 e4 mov %eax,-0x1c(%ebp) /* if adjustment is too much positive */ while ( ts.tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { 10b491: 83 c4 10 add $0x10,%esp 10b494: 3d ff c9 9a 3b cmp $0x3b9ac9ff,%eax 10b499: 76 18 jbe 10b4b3 10b49b: 8b 55 e0 mov -0x20(%ebp),%edx 10b49e: 66 90 xchg %ax,%ax ts.tv_nsec -= TOD_NANOSECONDS_PER_SECOND; 10b4a0: 2d 00 ca 9a 3b sub $0x3b9aca00,%eax * At one point there was a static variable named adjustment * used by this implementation. I don't see any reason for it * to be here based upon the GNU/Linux documentation. */ int adjtime( 10b4a5: 42 inc %edx ts.tv_sec += delta->tv_sec; ts.tv_nsec += delta->tv_usec * TOD_NANOSECONDS_PER_MICROSECOND; /* if adjustment is too much positive */ while ( ts.tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { 10b4a6: 3d ff c9 9a 3b cmp $0x3b9ac9ff,%eax 10b4ab: 77 f3 ja 10b4a0 <== ALWAYS TAKEN 10b4ad: 89 45 e4 mov %eax,-0x1c(%ebp) 10b4b0: 89 55 e0 mov %edx,-0x20(%ebp) 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) ) { 10b4b3: 3d 00 36 65 c4 cmp $0xc4653600,%eax 10b4b8: 77 19 ja 10b4d3 <== ALWAYS TAKEN 10b4ba: 8b 55 e0 mov -0x20(%ebp),%edx 10b4bd: 8d 76 00 lea 0x0(%esi),%esi ts.tv_nsec += TOD_NANOSECONDS_PER_SECOND; 10b4c0: 05 00 ca 9a 3b add $0x3b9aca00,%eax * At one point there was a static variable named adjustment * used by this implementation. I don't see any reason for it * to be here based upon the GNU/Linux documentation. */ int adjtime( 10b4c5: 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) ) { 10b4c6: 3d 00 36 65 c4 cmp $0xc4653600,%eax 10b4cb: 76 f3 jbe 10b4c0 10b4cd: 89 45 e4 mov %eax,-0x1c(%ebp) 10b4d0: 89 55 e0 mov %edx,-0x20(%ebp) ts.tv_nsec += TOD_NANOSECONDS_PER_SECOND; ts.tv_sec--; } _TOD_Set( &ts ); 10b4d3: 83 ec 0c sub $0xc,%esp 10b4d6: 57 push %edi 10b4d7: e8 98 17 00 00 call 10cc74 <_TOD_Set> _Thread_Enable_dispatch(); 10b4dc: e8 5b 29 00 00 call 10de3c <_Thread_Enable_dispatch> /* set the user's output */ if ( olddelta ) 10b4e1: 83 c4 10 add $0x10,%esp 10b4e4: 85 f6 test %esi,%esi 10b4e6: 0f 84 68 ff ff ff je 10b454 <== ALWAYS TAKEN *olddelta = *delta; 10b4ec: 8b 03 mov (%ebx),%eax 10b4ee: 8b 53 04 mov 0x4(%ebx),%edx 10b4f1: 89 06 mov %eax,(%esi) 10b4f3: 89 56 04 mov %edx,0x4(%esi) 10b4f6: 31 c0 xor %eax,%eax return 0; } 10b4f8: 8d 65 f4 lea -0xc(%ebp),%esp 10b4fb: 5b pop %ebx 10b4fc: 5e pop %esi 10b4fd: 5f pop %edi 10b4fe: c9 leave 10b4ff: c3 ret */ if ( !delta ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( delta->tv_usec >= TOD_MICROSECONDS_PER_SECOND ) rtems_set_errno_and_return_minus_one( EINVAL ); 10b500: e8 af 8c 00 00 call 1141b4 <__errno> 10b505: c7 00 16 00 00 00 movl $0x16,(%eax) 10b50b: b8 ff ff ff ff mov $0xffffffff,%eax 10b510: e9 41 ff ff ff jmp 10b456 <== ALWAYS TAKEN 00112338 : } unsigned int alarm( unsigned int seconds ) { 112338: 55 push %ebp 112339: 89 e5 mov %esp,%ebp 11233b: 57 push %edi 11233c: 56 push %esi 11233d: 53 push %ebx 11233e: 83 ec 0c sub $0xc,%esp 112341: 8b 5d 08 mov 0x8(%ebp),%ebx /* * Initialize the timer used to implement alarm(). */ if ( !the_timer->routine ) { 112344: a1 3c 7e 12 00 mov 0x127e3c,%eax 112349: 85 c0 test %eax,%eax 11234b: 74 43 je 112390 _Watchdog_Initialize( the_timer, _POSIX_signals_Alarm_TSR, 0, NULL ); } else { Watchdog_States state; state = _Watchdog_Remove( the_timer ); 11234d: 83 ec 0c sub $0xc,%esp 112350: 68 20 7e 12 00 push $0x127e20 112355: e8 de c1 ff ff call 10e538 <_Watchdog_Remove> if ( (state == WATCHDOG_ACTIVE) || (state == WATCHDOG_REMOVE_IT) ) { 11235a: 83 e8 02 sub $0x2,%eax 11235d: 83 c4 10 add $0x10,%esp 112360: 83 f8 01 cmp $0x1,%eax 112363: 76 57 jbe 1123bc 112365: 31 f6 xor %esi,%esi remaining = the_timer->initial - ((the_timer->stop_time - the_timer->start_time) / TOD_TICKS_PER_SECOND); } } if ( seconds ) 112367: 85 db test %ebx,%ebx 112369: 74 1b je 112386 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 11236b: 89 1d 2c 7e 12 00 mov %ebx,0x127e2c _Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog ); 112371: 83 ec 08 sub $0x8,%esp 112374: 68 20 7e 12 00 push $0x127e20 112379: 68 ac 74 12 00 push $0x1274ac 11237e: e8 7d c0 ff ff call 10e400 <_Watchdog_Insert> 112383: 83 c4 10 add $0x10,%esp _Watchdog_Insert_seconds( the_timer, seconds ); return remaining; } 112386: 89 f0 mov %esi,%eax 112388: 8d 65 f4 lea -0xc(%ebp),%esp 11238b: 5b pop %ebx 11238c: 5e pop %esi 11238d: 5f pop %edi 11238e: c9 leave 11238f: c3 ret Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 112390: c7 05 28 7e 12 00 00 movl $0x0,0x127e28 112397: 00 00 00 the_watchdog->routine = routine; 11239a: c7 05 3c 7e 12 00 e0 movl $0x1123e0,0x127e3c 1123a1: 23 11 00 the_watchdog->id = id; 1123a4: c7 05 40 7e 12 00 00 movl $0x0,0x127e40 1123ab: 00 00 00 the_watchdog->user_data = user_data; 1123ae: c7 05 44 7e 12 00 00 movl $0x0,0x127e44 1123b5: 00 00 00 1123b8: 31 f6 xor %esi,%esi 1123ba: eb ab jmp 112367 <== ALWAYS TAKEN * 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 - 1123bc: 8b 35 2c 7e 12 00 mov 0x127e2c,%esi ((the_timer->stop_time - the_timer->start_time) / TOD_TICKS_PER_SECOND); 1123c2: 8b 3d 38 7e 12 00 mov 0x127e38,%edi 1123c8: 2b 3d 34 7e 12 00 sub 0x127e34,%edi 1123ce: e8 15 09 00 00 call 112ce8 1123d3: 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 - 1123d5: 89 f8 mov %edi,%eax 1123d7: 31 d2 xor %edx,%edx 1123d9: f7 f1 div %ecx 1123db: 29 c6 sub %eax,%esi 1123dd: eb 88 jmp 112367 <== ALWAYS TAKEN 0010f8bc : ) { register char *cptr; size_t length; MSBUMP(calloc_calls, 1); 10f8bc: 55 push %ebp 10f8bd: 89 e5 mov %esp,%ebp 10f8bf: 57 push %edi 10f8c0: 53 push %ebx 10f8c1: 8b 5d 0c mov 0xc(%ebp),%ebx 10f8c4: ff 05 74 72 12 00 incl 0x127274 length = nelem * elsize; 10f8ca: 0f af 5d 08 imul 0x8(%ebp),%ebx cptr = malloc( length ); 10f8ce: 83 ec 0c sub $0xc,%esp 10f8d1: 53 push %ebx 10f8d2: e8 55 89 ff ff call 10822c <== ALWAYS TAKEN 10f8d7: 89 c2 mov %eax,%edx if ( cptr ) 10f8d9: 83 c4 10 add $0x10,%esp 10f8dc: 85 c0 test %eax,%eax 10f8de: 74 08 je 10f8e8 <== ALWAYS TAKEN memset( cptr, '\0', length ); 10f8e0: 31 c0 xor %eax,%eax 10f8e2: 89 d7 mov %edx,%edi 10f8e4: 89 d9 mov %ebx,%ecx 10f8e6: f3 aa rep stos %al,%es:(%edi) MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */ 10f8e8: ff 0d 64 72 12 00 decl 0x127264 return cptr; } 10f8ee: 89 d0 mov %edx,%eax 10f8f0: 8d 65 f8 lea -0x8(%ebp),%esp 10f8f3: 5b pop %ebx 10f8f4: 5f pop %edi 10f8f5: c9 leave 10f8f6: c3 ret 0012b0e8 : #include int chdir( const char *pathname ) { 12b0e8: 55 push %ebp 12b0e9: 89 e5 mov %esp,%ebp 12b0eb: 57 push %edi 12b0ec: 56 push %esi 12b0ed: 83 ec 2c sub $0x2c,%esp 12b0f0: 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 ); 12b0f3: 31 c0 xor %eax,%eax 12b0f5: b9 ff ff ff ff mov $0xffffffff,%ecx 12b0fa: 89 d7 mov %edx,%edi 12b0fc: f2 ae repnz scas %es:(%edi),%al 12b0fe: f7 d1 not %ecx 12b100: 49 dec %ecx /* * Get the node where we wish to go. */ result = rtems_filesystem_evaluate_path( 12b101: 6a 01 push $0x1 12b103: 8d 75 e4 lea -0x1c(%ebp),%esi 12b106: 56 push %esi 12b107: 6a 01 push $0x1 12b109: 51 push %ecx 12b10a: 52 push %edx 12b10b: e8 30 1d fe ff call 10ce40 <== ALWAYS TAKEN pathname, strlen( pathname ), RTEMS_LIBIO_PERMS_SEARCH, &loc, true ); if ( result != 0 ) 12b110: 83 c4 20 add $0x20,%esp 12b113: 85 c0 test %eax,%eax 12b115: 75 6d jne 12b184 /* * Verify you can change directory into this node. */ if ( !loc.ops->node_type_h ) { 12b117: 8b 55 f0 mov -0x10(%ebp),%edx 12b11a: 8b 42 10 mov 0x10(%edx),%eax 12b11d: 85 c0 test %eax,%eax 12b11f: 74 47 je 12b168 <== ALWAYS TAKEN rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { 12b121: 83 ec 0c sub $0xc,%esp 12b124: 56 push %esi 12b125: ff d0 call *%eax 12b127: 83 c4 10 add $0x10,%esp 12b12a: 48 dec %eax 12b12b: 75 63 jne 12b190 rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTDIR ); } rtems_filesystem_freenode( &rtems_filesystem_current ); 12b12d: 8b 3d c4 93 16 00 mov 0x1693c4,%edi 12b133: 8b 47 10 mov 0x10(%edi),%eax 12b136: 85 c0 test %eax,%eax 12b138: 74 19 je 12b153 <== ALWAYS TAKEN 12b13a: 8b 40 1c mov 0x1c(%eax),%eax 12b13d: 85 c0 test %eax,%eax 12b13f: 74 12 je 12b153 <== ALWAYS TAKEN 12b141: 83 ec 0c sub $0xc,%esp 12b144: 83 c7 04 add $0x4,%edi 12b147: 57 push %edi 12b148: ff d0 call *%eax 12b14a: 8b 3d c4 93 16 00 mov 0x1693c4,%edi 12b150: 83 c4 10 add $0x10,%esp rtems_filesystem_current = loc; 12b153: 83 c7 04 add $0x4,%edi 12b156: b9 05 00 00 00 mov $0x5,%ecx 12b15b: f3 a5 rep movsl %ds:(%esi),%es:(%edi) 12b15d: 31 c0 xor %eax,%eax return 0; } 12b15f: 8d 65 f8 lea -0x8(%ebp),%esp 12b162: 5e pop %esi 12b163: 5f pop %edi 12b164: c9 leave 12b165: c3 ret 12b166: 66 90 xchg %ax,%ax <== NOT EXECUTED /* * Verify you can change directory into this node. */ if ( !loc.ops->node_type_h ) { rtems_filesystem_freenode( &loc ); 12b168: 8b 42 1c mov 0x1c(%edx),%eax <== NOT EXECUTED 12b16b: 85 c0 test %eax,%eax <== NOT EXECUTED 12b16d: 74 09 je 12b178 <== NOT EXECUTED 12b16f: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12b172: 56 push %esi <== NOT EXECUTED 12b173: ff d0 call *%eax <== NOT EXECUTED 12b175: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 12b178: e8 93 73 01 00 call 142510 <__errno> <== NOT EXECUTED 12b17d: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 12b183: 90 nop <== NOT EXECUTED 12b184: b8 ff ff ff ff mov $0xffffffff,%eax rtems_filesystem_freenode( &rtems_filesystem_current ); rtems_filesystem_current = loc; return 0; } 12b189: 8d 65 f8 lea -0x8(%ebp),%esp 12b18c: 5e pop %esi 12b18d: 5f pop %edi 12b18e: c9 leave 12b18f: c3 ret rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { rtems_filesystem_freenode( &loc ); 12b190: 8b 45 f0 mov -0x10(%ebp),%eax 12b193: 85 c0 test %eax,%eax 12b195: 74 10 je 12b1a7 <== ALWAYS TAKEN 12b197: 8b 40 1c mov 0x1c(%eax),%eax 12b19a: 85 c0 test %eax,%eax 12b19c: 74 09 je 12b1a7 <== ALWAYS TAKEN 12b19e: 83 ec 0c sub $0xc,%esp 12b1a1: 56 push %esi 12b1a2: ff d0 call *%eax 12b1a4: 83 c4 10 add $0x10,%esp rtems_set_errno_and_return_minus_one( ENOTDIR ); 12b1a7: e8 64 73 01 00 call 142510 <__errno> 12b1ac: c7 00 14 00 00 00 movl $0x14,(%eax) 12b1b2: b8 ff ff ff ff mov $0xffffffff,%eax 12b1b7: eb a6 jmp 12b15f <== ALWAYS TAKEN 0010cb84 : int chmod( const char *path, mode_t mode ) { 10cb84: 55 push %ebp 10cb85: 89 e5 mov %esp,%ebp 10cb87: 57 push %edi 10cb88: 56 push %esi 10cb89: 53 push %ebx 10cb8a: 83 ec 38 sub $0x38,%esp 10cb8d: 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 ); 10cb90: 31 c0 xor %eax,%eax 10cb92: b9 ff ff ff ff mov $0xffffffff,%ecx 10cb97: 89 d7 mov %edx,%edi 10cb99: f2 ae repnz scas %es:(%edi),%al 10cb9b: f7 d1 not %ecx 10cb9d: 49 dec %ecx 10cb9e: 6a 01 push $0x1 10cba0: 8d 5d d4 lea -0x2c(%ebp),%ebx 10cba3: 53 push %ebx 10cba4: 6a 00 push $0x0 10cba6: 51 push %ecx 10cba7: 52 push %edx 10cba8: e8 93 02 00 00 call 10ce40 if ( status != 0 ) 10cbad: 83 c4 20 add $0x20,%esp 10cbb0: 85 c0 test %eax,%eax 10cbb2: 75 60 jne 10cc14 return -1; if ( !loc.handlers ){ 10cbb4: 8b 45 dc mov -0x24(%ebp),%eax 10cbb7: 85 c0 test %eax,%eax 10cbb9: 74 36 je 10cbf1 <== ALWAYS TAKEN rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( EBADF ); } if ( !loc.handlers->fchmod_h ){ 10cbbb: 8b 40 1c mov 0x1c(%eax),%eax 10cbbe: 85 c0 test %eax,%eax 10cbc0: 74 62 je 10cc24 <== ALWAYS TAKEN rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.handlers->fchmod_h)( &loc, mode ); 10cbc2: 83 ec 08 sub $0x8,%esp 10cbc5: ff 75 0c pushl 0xc(%ebp) 10cbc8: 53 push %ebx 10cbc9: ff d0 call *%eax 10cbcb: 89 c6 mov %eax,%esi rtems_filesystem_freenode( &loc ); 10cbcd: 8b 45 e0 mov -0x20(%ebp),%eax 10cbd0: 83 c4 10 add $0x10,%esp 10cbd3: 85 c0 test %eax,%eax 10cbd5: 74 10 je 10cbe7 <== ALWAYS TAKEN 10cbd7: 8b 40 1c mov 0x1c(%eax),%eax 10cbda: 85 c0 test %eax,%eax 10cbdc: 74 09 je 10cbe7 <== ALWAYS TAKEN 10cbde: 83 ec 0c sub $0xc,%esp 10cbe1: 53 push %ebx 10cbe2: ff d0 call *%eax 10cbe4: 83 c4 10 add $0x10,%esp return result; } 10cbe7: 89 f0 mov %esi,%eax 10cbe9: 8d 65 f4 lea -0xc(%ebp),%esp 10cbec: 5b pop %ebx 10cbed: 5e pop %esi 10cbee: 5f pop %edi 10cbef: c9 leave 10cbf0: c3 ret status = rtems_filesystem_evaluate_path( path, strlen( path ), 0, &loc, true ); if ( status != 0 ) return -1; if ( !loc.handlers ){ rtems_filesystem_freenode( &loc ); 10cbf1: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED 10cbf4: 85 c0 test %eax,%eax <== NOT EXECUTED 10cbf6: 74 10 je 10cc08 <== NOT EXECUTED 10cbf8: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 10cbfb: 85 c0 test %eax,%eax <== NOT EXECUTED 10cbfd: 74 09 je 10cc08 <== NOT EXECUTED 10cbff: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10cc02: 53 push %ebx <== NOT EXECUTED 10cc03: ff d0 call *%eax <== NOT EXECUTED 10cc05: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EBADF ); 10cc08: e8 03 59 03 00 call 142510 <__errno> <== NOT EXECUTED 10cc0d: c7 00 09 00 00 00 movl $0x9,(%eax) <== NOT EXECUTED 10cc13: 90 nop <== NOT EXECUTED 10cc14: be ff ff ff ff mov $0xffffffff,%esi result = (*loc.handlers->fchmod_h)( &loc, mode ); rtems_filesystem_freenode( &loc ); return result; } 10cc19: 89 f0 mov %esi,%eax 10cc1b: 8d 65 f4 lea -0xc(%ebp),%esp 10cc1e: 5b pop %ebx 10cc1f: 5e pop %esi 10cc20: 5f pop %edi 10cc21: c9 leave 10cc22: c3 ret 10cc23: 90 nop <== NOT EXECUTED rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( EBADF ); } if ( !loc.handlers->fchmod_h ){ rtems_filesystem_freenode( &loc ); 10cc24: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED 10cc27: 85 c0 test %eax,%eax <== NOT EXECUTED 10cc29: 74 10 je 10cc3b <== NOT EXECUTED 10cc2b: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 10cc2e: 85 c0 test %eax,%eax <== NOT EXECUTED 10cc30: 74 09 je 10cc3b <== NOT EXECUTED 10cc32: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10cc35: 53 push %ebx <== NOT EXECUTED 10cc36: ff d0 call *%eax <== NOT EXECUTED 10cc38: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 10cc3b: e8 d0 58 03 00 call 142510 <__errno> <== NOT EXECUTED 10cc40: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 10cc46: be ff ff ff ff mov $0xffffffff,%esi <== NOT EXECUTED 10cc4b: eb 9a jmp 10cbe7 <== NOT EXECUTED 0012b1bc : int chown( const char *path, uid_t owner, gid_t group ) { 12b1bc: 55 push %ebp 12b1bd: 89 e5 mov %esp,%ebp 12b1bf: 57 push %edi 12b1c0: 56 push %esi 12b1c1: 53 push %ebx 12b1c2: 83 ec 38 sub $0x38,%esp 12b1c5: 8b 55 08 mov 0x8(%ebp),%edx 12b1c8: 8b 75 0c mov 0xc(%ebp),%esi 12b1cb: 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 ) ) 12b1ce: 31 c0 xor %eax,%eax 12b1d0: b9 ff ff ff ff mov $0xffffffff,%ecx 12b1d5: 89 d7 mov %edx,%edi 12b1d7: f2 ae repnz scas %es:(%edi),%al 12b1d9: f7 d1 not %ecx 12b1db: 49 dec %ecx 12b1dc: 6a 01 push $0x1 12b1de: 8d 7d d4 lea -0x2c(%ebp),%edi 12b1e1: 57 push %edi 12b1e2: 6a 00 push $0x0 12b1e4: 51 push %ecx 12b1e5: 52 push %edx 12b1e6: e8 55 1c fe ff call 10ce40 12b1eb: 83 c4 20 add $0x20,%esp 12b1ee: 85 c0 test %eax,%eax 12b1f0: 75 5a jne 12b24c return -1; if ( !loc.ops->chown_h ) { 12b1f2: 8b 55 e0 mov -0x20(%ebp),%edx 12b1f5: 8b 42 18 mov 0x18(%edx),%eax 12b1f8: 85 c0 test %eax,%eax 12b1fa: 74 34 je 12b230 <== ALWAYS TAKEN rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.ops->chown_h)( &loc, owner, group ); 12b1fc: 52 push %edx 12b1fd: 0f b7 db movzwl %bx,%ebx 12b200: 53 push %ebx 12b201: 0f b7 f6 movzwl %si,%esi 12b204: 56 push %esi 12b205: 57 push %edi 12b206: ff d0 call *%eax 12b208: 89 c3 mov %eax,%ebx rtems_filesystem_freenode( &loc ); 12b20a: 8b 45 e0 mov -0x20(%ebp),%eax 12b20d: 83 c4 10 add $0x10,%esp 12b210: 85 c0 test %eax,%eax 12b212: 74 10 je 12b224 <== ALWAYS TAKEN 12b214: 8b 40 1c mov 0x1c(%eax),%eax 12b217: 85 c0 test %eax,%eax 12b219: 74 09 je 12b224 <== ALWAYS TAKEN 12b21b: 83 ec 0c sub $0xc,%esp 12b21e: 57 push %edi 12b21f: ff d0 call *%eax 12b221: 83 c4 10 add $0x10,%esp return result; } 12b224: 89 d8 mov %ebx,%eax 12b226: 8d 65 f4 lea -0xc(%ebp),%esp 12b229: 5b pop %ebx 12b22a: 5e pop %esi 12b22b: 5f pop %edi 12b22c: c9 leave 12b22d: c3 ret 12b22e: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x00, &loc, true ) ) return -1; if ( !loc.ops->chown_h ) { rtems_filesystem_freenode( &loc ); 12b230: 8b 42 1c mov 0x1c(%edx),%eax <== NOT EXECUTED 12b233: 85 c0 test %eax,%eax <== NOT EXECUTED 12b235: 74 09 je 12b240 <== NOT EXECUTED 12b237: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12b23a: 57 push %edi <== NOT EXECUTED 12b23b: ff d0 call *%eax <== NOT EXECUTED 12b23d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 12b240: e8 cb 72 01 00 call 142510 <__errno> <== NOT EXECUTED 12b245: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 12b24b: 90 nop <== NOT EXECUTED 12b24c: bb ff ff ff ff mov $0xffffffff,%ebx result = (*loc.ops->chown_h)( &loc, owner, group ); rtems_filesystem_freenode( &loc ); return result; } 12b251: 89 d8 mov %ebx,%eax 12b253: 8d 65 f4 lea -0xc(%ebp),%esp 12b256: 5b pop %ebx 12b257: 5e pop %esi 12b258: 5f pop %edi 12b259: c9 leave 12b25a: c3 ret 0012b25c : #include int chroot( const char *pathname ) { 12b25c: 55 push %ebp 12b25d: 89 e5 mov %esp,%ebp 12b25f: 57 push %edi 12b260: 56 push %esi 12b261: 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) { 12b264: 81 3d c4 93 16 00 20 cmpl $0x16ef20,0x1693c4 12b26b: ef 16 00 12b26e: 74 6c je 12b2dc <== NEVER TAKEN rtems_libio_set_private_env(); /* try to set a new private env*/ if (rtems_current_user_env == &rtems_global_user_env) /* not ok */ rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = chdir(pathname); 12b270: 83 ec 0c sub $0xc,%esp 12b273: ff 75 08 pushl 0x8(%ebp) 12b276: e8 6d fe ff ff call 12b0e8 if (result) { 12b27b: 83 c4 10 add $0x10,%esp 12b27e: 85 c0 test %eax,%eax 12b280: 75 7e jne 12b300 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( errno ); } /* clone the new root location */ if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) { 12b282: 83 ec 0c sub $0xc,%esp 12b285: 6a 00 push $0x0 12b287: 8d 75 e4 lea -0x1c(%ebp),%esi 12b28a: 56 push %esi 12b28b: 6a 00 push $0x0 12b28d: 6a 01 push $0x1 12b28f: 68 7c ba 15 00 push $0x15ba7c 12b294: e8 a7 1b fe ff call 10ce40 <== ALWAYS TAKEN 12b299: 83 c4 20 add $0x20,%esp 12b29c: 85 c0 test %eax,%eax 12b29e: 75 60 jne 12b300 <== 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); 12b2a0: 8b 3d c4 93 16 00 mov 0x1693c4,%edi 12b2a6: 8b 47 24 mov 0x24(%edi),%eax 12b2a9: 85 c0 test %eax,%eax 12b2ab: 74 19 je 12b2c6 <== ALWAYS TAKEN 12b2ad: 8b 40 1c mov 0x1c(%eax),%eax 12b2b0: 85 c0 test %eax,%eax 12b2b2: 74 12 je 12b2c6 <== ALWAYS TAKEN 12b2b4: 83 ec 0c sub $0xc,%esp 12b2b7: 83 c7 18 add $0x18,%edi 12b2ba: 57 push %edi 12b2bb: ff d0 call *%eax 12b2bd: 8b 3d c4 93 16 00 mov 0x1693c4,%edi 12b2c3: 83 c4 10 add $0x10,%esp rtems_filesystem_root = loc; 12b2c6: 83 c7 18 add $0x18,%edi 12b2c9: b9 05 00 00 00 mov $0x5,%ecx 12b2ce: f3 a5 rep movsl %ds:(%esi),%es:(%edi) 12b2d0: 31 c0 xor %eax,%eax return 0; } 12b2d2: 8d 65 f8 lea -0x8(%ebp),%esp 12b2d5: 5e pop %esi 12b2d6: 5f pop %edi 12b2d7: c9 leave 12b2d8: c3 ret 12b2d9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED int result; rtems_filesystem_location_info_t loc; /* an automatic call to new private env the first time */ if (rtems_current_user_env == &rtems_global_user_env) { rtems_libio_set_private_env(); /* try to set a new private env*/ 12b2dc: e8 43 15 00 00 call 12c824 if (rtems_current_user_env == &rtems_global_user_env) /* not ok */ 12b2e1: 81 3d c4 93 16 00 20 cmpl $0x16ef20,0x1693c4 12b2e8: ef 16 00 12b2eb: 75 83 jne 12b270 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); 12b2ed: e8 1e 72 01 00 call 142510 <__errno> <== NOT EXECUTED 12b2f2: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 12b2f8: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 12b2fb: eb d5 jmp 12b2d2 <== NOT EXECUTED 12b2fd: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED } /* clone the new root location */ if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) { /* our cwd has changed, though - but there is no easy way of return :-( */ rtems_set_errno_and_return_minus_one( errno ); 12b300: e8 0b 72 01 00 call 142510 <__errno> <== NOT EXECUTED 12b305: 89 c6 mov %eax,%esi <== NOT EXECUTED 12b307: e8 04 72 01 00 call 142510 <__errno> <== NOT EXECUTED 12b30c: 8b 00 mov (%eax),%eax <== NOT EXECUTED 12b30e: 89 06 mov %eax,(%esi) <== NOT EXECUTED 12b310: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 12b315: eb bb jmp 12b2d2 <== NOT EXECUTED 0010b780 : int clock_getres( clockid_t clock_id, struct timespec *res ) { 10b780: 55 push %ebp 10b781: 89 e5 mov %esp,%ebp 10b783: 53 push %ebx 10b784: 83 ec 04 sub $0x4,%esp 10b787: 8b 4d 0c mov 0xc(%ebp),%ecx if ( !res ) 10b78a: 85 c9 test %ecx,%ecx 10b78c: 74 32 je 10b7c0 rtems_set_errno_and_return_minus_one( EINVAL ); switch ( clock_id ) { 10b78e: 8b 45 08 mov 0x8(%ebp),%eax 10b791: 48 dec %eax 10b792: 83 f8 02 cmp $0x2,%eax 10b795: 77 29 ja 10b7c0 case CLOCK_REALTIME: case CLOCK_PROCESS_CPUTIME: case CLOCK_THREAD_CPUTIME: if ( res ) { res->tv_sec = rtems_configuration_get_microseconds_per_tick() / 10b797: 8b 1d cc 53 12 00 mov 0x1253cc,%ebx 10b79d: ba 83 de 1b 43 mov $0x431bde83,%edx 10b7a2: 89 d8 mov %ebx,%eax 10b7a4: f7 e2 mul %edx 10b7a6: c1 ea 12 shr $0x12,%edx 10b7a9: 89 11 mov %edx,(%ecx) TOD_MICROSECONDS_PER_SECOND; res->tv_nsec = rtems_configuration_get_nanoseconds_per_tick(); 10b7ab: 8d 04 9b lea (%ebx,%ebx,4),%eax 10b7ae: 8d 04 80 lea (%eax,%eax,4),%eax 10b7b1: 8d 04 80 lea (%eax,%eax,4),%eax 10b7b4: c1 e0 03 shl $0x3,%eax 10b7b7: 89 41 04 mov %eax,0x4(%ecx) 10b7ba: 31 c0 xor %eax,%eax default: rtems_set_errno_and_return_minus_one( EINVAL ); } return 0; } 10b7bc: 5a pop %edx 10b7bd: 5b pop %ebx 10b7be: c9 leave 10b7bf: c3 ret res->tv_nsec = rtems_configuration_get_nanoseconds_per_tick(); } break; default: rtems_set_errno_and_return_minus_one( EINVAL ); 10b7c0: e8 4b 8d 00 00 call 114510 <__errno> 10b7c5: c7 00 16 00 00 00 movl $0x16,(%eax) 10b7cb: b8 ff ff ff ff mov $0xffffffff,%eax 10b7d0: eb ea jmp 10b7bc <== ALWAYS TAKEN 0010b310 : int clock_gettime( clockid_t clock_id, struct timespec *tp ) { 10b310: 55 push %ebp 10b311: 89 e5 mov %esp,%ebp 10b313: 83 ec 08 sub $0x8,%esp 10b316: 8b 45 08 mov 0x8(%ebp),%eax 10b319: 8b 55 0c mov 0xc(%ebp),%edx if ( !tp ) 10b31c: 85 d2 test %edx,%edx 10b31e: 74 14 je 10b334 rtems_set_errno_and_return_minus_one( EINVAL ); if ( clock_id == CLOCK_REALTIME ) { 10b320: 83 f8 01 cmp $0x1,%eax 10b323: 74 47 je 10b36c _TOD_Get(tp); return 0; } #ifdef CLOCK_MONOTONIC if ( clock_id == CLOCK_MONOTONIC ) { 10b325: 83 f8 04 cmp $0x4,%eax 10b328: 74 32 je 10b35c <== ALWAYS TAKEN return 0; } #endif #ifdef _POSIX_CPUTIME if ( clock_id == CLOCK_PROCESS_CPUTIME ) { 10b32a: 83 f8 02 cmp $0x2,%eax 10b32d: 74 2d je 10b35c return 0; } #endif #ifdef _POSIX_THREAD_CPUTIME if ( clock_id == CLOCK_THREAD_CPUTIME ) 10b32f: 83 f8 03 cmp $0x3,%eax 10b332: 74 14 je 10b348 rtems_set_errno_and_return_minus_one( ENOSYS ); #endif rtems_set_errno_and_return_minus_one( EINVAL ); 10b334: e8 c3 92 00 00 call 1145fc <__errno> 10b339: c7 00 16 00 00 00 movl $0x16,(%eax) 10b33f: b8 ff ff ff ff mov $0xffffffff,%eax return 0; } 10b344: c9 leave 10b345: c3 ret 10b346: 66 90 xchg %ax,%ax <== NOT EXECUTED } #endif #ifdef _POSIX_THREAD_CPUTIME if ( clock_id == CLOCK_THREAD_CPUTIME ) rtems_set_errno_and_return_minus_one( ENOSYS ); 10b348: e8 af 92 00 00 call 1145fc <__errno> 10b34d: c7 00 58 00 00 00 movl $0x58,(%eax) 10b353: b8 ff ff ff ff mov $0xffffffff,%eax #endif rtems_set_errno_and_return_minus_one( EINVAL ); return 0; } 10b358: c9 leave 10b359: c3 ret 10b35a: 66 90 xchg %ax,%ax <== NOT EXECUTED } #endif #ifdef _POSIX_CPUTIME if ( clock_id == CLOCK_PROCESS_CPUTIME ) { _TOD_Get_uptime_as_timespec( tp ); 10b35c: 83 ec 0c sub $0xc,%esp 10b35f: 52 push %edx 10b360: e8 4b 1e 00 00 call 10d1b0 <_TOD_Get_uptime_as_timespec> 10b365: 31 c0 xor %eax,%eax return 0; 10b367: 83 c4 10 add $0x10,%esp #endif rtems_set_errno_and_return_minus_one( EINVAL ); return 0; } 10b36a: c9 leave 10b36b: c3 ret { if ( !tp ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( clock_id == CLOCK_REALTIME ) { _TOD_Get(tp); 10b36c: 83 ec 0c sub $0xc,%esp 10b36f: 52 push %edx 10b370: e8 e3 1d 00 00 call 10d158 <_TOD_Get> 10b375: 31 c0 xor %eax,%eax return 0; 10b377: 83 c4 10 add $0x10,%esp #endif rtems_set_errno_and_return_minus_one( EINVAL ); return 0; } 10b37a: c9 leave 10b37b: c3 ret 0012cd78 : int clock_settime( clockid_t clock_id, const struct timespec *tp ) { 12cd78: 55 push %ebp 12cd79: 89 e5 mov %esp,%ebp 12cd7b: 83 ec 08 sub $0x8,%esp 12cd7e: 8b 45 08 mov 0x8(%ebp),%eax 12cd81: 8b 55 0c mov 0xc(%ebp),%edx if ( !tp ) 12cd84: 85 d2 test %edx,%edx 12cd86: 74 0f je 12cd97 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); if ( clock_id == CLOCK_REALTIME ) { 12cd88: 83 f8 01 cmp $0x1,%eax 12cd8b: 74 1f je 12cdac _Thread_Disable_dispatch(); _TOD_Set( tp ); _Thread_Enable_dispatch(); } #ifdef _POSIX_CPUTIME else if ( clock_id == CLOCK_PROCESS_CPUTIME ) 12cd8d: 83 f8 02 cmp $0x2,%eax 12cd90: 74 42 je 12cdd4 rtems_set_errno_and_return_minus_one( ENOSYS ); #endif #ifdef _POSIX_THREAD_CPUTIME else if ( clock_id == CLOCK_THREAD_CPUTIME ) 12cd92: 83 f8 03 cmp $0x3,%eax 12cd95: 74 3d je 12cdd4 rtems_set_errno_and_return_minus_one( ENOSYS ); #endif else rtems_set_errno_and_return_minus_one( EINVAL ); 12cd97: e8 74 57 01 00 call 142510 <__errno> 12cd9c: c7 00 16 00 00 00 movl $0x16,(%eax) 12cda2: b8 ff ff ff ff mov $0xffffffff,%eax return 0; } 12cda7: c9 leave 12cda8: c3 ret 12cda9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED { if ( !tp ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( clock_id == CLOCK_REALTIME ) { if ( tp->tv_sec < TOD_SECONDS_1970_THROUGH_1988 ) 12cdac: 81 3a ff e4 da 21 cmpl $0x21dae4ff,(%edx) 12cdb2: 76 e3 jbe 12cd97 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 12cdb4: a1 38 f0 16 00 mov 0x16f038,%eax 12cdb9: 40 inc %eax 12cdba: a3 38 f0 16 00 mov %eax,0x16f038 rtems_set_errno_and_return_minus_one( EINVAL ); _Thread_Disable_dispatch(); _TOD_Set( tp ); 12cdbf: 83 ec 0c sub $0xc,%esp 12cdc2: 52 push %edx 12cdc3: e8 c0 1b 00 00 call 12e988 <_TOD_Set> _Thread_Enable_dispatch(); 12cdc8: e8 df 6b fe ff call 1139ac <_Thread_Enable_dispatch> 12cdcd: 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; 12cdcf: 83 c4 10 add $0x10,%esp } 12cdd2: c9 leave 12cdd3: c3 ret else if ( clock_id == CLOCK_PROCESS_CPUTIME ) rtems_set_errno_and_return_minus_one( ENOSYS ); #endif #ifdef _POSIX_THREAD_CPUTIME else if ( clock_id == CLOCK_THREAD_CPUTIME ) rtems_set_errno_and_return_minus_one( ENOSYS ); 12cdd4: e8 37 57 01 00 call 142510 <__errno> 12cdd9: c7 00 58 00 00 00 movl $0x58,(%eax) 12cddf: b8 ff ff ff ff mov $0xffffffff,%eax #endif else rtems_set_errno_and_return_minus_one( EINVAL ); return 0; } 12cde4: c9 leave 12cde5: c3 ret 0010f8f8 : #include int close( int fd ) { 10f8f8: 55 push %ebp 10f8f9: 89 e5 mov %esp,%ebp 10f8fb: 56 push %esi 10f8fc: 53 push %ebx 10f8fd: 8b 5d 08 mov 0x8(%ebp),%ebx rtems_libio_t *iop; rtems_status_code rc; rtems_libio_check_fd(fd); 10f900: 3b 1d 4c 31 12 00 cmp 0x12314c,%ebx 10f906: 73 58 jae 10f960 iop = rtems_libio_iop(fd); 10f908: c1 e3 06 shl $0x6,%ebx 10f90b: 03 1d 40 72 12 00 add 0x127240,%ebx rtems_libio_check_is_open(iop); 10f911: f6 43 15 01 testb $0x1,0x15(%ebx) 10f915: 74 49 je 10f960 rc = RTEMS_SUCCESSFUL; if ( iop->handlers->close_h ) 10f917: 8b 43 3c mov 0x3c(%ebx),%eax 10f91a: 8b 40 04 mov 0x4(%eax),%eax 10f91d: 85 c0 test %eax,%eax 10f91f: 74 3b je 10f95c <== ALWAYS TAKEN rc = (*iop->handlers->close_h)( iop ); 10f921: 83 ec 0c sub $0xc,%esp 10f924: 53 push %ebx 10f925: ff d0 call *%eax 10f927: 89 c6 mov %eax,%esi 10f929: 83 c4 10 add $0x10,%esp rtems_filesystem_freenode( &iop->pathinfo ); 10f92c: 8b 43 24 mov 0x24(%ebx),%eax 10f92f: 85 c0 test %eax,%eax 10f931: 74 13 je 10f946 <== ALWAYS TAKEN 10f933: 8b 40 1c mov 0x1c(%eax),%eax 10f936: 85 c0 test %eax,%eax 10f938: 74 0c je 10f946 10f93a: 83 ec 0c sub $0xc,%esp 10f93d: 8d 53 18 lea 0x18(%ebx),%edx 10f940: 52 push %edx 10f941: ff d0 call *%eax 10f943: 83 c4 10 add $0x10,%esp rtems_libio_free( iop ); 10f946: 83 ec 0c sub $0xc,%esp 10f949: 53 push %ebx 10f94a: e8 a9 02 00 00 call 10fbf8 <== ALWAYS TAKEN return rc; 10f94f: 83 c4 10 add $0x10,%esp } 10f952: 89 f0 mov %esi,%eax 10f954: 8d 65 f8 lea -0x8(%ebp),%esp 10f957: 5b pop %ebx 10f958: 5e pop %esi 10f959: c9 leave 10f95a: c3 ret 10f95b: 90 nop <== NOT EXECUTED rtems_libio_check_fd(fd); iop = rtems_libio_iop(fd); rtems_libio_check_is_open(iop); rc = RTEMS_SUCCESSFUL; if ( iop->handlers->close_h ) 10f95c: 31 f6 xor %esi,%esi <== NOT EXECUTED 10f95e: eb cc jmp 10f92c <== NOT EXECUTED rtems_libio_t *iop; rtems_status_code rc; rtems_libio_check_fd(fd); iop = rtems_libio_iop(fd); rtems_libio_check_is_open(iop); 10f960: e8 ab 3e 00 00 call 113810 <__errno> 10f965: c7 00 09 00 00 00 movl $0x9,(%eax) 10f96b: be ff ff ff ff mov $0xffffffff,%esi 10f970: eb e0 jmp 10f952 <== ALWAYS TAKEN 0010eea0 : #include "devfs.h" int devFS_close( rtems_libio_t *iop ) { 10eea0: 55 push %ebp 10eea1: 89 e5 mov %esp,%ebp 10eea3: 83 ec 1c sub $0x1c,%esp 10eea6: 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; 10eea9: 8b 42 38 mov 0x38(%edx),%eax args.iop = iop; 10eeac: 89 55 ec mov %edx,-0x14(%ebp) args.flags = 0; 10eeaf: c7 45 f0 00 00 00 00 movl $0x0,-0x10(%ebp) args.mode = 0; 10eeb6: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp) status = rtems_io_close( 10eebd: 8d 55 ec lea -0x14(%ebp),%edx 10eec0: 52 push %edx 10eec1: ff 70 0c pushl 0xc(%eax) 10eec4: ff 70 08 pushl 0x8(%eax) 10eec7: e8 10 11 00 00 call 10ffdc np->major, np->minor, (void *) &args ); if ( status ) { 10eecc: 83 c4 10 add $0x10,%esp 10eecf: 85 c0 test %eax,%eax 10eed1: 75 05 jne 10eed8 <== ALWAYS TAKEN return rtems_deviceio_errno(status); } return 0; } 10eed3: c9 leave 10eed4: c3 ret 10eed5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED np->major, np->minor, (void *) &args ); if ( status ) { return rtems_deviceio_errno(status); 10eed8: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10eedb: 50 push %eax <== NOT EXECUTED 10eedc: e8 c7 00 00 00 call 10efa8 <== NOT EXECUTED 10eee1: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } return 0; } 10eee4: c9 leave <== NOT EXECUTED 10eee5: c3 ret <== NOT EXECUTED 0010eef8 : const char *pathname, int pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc ) { 10eef8: 55 push %ebp 10eef9: 89 e5 mov %esp,%ebp 10eefb: 57 push %edi 10eefc: 56 push %esi 10eefd: 53 push %ebx 10eefe: 83 ec 1c sub $0x1c,%esp assert( 0 ); rtems_set_errno_and_return_minus_one( EIO ); } /* get the device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; 10ef01: 8b 45 14 mov 0x14(%ebp),%eax 10ef04: 8b 00 mov (%eax),%eax 10ef06: 89 45 e4 mov %eax,-0x1c(%ebp) if (!device_name_table) 10ef09: 85 c0 test %eax,%eax 10ef0b: 0f 84 87 00 00 00 je 10ef98 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EFAULT ); for (i = 0; i < rtems_device_table_size; i++) { 10ef11: 8b 15 90 0f 12 00 mov 0x120f90,%edx 10ef17: 89 55 e0 mov %edx,-0x20(%ebp) 10ef1a: 85 d2 test %edx,%edx 10ef1c: 74 38 je 10ef56 <== 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 ); 10ef1e: 31 c0 xor %eax,%eax 10ef20: 31 db xor %ebx,%ebx for (i = 0; i < rtems_device_table_size; i++) { if (!device_name_table[i].device_name) 10ef22: 8d 04 80 lea (%eax,%eax,4),%eax 10ef25: 8b 55 e4 mov -0x1c(%ebp),%edx 10ef28: 8d 3c 82 lea (%edx,%eax,4),%edi 10ef2b: 8b 37 mov (%edi),%esi 10ef2d: 85 f6 test %esi,%esi 10ef2f: 74 1d je 10ef4e continue; if (strncmp(pathname, device_name_table[i].device_name, pathnamelen) != 0) 10ef31: 50 push %eax 10ef32: ff 75 0c pushl 0xc(%ebp) 10ef35: 56 push %esi 10ef36: ff 75 08 pushl 0x8(%ebp) 10ef39: e8 8e 34 00 00 call 1123cc 10ef3e: 83 c4 10 add $0x10,%esp 10ef41: 85 c0 test %eax,%eax 10ef43: 75 09 jne 10ef4e <== ALWAYS TAKEN continue; if (device_name_table[i].device_name[pathnamelen] != '\0') 10ef45: 8b 45 0c mov 0xc(%ebp),%eax 10ef48: 80 3c 06 00 cmpb $0x0,(%esi,%eax,1) 10ef4c: 74 22 je 10ef70 <== NEVER 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++) { 10ef4e: 43 inc %ebx 10ef4f: 89 d8 mov %ebx,%eax 10ef51: 39 5d e0 cmp %ebx,-0x20(%ebp) 10ef54: 77 cc ja 10ef22 pathloc->mt_entry = rtems_filesystem_root.mt_entry; return 0; } /* no such file or directory */ rtems_set_errno_and_return_minus_one( ENOENT ); 10ef56: e8 e9 28 00 00 call 111844 <__errno> 10ef5b: c7 00 02 00 00 00 movl $0x2,(%eax) 10ef61: b8 ff ff ff ff mov $0xffffffff,%eax } 10ef66: 8d 65 f4 lea -0xc(%ebp),%esp 10ef69: 5b pop %ebx 10ef6a: 5e pop %esi 10ef6b: 5f pop %edi 10ef6c: c9 leave 10ef6d: c3 ret 10ef6e: 66 90 xchg %ax,%ax <== NOT EXECUTED if (device_name_table[i].device_name[pathnamelen] != '\0') continue; /* find the device, set proper values */ pathloc->node_access = (void *)&device_name_table[i]; 10ef70: 8b 55 14 mov 0x14(%ebp),%edx 10ef73: 89 3a mov %edi,(%edx) pathloc->handlers = &devFS_file_handlers; 10ef75: c7 42 08 a0 2e 12 00 movl $0x122ea0,0x8(%edx) pathloc->ops = &devFS_ops; 10ef7c: c7 42 0c 40 2e 12 00 movl $0x122e40,0xc(%edx) pathloc->mt_entry = rtems_filesystem_root.mt_entry; 10ef83: a1 ec 2e 12 00 mov 0x122eec,%eax 10ef88: 8b 40 28 mov 0x28(%eax),%eax 10ef8b: 89 42 10 mov %eax,0x10(%edx) 10ef8e: 31 c0 xor %eax,%eax return 0; } /* no such file or directory */ rtems_set_errno_and_return_minus_one( ENOENT ); } 10ef90: 8d 65 f4 lea -0xc(%ebp),%esp 10ef93: 5b pop %ebx 10ef94: 5e pop %esi 10ef95: 5f pop %edi 10ef96: c9 leave 10ef97: c3 ret } /* get the device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; if (!device_name_table) rtems_set_errno_and_return_minus_one( EFAULT ); 10ef98: e8 a7 28 00 00 call 111844 <__errno> <== NOT EXECUTED 10ef9d: c7 00 0e 00 00 00 movl $0xe,(%eax) <== NOT EXECUTED 10efa3: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 10efa6: eb e8 jmp 10ef90 <== NOT EXECUTED 00107aec : int devFS_initialize( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { 107aec: 55 push %ebp 107aed: 89 e5 mov %esp,%ebp 107aef: 57 push %edi 107af0: 53 push %ebx 107af1: 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( 107af4: 83 ec 0c sub $0xc,%esp 107af7: a1 90 0f 12 00 mov 0x120f90,%eax 107afc: 8d 04 80 lea (%eax,%eax,4),%eax 107aff: c1 e0 02 shl $0x2,%eax 107b02: 50 push %eax 107b03: e8 08 6f 00 00 call 10ea10 <_Workspace_Allocate> 107b08: 89 c2 mov %eax,%edx sizeof( rtems_device_name_t ) * ( rtems_device_table_size ) ); /* no memory for device filesystem */ if (!device_name_table) 107b0a: 83 c4 10 add $0x10,%esp 107b0d: 85 c0 test %eax,%eax 107b0f: 74 2b je 107b3c <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOMEM ); memset( 107b11: a1 90 0f 12 00 mov 0x120f90,%eax 107b16: 8d 0c 80 lea (%eax,%eax,4),%ecx 107b19: c1 e1 02 shl $0x2,%ecx 107b1c: 31 c0 xor %eax,%eax 107b1e: 89 d7 mov %edx,%edi 107b20: 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; 107b22: c7 43 24 a0 2e 12 00 movl $0x122ea0,0x24(%ebx) temp_mt_entry->mt_fs_root.ops = &devFS_ops; 107b29: c7 43 28 40 2e 12 00 movl $0x122e40,0x28(%ebx) /* Set the node_access to device name table */ temp_mt_entry->mt_fs_root.node_access = (void *)device_name_table; 107b30: 89 53 1c mov %edx,0x1c(%ebx) 107b33: 31 c0 xor %eax,%eax return 0; } 107b35: 8d 65 f8 lea -0x8(%ebp),%esp 107b38: 5b pop %ebx 107b39: 5f pop %edi 107b3a: c9 leave 107b3b: c3 ret sizeof( rtems_device_name_t ) * ( rtems_device_table_size ) ); /* no memory for device filesystem */ if (!device_name_table) rtems_set_errno_and_return_minus_one( ENOMEM ); 107b3c: e8 03 9d 00 00 call 111844 <__errno> <== NOT EXECUTED 107b41: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED 107b47: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 107b4c: eb e7 jmp 107b35 <== NOT EXECUTED 00107ca8 : int devFS_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) { 107ca8: 55 push %ebp 107ca9: 89 e5 mov %esp,%ebp 107cab: 83 ec 1c sub $0x1c,%esp 107cae: 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; 107cb1: 8b 42 38 mov 0x38(%edx),%eax args.iop = iop; 107cb4: 89 55 e8 mov %edx,-0x18(%ebp) args.command = command; 107cb7: 8b 55 0c mov 0xc(%ebp),%edx 107cba: 89 55 ec mov %edx,-0x14(%ebp) args.buffer = buffer; 107cbd: 8b 55 10 mov 0x10(%ebp),%edx 107cc0: 89 55 f0 mov %edx,-0x10(%ebp) status = rtems_io_control( 107cc3: 8d 55 e8 lea -0x18(%ebp),%edx 107cc6: 52 push %edx 107cc7: ff 70 0c pushl 0xc(%eax) 107cca: ff 70 08 pushl 0x8(%eax) 107ccd: e8 82 41 00 00 call 10be54 np->major, np->minor, (void *) &args ); if ( status ) 107cd2: 83 c4 10 add $0x10,%esp 107cd5: 85 c0 test %eax,%eax 107cd7: 75 07 jne 107ce0 <== ALWAYS TAKEN return rtems_deviceio_errno(status); return args.ioctl_return; 107cd9: 8b 45 f4 mov -0xc(%ebp),%eax } 107cdc: c9 leave 107cdd: c3 ret 107cde: 66 90 xchg %ax,%ax <== NOT EXECUTED np->minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); 107ce0: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 107ce3: 50 push %eax <== NOT EXECUTED 107ce4: e8 bf 72 00 00 call 10efa8 <== NOT EXECUTED 107ce9: 83 c4 10 add $0x10,%esp <== NOT EXECUTED return args.ioctl_return; } 107cec: c9 leave <== NOT EXECUTED 107ced: c3 ret <== NOT EXECUTED 00107b50 : const char *path, mode_t mode, dev_t dev, rtems_filesystem_location_info_t *pathloc ) { 107b50: 55 push %ebp 107b51: 89 e5 mov %esp,%ebp 107b53: 57 push %edi 107b54: 56 push %esi 107b55: 53 push %ebx 107b56: 83 ec 1c sub $0x1c,%esp 107b59: 8b 7d 08 mov 0x8(%ebp),%edi 107b5c: 8b 4d 10 mov 0x10(%ebp),%ecx 107b5f: 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') && 107b62: 80 3f 64 cmpb $0x64,(%edi) 107b65: 0f 84 dd 00 00 00 je 107c48 <== NEVER TAKEN (path[2] == 'v') && (path[3] == '\0')) return 0; /* must be a character device or a block device */ if (!S_ISBLK(mode) && !S_ISCHR(mode)) 107b6b: 8b 45 0c mov 0xc(%ebp),%eax 107b6e: 25 00 f0 00 00 and $0xf000,%eax 107b73: 3d 00 60 00 00 cmp $0x6000,%eax 107b78: 74 0b je 107b85 <== ALWAYS TAKEN 107b7a: 3d 00 20 00 00 cmp $0x2000,%eax 107b7f: 0f 85 e3 00 00 00 jne 107c68 <== ALWAYS TAKEN ) { union __rtems_dev_t temp; temp.device = device; return temp.__overlay.major; 107b85: 89 4d d8 mov %ecx,-0x28(%ebp) dev_t device ) { union __rtems_dev_t temp; temp.device = device; 107b88: 89 55 dc mov %edx,-0x24(%ebp) rtems_set_errno_and_return_minus_one( EINVAL ); else rtems_filesystem_split_dev_t(dev, major, minor); /* Find an empty slot in device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; 107b8b: 8b 45 18 mov 0x18(%ebp),%eax 107b8e: 8b 30 mov (%eax),%esi if (!device_name_table) 107b90: 85 f6 test %esi,%esi 107b92: 0f 84 f2 00 00 00 je 107c8a <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EFAULT ); for (slot = -1, i = 0; i < rtems_device_table_size; i++){ 107b98: 8b 15 90 0f 12 00 mov 0x120f90,%edx 107b9e: 85 d2 test %edx,%edx 107ba0: 0f 84 d4 00 00 00 je 107c7a <== ALWAYS TAKEN rtems_filesystem_split_dev_t(dev, major, minor); /* Find an empty slot in device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; if (!device_name_table) rtems_set_errno_and_return_minus_one( EFAULT ); 107ba6: 31 c0 xor %eax,%eax 107ba8: c7 45 e0 ff ff ff ff movl $0xffffffff,-0x20(%ebp) 107baf: 31 db xor %ebx,%ebx 107bb1: 89 7d e4 mov %edi,-0x1c(%ebp) 107bb4: 89 d7 mov %edx,%edi 107bb6: eb 1a jmp 107bd2 <== ALWAYS TAKEN for (slot = -1, i = 0; i < rtems_device_table_size; i++){ if (device_name_table[i].device_name == NULL) slot = i; else if (strcmp(path, device_name_table[i].device_name) == 0) 107bb8: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 107bbb: 50 push %eax <== NOT EXECUTED 107bbc: ff 75 e4 pushl -0x1c(%ebp) <== NOT EXECUTED 107bbf: e8 dc a6 00 00 call 1122a0 <== NOT EXECUTED 107bc4: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 107bc7: 85 c0 test %eax,%eax <== NOT EXECUTED 107bc9: 74 65 je 107c30 <== NOT EXECUTED /* Find an empty slot in device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; if (!device_name_table) rtems_set_errno_and_return_minus_one( EFAULT ); for (slot = -1, i = 0; i < rtems_device_table_size; i++){ 107bcb: 43 inc %ebx <== NOT EXECUTED 107bcc: 89 d8 mov %ebx,%eax <== NOT EXECUTED 107bce: 39 fb cmp %edi,%ebx <== NOT EXECUTED 107bd0: 73 16 jae 107be8 <== NOT EXECUTED if (device_name_table[i].device_name == NULL) 107bd2: 8d 04 80 lea (%eax,%eax,4),%eax 107bd5: 8b 04 86 mov (%esi,%eax,4),%eax 107bd8: 85 c0 test %eax,%eax 107bda: 75 dc jne 107bb8 <== ALWAYS TAKEN slot = i; else if (strcmp(path, device_name_table[i].device_name) == 0) rtems_set_errno_and_return_minus_one( EEXIST ); 107bdc: 89 5d e0 mov %ebx,-0x20(%ebp) /* Find an empty slot in device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; if (!device_name_table) rtems_set_errno_and_return_minus_one( EFAULT ); for (slot = -1, i = 0; i < rtems_device_table_size; i++){ 107bdf: 43 inc %ebx 107be0: 89 d8 mov %ebx,%eax 107be2: 39 fb cmp %edi,%ebx 107be4: 72 ec jb 107bd2 107be6: 66 90 xchg %ax,%ax 107be8: 8b 7d e4 mov -0x1c(%ebp),%edi else if (strcmp(path, device_name_table[i].device_name) == 0) rtems_set_errno_and_return_minus_one( EEXIST ); } if (slot == -1) 107beb: 83 7d e0 ff cmpl $0xffffffff,-0x20(%ebp) 107bef: 0f 84 85 00 00 00 je 107c7a <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOMEM ); _ISR_Disable(level); 107bf5: 9c pushf 107bf6: fa cli 107bf7: 5b pop %ebx device_name_table[slot].device_name = (char *)path; 107bf8: 8b 55 e0 mov -0x20(%ebp),%edx 107bfb: 8d 04 92 lea (%edx,%edx,4),%eax 107bfe: 8d 14 86 lea (%esi,%eax,4),%edx 107c01: 89 3a mov %edi,(%edx) device_name_table[slot].device_name_length = strlen(path); 107c03: 31 c0 xor %eax,%eax 107c05: b9 ff ff ff ff mov $0xffffffff,%ecx 107c0a: f2 ae repnz scas %es:(%edi),%al 107c0c: f7 d1 not %ecx 107c0e: 49 dec %ecx 107c0f: 89 4a 04 mov %ecx,0x4(%edx) device_name_table[slot].major = major; 107c12: 8b 45 d8 mov -0x28(%ebp),%eax 107c15: 89 42 08 mov %eax,0x8(%edx) device_name_table[slot].minor = minor; 107c18: 8b 45 dc mov -0x24(%ebp),%eax 107c1b: 89 42 0c mov %eax,0xc(%edx) device_name_table[slot].mode = mode; 107c1e: 8b 45 0c mov 0xc(%ebp),%eax 107c21: 89 42 10 mov %eax,0x10(%edx) _ISR_Enable(level); 107c24: 53 push %ebx 107c25: 9d popf 107c26: 31 c0 xor %eax,%eax return 0; } 107c28: 8d 65 f4 lea -0xc(%ebp),%esp 107c2b: 5b pop %ebx 107c2c: 5e pop %esi 107c2d: 5f pop %edi 107c2e: c9 leave 107c2f: c3 ret for (slot = -1, i = 0; i < rtems_device_table_size; i++){ if (device_name_table[i].device_name == NULL) slot = i; else if (strcmp(path, device_name_table[i].device_name) == 0) rtems_set_errno_and_return_minus_one( EEXIST ); 107c30: e8 0f 9c 00 00 call 111844 <__errno> <== NOT EXECUTED 107c35: c7 00 11 00 00 00 movl $0x11,(%eax) <== NOT EXECUTED 107c3b: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED device_name_table[slot].minor = minor; device_name_table[slot].mode = mode; _ISR_Enable(level); return 0; } 107c40: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 107c43: 5b pop %ebx <== NOT EXECUTED 107c44: 5e pop %esi <== NOT EXECUTED 107c45: 5f pop %edi <== NOT EXECUTED 107c46: c9 leave <== NOT EXECUTED 107c47: c3 ret <== NOT EXECUTED * condition and do not create the '/dev' and the 'path' * actually passed in is 'dev', not '/dev'. Just return 0 to * indicate we are OK. */ if ((path[0] == 'd') && (path[1] == 'e') && 107c48: 80 7f 01 65 cmpb $0x65,0x1(%edi) 107c4c: 0f 85 19 ff ff ff jne 107b6b <== ALWAYS TAKEN (path[2] == 'v') && (path[3] == '\0')) 107c52: 80 7f 02 76 cmpb $0x76,0x2(%edi) 107c56: 0f 85 0f ff ff ff jne 107b6b <== ALWAYS TAKEN 107c5c: 80 7f 03 00 cmpb $0x0,0x3(%edi) 107c60: 0f 85 05 ff ff ff jne 107b6b 107c66: eb be jmp 107c26 <== ALWAYS TAKEN return 0; /* must be a character device or a block device */ if (!S_ISBLK(mode) && !S_ISCHR(mode)) rtems_set_errno_and_return_minus_one( EINVAL ); 107c68: e8 d7 9b 00 00 call 111844 <__errno> <== NOT EXECUTED 107c6d: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 107c73: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 107c78: eb ae jmp 107c28 <== NOT EXECUTED if (strcmp(path, device_name_table[i].device_name) == 0) rtems_set_errno_and_return_minus_one( EEXIST ); } if (slot == -1) rtems_set_errno_and_return_minus_one( ENOMEM ); 107c7a: e8 c5 9b 00 00 call 111844 <__errno> <== NOT EXECUTED 107c7f: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED 107c85: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 107c88: eb 9e jmp 107c28 <== NOT EXECUTED rtems_filesystem_split_dev_t(dev, major, minor); /* Find an empty slot in device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; if (!device_name_table) rtems_set_errno_and_return_minus_one( EFAULT ); 107c8a: e8 b5 9b 00 00 call 111844 <__errno> <== NOT EXECUTED 107c8f: c7 00 0e 00 00 00 movl $0xe,(%eax) <== NOT EXECUTED 107c95: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 107c98: eb 8e jmp 107c28 <== NOT EXECUTED 00107cf0 : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 107cf0: 55 push %ebp 107cf1: 89 e5 mov %esp,%ebp 107cf3: 83 ec 1c sub $0x1c,%esp 107cf6: 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; 107cf9: 8b 50 38 mov 0x38(%eax),%edx args.iop = iop; 107cfc: 89 45 ec mov %eax,-0x14(%ebp) args.flags = iop->flags; 107cff: 8b 40 14 mov 0x14(%eax),%eax 107d02: 89 45 f0 mov %eax,-0x10(%ebp) args.mode = mode; 107d05: 8b 45 14 mov 0x14(%ebp),%eax 107d08: 89 45 f4 mov %eax,-0xc(%ebp) status = rtems_io_open( 107d0b: 8d 45 ec lea -0x14(%ebp),%eax 107d0e: 50 push %eax 107d0f: ff 72 0c pushl 0xc(%edx) 107d12: ff 72 08 pushl 0x8(%edx) 107d15: e8 4e 42 00 00 call 10bf68 np->major, np->minor, (void *) &args ); if ( status ) 107d1a: 83 c4 10 add $0x10,%esp 107d1d: 85 c0 test %eax,%eax 107d1f: 75 03 jne 107d24 <== ALWAYS TAKEN return rtems_deviceio_errno(status); return 0; } 107d21: c9 leave 107d22: c3 ret 107d23: 90 nop <== NOT EXECUTED np->major, np->minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); 107d24: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 107d27: 50 push %eax <== NOT EXECUTED 107d28: e8 7b 72 00 00 call 10efa8 <== NOT EXECUTED 107d2d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED return 0; } 107d30: c9 leave <== NOT EXECUTED 107d31: c3 ret <== NOT EXECUTED 00107d34 : ssize_t devFS_read( rtems_libio_t *iop, void *buffer, size_t count ) { 107d34: 55 push %ebp <== NOT EXECUTED 107d35: 89 e5 mov %esp,%ebp <== NOT EXECUTED 107d37: 53 push %ebx <== NOT EXECUTED 107d38: 83 ec 28 sub $0x28,%esp <== NOT EXECUTED 107d3b: 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; 107d3e: 8b 50 38 mov 0x38(%eax),%edx <== NOT EXECUTED args.iop = iop; 107d41: 89 45 dc mov %eax,-0x24(%ebp) <== NOT EXECUTED args.offset = iop->offset; 107d44: 8b 48 0c mov 0xc(%eax),%ecx <== NOT EXECUTED 107d47: 8b 58 10 mov 0x10(%eax),%ebx <== NOT EXECUTED 107d4a: 89 4d e0 mov %ecx,-0x20(%ebp) <== NOT EXECUTED 107d4d: 89 5d e4 mov %ebx,-0x1c(%ebp) <== NOT EXECUTED args.buffer = buffer; 107d50: 8b 4d 0c mov 0xc(%ebp),%ecx <== NOT EXECUTED 107d53: 89 4d e8 mov %ecx,-0x18(%ebp) <== NOT EXECUTED args.count = count; 107d56: 8b 4d 10 mov 0x10(%ebp),%ecx <== NOT EXECUTED 107d59: 89 4d ec mov %ecx,-0x14(%ebp) <== NOT EXECUTED args.flags = iop->flags; 107d5c: 8b 40 14 mov 0x14(%eax),%eax <== NOT EXECUTED 107d5f: 89 45 f0 mov %eax,-0x10(%ebp) <== NOT EXECUTED args.bytes_moved = 0; 107d62: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp) <== NOT EXECUTED status = rtems_io_read( 107d69: 8d 45 dc lea -0x24(%ebp),%eax <== NOT EXECUTED 107d6c: 50 push %eax <== NOT EXECUTED 107d6d: ff 72 0c pushl 0xc(%edx) <== NOT EXECUTED 107d70: ff 72 08 pushl 0x8(%edx) <== NOT EXECUTED 107d73: e8 3c 42 00 00 call 10bfb4 <== NOT EXECUTED np->major, np->minor, (void *) &args ); if ( status ) 107d78: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 107d7b: 85 c0 test %eax,%eax <== NOT EXECUTED 107d7d: 75 09 jne 107d88 <== NOT EXECUTED return rtems_deviceio_errno(status); return (ssize_t) args.bytes_moved; 107d7f: 8b 45 f4 mov -0xc(%ebp),%eax <== NOT EXECUTED } 107d82: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 107d85: c9 leave <== NOT EXECUTED 107d86: c3 ret <== NOT EXECUTED 107d87: 90 nop <== NOT EXECUTED np->minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); 107d88: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 107d8b: 50 push %eax <== NOT EXECUTED 107d8c: e8 17 72 00 00 call 10efa8 <== NOT EXECUTED 107d91: 83 c4 10 add $0x10,%esp <== NOT EXECUTED return (ssize_t) args.bytes_moved; } 107d94: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 107d97: c9 leave <== NOT EXECUTED 107d98: c3 ret <== NOT EXECUTED 00107d9c : int devFS_stat( rtems_filesystem_location_info_t *loc, struct stat *buf ) { 107d9c: 55 push %ebp 107d9d: 89 e5 mov %esp,%ebp 107d9f: 53 push %ebx 107da0: 83 ec 04 sub $0x4,%esp 107da3: 8b 55 0c mov 0xc(%ebp),%edx rtems_device_name_t *the_dev; the_dev = (rtems_device_name_t *)loc->node_access; 107da6: 8b 45 08 mov 0x8(%ebp),%eax 107da9: 8b 00 mov (%eax),%eax if (!the_dev) 107dab: 85 c0 test %eax,%eax 107dad: 74 18 je 107dc7 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EFAULT ); buf->st_rdev = rtems_filesystem_make_dev_t( the_dev->major, the_dev->minor ); 107daf: 8b 48 0c mov 0xc(%eax),%ecx rtems_device_minor_number _minor ) { union __rtems_dev_t temp; temp.__overlay.major = _major; 107db2: 8b 58 08 mov 0x8(%eax),%ebx 107db5: 89 5a 18 mov %ebx,0x18(%edx) 107db8: 89 4a 1c mov %ecx,0x1c(%edx) buf->st_mode = the_dev->mode; 107dbb: 8b 40 10 mov 0x10(%eax),%eax 107dbe: 89 42 0c mov %eax,0xc(%edx) 107dc1: 31 c0 xor %eax,%eax return 0; } 107dc3: 5a pop %edx 107dc4: 5b pop %ebx 107dc5: c9 leave 107dc6: c3 ret { rtems_device_name_t *the_dev; the_dev = (rtems_device_name_t *)loc->node_access; if (!the_dev) rtems_set_errno_and_return_minus_one( EFAULT ); 107dc7: e8 78 9a 00 00 call 111844 <__errno> <== NOT EXECUTED 107dcc: c7 00 0e 00 00 00 movl $0xe,(%eax) <== NOT EXECUTED 107dd2: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 107dd7: eb ea jmp 107dc3 <== NOT EXECUTED 00107ddc : ssize_t devFS_write( rtems_libio_t *iop, const void *buffer, size_t count ) { 107ddc: 55 push %ebp 107ddd: 89 e5 mov %esp,%ebp 107ddf: 53 push %ebx 107de0: 83 ec 28 sub $0x28,%esp 107de3: 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; 107de6: 8b 50 38 mov 0x38(%eax),%edx args.iop = iop; 107de9: 89 45 dc mov %eax,-0x24(%ebp) args.offset = iop->offset; 107dec: 8b 48 0c mov 0xc(%eax),%ecx 107def: 8b 58 10 mov 0x10(%eax),%ebx 107df2: 89 4d e0 mov %ecx,-0x20(%ebp) 107df5: 89 5d e4 mov %ebx,-0x1c(%ebp) args.buffer = (void *) buffer; 107df8: 8b 4d 0c mov 0xc(%ebp),%ecx 107dfb: 89 4d e8 mov %ecx,-0x18(%ebp) args.count = count; 107dfe: 8b 4d 10 mov 0x10(%ebp),%ecx 107e01: 89 4d ec mov %ecx,-0x14(%ebp) args.flags = iop->flags; 107e04: 8b 40 14 mov 0x14(%eax),%eax 107e07: 89 45 f0 mov %eax,-0x10(%ebp) args.bytes_moved = 0; 107e0a: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp) status = rtems_io_write( 107e11: 8d 45 dc lea -0x24(%ebp),%eax 107e14: 50 push %eax 107e15: ff 72 0c pushl 0xc(%edx) 107e18: ff 72 08 pushl 0x8(%edx) 107e1b: e8 e0 41 00 00 call 10c000 np->major, np->minor, (void *) &args ); if ( status ) 107e20: 83 c4 10 add $0x10,%esp 107e23: 85 c0 test %eax,%eax 107e25: 75 09 jne 107e30 <== ALWAYS TAKEN return rtems_deviceio_errno(status); return (ssize_t) args.bytes_moved; 107e27: 8b 45 f4 mov -0xc(%ebp),%eax } 107e2a: 8b 5d fc mov -0x4(%ebp),%ebx 107e2d: c9 leave 107e2e: c3 ret 107e2f: 90 nop <== NOT EXECUTED np->minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); 107e30: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 107e33: 50 push %eax <== NOT EXECUTED 107e34: e8 6f 71 00 00 call 10efa8 <== NOT EXECUTED 107e39: 83 c4 10 add $0x10,%esp <== NOT EXECUTED return (ssize_t) args.bytes_moved; } 107e3c: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 107e3f: c9 leave <== NOT EXECUTED 107e40: c3 ret <== NOT EXECUTED 001115f4 : */ int device_close( rtems_libio_t *iop ) { 1115f4: 55 push %ebp 1115f5: 89 e5 mov %esp,%ebp 1115f7: 83 ec 1c sub $0x1c,%esp 1115fa: 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; 1115fd: 8b 42 38 mov 0x38(%edx),%eax args.iop = iop; 111600: 89 55 ec mov %edx,-0x14(%ebp) args.flags = 0; 111603: c7 45 f0 00 00 00 00 movl $0x0,-0x10(%ebp) args.mode = 0; 11160a: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp) status = rtems_io_close( 111611: 8d 55 ec lea -0x14(%ebp),%edx 111614: 52 push %edx 111615: ff 70 54 pushl 0x54(%eax) 111618: ff 70 50 pushl 0x50(%eax) 11161b: e8 64 14 00 00 call 112a84 the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) { 111620: 83 c4 10 add $0x10,%esp 111623: 85 c0 test %eax,%eax 111625: 75 05 jne 11162c <== ALWAYS TAKEN return rtems_deviceio_errno(status); } return 0; } 111627: c9 leave 111628: c3 ret 111629: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) { return rtems_deviceio_errno(status); 11162c: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 11162f: 50 push %eax <== NOT EXECUTED 111630: e8 a7 19 00 00 call 112fdc <== NOT EXECUTED 111635: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } return 0; } 111638: c9 leave <== NOT EXECUTED 111639: c3 ret <== NOT EXECUTED 001114dc : int device_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) { 1114dc: 55 push %ebp 1114dd: 89 e5 mov %esp,%ebp 1114df: 83 ec 1c sub $0x1c,%esp 1114e2: 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; 1114e5: 89 45 e8 mov %eax,-0x18(%ebp) args.command = command; 1114e8: 8b 55 0c mov 0xc(%ebp),%edx 1114eb: 89 55 ec mov %edx,-0x14(%ebp) args.buffer = buffer; 1114ee: 8b 55 10 mov 0x10(%ebp),%edx 1114f1: 89 55 f0 mov %edx,-0x10(%ebp) the_jnode = iop->file_info; 1114f4: 8b 40 38 mov 0x38(%eax),%eax status = rtems_io_control( 1114f7: 8d 55 e8 lea -0x18(%ebp),%edx 1114fa: 52 push %edx 1114fb: ff 70 54 pushl 0x54(%eax) 1114fe: ff 70 50 pushl 0x50(%eax) 111501: e8 ca 15 00 00 call 112ad0 the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 111506: 83 c4 10 add $0x10,%esp 111509: 85 c0 test %eax,%eax 11150b: 75 07 jne 111514 <== ALWAYS TAKEN return rtems_deviceio_errno(status); return args.ioctl_return; 11150d: 8b 45 f4 mov -0xc(%ebp),%eax } 111510: c9 leave 111511: c3 ret 111512: 66 90 xchg %ax,%ax <== NOT EXECUTED the_jnode->info.device.minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); 111514: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 111517: 50 push %eax <== NOT EXECUTED 111518: e8 bf 1a 00 00 call 112fdc <== NOT EXECUTED 11151d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED return args.ioctl_return; } 111520: c9 leave <== NOT EXECUTED 111521: c3 ret <== NOT EXECUTED 0011163c : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 11163c: 55 push %ebp 11163d: 89 e5 mov %esp,%ebp 11163f: 83 ec 1c sub $0x1c,%esp 111642: 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; 111645: 8b 50 38 mov 0x38(%eax),%edx args.iop = iop; 111648: 89 45 ec mov %eax,-0x14(%ebp) args.flags = iop->flags; 11164b: 8b 40 14 mov 0x14(%eax),%eax 11164e: 89 45 f0 mov %eax,-0x10(%ebp) args.mode = mode; 111651: 8b 45 14 mov 0x14(%ebp),%eax 111654: 89 45 f4 mov %eax,-0xc(%ebp) status = rtems_io_open( 111657: 8d 45 ec lea -0x14(%ebp),%eax 11165a: 50 push %eax 11165b: ff 72 54 pushl 0x54(%edx) 11165e: ff 72 50 pushl 0x50(%edx) 111661: e8 b6 14 00 00 call 112b1c the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 111666: 83 c4 10 add $0x10,%esp 111669: 85 c0 test %eax,%eax 11166b: 75 03 jne 111670 <== ALWAYS TAKEN return rtems_deviceio_errno(status); return 0; } 11166d: c9 leave 11166e: c3 ret 11166f: 90 nop <== NOT EXECUTED the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); 111670: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 111673: 50 push %eax <== NOT EXECUTED 111674: e8 63 19 00 00 call 112fdc <== NOT EXECUTED 111679: 83 c4 10 add $0x10,%esp <== NOT EXECUTED return 0; } 11167c: c9 leave <== NOT EXECUTED 11167d: c3 ret <== NOT EXECUTED 0011158c : ssize_t device_read( rtems_libio_t *iop, void *buffer, size_t count ) { 11158c: 55 push %ebp <== NOT EXECUTED 11158d: 89 e5 mov %esp,%ebp <== NOT EXECUTED 11158f: 53 push %ebx <== NOT EXECUTED 111590: 83 ec 28 sub $0x28,%esp <== NOT EXECUTED 111593: 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; 111596: 8b 50 38 mov 0x38(%eax),%edx <== NOT EXECUTED args.iop = iop; 111599: 89 45 dc mov %eax,-0x24(%ebp) <== NOT EXECUTED args.offset = iop->offset; 11159c: 8b 48 0c mov 0xc(%eax),%ecx <== NOT EXECUTED 11159f: 8b 58 10 mov 0x10(%eax),%ebx <== NOT EXECUTED 1115a2: 89 4d e0 mov %ecx,-0x20(%ebp) <== NOT EXECUTED 1115a5: 89 5d e4 mov %ebx,-0x1c(%ebp) <== NOT EXECUTED args.buffer = buffer; 1115a8: 8b 4d 0c mov 0xc(%ebp),%ecx <== NOT EXECUTED 1115ab: 89 4d e8 mov %ecx,-0x18(%ebp) <== NOT EXECUTED args.count = count; 1115ae: 8b 4d 10 mov 0x10(%ebp),%ecx <== NOT EXECUTED 1115b1: 89 4d ec mov %ecx,-0x14(%ebp) <== NOT EXECUTED args.flags = iop->flags; 1115b4: 8b 40 14 mov 0x14(%eax),%eax <== NOT EXECUTED 1115b7: 89 45 f0 mov %eax,-0x10(%ebp) <== NOT EXECUTED args.bytes_moved = 0; 1115ba: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp) <== NOT EXECUTED status = rtems_io_read( 1115c1: 8d 45 dc lea -0x24(%ebp),%eax <== NOT EXECUTED 1115c4: 50 push %eax <== NOT EXECUTED 1115c5: ff 72 54 pushl 0x54(%edx) <== NOT EXECUTED 1115c8: ff 72 50 pushl 0x50(%edx) <== NOT EXECUTED 1115cb: e8 98 15 00 00 call 112b68 <== NOT EXECUTED the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 1115d0: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 1115d3: 85 c0 test %eax,%eax <== NOT EXECUTED 1115d5: 75 09 jne 1115e0 <== NOT EXECUTED return rtems_deviceio_errno(status); return (ssize_t) args.bytes_moved; 1115d7: 8b 45 f4 mov -0xc(%ebp),%eax <== NOT EXECUTED } 1115da: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 1115dd: c9 leave <== NOT EXECUTED 1115de: c3 ret <== NOT EXECUTED 1115df: 90 nop <== NOT EXECUTED the_jnode->info.device.minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); 1115e0: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1115e3: 50 push %eax <== NOT EXECUTED 1115e4: e8 f3 19 00 00 call 112fdc <== NOT EXECUTED 1115e9: 83 c4 10 add $0x10,%esp <== NOT EXECUTED return (ssize_t) args.bytes_moved; } 1115ec: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 1115ef: c9 leave <== NOT EXECUTED 1115f0: c3 ret <== NOT EXECUTED 00111524 : ssize_t device_write( rtems_libio_t *iop, const void *buffer, size_t count ) { 111524: 55 push %ebp 111525: 89 e5 mov %esp,%ebp 111527: 53 push %ebx 111528: 83 ec 28 sub $0x28,%esp 11152b: 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; 11152e: 8b 50 38 mov 0x38(%eax),%edx args.iop = iop; 111531: 89 45 dc mov %eax,-0x24(%ebp) args.offset = iop->offset; 111534: 8b 48 0c mov 0xc(%eax),%ecx 111537: 8b 58 10 mov 0x10(%eax),%ebx 11153a: 89 4d e0 mov %ecx,-0x20(%ebp) 11153d: 89 5d e4 mov %ebx,-0x1c(%ebp) args.buffer = (void *) buffer; 111540: 8b 4d 0c mov 0xc(%ebp),%ecx 111543: 89 4d e8 mov %ecx,-0x18(%ebp) args.count = count; 111546: 8b 4d 10 mov 0x10(%ebp),%ecx 111549: 89 4d ec mov %ecx,-0x14(%ebp) args.flags = iop->flags; 11154c: 8b 40 14 mov 0x14(%eax),%eax 11154f: 89 45 f0 mov %eax,-0x10(%ebp) args.bytes_moved = 0; 111552: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp) status = rtems_io_write( 111559: 8d 45 dc lea -0x24(%ebp),%eax 11155c: 50 push %eax 11155d: ff 72 54 pushl 0x54(%edx) 111560: ff 72 50 pushl 0x50(%edx) 111563: e8 4c 16 00 00 call 112bb4 the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 111568: 83 c4 10 add $0x10,%esp 11156b: 85 c0 test %eax,%eax 11156d: 75 09 jne 111578 <== ALWAYS TAKEN return rtems_deviceio_errno(status); return (ssize_t) args.bytes_moved; 11156f: 8b 45 f4 mov -0xc(%ebp),%eax } 111572: 8b 5d fc mov -0x4(%ebp),%ebx 111575: c9 leave 111576: c3 ret 111577: 90 nop <== NOT EXECUTED the_jnode->info.device.minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); 111578: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 11157b: 50 push %eax <== NOT EXECUTED 11157c: e8 5b 1a 00 00 call 112fdc <== NOT EXECUTED 111581: 83 c4 10 add $0x10,%esp <== NOT EXECUTED return (ssize_t) args.bytes_moved; } 111584: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 111587: c9 leave <== NOT EXECUTED 111588: c3 ret <== NOT EXECUTED 00109b8c : /* * Drain output queue */ static void drainOutput (struct rtems_termios_tty *tty) { 109b8c: 55 push %ebp 109b8d: 89 e5 mov %esp,%ebp 109b8f: 53 push %ebx 109b90: 83 ec 04 sub $0x4,%esp 109b93: 89 c3 mov %eax,%ebx rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) { 109b95: 8b 90 b4 00 00 00 mov 0xb4(%eax),%edx 109b9b: 85 d2 test %edx,%edx 109b9d: 74 4d je 109bec rtems_interrupt_disable (level); 109b9f: 9c pushf 109ba0: fa cli 109ba1: 58 pop %eax while (tty->rawOutBuf.Tail != tty->rawOutBuf.Head) { 109ba2: 8b 8b 84 00 00 00 mov 0x84(%ebx),%ecx 109ba8: 8b 93 80 00 00 00 mov 0x80(%ebx),%edx 109bae: 39 d1 cmp %edx,%ecx 109bb0: 74 38 je 109bea 109bb2: 66 90 xchg %ax,%ax tty->rawOutBufState = rob_wait; 109bb4: c7 83 94 00 00 00 02 movl $0x2,0x94(%ebx) 109bbb: 00 00 00 rtems_interrupt_enable (level); 109bbe: 50 push %eax 109bbf: 9d popf sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore, 109bc0: 50 push %eax 109bc1: 6a 00 push $0x0 109bc3: 6a 00 push $0x0 109bc5: ff b3 8c 00 00 00 pushl 0x8c(%ebx) 109bcb: e8 90 19 00 00 call 10b560 RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 109bd0: 83 c4 10 add $0x10,%esp 109bd3: 85 c0 test %eax,%eax 109bd5: 75 1a jne 109bf1 <== ALWAYS TAKEN rtems_fatal_error_occurred (sc); rtems_interrupt_disable (level); 109bd7: 9c pushf 109bd8: fa cli 109bd9: 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) { 109bda: 8b 8b 84 00 00 00 mov 0x84(%ebx),%ecx 109be0: 8b 93 80 00 00 00 mov 0x80(%ebx),%edx 109be6: 39 d1 cmp %edx,%ecx 109be8: 75 ca jne 109bb4 <== ALWAYS TAKEN RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); rtems_interrupt_disable (level); } rtems_interrupt_enable (level); 109bea: 50 push %eax 109beb: 9d popf } } 109bec: 8b 5d fc mov -0x4(%ebp),%ebx 109bef: c9 leave 109bf0: c3 ret rtems_interrupt_enable (level); sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); 109bf1: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 109bf4: 50 push %eax <== NOT EXECUTED 109bf5: e8 a2 1f 00 00 call 10bb9c <== NOT EXECUTED 00108d0c : #include int dup( int fildes ) { 108d0c: 55 push %ebp 108d0d: 89 e5 mov %esp,%ebp 108d0f: 83 ec 0c sub $0xc,%esp return fcntl( fildes, F_DUPFD, 0 ); 108d12: 6a 00 push $0x0 108d14: 6a 00 push $0x0 108d16: ff 75 08 pushl 0x8(%ebp) 108d19: e8 16 02 00 00 call 108f34 <== ALWAYS TAKEN } 108d1e: c9 leave 108d1f: c3 ret 00108cc0 : int dup2( int fildes, int fildes2 ) { 108cc0: 55 push %ebp 108cc1: 89 e5 mov %esp,%ebp 108cc3: 57 push %edi 108cc4: 56 push %esi 108cc5: 53 push %ebx 108cc6: 83 ec 64 sub $0x64,%esp 108cc9: 8b 75 08 mov 0x8(%ebp),%esi 108ccc: 8b 7d 0c mov 0xc(%ebp),%edi /* * If fildes is not valid, then fildes2 should not be closed. */ status = fstat( fildes, &buf ); 108ccf: 8d 5d a4 lea -0x5c(%ebp),%ebx 108cd2: 53 push %ebx 108cd3: 56 push %esi 108cd4: e8 bf 05 00 00 call 109298 if ( status == -1 ) 108cd9: 83 c4 10 add $0x10,%esp 108cdc: 40 inc %eax 108cdd: 75 0d jne 108cec <== NEVER TAKEN /* * This fcntl handles everything else. */ return fcntl( fildes, F_DUPFD, fildes2 ); 108cdf: b8 ff ff ff ff mov $0xffffffff,%eax } 108ce4: 8d 65 f4 lea -0xc(%ebp),%esp 108ce7: 5b pop %ebx 108ce8: 5e pop %esi 108ce9: 5f pop %edi 108cea: c9 leave 108ceb: c3 ret /* * If fildes2 is not valid, then we should not do anything either. */ status = fstat( fildes2, &buf ); 108cec: 83 ec 08 sub $0x8,%esp 108cef: 53 push %ebx 108cf0: 57 push %edi 108cf1: e8 a2 05 00 00 call 109298 if ( status == -1 ) 108cf6: 83 c4 10 add $0x10,%esp 108cf9: 40 inc %eax 108cfa: 74 e3 je 108cdf <== NEVER TAKEN /* * This fcntl handles everything else. */ return fcntl( fildes, F_DUPFD, fildes2 ); 108cfc: 50 push %eax <== NOT EXECUTED 108cfd: 57 push %edi <== NOT EXECUTED 108cfe: 6a 00 push $0x0 <== NOT EXECUTED 108d00: 56 push %esi <== NOT EXECUTED 108d01: e8 2e 02 00 00 call 108f34 <== NOT EXECUTED 108d06: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 108d09: eb d9 jmp 108ce4 <== NOT EXECUTED 00109700 : /* * Echo a typed character */ static void echo (unsigned char c, struct rtems_termios_tty *tty) { 109700: 55 push %ebp <== NOT EXECUTED 109701: 89 e5 mov %esp,%ebp <== NOT EXECUTED 109703: 53 push %ebx <== NOT EXECUTED 109704: 83 ec 24 sub $0x24,%esp <== NOT EXECUTED if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { 109707: f6 42 3d 02 testb $0x2,0x3d(%edx) <== NOT EXECUTED 10970b: 74 1b je 109728 <== NOT EXECUTED 10970d: 0f b6 c8 movzbl %al,%ecx <== NOT EXECUTED 109710: 8b 1d e8 50 12 00 mov 0x1250e8,%ebx <== NOT EXECUTED 109716: f6 44 0b 01 20 testb $0x20,0x1(%ebx,%ecx,1) <== NOT EXECUTED 10971b: 74 0b je 109728 <== NOT EXECUTED 10971d: 3c 09 cmp $0x9,%al <== NOT EXECUTED 10971f: 74 07 je 109728 <== NOT EXECUTED 109721: 3c 0a cmp $0xa,%al <== NOT EXECUTED 109723: 75 13 jne 109738 <== NOT EXECUTED 109725: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED echobuf[1] = c ^ 0x40; rtems_termios_puts (echobuf, 2, tty); tty->column += 2; } else { oproc (c, tty); 109728: 0f b6 c0 movzbl %al,%eax <== NOT EXECUTED 10972b: e8 94 fe ff ff call 1095c4 <== NOT EXECUTED } } 109730: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 109733: c9 leave <== NOT EXECUTED 109734: c3 ret <== NOT EXECUTED 109735: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED echo (unsigned char c, struct rtems_termios_tty *tty) { if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { char echobuf[2]; echobuf[0] = '^'; 109738: c6 45 f6 5e movb $0x5e,-0xa(%ebp) <== NOT EXECUTED echobuf[1] = c ^ 0x40; 10973c: 83 f0 40 xor $0x40,%eax <== NOT EXECUTED 10973f: 88 45 f7 mov %al,-0x9(%ebp) <== NOT EXECUTED rtems_termios_puts (echobuf, 2, tty); 109742: 50 push %eax <== NOT EXECUTED 109743: 52 push %edx <== NOT EXECUTED 109744: 6a 02 push $0x2 <== NOT EXECUTED 109746: 8d 45 f6 lea -0xa(%ebp),%eax <== NOT EXECUTED 109749: 50 push %eax <== NOT EXECUTED 10974a: 89 55 e4 mov %edx,-0x1c(%ebp) <== NOT EXECUTED 10974d: e8 3e fd ff ff call 109490 <== NOT EXECUTED tty->column += 2; 109752: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED 109755: 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')) { 109759: 83 c4 10 add $0x10,%esp <== NOT EXECUTED tty->column += 2; } else { oproc (c, tty); } } 10975c: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 10975f: c9 leave <== NOT EXECUTED 109760: c3 ret <== NOT EXECUTED 0012b81c : fclose(group_fp); group_fp = fopen("/etc/group", "r"); } void endgrent(void) { 12b81c: 55 push %ebp <== NOT EXECUTED 12b81d: 89 e5 mov %esp,%ebp <== NOT EXECUTED 12b81f: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED if (group_fp != NULL) 12b822: a1 84 ea 16 00 mov 0x16ea84,%eax <== NOT EXECUTED 12b827: 85 c0 test %eax,%eax <== NOT EXECUTED 12b829: 74 0c je 12b837 <== NOT EXECUTED fclose(group_fp); 12b82b: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12b82e: 50 push %eax <== NOT EXECUTED 12b82f: e8 28 6e 01 00 call 14265c <== NOT EXECUTED 12b834: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } 12b837: c9 leave <== NOT EXECUTED 12b838: c3 ret <== NOT EXECUTED 0012b83c : fclose(passwd_fp); passwd_fp = fopen("/etc/passwd", "r"); } void endpwent(void) { 12b83c: 55 push %ebp <== NOT EXECUTED 12b83d: 89 e5 mov %esp,%ebp <== NOT EXECUTED 12b83f: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED if (passwd_fp != NULL) 12b842: a1 84 e9 16 00 mov 0x16e984,%eax <== NOT EXECUTED 12b847: 85 c0 test %eax,%eax <== NOT EXECUTED 12b849: 74 0c je 12b857 <== NOT EXECUTED fclose(passwd_fp); 12b84b: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12b84e: 50 push %eax <== NOT EXECUTED 12b84f: e8 08 6e 01 00 call 14265c <== NOT EXECUTED 12b854: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } 12b857: c9 leave <== NOT EXECUTED 12b858: c3 ret <== NOT EXECUTED 00109764 : * 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) { 109764: 55 push %ebp <== NOT EXECUTED 109765: 89 e5 mov %esp,%ebp <== NOT EXECUTED 109767: 57 push %edi <== NOT EXECUTED 109768: 56 push %esi <== NOT EXECUTED 109769: 53 push %ebx <== NOT EXECUTED 10976a: 83 ec 1c sub $0x1c,%esp <== NOT EXECUTED 10976d: 89 c3 mov %eax,%ebx <== NOT EXECUTED 10976f: 89 d7 mov %edx,%edi <== NOT EXECUTED if (tty->ccount == 0) 109771: 8b 48 20 mov 0x20(%eax),%ecx <== NOT EXECUTED 109774: 85 c9 test %ecx,%ecx <== NOT EXECUTED 109776: 0f 84 84 00 00 00 je 109800 <== NOT EXECUTED return; if (lineFlag) { 10977c: 85 d2 test %edx,%edx <== NOT EXECUTED 10977e: 0f 85 84 00 00 00 jne 109808 <== NOT EXECUTED 109784: 8b 50 3c mov 0x3c(%eax),%edx <== NOT EXECUTED 109787: 89 7d e4 mov %edi,-0x1c(%ebp) <== NOT EXECUTED 10978a: eb 1d jmp 1097a9 <== NOT EXECUTED rtems_termios_puts ("\b", 1, tty); tty->column--; } } else { if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) { 10978c: 80 e6 02 and $0x2,%dh <== NOT EXECUTED 10978f: 0f 85 37 01 00 00 jne 1098cc <== NOT EXECUTED 109795: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if (tty->column) tty->column--; } } } if (!lineFlag) 109798: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED 10979b: 85 d2 test %edx,%edx <== NOT EXECUTED 10979d: 74 61 je 109800 <== NOT EXECUTED if (tty->termios.c_lflag & ECHOK) echo ('\n', tty); return; } } while (tty->ccount) { 10979f: 8b 4b 20 mov 0x20(%ebx),%ecx <== NOT EXECUTED 1097a2: 85 c9 test %ecx,%ecx <== NOT EXECUTED 1097a4: 74 5a je 109800 <== NOT EXECUTED 1097a6: 8b 53 3c mov 0x3c(%ebx),%edx <== NOT EXECUTED unsigned char c = tty->cbuf[--tty->ccount]; 1097a9: 8b 7b 1c mov 0x1c(%ebx),%edi <== NOT EXECUTED 1097ac: 49 dec %ecx <== NOT EXECUTED 1097ad: 89 4b 20 mov %ecx,0x20(%ebx) <== NOT EXECUTED 1097b0: 8a 04 0f mov (%edi,%ecx,1),%al <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) { 1097b3: f6 c2 08 test $0x8,%dl <== NOT EXECUTED 1097b6: 74 e0 je 109798 <== NOT EXECUTED if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) { 1097b8: 8b 75 e4 mov -0x1c(%ebp),%esi <== NOT EXECUTED 1097bb: 85 f6 test %esi,%esi <== NOT EXECUTED 1097bd: 75 09 jne 1097c8 <== NOT EXECUTED 1097bf: f6 c2 10 test $0x10,%dl <== NOT EXECUTED 1097c2: 0f 84 f0 00 00 00 je 1098b8 <== NOT EXECUTED echo (tty->termios.c_cc[VERASE], tty); } else if (c == '\t') { 1097c8: 3c 09 cmp $0x9,%al <== NOT EXECUTED 1097ca: 74 58 je 109824 <== NOT EXECUTED rtems_termios_puts ("\b", 1, tty); tty->column--; } } else { if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) { 1097cc: 0f b6 c0 movzbl %al,%eax <== NOT EXECUTED 1097cf: 8d 70 01 lea 0x1(%eax),%esi <== NOT EXECUTED 1097d2: a1 e8 50 12 00 mov 0x1250e8,%eax <== NOT EXECUTED 1097d7: f6 04 30 20 testb $0x20,(%eax,%esi,1) <== NOT EXECUTED 1097db: 75 af jne 10978c <== NOT EXECUTED rtems_termios_puts ("\b \b", 3, tty); if (tty->column) tty->column--; } if (!iscntrl (c) || (tty->termios.c_lflag & ECHOCTL)) { rtems_termios_puts ("\b \b", 3, tty); 1097dd: 51 push %ecx <== NOT EXECUTED 1097de: 53 push %ebx <== NOT EXECUTED 1097df: 6a 03 push $0x3 <== NOT EXECUTED 1097e1: 68 cc 0c 12 00 push $0x120ccc <== NOT EXECUTED 1097e6: e8 a5 fc ff ff call 109490 <== NOT EXECUTED if (tty->column) 1097eb: 8b 43 28 mov 0x28(%ebx),%eax <== NOT EXECUTED 1097ee: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 1097f1: 85 c0 test %eax,%eax <== NOT EXECUTED 1097f3: 74 a3 je 109798 <== NOT EXECUTED tty->column--; 1097f5: 48 dec %eax <== NOT EXECUTED 1097f6: 89 43 28 mov %eax,0x28(%ebx) <== NOT EXECUTED } } } if (!lineFlag) 1097f9: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED 1097fc: 85 d2 test %edx,%edx <== NOT EXECUTED 1097fe: 75 9f jne 10979f <== NOT EXECUTED break; } } 109800: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 109803: 5b pop %ebx <== NOT EXECUTED 109804: 5e pop %esi <== NOT EXECUTED 109805: 5f pop %edi <== NOT EXECUTED 109806: c9 leave <== NOT EXECUTED 109807: c3 ret <== NOT EXECUTED erase (struct rtems_termios_tty *tty, int lineFlag) { if (tty->ccount == 0) return; if (lineFlag) { if (!(tty->termios.c_lflag & ECHO)) { 109808: 8b 50 3c mov 0x3c(%eax),%edx <== NOT EXECUTED 10980b: f6 c2 08 test $0x8,%dl <== NOT EXECUTED 10980e: 0f 84 94 00 00 00 je 1098a8 <== NOT EXECUTED tty->ccount = 0; return; } if (!(tty->termios.c_lflag & ECHOE)) { 109814: f6 c2 10 test $0x10,%dl <== NOT EXECUTED 109817: 0f 84 eb 00 00 00 je 109908 <== NOT EXECUTED 10981d: 89 7d e4 mov %edi,-0x1c(%ebp) <== NOT EXECUTED 109820: eb 87 jmp 1097a9 <== NOT EXECUTED 109822: 66 90 xchg %ax,%ax <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) { if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) { echo (tty->termios.c_cc[VERASE], tty); } else if (c == '\t') { int col = tty->read_start_column; 109824: 8b 73 2c mov 0x2c(%ebx),%esi <== NOT EXECUTED int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 109827: 85 c9 test %ecx,%ecx <== NOT EXECUTED 109829: 74 46 je 109871 <== NOT EXECUTED c = tty->cbuf[i++]; if (c == '\t') { col = (col | 7) + 1; } else if (iscntrl (c)) { 10982b: a1 e8 50 12 00 mov 0x1250e8,%eax <== NOT EXECUTED 109830: 89 45 dc mov %eax,-0x24(%ebp) <== NOT EXECUTED 109833: 31 c0 xor %eax,%eax <== NOT EXECUTED if (tty->termios.c_lflag & ECHOCTL) 109835: 81 e2 00 02 00 00 and $0x200,%edx <== NOT EXECUTED 10983b: 89 55 e0 mov %edx,-0x20(%ebp) <== NOT EXECUTED 10983e: 89 5d d8 mov %ebx,-0x28(%ebp) <== NOT EXECUTED 109841: 8b 5d dc mov -0x24(%ebp),%ebx <== NOT EXECUTED 109844: eb 10 jmp 109856 <== NOT EXECUTED 109846: 66 90 xchg %ax,%ax <== NOT EXECUTED 109848: 8b 55 e0 mov -0x20(%ebp),%edx <== NOT EXECUTED 10984b: 85 d2 test %edx,%edx <== NOT EXECUTED 10984d: 74 03 je 109852 <== NOT EXECUTED col += 2; 10984f: 83 c6 02 add $0x2,%esi <== NOT EXECUTED int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 109852: 39 c1 cmp %eax,%ecx <== NOT EXECUTED 109854: 74 18 je 10986e <== NOT EXECUTED c = tty->cbuf[i++]; 109856: 8a 14 07 mov (%edi,%eax,1),%dl <== NOT EXECUTED 109859: 40 inc %eax <== NOT EXECUTED if (c == '\t') { 10985a: 80 fa 09 cmp $0x9,%dl <== NOT EXECUTED 10985d: 74 41 je 1098a0 <== NOT EXECUTED col = (col | 7) + 1; } else if (iscntrl (c)) { 10985f: 0f b6 d2 movzbl %dl,%edx <== NOT EXECUTED 109862: f6 44 13 01 20 testb $0x20,0x1(%ebx,%edx,1) <== NOT EXECUTED 109867: 75 df jne 109848 <== NOT EXECUTED if (tty->termios.c_lflag & ECHOCTL) col += 2; } else { col++; 109869: 46 inc %esi <== NOT EXECUTED int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 10986a: 39 c1 cmp %eax,%ecx <== NOT EXECUTED 10986c: 75 e8 jne 109856 <== NOT EXECUTED 10986e: 8b 5d d8 mov -0x28(%ebp),%ebx <== NOT EXECUTED } /* * Back up over the tab */ while (tty->column > col) { 109871: 3b 73 28 cmp 0x28(%ebx),%esi <== NOT EXECUTED 109874: 0f 8d 1e ff ff ff jge 109798 <== NOT EXECUTED 10987a: 66 90 xchg %ax,%ax <== NOT EXECUTED rtems_termios_puts ("\b", 1, tty); 10987c: 50 push %eax <== NOT EXECUTED 10987d: 53 push %ebx <== NOT EXECUTED 10987e: 6a 01 push $0x1 <== NOT EXECUTED 109880: 68 ce 0c 12 00 push $0x120cce <== NOT EXECUTED 109885: e8 06 fc ff ff call 109490 <== NOT EXECUTED tty->column--; 10988a: 8b 43 28 mov 0x28(%ebx),%eax <== NOT EXECUTED 10988d: 48 dec %eax <== NOT EXECUTED 10988e: 89 43 28 mov %eax,0x28(%ebx) <== NOT EXECUTED } /* * Back up over the tab */ while (tty->column > col) { 109891: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 109894: 39 c6 cmp %eax,%esi <== NOT EXECUTED 109896: 7c e4 jl 10987c <== NOT EXECUTED 109898: e9 fb fe ff ff jmp 109798 <== NOT EXECUTED 10989d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED * Find the character before the tab */ while (i != tty->ccount) { c = tty->cbuf[i++]; if (c == '\t') { col = (col | 7) + 1; 1098a0: 83 ce 07 or $0x7,%esi <== NOT EXECUTED 1098a3: 46 inc %esi <== NOT EXECUTED 1098a4: eb ac jmp 109852 <== NOT EXECUTED 1098a6: 66 90 xchg %ax,%ax <== NOT EXECUTED { if (tty->ccount == 0) return; if (lineFlag) { if (!(tty->termios.c_lflag & ECHO)) { tty->ccount = 0; 1098a8: c7 40 20 00 00 00 00 movl $0x0,0x20(%eax) <== NOT EXECUTED } } if (!lineFlag) break; } } 1098af: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 1098b2: 5b pop %ebx <== NOT EXECUTED 1098b3: 5e pop %esi <== NOT EXECUTED 1098b4: 5f pop %edi <== NOT EXECUTED 1098b5: c9 leave <== NOT EXECUTED 1098b6: c3 ret <== NOT EXECUTED 1098b7: 90 nop <== NOT EXECUTED while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; if (tty->termios.c_lflag & ECHO) { if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) { echo (tty->termios.c_cc[VERASE], tty); 1098b8: 0f b6 43 43 movzbl 0x43(%ebx),%eax <== NOT EXECUTED 1098bc: 89 da mov %ebx,%edx <== NOT EXECUTED } } if (!lineFlag) break; } } 1098be: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 1098c1: 5b pop %ebx <== NOT EXECUTED 1098c2: 5e pop %esi <== NOT EXECUTED 1098c3: 5f pop %edi <== NOT EXECUTED 1098c4: 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); 1098c5: e9 36 fe ff ff jmp 109700 <== NOT EXECUTED 1098ca: 66 90 xchg %ax,%ax <== NOT EXECUTED tty->column--; } } else { if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) { rtems_termios_puts ("\b \b", 3, tty); 1098cc: 57 push %edi <== NOT EXECUTED 1098cd: 53 push %ebx <== NOT EXECUTED 1098ce: 6a 03 push $0x3 <== NOT EXECUTED 1098d0: 68 cc 0c 12 00 push $0x120ccc <== NOT EXECUTED 1098d5: e8 b6 fb ff ff call 109490 <== NOT EXECUTED if (tty->column) 1098da: 8b 43 28 mov 0x28(%ebx),%eax <== NOT EXECUTED 1098dd: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 1098e0: 85 c0 test %eax,%eax <== NOT EXECUTED 1098e2: 74 04 je 1098e8 <== NOT EXECUTED tty->column--; 1098e4: 48 dec %eax <== NOT EXECUTED 1098e5: 89 43 28 mov %eax,0x28(%ebx) <== NOT EXECUTED } if (!iscntrl (c) || (tty->termios.c_lflag & ECHOCTL)) { 1098e8: a1 e8 50 12 00 mov 0x1250e8,%eax <== NOT EXECUTED 1098ed: f6 04 30 20 testb $0x20,(%eax,%esi,1) <== NOT EXECUTED 1098f1: 0f 84 e6 fe ff ff je 1097dd <== NOT EXECUTED 1098f7: f6 43 3d 02 testb $0x2,0x3d(%ebx) <== NOT EXECUTED 1098fb: 0f 85 dc fe ff ff jne 1097dd <== NOT EXECUTED 109901: e9 92 fe ff ff jmp 109798 <== NOT EXECUTED 109906: 66 90 xchg %ax,%ax <== NOT EXECUTED if (!(tty->termios.c_lflag & ECHO)) { tty->ccount = 0; return; } if (!(tty->termios.c_lflag & ECHOE)) { tty->ccount = 0; 109908: c7 40 20 00 00 00 00 movl $0x0,0x20(%eax) <== NOT EXECUTED echo (tty->termios.c_cc[VKILL], tty); 10990f: 0f b6 40 44 movzbl 0x44(%eax),%eax <== NOT EXECUTED 109913: 89 da mov %ebx,%edx <== NOT EXECUTED 109915: e8 e6 fd ff ff call 109700 <== NOT EXECUTED if (tty->termios.c_lflag & ECHOK) 10991a: f6 43 3c 20 testb $0x20,0x3c(%ebx) <== NOT EXECUTED 10991e: 0f 84 dc fe ff ff je 109800 <== NOT EXECUTED echo ('\n', tty); 109924: 89 da mov %ebx,%edx <== NOT EXECUTED 109926: b8 0a 00 00 00 mov $0xa,%eax <== NOT EXECUTED 10992b: eb 91 jmp 1098be <== NOT EXECUTED 0013c884 : #include int fchdir( int fd ) { 13c884: 55 push %ebp <== NOT EXECUTED 13c885: 89 e5 mov %esp,%ebp <== NOT EXECUTED 13c887: 57 push %edi <== NOT EXECUTED 13c888: 56 push %esi <== NOT EXECUTED 13c889: 53 push %ebx <== NOT EXECUTED 13c88a: 83 ec 4c sub $0x4c,%esp <== NOT EXECUTED 13c88d: 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 ); 13c890: 3b 1d ac 72 16 00 cmp 0x1672ac,%ebx <== NOT EXECUTED 13c896: 0f 83 c8 00 00 00 jae 13c964 <== NOT EXECUTED iop = rtems_libio_iop( fd ); 13c89c: c1 e3 06 shl $0x6,%ebx <== NOT EXECUTED 13c89f: 03 1d 98 ee 16 00 add 0x16ee98,%ebx <== NOT EXECUTED rtems_libio_check_is_open(iop); 13c8a5: 8b 43 14 mov 0x14(%ebx),%eax <== NOT EXECUTED 13c8a8: f6 c4 01 test $0x1,%ah <== NOT EXECUTED 13c8ab: 0f 84 b3 00 00 00 je 13c964 <== NOT EXECUTED /* * Now process the fchmod(). */ rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); 13c8b1: a8 02 test $0x2,%al <== NOT EXECUTED 13c8b3: 0f 84 db 00 00 00 je 13c994 <== NOT EXECUTED /* * Verify you can change directory into this node. */ if ( !iop->pathinfo.ops ) { 13c8b9: 8b 43 24 mov 0x24(%ebx),%eax <== NOT EXECUTED 13c8bc: 85 c0 test %eax,%eax <== NOT EXECUTED 13c8be: 0f 84 e2 00 00 00 je 13c9a6 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( !iop->pathinfo.ops->node_type_h ) { 13c8c4: 8b 40 10 mov 0x10(%eax),%eax <== NOT EXECUTED 13c8c7: 85 c0 test %eax,%eax <== NOT EXECUTED 13c8c9: 0f 84 d7 00 00 00 je 13c9a6 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*iop->pathinfo.ops->node_type_h)( &iop->pathinfo ) != 13c8cf: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 13c8d2: 83 c3 18 add $0x18,%ebx <== NOT EXECUTED 13c8d5: 53 push %ebx <== NOT EXECUTED 13c8d6: ff d0 call *%eax <== NOT EXECUTED 13c8d8: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 13c8db: 48 dec %eax <== NOT EXECUTED 13c8dc: 75 72 jne 13c950 <== NOT EXECUTED * but note the race condition. Threads who * share their rtems_filesystem_current better * be synchronized! */ saved = rtems_filesystem_current; 13c8de: a1 c4 93 16 00 mov 0x1693c4,%eax <== NOT EXECUTED 13c8e3: 8d 55 c0 lea -0x40(%ebp),%edx <== NOT EXECUTED 13c8e6: 89 55 b4 mov %edx,-0x4c(%ebp) <== NOT EXECUTED 13c8e9: 8d 70 04 lea 0x4(%eax),%esi <== NOT EXECUTED 13c8ec: b9 05 00 00 00 mov $0x5,%ecx <== NOT EXECUTED 13c8f1: 89 d7 mov %edx,%edi <== NOT EXECUTED 13c8f3: f3 a5 rep movsl %ds:(%esi),%es:(%edi) <== NOT EXECUTED rtems_filesystem_current = iop->pathinfo; 13c8f5: 8d 78 04 lea 0x4(%eax),%edi <== NOT EXECUTED 13c8f8: b1 05 mov $0x5,%cl <== NOT EXECUTED 13c8fa: 89 de mov %ebx,%esi <== NOT EXECUTED 13c8fc: f3 a5 rep movsl %ds:(%esi),%es:(%edi) <== NOT EXECUTED /* clone the current node */ if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) { 13c8fe: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 13c901: 6a 00 push $0x0 <== NOT EXECUTED 13c903: 8d 75 d4 lea -0x2c(%ebp),%esi <== NOT EXECUTED 13c906: 56 push %esi <== NOT EXECUTED 13c907: 6a 00 push $0x0 <== NOT EXECUTED 13c909: 6a 01 push $0x1 <== NOT EXECUTED 13c90b: 68 7c ba 15 00 push $0x15ba7c <== NOT EXECUTED 13c910: e8 2b 05 fd ff call 10ce40 <== NOT EXECUTED 13c915: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 13c918: 85 c0 test %eax,%eax <== NOT EXECUTED 13c91a: 75 5c jne 13c978 <== NOT EXECUTED /* cloning failed; restore original and bail out */ rtems_filesystem_current = saved; return -1; } /* release the old one */ rtems_filesystem_freenode( &saved ); 13c91c: 8b 45 cc mov -0x34(%ebp),%eax <== NOT EXECUTED 13c91f: 85 c0 test %eax,%eax <== NOT EXECUTED 13c921: 74 13 je 13c936 <== NOT EXECUTED 13c923: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 13c926: 85 c0 test %eax,%eax <== NOT EXECUTED 13c928: 74 0c je 13c936 <== NOT EXECUTED 13c92a: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 13c92d: 8d 55 c0 lea -0x40(%ebp),%edx <== NOT EXECUTED 13c930: 52 push %edx <== NOT EXECUTED 13c931: ff d0 call *%eax <== NOT EXECUTED 13c933: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_filesystem_current = loc; 13c936: 8b 3d c4 93 16 00 mov 0x1693c4,%edi <== NOT EXECUTED 13c93c: 83 c7 04 add $0x4,%edi <== NOT EXECUTED 13c93f: b9 05 00 00 00 mov $0x5,%ecx <== NOT EXECUTED 13c944: f3 a5 rep movsl %ds:(%esi),%es:(%edi) <== NOT EXECUTED 13c946: 31 c0 xor %eax,%eax <== NOT EXECUTED return 0; } 13c948: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 13c94b: 5b pop %ebx <== NOT EXECUTED 13c94c: 5e pop %esi <== NOT EXECUTED 13c94d: 5f pop %edi <== NOT EXECUTED 13c94e: c9 leave <== NOT EXECUTED 13c94f: c3 ret <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*iop->pathinfo.ops->node_type_h)( &iop->pathinfo ) != RTEMS_FILESYSTEM_DIRECTORY ) { rtems_set_errno_and_return_minus_one( ENOTDIR ); 13c950: e8 bb 5b 00 00 call 142510 <__errno> <== NOT EXECUTED 13c955: c7 00 14 00 00 00 movl $0x14,(%eax) <== NOT EXECUTED 13c95b: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 13c960: eb e6 jmp 13c948 <== NOT EXECUTED 13c962: 66 90 xchg %ax,%ax <== NOT EXECUTED rtems_libio_t *iop; rtems_filesystem_location_info_t loc, saved; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); 13c964: e8 a7 5b 00 00 call 142510 <__errno> <== NOT EXECUTED 13c969: c7 00 09 00 00 00 movl $0x9,(%eax) <== NOT EXECUTED 13c96f: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 13c974: eb d2 jmp 13c948 <== NOT EXECUTED 13c976: 66 90 xchg %ax,%ax <== NOT EXECUTED rtems_filesystem_current = iop->pathinfo; /* clone the current node */ if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) { /* cloning failed; restore original and bail out */ rtems_filesystem_current = saved; 13c978: 8b 3d c4 93 16 00 mov 0x1693c4,%edi <== NOT EXECUTED 13c97e: 83 c7 04 add $0x4,%edi <== NOT EXECUTED 13c981: b9 05 00 00 00 mov $0x5,%ecx <== NOT EXECUTED 13c986: 8b 75 b4 mov -0x4c(%ebp),%esi <== NOT EXECUTED 13c989: f3 a5 rep movsl %ds:(%esi),%es:(%edi) <== NOT EXECUTED 13c98b: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED return -1; 13c990: eb b6 jmp 13c948 <== NOT EXECUTED 13c992: 66 90 xchg %ax,%ax <== NOT EXECUTED /* * Now process the fchmod(). */ rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); 13c994: e8 77 5b 00 00 call 142510 <__errno> <== NOT EXECUTED 13c999: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 13c99f: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 13c9a4: eb a2 jmp 13c948 <== NOT EXECUTED if ( !iop->pathinfo.ops ) { rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( !iop->pathinfo.ops->node_type_h ) { rtems_set_errno_and_return_minus_one( ENOTSUP ); 13c9a6: e8 65 5b 00 00 call 142510 <__errno> <== NOT EXECUTED 13c9ab: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 13c9b1: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 13c9b6: eb 90 jmp 13c948 <== NOT EXECUTED 0012b500 : int fchmod( int fd, mode_t mode ) { 12b500: 55 push %ebp <== NOT EXECUTED 12b501: 89 e5 mov %esp,%ebp <== NOT EXECUTED 12b503: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 12b506: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 12b509: 8b 4d 0c mov 0xc(%ebp),%ecx <== NOT EXECUTED rtems_libio_t *iop; rtems_libio_check_fd( fd ); 12b50c: 3b 05 ac 72 16 00 cmp 0x1672ac,%eax <== NOT EXECUTED 12b512: 73 34 jae 12b548 <== NOT EXECUTED iop = rtems_libio_iop( fd ); 12b514: c1 e0 06 shl $0x6,%eax <== NOT EXECUTED 12b517: 03 05 98 ee 16 00 add 0x16ee98,%eax <== NOT EXECUTED rtems_libio_check_is_open(iop); 12b51d: 8b 50 14 mov 0x14(%eax),%edx <== NOT EXECUTED 12b520: f6 c6 01 test $0x1,%dh <== NOT EXECUTED 12b523: 74 23 je 12b548 <== NOT EXECUTED /* * Now process the fchmod(). */ rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 12b525: 83 e2 04 and $0x4,%edx <== NOT EXECUTED 12b528: 74 32 je 12b55c <== NOT EXECUTED if ( !iop->handlers->fchmod_h ) 12b52a: 8b 50 3c mov 0x3c(%eax),%edx <== NOT EXECUTED 12b52d: 8b 52 1c mov 0x1c(%edx),%edx <== NOT EXECUTED 12b530: 85 d2 test %edx,%edx <== NOT EXECUTED 12b532: 74 35 je 12b569 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->pathinfo.handlers->fchmod_h)( &iop->pathinfo, mode ); 12b534: 8b 50 20 mov 0x20(%eax),%edx <== NOT EXECUTED 12b537: 89 4d 0c mov %ecx,0xc(%ebp) <== NOT EXECUTED 12b53a: 83 c0 18 add $0x18,%eax <== NOT EXECUTED 12b53d: 89 45 08 mov %eax,0x8(%ebp) <== NOT EXECUTED 12b540: 8b 42 1c mov 0x1c(%edx),%eax <== NOT EXECUTED } 12b543: 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 ); 12b544: ff e0 jmp *%eax <== NOT EXECUTED 12b546: 66 90 xchg %ax,%ax <== NOT EXECUTED { rtems_libio_t *iop; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); 12b548: e8 c3 6f 01 00 call 142510 <__errno> <== NOT EXECUTED 12b54d: c7 00 09 00 00 00 movl $0x9,(%eax) <== NOT EXECUTED if ( !iop->handlers->fchmod_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->pathinfo.handlers->fchmod_h)( &iop->pathinfo, mode ); } 12b553: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 12b558: c9 leave <== NOT EXECUTED 12b559: c3 ret <== NOT EXECUTED 12b55a: 66 90 xchg %ax,%ax <== NOT EXECUTED /* * Now process the fchmod(). */ rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 12b55c: e8 af 6f 01 00 call 142510 <__errno> <== NOT EXECUTED 12b561: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 12b567: eb ea jmp 12b553 <== NOT EXECUTED if ( !iop->handlers->fchmod_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 12b569: e8 a2 6f 01 00 call 142510 <__errno> <== NOT EXECUTED 12b56e: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 12b574: eb dd jmp 12b553 <== NOT EXECUTED 0012b578 : int fchown( int fd, uid_t owner, gid_t group ) { 12b578: 55 push %ebp <== NOT EXECUTED 12b579: 89 e5 mov %esp,%ebp <== NOT EXECUTED 12b57b: 53 push %ebx <== NOT EXECUTED 12b57c: 83 ec 04 sub $0x4,%esp <== NOT EXECUTED 12b57f: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 12b582: 8b 4d 0c mov 0xc(%ebp),%ecx <== NOT EXECUTED 12b585: 8b 5d 10 mov 0x10(%ebp),%ebx <== NOT EXECUTED rtems_libio_t *iop; rtems_libio_check_fd( fd ); 12b588: 3b 05 ac 72 16 00 cmp 0x1672ac,%eax <== NOT EXECUTED 12b58e: 73 38 jae 12b5c8 <== NOT EXECUTED iop = rtems_libio_iop( fd ); 12b590: c1 e0 06 shl $0x6,%eax <== NOT EXECUTED 12b593: 03 05 98 ee 16 00 add 0x16ee98,%eax <== NOT EXECUTED rtems_libio_check_is_open(iop); 12b599: 8b 50 14 mov 0x14(%eax),%edx <== NOT EXECUTED 12b59c: f6 c6 01 test $0x1,%dh <== NOT EXECUTED 12b59f: 74 27 je 12b5c8 <== NOT EXECUTED rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 12b5a1: 83 e2 04 and $0x4,%edx <== NOT EXECUTED 12b5a4: 74 36 je 12b5dc <== NOT EXECUTED if ( !iop->pathinfo.ops->chown_h ) 12b5a6: 8b 50 24 mov 0x24(%eax),%edx <== NOT EXECUTED 12b5a9: 8b 52 18 mov 0x18(%edx),%edx <== NOT EXECUTED 12b5ac: 85 d2 test %edx,%edx <== NOT EXECUTED 12b5ae: 74 39 je 12b5e9 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->pathinfo.ops->chown_h)( &iop->pathinfo, owner, group ); 12b5b0: 0f b7 db movzwl %bx,%ebx <== NOT EXECUTED 12b5b3: 89 5d 10 mov %ebx,0x10(%ebp) <== NOT EXECUTED 12b5b6: 0f b7 c9 movzwl %cx,%ecx <== NOT EXECUTED 12b5b9: 89 4d 0c mov %ecx,0xc(%ebp) <== NOT EXECUTED 12b5bc: 83 c0 18 add $0x18,%eax <== NOT EXECUTED 12b5bf: 89 45 08 mov %eax,0x8(%ebp) <== NOT EXECUTED } 12b5c2: 59 pop %ecx <== NOT EXECUTED 12b5c3: 5b pop %ebx <== NOT EXECUTED 12b5c4: 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 ); 12b5c5: ff e2 jmp *%edx <== NOT EXECUTED 12b5c7: 90 nop <== NOT EXECUTED { rtems_libio_t *iop; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); 12b5c8: e8 43 6f 01 00 call 142510 <__errno> <== NOT EXECUTED 12b5cd: c7 00 09 00 00 00 movl $0x9,(%eax) <== NOT EXECUTED if ( !iop->pathinfo.ops->chown_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->pathinfo.ops->chown_h)( &iop->pathinfo, owner, group ); } 12b5d3: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 12b5d8: 5a pop %edx <== NOT EXECUTED 12b5d9: 5b pop %ebx <== NOT EXECUTED 12b5da: c9 leave <== NOT EXECUTED 12b5db: c3 ret <== NOT EXECUTED rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 12b5dc: e8 2f 6f 01 00 call 142510 <__errno> <== NOT EXECUTED 12b5e1: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 12b5e7: eb ea jmp 12b5d3 <== NOT EXECUTED if ( !iop->pathinfo.ops->chown_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 12b5e9: e8 22 6f 01 00 call 142510 <__errno> <== NOT EXECUTED 12b5ee: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 12b5f4: eb dd jmp 12b5d3 <== NOT EXECUTED 0013c9b8 : int fcntl( int fd, int cmd, ... ) { 13c9b8: 55 push %ebp 13c9b9: 89 e5 mov %esp,%ebp 13c9bb: 57 push %edi 13c9bc: 56 push %esi 13c9bd: 53 push %ebx 13c9be: 83 ec 1c sub $0x1c,%esp 13c9c1: 8b 5d 08 mov 0x8(%ebp),%ebx 13c9c4: 8b 55 0c mov 0xc(%ebp),%edx #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, ...)); 13c9c7: 8d 7d 10 lea 0x10(%ebp),%edi int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); 13c9ca: 8b 35 ac 72 16 00 mov 0x1672ac,%esi 13c9d0: 39 f3 cmp %esi,%ebx 13c9d2: 0f 83 3c 01 00 00 jae 13cb14 <== ALWAYS TAKEN iop = rtems_libio_iop( fd ); 13c9d8: a1 98 ee 16 00 mov 0x16ee98,%eax 13c9dd: c1 e3 06 shl $0x6,%ebx 13c9e0: 8d 1c 18 lea (%eax,%ebx,1),%ebx rtems_libio_check_is_open(iop); 13c9e3: 8b 4b 14 mov 0x14(%ebx),%ecx 13c9e6: f6 c5 01 test $0x1,%ch 13c9e9: 0f 84 25 01 00 00 je 13cb14 <== ALWAYS TAKEN /* * This switch should contain all the cases from POSIX. */ switch ( cmd ) { 13c9ef: 83 fa 09 cmp $0x9,%edx 13c9f2: 76 14 jbe 13ca08 errno = ENOTSUP; ret = -1; break; default: errno = EINVAL; 13c9f4: e8 17 5b 00 00 call 142510 <__errno> 13c9f9: c7 00 16 00 00 00 movl $0x16,(%eax) 13c9ff: be ff ff ff ff mov $0xffffffff,%esi 13ca04: eb 1a jmp 13ca20 <== ALWAYS TAKEN 13ca06: 66 90 xchg %ax,%ax <== NOT EXECUTED /* * This switch should contain all the cases from POSIX. */ switch ( cmd ) { 13ca08: ff 24 95 0c 39 16 00 jmp *0x16390c(,%edx,4) 13ca0f: 90 nop <== NOT EXECUTED errno = ENOTSUP; ret = -1; break; case F_GETOWN: /* for sockets. */ errno = ENOTSUP; 13ca10: e8 fb 5a 00 00 call 142510 <__errno> 13ca15: c7 00 86 00 00 00 movl $0x86,(%eax) 13ca1b: be ff ff ff ff mov $0xffffffff,%esi va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; } 13ca20: 89 f0 mov %esi,%eax 13ca22: 8d 65 f4 lea -0xc(%ebp),%esp 13ca25: 5b pop %ebx 13ca26: 5e pop %esi 13ca27: 5f pop %edi 13ca28: c9 leave 13ca29: c3 ret 13ca2a: 66 90 xchg %ax,%ax <== NOT EXECUTED case F_GETFL: /* more flags (cloexec) */ ret = rtems_libio_to_fcntl_flags( iop->flags ); break; case F_SETFL: flags = rtems_libio_fcntl_flags( va_arg( ap, int ) ); 13ca2c: 83 ec 0c sub $0xc,%esp 13ca2f: ff 37 pushl (%edi) 13ca31: 89 55 e0 mov %edx,-0x20(%ebp) 13ca34: e8 73 08 fd ff call 10d2ac <== ALWAYS TAKEN /* * XXX If we are turning on append, should we seek to the end? */ iop->flags = (iop->flags & ~mask) | (flags & mask); 13ca39: 25 01 02 00 00 and $0x201,%eax 13ca3e: 8b 4b 14 mov 0x14(%ebx),%ecx 13ca41: 81 e1 fe fd ff ff and $0xfffffdfe,%ecx 13ca47: 09 c8 or %ecx,%eax 13ca49: 89 43 14 mov %eax,0x14(%ebx) 13ca4c: 31 f6 xor %esi,%esi 13ca4e: 83 c4 10 add $0x10,%esp 13ca51: 8b 55 e0 mov -0x20(%ebp),%edx * If we got this far successfully, then we give the optional * filesystem specific handler a chance to process this. */ if (ret >= 0) { if (iop->handlers->fcntl_h) { 13ca54: 8b 43 3c mov 0x3c(%ebx),%eax 13ca57: 8b 40 30 mov 0x30(%eax),%eax 13ca5a: 85 c0 test %eax,%eax 13ca5c: 74 c2 je 13ca20 <== ALWAYS TAKEN int err = (*iop->handlers->fcntl_h)( cmd, iop ); 13ca5e: 83 ec 08 sub $0x8,%esp 13ca61: 53 push %ebx 13ca62: 52 push %edx 13ca63: ff d0 call *%eax 13ca65: 89 c3 mov %eax,%ebx if (err) { 13ca67: 83 c4 10 add $0x10,%esp 13ca6a: 85 c0 test %eax,%eax 13ca6c: 74 b2 je 13ca20 <== NEVER TAKEN errno = err; 13ca6e: e8 9d 5a 00 00 call 142510 <__errno> <== NOT EXECUTED 13ca73: 89 18 mov %ebx,(%eax) <== NOT EXECUTED 13ca75: be ff ff ff ff mov $0xffffffff,%esi <== NOT EXECUTED va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; } 13ca7a: 89 f0 mov %esi,%eax <== NOT EXECUTED 13ca7c: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 13ca7f: 5b pop %ebx <== NOT EXECUTED 13ca80: 5e pop %esi <== NOT EXECUTED 13ca81: 5f pop %edi <== NOT EXECUTED 13ca82: c9 leave <== NOT EXECUTED 13ca83: c3 ret <== NOT EXECUTED else iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC; break; case F_GETFL: /* more flags (cloexec) */ ret = rtems_libio_to_fcntl_flags( iop->flags ); 13ca84: 83 ec 0c sub $0xc,%esp 13ca87: 51 push %ecx 13ca88: 89 55 e0 mov %edx,-0x20(%ebp) 13ca8b: e8 30 06 fd ff call 10d0c0 <== ALWAYS TAKEN 13ca90: 89 c6 mov %eax,%esi 13ca92: 83 c4 10 add $0x10,%esp 13ca95: 8b 55 e0 mov -0x20(%ebp),%edx /* * If we got this far successfully, then we give the optional * filesystem specific handler a chance to process this. */ if (ret >= 0) { 13ca98: 85 f6 test %esi,%esi 13ca9a: 79 b8 jns 13ca54 <== NEVER TAKEN 13ca9c: eb 82 jmp 13ca20 <== NOT EXECUTED 13ca9e: 66 90 xchg %ax,%ax <== NOT EXECUTED * if a new process is exec()'ed. Since RTEMS does not support * processes, then we can ignore this one except to make * F_GETFD work. */ if ( va_arg( ap, int ) ) 13caa0: 8b 07 mov (%edi),%eax 13caa2: 85 c0 test %eax,%eax 13caa4: 74 52 je 13caf8 <== ALWAYS TAKEN iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC; 13caa6: 80 cd 08 or $0x8,%ch 13caa9: 89 4b 14 mov %ecx,0x14(%ebx) 13caac: 31 f6 xor %esi,%esi 13caae: eb a4 jmp 13ca54 <== ALWAYS TAKEN diop->pathinfo = iop->pathinfo; ret = (int) (diop - rtems_libio_iops); break; case F_GETFD: /* get f_flags */ ret = ((iop->flags & LIBIO_FLAGS_CLOSE_ON_EXEC) != 0); 13cab0: 89 ce mov %ecx,%esi 13cab2: c1 ee 0b shr $0xb,%esi 13cab5: 83 e6 01 and $0x1,%esi 13cab8: eb 9a jmp 13ca54 <== ALWAYS TAKEN 13caba: 66 90 xchg %ax,%ax <== NOT EXECUTED * This switch should contain all the cases from POSIX. */ switch ( cmd ) { case F_DUPFD: /* dup */ fd2 = va_arg( ap, int ); 13cabc: 8b 3f mov (%edi),%edi if ( fd2 ) 13cabe: 85 ff test %edi,%edi 13cac0: 74 6a je 13cb2c <== NEVER TAKEN diop = rtems_libio_iop( fd2 ); 13cac2: 39 fe cmp %edi,%esi <== NOT EXECUTED 13cac4: 77 42 ja 13cb08 <== NOT EXECUTED 13cac6: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) <== NOT EXECUTED 13cacd: 31 ff xor %edi,%edi <== NOT EXECUTED ret = -1; break; } } diop->handlers = iop->handlers; 13cacf: 8b 73 3c mov 0x3c(%ebx),%esi 13cad2: 89 77 3c mov %esi,0x3c(%edi) diop->file_info = iop->file_info; 13cad5: 8b 73 38 mov 0x38(%ebx),%esi 13cad8: 89 77 38 mov %esi,0x38(%edi) diop->flags = iop->flags; 13cadb: 89 4f 14 mov %ecx,0x14(%edi) diop->pathinfo = iop->pathinfo; 13cade: 83 c7 18 add $0x18,%edi 13cae1: 8d 73 18 lea 0x18(%ebx),%esi 13cae4: b9 05 00 00 00 mov $0x5,%ecx 13cae9: f3 a5 rep movsl %ds:(%esi),%es:(%edi) ret = (int) (diop - rtems_libio_iops); 13caeb: 8b 75 e4 mov -0x1c(%ebp),%esi 13caee: 29 c6 sub %eax,%esi 13caf0: c1 fe 06 sar $0x6,%esi 13caf3: eb a3 jmp 13ca98 <== ALWAYS TAKEN 13caf5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED */ if ( va_arg( ap, int ) ) iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC; else iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC; 13caf8: 80 e5 f7 and $0xf7,%ch <== NOT EXECUTED 13cafb: 89 4b 14 mov %ecx,0x14(%ebx) <== NOT EXECUTED 13cafe: 31 f6 xor %esi,%esi <== NOT EXECUTED 13cb00: e9 4f ff ff ff jmp 13ca54 <== NOT EXECUTED 13cb05: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED switch ( cmd ) { case F_DUPFD: /* dup */ fd2 = va_arg( ap, int ); if ( fd2 ) diop = rtems_libio_iop( fd2 ); 13cb08: c1 e7 06 shl $0x6,%edi <== NOT EXECUTED 13cb0b: 8d 3c 38 lea (%eax,%edi,1),%edi <== NOT EXECUTED 13cb0e: 89 7d e4 mov %edi,-0x1c(%ebp) <== NOT EXECUTED 13cb11: eb bc jmp 13cacf <== NOT EXECUTED 13cb13: 90 nop <== NOT EXECUTED int mask; int ret = 0; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); 13cb14: e8 f7 59 00 00 call 142510 <__errno> <== NOT EXECUTED 13cb19: c7 00 09 00 00 00 movl $0x9,(%eax) <== NOT EXECUTED 13cb1f: be ff ff ff ff mov $0xffffffff,%esi <== NOT EXECUTED 13cb24: e9 f7 fe ff ff jmp 13ca20 <== NOT EXECUTED 13cb29: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED fd2 = va_arg( ap, int ); if ( fd2 ) diop = rtems_libio_iop( fd2 ); else { /* allocate a file control block */ diop = rtems_libio_allocate(); 13cb2c: 89 55 e0 mov %edx,-0x20(%ebp) 13cb2f: e8 ec 06 fd ff call 10d220 <== ALWAYS TAKEN 13cb34: 89 c7 mov %eax,%edi if ( diop == 0 ) { 13cb36: 85 c0 test %eax,%eax 13cb38: 8b 55 e0 mov -0x20(%ebp),%edx 13cb3b: 0f 84 34 ff ff ff je 13ca75 <== ALWAYS TAKEN 13cb41: 89 45 e4 mov %eax,-0x1c(%ebp) 13cb44: a1 98 ee 16 00 mov 0x16ee98,%eax 13cb49: 8b 4b 14 mov 0x14(%ebx),%ecx 13cb4c: eb 81 jmp 13cacf <== ALWAYS TAKEN 001090ec : #include int fdatasync( int fd ) { 1090ec: 55 push %ebp 1090ed: 89 e5 mov %esp,%ebp 1090ef: 83 ec 08 sub $0x8,%esp 1090f2: 8b 45 08 mov 0x8(%ebp),%eax rtems_libio_t *iop; rtems_libio_check_fd( fd ); 1090f5: 3b 05 6c 67 12 00 cmp 0x12676c,%eax 1090fb: 73 27 jae 109124 iop = rtems_libio_iop( fd ); 1090fd: c1 e0 06 shl $0x6,%eax 109100: 03 05 60 a8 12 00 add 0x12a860,%eax rtems_libio_check_is_open(iop); 109106: 8b 50 14 mov 0x14(%eax),%edx 109109: f6 c6 01 test $0x1,%dh 10910c: 74 16 je 109124 <== ALWAYS TAKEN rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 10910e: 83 e2 04 and $0x4,%edx 109111: 74 25 je 109138 /* * Now process the fdatasync(). */ if ( !iop->handlers->fdatasync_h ) 109113: 8b 50 3c mov 0x3c(%eax),%edx 109116: 8b 52 2c mov 0x2c(%edx),%edx 109119: 85 d2 test %edx,%edx 10911b: 74 28 je 109145 rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->fdatasync_h)( iop ); 10911d: 89 45 08 mov %eax,0x8(%ebp) } 109120: c9 leave */ if ( !iop->handlers->fdatasync_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->fdatasync_h)( iop ); 109121: ff e2 jmp *%edx 109123: 90 nop <== NOT EXECUTED { rtems_libio_t *iop; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); 109124: e8 1f ce 00 00 call 115f48 <__errno> 109129: c7 00 09 00 00 00 movl $0x9,(%eax) if ( !iop->handlers->fdatasync_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->fdatasync_h)( iop ); } 10912f: b8 ff ff ff ff mov $0xffffffff,%eax 109134: c9 leave 109135: c3 ret 109136: 66 90 xchg %ax,%ax <== NOT EXECUTED rtems_libio_t *iop; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 109138: e8 0b ce 00 00 call 115f48 <__errno> 10913d: c7 00 16 00 00 00 movl $0x16,(%eax) 109143: eb ea jmp 10912f <== ALWAYS TAKEN /* * Now process the fdatasync(). */ if ( !iop->handlers->fdatasync_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 109145: e8 fe cd 00 00 call 115f48 <__errno> 10914a: c7 00 86 00 00 00 movl $0x86,(%eax) 109150: eb dd jmp 10912f <== ALWAYS TAKEN 00111c14 : */ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { 111c14: 55 push %ebp 111c15: 89 e5 mov %esp,%ebp 111c17: 57 push %edi 111c18: 56 push %esi 111c19: 53 push %ebx 111c1a: 83 ec 30 sub $0x30,%esp 111c1d: 8b 75 08 mov 0x8(%ebp),%esi ) { pipe_control_t *pipe; int err = 0; if (rtems_semaphore_obtain(rtems_pipe_semaphore, 111c20: 6a 00 push $0x0 111c22: 6a 00 push $0x0 111c24: ff 35 0c 70 12 00 pushl 0x12700c 111c2a: e8 31 99 ff ff call 10b560 111c2f: 83 c4 10 add $0x10,%esp 111c32: 85 c0 test %eax,%eax 111c34: 0f 85 82 00 00 00 jne 111cbc <== NEVER TAKEN RTEMS_WAIT, RTEMS_NO_TIMEOUT) != RTEMS_SUCCESSFUL) return -EINTR; pipe = *pipep; 111c3a: 8b 1e mov (%esi),%ebx <== NOT EXECUTED if (pipe == NULL) { 111c3c: 85 db test %ebx,%ebx <== NOT EXECUTED 111c3e: 0f 84 d0 01 00 00 je 111e14 <== NOT EXECUTED err = pipe_alloc(&pipe); if (err) goto out; } if (! PIPE_LOCK(pipe)) 111c44: 57 push %edi <== NOT EXECUTED 111c45: 6a 00 push $0x0 <== NOT EXECUTED 111c47: 6a 00 push $0x0 <== NOT EXECUTED 111c49: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED 111c4c: e8 0f 99 ff ff call 10b560 <== NOT EXECUTED 111c51: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 111c54: 83 f8 01 cmp $0x1,%eax <== NOT EXECUTED 111c57: 19 ff sbb %edi,%edi <== NOT EXECUTED 111c59: f7 d7 not %edi <== NOT EXECUTED 111c5b: 83 e7 fc and $0xfffffffc,%edi <== NOT EXECUTED err = -EINTR; if (*pipep == NULL) { 111c5e: 8b 0e mov (%esi),%ecx <== NOT EXECUTED 111c60: 85 c9 test %ecx,%ecx <== NOT EXECUTED 111c62: 0f 84 d8 00 00 00 je 111d40 <== NOT EXECUTED else *pipep = pipe; } out: rtems_semaphore_release(rtems_pipe_semaphore); 111c68: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 111c6b: ff 35 0c 70 12 00 pushl 0x12700c <== NOT EXECUTED 111c71: e8 e6 99 ff ff call 10b65c <== NOT EXECUTED pipe_control_t *pipe; uint prevCounter; int err; err = pipe_new(pipep); if (err) 111c76: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 111c79: 85 ff test %edi,%edi <== NOT EXECUTED 111c7b: 75 34 jne 111cb1 <== NOT EXECUTED return err; pipe = *pipep; 111c7d: 8b 1e mov (%esi),%ebx <== NOT EXECUTED switch (LIBIO_ACCMODE(iop)) { 111c7f: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED 111c82: 8b 50 14 mov 0x14(%eax),%edx <== NOT EXECUTED 111c85: 89 d0 mov %edx,%eax <== NOT EXECUTED 111c87: 83 e0 06 and $0x6,%eax <== NOT EXECUTED 111c8a: 83 f8 04 cmp $0x4,%eax <== NOT EXECUTED 111c8d: 74 3d je 111ccc <== NOT EXECUTED 111c8f: 83 f8 06 cmp $0x6,%eax <== NOT EXECUTED 111c92: 0f 84 3c 01 00 00 je 111dd4 <== NOT EXECUTED 111c98: 83 f8 02 cmp $0x2,%eax <== NOT EXECUTED 111c9b: 0f 84 bf 00 00 00 je 111d60 <== NOT EXECUTED if (pipe->Writers ++ == 0) PIPE_WAKEUPREADERS(pipe); break; } PIPE_UNLOCK(pipe); 111ca1: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 111ca4: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED 111ca7: e8 b0 99 ff ff call 10b65c <== NOT EXECUTED 111cac: 31 ff xor %edi,%edi <== NOT EXECUTED return 0; 111cae: 83 c4 10 add $0x10,%esp <== NOT EXECUTED out_error: pipe_release(pipep, iop); return err; } 111cb1: 89 f8 mov %edi,%eax <== NOT EXECUTED 111cb3: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 111cb6: 5b pop %ebx <== NOT EXECUTED 111cb7: 5e pop %esi <== NOT EXECUTED 111cb8: 5f pop %edi <== NOT EXECUTED 111cb9: c9 leave <== NOT EXECUTED 111cba: c3 ret <== NOT EXECUTED 111cbb: 90 nop <== NOT EXECUTED ) { pipe_control_t *pipe; int err = 0; if (rtems_semaphore_obtain(rtems_pipe_semaphore, 111cbc: bf fc ff ff ff mov $0xfffffffc,%edi return 0; out_error: pipe_release(pipep, iop); return err; } 111cc1: 89 f8 mov %edi,%eax 111cc3: 8d 65 f4 lea -0xc(%ebp),%esp 111cc6: 5b pop %ebx 111cc7: 5e pop %esi 111cc8: 5f pop %edi 111cc9: c9 leave 111cca: c3 ret 111ccb: 90 nop <== NOT EXECUTED } while (prevCounter == pipe->writerCounter); } break; case LIBIO_FLAGS_WRITE: if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { 111ccc: 8b 43 10 mov 0x10(%ebx),%eax <== NOT EXECUTED 111ccf: 85 c0 test %eax,%eax <== NOT EXECUTED 111cd1: 75 09 jne 111cdc <== NOT EXECUTED 111cd3: 83 e2 01 and $0x1,%edx <== NOT EXECUTED 111cd6: 0f 85 a0 02 00 00 jne 111f7c <== NOT EXECUTED err = -ENXIO; goto out_error; } pipe->writerCounter ++; 111cdc: ff 43 24 incl 0x24(%ebx) <== NOT EXECUTED if (pipe->Writers ++ == 0) 111cdf: 8b 43 14 mov 0x14(%ebx),%eax <== NOT EXECUTED 111ce2: 8d 50 01 lea 0x1(%eax),%edx <== NOT EXECUTED 111ce5: 89 53 14 mov %edx,0x14(%ebx) <== NOT EXECUTED 111ce8: 85 c0 test %eax,%eax <== NOT EXECUTED 111cea: 0f 84 d8 02 00 00 je 111fc8 <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); if (pipe->Readers == 0) { 111cf0: 8b 7b 10 mov 0x10(%ebx),%edi <== NOT EXECUTED 111cf3: 85 ff test %edi,%edi <== NOT EXECUTED 111cf5: 75 aa jne 111ca1 <== NOT EXECUTED prevCounter = pipe->readerCounter; 111cf7: 8b 7b 20 mov 0x20(%ebx),%edi <== NOT EXECUTED 111cfa: eb 19 jmp 111d15 <== NOT EXECUTED err = -EINTR; do { PIPE_UNLOCK(pipe); if (! PIPE_WRITEWAIT(pipe)) goto out_error; if (! PIPE_LOCK(pipe)) 111cfc: 50 push %eax <== NOT EXECUTED 111cfd: 6a 00 push $0x0 <== NOT EXECUTED 111cff: 6a 00 push $0x0 <== NOT EXECUTED 111d01: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED 111d04: e8 57 98 ff ff call 10b560 <== NOT EXECUTED 111d09: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 111d0c: 85 c0 test %eax,%eax <== NOT EXECUTED 111d0e: 75 23 jne 111d33 <== NOT EXECUTED goto out_error; } while (prevCounter == pipe->readerCounter); 111d10: 39 7b 20 cmp %edi,0x20(%ebx) <== NOT EXECUTED 111d13: 75 8c jne 111ca1 <== NOT EXECUTED if (pipe->Readers == 0) { prevCounter = pipe->readerCounter; err = -EINTR; do { PIPE_UNLOCK(pipe); 111d15: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 111d18: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED 111d1b: e8 3c 99 ff ff call 10b65c <== NOT EXECUTED if (! PIPE_WRITEWAIT(pipe)) 111d20: 5a pop %edx <== NOT EXECUTED 111d21: 59 pop %ecx <== NOT EXECUTED 111d22: 6a 00 push $0x0 <== NOT EXECUTED 111d24: ff 73 30 pushl 0x30(%ebx) <== NOT EXECUTED 111d27: e8 b4 0b 00 00 call 1128e0 <== NOT EXECUTED 111d2c: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 111d2f: 85 c0 test %eax,%eax <== NOT EXECUTED 111d31: 74 c9 je 111cfc <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); break; } PIPE_UNLOCK(pipe); return 0; 111d33: bf fc ff ff ff mov $0xfffffffc,%edi <== NOT EXECUTED 111d38: e9 44 02 00 00 jmp 111f81 <== NOT EXECUTED 111d3d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if (! PIPE_LOCK(pipe)) err = -EINTR; if (*pipep == NULL) { if (err) 111d40: 85 ff test %edi,%edi <== NOT EXECUTED 111d42: 0f 85 98 02 00 00 jne 111fe0 <== NOT EXECUTED pipe_free(pipe); else *pipep = pipe; 111d48: 89 1e mov %ebx,(%esi) <== NOT EXECUTED } out: rtems_semaphore_release(rtems_pipe_semaphore); 111d4a: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 111d4d: ff 35 0c 70 12 00 pushl 0x12700c <== NOT EXECUTED 111d53: e8 04 99 ff ff call 10b65c <== NOT EXECUTED 111d58: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 111d5b: e9 1d ff ff ff jmp 111c7d <== NOT EXECUTED return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++; 111d60: ff 43 20 incl 0x20(%ebx) <== NOT EXECUTED if (pipe->Readers ++ == 0) 111d63: 8b 43 10 mov 0x10(%ebx),%eax <== NOT EXECUTED 111d66: 8d 50 01 lea 0x1(%eax),%edx <== NOT EXECUTED 111d69: 89 53 10 mov %edx,0x10(%ebx) <== NOT EXECUTED 111d6c: 85 c0 test %eax,%eax <== NOT EXECUTED 111d6e: 0f 84 3c 02 00 00 je 111fb0 <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); if (pipe->Writers == 0) { 111d74: 8b 53 14 mov 0x14(%ebx),%edx <== NOT EXECUTED 111d77: 85 d2 test %edx,%edx <== NOT EXECUTED 111d79: 0f 85 22 ff ff ff jne 111ca1 <== NOT EXECUTED /* Not an error */ if (LIBIO_NODELAY(iop)) 111d7f: 8b 55 0c mov 0xc(%ebp),%edx <== NOT EXECUTED 111d82: f6 42 14 01 testb $0x1,0x14(%edx) <== NOT EXECUTED 111d86: 0f 85 15 ff ff ff jne 111ca1 <== NOT EXECUTED break; prevCounter = pipe->writerCounter; 111d8c: 8b 7b 24 mov 0x24(%ebx),%edi <== NOT EXECUTED 111d8f: eb 20 jmp 111db1 <== NOT EXECUTED 111d91: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED /* Wait until a writer opens the pipe */ do { PIPE_UNLOCK(pipe); if (! PIPE_READWAIT(pipe)) goto out_error; if (! PIPE_LOCK(pipe)) 111d94: 52 push %edx <== NOT EXECUTED 111d95: 6a 00 push $0x0 <== NOT EXECUTED 111d97: 6a 00 push $0x0 <== NOT EXECUTED 111d99: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED 111d9c: e8 bf 97 ff ff call 10b560 <== NOT EXECUTED 111da1: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 111da4: 85 c0 test %eax,%eax <== NOT EXECUTED 111da6: 75 8b jne 111d33 <== NOT EXECUTED goto out_error; } while (prevCounter == pipe->writerCounter); 111da8: 39 7b 24 cmp %edi,0x24(%ebx) <== NOT EXECUTED 111dab: 0f 85 f0 fe ff ff jne 111ca1 <== NOT EXECUTED prevCounter = pipe->writerCounter; err = -EINTR; /* Wait until a writer opens the pipe */ do { PIPE_UNLOCK(pipe); 111db1: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 111db4: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED 111db7: e8 a0 98 ff ff call 10b65c <== NOT EXECUTED if (! PIPE_READWAIT(pipe)) 111dbc: 59 pop %ecx <== NOT EXECUTED 111dbd: 58 pop %eax <== NOT EXECUTED 111dbe: 6a 00 push $0x0 <== NOT EXECUTED 111dc0: ff 73 2c pushl 0x2c(%ebx) <== NOT EXECUTED 111dc3: e8 18 0b 00 00 call 1128e0 <== NOT EXECUTED 111dc8: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 111dcb: 85 c0 test %eax,%eax <== NOT EXECUTED 111dcd: 74 c5 je 111d94 <== NOT EXECUTED 111dcf: e9 5f ff ff ff jmp 111d33 <== NOT EXECUTED } while (prevCounter == pipe->readerCounter); } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; 111dd4: ff 43 20 incl 0x20(%ebx) <== NOT EXECUTED if (pipe->Readers ++ == 0) 111dd7: 8b 43 10 mov 0x10(%ebx),%eax <== NOT EXECUTED 111dda: 8d 50 01 lea 0x1(%eax),%edx <== NOT EXECUTED 111ddd: 89 53 10 mov %edx,0x10(%ebx) <== NOT EXECUTED 111de0: 85 c0 test %eax,%eax <== NOT EXECUTED 111de2: 0f 84 b0 01 00 00 je 111f98 <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); pipe->writerCounter ++; 111de8: ff 43 24 incl 0x24(%ebx) <== NOT EXECUTED if (pipe->Writers ++ == 0) 111deb: 8b 43 14 mov 0x14(%ebx),%eax <== NOT EXECUTED 111dee: 8d 50 01 lea 0x1(%eax),%edx <== NOT EXECUTED 111df1: 89 53 14 mov %edx,0x14(%ebx) <== NOT EXECUTED 111df4: 85 c0 test %eax,%eax <== NOT EXECUTED 111df6: 0f 85 a5 fe ff ff jne 111ca1 <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); 111dfc: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 111dff: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED 111e02: 50 push %eax <== NOT EXECUTED 111e03: ff 73 2c pushl 0x2c(%ebx) <== NOT EXECUTED 111e06: e8 71 0a 00 00 call 11287c <== NOT EXECUTED 111e0b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 111e0e: e9 8e fe ff ff jmp 111ca1 <== NOT EXECUTED 111e13: 90 nop <== NOT EXECUTED { static char c = 'a'; pipe_control_t *pipe; int err = -ENOMEM; pipe = malloc(sizeof(pipe_control_t)); 111e14: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 111e17: 6a 34 push $0x34 <== NOT EXECUTED 111e19: e8 0e 64 ff ff call 10822c <== NOT EXECUTED 111e1e: 89 45 d4 mov %eax,-0x2c(%ebp) <== NOT EXECUTED 111e21: 89 c3 mov %eax,%ebx <== NOT EXECUTED if (pipe == NULL) 111e23: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 111e26: 85 c0 test %eax,%eax <== NOT EXECUTED 111e28: 0f 84 f6 01 00 00 je 112024 <== NOT EXECUTED return err; memset(pipe, 0, sizeof(pipe_control_t)); 111e2e: b9 34 00 00 00 mov $0x34,%ecx <== NOT EXECUTED 111e33: 31 c0 xor %eax,%eax <== NOT EXECUTED 111e35: 8b 7d d4 mov -0x2c(%ebp),%edi <== NOT EXECUTED 111e38: f3 aa rep stos %al,%es:(%edi) <== NOT EXECUTED pipe->Size = PIPE_BUF; 111e3a: 8b 45 d4 mov -0x2c(%ebp),%eax <== NOT EXECUTED 111e3d: c7 40 04 00 02 00 00 movl $0x200,0x4(%eax) <== NOT EXECUTED pipe->Buffer = malloc(pipe->Size); 111e44: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 111e47: 68 00 02 00 00 push $0x200 <== NOT EXECUTED 111e4c: e8 db 63 ff ff call 10822c <== NOT EXECUTED 111e51: 8b 55 d4 mov -0x2c(%ebp),%edx <== NOT EXECUTED 111e54: 89 02 mov %eax,(%edx) <== NOT EXECUTED if (! pipe->Buffer) 111e56: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 111e59: 85 c0 test %eax,%eax <== NOT EXECUTED 111e5b: 0f 84 cf 01 00 00 je 112030 <== NOT EXECUTED goto err_buf; err = -EINTR; if (rtems_barrier_create( 111e61: 8d 43 2c lea 0x2c(%ebx),%eax <== NOT EXECUTED 111e64: 50 push %eax <== NOT EXECUTED 111e65: 6a 00 push $0x0 <== NOT EXECUTED 111e67: 6a 00 push $0x0 <== NOT EXECUTED 111e69: 0f be 05 d4 50 12 00 movsbl 0x1250d4,%eax <== NOT EXECUTED 111e70: 0d 00 72 49 50 or $0x50497200,%eax <== NOT EXECUTED 111e75: 50 push %eax <== NOT EXECUTED 111e76: e8 b1 08 00 00 call 11272c <== NOT EXECUTED 111e7b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 111e7e: 85 c0 test %eax,%eax <== NOT EXECUTED 111e80: 0f 85 cd 00 00 00 jne 111f53 <== 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( 111e86: 8d 43 30 lea 0x30(%ebx),%eax <== NOT EXECUTED 111e89: 50 push %eax <== NOT EXECUTED 111e8a: 6a 00 push $0x0 <== NOT EXECUTED 111e8c: 6a 00 push $0x0 <== NOT EXECUTED 111e8e: 0f be 05 d4 50 12 00 movsbl 0x1250d4,%eax <== NOT EXECUTED 111e95: 0d 00 77 49 50 or $0x50497700,%eax <== NOT EXECUTED 111e9a: 50 push %eax <== NOT EXECUTED 111e9b: e8 8c 08 00 00 call 11272c <== NOT EXECUTED 111ea0: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 111ea3: 85 c0 test %eax,%eax <== NOT EXECUTED 111ea5: 0f 85 97 00 00 00 jne 111f42 <== 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( 111eab: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 111eae: 8d 43 28 lea 0x28(%ebx),%eax <== NOT EXECUTED 111eb1: 50 push %eax <== NOT EXECUTED 111eb2: 6a 00 push $0x0 <== NOT EXECUTED 111eb4: 6a 10 push $0x10 <== NOT EXECUTED 111eb6: 6a 01 push $0x1 <== NOT EXECUTED 111eb8: 0f be 05 d4 50 12 00 movsbl 0x1250d4,%eax <== NOT EXECUTED 111ebf: 0d 00 73 49 50 or $0x50497300,%eax <== NOT EXECUTED 111ec4: 50 push %eax <== NOT EXECUTED 111ec5: e8 1e 94 ff ff call 10b2e8 <== NOT EXECUTED 111eca: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 111ecd: 85 c0 test %eax,%eax <== NOT EXECUTED 111ecf: 75 60 jne 111f31 <== NOT EXECUTED RTEMS_INLINE_ROUTINE Barrier_Control *_Barrier_Get ( Objects_Id id, Objects_Locations *location ) { return (Barrier_Control *) 111ed1: 50 push %eax <== NOT EXECUTED 111ed2: 8d 7d e0 lea -0x20(%ebp),%edi <== NOT EXECUTED 111ed5: 57 push %edi <== NOT EXECUTED 111ed6: ff 73 2c pushl 0x2c(%ebx) <== NOT EXECUTED 111ed9: 68 60 7e 12 00 push $0x127e60 <== NOT EXECUTED 111ede: e8 5d ad ff ff call 10cc40 <_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 111ee3: 81 48 4c 00 00 00 10 orl $0x10000000,0x4c(%eax) <== NOT EXECUTED |= STATES_INTERRUPTIBLE_BY_SIGNAL; _Thread_Enable_dispatch(); 111eea: e8 c5 b5 ff ff call 10d4b4 <_Thread_Enable_dispatch> <== NOT EXECUTED 111eef: 83 c4 0c add $0xc,%esp <== NOT EXECUTED 111ef2: 57 push %edi <== NOT EXECUTED 111ef3: ff 73 30 pushl 0x30(%ebx) <== NOT EXECUTED 111ef6: 68 60 7e 12 00 push $0x127e60 <== NOT EXECUTED 111efb: e8 40 ad ff ff call 10cc40 <_Objects_Get> <== NOT EXECUTED _Barrier_Get(pipe->writeBarrier, &location)->Barrier.Wait_queue.state 111f00: 81 48 4c 00 00 00 10 orl $0x10000000,0x4c(%eax) <== NOT EXECUTED |= STATES_INTERRUPTIBLE_BY_SIGNAL; _Thread_Enable_dispatch(); 111f07: e8 a8 b5 ff ff call 10d4b4 <_Thread_Enable_dispatch> <== NOT EXECUTED #ifdef RTEMS_POSIX_API pipe_interruptible(pipe); #endif *pipep = pipe; if (c ++ == 'z') 111f0c: a0 d4 50 12 00 mov 0x1250d4,%al <== NOT EXECUTED 111f11: 8d 50 01 lea 0x1(%eax),%edx <== NOT EXECUTED 111f14: 88 15 d4 50 12 00 mov %dl,0x1250d4 <== NOT EXECUTED 111f1a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 111f1d: 3c 7a cmp $0x7a,%al <== NOT EXECUTED 111f1f: 0f 85 1f fd ff ff jne 111c44 <== NOT EXECUTED c = 'a'; 111f25: c6 05 d4 50 12 00 61 movb $0x61,0x1250d4 <== NOT EXECUTED 111f2c: e9 13 fd ff ff jmp 111c44 <== NOT EXECUTED return 0; err_sem: rtems_barrier_delete(pipe->writeBarrier); 111f31: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 111f34: 8b 45 d4 mov -0x2c(%ebp),%eax <== NOT EXECUTED 111f37: ff 70 30 pushl 0x30(%eax) <== NOT EXECUTED 111f3a: e8 d5 08 00 00 call 112814 <== NOT EXECUTED 111f3f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED err_wbar: rtems_barrier_delete(pipe->readBarrier); 111f42: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 111f45: 8b 55 d4 mov -0x2c(%ebp),%edx <== NOT EXECUTED 111f48: ff 72 2c pushl 0x2c(%edx) <== NOT EXECUTED 111f4b: e8 c4 08 00 00 call 112814 <== NOT EXECUTED 111f50: 83 c4 10 add $0x10,%esp <== NOT EXECUTED err_rbar: free(pipe->Buffer); 111f53: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 111f56: 8b 45 d4 mov -0x2c(%ebp),%eax <== NOT EXECUTED 111f59: ff 30 pushl (%eax) <== NOT EXECUTED 111f5b: e8 7c 60 ff ff call 107fdc <== NOT EXECUTED 111f60: bf fc ff ff ff mov $0xfffffffc,%edi <== NOT EXECUTED 111f65: 83 c4 10 add $0x10,%esp <== NOT EXECUTED err_buf: free(pipe); 111f68: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 111f6b: ff 75 d4 pushl -0x2c(%ebp) <== NOT EXECUTED 111f6e: e8 69 60 ff ff call 107fdc <== NOT EXECUTED 111f73: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 111f76: e9 ed fc ff ff jmp 111c68 <== NOT EXECUTED 111f7b: 90 nop <== NOT EXECUTED } while (prevCounter == pipe->writerCounter); } break; case LIBIO_FLAGS_WRITE: if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { 111f7c: bf fa ff ff ff mov $0xfffffffa,%edi <== NOT EXECUTED PIPE_UNLOCK(pipe); return 0; out_error: pipe_release(pipep, iop); 111f81: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 111f84: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED 111f87: 56 push %esi <== NOT EXECUTED 111f88: e8 73 fb ff ff call 111b00 <== NOT EXECUTED return err; 111f8d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 111f90: e9 1c fd ff ff jmp 111cb1 <== NOT EXECUTED 111f95: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) PIPE_WAKEUPWRITERS(pipe); 111f98: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 111f9b: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED 111f9e: 50 push %eax <== NOT EXECUTED 111f9f: ff 73 30 pushl 0x30(%ebx) <== NOT EXECUTED 111fa2: e8 d5 08 00 00 call 11287c <== NOT EXECUTED 111fa7: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 111faa: e9 39 fe ff ff jmp 111de8 <== NOT EXECUTED 111faf: 90 nop <== NOT EXECUTED switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++; if (pipe->Readers ++ == 0) PIPE_WAKEUPWRITERS(pipe); 111fb0: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 111fb3: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED 111fb6: 50 push %eax <== NOT EXECUTED 111fb7: ff 73 30 pushl 0x30(%ebx) <== NOT EXECUTED 111fba: e8 bd 08 00 00 call 11287c <== NOT EXECUTED 111fbf: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 111fc2: e9 ad fd ff ff jmp 111d74 <== NOT EXECUTED 111fc7: 90 nop <== NOT EXECUTED goto out_error; } pipe->writerCounter ++; if (pipe->Writers ++ == 0) PIPE_WAKEUPREADERS(pipe); 111fc8: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 111fcb: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED 111fce: 50 push %eax <== NOT EXECUTED 111fcf: ff 73 2c pushl 0x2c(%ebx) <== NOT EXECUTED 111fd2: e8 a5 08 00 00 call 11287c <== NOT EXECUTED 111fd7: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 111fda: e9 11 fd ff ff jmp 111cf0 <== NOT EXECUTED 111fdf: 90 nop <== NOT EXECUTED /* Called with rtems_pipe_semaphore held. */ static inline void pipe_free( pipe_control_t *pipe ) { rtems_barrier_delete(pipe->readBarrier); 111fe0: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 111fe3: ff 73 2c pushl 0x2c(%ebx) <== NOT EXECUTED 111fe6: e8 29 08 00 00 call 112814 <== NOT EXECUTED rtems_barrier_delete(pipe->writeBarrier); 111feb: 5a pop %edx <== NOT EXECUTED 111fec: ff 73 30 pushl 0x30(%ebx) <== NOT EXECUTED 111fef: e8 20 08 00 00 call 112814 <== NOT EXECUTED rtems_semaphore_delete(pipe->Semaphore); 111ff4: 58 pop %eax <== NOT EXECUTED 111ff5: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED 111ff8: e8 bf 94 ff ff call 10b4bc <== NOT EXECUTED free(pipe->Buffer); 111ffd: 5e pop %esi <== NOT EXECUTED 111ffe: ff 33 pushl (%ebx) <== NOT EXECUTED 112000: e8 d7 5f ff ff call 107fdc <== NOT EXECUTED free(pipe); 112005: 89 1c 24 mov %ebx,(%esp) <== NOT EXECUTED 112008: e8 cf 5f ff ff call 107fdc <== NOT EXECUTED else *pipep = pipe; } out: rtems_semaphore_release(rtems_pipe_semaphore); 11200d: 59 pop %ecx <== NOT EXECUTED 11200e: ff 35 0c 70 12 00 pushl 0x12700c <== NOT EXECUTED 112014: e8 43 96 ff ff call 10b65c <== NOT EXECUTED 112019: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 11201c: e9 90 fc ff ff jmp 111cb1 <== NOT EXECUTED 112021: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED static char c = 'a'; pipe_control_t *pipe; int err = -ENOMEM; pipe = malloc(sizeof(pipe_control_t)); if (pipe == NULL) 112024: bf f4 ff ff ff mov $0xfffffff4,%edi <== NOT EXECUTED 112029: e9 3a fc ff ff jmp 111c68 <== NOT EXECUTED 11202e: 66 90 xchg %ax,%ax <== NOT EXECUTED return err; memset(pipe, 0, sizeof(pipe_control_t)); pipe->Size = PIPE_BUF; pipe->Buffer = malloc(pipe->Size); if (! pipe->Buffer) 112030: bf f4 ff ff ff mov $0xfffffff4,%edi <== NOT EXECUTED 112035: e9 2e ff ff ff jmp 111f68 <== NOT EXECUTED 001104b8 : 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)) ) { 1104b8: 55 push %ebp <== NOT EXECUTED 1104b9: 89 e5 mov %esp,%ebp <== NOT EXECUTED /* * Search the mount table for any mount entries referencing this * mount entry. */ for ( the_node = rtems_filesystem_mount_table_control.first; 1104bb: a1 ec ee 16 00 mov 0x16eeec,%eax <== NOT EXECUTED 1104c0: 3d f0 ee 16 00 cmp $0x16eef0,%eax <== NOT EXECUTED 1104c5: 74 1b je 1104e2 <== 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 ) { 1104c7: 8b 55 0c mov 0xc(%ebp),%edx <== NOT EXECUTED 1104ca: 8b 52 10 mov 0x10(%edx),%edx <== NOT EXECUTED 1104cd: 39 50 18 cmp %edx,0x18(%eax) <== NOT EXECUTED 1104d0: 75 07 jne 1104d9 <== NOT EXECUTED 1104d2: eb 14 jmp 1104e8 <== NOT EXECUTED 1104d4: 39 50 18 cmp %edx,0x18(%eax) <== NOT EXECUTED 1104d7: 74 0f je 1104e8 <== 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 ) { 1104d9: 8b 00 mov (%eax),%eax <== NOT EXECUTED /* * Search the mount table for any mount entries referencing this * mount entry. */ for ( the_node = rtems_filesystem_mount_table_control.first; 1104db: 3d f0 ee 16 00 cmp $0x16eef0,%eax <== NOT EXECUTED 1104e0: 75 f2 jne 1104d4 <== NOT EXECUTED 1104e2: 31 c0 xor %eax,%eax <== NOT EXECUTED return true; } } return false; } 1104e4: c9 leave <== NOT EXECUTED 1104e5: c3 ret <== NOT EXECUTED 1104e6: 66 90 xchg %ax,%ax <== NOT EXECUTED /* * Search the mount table for any mount entries referencing this * mount entry. */ for ( the_node = rtems_filesystem_mount_table_control.first; 1104e8: b0 01 mov $0x1,%al <== NOT EXECUTED return true; } } return false; } 1104ea: c9 leave <== NOT EXECUTED 1104eb: c3 ret <== NOT EXECUTED 00109154 : long fpathconf( int fd, int name ) { 109154: 55 push %ebp 109155: 89 e5 mov %esp,%ebp 109157: 83 ec 08 sub $0x8,%esp 10915a: 8b 45 08 mov 0x8(%ebp),%eax 10915d: 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); 109160: 3b 05 6c 67 12 00 cmp 0x12676c,%eax 109166: 0f 83 9c 00 00 00 jae 109208 iop = rtems_libio_iop(fd); 10916c: c1 e0 06 shl $0x6,%eax 10916f: 03 05 60 a8 12 00 add 0x12a860,%eax rtems_libio_check_is_open(iop); 109175: 8b 48 14 mov 0x14(%eax),%ecx 109178: f6 c5 01 test $0x1,%ch 10917b: 0f 84 87 00 00 00 je 109208 <== ALWAYS TAKEN rtems_libio_check_permissions(iop, LIBIO_FLAGS_READ); 109181: 83 e1 02 and $0x2,%ecx 109184: 74 08 je 10918e <== ALWAYS TAKEN /* * Now process the information request. */ the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options; 109186: 8b 40 28 mov 0x28(%eax),%eax switch ( name ) { 109189: 83 fa 0b cmp $0xb,%edx 10918c: 76 12 jbe 1091a0 break; case _PC_SYNC_IO: return_value = the_limits->posix_sync_io; break; default: rtems_set_errno_and_return_minus_one( EINVAL ); 10918e: e8 b5 cd 00 00 call 115f48 <__errno> 109193: c7 00 16 00 00 00 movl $0x16,(%eax) 109199: b8 ff ff ff ff mov $0xffffffff,%eax break; } return return_value; } 10919e: c9 leave 10919f: c3 ret * Now process the information request. */ the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options; switch ( name ) { 1091a0: ff 24 95 d8 3e 12 00 jmp *0x123ed8(,%edx,4) 1091a7: 90 nop <== NOT EXECUTED break; case _PC_ASYNC_IO: return_value = the_limits->posix_async_io; break; case _PC_PRIO_IO: return_value = the_limits->posix_prio_io; 1091a8: 8b 40 5c mov 0x5c(%eax),%eax rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 1091ab: c9 leave 1091ac: c3 ret 1091ad: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED break; case _PC_VDISABLE: return_value = the_limits->posix_vdisable; break; case _PC_ASYNC_IO: return_value = the_limits->posix_async_io; 1091b0: 8b 40 50 mov 0x50(%eax),%eax rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 1091b3: c9 leave 1091b4: c3 ret 1091b5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED break; case _PC_NO_TRUNC: return_value = the_limits->posix_no_trunc; break; case _PC_VDISABLE: return_value = the_limits->posix_vdisable; 1091b8: 8b 40 64 mov 0x64(%eax),%eax rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 1091bb: c9 leave 1091bc: c3 ret 1091bd: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED break; case _PC_CHOWN_RESTRICTED: return_value = the_limits->posix_chown_restrictions; break; case _PC_NO_TRUNC: return_value = the_limits->posix_no_trunc; 1091c0: 8b 40 58 mov 0x58(%eax),%eax rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 1091c3: c9 leave 1091c4: c3 ret 1091c5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED break; case _PC_PIPE_BUF: return_value = the_limits->pipe_buf; break; case _PC_CHOWN_RESTRICTED: return_value = the_limits->posix_chown_restrictions; 1091c8: 8b 40 54 mov 0x54(%eax),%eax rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 1091cb: c9 leave 1091cc: c3 ret 1091cd: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED break; case _PC_PATH_MAX: return_value = the_limits->path_max; break; case _PC_PIPE_BUF: return_value = the_limits->pipe_buf; 1091d0: 8b 40 4c mov 0x4c(%eax),%eax rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 1091d3: c9 leave 1091d4: c3 ret 1091d5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED break; case _PC_NAME_MAX: return_value = the_limits->name_max; break; case _PC_PATH_MAX: return_value = the_limits->path_max; 1091d8: 8b 40 48 mov 0x48(%eax),%eax rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 1091db: c9 leave 1091dc: c3 ret 1091dd: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED break; case _PC_MAX_INPUT: return_value = the_limits->max_input; break; case _PC_NAME_MAX: return_value = the_limits->name_max; 1091e0: 8b 40 44 mov 0x44(%eax),%eax rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 1091e3: c9 leave 1091e4: c3 ret 1091e5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED break; case _PC_MAX_CANON: return_value = the_limits->max_canon; break; case _PC_MAX_INPUT: return_value = the_limits->max_input; 1091e8: 8b 40 40 mov 0x40(%eax),%eax rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 1091eb: c9 leave 1091ec: c3 ret 1091ed: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED switch ( name ) { case _PC_LINK_MAX: return_value = the_limits->link_max; break; case _PC_MAX_CANON: return_value = the_limits->max_canon; 1091f0: 8b 40 3c mov 0x3c(%eax),%eax rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 1091f3: c9 leave 1091f4: c3 ret 1091f5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options; switch ( name ) { case _PC_LINK_MAX: return_value = the_limits->link_max; 1091f8: 8b 40 38 mov 0x38(%eax),%eax rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 1091fb: c9 leave 1091fc: c3 ret 1091fd: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED break; case _PC_PRIO_IO: return_value = the_limits->posix_prio_io; break; case _PC_SYNC_IO: return_value = the_limits->posix_sync_io; 109200: 8b 40 60 mov 0x60(%eax),%eax rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 109203: c9 leave 109204: c3 ret 109205: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED rtems_libio_t *iop; rtems_filesystem_limits_and_options_t *the_limits; rtems_libio_check_fd(fd); iop = rtems_libio_iop(fd); rtems_libio_check_is_open(iop); 109208: e8 3b cd 00 00 call 115f48 <__errno> 10920d: c7 00 09 00 00 00 movl $0x9,(%eax) 109213: b8 ff ff ff ff mov $0xffffffff,%eax rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 109218: c9 leave 109219: c3 ret 00107fdc : void free( void *ptr ) { MSBUMP(free_calls, 1); 107fdc: 55 push %ebp 107fdd: 89 e5 mov %esp,%ebp 107fdf: 53 push %ebx 107fe0: 83 ec 04 sub $0x4,%esp 107fe3: 8b 5d 08 mov 0x8(%ebp),%ebx 107fe6: ff 05 6c 72 12 00 incl 0x12726c if ( !ptr ) 107fec: 85 db test %ebx,%ebx 107fee: 74 4b je 10803b /* * Do not attempt to free memory if in a critical section or ISR. */ if ( _System_state_Is_up(_System_state_Get()) && 107ff0: 83 3d a0 75 12 00 03 cmpl $0x3,0x1275a0 107ff7: 74 47 je 108040 <== NEVER TAKEN #endif /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) 107ff9: a1 08 56 12 00 mov 0x125608,%eax 107ffe: 85 c0 test %eax,%eax 108000: 74 0a je 10800c <== NEVER TAKEN (*rtems_malloc_statistics_helpers->at_free)(ptr); 108002: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 108005: 53 push %ebx <== NOT EXECUTED 108006: ff 50 08 call *0x8(%eax) <== NOT EXECUTED 108009: 83 c4 10 add $0x10,%esp <== NOT EXECUTED if ( !_Protected_heap_Free( RTEMS_Malloc_Heap, ptr ) ) { 10800c: 83 ec 08 sub $0x8,%esp 10800f: 53 push %ebx 108010: ff 35 58 31 12 00 pushl 0x123158 108016: e8 25 4f 00 00 call 10cf40 <_Protected_heap_Free> 10801b: 83 c4 10 add $0x10,%esp 10801e: 84 c0 test %al,%al 108020: 75 19 jne 10803b <== 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 108022: a1 58 31 12 00 mov 0x123158,%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", 108027: ff 70 1c pushl 0x1c(%eax) <== NOT EXECUTED 10802a: ff 70 18 pushl 0x18(%eax) <== NOT EXECUTED 10802d: 53 push %ebx <== NOT EXECUTED 10802e: 68 90 0c 12 00 push $0x120c90 <== NOT EXECUTED 108033: e8 cc 0c 00 00 call 108d04 <== NOT EXECUTED 108038: 83 c4 10 add $0x10,%esp <== NOT EXECUTED RTEMS_Malloc_Heap->area_begin, RTEMS_Malloc_Heap->area_end ); } } 10803b: 8b 5d fc mov -0x4(%ebp),%ebx 10803e: c9 leave 10803f: c3 ret /* * Do not attempt to free memory if in a critical section or ISR. */ if ( _System_state_Is_up(_System_state_Get()) && 108040: e8 b7 00 00 00 call 1080fc <== ALWAYS TAKEN 108045: 84 c0 test %al,%al 108047: 75 b0 jne 107ff9 <== NEVER TAKEN !malloc_is_system_state_OK() ) { malloc_deferred_free(ptr); 108049: 89 5d 08 mov %ebx,0x8(%ebp) <== NOT EXECUTED RTEMS_Malloc_Heap->area_begin, RTEMS_Malloc_Heap->area_end ); } } 10804c: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 10804f: 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); 108050: e9 e7 00 00 00 jmp 10813c <== NOT EXECUTED 0012c730 : * NOTE: this must be called with * thread dispatching disabled! */ static void free_user_env(void *venv) { 12c730: 55 push %ebp <== NOT EXECUTED 12c731: 89 e5 mov %esp,%ebp <== NOT EXECUTED 12c733: 53 push %ebx <== NOT EXECUTED 12c734: 83 ec 04 sub $0x4,%esp <== NOT EXECUTED 12c737: 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 12c73a: 81 fb 20 ef 16 00 cmp $0x16ef20,%ebx <== NOT EXECUTED 12c740: 74 42 je 12c784 <== NOT EXECUTED #ifdef HAVE_USERENV_REFCNT && --env->refcnt <= 0 #endif ) { rtems_filesystem_freenode( &env->current_directory); 12c742: 8b 43 10 mov 0x10(%ebx),%eax <== NOT EXECUTED 12c745: 85 c0 test %eax,%eax <== NOT EXECUTED 12c747: 74 13 je 12c75c <== NOT EXECUTED 12c749: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 12c74c: 85 c0 test %eax,%eax <== NOT EXECUTED 12c74e: 74 0c je 12c75c <== NOT EXECUTED 12c750: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12c753: 8d 53 04 lea 0x4(%ebx),%edx <== NOT EXECUTED 12c756: 52 push %edx <== NOT EXECUTED 12c757: ff d0 call *%eax <== NOT EXECUTED 12c759: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_filesystem_freenode( &env->root_directory); 12c75c: 8b 43 24 mov 0x24(%ebx),%eax <== NOT EXECUTED 12c75f: 85 c0 test %eax,%eax <== NOT EXECUTED 12c761: 74 13 je 12c776 <== NOT EXECUTED 12c763: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 12c766: 85 c0 test %eax,%eax <== NOT EXECUTED 12c768: 74 0c je 12c776 <== NOT EXECUTED 12c76a: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12c76d: 8d 53 18 lea 0x18(%ebx),%edx <== NOT EXECUTED 12c770: 52 push %edx <== NOT EXECUTED 12c771: ff d0 call *%eax <== NOT EXECUTED 12c773: 83 c4 10 add $0x10,%esp <== NOT EXECUTED free(env); 12c776: 89 5d 08 mov %ebx,0x8(%ebp) <== NOT EXECUTED } } 12c779: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 12c77c: c9 leave <== NOT EXECUTED && --env->refcnt <= 0 #endif ) { rtems_filesystem_freenode( &env->current_directory); rtems_filesystem_freenode( &env->root_directory); free(env); 12c77d: e9 72 07 fe ff jmp 10cef4 <== NOT EXECUTED 12c782: 66 90 xchg %ax,%ax <== NOT EXECUTED } } 12c784: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 12c787: c9 leave <== NOT EXECUTED 12c788: c3 ret <== NOT EXECUTED 0011ea20 : int fstat( int fd, struct stat *sbuf ) { 11ea20: 55 push %ebp 11ea21: 89 e5 mov %esp,%ebp 11ea23: 57 push %edi 11ea24: 53 push %ebx 11ea25: 8b 55 08 mov 0x8(%ebp),%edx 11ea28: 8b 5d 0c mov 0xc(%ebp),%ebx /* * Check to see if we were passed a valid pointer. */ if ( !sbuf ) 11ea2b: 85 db test %ebx,%ebx 11ea2d: 74 66 je 11ea95 /* * Now process the stat() request. */ iop = rtems_libio_iop( fd ); 11ea2f: 3b 15 4c 31 12 00 cmp 0x12314c,%edx 11ea35: 73 3d jae 11ea74 11ea37: c1 e2 06 shl $0x6,%edx 11ea3a: 03 15 40 72 12 00 add 0x127240,%edx rtems_libio_check_fd( fd ); rtems_libio_check_is_open(iop); 11ea40: f6 42 15 01 testb $0x1,0x15(%edx) 11ea44: 74 2e je 11ea74 <== ALWAYS TAKEN if ( !iop->handlers ) 11ea46: 8b 42 3c mov 0x3c(%edx),%eax 11ea49: 85 c0 test %eax,%eax 11ea4b: 74 27 je 11ea74 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EBADF ); if ( !iop->handlers->fstat_h ) 11ea4d: 8b 40 18 mov 0x18(%eax),%eax 11ea50: 85 c0 test %eax,%eax 11ea52: 74 34 je 11ea88 <== ALWAYS TAKEN /* * Zero out the stat structure so the various support * versions of stat don't have to. */ memset( sbuf, 0, sizeof(struct stat) ); 11ea54: b9 44 00 00 00 mov $0x44,%ecx 11ea59: 31 c0 xor %eax,%eax 11ea5b: 89 df mov %ebx,%edi 11ea5d: f3 aa rep stos %al,%es:(%edi) return (*iop->handlers->fstat_h)( &iop->pathinfo, sbuf ); 11ea5f: 8b 42 3c mov 0x3c(%edx),%eax 11ea62: 89 5d 0c mov %ebx,0xc(%ebp) 11ea65: 83 c2 18 add $0x18,%edx 11ea68: 89 55 08 mov %edx,0x8(%ebp) 11ea6b: 8b 40 18 mov 0x18(%eax),%eax } 11ea6e: 5b pop %ebx 11ea6f: 5f pop %edi 11ea70: 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 ); 11ea71: ff e0 jmp *%eax 11ea73: 90 nop <== NOT EXECUTED iop = rtems_libio_iop( fd ); rtems_libio_check_fd( fd ); rtems_libio_check_is_open(iop); if ( !iop->handlers ) rtems_set_errno_and_return_minus_one( EBADF ); 11ea74: e8 97 4d ff ff call 113810 <__errno> 11ea79: c7 00 09 00 00 00 movl $0x9,(%eax) * versions of stat don't have to. */ memset( sbuf, 0, sizeof(struct stat) ); return (*iop->handlers->fstat_h)( &iop->pathinfo, sbuf ); } 11ea7f: b8 ff ff ff ff mov $0xffffffff,%eax 11ea84: 5b pop %ebx 11ea85: 5f pop %edi 11ea86: c9 leave 11ea87: c3 ret if ( !iop->handlers ) rtems_set_errno_and_return_minus_one( EBADF ); if ( !iop->handlers->fstat_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 11ea88: e8 83 4d ff ff call 113810 <__errno> <== NOT EXECUTED 11ea8d: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 11ea93: eb ea jmp 11ea7f <== NOT EXECUTED /* * Check to see if we were passed a valid pointer. */ if ( !sbuf ) rtems_set_errno_and_return_minus_one( EFAULT ); 11ea95: e8 76 4d ff ff call 113810 <__errno> 11ea9a: c7 00 0e 00 00 00 movl $0xe,(%eax) 11eaa0: eb dd jmp 11ea7f <== ALWAYS TAKEN 0012b694 : #include int fsync( int fd ) { 12b694: 55 push %ebp 12b695: 89 e5 mov %esp,%ebp 12b697: 83 ec 08 sub $0x8,%esp 12b69a: 8b 45 08 mov 0x8(%ebp),%eax rtems_libio_t *iop; rtems_libio_check_fd( fd ); 12b69d: 3b 05 ac 72 16 00 cmp 0x1672ac,%eax 12b6a3: 73 2b jae 12b6d0 <== ALWAYS TAKEN iop = rtems_libio_iop( fd ); 12b6a5: c1 e0 06 shl $0x6,%eax 12b6a8: 03 05 98 ee 16 00 add 0x16ee98,%eax rtems_libio_check_is_open(iop); 12b6ae: 8b 50 14 mov 0x14(%eax),%edx 12b6b1: f6 c6 01 test $0x1,%dh 12b6b4: 74 1a je 12b6d0 <== ALWAYS TAKEN rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 12b6b6: 83 e2 04 and $0x4,%edx 12b6b9: 74 29 je 12b6e4 /* * Now process the fsync(). */ if ( !iop->handlers ) 12b6bb: 8b 50 3c mov 0x3c(%eax),%edx 12b6be: 85 d2 test %edx,%edx 12b6c0: 74 0e je 12b6d0 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EBADF ); if ( !iop->handlers->fsync_h ) 12b6c2: 8b 52 28 mov 0x28(%edx),%edx 12b6c5: 85 d2 test %edx,%edx 12b6c7: 74 28 je 12b6f1 rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->fsync_h)( iop ); 12b6c9: 89 45 08 mov %eax,0x8(%ebp) } 12b6cc: 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 ); 12b6cd: ff e2 jmp *%edx 12b6cf: 90 nop <== NOT EXECUTED /* * Now process the fsync(). */ if ( !iop->handlers ) rtems_set_errno_and_return_minus_one( EBADF ); 12b6d0: e8 3b 6e 01 00 call 142510 <__errno> <== NOT EXECUTED 12b6d5: c7 00 09 00 00 00 movl $0x9,(%eax) <== NOT EXECUTED if ( !iop->handlers->fsync_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->fsync_h)( iop ); } 12b6db: b8 ff ff ff ff mov $0xffffffff,%eax 12b6e0: c9 leave 12b6e1: c3 ret 12b6e2: 66 90 xchg %ax,%ax <== NOT EXECUTED rtems_libio_t *iop; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 12b6e4: e8 27 6e 01 00 call 142510 <__errno> 12b6e9: c7 00 16 00 00 00 movl $0x16,(%eax) 12b6ef: eb ea jmp 12b6db <== ALWAYS TAKEN if ( !iop->handlers ) rtems_set_errno_and_return_minus_one( EBADF ); if ( !iop->handlers->fsync_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 12b6f1: e8 1a 6e 01 00 call 142510 <__errno> 12b6f6: c7 00 86 00 00 00 movl $0x86,(%eax) 12b6fc: eb dd jmp 12b6db <== ALWAYS TAKEN 0010f988 : int ftruncate( int fd, off_t length ) { 10f988: 55 push %ebp 10f989: 89 e5 mov %esp,%ebp 10f98b: 57 push %edi 10f98c: 56 push %esi 10f98d: 53 push %ebx 10f98e: 83 ec 2c sub $0x2c,%esp 10f991: 8b 5d 08 mov 0x8(%ebp),%ebx rtems_libio_t *iop; rtems_filesystem_location_info_t loc; rtems_libio_check_fd( fd ); 10f994: 3b 1d 4c 31 12 00 cmp 0x12314c,%ebx 10f99a: 73 60 jae 10f9fc <== ALWAYS TAKEN iop = rtems_libio_iop( fd ); 10f99c: c1 e3 06 shl $0x6,%ebx 10f99f: 03 1d 40 72 12 00 add 0x127240,%ebx rtems_libio_check_is_open(iop); 10f9a5: f6 43 15 01 testb $0x1,0x15(%ebx) 10f9a9: 74 51 je 10f9fc <== ALWAYS TAKEN /* * Make sure we are not working on a directory */ loc = iop->pathinfo; 10f9ab: 8d 45 d4 lea -0x2c(%ebp),%eax 10f9ae: 8d 73 18 lea 0x18(%ebx),%esi 10f9b1: b9 05 00 00 00 mov $0x5,%ecx 10f9b6: 89 c7 mov %eax,%edi 10f9b8: f3 a5 rep movsl %ds:(%esi),%es:(%edi) if ( !loc.ops->node_type_h ) 10f9ba: 8b 55 e0 mov -0x20(%ebp),%edx 10f9bd: 8b 52 10 mov 0x10(%edx),%edx 10f9c0: 85 d2 test %edx,%edx 10f9c2: 74 60 je 10fa24 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) 10f9c4: 83 ec 0c sub $0xc,%esp 10f9c7: 50 push %eax 10f9c8: ff d2 call *%edx 10f9ca: 83 c4 10 add $0x10,%esp 10f9cd: 48 dec %eax 10f9ce: 74 66 je 10fa36 rtems_set_errno_and_return_minus_one( EISDIR ); rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 10f9d0: f6 43 14 04 testb $0x4,0x14(%ebx) 10f9d4: 74 3a je 10fa10 <== ALWAYS TAKEN if ( !iop->handlers->ftruncate_h ) 10f9d6: 8b 43 3c mov 0x3c(%ebx),%eax 10f9d9: 8b 40 20 mov 0x20(%eax),%eax 10f9dc: 85 c0 test %eax,%eax 10f9de: 74 44 je 10fa24 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->ftruncate_h)( iop, length ); 10f9e0: 52 push %edx 10f9e1: 8b 55 0c mov 0xc(%ebp),%edx 10f9e4: 89 d1 mov %edx,%ecx 10f9e6: c1 f9 1f sar $0x1f,%ecx 10f9e9: 51 push %ecx 10f9ea: 52 push %edx 10f9eb: 53 push %ebx 10f9ec: ff d0 call *%eax 10f9ee: 83 c4 10 add $0x10,%esp } 10f9f1: 8d 65 f4 lea -0xc(%ebp),%esp 10f9f4: 5b pop %ebx 10f9f5: 5e pop %esi 10f9f6: 5f pop %edi 10f9f7: c9 leave 10f9f8: c3 ret 10f9f9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED rtems_libio_t *iop; rtems_filesystem_location_info_t loc; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); 10f9fc: e8 0f 3e 00 00 call 113810 <__errno> <== NOT EXECUTED 10fa01: c7 00 09 00 00 00 movl $0x9,(%eax) <== NOT EXECUTED 10fa07: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 10fa0c: eb e3 jmp 10f9f1 <== NOT EXECUTED 10fa0e: 66 90 xchg %ax,%ax <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) rtems_set_errno_and_return_minus_one( EISDIR ); rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 10fa10: e8 fb 3d 00 00 call 113810 <__errno> <== NOT EXECUTED 10fa15: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 10fa1b: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 10fa20: eb cf jmp 10f9f1 <== NOT EXECUTED 10fa22: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( !iop->handlers->ftruncate_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 10fa24: e8 e7 3d 00 00 call 113810 <__errno> <== NOT EXECUTED 10fa29: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 10fa2f: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 10fa34: eb bb jmp 10f9f1 <== NOT EXECUTED loc = iop->pathinfo; if ( !loc.ops->node_type_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) rtems_set_errno_and_return_minus_one( EISDIR ); 10fa36: e8 d5 3d 00 00 call 113810 <__errno> 10fa3b: c7 00 15 00 00 00 movl $0x15,(%eax) 10fa41: b8 ff ff ff ff mov $0xffffffff,%eax 10fa46: eb a9 jmp 10f9f1 <== ALWAYS TAKEN 001581a4 : int getdents( int dd_fd, char *dd_buf, int dd_len ) { 1581a4: 55 push %ebp 1581a5: 89 e5 mov %esp,%ebp 1581a7: 57 push %edi 1581a8: 56 push %esi 1581a9: 53 push %ebx 1581aa: 83 ec 2c sub $0x2c,%esp 1581ad: 8b 5d 08 mov 0x8(%ebp),%ebx /* * Get the file control block structure associated with the file descriptor */ iop = rtems_libio_iop( dd_fd ); 1581b0: 3b 1d ac 72 16 00 cmp 0x1672ac,%ebx 1581b6: 72 48 jb 158200 <== NEVER TAKEN 1581b8: 31 db xor %ebx,%ebx <== NOT EXECUTED /* * Make sure we are working on a directory */ loc = iop->pathinfo; 1581ba: 8d 45 d4 lea -0x2c(%ebp),%eax 1581bd: 8d 73 18 lea 0x18(%ebx),%esi 1581c0: b9 05 00 00 00 mov $0x5,%ecx 1581c5: 89 c7 mov %eax,%edi 1581c7: f3 a5 rep movsl %ds:(%esi),%es:(%edi) if ( !loc.ops->node_type_h ) 1581c9: 8b 55 e0 mov -0x20(%ebp),%edx 1581cc: 8b 52 10 mov 0x10(%edx),%edx 1581cf: 85 d2 test %edx,%edx 1581d1: 74 4d je 158220 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) 1581d3: 83 ec 0c sub $0xc,%esp 1581d6: 50 push %eax 1581d7: ff d2 call *%edx 1581d9: 83 c4 10 add $0x10,%esp 1581dc: 48 dec %eax 1581dd: 75 2d jne 15820c /* * Return the number of bytes that were actually transfered as a result * of the read attempt. */ if ( !iop->handlers->read_h ) 1581df: 8b 43 3c mov 0x3c(%ebx),%eax 1581e2: 8b 40 08 mov 0x8(%eax),%eax 1581e5: 85 c0 test %eax,%eax 1581e7: 74 37 je 158220 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->read_h)( iop, dd_buf, dd_len ); 1581e9: 52 push %edx 1581ea: ff 75 10 pushl 0x10(%ebp) 1581ed: ff 75 0c pushl 0xc(%ebp) 1581f0: 53 push %ebx 1581f1: ff d0 call *%eax 1581f3: 83 c4 10 add $0x10,%esp } 1581f6: 8d 65 f4 lea -0xc(%ebp),%esp 1581f9: 5b pop %ebx 1581fa: 5e pop %esi 1581fb: 5f pop %edi 1581fc: c9 leave 1581fd: c3 ret 1581fe: 66 90 xchg %ax,%ax <== NOT EXECUTED /* * Get the file control block structure associated with the file descriptor */ iop = rtems_libio_iop( dd_fd ); 158200: c1 e3 06 shl $0x6,%ebx 158203: 03 1d 98 ee 16 00 add 0x16ee98,%ebx 158209: eb af jmp 1581ba <== ALWAYS TAKEN 15820b: 90 nop <== NOT EXECUTED loc = iop->pathinfo; if ( !loc.ops->node_type_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); 15820c: e8 ff a2 fe ff call 142510 <__errno> 158211: c7 00 14 00 00 00 movl $0x14,(%eax) 158217: b8 ff ff ff ff mov $0xffffffff,%eax 15821c: eb d8 jmp 1581f6 <== ALWAYS TAKEN 15821e: 66 90 xchg %ax,%ax <== NOT EXECUTED * Return the number of bytes that were actually transfered as a result * of the read attempt. */ if ( !iop->handlers->read_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 158220: e8 eb a2 fe ff call 142510 <__errno> <== NOT EXECUTED 158225: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 15822b: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 158230: eb c4 jmp 1581f6 <== NOT EXECUTED 0012b7e0 : * 4.2.1 Get Real User, Effective User, Ral Group, and Effective Group IDs, * P1003.1b-1993, p. 84 */ gid_t getgid( void ) { 12b7e0: 55 push %ebp <== NOT EXECUTED 12b7e1: 89 e5 mov %esp,%ebp <== NOT EXECUTED 12b7e3: a1 c4 93 16 00 mov 0x1693c4,%eax <== NOT EXECUTED 12b7e8: 8b 40 34 mov 0x34(%eax),%eax <== NOT EXECUTED return _POSIX_types_Gid; } 12b7eb: c9 leave <== NOT EXECUTED 12b7ec: c3 ret <== NOT EXECUTED 0012bd90 : struct group *grp, char *buffer, size_t bufsize, struct group **result ) { 12bd90: 55 push %ebp 12bd91: 89 e5 mov %esp,%ebp 12bd93: 57 push %edi 12bd94: 56 push %esi 12bd95: 53 push %ebx 12bd96: 83 ec 1c sub $0x1c,%esp 12bd99: 89 c3 mov %eax,%ebx 12bd9b: 89 55 e4 mov %edx,-0x1c(%ebp) 12bd9e: 89 ce mov %ecx,%esi FILE *fp; int match; init_etc_passwd_group(); 12bda0: e8 af fe ff ff call 12bc54 <== ALWAYS TAKEN if ((fp = fopen("/etc/group", "r")) == NULL) { 12bda5: 83 ec 08 sub $0x8,%esp 12bda8: 68 4d bc 15 00 push $0x15bc4d 12bdad: 68 97 89 15 00 push $0x158997 12bdb2: e8 95 70 01 00 call 142e4c 12bdb7: 89 c7 mov %eax,%edi 12bdb9: 83 c4 10 add $0x10,%esp 12bdbc: 85 c0 test %eax,%eax 12bdbe: 75 22 jne 12bde2 <== NEVER TAKEN 12bdc0: e9 8b 00 00 00 jmp 12be50 <== NOT EXECUTED 12bdc5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED errno = EINVAL; fclose(fp); return -1; } if (name) { match = (strcmp(grp->gr_name, name) == 0); 12bdc8: 83 ec 08 sub $0x8,%esp 12bdcb: 53 push %ebx 12bdcc: ff 36 pushl (%esi) 12bdce: e8 39 bc 01 00 call 147a0c 12bdd3: 83 c4 10 add $0x10,%esp 12bdd6: 85 c0 test %eax,%eax 12bdd8: 0f 94 c0 sete %al 12bddb: 0f b6 c0 movzbl %al,%eax } else { match = (grp->gr_gid == gid); } if (match) { 12bdde: 85 c0 test %eax,%eax 12bde0: 75 2e jne 12be10 if ((fp = fopen("/etc/group", "r")) == NULL) { errno = EINVAL; return -1; } for(;;) { if (!scangr(fp, grp, buffer, bufsize)) { 12bde2: 83 ec 0c sub $0xc,%esp 12bde5: ff 75 0c pushl 0xc(%ebp) 12bde8: 8b 4d 08 mov 0x8(%ebp),%ecx 12bdeb: 89 f2 mov %esi,%edx 12bded: 89 f8 mov %edi,%eax 12bdef: e8 d4 fb ff ff call 12b9c8 <== ALWAYS TAKEN 12bdf4: 83 c4 10 add $0x10,%esp 12bdf7: 85 c0 test %eax,%eax 12bdf9: 74 31 je 12be2c <== ALWAYS TAKEN errno = EINVAL; fclose(fp); return -1; } if (name) { 12bdfb: 85 db test %ebx,%ebx 12bdfd: 75 c9 jne 12bdc8 <== NEVER TAKEN match = (strcmp(grp->gr_name, name) == 0); } else { match = (grp->gr_gid == gid); 12bdff: 0f b7 46 08 movzwl 0x8(%esi),%eax <== NOT EXECUTED 12be03: 3b 45 e4 cmp -0x1c(%ebp),%eax <== NOT EXECUTED 12be06: 0f 94 c0 sete %al <== NOT EXECUTED 12be09: 0f b6 c0 movzbl %al,%eax <== NOT EXECUTED } if (match) { 12be0c: 85 c0 test %eax,%eax <== NOT EXECUTED 12be0e: 74 d2 je 12bde2 <== NOT EXECUTED fclose(fp); 12be10: 83 ec 0c sub $0xc,%esp 12be13: 57 push %edi 12be14: e8 43 68 01 00 call 14265c *result = grp; 12be19: 8b 45 10 mov 0x10(%ebp),%eax 12be1c: 89 30 mov %esi,(%eax) 12be1e: 31 c0 xor %eax,%eax return 0; 12be20: 83 c4 10 add $0x10,%esp } } fclose(fp); errno = EINVAL; return -1; } 12be23: 8d 65 f4 lea -0xc(%ebp),%esp 12be26: 5b pop %ebx 12be27: 5e pop %esi 12be28: 5f pop %edi 12be29: c9 leave 12be2a: c3 ret 12be2b: 90 nop <== NOT EXECUTED errno = EINVAL; return -1; } for(;;) { if (!scangr(fp, grp, buffer, bufsize)) { errno = EINVAL; 12be2c: e8 df 66 01 00 call 142510 <__errno> <== NOT EXECUTED 12be31: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED fclose(fp); 12be37: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12be3a: 57 push %edi <== NOT EXECUTED 12be3b: e8 1c 68 01 00 call 14265c <== NOT EXECUTED 12be40: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED return -1; 12be45: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } } fclose(fp); errno = EINVAL; return -1; } 12be48: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 12be4b: 5b pop %ebx <== NOT EXECUTED 12be4c: 5e pop %esi <== NOT EXECUTED 12be4d: 5f pop %edi <== NOT EXECUTED 12be4e: c9 leave <== NOT EXECUTED 12be4f: c3 ret <== NOT EXECUTED int match; init_etc_passwd_group(); if ((fp = fopen("/etc/group", "r")) == NULL) { errno = EINVAL; 12be50: e8 bb 66 01 00 call 142510 <__errno> <== NOT EXECUTED 12be55: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 12be5b: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED return -1; 12be5e: eb c3 jmp 12be23 <== NOT EXECUTED 0012bae0 : return NULL; return p; } struct group *getgrent(void) { 12bae0: 55 push %ebp <== NOT EXECUTED 12bae1: 89 e5 mov %esp,%ebp <== NOT EXECUTED 12bae3: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED if (group_fp == NULL) 12bae6: a1 84 ea 16 00 mov 0x16ea84,%eax <== NOT EXECUTED 12baeb: 85 c0 test %eax,%eax <== NOT EXECUTED 12baed: 75 05 jne 12baf4 <== NOT EXECUTED return NULL; if (!scangr(group_fp, &grent, grbuf, sizeof grbuf)) 12baef: 31 c0 xor %eax,%eax <== NOT EXECUTED return NULL; return &grent; } 12baf1: c9 leave <== NOT EXECUTED 12baf2: c3 ret <== NOT EXECUTED 12baf3: 90 nop <== NOT EXECUTED struct group *getgrent(void) { if (group_fp == NULL) return NULL; if (!scangr(group_fp, &grent, grbuf, sizeof grbuf)) 12baf4: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12baf7: 68 c8 00 00 00 push $0xc8 <== NOT EXECUTED 12bafc: b9 a0 ea 16 00 mov $0x16eaa0,%ecx <== NOT EXECUTED 12bb01: ba 68 eb 16 00 mov $0x16eb68,%edx <== NOT EXECUTED 12bb06: e8 bd fe ff ff call 12b9c8 <== NOT EXECUTED 12bb0b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 12bb0e: 85 c0 test %eax,%eax <== NOT EXECUTED 12bb10: 74 dd je 12baef <== NOT EXECUTED 12bb12: b8 68 eb 16 00 mov $0x16eb68,%eax <== NOT EXECUTED return NULL; return &grent; } 12bb17: c9 leave <== NOT EXECUTED 12bb18: c3 ret <== NOT EXECUTED 0012be8c : } struct group *getgrgid( gid_t gid ) { 12be8c: 55 push %ebp <== NOT EXECUTED 12be8d: 89 e5 mov %esp,%ebp <== NOT EXECUTED 12be8f: 83 ec 24 sub $0x24,%esp <== NOT EXECUTED struct group *p; if(getgrgid_r(gid, &grent, grbuf, sizeof grbuf, &p)) 12be92: 8d 45 f4 lea -0xc(%ebp),%eax <== NOT EXECUTED 12be95: 50 push %eax <== NOT EXECUTED 12be96: 68 c8 00 00 00 push $0xc8 <== NOT EXECUTED 12be9b: 68 a0 ea 16 00 push $0x16eaa0 <== NOT EXECUTED 12bea0: 68 68 eb 16 00 push $0x16eb68 <== NOT EXECUTED 12bea5: 0f b7 45 08 movzwl 0x8(%ebp),%eax <== NOT EXECUTED 12bea9: 50 push %eax <== NOT EXECUTED 12beaa: e8 b1 ff ff ff call 12be60 <== NOT EXECUTED 12beaf: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 12beb2: 85 c0 test %eax,%eax <== NOT EXECUTED 12beb4: 75 06 jne 12bebc <== NOT EXECUTED return NULL; return p; 12beb6: 8b 45 f4 mov -0xc(%ebp),%eax <== NOT EXECUTED } 12beb9: c9 leave <== NOT EXECUTED 12beba: c3 ret <== NOT EXECUTED 12bebb: 90 nop <== NOT EXECUTED gid_t gid ) { struct group *p; if(getgrgid_r(gid, &grent, grbuf, sizeof grbuf, &p)) 12bebc: 31 c0 xor %eax,%eax <== NOT EXECUTED return NULL; return p; } 12bebe: c9 leave <== NOT EXECUTED 12bebf: c3 ret <== NOT EXECUTED 0012be60 : struct group *grp, char *buffer, size_t bufsize, struct group **result ) { 12be60: 55 push %ebp <== NOT EXECUTED 12be61: 89 e5 mov %esp,%ebp <== NOT EXECUTED 12be63: 53 push %ebx <== NOT EXECUTED 12be64: 83 ec 04 sub $0x4,%esp <== NOT EXECUTED 12be67: 8b 4d 0c mov 0xc(%ebp),%ecx <== NOT EXECUTED 12be6a: 8b 45 10 mov 0x10(%ebp),%eax <== NOT EXECUTED return getgr_r(NULL, gid, grp, buffer, bufsize, result); 12be6d: 0f b7 55 08 movzwl 0x8(%ebp),%edx <== NOT EXECUTED 12be71: 8b 5d 18 mov 0x18(%ebp),%ebx <== NOT EXECUTED 12be74: 89 5d 10 mov %ebx,0x10(%ebp) <== NOT EXECUTED 12be77: 8b 5d 14 mov 0x14(%ebp),%ebx <== NOT EXECUTED 12be7a: 89 5d 0c mov %ebx,0xc(%ebp) <== NOT EXECUTED 12be7d: 89 45 08 mov %eax,0x8(%ebp) <== NOT EXECUTED 12be80: 31 c0 xor %eax,%eax <== NOT EXECUTED } 12be82: 5b pop %ebx <== NOT EXECUTED 12be83: 5b pop %ebx <== NOT EXECUTED 12be84: c9 leave <== NOT EXECUTED char *buffer, size_t bufsize, struct group **result ) { return getgr_r(NULL, gid, grp, buffer, bufsize, result); 12be85: e9 06 ff ff ff jmp 12bd90 <== NOT EXECUTED 0012beec : } struct group *getgrnam( const char *name ) { 12beec: 55 push %ebp 12beed: 89 e5 mov %esp,%ebp 12beef: 83 ec 24 sub $0x24,%esp struct group *p; if(getgrnam_r(name, &grent, grbuf, sizeof grbuf, &p)) 12bef2: 8d 45 f4 lea -0xc(%ebp),%eax 12bef5: 50 push %eax 12bef6: 68 c8 00 00 00 push $0xc8 12befb: 68 a0 ea 16 00 push $0x16eaa0 12bf00: 68 68 eb 16 00 push $0x16eb68 12bf05: ff 75 08 pushl 0x8(%ebp) 12bf08: e8 b3 ff ff ff call 12bec0 <== ALWAYS TAKEN 12bf0d: 83 c4 20 add $0x20,%esp 12bf10: 85 c0 test %eax,%eax 12bf12: 75 08 jne 12bf1c <== ALWAYS TAKEN return NULL; return p; 12bf14: 8b 45 f4 mov -0xc(%ebp),%eax } 12bf17: c9 leave 12bf18: c3 ret 12bf19: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED const char *name ) { struct group *p; if(getgrnam_r(name, &grent, grbuf, sizeof grbuf, &p)) 12bf1c: 31 c0 xor %eax,%eax <== NOT EXECUTED return NULL; return p; } 12bf1e: c9 leave <== NOT EXECUTED 12bf1f: c3 ret <== NOT EXECUTED 0012bec0 : struct group *grp, char *buffer, size_t bufsize, struct group **result ) { 12bec0: 55 push %ebp 12bec1: 89 e5 mov %esp,%ebp 12bec3: 53 push %ebx 12bec4: 83 ec 04 sub $0x4,%esp 12bec7: 8b 45 08 mov 0x8(%ebp),%eax 12beca: 8b 4d 0c mov 0xc(%ebp),%ecx 12becd: 8b 55 10 mov 0x10(%ebp),%edx return getgr_r(name, 0, grp, buffer, bufsize, result); 12bed0: 8b 5d 18 mov 0x18(%ebp),%ebx 12bed3: 89 5d 10 mov %ebx,0x10(%ebp) 12bed6: 8b 5d 14 mov 0x14(%ebp),%ebx 12bed9: 89 5d 0c mov %ebx,0xc(%ebp) 12bedc: 89 55 08 mov %edx,0x8(%ebp) 12bedf: 31 d2 xor %edx,%edx } 12bee1: 5b pop %ebx 12bee2: 5b pop %ebx 12bee3: c9 leave char *buffer, size_t bufsize, struct group **result ) { return getgr_r(name, 0, grp, buffer, bufsize, result); 12bee4: e9 a7 fe ff ff jmp 12bd90 <== ALWAYS TAKEN 0010b0f0 : int getitimer( int which, struct itimerval *value ) { 10b0f0: 55 push %ebp 10b0f1: 89 e5 mov %esp,%ebp 10b0f3: 83 ec 08 sub $0x8,%esp if ( !value ) 10b0f6: 8b 45 0c mov 0xc(%ebp),%eax 10b0f9: 85 c0 test %eax,%eax 10b0fb: 74 2f je 10b12c rtems_set_errno_and_return_minus_one( EFAULT ); switch ( which ) { 10b0fd: 83 7d 08 02 cmpl $0x2,0x8(%ebp) 10b101: 76 15 jbe 10b118 case ITIMER_PROF: rtems_set_errno_and_return_minus_one( ENOSYS ); default: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 10b103: e8 14 8e 00 00 call 113f1c <__errno> 10b108: c7 00 16 00 00 00 movl $0x16,(%eax) } 10b10e: b8 ff ff ff ff mov $0xffffffff,%eax 10b113: c9 leave 10b114: c3 ret 10b115: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED switch ( which ) { case ITIMER_REAL: case ITIMER_VIRTUAL: case ITIMER_PROF: rtems_set_errno_and_return_minus_one( ENOSYS ); 10b118: e8 ff 8d 00 00 call 113f1c <__errno> 10b11d: c7 00 58 00 00 00 movl $0x58,(%eax) default: break; } rtems_set_errno_and_return_minus_one( EINVAL ); } 10b123: b8 ff ff ff ff mov $0xffffffff,%eax 10b128: c9 leave 10b129: c3 ret 10b12a: 66 90 xchg %ax,%ax <== NOT EXECUTED int which, struct itimerval *value ) { if ( !value ) rtems_set_errno_and_return_minus_one( EFAULT ); 10b12c: e8 eb 8d 00 00 call 113f1c <__errno> 10b131: c7 00 0e 00 00 00 movl $0xe,(%eax) 10b137: eb d5 jmp 10b10e <== ALWAYS TAKEN 0012bf5c : struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) { 12bf5c: 55 push %ebp 12bf5d: 89 e5 mov %esp,%ebp 12bf5f: 57 push %edi 12bf60: 56 push %esi 12bf61: 53 push %ebx 12bf62: 83 ec 1c sub $0x1c,%esp 12bf65: 89 c3 mov %eax,%ebx 12bf67: 89 55 e4 mov %edx,-0x1c(%ebp) 12bf6a: 89 ce mov %ecx,%esi FILE *fp; int match; init_etc_passwd_group(); 12bf6c: e8 e3 fc ff ff call 12bc54 <== ALWAYS TAKEN if ((fp = fopen("/etc/passwd", "r")) == NULL) { 12bf71: 83 ec 08 sub $0x8,%esp 12bf74: 68 4d bc 15 00 push $0x15bc4d 12bf79: 68 8b 89 15 00 push $0x15898b 12bf7e: e8 c9 6e 01 00 call 142e4c 12bf83: 89 c7 mov %eax,%edi 12bf85: 83 c4 10 add $0x10,%esp 12bf88: 85 c0 test %eax,%eax 12bf8a: 75 22 jne 12bfae <== NEVER TAKEN 12bf8c: e9 8b 00 00 00 jmp 12c01c <== NOT EXECUTED 12bf91: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED errno = EINVAL; fclose(fp); return -1; } if (name) { match = (strcmp(pwd->pw_name, name) == 0); 12bf94: 83 ec 08 sub $0x8,%esp 12bf97: 53 push %ebx 12bf98: ff 36 pushl (%esi) 12bf9a: e8 6d ba 01 00 call 147a0c 12bf9f: 83 c4 10 add $0x10,%esp 12bfa2: 85 c0 test %eax,%eax 12bfa4: 0f 94 c0 sete %al 12bfa7: 0f b6 c0 movzbl %al,%eax } else { match = (pwd->pw_uid == uid); } if (match) { 12bfaa: 85 c0 test %eax,%eax 12bfac: 75 2e jne 12bfdc if ((fp = fopen("/etc/passwd", "r")) == NULL) { errno = EINVAL; return -1; } for(;;) { if (!scanpw(fp, pwd, buffer, bufsize)) { 12bfae: 83 ec 0c sub $0xc,%esp 12bfb1: ff 75 0c pushl 0xc(%ebp) 12bfb4: 8b 4d 08 mov 0x8(%ebp),%ecx 12bfb7: 89 f2 mov %esi,%edx 12bfb9: 89 f8 mov %edi,%eax 12bfbb: e8 5c fb ff ff call 12bb1c <== ALWAYS TAKEN 12bfc0: 83 c4 10 add $0x10,%esp 12bfc3: 85 c0 test %eax,%eax 12bfc5: 74 31 je 12bff8 <== ALWAYS TAKEN errno = EINVAL; fclose(fp); return -1; } if (name) { 12bfc7: 85 db test %ebx,%ebx 12bfc9: 75 c9 jne 12bf94 <== NEVER TAKEN match = (strcmp(pwd->pw_name, name) == 0); } else { match = (pwd->pw_uid == uid); 12bfcb: 0f b7 46 08 movzwl 0x8(%esi),%eax <== NOT EXECUTED 12bfcf: 3b 45 e4 cmp -0x1c(%ebp),%eax <== NOT EXECUTED 12bfd2: 0f 94 c0 sete %al <== NOT EXECUTED 12bfd5: 0f b6 c0 movzbl %al,%eax <== NOT EXECUTED } if (match) { 12bfd8: 85 c0 test %eax,%eax <== NOT EXECUTED 12bfda: 74 d2 je 12bfae <== NOT EXECUTED fclose(fp); 12bfdc: 83 ec 0c sub $0xc,%esp 12bfdf: 57 push %edi 12bfe0: e8 77 66 01 00 call 14265c *result = pwd; 12bfe5: 8b 45 10 mov 0x10(%ebp),%eax 12bfe8: 89 30 mov %esi,(%eax) 12bfea: 31 c0 xor %eax,%eax return 0; 12bfec: 83 c4 10 add $0x10,%esp } } fclose(fp); errno = EINVAL; return -1; } 12bfef: 8d 65 f4 lea -0xc(%ebp),%esp 12bff2: 5b pop %ebx 12bff3: 5e pop %esi 12bff4: 5f pop %edi 12bff5: c9 leave 12bff6: c3 ret 12bff7: 90 nop <== NOT EXECUTED errno = EINVAL; return -1; } for(;;) { if (!scanpw(fp, pwd, buffer, bufsize)) { errno = EINVAL; 12bff8: e8 13 65 01 00 call 142510 <__errno> <== NOT EXECUTED 12bffd: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED fclose(fp); 12c003: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12c006: 57 push %edi <== NOT EXECUTED 12c007: e8 50 66 01 00 call 14265c <== NOT EXECUTED 12c00c: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED return -1; 12c011: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } } fclose(fp); errno = EINVAL; return -1; } 12c014: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 12c017: 5b pop %ebx <== NOT EXECUTED 12c018: 5e pop %esi <== NOT EXECUTED 12c019: 5f pop %edi <== NOT EXECUTED 12c01a: c9 leave <== NOT EXECUTED 12c01b: c3 ret <== NOT EXECUTED int match; init_etc_passwd_group(); if ((fp = fopen("/etc/passwd", "r")) == NULL) { errno = EINVAL; 12c01c: e8 ef 64 01 00 call 142510 <__errno> <== NOT EXECUTED 12c021: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 12c027: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED return -1; 12c02a: eb c3 jmp 12bfef <== NOT EXECUTED 0012bc18 : return NULL; return p; } struct passwd *getpwent(void) { 12bc18: 55 push %ebp <== NOT EXECUTED 12bc19: 89 e5 mov %esp,%ebp <== NOT EXECUTED 12bc1b: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED if (passwd_fp == NULL) 12bc1e: a1 84 e9 16 00 mov 0x16e984,%eax <== NOT EXECUTED 12bc23: 85 c0 test %eax,%eax <== NOT EXECUTED 12bc25: 75 05 jne 12bc2c <== NOT EXECUTED return NULL; if (!scanpw(passwd_fp, &pwent, pwbuf, sizeof pwbuf)) 12bc27: 31 c0 xor %eax,%eax <== NOT EXECUTED return NULL; return &pwent; } 12bc29: c9 leave <== NOT EXECUTED 12bc2a: c3 ret <== NOT EXECUTED 12bc2b: 90 nop <== NOT EXECUTED struct passwd *getpwent(void) { if (passwd_fp == NULL) return NULL; if (!scanpw(passwd_fp, &pwent, pwbuf, sizeof pwbuf)) 12bc2c: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12bc2f: 68 c8 00 00 00 push $0xc8 <== NOT EXECUTED 12bc34: b9 a0 e9 16 00 mov $0x16e9a0,%ecx <== NOT EXECUTED 12bc39: ba 68 ea 16 00 mov $0x16ea68,%edx <== NOT EXECUTED 12bc3e: e8 d9 fe ff ff call 12bb1c <== NOT EXECUTED 12bc43: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 12bc46: 85 c0 test %eax,%eax <== NOT EXECUTED 12bc48: 74 dd je 12bc27 <== NOT EXECUTED 12bc4a: b8 68 ea 16 00 mov $0x16ea68,%eax <== NOT EXECUTED return NULL; return &pwent; } 12bc4f: c9 leave <== NOT EXECUTED 12bc50: c3 ret <== NOT EXECUTED 0012c0b8 : } struct passwd *getpwnam( const char *name ) { 12c0b8: 55 push %ebp 12c0b9: 89 e5 mov %esp,%ebp 12c0bb: 83 ec 24 sub $0x24,%esp struct passwd *p; if(getpwnam_r(name, &pwent, pwbuf, sizeof pwbuf, &p)) 12c0be: 8d 45 f4 lea -0xc(%ebp),%eax 12c0c1: 50 push %eax 12c0c2: 68 c8 00 00 00 push $0xc8 12c0c7: 68 a0 e9 16 00 push $0x16e9a0 12c0cc: 68 68 ea 16 00 push $0x16ea68 12c0d1: ff 75 08 pushl 0x8(%ebp) 12c0d4: e8 b3 ff ff ff call 12c08c <== ALWAYS TAKEN 12c0d9: 83 c4 20 add $0x20,%esp 12c0dc: 85 c0 test %eax,%eax 12c0de: 75 08 jne 12c0e8 <== ALWAYS TAKEN return NULL; return p; 12c0e0: 8b 45 f4 mov -0xc(%ebp),%eax } 12c0e3: c9 leave 12c0e4: c3 ret 12c0e5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED const char *name ) { struct passwd *p; if(getpwnam_r(name, &pwent, pwbuf, sizeof pwbuf, &p)) 12c0e8: 31 c0 xor %eax,%eax <== NOT EXECUTED return NULL; return p; } 12c0ea: c9 leave <== NOT EXECUTED 12c0eb: c3 ret <== NOT EXECUTED 0012c08c : struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) { 12c08c: 55 push %ebp 12c08d: 89 e5 mov %esp,%ebp 12c08f: 53 push %ebx 12c090: 83 ec 04 sub $0x4,%esp 12c093: 8b 45 08 mov 0x8(%ebp),%eax 12c096: 8b 4d 0c mov 0xc(%ebp),%ecx 12c099: 8b 55 10 mov 0x10(%ebp),%edx return getpw_r(name, 0, pwd, buffer, bufsize, result); 12c09c: 8b 5d 18 mov 0x18(%ebp),%ebx 12c09f: 89 5d 10 mov %ebx,0x10(%ebp) 12c0a2: 8b 5d 14 mov 0x14(%ebp),%ebx 12c0a5: 89 5d 0c mov %ebx,0xc(%ebp) 12c0a8: 89 55 08 mov %edx,0x8(%ebp) 12c0ab: 31 d2 xor %edx,%edx } 12c0ad: 5b pop %ebx 12c0ae: 5b pop %ebx 12c0af: c9 leave char *buffer, size_t bufsize, struct passwd **result ) { return getpw_r(name, 0, pwd, buffer, bufsize, result); 12c0b0: e9 a7 fe ff ff jmp 12bf5c <== ALWAYS TAKEN 0012c058 : } struct passwd *getpwuid( uid_t uid ) { 12c058: 55 push %ebp <== NOT EXECUTED 12c059: 89 e5 mov %esp,%ebp <== NOT EXECUTED 12c05b: 83 ec 24 sub $0x24,%esp <== NOT EXECUTED struct passwd *p; if(getpwuid_r(uid, &pwent, pwbuf, sizeof pwbuf, &p)) 12c05e: 8d 45 f4 lea -0xc(%ebp),%eax <== NOT EXECUTED 12c061: 50 push %eax <== NOT EXECUTED 12c062: 68 c8 00 00 00 push $0xc8 <== NOT EXECUTED 12c067: 68 a0 e9 16 00 push $0x16e9a0 <== NOT EXECUTED 12c06c: 68 68 ea 16 00 push $0x16ea68 <== NOT EXECUTED 12c071: 0f b7 45 08 movzwl 0x8(%ebp),%eax <== NOT EXECUTED 12c075: 50 push %eax <== NOT EXECUTED 12c076: e8 b1 ff ff ff call 12c02c <== NOT EXECUTED 12c07b: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 12c07e: 85 c0 test %eax,%eax <== NOT EXECUTED 12c080: 75 06 jne 12c088 <== NOT EXECUTED return NULL; return p; 12c082: 8b 45 f4 mov -0xc(%ebp),%eax <== NOT EXECUTED } 12c085: c9 leave <== NOT EXECUTED 12c086: c3 ret <== NOT EXECUTED 12c087: 90 nop <== NOT EXECUTED uid_t uid ) { struct passwd *p; if(getpwuid_r(uid, &pwent, pwbuf, sizeof pwbuf, &p)) 12c088: 31 c0 xor %eax,%eax <== NOT EXECUTED return NULL; return p; } 12c08a: c9 leave <== NOT EXECUTED 12c08b: c3 ret <== NOT EXECUTED 0012c02c : struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) { 12c02c: 55 push %ebp <== NOT EXECUTED 12c02d: 89 e5 mov %esp,%ebp <== NOT EXECUTED 12c02f: 53 push %ebx <== NOT EXECUTED 12c030: 83 ec 04 sub $0x4,%esp <== NOT EXECUTED 12c033: 8b 4d 0c mov 0xc(%ebp),%ecx <== NOT EXECUTED 12c036: 8b 45 10 mov 0x10(%ebp),%eax <== NOT EXECUTED return getpw_r(NULL, uid, pwd, buffer, bufsize, result); 12c039: 0f b7 55 08 movzwl 0x8(%ebp),%edx <== NOT EXECUTED 12c03d: 8b 5d 18 mov 0x18(%ebp),%ebx <== NOT EXECUTED 12c040: 89 5d 10 mov %ebx,0x10(%ebp) <== NOT EXECUTED 12c043: 8b 5d 14 mov 0x14(%ebp),%ebx <== NOT EXECUTED 12c046: 89 5d 0c mov %ebx,0xc(%ebp) <== NOT EXECUTED 12c049: 89 45 08 mov %eax,0x8(%ebp) <== NOT EXECUTED 12c04c: 31 c0 xor %eax,%eax <== NOT EXECUTED } 12c04e: 5b pop %ebx <== NOT EXECUTED 12c04f: 5b pop %ebx <== NOT EXECUTED 12c050: c9 leave <== NOT EXECUTED char *buffer, size_t bufsize, struct passwd **result ) { return getpw_r(NULL, uid, pwd, buffer, bufsize, result); 12c051: e9 06 ff ff ff jmp 12bf5c <== NOT EXECUTED 0010fa68 : */ int gettimeofday( struct timeval *tp, void * __tz __attribute__((unused)) ) { 10fa68: 55 push %ebp 10fa69: 89 e5 mov %esp,%ebp 10fa6b: 56 push %esi 10fa6c: 53 push %ebx 10fa6d: 83 ec 20 sub $0x20,%esp 10fa70: 8b 5d 08 mov 0x8(%ebp),%ebx /* struct timezone* tzp = (struct timezone*) __tz; */ if ( !tp ) { 10fa73: 85 db test %ebx,%ebx 10fa75: 74 42 je 10fab9 <== ALWAYS TAKEN { ISR_Level level; struct timespec now; suseconds_t useconds; _ISR_Disable(level); 10fa77: 9c pushf 10fa78: fa cli 10fa79: 5e pop %esi _TOD_Get( &now ); 10fa7a: 83 ec 0c sub $0xc,%esp 10fa7d: 8d 45 f0 lea -0x10(%ebp),%eax 10fa80: 50 push %eax 10fa81: e8 16 11 00 00 call 110b9c <_TOD_Get> _ISR_Enable(level); 10fa86: 56 push %esi 10fa87: 9d popf useconds = (suseconds_t)now.tv_nsec; 10fa88: 8b 4d f4 mov -0xc(%ebp),%ecx useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND; time->tv_sec = now.tv_sec; 10fa8b: 8b 45 f0 mov -0x10(%ebp),%eax 10fa8e: 89 03 mov %eax,(%ebx) time->tv_usec = useconds; 10fa90: be d3 4d 62 10 mov $0x10624dd3,%esi 10fa95: 89 c8 mov %ecx,%eax 10fa97: f7 ee imul %esi 10fa99: 89 45 e0 mov %eax,-0x20(%ebp) 10fa9c: 89 55 e4 mov %edx,-0x1c(%ebp) 10fa9f: 8b 75 e4 mov -0x1c(%ebp),%esi 10faa2: c1 fe 06 sar $0x6,%esi 10faa5: 89 c8 mov %ecx,%eax 10faa7: 99 cltd 10faa8: 29 d6 sub %edx,%esi 10faaa: 89 73 04 mov %esi,0x4(%ebx) 10faad: 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; 10faaf: 83 c4 10 add $0x10,%esp } 10fab2: 8d 65 f8 lea -0x8(%ebp),%esp 10fab5: 5b pop %ebx 10fab6: 5e pop %esi 10fab7: c9 leave 10fab8: c3 ret void * __tz __attribute__((unused)) ) { /* struct timezone* tzp = (struct timezone*) __tz; */ if ( !tp ) { errno = EFAULT; 10fab9: e8 52 3d 00 00 call 113810 <__errno> <== NOT EXECUTED 10fabe: c7 00 0e 00 00 00 movl $0xe,(%eax) <== NOT EXECUTED 10fac4: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED return -1; 10fac9: eb e7 jmp 10fab2 <== NOT EXECUTED 0010cff8 : * 4.2.1 Get Real User, Effective User, Ral Group, and Effective Group IDs, * P1003.1b-1993, p. 84 */ uid_t getuid( void ) { 10cff8: 55 push %ebp <== NOT EXECUTED 10cff9: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10cffb: a1 c4 93 16 00 mov 0x1693c4,%eax <== NOT EXECUTED 10d000: 66 8b 40 32 mov 0x32(%eax),%ax <== NOT EXECUTED return _POSIX_types_Uid; } 10d004: c9 leave <== NOT EXECUTED 10d005: c3 ret <== NOT EXECUTED 00117944 : rtems_off64_t imfs_dir_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { 117944: 55 push %ebp 117945: 89 e5 mov %esp,%ebp 117947: 57 push %edi 117948: 56 push %esi 117949: 53 push %ebx 11794a: 83 ec 1c sub $0x1c,%esp 11794d: 8b 5d 08 mov 0x8(%ebp),%ebx switch( whence ) { 117950: 83 7d 14 01 cmpl $0x1,0x14(%ebp) 117954: 76 1e jbe 117974 <== 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 ); 117956: e8 5d 10 00 00 call 1189b8 <__errno> 11795b: c7 00 16 00 00 00 movl $0x16,(%eax) 117961: b8 ff ff ff ff mov $0xffffffff,%eax 117966: ba ff ff ff ff mov $0xffffffff,%edx break; } return 0; } 11796b: 8d 65 f4 lea -0xc(%ebp),%esp 11796e: 5b pop %ebx 11796f: 5e pop %esi 117970: 5f pop %edi 117971: c9 leave 117972: c3 ret 117973: 90 nop <== NOT EXECUTED ) { switch( whence ) { case SEEK_SET: /* absolute move from the start of the file */ case SEEK_CUR: /* relative move */ iop->offset = (iop->offset/sizeof(struct dirent)) * 117974: 6a 00 push $0x0 117976: 68 0c 01 00 00 push $0x10c 11797b: ff 73 10 pushl 0x10(%ebx) 11797e: ff 73 0c pushl 0xc(%ebx) 117981: e8 c6 bf 00 00 call 12394c <__divdi3> 117986: 83 c4 10 add $0x10,%esp 117989: 69 f2 0c 01 00 00 imul $0x10c,%edx,%esi 11798f: b9 0c 01 00 00 mov $0x10c,%ecx 117994: f7 e1 mul %ecx 117996: 89 45 e0 mov %eax,-0x20(%ebp) 117999: 01 f2 add %esi,%edx 11799b: 89 55 e4 mov %edx,-0x1c(%ebp) 11799e: 8b 45 e0 mov -0x20(%ebp),%eax 1179a1: 8b 55 e4 mov -0x1c(%ebp),%edx 1179a4: 89 43 0c mov %eax,0xc(%ebx) 1179a7: 89 53 10 mov %edx,0x10(%ebx) 1179aa: 31 c0 xor %eax,%eax 1179ac: 31 d2 xor %edx,%edx rtems_set_errno_and_return_minus_one( EINVAL ); break; } return 0; } 1179ae: 8d 65 f4 lea -0xc(%ebp),%esp 1179b1: 5b pop %ebx 1179b2: 5e pop %esi 1179b3: 5f pop %edi 1179b4: c9 leave 1179b5: c3 ret 00117878 : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 117878: 55 push %ebp 117879: 89 e5 mov %esp,%ebp 11787b: 8b 45 08 mov 0x8(%ebp),%eax IMFS_jnode_t *the_jnode; /* Is the node a directory ? */ the_jnode = (IMFS_jnode_t *) iop->file_info; 11787e: 8b 50 38 mov 0x38(%eax),%edx 117881: 83 7a 4c 01 cmpl $0x1,0x4c(%edx) 117885: 74 09 je 117890 <== NEVER TAKEN 117887: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED if ( the_jnode->type != IMFS_DIRECTORY ) return -1; /* It wasn't a directory --> return error */ iop->offset = 0; return 0; } 11788c: c9 leave <== NOT EXECUTED 11788d: c3 ret <== NOT EXECUTED 11788e: 66 90 xchg %ax,%ax <== NOT EXECUTED the_jnode = (IMFS_jnode_t *) iop->file_info; if ( the_jnode->type != IMFS_DIRECTORY ) return -1; /* It wasn't a directory --> return error */ iop->offset = 0; 117890: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax) 117897: c7 40 10 00 00 00 00 movl $0x0,0x10(%eax) 11789e: 31 c0 xor %eax,%eax return 0; } 1178a0: c9 leave 1178a1: c3 ret 00117a94 : ssize_t imfs_dir_read( rtems_libio_t *iop, void *buffer, size_t count ) { 117a94: 55 push %ebp 117a95: 89 e5 mov %esp,%ebp 117a97: 57 push %edi 117a98: 56 push %esi 117a99: 53 push %ebx 117a9a: 81 ec 4c 01 00 00 sub $0x14c,%esp int current_entry; int first_entry; int last_entry; struct dirent tmp_dirent; the_jnode = (IMFS_jnode_t *)iop->file_info; 117aa0: 8b 55 08 mov 0x8(%ebp),%edx 117aa3: 8b 42 38 mov 0x38(%edx),%eax */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 117aa6: 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; 117aa9: 83 c0 54 add $0x54,%eax 117aac: 89 85 cc fe ff ff mov %eax,-0x134(%ebp) the_chain = &the_jnode->info.directory.Entries; if ( rtems_chain_is_empty( the_chain ) ) 117ab2: 39 c3 cmp %eax,%ebx 117ab4: 0f 84 22 01 00 00 je 117bdc /* Move to the first of the desired directory entries */ the_node = the_chain->first; bytes_transferred = 0; first_entry = iop->offset; 117aba: 8b 45 08 mov 0x8(%ebp),%eax 117abd: 8b 40 0c mov 0xc(%eax),%eax 117ac0: 89 85 d0 fe ff ff mov %eax,-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); 117ac6: ba 6b 4c a4 07 mov $0x7a44c6b,%edx 117acb: 8b 45 10 mov 0x10(%ebp),%eax 117ace: f7 e2 mul %edx 117ad0: c1 ea 03 shr $0x3,%edx 117ad3: 89 d0 mov %edx,%eax 117ad5: c1 e0 05 shl $0x5,%eax 117ad8: 01 d0 add %edx,%eax 117ada: 8d 04 42 lea (%edx,%eax,2),%eax 117add: 8b 95 d0 fe ff ff mov -0x130(%ebp),%edx 117ae3: 8d 04 82 lea (%edx,%eax,4),%eax 117ae6: 89 85 d4 fe ff ff mov %eax,-0x12c(%ebp) /* The directory was not empty so try to move to the desired entry in chain*/ for ( 117aec: 85 c0 test %eax,%eax 117aee: 0f 8e e8 00 00 00 jle 117bdc <== ALWAYS TAKEN 117af4: 31 d2 xor %edx,%edx 117af6: c7 85 c8 fe ff ff 00 movl $0x0,-0x138(%ebp) 117afd: 00 00 00 tmp_dirent.d_off = current_entry; tmp_dirent.d_reclen = sizeof( struct dirent ); the_jnode = (IMFS_jnode_t *) the_node; tmp_dirent.d_ino = the_jnode->st_ino; tmp_dirent.d_namlen = strlen( the_jnode->name ); strcpy( tmp_dirent.d_name, the_jnode->name ); 117b00: 8d 85 dc fe ff ff lea -0x124(%ebp),%eax 117b06: 89 85 b4 fe ff ff mov %eax,-0x14c(%ebp) 117b0c: eb 22 jmp 117b30 <== ALWAYS TAKEN 117b0e: 66 90 xchg %ax,%ax <== NOT EXECUTED ); iop->offset = iop->offset + sizeof(struct dirent); bytes_transferred = bytes_transferred + sizeof( struct dirent ); } the_node = the_node->next; 117b10: 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( 117b12: 81 c2 0c 01 00 00 add $0x10c,%edx /* protect against using sizes that are not exact multiples of the */ /* -dirent- size. These could result in unexpected results */ last_entry = first_entry + (count/sizeof(struct dirent)) * sizeof(struct dirent); /* The directory was not empty so try to move to the desired entry in chain*/ for ( 117b18: 3b 95 d4 fe ff ff cmp -0x12c(%ebp),%edx 117b1e: 0f 8d a8 00 00 00 jge 117bcc <== 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 ) ){ 117b24: 3b 9d cc fe ff ff cmp -0x134(%ebp),%ebx 117b2a: 0f 84 9c 00 00 00 je 117bcc /* entry in the read */ return bytes_transferred; /* Indicate that there are no more */ /* entries to return */ } if( current_entry >= first_entry ) { 117b30: 39 95 d0 fe ff ff cmp %edx,-0x130(%ebp) 117b36: 7f d8 jg 117b10 /* Move the entry to the return buffer */ tmp_dirent.d_off = current_entry; 117b38: 89 95 e0 fe ff ff mov %edx,-0x120(%ebp) tmp_dirent.d_reclen = sizeof( struct dirent ); 117b3e: 66 c7 85 e4 fe ff ff movw $0x10c,-0x11c(%ebp) 117b45: 0c 01 the_jnode = (IMFS_jnode_t *) the_node; tmp_dirent.d_ino = the_jnode->st_ino; 117b47: 8b 43 38 mov 0x38(%ebx),%eax 117b4a: 89 85 dc fe ff ff mov %eax,-0x124(%ebp) tmp_dirent.d_namlen = strlen( the_jnode->name ); 117b50: 8d 73 0c lea 0xc(%ebx),%esi 117b53: 31 c0 xor %eax,%eax 117b55: b9 ff ff ff ff mov $0xffffffff,%ecx 117b5a: 89 f7 mov %esi,%edi 117b5c: f2 ae repnz scas %es:(%edi),%al 117b5e: f7 d1 not %ecx 117b60: 49 dec %ecx 117b61: 66 89 8d e6 fe ff ff mov %cx,-0x11a(%ebp) strcpy( tmp_dirent.d_name, the_jnode->name ); 117b68: 83 ec 08 sub $0x8,%esp 117b6b: 56 push %esi 117b6c: 8d 85 e8 fe ff ff lea -0x118(%ebp),%eax 117b72: 50 push %eax 117b73: 89 95 c4 fe ff ff mov %edx,-0x13c(%ebp) 117b79: e8 92 18 00 00 call 119410 memcpy( 117b7e: 8b 45 0c mov 0xc(%ebp),%eax 117b81: 03 85 c8 fe ff ff add -0x138(%ebp),%eax 117b87: b9 43 00 00 00 mov $0x43,%ecx 117b8c: 89 c7 mov %eax,%edi 117b8e: 8b b5 b4 fe ff ff mov -0x14c(%ebp),%esi 117b94: f3 a5 rep movsl %ds:(%esi),%es:(%edi) buffer + bytes_transferred, (void *)&tmp_dirent, sizeof( struct dirent ) ); iop->offset = iop->offset + sizeof(struct dirent); 117b96: 8b 45 08 mov 0x8(%ebp),%eax 117b99: 81 40 0c 0c 01 00 00 addl $0x10c,0xc(%eax) 117ba0: 83 50 10 00 adcl $0x0,0x10(%eax) bytes_transferred = bytes_transferred + sizeof( struct dirent ); 117ba4: 81 85 c8 fe ff ff 0c addl $0x10c,-0x138(%ebp) 117bab: 01 00 00 117bae: 83 c4 10 add $0x10,%esp 117bb1: 8b 95 c4 fe ff ff mov -0x13c(%ebp),%edx } the_node = the_node->next; 117bb7: 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( 117bb9: 81 c2 0c 01 00 00 add $0x10c,%edx /* protect against using sizes that are not exact multiples of the */ /* -dirent- size. These could result in unexpected results */ last_entry = first_entry + (count/sizeof(struct dirent)) * sizeof(struct dirent); /* The directory was not empty so try to move to the desired entry in chain*/ for ( 117bbf: 3b 95 d4 fe ff ff cmp -0x12c(%ebp),%edx 117bc5: 0f 8c 59 ff ff ff jl 117b24 <== ALWAYS TAKEN 117bcb: 90 nop the_node = the_node->next; } /* Success */ return bytes_transferred; } 117bcc: 8b 85 c8 fe ff ff mov -0x138(%ebp),%eax 117bd2: 8d 65 f4 lea -0xc(%ebp),%esp 117bd5: 5b pop %ebx 117bd6: 5e pop %esi 117bd7: 5f pop %edi 117bd8: c9 leave 117bd9: c3 ret 117bda: 66 90 xchg %ax,%ax <== NOT EXECUTED /* 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 ( 117bdc: c7 85 c8 fe ff ff 00 movl $0x0,-0x138(%ebp) 117be3: 00 00 00 the_node = the_node->next; } /* Success */ return bytes_transferred; } 117be6: 8b 85 c8 fe ff ff mov -0x138(%ebp),%eax 117bec: 8d 65 f4 lea -0xc(%ebp),%esp 117bef: 5b pop %ebx 117bf0: 5e pop %esi 117bf1: 5f pop %edi 117bf2: c9 leave 117bf3: c3 ret 001179b8 : int imfs_dir_rmnod( rtems_filesystem_location_info_t *parent_pathloc, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN */ ) { 1179b8: 55 push %ebp 1179b9: 89 e5 mov %esp,%ebp 1179bb: 56 push %esi 1179bc: 53 push %ebx 1179bd: 83 ec 10 sub $0x10,%esp 1179c0: 8b 75 0c mov 0xc(%ebp),%esi IMFS_jnode_t *the_jnode; the_jnode = (IMFS_jnode_t *) pathloc->node_access; 1179c3: 8b 1e mov (%esi),%ebx 1179c5: 8d 43 54 lea 0x54(%ebx),%eax 1179c8: 39 43 50 cmp %eax,0x50(%ebx) 1179cb: 0f 85 8f 00 00 00 jne 117a60 /* * You cannot remove the file system root node. */ if ( pathloc->mt_entry->mt_fs_root.node_access == pathloc->node_access ) 1179d1: 8b 46 10 mov 0x10(%esi),%eax 1179d4: 3b 58 1c cmp 0x1c(%eax),%ebx 1179d7: 0f 84 97 00 00 00 je 117a74 /* * You cannot remove a mountpoint. */ if ( the_jnode->info.directory.mt_fs != NULL ) 1179dd: 8b 53 5c mov 0x5c(%ebx),%edx 1179e0: 85 d2 test %edx,%edx 1179e2: 0f 85 8c 00 00 00 jne 117a74 <== ALWAYS TAKEN /* * Take the node out of the parent's chain that contains this node */ if ( the_jnode->Parent != NULL ) { 1179e8: 8b 43 08 mov 0x8(%ebx),%eax 1179eb: 85 c0 test %eax,%eax 1179ed: 74 13 je 117a02 1179ef: 83 ec 0c sub $0xc,%esp 1179f2: 53 push %ebx 1179f3: e8 60 5d ff ff call 10d758 <_Chain_Extract> rtems_chain_extract( (rtems_chain_node *) the_jnode ); the_jnode->Parent = NULL; 1179f8: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx) 1179ff: 83 c4 10 add $0x10,%esp /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; 117a02: 66 ff 4b 34 decw 0x34(%ebx) IMFS_update_ctime( the_jnode ); 117a06: 83 ec 08 sub $0x8,%esp 117a09: 6a 00 push $0x0 117a0b: 8d 45 f0 lea -0x10(%ebp),%eax 117a0e: 50 push %eax 117a0f: e8 d4 19 ff ff call 1093e8 117a14: 8b 45 f0 mov -0x10(%ebp),%eax 117a17: 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) ) { 117a1a: 89 1c 24 mov %ebx,(%esp) 117a1d: e8 22 cd ff ff call 114744 117a22: 83 c4 10 add $0x10,%esp 117a25: 85 c0 test %eax,%eax 117a27: 75 2b jne 117a54 117a29: 66 83 7b 34 00 cmpw $0x0,0x34(%ebx) 117a2e: 75 24 jne 117a54 /* * Is the rtems_filesystem_current is this node? */ if ( rtems_filesystem_current.node_access == pathloc->node_access ) 117a30: a1 18 a7 12 00 mov 0x12a718,%eax 117a35: 8b 50 04 mov 0x4(%eax),%edx 117a38: 3b 16 cmp (%esi),%edx 117a3a: 74 4c je 117a88 <== ALWAYS TAKEN /* * Free memory associated with a memory file. */ free( the_jnode ); 117a3c: 83 ec 0c sub $0xc,%esp 117a3f: 53 push %ebx 117a40: e8 27 19 ff ff call 10936c 117a45: 31 c0 xor %eax,%eax 117a47: 83 c4 10 add $0x10,%esp } return 0; } 117a4a: 8d 65 f8 lea -0x8(%ebp),%esp 117a4d: 5b pop %ebx 117a4e: 5e pop %esi 117a4f: c9 leave 117a50: c3 ret 117a51: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED /* * Free memory associated with a memory file. */ free( the_jnode ); 117a54: 31 c0 xor %eax,%eax } return 0; } 117a56: 8d 65 f8 lea -0x8(%ebp),%esp 117a59: 5b pop %ebx 117a5a: 5e pop %esi 117a5b: c9 leave 117a5c: c3 ret 117a5d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED /* * You cannot remove a node that still has children */ if ( ! rtems_chain_is_empty( &the_jnode->info.directory.Entries ) ) rtems_set_errno_and_return_minus_one( ENOTEMPTY ); 117a60: e8 53 0f 00 00 call 1189b8 <__errno> 117a65: c7 00 5a 00 00 00 movl $0x5a,(%eax) 117a6b: b8 ff ff ff ff mov $0xffffffff,%eax 117a70: eb e4 jmp 117a56 <== ALWAYS TAKEN 117a72: 66 90 xchg %ax,%ax <== NOT EXECUTED /* * You cannot remove a mountpoint. */ if ( the_jnode->info.directory.mt_fs != NULL ) rtems_set_errno_and_return_minus_one( EBUSY ); 117a74: e8 3f 0f 00 00 call 1189b8 <__errno> 117a79: c7 00 10 00 00 00 movl $0x10,(%eax) 117a7f: b8 ff ff ff ff mov $0xffffffff,%eax 117a84: eb d0 jmp 117a56 <== ALWAYS TAKEN 117a86: 66 90 xchg %ax,%ax <== NOT EXECUTED /* * Is the rtems_filesystem_current is this node? */ if ( rtems_filesystem_current.node_access == pathloc->node_access ) rtems_filesystem_current.node_access = NULL; 117a88: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax) <== NOT EXECUTED 117a8f: eb ab jmp 117a3c <== NOT EXECUTED 0012bc54 : /* * Initialize useable but dummy databases */ void init_etc_passwd_group(void) { 12bc54: 55 push %ebp 12bc55: 89 e5 mov %esp,%ebp 12bc57: 53 push %ebx 12bc58: 83 ec 04 sub $0x4,%esp FILE *fp; static char etc_passwd_initted = 0; if (etc_passwd_initted) 12bc5b: 80 3d 80 e9 16 00 00 cmpb $0x0,0x16e980 12bc62: 74 08 je 12bc6c fprintf( fp, "root:x:0:root\n" "rtems:x:1:rtems\n" "tty:x:2:tty\n" ); fclose(fp); } } 12bc64: 8b 5d fc mov -0x4(%ebp),%ebx 12bc67: c9 leave 12bc68: c3 ret 12bc69: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED FILE *fp; static char etc_passwd_initted = 0; if (etc_passwd_initted) return; etc_passwd_initted = 1; 12bc6c: c6 05 80 e9 16 00 01 movb $0x1,0x16e980 mkdir("/etc", 0777); 12bc73: 83 ec 08 sub $0x8,%esp 12bc76: 68 ff 01 00 00 push $0x1ff 12bc7b: 68 75 89 15 00 push $0x158975 12bc80: e8 13 19 fe ff call 10d598 /* * Initialize /etc/passwd */ if ((fp = fopen("/etc/passwd", "r")) != NULL) { 12bc85: 59 pop %ecx 12bc86: 5b pop %ebx 12bc87: 68 4d bc 15 00 push $0x15bc4d 12bc8c: 68 8b 89 15 00 push $0x15898b 12bc91: e8 b6 71 01 00 call 142e4c 12bc96: 83 c4 10 add $0x10,%esp 12bc99: 85 c0 test %eax,%eax 12bc9b: 74 77 je 12bd14 <== NEVER TAKEN fclose(fp); 12bc9d: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12bca0: 50 push %eax <== NOT EXECUTED 12bca1: e8 b6 69 01 00 call 14265c <== NOT EXECUTED 12bca6: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } /* * Initialize /etc/group */ if ((fp = fopen("/etc/group", "r")) != NULL) { 12bca9: 83 ec 08 sub $0x8,%esp 12bcac: 68 4d bc 15 00 push $0x15bc4d 12bcb1: 68 97 89 15 00 push $0x158997 12bcb6: e8 91 71 01 00 call 142e4c 12bcbb: 83 c4 10 add $0x10,%esp 12bcbe: 85 c0 test %eax,%eax 12bcc0: 74 12 je 12bcd4 <== NEVER TAKEN fclose(fp); 12bcc2: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12bcc5: 50 push %eax <== NOT EXECUTED 12bcc6: e8 91 69 01 00 call 14265c <== NOT EXECUTED 12bccb: 83 c4 10 add $0x10,%esp <== NOT EXECUTED fprintf( fp, "root:x:0:root\n" "rtems:x:1:rtems\n" "tty:x:2:tty\n" ); fclose(fp); } } 12bcce: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 12bcd1: c9 leave <== NOT EXECUTED 12bcd2: c3 ret <== NOT EXECUTED 12bcd3: 90 nop <== NOT EXECUTED * Initialize /etc/group */ if ((fp = fopen("/etc/group", "r")) != NULL) { fclose(fp); } else if ((fp = fopen("/etc/group", "w")) != NULL) { 12bcd4: 83 ec 08 sub $0x8,%esp 12bcd7: 68 d0 b7 15 00 push $0x15b7d0 12bcdc: 68 97 89 15 00 push $0x158997 12bce1: e8 66 71 01 00 call 142e4c 12bce6: 89 c3 mov %eax,%ebx 12bce8: 83 c4 10 add $0x10,%esp 12bceb: 85 c0 test %eax,%eax 12bced: 0f 84 71 ff ff ff je 12bc64 <== ALWAYS TAKEN fprintf( fp, "root:x:0:root\n" 12bcf3: 50 push %eax 12bcf4: 6a 2a push $0x2a 12bcf6: 6a 01 push $0x1 12bcf8: 68 10 fc 15 00 push $0x15fc10 12bcfd: e8 e2 81 01 00 call 143ee4 "rtems:x:1:rtems\n" "tty:x:2:tty\n" ); fclose(fp); 12bd02: 89 1c 24 mov %ebx,(%esp) 12bd05: e8 52 69 01 00 call 14265c 12bd0a: 83 c4 10 add $0x10,%esp 12bd0d: e9 52 ff ff ff jmp 12bc64 <== ALWAYS TAKEN 12bd12: 66 90 xchg %ax,%ax <== NOT EXECUTED * Initialize /etc/passwd */ if ((fp = fopen("/etc/passwd", "r")) != NULL) { fclose(fp); } else if ((fp = fopen("/etc/passwd", "w")) != NULL) { 12bd14: 83 ec 08 sub $0x8,%esp 12bd17: 68 d0 b7 15 00 push $0x15b7d0 12bd1c: 68 8b 89 15 00 push $0x15898b 12bd21: e8 26 71 01 00 call 142e4c 12bd26: 89 c3 mov %eax,%ebx 12bd28: 83 c4 10 add $0x10,%esp 12bd2b: 85 c0 test %eax,%eax 12bd2d: 0f 84 76 ff ff ff je 12bca9 <== ALWAYS TAKEN fprintf(fp, "root:*:0:0:root::/:/bin/sh\n" 12bd33: 50 push %eax 12bd34: 6a 66 push $0x66 12bd36: 6a 01 push $0x1 12bd38: 68 a8 fb 15 00 push $0x15fba8 12bd3d: e8 a2 81 01 00 call 143ee4 "rtems:*:1:1:RTEMS Application::/:/bin/sh\n" "tty:!:2:2:tty owner::/:/bin/false\n" ); fclose(fp); 12bd42: 89 1c 24 mov %ebx,(%esp) 12bd45: e8 12 69 01 00 call 14265c 12bd4a: 83 c4 10 add $0x10,%esp 12bd4d: e9 57 ff ff ff jmp 12bca9 <== ALWAYS TAKEN 0010b6cc : int ioctl( int fd, ioctl_command_t command, ... ) { 10b6cc: 55 push %ebp 10b6cd: 89 e5 mov %esp,%ebp 10b6cf: 83 ec 08 sub $0x8,%esp 10b6d2: 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 ); 10b6d5: 3b 05 0c 8b 12 00 cmp 0x128b0c,%eax 10b6db: 73 2f jae 10b70c iop = rtems_libio_iop( fd ); 10b6dd: c1 e0 06 shl $0x6,%eax 10b6e0: 03 05 20 cd 12 00 add 0x12cd20,%eax rtems_libio_check_is_open(iop); 10b6e6: f6 40 15 01 testb $0x1,0x15(%eax) 10b6ea: 74 20 je 10b70c <== ALWAYS TAKEN va_start(ap, command); buffer = va_arg(ap, void *); 10b6ec: 8b 4d 10 mov 0x10(%ebp),%ecx /* * Now process the ioctl(). */ if ( !iop->handlers ) 10b6ef: 8b 50 3c mov 0x3c(%eax),%edx 10b6f2: 85 d2 test %edx,%edx 10b6f4: 74 16 je 10b70c <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EBADF ); if ( !iop->handlers->ioctl_h ) 10b6f6: 8b 52 10 mov 0x10(%edx),%edx 10b6f9: 85 d2 test %edx,%edx 10b6fb: 74 21 je 10b71e <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); rc = (*iop->handlers->ioctl_h)( iop, command, buffer ); 10b6fd: 83 ec 04 sub $0x4,%esp 10b700: 51 push %ecx 10b701: ff 75 0c pushl 0xc(%ebp) 10b704: 50 push %eax 10b705: ff d2 call *%edx return rc; 10b707: 83 c4 10 add $0x10,%esp } 10b70a: c9 leave 10b70b: c3 ret /* * Now process the ioctl(). */ if ( !iop->handlers ) rtems_set_errno_and_return_minus_one( EBADF ); 10b70c: e8 bb d4 00 00 call 118bcc <__errno> 10b711: c7 00 09 00 00 00 movl $0x9,(%eax) 10b717: b8 ff ff ff ff mov $0xffffffff,%eax rtems_set_errno_and_return_minus_one( ENOTSUP ); rc = (*iop->handlers->ioctl_h)( iop, command, buffer ); return rc; } 10b71c: c9 leave 10b71d: c3 ret if ( !iop->handlers ) rtems_set_errno_and_return_minus_one( EBADF ); if ( !iop->handlers->ioctl_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 10b71e: e8 a9 d4 00 00 call 118bcc <__errno> <== NOT EXECUTED 10b723: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 10b729: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED rc = (*iop->handlers->ioctl_h)( iop, command, buffer ); return rc; } 10b72e: c9 leave <== NOT EXECUTED 10b72f: c3 ret <== NOT EXECUTED 00109930 : /* * Process a single input character */ static int iproc (unsigned char c, struct rtems_termios_tty *tty) { 109930: 55 push %ebp <== NOT EXECUTED 109931: 89 e5 mov %esp,%ebp <== NOT EXECUTED 109933: 56 push %esi <== NOT EXECUTED 109934: 53 push %ebx <== NOT EXECUTED 109935: 89 d6 mov %edx,%esi <== NOT EXECUTED 109937: 88 c3 mov %al,%bl <== NOT EXECUTED if (tty->termios.c_iflag & ISTRIP) 109939: 8b 42 30 mov 0x30(%edx),%eax <== NOT EXECUTED 10993c: a8 20 test $0x20,%al <== NOT EXECUTED 10993e: 74 03 je 109943 <== NOT EXECUTED c &= 0x7f; 109940: 83 e3 7f and $0x7f,%ebx <== NOT EXECUTED if (tty->termios.c_iflag & IUCLC) 109943: f6 c4 02 test $0x2,%ah <== NOT EXECUTED 109946: 74 18 je 109960 <== NOT EXECUTED c = tolower (c); 109948: 0f b6 db movzbl %bl,%ebx <== NOT EXECUTED 10994b: 8b 15 e8 50 12 00 mov 0x1250e8,%edx <== NOT EXECUTED 109951: 0f be 54 1a 01 movsbl 0x1(%edx,%ebx,1),%edx <== NOT EXECUTED 109956: 83 e2 03 and $0x3,%edx <== NOT EXECUTED 109959: 4a dec %edx <== NOT EXECUTED 10995a: 0f 84 98 00 00 00 je 1099f8 <== NOT EXECUTED if (c == '\r') { 109960: 80 fb 0d cmp $0xd,%bl <== NOT EXECUTED 109963: 74 33 je 109998 <== NOT EXECUTED if (tty->termios.c_iflag & IGNCR) return 0; if (tty->termios.c_iflag & ICRNL) c = '\n'; } else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) { 109965: 80 fb 0a cmp $0xa,%bl <== NOT EXECUTED 109968: 0f 84 82 00 00 00 je 1099f0 <== NOT EXECUTED c = '\r'; } if ((c != '\0') && (tty->termios.c_lflag & ICANON)) { 10996e: 84 db test %bl,%bl <== NOT EXECUTED 109970: 75 3a jne 1099ac <== NOT EXECUTED } /* * FIXME: Should do IMAXBEL handling somehow */ if (tty->ccount < (CBUFSIZE-1)) { 109972: 8b 46 20 mov 0x20(%esi),%eax <== NOT EXECUTED 109975: 8b 15 e8 4f 12 00 mov 0x124fe8,%edx <== NOT EXECUTED 10997b: 4a dec %edx <== NOT EXECUTED 10997c: 39 d0 cmp %edx,%eax <== NOT EXECUTED 10997e: 7d 1c jge 10999c <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) 109980: f6 46 3c 08 testb $0x8,0x3c(%esi) <== NOT EXECUTED 109984: 75 7a jne 109a00 <== NOT EXECUTED echo (c, tty); tty->cbuf[tty->ccount++] = c; 109986: 8b 56 1c mov 0x1c(%esi),%edx <== NOT EXECUTED 109989: 88 1c 02 mov %bl,(%edx,%eax,1) <== NOT EXECUTED 10998c: 40 inc %eax <== NOT EXECUTED 10998d: 89 46 20 mov %eax,0x20(%esi) <== NOT EXECUTED 109990: 31 c0 xor %eax,%eax <== NOT EXECUTED } return 0; } 109992: 5b pop %ebx <== NOT EXECUTED 109993: 5e pop %esi <== NOT EXECUTED 109994: c9 leave <== NOT EXECUTED 109995: c3 ret <== NOT EXECUTED 109996: 66 90 xchg %ax,%ax <== NOT EXECUTED if (tty->termios.c_iflag & ISTRIP) c &= 0x7f; if (tty->termios.c_iflag & IUCLC) c = tolower (c); if (c == '\r') { if (tty->termios.c_iflag & IGNCR) 109998: 84 c0 test %al,%al <== NOT EXECUTED 10999a: 79 08 jns 1099a4 <== NOT EXECUTED * FIXME: Should do IMAXBEL handling somehow */ if (tty->ccount < (CBUFSIZE-1)) { if (tty->termios.c_lflag & ECHO) echo (c, tty); tty->cbuf[tty->ccount++] = c; 10999c: 31 c0 xor %eax,%eax <== NOT EXECUTED } return 0; } 10999e: 5b pop %ebx <== NOT EXECUTED 10999f: 5e pop %esi <== NOT EXECUTED 1099a0: c9 leave <== NOT EXECUTED 1099a1: c3 ret <== NOT EXECUTED 1099a2: 66 90 xchg %ax,%ax <== NOT EXECUTED if (tty->termios.c_iflag & IUCLC) c = tolower (c); if (c == '\r') { if (tty->termios.c_iflag & IGNCR) return 0; if (tty->termios.c_iflag & ICRNL) 1099a4: f6 c4 01 test $0x1,%ah <== NOT EXECUTED 1099a7: 74 03 je 1099ac <== NOT EXECUTED 1099a9: b3 0a mov $0xa,%bl <== NOT EXECUTED 1099ab: 90 nop <== NOT EXECUTED c = '\n'; } else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) { c = '\r'; } if ((c != '\0') && (tty->termios.c_lflag & ICANON)) { 1099ac: 8b 46 3c mov 0x3c(%esi),%eax <== NOT EXECUTED 1099af: a8 02 test $0x2,%al <== NOT EXECUTED 1099b1: 74 bf je 109972 <== NOT EXECUTED if (c == tty->termios.c_cc[VERASE]) { 1099b3: 38 5e 43 cmp %bl,0x43(%esi) <== NOT EXECUTED 1099b6: 0f 84 a0 00 00 00 je 109a5c <== NOT EXECUTED erase (tty, 0); return 0; } else if (c == tty->termios.c_cc[VKILL]) { 1099bc: 38 5e 44 cmp %bl,0x44(%esi) <== NOT EXECUTED 1099bf: 74 5f je 109a20 <== NOT EXECUTED erase (tty, 1); return 0; } else if (c == tty->termios.c_cc[VEOF]) { 1099c1: 38 5e 45 cmp %bl,0x45(%esi) <== NOT EXECUTED 1099c4: 74 20 je 1099e6 <== NOT EXECUTED return 1; } else if (c == '\n') { 1099c6: 80 fb 0a cmp $0xa,%bl <== NOT EXECUTED 1099c9: 74 69 je 109a34 <== NOT EXECUTED if (tty->termios.c_lflag & (ECHO | ECHONL)) echo (c, tty); tty->cbuf[tty->ccount++] = c; return 1; } else if ((c == tty->termios.c_cc[VEOL]) 1099cb: 38 5e 4c cmp %bl,0x4c(%esi) <== NOT EXECUTED 1099ce: 74 05 je 1099d5 <== NOT EXECUTED || (c == tty->termios.c_cc[VEOL2])) { 1099d0: 38 5e 51 cmp %bl,0x51(%esi) <== NOT EXECUTED 1099d3: 75 9d jne 109972 <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) 1099d5: a8 08 test $0x8,%al <== NOT EXECUTED 1099d7: 75 3b jne 109a14 <== NOT EXECUTED echo (c, tty); tty->cbuf[tty->ccount++] = c; 1099d9: 8b 46 20 mov 0x20(%esi),%eax <== NOT EXECUTED 1099dc: 8b 56 1c mov 0x1c(%esi),%edx <== NOT EXECUTED 1099df: 88 1c 02 mov %bl,(%edx,%eax,1) <== NOT EXECUTED 1099e2: 40 inc %eax <== NOT EXECUTED 1099e3: 89 46 20 mov %eax,0x20(%esi) <== NOT EXECUTED 1099e6: b8 01 00 00 00 mov $0x1,%eax <== NOT EXECUTED return 1; 1099eb: eb a5 jmp 109992 <== NOT EXECUTED 1099ed: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if (tty->termios.c_iflag & IGNCR) return 0; if (tty->termios.c_iflag & ICRNL) c = '\n'; } else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) { 1099f0: a8 40 test $0x40,%al <== NOT EXECUTED 1099f2: 74 b8 je 1099ac <== NOT EXECUTED 1099f4: b3 0d mov $0xd,%bl <== NOT EXECUTED 1099f6: eb b4 jmp 1099ac <== NOT EXECUTED iproc (unsigned char c, struct rtems_termios_tty *tty) { if (tty->termios.c_iflag & ISTRIP) c &= 0x7f; if (tty->termios.c_iflag & IUCLC) c = tolower (c); 1099f8: 83 c3 20 add $0x20,%ebx <== NOT EXECUTED 1099fb: e9 60 ff ff ff jmp 109960 <== NOT EXECUTED /* * FIXME: Should do IMAXBEL handling somehow */ if (tty->ccount < (CBUFSIZE-1)) { if (tty->termios.c_lflag & ECHO) echo (c, tty); 109a00: 0f b6 c3 movzbl %bl,%eax <== NOT EXECUTED 109a03: 89 f2 mov %esi,%edx <== NOT EXECUTED 109a05: e8 f6 fc ff ff call 109700 <== NOT EXECUTED 109a0a: 8b 46 20 mov 0x20(%esi),%eax <== NOT EXECUTED 109a0d: e9 74 ff ff ff jmp 109986 <== NOT EXECUTED 109a12: 66 90 xchg %ax,%ax <== NOT EXECUTED return 1; } else if ((c == tty->termios.c_cc[VEOL]) || (c == tty->termios.c_cc[VEOL2])) { if (tty->termios.c_lflag & ECHO) echo (c, tty); 109a14: 0f b6 c3 movzbl %bl,%eax <== NOT EXECUTED 109a17: 89 f2 mov %esi,%edx <== NOT EXECUTED 109a19: e8 e2 fc ff ff call 109700 <== NOT EXECUTED 109a1e: eb b9 jmp 1099d9 <== NOT EXECUTED if (c == tty->termios.c_cc[VERASE]) { erase (tty, 0); return 0; } else if (c == tty->termios.c_cc[VKILL]) { erase (tty, 1); 109a20: ba 01 00 00 00 mov $0x1,%edx <== NOT EXECUTED 109a25: 89 f0 mov %esi,%eax <== NOT EXECUTED 109a27: e8 38 fd ff ff call 109764 <== NOT EXECUTED 109a2c: 31 c0 xor %eax,%eax <== NOT EXECUTED return 0; 109a2e: e9 5f ff ff ff jmp 109992 <== NOT EXECUTED 109a33: 90 nop <== NOT EXECUTED } else if (c == tty->termios.c_cc[VEOF]) { return 1; } else if (c == '\n') { if (tty->termios.c_lflag & (ECHO | ECHONL)) 109a34: a8 48 test $0x48,%al <== NOT EXECUTED 109a36: 74 0c je 109a44 <== NOT EXECUTED echo (c, tty); 109a38: 89 f2 mov %esi,%edx <== NOT EXECUTED 109a3a: b8 0a 00 00 00 mov $0xa,%eax <== NOT EXECUTED 109a3f: e8 bc fc ff ff call 109700 <== NOT EXECUTED tty->cbuf[tty->ccount++] = c; 109a44: 8b 46 20 mov 0x20(%esi),%eax <== NOT EXECUTED 109a47: 8b 56 1c mov 0x1c(%esi),%edx <== NOT EXECUTED 109a4a: c6 04 02 0a movb $0xa,(%edx,%eax,1) <== NOT EXECUTED 109a4e: 40 inc %eax <== NOT EXECUTED 109a4f: 89 46 20 mov %eax,0x20(%esi) <== NOT EXECUTED 109a52: b8 01 00 00 00 mov $0x1,%eax <== NOT EXECUTED return 1; 109a57: e9 36 ff ff ff jmp 109992 <== NOT EXECUTED else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) { c = '\r'; } if ((c != '\0') && (tty->termios.c_lflag & ICANON)) { if (c == tty->termios.c_cc[VERASE]) { erase (tty, 0); 109a5c: 31 d2 xor %edx,%edx <== NOT EXECUTED 109a5e: 89 f0 mov %esi,%eax <== NOT EXECUTED 109a60: e8 ff fc ff ff call 109764 <== NOT EXECUTED 109a65: 31 c0 xor %eax,%eax <== NOT EXECUTED return 0; 109a67: e9 26 ff ff ff jmp 109992 <== NOT EXECUTED 0011329c : int killinfo( pid_t pid, int sig, const union sigval *value ) { 11329c: 55 push %ebp 11329d: 89 e5 mov %esp,%ebp 11329f: 57 push %edi 1132a0: 56 push %esi 1132a1: 53 push %ebx 1132a2: 83 ec 3c sub $0x3c,%esp 1132a5: 8b 75 0c mov 0xc(%ebp),%esi 1132a8: 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() ) 1132ab: e8 70 f0 ff ff call 112320 1132b0: 3b 45 08 cmp 0x8(%ebp),%eax 1132b3: 0f 85 2f 02 00 00 jne 1134e8 rtems_set_errno_and_return_minus_one( ESRCH ); /* * Validate the signal passed. */ if ( !sig ) 1132b9: 85 f6 test %esi,%esi 1132bb: 0f 84 3c 02 00 00 je 1134fd static inline bool is_valid_signo( int signo ) { return ((signo) >= 1 && (signo) <= 32 ); 1132c1: 8d 4e ff lea -0x1(%esi),%ecx rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) ) 1132c4: 83 f9 1f cmp $0x1f,%ecx 1132c7: 0f 87 30 02 00 00 ja 1134fd 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 ) 1132cd: 8d 04 76 lea (%esi,%esi,2),%eax 1132d0: 83 3c 85 c8 79 12 00 cmpl $0x1,0x1279c8(,%eax,4) 1132d7: 01 1132d8: 0f 84 cf 00 00 00 je 1133ad /* * 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 ) ) 1132de: 83 fe 08 cmp $0x8,%esi 1132e1: 0f 84 d1 00 00 00 je 1133b8 1132e7: 83 fe 04 cmp $0x4,%esi 1132ea: 0f 84 c8 00 00 00 je 1133b8 1132f0: 83 fe 0b cmp $0xb,%esi 1132f3: 0f 84 bf 00 00 00 je 1133b8 static inline sigset_t signo_to_mask( uint32_t sig ) { return 1u << (sig - 1); 1132f9: bb 01 00 00 00 mov $0x1,%ebx 1132fe: d3 e3 shl %cl,%ebx /* * Build up a siginfo structure */ siginfo = &siginfo_struct; siginfo->si_signo = sig; 113300: 89 75 dc mov %esi,-0x24(%ebp) siginfo->si_code = SI_USER; 113303: c7 45 e0 01 00 00 00 movl $0x1,-0x20(%ebp) if ( !value ) { 11330a: 85 ff test %edi,%edi 11330c: 0f 84 ca 01 00 00 je 1134dc siginfo->si_value.sival_int = 0; } else { siginfo->si_value = *value; 113312: 8b 07 mov (%edi),%eax 113314: 89 45 e4 mov %eax,-0x1c(%ebp) 113317: a1 d8 73 12 00 mov 0x1273d8,%eax 11331c: 40 inc %eax 11331d: a3 d8 73 12 00 mov %eax,0x1273d8 /* * 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; 113322: 8b 0d 98 74 12 00 mov 0x127498,%ecx api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 113328: 8b 81 f8 00 00 00 mov 0xf8(%ecx),%eax 11332e: 8b 80 c4 00 00 00 mov 0xc4(%eax),%eax 113334: f7 d0 not %eax 113336: 85 c3 test %eax,%ebx 113338: 75 34 jne 11336e /* XXX violation of visibility -- need to define thread queue support */ the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo; for ( the_node = the_chain->first ; 11333a: a1 60 7b 12 00 mov 0x127b60,%eax 11333f: 3d 64 7b 12 00 cmp $0x127b64,%eax 113344: 75 1b jne 113361 113346: e9 89 00 00 00 jmp 1133d4 <== ALWAYS TAKEN 11334b: 90 nop <== NOT EXECUTED /* * Is this thread is blocked waiting for another signal but has * not blocked this one? */ if (~api->signals_blocked & mask) 11334c: 8b 92 c4 00 00 00 mov 0xc4(%edx),%edx 113352: f7 d2 not %edx 113354: 85 d3 test %edx,%ebx 113356: 75 16 jne 11336e 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 ) { 113358: 8b 00 mov (%eax),%eax /* XXX violation of visibility -- need to define thread queue support */ the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo; for ( the_node = the_chain->first ; 11335a: 3d 64 7b 12 00 cmp $0x127b64,%eax 11335f: 74 73 je 1133d4 <== NEVER TAKEN !_Chain_Is_tail( the_chain, the_node ) ; the_node = the_node->next ) { the_thread = (Thread_Control *)the_node; 113361: 89 c1 mov %eax,%ecx api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 113363: 8b 90 f8 00 00 00 mov 0xf8(%eax),%edx #endif /* * Is this thread is actually blocked waiting for the signal? */ if (the_thread->Wait.option & mask) 113369: 85 58 30 test %ebx,0x30(%eax) 11336c: 74 de je 11334c * 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; 11336e: c6 41 74 01 movb $0x1,0x74(%ecx) /* * 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 ) ) { 113372: 50 push %eax 113373: 8d 45 dc lea -0x24(%ebp),%eax 113376: 50 push %eax 113377: 56 push %esi 113378: 51 push %ecx 113379: e8 1e 02 00 00 call 11359c <_POSIX_signals_Unblock_thread> <== ALWAYS TAKEN 11337e: 83 c4 10 add $0x10,%esp 113381: 84 c0 test %al,%al 113383: 0f 85 47 01 00 00 jne 1134d0 /* * 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 ); 113389: 83 ec 0c sub $0xc,%esp 11338c: 53 push %ebx 11338d: e8 e6 01 00 00 call 113578 <_POSIX_signals_Set_process_signals> <== ALWAYS TAKEN if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) { 113392: 8d 1c 76 lea (%esi,%esi,2),%ebx 113395: c1 e3 02 shl $0x2,%ebx 113398: 83 c4 10 add $0x10,%esp 11339b: 83 bb c0 79 12 00 02 cmpl $0x2,0x1279c0(%ebx) 1133a2: 0f 84 ec 00 00 00 je 113494 _Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node ); } DEBUG_STEP("\n"); _Thread_Enable_dispatch(); 1133a8: e8 07 a1 ff ff call 10d4b4 <_Thread_Enable_dispatch> 1133ad: 31 c0 xor %eax,%eax return 0; } 1133af: 8d 65 f4 lea -0xc(%ebp),%esp 1133b2: 5b pop %ebx 1133b3: 5e pop %esi 1133b4: 5f pop %edi 1133b5: c9 leave 1133b6: c3 ret 1133b7: 90 nop <== NOT EXECUTED * 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 ) ) return pthread_kill( pthread_self(), sig ); 1133b8: e8 c3 03 00 00 call 113780 1133bd: 83 ec 08 sub $0x8,%esp 1133c0: 56 push %esi 1133c1: 50 push %eax 1133c2: e8 f1 02 00 00 call 1136b8 1133c7: 83 c4 10 add $0x10,%esp } DEBUG_STEP("\n"); _Thread_Enable_dispatch(); return 0; } 1133ca: 8d 65 f4 lea -0xc(%ebp),%esp 1133cd: 5b pop %ebx 1133ce: 5e pop %esi 1133cf: 5f pop %edi 1133d0: c9 leave 1133d1: c3 ret 1133d2: 66 90 xchg %ax,%ax <== NOT EXECUTED * NOTES: * * + rtems internal threads do not receive signals. */ interested = NULL; interested_priority = PRIORITY_MAXIMUM + 1; 1133d4: 0f b6 05 14 32 12 00 movzbl 0x123214,%eax 1133db: 40 inc %eax 1133dc: 89 45 d4 mov %eax,-0x2c(%ebp) 1133df: c7 45 c8 00 00 00 00 movl $0x0,-0x38(%ebp) 1133e6: c7 45 d0 02 00 00 00 movl $0x2,-0x30(%ebp) 1133ed: 89 5d cc mov %ebx,-0x34(%ebp) 1133f0: 89 75 c0 mov %esi,-0x40(%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 ] ) 1133f3: 8b 55 d0 mov -0x30(%ebp),%edx 1133f6: 8b 04 95 ac 73 12 00 mov 0x1273ac(,%edx,4),%eax 1133fd: 85 c0 test %eax,%eax 1133ff: 74 6c je 11346d continue; the_info = _Objects_Information_table[ the_api ][ 1 ]; 113401: 8b 40 04 mov 0x4(%eax),%eax */ if ( !the_info ) continue; #endif maximum = the_info->maximum; 113404: 0f b7 70 10 movzwl 0x10(%eax),%esi object_table = the_info->local_table; 113408: 8b 78 1c mov 0x1c(%eax),%edi for ( index = 1 ; index <= maximum ; index++ ) { 11340b: 85 f6 test %esi,%esi 11340d: 74 5e je 11346d 11340f: b8 01 00 00 00 mov $0x1,%eax the_thread = (Thread_Control *) object_table[ index ]; 113414: 8b 14 87 mov (%edi,%eax,4),%edx if ( !the_thread ) 113417: 85 d2 test %edx,%edx 113419: 74 4d je 113468 /* * If this thread is of lower priority than the interested thread, * go on to the next thread. */ if ( the_thread->current_priority > interested_priority ) 11341b: 8b 4a 14 mov 0x14(%edx),%ecx 11341e: 3b 4d d4 cmp -0x2c(%ebp),%ecx 113421: 77 45 ja 113468 DEBUG_STEP("2"); /* * If this thread is not interested, then go on to the next thread. */ api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 113423: 8b 9a f8 00 00 00 mov 0xf8(%edx),%ebx 113429: 8b 9b c4 00 00 00 mov 0xc4(%ebx),%ebx 11342f: f7 d3 not %ebx 113431: 85 5d cc test %ebx,-0x34(%ebp) 113434: 74 32 je 113468 * * 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 ) { 113436: 3b 4d d4 cmp -0x2c(%ebp),%ecx 113439: 72 25 jb 113460 * and blocking interruptibutable by signal. * * If the interested thread is ready, don't think about changing. */ if ( !_States_Is_ready( interested->current_state ) ) { 11343b: 8b 5d c8 mov -0x38(%ebp),%ebx 11343e: 8b 5b 10 mov 0x10(%ebx),%ebx 113441: 89 5d c4 mov %ebx,-0x3c(%ebp) 113444: 85 db test %ebx,%ebx 113446: 74 20 je 113468 <== ALWAYS TAKEN /* preferred ready over blocked */ DEBUG_STEP("5"); if ( _States_Is_ready( the_thread->current_state ) ) { 113448: 8b 5a 10 mov 0x10(%edx),%ebx 11344b: 85 db test %ebx,%ebx 11344d: 74 11 je 113460 continue; } DEBUG_STEP("6"); /* prefer blocked/interruptible over blocked/not interruptible */ if ( !_States_Is_interruptible_by_signal(interested->current_state) ) { 11344f: f7 45 c4 00 00 00 10 testl $0x10000000,-0x3c(%ebp) 113456: 75 10 jne 113468 DEBUG_STEP("7"); if ( _States_Is_interruptible_by_signal(the_thread->current_state) ) { 113458: 81 e3 00 00 00 10 and $0x10000000,%ebx 11345e: 74 08 je 113468 113460: 89 4d d4 mov %ecx,-0x2c(%ebp) 113463: 89 55 c8 mov %edx,-0x38(%ebp) 113466: 66 90 xchg %ax,%ax #endif maximum = the_info->maximum; object_table = the_info->local_table; for ( index = 1 ; index <= maximum ; index++ ) { 113468: 40 inc %eax 113469: 39 c6 cmp %eax,%esi 11346b: 73 a7 jae 113414 * + 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++) { 11346d: ff 45 d0 incl -0x30(%ebp) 113470: 83 7d d0 05 cmpl $0x5,-0x30(%ebp) 113474: 0f 85 79 ff ff ff jne 1133f3 11347a: 8b 5d cc mov -0x34(%ebp),%ebx 11347d: 8b 75 c0 mov -0x40(%ebp),%esi } } } } if ( interested ) { 113480: 8b 55 c8 mov -0x38(%ebp),%edx 113483: 85 d2 test %edx,%edx 113485: 0f 84 fe fe ff ff je 113389 11348b: 8b 4d c8 mov -0x38(%ebp),%ecx 11348e: e9 db fe ff ff jmp 11336e <== ALWAYS TAKEN 113493: 90 nop <== NOT EXECUTED */ _POSIX_signals_Set_process_signals( mask ); if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) { psiginfo = (POSIX_signals_Siginfo_node *) 113494: 83 ec 0c sub $0xc,%esp 113497: 68 40 7b 12 00 push $0x127b40 11349c: e8 fb 89 ff ff call 10be9c <_Chain_Get> _Chain_Get( &_POSIX_signals_Inactive_siginfo ); if ( !psiginfo ) { 1134a1: 83 c4 10 add $0x10,%esp 1134a4: 85 c0 test %eax,%eax 1134a6: 74 6a je 113512 _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EAGAIN ); } psiginfo->Info = *siginfo; 1134a8: 8d 78 08 lea 0x8(%eax),%edi 1134ab: 8d 75 dc lea -0x24(%ebp),%esi 1134ae: b9 03 00 00 00 mov $0x3,%ecx 1134b3: f3 a5 rep movsl %ds:(%esi),%es:(%edi) _Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node ); 1134b5: 83 ec 08 sub $0x8,%esp 1134b8: 50 push %eax 1134b9: 81 c3 c0 7b 12 00 add $0x127bc0,%ebx 1134bf: 53 push %ebx 1134c0: e8 b3 89 ff ff call 10be78 <_Chain_Append> 1134c5: 83 c4 10 add $0x10,%esp 1134c8: e9 db fe ff ff jmp 1133a8 <== ALWAYS TAKEN 1134cd: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED /* * 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 ) ) { _Thread_Enable_dispatch(); 1134d0: e8 df 9f ff ff call 10d4b4 <_Thread_Enable_dispatch> 1134d5: 31 c0 xor %eax,%eax return 0; 1134d7: e9 ee fe ff ff jmp 1133ca <== ALWAYS TAKEN */ siginfo = &siginfo_struct; siginfo->si_signo = sig; siginfo->si_code = SI_USER; if ( !value ) { siginfo->si_value.sival_int = 0; 1134dc: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) 1134e3: e9 2f fe ff ff jmp 113317 <== ALWAYS TAKEN /* * Only supported for the "calling process" (i.e. this node). */ if ( pid != getpid() ) rtems_set_errno_and_return_minus_one( ESRCH ); 1134e8: e8 23 03 00 00 call 113810 <__errno> 1134ed: c7 00 03 00 00 00 movl $0x3,(%eax) 1134f3: b8 ff ff ff ff mov $0xffffffff,%eax 1134f8: e9 cd fe ff ff jmp 1133ca <== ALWAYS TAKEN */ if ( !sig ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) ) rtems_set_errno_and_return_minus_one( EINVAL ); 1134fd: e8 0e 03 00 00 call 113810 <__errno> 113502: c7 00 16 00 00 00 movl $0x16,(%eax) 113508: b8 ff ff ff ff mov $0xffffffff,%eax 11350d: e9 b8 fe ff ff jmp 1133ca <== ALWAYS TAKEN if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) { psiginfo = (POSIX_signals_Siginfo_node *) _Chain_Get( &_POSIX_signals_Inactive_siginfo ); if ( !psiginfo ) { _Thread_Enable_dispatch(); 113512: e8 9d 9f ff ff call 10d4b4 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EAGAIN ); 113517: e8 f4 02 00 00 call 113810 <__errno> 11351c: c7 00 0b 00 00 00 movl $0xb,(%eax) 113522: 83 c8 ff or $0xffffffff,%eax 113525: e9 a0 fe ff ff jmp 1133ca <== ALWAYS TAKEN 0011ec08 : extern void _wrapup_reent(struct _reent *); extern void _reclaim_reent(struct _reent *); void libc_wrapup(void) { 11ec08: 55 push %ebp 11ec09: 89 e5 mov %esp,%ebp 11ec0b: 53 push %ebx 11ec0c: 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())) 11ec0f: 83 3d a0 75 12 00 03 cmpl $0x3,0x1275a0 11ec16: 74 08 je 11ec20 */ fclose (stdin); fclose (stdout); fclose (stderr); } 11ec18: 8b 5d fc mov -0x4(%ebp),%ebx 11ec1b: c9 leave 11ec1c: c3 ret 11ec1d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED /* * This was already done if the user called exit() directly . _wrapup_reent(0); */ if (_REENT != _global_impure_ptr) { 11ec20: 8b 1d 40 19 12 00 mov 0x121940,%ebx 11ec26: 39 1d 00 51 12 00 cmp %ebx,0x125100 11ec2c: 74 12 je 11ec40 _wrapup_reent(_global_impure_ptr); 11ec2e: 83 ec 0c sub $0xc,%esp 11ec31: 53 push %ebx 11ec32: e8 f5 04 00 00 call 11f12c <_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; 11ec37: 89 1d 00 51 12 00 mov %ebx,0x125100 11ec3d: 83 c4 10 add $0x10,%esp * * Should this be changed to do *all* file streams? * _fwalk (_REENT, fclose); */ fclose (stdin); 11ec40: 83 ec 0c sub $0xc,%esp 11ec43: ff 73 04 pushl 0x4(%ebx) 11ec46: e8 11 4d ff ff call 11395c fclose (stdout); 11ec4b: 5a pop %edx 11ec4c: a1 00 51 12 00 mov 0x125100,%eax 11ec51: ff 70 08 pushl 0x8(%eax) 11ec54: e8 03 4d ff ff call 11395c fclose (stderr); 11ec59: 58 pop %eax 11ec5a: a1 00 51 12 00 mov 0x125100,%eax 11ec5f: ff 70 0c pushl 0xc(%eax) 11ec62: e8 f5 4c ff ff call 11395c 11ec67: 83 c4 10 add $0x10,%esp } 11ec6a: 8b 5d fc mov -0x4(%ebp),%ebx 11ec6d: c9 leave 11ec6e: c3 ret 0012c150 : int link( const char *existing, const char *new ) { 12c150: 55 push %ebp 12c151: 89 e5 mov %esp,%ebp 12c153: 57 push %edi 12c154: 56 push %esi 12c155: 53 push %ebx 12c156: 83 ec 48 sub $0x48,%esp 12c159: 8b 55 08 mov 0x8(%ebp),%edx /* * Get the node we are linking to. */ result = rtems_filesystem_evaluate_path( existing, strlen( existing ), 12c15c: 31 c0 xor %eax,%eax 12c15e: b9 ff ff ff ff mov $0xffffffff,%ecx 12c163: 89 d7 mov %edx,%edi 12c165: f2 ae repnz scas %es:(%edi),%al 12c167: f7 d1 not %ecx 12c169: 49 dec %ecx 12c16a: 6a 01 push $0x1 12c16c: 8d 45 d0 lea -0x30(%ebp),%eax 12c16f: 50 push %eax 12c170: 6a 00 push $0x0 12c172: 51 push %ecx 12c173: 52 push %edx 12c174: e8 c7 0c fe ff call 10ce40 <== ALWAYS TAKEN 0, &existing_loc, true ); if ( result != 0 ) 12c179: 83 c4 20 add $0x20,%esp 12c17c: 85 c0 test %eax,%eax 12c17e: 0f 85 e0 00 00 00 jne 12c264 /* * Get the parent of the node we are creating. */ rtems_filesystem_get_start_loc( new, &i, &parent_loc ); 12c184: 8b 55 0c mov 0xc(%ebp),%edx 12c187: 8a 02 mov (%edx),%al 12c189: 3c 2f cmp $0x2f,%al 12c18b: 74 0c je 12c199 12c18d: 3c 5c cmp $0x5c,%al 12c18f: 74 08 je 12c199 <== ALWAYS TAKEN 12c191: 84 c0 test %al,%al 12c193: 0f 85 db 00 00 00 jne 12c274 <== NEVER TAKEN 12c199: 8d 5d bc lea -0x44(%ebp),%ebx 12c19c: 8b 35 c4 93 16 00 mov 0x1693c4,%esi 12c1a2: 83 c6 18 add $0x18,%esi 12c1a5: b9 05 00 00 00 mov $0x5,%ecx 12c1aa: 89 df mov %ebx,%edi 12c1ac: f3 a5 rep movsl %ds:(%esi),%es:(%edi) 12c1ae: ba 01 00 00 00 mov $0x1,%edx if ( !parent_loc.ops->evalformake_h ) { 12c1b3: 8b 45 c8 mov -0x38(%ebp),%eax 12c1b6: 8b 40 04 mov 0x4(%eax),%eax 12c1b9: 85 c0 test %eax,%eax 12c1bb: 74 7f je 12c23c <== ALWAYS TAKEN rtems_filesystem_freenode( &existing_loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*parent_loc.ops->evalformake_h)( &new[i], &parent_loc, &name_start ); 12c1bd: 51 push %ecx 12c1be: 8d 4d e4 lea -0x1c(%ebp),%ecx 12c1c1: 51 push %ecx 12c1c2: 53 push %ebx 12c1c3: 03 55 0c add 0xc(%ebp),%edx 12c1c6: 52 push %edx 12c1c7: ff d0 call *%eax 12c1c9: 89 c6 mov %eax,%esi if ( result != 0 ) { 12c1cb: 83 c4 10 add $0x10,%esp 12c1ce: 85 c0 test %eax,%eax 12c1d0: 0f 85 06 01 00 00 jne 12c2dc /* * Check to see if the caller is trying to link across file system * boundaries. */ if ( parent_loc.mt_entry != existing_loc.mt_entry ) { 12c1d6: 8b 45 cc mov -0x34(%ebp),%eax 12c1d9: 3b 45 e0 cmp -0x20(%ebp),%eax 12c1dc: 0f 85 ae 00 00 00 jne 12c290 rtems_filesystem_freenode( &existing_loc ); rtems_filesystem_freenode( &parent_loc ); rtems_set_errno_and_return_minus_one( EXDEV ); } if ( !parent_loc.ops->link_h ) { 12c1e2: 8b 55 c8 mov -0x38(%ebp),%edx 12c1e5: 8b 42 08 mov 0x8(%edx),%eax 12c1e8: 85 c0 test %eax,%eax 12c1ea: 0f 84 17 01 00 00 je 12c307 <== ALWAYS TAKEN rtems_filesystem_freenode( &existing_loc ); rtems_filesystem_freenode( &parent_loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*parent_loc.ops->link_h)( &existing_loc, &parent_loc, name_start ); 12c1f0: 52 push %edx 12c1f1: ff 75 e4 pushl -0x1c(%ebp) 12c1f4: 53 push %ebx 12c1f5: 8d 55 d0 lea -0x30(%ebp),%edx 12c1f8: 52 push %edx 12c1f9: ff d0 call *%eax 12c1fb: 89 c6 mov %eax,%esi rtems_filesystem_freenode( &existing_loc ); 12c1fd: 8b 45 dc mov -0x24(%ebp),%eax 12c200: 83 c4 10 add $0x10,%esp 12c203: 85 c0 test %eax,%eax 12c205: 74 13 je 12c21a <== ALWAYS TAKEN 12c207: 8b 40 1c mov 0x1c(%eax),%eax 12c20a: 85 c0 test %eax,%eax 12c20c: 74 0c je 12c21a <== ALWAYS TAKEN 12c20e: 83 ec 0c sub $0xc,%esp 12c211: 8d 55 d0 lea -0x30(%ebp),%edx 12c214: 52 push %edx 12c215: ff d0 call *%eax 12c217: 83 c4 10 add $0x10,%esp rtems_filesystem_freenode( &parent_loc ); 12c21a: 8b 45 c8 mov -0x38(%ebp),%eax 12c21d: 85 c0 test %eax,%eax 12c21f: 74 10 je 12c231 <== ALWAYS TAKEN 12c221: 8b 40 1c mov 0x1c(%eax),%eax 12c224: 85 c0 test %eax,%eax 12c226: 74 09 je 12c231 <== ALWAYS TAKEN 12c228: 83 ec 0c sub $0xc,%esp 12c22b: 53 push %ebx 12c22c: ff d0 call *%eax 12c22e: 83 c4 10 add $0x10,%esp return result; } 12c231: 89 f0 mov %esi,%eax 12c233: 8d 65 f4 lea -0xc(%ebp),%esp 12c236: 5b pop %ebx 12c237: 5e pop %esi 12c238: 5f pop %edi 12c239: c9 leave 12c23a: c3 ret 12c23b: 90 nop <== NOT EXECUTED */ rtems_filesystem_get_start_loc( new, &i, &parent_loc ); if ( !parent_loc.ops->evalformake_h ) { rtems_filesystem_freenode( &existing_loc ); 12c23c: 8b 45 dc mov -0x24(%ebp),%eax <== NOT EXECUTED 12c23f: 85 c0 test %eax,%eax <== NOT EXECUTED 12c241: 74 13 je 12c256 <== NOT EXECUTED 12c243: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 12c246: 85 c0 test %eax,%eax <== NOT EXECUTED 12c248: 74 0c je 12c256 <== NOT EXECUTED 12c24a: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12c24d: 8d 55 d0 lea -0x30(%ebp),%edx <== NOT EXECUTED 12c250: 52 push %edx <== NOT EXECUTED 12c251: ff d0 call *%eax <== NOT EXECUTED 12c253: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 12c256: e8 b5 62 01 00 call 142510 <__errno> <== NOT EXECUTED 12c25b: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 12c261: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 12c264: be ff ff ff ff mov $0xffffffff,%esi rtems_filesystem_freenode( &existing_loc ); rtems_filesystem_freenode( &parent_loc ); return result; } 12c269: 89 f0 mov %esi,%eax 12c26b: 8d 65 f4 lea -0xc(%ebp),%esp 12c26e: 5b pop %ebx 12c26f: 5e pop %esi 12c270: 5f pop %edi 12c271: c9 leave 12c272: c3 ret 12c273: 90 nop <== NOT EXECUTED /* * Get the parent of the node we are creating. */ rtems_filesystem_get_start_loc( new, &i, &parent_loc ); 12c274: 8d 5d bc lea -0x44(%ebp),%ebx 12c277: 8b 35 c4 93 16 00 mov 0x1693c4,%esi 12c27d: 83 c6 04 add $0x4,%esi 12c280: b9 05 00 00 00 mov $0x5,%ecx 12c285: 89 df mov %ebx,%edi 12c287: f3 a5 rep movsl %ds:(%esi),%es:(%edi) 12c289: 31 d2 xor %edx,%edx 12c28b: e9 23 ff ff ff jmp 12c1b3 <== 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 ) { rtems_filesystem_freenode( &existing_loc ); 12c290: 8b 45 dc mov -0x24(%ebp),%eax 12c293: 85 c0 test %eax,%eax 12c295: 74 13 je 12c2aa <== ALWAYS TAKEN 12c297: 8b 40 1c mov 0x1c(%eax),%eax 12c29a: 85 c0 test %eax,%eax 12c29c: 74 0c je 12c2aa <== ALWAYS TAKEN 12c29e: 83 ec 0c sub $0xc,%esp 12c2a1: 8d 55 d0 lea -0x30(%ebp),%edx 12c2a4: 52 push %edx 12c2a5: ff d0 call *%eax 12c2a7: 83 c4 10 add $0x10,%esp rtems_filesystem_freenode( &parent_loc ); 12c2aa: 8b 45 c8 mov -0x38(%ebp),%eax 12c2ad: 85 c0 test %eax,%eax 12c2af: 74 10 je 12c2c1 <== ALWAYS TAKEN 12c2b1: 8b 40 1c mov 0x1c(%eax),%eax 12c2b4: 85 c0 test %eax,%eax 12c2b6: 74 09 je 12c2c1 <== ALWAYS TAKEN 12c2b8: 83 ec 0c sub $0xc,%esp 12c2bb: 53 push %ebx 12c2bc: ff d0 call *%eax 12c2be: 83 c4 10 add $0x10,%esp rtems_set_errno_and_return_minus_one( EXDEV ); 12c2c1: e8 4a 62 01 00 call 142510 <__errno> 12c2c6: c7 00 12 00 00 00 movl $0x12,(%eax) 12c2cc: be ff ff ff ff mov $0xffffffff,%esi rtems_filesystem_freenode( &existing_loc ); rtems_filesystem_freenode( &parent_loc ); return result; } 12c2d1: 89 f0 mov %esi,%eax 12c2d3: 8d 65 f4 lea -0xc(%ebp),%esp 12c2d6: 5b pop %ebx 12c2d7: 5e pop %esi 12c2d8: 5f pop %edi 12c2d9: c9 leave 12c2da: c3 ret 12c2db: 90 nop <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*parent_loc.ops->evalformake_h)( &new[i], &parent_loc, &name_start ); if ( result != 0 ) { rtems_filesystem_freenode( &existing_loc ); 12c2dc: 8b 45 dc mov -0x24(%ebp),%eax 12c2df: 85 c0 test %eax,%eax 12c2e1: 74 13 je 12c2f6 <== ALWAYS TAKEN 12c2e3: 8b 40 1c mov 0x1c(%eax),%eax 12c2e6: 85 c0 test %eax,%eax 12c2e8: 74 0c je 12c2f6 <== ALWAYS TAKEN 12c2ea: 83 ec 0c sub $0xc,%esp 12c2ed: 8d 55 d0 lea -0x30(%ebp),%edx 12c2f0: 52 push %edx 12c2f1: ff d0 call *%eax 12c2f3: 83 c4 10 add $0x10,%esp rtems_set_errno_and_return_minus_one( result ); 12c2f6: e8 15 62 01 00 call 142510 <__errno> 12c2fb: 89 30 mov %esi,(%eax) 12c2fd: be ff ff ff ff mov $0xffffffff,%esi 12c302: e9 2a ff ff ff jmp 12c231 <== ALWAYS TAKEN rtems_filesystem_freenode( &parent_loc ); rtems_set_errno_and_return_minus_one( EXDEV ); } if ( !parent_loc.ops->link_h ) { rtems_filesystem_freenode( &existing_loc ); 12c307: 8b 45 dc mov -0x24(%ebp),%eax <== NOT EXECUTED 12c30a: 85 c0 test %eax,%eax <== NOT EXECUTED 12c30c: 74 16 je 12c324 <== NOT EXECUTED 12c30e: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 12c311: 85 c0 test %eax,%eax <== NOT EXECUTED 12c313: 74 0f je 12c324 <== NOT EXECUTED 12c315: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12c318: 8d 55 d0 lea -0x30(%ebp),%edx <== NOT EXECUTED 12c31b: 52 push %edx <== NOT EXECUTED 12c31c: ff d0 call *%eax <== NOT EXECUTED 12c31e: 8b 55 c8 mov -0x38(%ebp),%edx <== NOT EXECUTED 12c321: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_filesystem_freenode( &parent_loc ); 12c324: 85 d2 test %edx,%edx <== NOT EXECUTED 12c326: 74 10 je 12c338 <== NOT EXECUTED 12c328: 8b 42 1c mov 0x1c(%edx),%eax <== NOT EXECUTED 12c32b: 85 c0 test %eax,%eax <== NOT EXECUTED 12c32d: 74 09 je 12c338 <== NOT EXECUTED 12c32f: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12c332: 53 push %ebx <== NOT EXECUTED 12c333: ff d0 call *%eax <== NOT EXECUTED 12c335: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 12c338: e8 d3 61 01 00 call 142510 <__errno> <== NOT EXECUTED 12c33d: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 12c343: be ff ff ff ff mov $0xffffffff,%esi <== NOT EXECUTED 12c348: e9 e4 fe ff ff jmp 12c231 <== NOT EXECUTED 0011ead0 : off_t lseek( int fd, off_t offset, int whence ) { 11ead0: 55 push %ebp 11ead1: 89 e5 mov %esp,%ebp 11ead3: 57 push %edi 11ead4: 56 push %esi 11ead5: 53 push %ebx 11ead6: 83 ec 2c sub $0x2c,%esp 11ead9: 8b 5d 08 mov 0x8(%ebp),%ebx 11eadc: 8b 55 0c mov 0xc(%ebp),%edx 11eadf: 8b 45 10 mov 0x10(%ebp),%eax rtems_libio_t *iop; off_t old_offset; off_t status; rtems_libio_check_fd( fd ); 11eae2: 3b 1d 4c 31 12 00 cmp 0x12314c,%ebx 11eae8: 0f 83 c2 00 00 00 jae 11ebb0 iop = rtems_libio_iop( fd ); 11eaee: c1 e3 06 shl $0x6,%ebx 11eaf1: 03 1d 40 72 12 00 add 0x127240,%ebx rtems_libio_check_is_open(iop); 11eaf7: f6 43 15 01 testb $0x1,0x15(%ebx) 11eafb: 0f 84 af 00 00 00 je 11ebb0 <== ALWAYS TAKEN /* * Check as many errors as possible before touching iop->offset. */ if ( !iop->handlers->lseek_h ) 11eb01: 8b 4b 3c mov 0x3c(%ebx),%ecx 11eb04: 89 4d d4 mov %ecx,-0x2c(%ebp) 11eb07: 8b 49 14 mov 0x14(%ecx),%ecx 11eb0a: 85 c9 test %ecx,%ecx 11eb0c: 0f 84 b0 00 00 00 je 11ebc2 <== ALWAYS TAKEN /* * Now process the lseek(). */ old_offset = iop->offset; 11eb12: 8b 73 0c mov 0xc(%ebx),%esi 11eb15: 8b 7b 10 mov 0x10(%ebx),%edi 11eb18: 89 75 e0 mov %esi,-0x20(%ebp) 11eb1b: 89 7d e4 mov %edi,-0x1c(%ebp) switch ( whence ) { 11eb1e: 83 f8 01 cmp $0x1,%eax 11eb21: 74 71 je 11eb94 11eb23: 83 f8 02 cmp $0x2,%eax 11eb26: 74 3c je 11eb64 11eb28: 85 c0 test %eax,%eax 11eb2a: 75 50 jne 11eb7c case SEEK_SET: iop->offset = offset; 11eb2c: 89 d6 mov %edx,%esi 11eb2e: 89 d7 mov %edx,%edi 11eb30: c1 ff 1f sar $0x1f,%edi 11eb33: 89 53 0c mov %edx,0xc(%ebx) 11eb36: 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 ); 11eb39: 50 push %eax 11eb3a: 57 push %edi 11eb3b: 56 push %esi 11eb3c: 53 push %ebx 11eb3d: 8b 4d d4 mov -0x2c(%ebp),%ecx 11eb40: ff 51 14 call *0x14(%ecx) if ( status == (off_t) -1 ) 11eb43: 83 c4 10 add $0x10,%esp 11eb46: 83 f8 ff cmp $0xffffffff,%eax 11eb49: 75 0e jne 11eb59 iop->offset = old_offset; 11eb4b: 8b 55 e0 mov -0x20(%ebp),%edx 11eb4e: 89 53 0c mov %edx,0xc(%ebx) 11eb51: 89 d6 mov %edx,%esi 11eb53: c1 fe 1f sar $0x1f,%esi 11eb56: 89 73 10 mov %esi,0x10(%ebx) /* * So if the operation failed, we have to restore iop->offset. */ return status; } 11eb59: 8d 65 f4 lea -0xc(%ebp),%esp 11eb5c: 5b pop %ebx 11eb5d: 5e pop %esi 11eb5e: 5f pop %edi 11eb5f: c9 leave 11eb60: c3 ret 11eb61: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED case SEEK_CUR: iop->offset += offset; break; case SEEK_END: iop->offset = iop->size + offset; 11eb64: 89 d6 mov %edx,%esi 11eb66: 89 d7 mov %edx,%edi 11eb68: c1 ff 1f sar $0x1f,%edi 11eb6b: 89 f9 mov %edi,%ecx 11eb6d: 03 53 04 add 0x4(%ebx),%edx 11eb70: 13 4b 08 adc 0x8(%ebx),%ecx 11eb73: 89 53 0c mov %edx,0xc(%ebx) 11eb76: 89 4b 10 mov %ecx,0x10(%ebx) break; 11eb79: eb be jmp 11eb39 <== ALWAYS TAKEN 11eb7b: 90 nop <== NOT EXECUTED default: rtems_set_errno_and_return_minus_one( EINVAL ); 11eb7c: e8 8f 4c ff ff call 113810 <__errno> 11eb81: c7 00 16 00 00 00 movl $0x16,(%eax) 11eb87: b8 ff ff ff ff mov $0xffffffff,%eax /* * So if the operation failed, we have to restore iop->offset. */ return status; } 11eb8c: 8d 65 f4 lea -0xc(%ebp),%esp 11eb8f: 5b pop %ebx 11eb90: 5e pop %esi 11eb91: 5f pop %edi 11eb92: c9 leave 11eb93: c3 ret case SEEK_SET: iop->offset = offset; break; case SEEK_CUR: iop->offset += offset; 11eb94: 89 d6 mov %edx,%esi 11eb96: 89 d7 mov %edx,%edi 11eb98: c1 ff 1f sar $0x1f,%edi 11eb9b: 8b 55 e0 mov -0x20(%ebp),%edx 11eb9e: 8b 4d e4 mov -0x1c(%ebp),%ecx 11eba1: 01 f2 add %esi,%edx 11eba3: 11 f9 adc %edi,%ecx 11eba5: 89 53 0c mov %edx,0xc(%ebx) 11eba8: 89 4b 10 mov %ecx,0x10(%ebx) break; 11ebab: eb 8c jmp 11eb39 <== ALWAYS TAKEN 11ebad: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED off_t old_offset; off_t status; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); 11ebb0: e8 5b 4c ff ff call 113810 <__errno> 11ebb5: c7 00 09 00 00 00 movl $0x9,(%eax) 11ebbb: b8 ff ff ff ff mov $0xffffffff,%eax 11ebc0: eb 97 jmp 11eb59 <== ALWAYS TAKEN /* * Check as many errors as possible before touching iop->offset. */ if ( !iop->handlers->lseek_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 11ebc2: e8 49 4c ff ff call 113810 <__errno> <== NOT EXECUTED 11ebc7: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 11ebcd: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 11ebd2: eb 85 jmp 11eb59 <== NOT EXECUTED 0012c48c : int _STAT_NAME( const char *path, struct stat *buf ) { 12c48c: 55 push %ebp <== NOT EXECUTED 12c48d: 89 e5 mov %esp,%ebp <== NOT EXECUTED 12c48f: 57 push %edi <== NOT EXECUTED 12c490: 56 push %esi <== NOT EXECUTED 12c491: 53 push %ebx <== NOT EXECUTED 12c492: 83 ec 2c sub $0x2c,%esp <== NOT EXECUTED 12c495: 8b 55 08 mov 0x8(%ebp),%edx <== NOT EXECUTED 12c498: 8b 75 0c mov 0xc(%ebp),%esi <== NOT EXECUTED /* * Check to see if we were passed a valid pointer. */ if ( !buf ) 12c49b: 85 f6 test %esi,%esi <== NOT EXECUTED 12c49d: 0f 84 9d 00 00 00 je 12c540 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EFAULT ); status = rtems_filesystem_evaluate_path( path, strlen( path ), 12c4a3: b9 ff ff ff ff mov $0xffffffff,%ecx <== NOT EXECUTED 12c4a8: 89 d7 mov %edx,%edi <== NOT EXECUTED 12c4aa: 31 c0 xor %eax,%eax <== NOT EXECUTED 12c4ac: f2 ae repnz scas %es:(%edi),%al <== NOT EXECUTED 12c4ae: f7 d1 not %ecx <== NOT EXECUTED 12c4b0: 49 dec %ecx <== NOT EXECUTED 12c4b1: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12c4b4: 6a 00 push $0x0 <== NOT EXECUTED 12c4b6: 8d 5d d4 lea -0x2c(%ebp),%ebx <== NOT EXECUTED 12c4b9: 53 push %ebx <== NOT EXECUTED 12c4ba: 6a 00 push $0x0 <== NOT EXECUTED 12c4bc: 51 push %ecx <== NOT EXECUTED 12c4bd: 52 push %edx <== NOT EXECUTED 12c4be: e8 7d 09 fe ff call 10ce40 <== NOT EXECUTED 0, &loc, _STAT_FOLLOW_LINKS ); if ( status != 0 ) 12c4c3: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 12c4c6: 85 c0 test %eax,%eax <== NOT EXECUTED 12c4c8: 75 66 jne 12c530 <== NOT EXECUTED return -1; if ( !loc.handlers->fstat_h ){ 12c4ca: 8b 55 dc mov -0x24(%ebp),%edx <== NOT EXECUTED 12c4cd: 8b 42 18 mov 0x18(%edx),%eax <== NOT EXECUTED 12c4d0: 85 c0 test %eax,%eax <== NOT EXECUTED 12c4d2: 74 39 je 12c50d <== NOT EXECUTED /* * Zero out the stat structure so the various support * versions of stat don't have to. */ memset( buf, 0, sizeof(struct stat) ); 12c4d4: b9 44 00 00 00 mov $0x44,%ecx <== NOT EXECUTED 12c4d9: 89 f7 mov %esi,%edi <== NOT EXECUTED 12c4db: 31 c0 xor %eax,%eax <== NOT EXECUTED 12c4dd: f3 aa rep stos %al,%es:(%edi) <== NOT EXECUTED status = (*loc.handlers->fstat_h)( &loc, buf ); 12c4df: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 12c4e2: 56 push %esi <== NOT EXECUTED 12c4e3: 53 push %ebx <== NOT EXECUTED 12c4e4: ff 52 18 call *0x18(%edx) <== NOT EXECUTED 12c4e7: 89 c6 mov %eax,%esi <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 12c4e9: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED 12c4ec: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 12c4ef: 85 c0 test %eax,%eax <== NOT EXECUTED 12c4f1: 74 10 je 12c503 <== NOT EXECUTED 12c4f3: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 12c4f6: 85 c0 test %eax,%eax <== NOT EXECUTED 12c4f8: 74 09 je 12c503 <== NOT EXECUTED 12c4fa: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12c4fd: 53 push %ebx <== NOT EXECUTED 12c4fe: ff d0 call *%eax <== NOT EXECUTED 12c500: 83 c4 10 add $0x10,%esp <== NOT EXECUTED return status; } 12c503: 89 f0 mov %esi,%eax <== NOT EXECUTED 12c505: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 12c508: 5b pop %ebx <== NOT EXECUTED 12c509: 5e pop %esi <== NOT EXECUTED 12c50a: 5f pop %edi <== NOT EXECUTED 12c50b: c9 leave <== NOT EXECUTED 12c50c: c3 ret <== NOT EXECUTED 0, &loc, _STAT_FOLLOW_LINKS ); if ( status != 0 ) return -1; if ( !loc.handlers->fstat_h ){ rtems_filesystem_freenode( &loc ); 12c50d: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED 12c510: 85 c0 test %eax,%eax <== NOT EXECUTED 12c512: 74 10 je 12c524 <== NOT EXECUTED 12c514: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 12c517: 85 c0 test %eax,%eax <== NOT EXECUTED 12c519: 74 09 je 12c524 <== NOT EXECUTED 12c51b: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12c51e: 53 push %ebx <== NOT EXECUTED 12c51f: ff d0 call *%eax <== NOT EXECUTED 12c521: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 12c524: e8 e7 5f 01 00 call 142510 <__errno> <== NOT EXECUTED 12c529: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 12c52f: 90 nop <== NOT EXECUTED 12c530: be ff ff ff ff mov $0xffffffff,%esi <== NOT EXECUTED status = (*loc.handlers->fstat_h)( &loc, buf ); rtems_filesystem_freenode( &loc ); return status; } 12c535: 89 f0 mov %esi,%eax <== NOT EXECUTED 12c537: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 12c53a: 5b pop %ebx <== NOT EXECUTED 12c53b: 5e pop %esi <== NOT EXECUTED 12c53c: 5f pop %edi <== NOT EXECUTED 12c53d: c9 leave <== NOT EXECUTED 12c53e: c3 ret <== NOT EXECUTED 12c53f: 90 nop <== NOT EXECUTED /* * Check to see if we were passed a valid pointer. */ if ( !buf ) rtems_set_errno_and_return_minus_one( EFAULT ); 12c540: e8 cb 5f 01 00 call 142510 <__errno> <== NOT EXECUTED 12c545: c7 00 0e 00 00 00 movl $0xe,(%eax) <== NOT EXECUTED 12c54b: be ff ff ff ff mov $0xffffffff,%esi <== NOT EXECUTED status = (*loc.handlers->fstat_h)( &loc, buf ); rtems_filesystem_freenode( &loc ); return status; } 12c550: 89 f0 mov %esi,%eax <== NOT EXECUTED 12c552: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 12c555: 5b pop %ebx <== NOT EXECUTED 12c556: 5e pop %esi <== NOT EXECUTED 12c557: 5f pop %edi <== NOT EXECUTED 12c558: c9 leave <== NOT EXECUTED 12c559: c3 ret <== NOT EXECUTED 0010822c : size_t size ) { void *return_this; MSBUMP(malloc_calls, 1); 10822c: 55 push %ebp 10822d: 89 e5 mov %esp,%ebp 10822f: 57 push %edi 108230: 56 push %esi 108231: 53 push %ebx 108232: 83 ec 0c sub $0xc,%esp 108235: 8b 75 08 mov 0x8(%ebp),%esi 108238: ff 05 64 72 12 00 incl 0x127264 /* * If some free's have been deferred, then do them now. */ malloc_deferred_frees_process(); 10823e: e8 11 ff ff ff call 108154 <== ALWAYS TAKEN /* * Validate the parameters */ if ( !size ) 108243: 85 f6 test %esi,%esi 108245: 74 65 je 1082ac <== 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()) && 108247: 83 3d a0 75 12 00 03 cmpl $0x3,0x1275a0 10824e: 74 50 je 1082a0 RTEMS_INLINE_ROUTINE void *_Protected_heap_Allocate( Heap_Control *heap, uintptr_t size ) { return _Protected_heap_Allocate_aligned_with_boundary( heap, size, 0, 0 ); 108250: 6a 00 push $0x0 108252: 6a 00 push $0x0 108254: 56 push %esi 108255: ff 35 58 31 12 00 pushl 0x123158 10825b: e8 a8 4c 00 00 call 10cf08 <_Protected_heap_Allocate_aligned_with_boundary> 108260: 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 ) { 108262: 83 c4 10 add $0x10,%esp 108265: 85 c0 test %eax,%eax 108267: 74 5b je 1082c4 if (rtems_malloc_sbrk_helpers) return_this = (*rtems_malloc_sbrk_helpers->extend)( size ); if ( !return_this ) { errno = ENOMEM; return (void *) 0; 108269: 89 c7 mov %eax,%edi } /* * If the user wants us to dirty the allocated memory, then do it. */ if ( rtems_malloc_dirty_helper ) 10826b: a1 10 56 12 00 mov 0x125610,%eax 108270: 85 c0 test %eax,%eax 108272: 74 0a je 10827e <== NEVER TAKEN (*rtems_malloc_dirty_helper)( return_this, size ); 108274: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 108277: 56 push %esi <== NOT EXECUTED 108278: 57 push %edi <== NOT EXECUTED 108279: ff 10 call *(%eax) <== NOT EXECUTED 10827b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) 10827e: a1 08 56 12 00 mov 0x125608,%eax 108283: 85 c0 test %eax,%eax 108285: 74 31 je 1082b8 <== NEVER TAKEN (*rtems_malloc_statistics_helpers->at_malloc)(return_this); 108287: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10828a: 57 push %edi <== NOT EXECUTED 10828b: ff 50 04 call *0x4(%eax) <== NOT EXECUTED 10828e: 89 fb mov %edi,%ebx <== NOT EXECUTED 108290: 83 c4 10 add $0x10,%esp <== NOT EXECUTED if (rtems_malloc_boundary_helpers) (*rtems_malloc_boundary_helpers->at_malloc)(return_this, size); #endif return return_this; } 108293: 89 d8 mov %ebx,%eax 108295: 8d 65 f4 lea -0xc(%ebp),%esp 108298: 5b pop %ebx 108299: 5e pop %esi 10829a: 5f pop %edi 10829b: c9 leave 10829c: c3 ret 10829d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED return (void *) 0; /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) && 1082a0: e8 57 fe ff ff call 1080fc <== ALWAYS TAKEN 1082a5: 84 c0 test %al,%al 1082a7: 75 a7 jne 108250 <== NEVER TAKEN 1082a9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) (*rtems_malloc_statistics_helpers->at_malloc)(return_this); 1082ac: 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; } 1082ae: 89 d8 mov %ebx,%eax <== NOT EXECUTED 1082b0: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 1082b3: 5b pop %ebx <== NOT EXECUTED 1082b4: 5e pop %esi <== NOT EXECUTED 1082b5: 5f pop %edi <== NOT EXECUTED 1082b6: c9 leave <== NOT EXECUTED 1082b7: c3 ret <== NOT EXECUTED (*rtems_malloc_dirty_helper)( return_this, size ); /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) 1082b8: 89 fb mov %edi,%ebx if (rtems_malloc_boundary_helpers) (*rtems_malloc_boundary_helpers->at_malloc)(return_this, size); #endif return return_this; } 1082ba: 89 d8 mov %ebx,%eax 1082bc: 8d 65 f4 lea -0xc(%ebp),%esp 1082bf: 5b pop %ebx 1082c0: 5e pop %esi 1082c1: 5f pop %edi 1082c2: c9 leave 1082c3: c3 ret */ return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size ); if ( !return_this ) { if (rtems_malloc_sbrk_helpers) 1082c4: a1 0c 56 12 00 mov 0x12560c,%eax 1082c9: 85 c0 test %eax,%eax 1082cb: 74 10 je 1082dd <== NEVER TAKEN return_this = (*rtems_malloc_sbrk_helpers->extend)( size ); 1082cd: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1082d0: 56 push %esi <== NOT EXECUTED 1082d1: ff 50 04 call *0x4(%eax) <== NOT EXECUTED 1082d4: 89 c7 mov %eax,%edi <== NOT EXECUTED if ( !return_this ) { 1082d6: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 1082d9: 85 c0 test %eax,%eax <== NOT EXECUTED 1082db: 75 8e jne 10826b <== NOT EXECUTED errno = ENOMEM; 1082dd: e8 2e b5 00 00 call 113810 <__errno> 1082e2: c7 00 0c 00 00 00 movl $0xc,(%eax) return (void *) 0; 1082e8: eb a9 jmp 108293 <== ALWAYS TAKEN 0010813c : } void malloc_deferred_free( void *pointer ) { 10813c: 55 push %ebp <== NOT EXECUTED 10813d: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10813f: 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 ); 108142: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED 108145: 68 4c 72 12 00 push $0x12724c <== NOT EXECUTED 10814a: e8 29 3d 00 00 call 10be78 <_Chain_Append> <== NOT EXECUTED 10814f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_chain_append(&RTEMS_Malloc_GC_list, (rtems_chain_node *)pointer); } 108152: c9 leave <== NOT EXECUTED 108153: c3 ret <== NOT EXECUTED 00108154 : { rtems_chain_initialize_empty(&RTEMS_Malloc_GC_list); } void malloc_deferred_frees_process(void) { 108154: 55 push %ebp 108155: 89 e5 mov %esp,%ebp 108157: 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) 10815a: eb 0c jmp 108168 <== ALWAYS TAKEN free(to_be_freed); 10815c: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10815f: 50 push %eax <== NOT EXECUTED 108160: e8 77 fe ff ff call 107fdc <== NOT EXECUTED 108165: 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 ); 108168: 83 ec 0c sub $0xc,%esp 10816b: 68 4c 72 12 00 push $0x12724c 108170: e8 27 3d 00 00 call 10be9c <_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) 108175: 83 c4 10 add $0x10,%esp 108178: 85 c0 test %eax,%eax 10817a: 75 e0 jne 10815c <== ALWAYS TAKEN free(to_be_freed); } 10817c: c9 leave 10817d: c3 ret 0012c574 : */ int malloc_info( Heap_Information_block *the_info ) { 12c574: 55 push %ebp 12c575: 89 e5 mov %esp,%ebp 12c577: 83 ec 08 sub $0x8,%esp 12c57a: 8b 45 08 mov 0x8(%ebp),%eax if ( !the_info ) 12c57d: 85 c0 test %eax,%eax 12c57f: 74 17 je 12c598 return -1; _Protected_heap_Get_information( RTEMS_Malloc_Heap, the_info ); 12c581: 83 ec 08 sub $0x8,%esp 12c584: 50 push %eax 12c585: ff 35 b8 72 16 00 pushl 0x1672b8 12c58b: e8 5c 29 00 00 call 12eeec <_Protected_heap_Get_information> 12c590: 31 c0 xor %eax,%eax return 0; 12c592: 83 c4 10 add $0x10,%esp } 12c595: c9 leave 12c596: c3 ret 12c597: 90 nop <== NOT EXECUTED int malloc_info( Heap_Information_block *the_info ) { if ( !the_info ) 12c598: b8 ff ff ff ff mov $0xffffffff,%eax return -1; _Protected_heap_Get_information( RTEMS_Malloc_Heap, the_info ); return 0; } 12c59d: c9 leave 12c59e: c3 ret 001080fc : #include "malloc_p.h" rtems_chain_control RTEMS_Malloc_GC_list; bool malloc_is_system_state_OK(void) { 1080fc: 55 push %ebp 1080fd: 89 e5 mov %esp,%ebp if ( _Thread_Dispatch_disable_level > 0 ) 1080ff: a1 d8 73 12 00 mov 0x1273d8,%eax 108104: 85 c0 test %eax,%eax 108106: 75 0c jne 108114 <== ALWAYS TAKEN return false; if ( _ISR_Nest_level > 0 ) 108108: a1 74 74 12 00 mov 0x127474,%eax #include "malloc_p.h" rtems_chain_control RTEMS_Malloc_GC_list; bool malloc_is_system_state_OK(void) 10810d: 85 c0 test %eax,%eax 10810f: 0f 94 c0 sete %al if ( _ISR_Nest_level > 0 ) return false; return true; } 108112: c9 leave 108113: c3 ret rtems_chain_control RTEMS_Malloc_GC_list; bool malloc_is_system_state_OK(void) { if ( _Thread_Dispatch_disable_level > 0 ) 108114: 31 c0 xor %eax,%eax <== NOT EXECUTED if ( _ISR_Nest_level > 0 ) return false; return true; } 108116: c9 leave <== NOT EXECUTED 108117: c3 ret <== NOT EXECUTED 0010aaac : #ifdef RTEMS_NEWLIB #include "malloc_p.h" void malloc_report_statistics(void) { 10aaac: 55 push %ebp 10aaad: 89 e5 mov %esp,%ebp 10aaaf: 83 ec 10 sub $0x10,%esp malloc_report_statistics_with_plugin( NULL, printk_plugin ); 10aab2: 68 bc b6 10 00 push $0x10b6bc 10aab7: 6a 00 push $0x0 10aab9: e8 06 00 00 00 call 10aac4 <== ALWAYS TAKEN 10aabe: 83 c4 10 add $0x10,%esp } 10aac1: c9 leave 10aac2: c3 ret 00116778 : */ int memfile_blocks_allocated = 0; void *memfile_alloc_block(void) { 116778: 55 push %ebp 116779: 89 e5 mov %esp,%ebp 11677b: 83 ec 10 sub $0x10,%esp void *memory; memory = (void *)calloc(1, IMFS_MEMFILE_BYTES_PER_BLOCK); 11677e: ff 35 70 c6 12 00 pushl 0x12c670 116784: 6a 01 push $0x1 116786: e8 91 29 ff ff call 10911c if ( memory ) 11678b: 83 c4 10 add $0x10,%esp 11678e: 85 c0 test %eax,%eax 116790: 74 06 je 116798 <== ALWAYS TAKEN memfile_blocks_allocated++; 116792: ff 05 30 c8 12 00 incl 0x12c830 return memory; } 116798: c9 leave 116799: c3 ret 00116bec : return memfile_check_rmnod( the_jnode ); } int memfile_check_rmnod( IMFS_jnode_t *the_jnode ){ 116bec: 55 push %ebp 116bed: 89 e5 mov %esp,%ebp 116bef: 53 push %ebx 116bf0: 83 ec 10 sub $0x10,%esp 116bf3: 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) ) { 116bf6: 53 push %ebx 116bf7: e8 48 db ff ff call 114744 116bfc: 83 c4 10 add $0x10,%esp 116bff: 85 c0 test %eax,%eax 116c01: 75 2f jne 116c32 116c03: 66 83 7b 34 00 cmpw $0x0,0x34(%ebx) 116c08: 75 28 jne 116c32 <== ALWAYS TAKEN /* * Is the rtems_filesystem_current is this node? */ if ( rtems_filesystem_current.node_access == the_jnode ) 116c0a: a1 18 a7 12 00 mov 0x12a718,%eax 116c0f: 39 58 04 cmp %ebx,0x4(%eax) 116c12: 74 28 je 116c3c <== ALWAYS TAKEN rtems_filesystem_current.node_access = NULL; /* * Free memory associated with a memory file. */ if (the_jnode->type != IMFS_LINEAR_FILE) 116c14: 83 7b 4c 06 cmpl $0x6,0x4c(%ebx) 116c18: 74 0c je 116c26 <== ALWAYS TAKEN IMFS_memfile_remove( the_jnode ); 116c1a: 83 ec 0c sub $0xc,%esp 116c1d: 53 push %ebx 116c1e: e8 21 fe ff ff call 116a44 <== ALWAYS TAKEN 116c23: 83 c4 10 add $0x10,%esp free( the_jnode ); 116c26: 83 ec 0c sub $0xc,%esp 116c29: 53 push %ebx 116c2a: e8 3d 27 ff ff call 10936c 116c2f: 83 c4 10 add $0x10,%esp } return 0; } 116c32: 31 c0 xor %eax,%eax 116c34: 8b 5d fc mov -0x4(%ebp),%ebx 116c37: c9 leave 116c38: c3 ret 116c39: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED /* * Is the rtems_filesystem_current is this node? */ if ( rtems_filesystem_current.node_access == the_jnode ) rtems_filesystem_current.node_access = NULL; 116c3c: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax) <== NOT EXECUTED 116c43: eb cf jmp 116c14 <== NOT EXECUTED 00116c94 : */ int memfile_close( rtems_libio_t *iop ) { 116c94: 55 push %ebp 116c95: 89 e5 mov %esp,%ebp 116c97: 53 push %ebx 116c98: 83 ec 04 sub $0x4,%esp 116c9b: 8b 45 08 mov 0x8(%ebp),%eax IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 116c9e: 8b 50 38 mov 0x38(%eax),%edx if (iop->flags & LIBIO_FLAGS_APPEND) 116ca1: f6 40 15 02 testb $0x2,0x15(%eax) 116ca5: 74 0c je 116cb3 iop->offset = the_jnode->info.file.size; 116ca7: 8b 4a 50 mov 0x50(%edx),%ecx 116caa: 8b 5a 54 mov 0x54(%edx),%ebx 116cad: 89 48 0c mov %ecx,0xc(%eax) 116cb0: 89 58 10 mov %ebx,0x10(%eax) memfile_check_rmnod( the_jnode ); 116cb3: 83 ec 0c sub $0xc,%esp 116cb6: 52 push %edx 116cb7: e8 30 ff ff ff call 116bec <== ALWAYS TAKEN return 0; } 116cbc: 31 c0 xor %eax,%eax 116cbe: 8b 5d fc mov -0x4(%ebp),%ebx 116cc1: c9 leave 116cc2: c3 ret 0011697c : void memfile_free_blocks_in_table( block_p **block_table, int entries ) { 11697c: 55 push %ebp 11697d: 89 e5 mov %esp,%ebp 11697f: 57 push %edi 116980: 56 push %esi 116981: 53 push %ebx 116982: 83 ec 0c sub $0xc,%esp 116985: 8b 7d 0c mov 0xc(%ebp),%edi /* * Perform internal consistency checks */ assert( block_table ); 116988: 8b 45 08 mov 0x8(%ebp),%eax 11698b: 85 c0 test %eax,%eax 11698d: 74 4e je 1169dd <== ALWAYS TAKEN /* * Now go through all the slots in the table and free the memory. */ b = *block_table; 11698f: 8b 45 08 mov 0x8(%ebp),%eax 116992: 8b 30 mov (%eax),%esi for ( i=0 ; i <== ALWAYS TAKEN 116998: 31 db xor %ebx,%ebx 11699a: 66 90 xchg %ax,%ax if ( b[i] ) { 11699c: 8b 04 9e mov (%esi,%ebx,4),%eax 11699f: 85 c0 test %eax,%eax 1169a1: 74 13 je 1169b6 memfile_free_block( b[i] ); 1169a3: 83 ec 0c sub $0xc,%esp 1169a6: 50 push %eax 1169a7: e8 b0 fd ff ff call 11675c b[i] = 0; 1169ac: c7 04 9e 00 00 00 00 movl $0x0,(%esi,%ebx,4) 1169b3: 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 1169bb: 8b 45 08 mov 0x8(%ebp),%eax 1169be: 8b 30 mov (%eax),%esi /* * Now that all the blocks in the block table are free, we can * free the block table itself. */ memfile_free_block( *block_table ); 1169c0: 83 ec 0c sub $0xc,%esp 1169c3: 56 push %esi 1169c4: e8 93 fd ff ff call 11675c *block_table = 0; 1169c9: 8b 45 08 mov 0x8(%ebp),%eax 1169cc: c7 00 00 00 00 00 movl $0x0,(%eax) 1169d2: 83 c4 10 add $0x10,%esp } 1169d5: 8d 65 f4 lea -0xc(%ebp),%esp 1169d8: 5b pop %ebx 1169d9: 5e pop %esi 1169da: 5f pop %edi 1169db: c9 leave 1169dc: c3 ret /* * Perform internal consistency checks */ assert( block_table ); 1169dd: 68 d2 68 12 00 push $0x1268d2 <== NOT EXECUTED 1169e2: 68 04 6a 12 00 push $0x126a04 <== NOT EXECUTED 1169e7: 68 b3 01 00 00 push $0x1b3 <== NOT EXECUTED 1169ec: 68 f4 68 12 00 push $0x1268f4 <== NOT EXECUTED 1169f1: e8 e6 25 ff ff call 108fdc <__assert_func> <== NOT EXECUTED 00116e6c : int memfile_ftruncate( rtems_libio_t *iop, rtems_off64_t length ) { 116e6c: 55 push %ebp 116e6d: 89 e5 mov %esp,%ebp 116e6f: 53 push %ebx 116e70: 83 ec 14 sub $0x14,%esp 116e73: 8b 45 08 mov 0x8(%ebp),%eax 116e76: 8b 4d 0c mov 0xc(%ebp),%ecx 116e79: 8b 55 10 mov 0x10(%ebp),%edx IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 116e7c: 8b 58 38 mov 0x38(%eax),%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 ) 116e7f: 39 53 54 cmp %edx,0x54(%ebx) 116e82: 7f 19 jg 116e9d <== ALWAYS TAKEN 116e84: 7d 12 jge 116e98 <== NEVER TAKEN return IMFS_memfile_extend( the_jnode, length ); 116e86: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 116e89: 51 push %ecx <== NOT EXECUTED 116e8a: 53 push %ebx <== NOT EXECUTED 116e8b: e8 ac fe ff ff call 116d3c <== NOT EXECUTED 116e90: 83 c4 10 add $0x10,%esp <== NOT EXECUTED iop->size = the_jnode->info.file.size; IMFS_update_atime( the_jnode ); return 0; } 116e93: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 116e96: c9 leave <== NOT EXECUTED 116e97: c3 ret <== NOT EXECUTED * POSIX 1003.1b does not specify what happens if you truncate a file * and the new length is greater than the current size. We treat this * as an extend operation. */ if ( length > the_jnode->info.file.size ) 116e98: 39 4b 50 cmp %ecx,0x50(%ebx) 116e9b: 72 e9 jb 116e86 <== ALWAYS TAKEN * The in-memory files do not currently reclaim memory until the file is * deleted. So we leave the previously allocated blocks in place for * future use and just set the length. */ the_jnode->info.file.size = length; 116e9d: 89 4b 50 mov %ecx,0x50(%ebx) 116ea0: 89 53 54 mov %edx,0x54(%ebx) iop->size = the_jnode->info.file.size; 116ea3: 89 48 04 mov %ecx,0x4(%eax) 116ea6: 89 50 08 mov %edx,0x8(%eax) IMFS_update_atime( the_jnode ); 116ea9: 83 ec 08 sub $0x8,%esp 116eac: 6a 00 push $0x0 116eae: 8d 45 f0 lea -0x10(%ebp),%eax 116eb1: 50 push %eax 116eb2: e8 31 25 ff ff call 1093e8 116eb7: 8b 45 f0 mov -0x10(%ebp),%eax 116eba: 89 43 40 mov %eax,0x40(%ebx) 116ebd: 31 c0 xor %eax,%eax return 0; 116ebf: 83 c4 10 add $0x10,%esp } 116ec2: 8b 5d fc mov -0x4(%ebp),%ebx 116ec5: c9 leave 116ec6: c3 ret 00116ec8 : rtems_off64_t memfile_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { 116ec8: 55 push %ebp 116ec9: 89 e5 mov %esp,%ebp 116ecb: 57 push %edi 116ecc: 56 push %esi 116ecd: 53 push %ebx 116ece: 83 ec 0c sub $0xc,%esp 116ed1: 8b 5d 08 mov 0x8(%ebp),%ebx IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 116ed4: 8b 73 38 mov 0x38(%ebx),%esi if (the_jnode->type == IMFS_LINEAR_FILE) { 116ed7: 83 7e 4c 06 cmpl $0x6,0x4c(%esi) 116edb: 74 2f je 116f0c <== ALWAYS TAKEN if (iop->offset > the_jnode->info.linearfile.size) iop->offset = the_jnode->info.linearfile.size; } else { /* Must be a block file (IMFS_MEMORY_FILE). */ if (IMFS_memfile_extend( the_jnode, iop->offset )) 116edd: 83 ec 08 sub $0x8,%esp 116ee0: ff 73 0c pushl 0xc(%ebx) 116ee3: 56 push %esi 116ee4: e8 53 fe ff ff call 116d3c <== ALWAYS TAKEN 116ee9: 83 c4 10 add $0x10,%esp 116eec: 85 c0 test %eax,%eax 116eee: 75 4e jne 116f3e <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOSPC ); iop->size = the_jnode->info.file.size; 116ef0: 8b 46 50 mov 0x50(%esi),%eax 116ef3: 8b 56 54 mov 0x54(%esi),%edx 116ef6: 89 43 04 mov %eax,0x4(%ebx) 116ef9: 89 53 08 mov %edx,0x8(%ebx) 116efc: 8b 43 0c mov 0xc(%ebx),%eax 116eff: 8b 53 10 mov 0x10(%ebx),%edx } return iop->offset; } 116f02: 8d 65 f4 lea -0xc(%ebp),%esp 116f05: 5b pop %ebx 116f06: 5e pop %esi 116f07: 5f pop %edi 116f08: c9 leave 116f09: c3 ret 116f0a: 66 90 xchg %ax,%ax <== NOT EXECUTED IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; if (the_jnode->type == IMFS_LINEAR_FILE) { if (iop->offset > the_jnode->info.linearfile.size) 116f0c: 8b 7b 0c mov 0xc(%ebx),%edi <== NOT EXECUTED 116f0f: 8b 4b 10 mov 0x10(%ebx),%ecx <== NOT EXECUTED 116f12: 8b 46 50 mov 0x50(%esi),%eax <== NOT EXECUTED 116f15: 8b 56 54 mov 0x54(%esi),%edx <== NOT EXECUTED 116f18: 39 d1 cmp %edx,%ecx <== NOT EXECUTED 116f1a: 7f 14 jg 116f30 <== NOT EXECUTED 116f1c: 7d 0e jge 116f2c <== NOT EXECUTED 116f1e: 89 f8 mov %edi,%eax <== NOT EXECUTED 116f20: 89 ca mov %ecx,%edx <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOSPC ); iop->size = the_jnode->info.file.size; } return iop->offset; } 116f22: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 116f25: 5b pop %ebx <== NOT EXECUTED 116f26: 5e pop %esi <== NOT EXECUTED 116f27: 5f pop %edi <== NOT EXECUTED 116f28: c9 leave <== NOT EXECUTED 116f29: c3 ret <== NOT EXECUTED 116f2a: 66 90 xchg %ax,%ax <== NOT EXECUTED IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; if (the_jnode->type == IMFS_LINEAR_FILE) { if (iop->offset > the_jnode->info.linearfile.size) 116f2c: 39 c7 cmp %eax,%edi <== NOT EXECUTED 116f2e: 76 ee jbe 116f1e <== NOT EXECUTED iop->offset = the_jnode->info.linearfile.size; 116f30: 89 43 0c mov %eax,0xc(%ebx) <== NOT EXECUTED 116f33: 89 53 10 mov %edx,0x10(%ebx) <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOSPC ); iop->size = the_jnode->info.file.size; } return iop->offset; } 116f36: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 116f39: 5b pop %ebx <== NOT EXECUTED 116f3a: 5e pop %esi <== NOT EXECUTED 116f3b: 5f pop %edi <== NOT EXECUTED 116f3c: c9 leave <== NOT EXECUTED 116f3d: c3 ret <== NOT EXECUTED if (iop->offset > the_jnode->info.linearfile.size) iop->offset = the_jnode->info.linearfile.size; } else { /* Must be a block file (IMFS_MEMORY_FILE). */ if (IMFS_memfile_extend( the_jnode, iop->offset )) rtems_set_errno_and_return_minus_one( ENOSPC ); 116f3e: e8 75 1a 00 00 call 1189b8 <__errno> <== NOT EXECUTED 116f43: c7 00 1c 00 00 00 movl $0x1c,(%eax) <== NOT EXECUTED 116f49: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 116f4e: ba ff ff ff ff mov $0xffffffff,%edx <== NOT EXECUTED 116f53: eb ad jmp 116f02 <== NOT EXECUTED 001171d0 : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 1171d0: 55 push %ebp 1171d1: 89 e5 mov %esp,%ebp 1171d3: 56 push %esi 1171d4: 53 push %ebx 1171d5: 8b 5d 08 mov 0x8(%ebp),%ebx IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 1171d8: 8b 73 38 mov 0x38(%ebx),%esi /* * Perform 'copy on write' for linear files */ if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) 1171db: 8b 43 14 mov 0x14(%ebx),%eax 1171de: a9 04 02 00 00 test $0x204,%eax 1171e3: 74 06 je 1171eb && (the_jnode->type == IMFS_LINEAR_FILE)) { 1171e5: 83 7e 4c 06 cmpl $0x6,0x4c(%esi) 1171e9: 74 2d je 117218 <== ALWAYS TAKEN 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) 1171eb: 8b 56 50 mov 0x50(%esi),%edx 1171ee: 8b 4e 54 mov 0x54(%esi),%ecx && (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) return -1; } if (iop->flags & LIBIO_FLAGS_APPEND) 1171f1: f6 c4 02 test $0x2,%ah 1171f4: 75 12 jne 117208 iop->offset = the_jnode->info.file.size; iop->size = the_jnode->info.file.size; 1171f6: 89 53 04 mov %edx,0x4(%ebx) 1171f9: 89 4b 08 mov %ecx,0x8(%ebx) 1171fc: 31 c0 xor %eax,%eax return 0; } 1171fe: 8d 65 f8 lea -0x8(%ebp),%esp 117201: 5b pop %ebx 117202: 5e pop %esi 117203: c9 leave 117204: c3 ret 117205: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if ((count != 0) && (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) return -1; } if (iop->flags & LIBIO_FLAGS_APPEND) iop->offset = the_jnode->info.file.size; 117208: 89 53 0c mov %edx,0xc(%ebx) 11720b: 89 4b 10 mov %ecx,0x10(%ebx) 11720e: 8b 56 50 mov 0x50(%esi),%edx 117211: 8b 4e 54 mov 0x54(%esi),%ecx 117214: eb e0 jmp 1171f6 <== ALWAYS TAKEN 117216: 66 90 xchg %ax,%ax <== NOT EXECUTED /* * Perform 'copy on write' for linear files */ if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) && (the_jnode->type == IMFS_LINEAR_FILE)) { uint32_t count = the_jnode->info.linearfile.size; 117218: 8b 46 50 mov 0x50(%esi),%eax <== NOT EXECUTED const unsigned char *buffer = the_jnode->info.linearfile.direct; 11721b: 8b 56 58 mov 0x58(%esi),%edx <== NOT EXECUTED the_jnode->type = IMFS_MEMORY_FILE; 11721e: c7 46 4c 05 00 00 00 movl $0x5,0x4c(%esi) <== NOT EXECUTED the_jnode->info.file.size = 0; 117225: c7 46 50 00 00 00 00 movl $0x0,0x50(%esi) <== NOT EXECUTED 11722c: c7 46 54 00 00 00 00 movl $0x0,0x54(%esi) <== NOT EXECUTED the_jnode->info.file.indirect = 0; 117233: c7 46 58 00 00 00 00 movl $0x0,0x58(%esi) <== NOT EXECUTED the_jnode->info.file.doubly_indirect = 0; 11723a: c7 46 5c 00 00 00 00 movl $0x0,0x5c(%esi) <== NOT EXECUTED the_jnode->info.file.triply_indirect = 0; 117241: c7 46 60 00 00 00 00 movl $0x0,0x60(%esi) <== NOT EXECUTED if ((count != 0) 117248: 85 c0 test %eax,%eax <== NOT EXECUTED 11724a: 75 09 jne 117255 <== NOT EXECUTED 11724c: 8b 43 14 mov 0x14(%ebx),%eax <== NOT EXECUTED 11724f: 31 d2 xor %edx,%edx <== NOT EXECUTED 117251: 31 c9 xor %ecx,%ecx <== NOT EXECUTED 117253: eb 9c jmp 1171f1 <== NOT EXECUTED && (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) 117255: 50 push %eax <== NOT EXECUTED 117256: 52 push %edx <== NOT EXECUTED 117257: 6a 00 push $0x0 <== NOT EXECUTED 117259: 56 push %esi <== NOT EXECUTED 11725a: e8 f9 fc ff ff call 116f58 <== 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) 11725f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 117262: 83 f8 ff cmp $0xffffffff,%eax <== NOT EXECUTED 117265: 74 97 je 1171fe <== NOT EXECUTED 117267: 8b 43 14 mov 0x14(%ebx),%eax <== NOT EXECUTED 11726a: e9 7c ff ff ff jmp 1171eb <== NOT EXECUTED 0011752c : ssize_t memfile_read( rtems_libio_t *iop, void *buffer, size_t count ) { 11752c: 55 push %ebp 11752d: 89 e5 mov %esp,%ebp 11752f: 83 ec 08 sub $0x8,%esp 117532: 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 ); 117535: ff 75 10 pushl 0x10(%ebp) 117538: ff 75 0c pushl 0xc(%ebp) 11753b: ff 70 0c pushl 0xc(%eax) 11753e: ff 70 38 pushl 0x38(%eax) 117541: e8 2a fd ff ff call 117270 <== ALWAYS TAKEN } 117546: c9 leave 117547: c3 ret 00116c48 : int memfile_rmnod( rtems_filesystem_location_info_t *parent_pathloc, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN */ ) { 116c48: 55 push %ebp 116c49: 89 e5 mov %esp,%ebp 116c4b: 53 push %ebx 116c4c: 83 ec 14 sub $0x14,%esp IMFS_jnode_t *the_jnode; the_jnode = (IMFS_jnode_t *) pathloc->node_access; 116c4f: 8b 45 0c mov 0xc(%ebp),%eax 116c52: 8b 18 mov (%eax),%ebx /* * Take the node out of the parent's chain that contains this node */ if ( the_jnode->Parent != NULL ) { 116c54: 8b 4b 08 mov 0x8(%ebx),%ecx 116c57: 85 c9 test %ecx,%ecx 116c59: 74 13 je 116c6e <== ALWAYS TAKEN 116c5b: 83 ec 0c sub $0xc,%esp 116c5e: 53 push %ebx 116c5f: e8 f4 6a ff ff call 10d758 <_Chain_Extract> rtems_chain_extract( (rtems_chain_node *) the_jnode ); the_jnode->Parent = NULL; 116c64: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx) 116c6b: 83 c4 10 add $0x10,%esp /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; 116c6e: 66 ff 4b 34 decw 0x34(%ebx) IMFS_update_ctime( the_jnode ); 116c72: 83 ec 08 sub $0x8,%esp 116c75: 6a 00 push $0x0 116c77: 8d 45 f0 lea -0x10(%ebp),%eax 116c7a: 50 push %eax 116c7b: e8 68 27 ff ff call 1093e8 116c80: 8b 45 f0 mov -0x10(%ebp),%eax 116c83: 89 43 48 mov %eax,0x48(%ebx) return memfile_check_rmnod( the_jnode ); 116c86: 89 1c 24 mov %ebx,(%esp) 116c89: e8 5e ff ff ff call 116bec <== ALWAYS TAKEN } 116c8e: 8b 5d fc mov -0x4(%ebp),%ebx 116c91: c9 leave 116c92: c3 ret 001171a0 : ssize_t memfile_write( rtems_libio_t *iop, const void *buffer, size_t count ) { 1171a0: 55 push %ebp 1171a1: 89 e5 mov %esp,%ebp 1171a3: 56 push %esi 1171a4: 53 push %ebx 1171a5: 8b 5d 08 mov 0x8(%ebp),%ebx IMFS_jnode_t *the_jnode; ssize_t status; the_jnode = iop->file_info; 1171a8: 8b 73 38 mov 0x38(%ebx),%esi status = IMFS_memfile_write( the_jnode, iop->offset, buffer, count ); 1171ab: ff 75 10 pushl 0x10(%ebp) 1171ae: ff 75 0c pushl 0xc(%ebp) 1171b1: ff 73 0c pushl 0xc(%ebx) 1171b4: 56 push %esi 1171b5: e8 9e fd ff ff call 116f58 <== ALWAYS TAKEN iop->size = the_jnode->info.file.size; 1171ba: 8b 56 50 mov 0x50(%esi),%edx 1171bd: 8b 4e 54 mov 0x54(%esi),%ecx 1171c0: 89 53 04 mov %edx,0x4(%ebx) 1171c3: 89 4b 08 mov %ecx,0x8(%ebx) return status; } 1171c6: 8d 65 f8 lea -0x8(%ebp),%esp 1171c9: 5b pop %ebx 1171ca: 5e pop %esi 1171cb: c9 leave 1171cc: c3 ret 0010eac0 : */ int miniIMFS_initialize( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { 10eac0: 55 push %ebp 10eac1: 89 e5 mov %esp,%ebp 10eac3: 83 ec 08 sub $0x8,%esp return IMFS_initialize_support( 10eac6: 68 00 12 12 00 push $0x121200 10eacb: 68 00 12 12 00 push $0x121200 10ead0: 68 20 10 12 00 push $0x121020 10ead5: ff 75 08 pushl 0x8(%ebp) 10ead8: e8 0f 0b 00 00 call 10f5ec <== ALWAYS TAKEN temp_mt_entry, &miniIMFS_ops, &rtems_filesystem_null_handlers, /* for memfiles */ &rtems_filesystem_null_handlers /* for directories */ ); } 10eadd: c9 leave 10eade: c3 ret 001082ec : int mkdir( const char *pathname, mode_t mode ) { 1082ec: 55 push %ebp 1082ed: 89 e5 mov %esp,%ebp 1082ef: 83 ec 08 sub $0x8,%esp 1082f2: 8b 45 0c mov 0xc(%ebp),%eax return mknod( pathname, mode | S_IFDIR, 0LL); 1082f5: 6a 00 push $0x0 1082f7: 6a 00 push $0x0 1082f9: 80 cc 40 or $0x40,%ah 1082fc: 50 push %eax 1082fd: ff 75 08 pushl 0x8(%ebp) 108300: e8 03 00 00 00 call 108308 <== ALWAYS TAKEN } 108305: c9 leave 108306: c3 ret 0011302c : int mkfifo( const char *path, mode_t mode ) { 11302c: 55 push %ebp 11302d: 89 e5 mov %esp,%ebp 11302f: 83 ec 08 sub $0x8,%esp 113032: 8b 45 0c mov 0xc(%ebp),%eax return mknod( path, mode | S_IFIFO, 0LL ); 113035: 6a 00 push $0x0 113037: 6a 00 push $0x0 113039: 80 cc 10 or $0x10,%ah 11303c: 50 push %eax 11303d: ff 75 08 pushl 0x8(%ebp) 113040: e8 c3 52 ff ff call 108308 <== ALWAYS TAKEN } 113045: c9 leave 113046: c3 ret 00108308 : int mknod( const char *pathname, mode_t mode, dev_t dev ) { 108308: 55 push %ebp 108309: 89 e5 mov %esp,%ebp 10830b: 57 push %edi 10830c: 56 push %esi 10830d: 53 push %ebx 10830e: 83 ec 3c sub $0x3c,%esp 108311: 8b 55 0c mov 0xc(%ebp),%edx 108314: 8b 4d 10 mov 0x10(%ebp),%ecx 108317: 8b 5d 14 mov 0x14(%ebp),%ebx 10831a: 89 4d c0 mov %ecx,-0x40(%ebp) 10831d: 89 5d c4 mov %ebx,-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) ) ) 108320: f6 c6 f0 test $0xf0,%dh 108323: 0f 84 cb 00 00 00 je 1083f4 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); rtems_filesystem_get_start_loc( pathname, &i, &temp_loc ); 108329: 8b 5d 08 mov 0x8(%ebp),%ebx 10832c: 8a 03 mov (%ebx),%al 10832e: 3c 2f cmp $0x2f,%al 108330: 74 08 je 10833a 108332: 3c 5c cmp $0x5c,%al 108334: 74 04 je 10833a <== ALWAYS TAKEN 108336: 84 c0 test %al,%al 108338: 75 7e jne 1083b8 <== NEVER TAKEN 10833a: 8d 5d d0 lea -0x30(%ebp),%ebx 10833d: 8b 35 f8 4f 12 00 mov 0x124ff8,%esi 108343: 83 c6 18 add $0x18,%esi 108346: b9 05 00 00 00 mov $0x5,%ecx 10834b: 89 df mov %ebx,%edi 10834d: f3 a5 rep movsl %ds:(%esi),%es:(%edi) 10834f: b1 01 mov $0x1,%cl if ( !temp_loc.ops->evalformake_h ) { 108351: 8b 45 dc mov -0x24(%ebp),%eax 108354: 8b 40 04 mov 0x4(%eax),%eax 108357: 85 c0 test %eax,%eax 108359: 74 7c je 1083d7 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*temp_loc.ops->evalformake_h)( 10835b: 56 push %esi 10835c: 8d 75 e4 lea -0x1c(%ebp),%esi 10835f: 56 push %esi 108360: 53 push %ebx 108361: 03 4d 08 add 0x8(%ebp),%ecx 108364: 51 push %ecx 108365: 89 55 bc mov %edx,-0x44(%ebp) 108368: ff d0 call *%eax &pathname[i], &temp_loc, &name_start ); if ( result != 0 ) 10836a: 83 c4 10 add $0x10,%esp 10836d: 85 c0 test %eax,%eax 10836f: 8b 55 bc mov -0x44(%ebp),%edx 108372: 75 6e jne 1083e2 return -1; if ( !temp_loc.ops->mknod_h ) { 108374: 8b 4d dc mov -0x24(%ebp),%ecx 108377: 8b 41 14 mov 0x14(%ecx),%eax 10837a: 85 c0 test %eax,%eax 10837c: 0f 84 84 00 00 00 je 108406 <== ALWAYS TAKEN rtems_filesystem_freenode( &temp_loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*temp_loc.ops->mknod_h)( name_start, mode, dev, &temp_loc ); 108382: 83 ec 0c sub $0xc,%esp 108385: 53 push %ebx 108386: ff 75 c4 pushl -0x3c(%ebp) 108389: ff 75 c0 pushl -0x40(%ebp) 10838c: 52 push %edx 10838d: ff 75 e4 pushl -0x1c(%ebp) 108390: ff d0 call *%eax 108392: 89 c6 mov %eax,%esi rtems_filesystem_freenode( &temp_loc ); 108394: 8b 45 dc mov -0x24(%ebp),%eax 108397: 83 c4 20 add $0x20,%esp 10839a: 85 c0 test %eax,%eax 10839c: 74 10 je 1083ae <== ALWAYS TAKEN 10839e: 8b 40 1c mov 0x1c(%eax),%eax 1083a1: 85 c0 test %eax,%eax 1083a3: 74 09 je 1083ae 1083a5: 83 ec 0c sub $0xc,%esp 1083a8: 53 push %ebx 1083a9: ff d0 call *%eax 1083ab: 83 c4 10 add $0x10,%esp return result; } 1083ae: 89 f0 mov %esi,%eax 1083b0: 8d 65 f4 lea -0xc(%ebp),%esp 1083b3: 5b pop %ebx 1083b4: 5e pop %esi 1083b5: 5f pop %edi 1083b6: c9 leave 1083b7: c3 ret int result; if ( !(mode & (S_IFREG|S_IFCHR|S_IFBLK|S_IFIFO) ) ) rtems_set_errno_and_return_minus_one( EINVAL ); rtems_filesystem_get_start_loc( pathname, &i, &temp_loc ); 1083b8: 8d 5d d0 lea -0x30(%ebp),%ebx 1083bb: 8b 35 f8 4f 12 00 mov 0x124ff8,%esi 1083c1: 83 c6 04 add $0x4,%esi 1083c4: b9 05 00 00 00 mov $0x5,%ecx 1083c9: 89 df mov %ebx,%edi 1083cb: f3 a5 rep movsl %ds:(%esi),%es:(%edi) if ( !temp_loc.ops->evalformake_h ) { 1083cd: 8b 45 dc mov -0x24(%ebp),%eax 1083d0: 8b 40 04 mov 0x4(%eax),%eax 1083d3: 85 c0 test %eax,%eax 1083d5: 75 84 jne 10835b <== NEVER TAKEN if ( result != 0 ) return -1; if ( !temp_loc.ops->mknod_h ) { rtems_filesystem_freenode( &temp_loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); 1083d7: e8 34 b4 00 00 call 113810 <__errno> <== NOT EXECUTED 1083dc: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 1083e2: be ff ff ff ff mov $0xffffffff,%esi result = (*temp_loc.ops->mknod_h)( name_start, mode, dev, &temp_loc ); rtems_filesystem_freenode( &temp_loc ); return result; } 1083e7: 89 f0 mov %esi,%eax 1083e9: 8d 65 f4 lea -0xc(%ebp),%esp 1083ec: 5b pop %ebx 1083ed: 5e pop %esi 1083ee: 5f pop %edi 1083ef: c9 leave 1083f0: c3 ret 1083f1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED int i; const char *name_start; int result; if ( !(mode & (S_IFREG|S_IFCHR|S_IFBLK|S_IFIFO) ) ) rtems_set_errno_and_return_minus_one( EINVAL ); 1083f4: e8 17 b4 00 00 call 113810 <__errno> <== NOT EXECUTED 1083f9: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 1083ff: be ff ff ff ff mov $0xffffffff,%esi <== NOT EXECUTED 108404: eb a8 jmp 1083ae <== NOT EXECUTED ); if ( result != 0 ) return -1; if ( !temp_loc.ops->mknod_h ) { rtems_filesystem_freenode( &temp_loc ); 108406: 8b 41 1c mov 0x1c(%ecx),%eax <== NOT EXECUTED 108409: 85 c0 test %eax,%eax <== NOT EXECUTED 10840b: 74 ca je 1083d7 <== NOT EXECUTED 10840d: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 108410: 53 push %ebx <== NOT EXECUTED 108411: ff d0 call *%eax <== NOT EXECUTED 108413: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 108416: eb bf jmp 1083d7 <== NOT EXECUTED 00108440 : const rtems_filesystem_operations_table *fs_ops, rtems_filesystem_options_t options, const char *device, const char *mount_point ) { 108440: 55 push %ebp 108441: 89 e5 mov %esp,%ebp 108443: 57 push %edi 108444: 56 push %esi 108445: 53 push %ebx 108446: 83 ec 3c sub $0x3c,%esp 108449: 8b 75 14 mov 0x14(%ebp),%esi /* * Is there a file system operations table? */ if ( fs_ops == NULL ) { 10844c: 8b 5d 0c mov 0xc(%ebp),%ebx 10844f: 85 db test %ebx,%ebx 108451: 0f 84 1d 02 00 00 je 108674 /* * Are the file system options valid? */ if ( options != RTEMS_FILESYSTEM_READ_ONLY && 108457: 83 7d 10 01 cmpl $0x1,0x10(%ebp) 10845b: 0f 87 13 02 00 00 ja 108674 errno = EINVAL; return -1; } /* Do they support being mounted at all ? */ if ( !fs_ops->fsmount_me_h ) { 108461: 8b 45 0c mov 0xc(%ebp),%eax 108464: 8b 48 24 mov 0x24(%eax),%ecx 108467: 85 c9 test %ecx,%ecx 108469: 0f 84 32 02 00 00 je 1086a1 <== ALWAYS TAKEN /* * Allocate a mount table entry */ size = sizeof(rtems_filesystem_mount_table_entry_t); if ( device ) 10846f: 85 f6 test %esi,%esi 108471: 0f 84 a9 01 00 00 je 108620 <== NEVER TAKEN size += strlen( device ) + 1; 108477: 31 c0 xor %eax,%eax <== NOT EXECUTED 108479: b9 ff ff ff ff mov $0xffffffff,%ecx <== NOT EXECUTED 10847e: 89 f7 mov %esi,%edi <== NOT EXECUTED 108480: f2 ae repnz scas %es:(%edi),%al <== NOT EXECUTED 108482: f7 d1 not %ecx <== NOT EXECUTED 108484: 83 c1 6c add $0x6c,%ecx <== NOT EXECUTED temp_mt_entry = malloc( size ); 108487: 83 ec 0c sub $0xc,%esp 10848a: 51 push %ecx 10848b: e8 9c fd ff ff call 10822c <== ALWAYS TAKEN 108490: 89 c3 mov %eax,%ebx 108492: 89 45 c4 mov %eax,-0x3c(%ebp) if ( !temp_mt_entry ) { 108495: 83 c4 10 add $0x10,%esp 108498: 85 c0 test %eax,%eax 10849a: 0f 84 3b 02 00 00 je 1086db <== ALWAYS TAKEN errno = ENOMEM; return -1; } temp_mt_entry->mt_fs_root.mt_entry = temp_mt_entry; 1084a0: 89 43 2c mov %eax,0x2c(%ebx) temp_mt_entry->options = options; 1084a3: 8b 55 10 mov 0x10(%ebp),%edx 1084a6: 89 50 30 mov %edx,0x30(%eax) if ( device ) { 1084a9: 85 f6 test %esi,%esi 1084ab: 0f 84 63 01 00 00 je 108614 <== NEVER TAKEN temp_mt_entry->dev = (char *)temp_mt_entry + sizeof( rtems_filesystem_mount_table_entry_t ); 1084b1: 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 = 1084b4: 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 ); 1084b7: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 1084ba: 56 push %esi <== NOT EXECUTED 1084bb: 50 push %eax <== NOT EXECUTED 1084bc: e8 3f be 00 00 call 114300 <== NOT EXECUTED 1084c1: 83 c4 10 add $0x10,%esp <== NOT EXECUTED /* * The mount_point should be a directory with read/write/execute * permissions in the existing tree. */ if ( mount_point ) { 1084c4: 8b 55 18 mov 0x18(%ebp),%edx 1084c7: 85 d2 test %edx,%edx 1084c9: 0f 84 0d 01 00 00 je 1085dc if ( rtems_filesystem_evaluate_path( mount_point, strlen( mount_point ), RTEMS_LIBIO_PERMS_RWX, &loc, true ) == -1 ) 1084cf: 31 c0 xor %eax,%eax 1084d1: b9 ff ff ff ff mov $0xffffffff,%ecx 1084d6: 8b 7d 18 mov 0x18(%ebp),%edi 1084d9: f2 ae repnz scas %es:(%edi),%al 1084db: f7 d1 not %ecx 1084dd: 49 dec %ecx * permissions in the existing tree. */ if ( mount_point ) { if ( rtems_filesystem_evaluate_path( 1084de: 83 ec 0c sub $0xc,%esp 1084e1: 6a 01 push $0x1 1084e3: 8d 75 d4 lea -0x2c(%ebp),%esi 1084e6: 56 push %esi 1084e7: 6a 07 push $0x7 1084e9: 51 push %ecx 1084ea: ff 75 18 pushl 0x18(%ebp) 1084ed: e8 36 fa ff ff call 107f28 <== ALWAYS TAKEN 1084f2: 83 c4 20 add $0x20,%esp 1084f5: 40 inc %eax 1084f6: 0f 84 b7 01 00 00 je 1086b3 <== ALWAYS TAKEN /* * Test for node_type_h */ if (!loc.ops->node_type_h) { 1084fc: 8b 45 e0 mov -0x20(%ebp),%eax 1084ff: 8b 40 10 mov 0x10(%eax),%eax 108502: 85 c0 test %eax,%eax 108504: 0f 84 c1 01 00 00 je 1086cb <== ALWAYS TAKEN /* * Test to see if it is a directory */ if ( loc.ops->node_type_h( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { 10850a: 83 ec 0c sub $0xc,%esp 10850d: 56 push %esi 10850e: ff d0 call *%eax 108510: 83 c4 10 add $0x10,%esp 108513: 48 dec %eax 108514: 0f 85 77 01 00 00 jne 108691 /* * For each mount table entry */ for ( the_node = rtems_filesystem_mount_table_control.first; 10851a: a1 8c 72 12 00 mov 0x12728c,%eax 10851f: 3d 90 72 12 00 cmp $0x127290,%eax 108524: 0f 84 5f 01 00 00 je 108689 <== ALWAYS TAKEN !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 ) 10852a: 8b 55 d4 mov -0x2c(%ebp),%edx 10852d: 39 50 1c cmp %edx,0x1c(%eax) 108530: 75 07 jne 108539 <== NEVER TAKEN 108532: eb 78 jmp 1085ac <== NOT EXECUTED 108534: 39 50 1c cmp %edx,0x1c(%eax) 108537: 74 73 je 1085ac * 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 ) { 108539: 8b 00 mov (%eax),%eax /* * For each mount table entry */ for ( the_node = rtems_filesystem_mount_table_control.first; 10853b: 3d 90 72 12 00 cmp $0x127290,%eax 108540: 75 f2 jne 108534 * 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; 108542: 89 53 08 mov %edx,0x8(%ebx) temp_mt_entry->mt_point_node.handlers = loc.handlers; 108545: 8b 45 dc mov -0x24(%ebp),%eax 108548: 89 43 10 mov %eax,0x10(%ebx) temp_mt_entry->mt_point_node.ops = loc.ops; 10854b: 8b 45 e0 mov -0x20(%ebp),%eax 10854e: 89 43 14 mov %eax,0x14(%ebx) temp_mt_entry->mt_point_node.mt_entry = loc.mt_entry; 108551: 8b 55 e4 mov -0x1c(%ebp),%edx 108554: 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 ){ 108557: 8b 40 20 mov 0x20(%eax),%eax 10855a: 85 c0 test %eax,%eax 10855c: 0f 84 69 01 00 00 je 1086cb <== ALWAYS TAKEN errno = ENOTSUP; goto cleanup_and_bail; } if ( loc.ops->mount_h( temp_mt_entry ) ) { 108562: 83 ec 0c sub $0xc,%esp 108565: 53 push %ebx 108566: ff d0 call *%eax 108568: 83 c4 10 add $0x10,%esp 10856b: 85 c0 test %eax,%eax 10856d: 75 48 jne 1085b7 <== ALWAYS TAKEN temp_mt_entry->mt_point_node.handlers = NULL; temp_mt_entry->mt_point_node.ops = NULL; temp_mt_entry->mt_point_node.mt_entry = NULL; } if ( fs_ops->fsmount_me_h( temp_mt_entry ) ) { 10856f: 83 ec 0c sub $0xc,%esp 108572: 53 push %ebx 108573: 8b 55 0c mov 0xc(%ebp),%edx 108576: ff 52 24 call *0x24(%edx) 108579: 83 c4 10 add $0x10,%esp 10857c: 85 c0 test %eax,%eax 10857e: 0f 85 a8 00 00 00 jne 10862c <== ALWAYS TAKEN RTEMS_INLINE_ROUTINE void rtems_chain_append( rtems_chain_control *the_chain, rtems_chain_node *the_node ) { _Chain_Append( the_chain, the_node ); 108584: 83 ec 08 sub $0x8,%esp 108587: 53 push %ebx 108588: 68 8c 72 12 00 push $0x12728c 10858d: e8 e6 38 00 00 call 10be78 <_Chain_Append> */ rtems_chain_append( &rtems_filesystem_mount_table_control, &temp_mt_entry->Node ); if ( mt_entry ) 108592: 83 c4 10 add $0x10,%esp 108595: 8b 45 08 mov 0x8(%ebp),%eax 108598: 85 c0 test %eax,%eax 10859a: 74 05 je 1085a1 <== ALWAYS TAKEN *mt_entry = temp_mt_entry; 10859c: 8b 45 08 mov 0x8(%ebp),%eax 10859f: 89 18 mov %ebx,(%eax) 1085a1: 31 c0 xor %eax,%eax if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); return -1; } 1085a3: 8d 65 f4 lea -0xc(%ebp),%esp 1085a6: 5b pop %ebx 1085a7: 5e pop %esi 1085a8: 5f pop %edi 1085a9: c9 leave 1085aa: c3 ret 1085ab: 90 nop <== NOT EXECUTED /* * You can only mount one file system onto a single mount point. */ if ( Is_node_fs_root( &loc ) ){ errno = EBUSY; 1085ac: e8 5f b2 00 00 call 113810 <__errno> 1085b1: c7 00 10 00 00 00 movl $0x10,(%eax) return 0; cleanup_and_bail: free( temp_mt_entry ); 1085b7: 83 ec 0c sub $0xc,%esp 1085ba: 53 push %ebx 1085bb: e8 1c fa ff ff call 107fdc <== ALWAYS TAKEN 1085c0: 83 c4 10 add $0x10,%esp if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); 1085c3: 8b 46 0c mov 0xc(%esi),%eax 1085c6: 85 c0 test %eax,%eax 1085c8: 0f 85 8a 00 00 00 jne 108658 <== NEVER TAKEN 1085ce: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED return -1; } 1085d3: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 1085d6: 5b pop %ebx <== NOT EXECUTED 1085d7: 5e pop %esi <== NOT EXECUTED 1085d8: 5f pop %edi <== NOT EXECUTED 1085d9: c9 leave <== NOT EXECUTED 1085da: c3 ret <== NOT EXECUTED 1085db: 90 nop <== 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; 1085dc: c7 43 1c 00 00 00 00 movl $0x0,0x1c(%ebx) temp_mt_entry->mt_fs_root.handlers = NULL; 1085e3: c7 43 24 00 00 00 00 movl $0x0,0x24(%ebx) temp_mt_entry->mt_fs_root.ops = NULL; 1085ea: c7 43 28 00 00 00 00 movl $0x0,0x28(%ebx) temp_mt_entry->mt_point_node.node_access = NULL; 1085f1: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx) temp_mt_entry->mt_point_node.handlers = NULL; 1085f8: c7 43 10 00 00 00 00 movl $0x0,0x10(%ebx) temp_mt_entry->mt_point_node.ops = NULL; 1085ff: c7 43 14 00 00 00 00 movl $0x0,0x14(%ebx) temp_mt_entry->mt_point_node.mt_entry = NULL; 108606: c7 43 18 00 00 00 00 movl $0x0,0x18(%ebx) 10860d: 31 f6 xor %esi,%esi 10860f: e9 5b ff ff ff jmp 10856f <== ALWAYS TAKEN if ( device ) { temp_mt_entry->dev = (char *)temp_mt_entry + sizeof( rtems_filesystem_mount_table_entry_t ); strcpy( temp_mt_entry->dev, device ); } else temp_mt_entry->dev = 0; 108614: c7 40 68 00 00 00 00 movl $0x0,0x68(%eax) 10861b: e9 a4 fe ff ff jmp 1084c4 <== ALWAYS TAKEN /* * Allocate a mount table entry */ size = sizeof(rtems_filesystem_mount_table_entry_t); if ( device ) 108620: b9 6c 00 00 00 mov $0x6c,%ecx 108625: e9 5d fe ff ff jmp 108487 <== ALWAYS TAKEN 10862a: 66 90 xchg %ax,%ax <== NOT EXECUTED temp_mt_entry->mt_point_node.mt_entry = NULL; } if ( fs_ops->fsmount_me_h( temp_mt_entry ) ) { /* try to undo the mount operation */ if ( loc.ops->unmount_h ) { 10862c: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED 10862f: 8b 40 28 mov 0x28(%eax),%eax <== NOT EXECUTED 108632: 85 c0 test %eax,%eax <== NOT EXECUTED 108634: 74 09 je 10863f <== NOT EXECUTED loc.ops->unmount_h( temp_mt_entry ); 108636: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 108639: 53 push %ebx <== NOT EXECUTED 10863a: ff d0 call *%eax <== NOT EXECUTED 10863c: 83 c4 10 add $0x10,%esp <== NOT EXECUTED return 0; cleanup_and_bail: free( temp_mt_entry ); 10863f: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 108642: 53 push %ebx <== NOT EXECUTED 108643: e8 94 f9 ff ff call 107fdc <== NOT EXECUTED if ( loc_to_free ) 108648: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10864b: 85 f6 test %esi,%esi <== NOT EXECUTED 10864d: 0f 84 7b ff ff ff je 1085ce <== NOT EXECUTED 108653: e9 6b ff ff ff jmp 1085c3 <== NOT EXECUTED rtems_filesystem_freenode( loc_to_free ); 108658: 8b 40 1c mov 0x1c(%eax),%eax 10865b: 85 c0 test %eax,%eax 10865d: 0f 84 6b ff ff ff je 1085ce <== ALWAYS TAKEN 108663: 83 ec 0c sub $0xc,%esp 108666: 56 push %esi 108667: ff d0 call *%eax 108669: 83 c8 ff or $0xffffffff,%eax 10866c: 83 c4 10 add $0x10,%esp 10866f: e9 2f ff ff ff jmp 1085a3 <== ALWAYS TAKEN * Are the file system options valid? */ if ( options != RTEMS_FILESYSTEM_READ_ONLY && options != RTEMS_FILESYSTEM_READ_WRITE ) { errno = EINVAL; 108674: e8 97 b1 00 00 call 113810 <__errno> 108679: c7 00 16 00 00 00 movl $0x16,(%eax) 10867f: b8 ff ff ff ff mov $0xffffffff,%eax return -1; 108684: e9 1a ff ff ff jmp 1085a3 <== ALWAYS TAKEN cleanup_and_bail: free( temp_mt_entry ); if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); 108689: 8b 55 d4 mov -0x2c(%ebp),%edx <== NOT EXECUTED 10868c: e9 b1 fe ff ff jmp 108542 <== NOT EXECUTED /* * Test to see if it is a directory */ if ( loc.ops->node_type_h( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { errno = ENOTDIR; 108691: e8 7a b1 00 00 call 113810 <__errno> 108696: c7 00 14 00 00 00 movl $0x14,(%eax) goto cleanup_and_bail; 10869c: e9 16 ff ff ff jmp 1085b7 <== ALWAYS TAKEN return -1; } /* Do they support being mounted at all ? */ if ( !fs_ops->fsmount_me_h ) { errno = ENOTSUP; 1086a1: e8 6a b1 00 00 call 113810 <__errno> <== NOT EXECUTED 1086a6: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 1086ac: c7 45 c4 00 00 00 00 movl $0x0,-0x3c(%ebp) <== NOT EXECUTED return 0; cleanup_and_bail: free( temp_mt_entry ); 1086b3: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1086b6: ff 75 c4 pushl -0x3c(%ebp) <== NOT EXECUTED 1086b9: e8 1e f9 ff ff call 107fdc <== NOT EXECUTED 1086be: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 1086c3: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 1086c6: e9 d8 fe ff ff jmp 1085a3 <== NOT EXECUTED * 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; 1086cb: e8 40 b1 00 00 call 113810 <__errno> <== NOT EXECUTED 1086d0: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED goto cleanup_and_bail; 1086d6: e9 dc fe ff ff jmp 1085b7 <== NOT EXECUTED if ( device ) size += strlen( device ) + 1; temp_mt_entry = malloc( size ); if ( !temp_mt_entry ) { errno = ENOMEM; 1086db: e8 30 b1 00 00 call 113810 <__errno> <== NOT EXECUTED 1086e0: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED 1086e6: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED return -1; 1086e9: e9 b5 fe ff ff jmp 1085a3 <== NOT EXECUTED 0010f634 : */ int mq_close( mqd_t mqdes ) { 10f634: 55 push %ebp 10f635: 89 e5 mov %esp,%ebp 10f637: 53 push %ebx 10f638: 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( 10f63b: 8d 45 f4 lea -0xc(%ebp),%eax 10f63e: 50 push %eax 10f63f: ff 75 08 pushl 0x8(%ebp) 10f642: 68 60 05 13 00 push $0x130560 10f647: e8 90 32 00 00 call 1128dc <_Objects_Get> 10f64c: 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 ) { 10f64e: 83 c4 10 add $0x10,%esp 10f651: 8b 55 f4 mov -0xc(%ebp),%edx 10f654: 85 d2 test %edx,%edx 10f656: 75 38 jne 10f690 * 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; 10f658: 8b 40 10 mov 0x10(%eax),%eax the_mq->open_count -= 1; 10f65b: ff 48 18 decl 0x18(%eax) _POSIX_Message_queue_Delete( the_mq ); 10f65e: 83 ec 0c sub $0xc,%esp 10f661: 50 push %eax 10f662: e8 3d 00 00 00 call 10f6a4 <_POSIX_Message_queue_Delete> <== ALWAYS TAKEN /* * Now close this file descriptor. */ _Objects_Close( 10f667: 59 pop %ecx 10f668: 58 pop %eax 10f669: 53 push %ebx 10f66a: 68 60 05 13 00 push $0x130560 10f66f: e8 34 2e 00 00 call 1124a8 <_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 ); 10f674: 58 pop %eax 10f675: 5a pop %edx 10f676: 53 push %ebx 10f677: 68 60 05 13 00 push $0x130560 10f67c: e8 2b 31 00 00 call 1127ac <_Objects_Free> &_POSIX_Message_queue_Information_fds, &the_mq_fd->Object ); _POSIX_Message_queue_Free_fd( the_mq_fd ); _Thread_Enable_dispatch(); 10f681: e8 1a 3b 00 00 call 1131a0 <_Thread_Enable_dispatch> 10f686: 31 c0 xor %eax,%eax return 0; 10f688: 83 c4 10 add $0x10,%esp /* * OBJECTS_REMOTE: * OBJECTS_ERROR: */ rtems_set_errno_and_return_minus_one( EBADF ); } 10f68b: 8b 5d fc mov -0x4(%ebp),%ebx 10f68e: c9 leave 10f68f: c3 ret /* * OBJECTS_REMOTE: * OBJECTS_ERROR: */ rtems_set_errno_and_return_minus_one( EBADF ); 10f690: e8 cf 9f 00 00 call 119664 <__errno> 10f695: c7 00 09 00 00 00 movl $0x9,(%eax) 10f69b: b8 ff ff ff ff mov $0xffffffff,%eax 10f6a0: eb e9 jmp 10f68b <== ALWAYS TAKEN 0010f6f4 : int mq_getattr( mqd_t mqdes, struct mq_attr *mqstat ) { 10f6f4: 55 push %ebp 10f6f5: 89 e5 mov %esp,%ebp 10f6f7: 53 push %ebx 10f6f8: 83 ec 14 sub $0x14,%esp 10f6fb: 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 ) 10f6fe: 85 db test %ebx,%ebx 10f700: 74 54 je 10f756 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( 10f702: 51 push %ecx 10f703: 8d 45 f4 lea -0xc(%ebp),%eax 10f706: 50 push %eax 10f707: ff 75 08 pushl 0x8(%ebp) 10f70a: 68 60 05 13 00 push $0x130560 10f70f: e8 c8 31 00 00 call 1128dc <_Objects_Get> rtems_set_errno_and_return_minus_one( EINVAL ); the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { 10f714: 83 c4 10 add $0x10,%esp 10f717: 8b 55 f4 mov -0xc(%ebp),%edx 10f71a: 85 d2 test %edx,%edx 10f71c: 75 26 jne 10f744 case OBJECTS_LOCAL: the_mq = the_mq_fd->Queue; 10f71e: 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; 10f721: 8b 40 14 mov 0x14(%eax),%eax 10f724: 89 03 mov %eax,(%ebx) mqstat->mq_msgsize = the_mq->Message_queue.maximum_message_size; 10f726: 8b 42 68 mov 0x68(%edx),%eax 10f729: 89 43 08 mov %eax,0x8(%ebx) mqstat->mq_maxmsg = the_mq->Message_queue.maximum_pending_messages; 10f72c: 8b 42 60 mov 0x60(%edx),%eax 10f72f: 89 43 04 mov %eax,0x4(%ebx) mqstat->mq_curmsgs = the_mq->Message_queue.number_of_pending_messages; 10f732: 8b 42 64 mov 0x64(%edx),%eax 10f735: 89 43 0c mov %eax,0xc(%ebx) _Thread_Enable_dispatch(); 10f738: e8 63 3a 00 00 call 1131a0 <_Thread_Enable_dispatch> 10f73d: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); } 10f73f: 8b 5d fc mov -0x4(%ebp),%ebx 10f742: c9 leave 10f743: c3 ret #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); 10f744: e8 1b 9f 00 00 call 119664 <__errno> 10f749: c7 00 09 00 00 00 movl $0x9,(%eax) 10f74f: b8 ff ff ff ff mov $0xffffffff,%eax 10f754: eb e9 jmp 10f73f <== ALWAYS TAKEN POSIX_Message_queue_Control_fd *the_mq_fd; Objects_Locations location; CORE_message_queue_Attributes *the_mq_attr; if ( !mqstat ) rtems_set_errno_and_return_minus_one( EINVAL ); 10f756: e8 09 9f 00 00 call 119664 <__errno> 10f75b: c7 00 16 00 00 00 movl $0x16,(%eax) 10f761: b8 ff ff ff ff mov $0xffffffff,%eax 10f766: eb d7 jmp 10f73f <== ALWAYS TAKEN 0010f768 : int mq_notify( mqd_t mqdes, const struct sigevent *notification ) { 10f768: 55 push %ebp 10f769: 89 e5 mov %esp,%ebp 10f76b: 57 push %edi 10f76c: 56 push %esi 10f76d: 83 ec 14 sub $0x14,%esp 10f770: 8b 75 0c mov 0xc(%ebp),%esi 10f773: 8d 45 f4 lea -0xc(%ebp),%eax 10f776: 50 push %eax 10f777: ff 75 08 pushl 0x8(%ebp) 10f77a: 68 60 05 13 00 push $0x130560 10f77f: e8 58 31 00 00 call 1128dc <_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 ) { 10f784: 83 c4 10 add $0x10,%esp 10f787: 8b 4d f4 mov -0xc(%ebp),%ecx 10f78a: 85 c9 test %ecx,%ecx 10f78c: 74 1a je 10f7a8 #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); 10f78e: e8 d1 9e 00 00 call 119664 <__errno> 10f793: c7 00 09 00 00 00 movl $0x9,(%eax) 10f799: b8 ff ff ff ff mov $0xffffffff,%eax 10f79e: 66 90 xchg %ax,%ax } 10f7a0: 8d 65 f8 lea -0x8(%ebp),%esp 10f7a3: 5e pop %esi 10f7a4: 5f pop %edi 10f7a5: c9 leave 10f7a6: c3 ret 10f7a7: 90 nop <== NOT EXECUTED the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { case OBJECTS_LOCAL: the_mq = the_mq_fd->Queue; 10f7a8: 8b 40 10 mov 0x10(%eax),%eax if ( notification ) { 10f7ab: 85 f6 test %esi,%esi 10f7ad: 74 39 je 10f7e8 if ( _CORE_message_queue_Is_notify_enabled( &the_mq->Message_queue ) ) { 10f7af: 8b 50 7c mov 0x7c(%eax),%edx 10f7b2: 85 d2 test %edx,%edx 10f7b4: 75 46 jne 10f7fc CORE_message_queue_Notify_Handler the_handler, void *the_argument ) { the_message_queue->notify_handler = the_handler; the_message_queue->notify_argument = the_argument; 10f7b6: c7 80 80 00 00 00 00 movl $0x0,0x80(%eax) 10f7bd: 00 00 00 rtems_set_errno_and_return_minus_one( EBUSY ); } _CORE_message_queue_Set_notify( &the_mq->Message_queue, NULL, NULL ); the_mq->notification = *notification; 10f7c0: 8d b8 90 00 00 00 lea 0x90(%eax),%edi 10f7c6: b9 05 00 00 00 mov $0x5,%ecx 10f7cb: 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; 10f7cd: c7 40 7c 14 f8 10 00 movl $0x10f814,0x7c(%eax) the_message_queue->notify_argument = the_argument; 10f7d4: 89 80 80 00 00 00 mov %eax,0x80(%eax) _CORE_message_queue_Set_notify( &the_mq->Message_queue, NULL, NULL ); } _Thread_Enable_dispatch(); 10f7da: e8 c1 39 00 00 call 1131a0 <_Thread_Enable_dispatch> 10f7df: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); } 10f7e1: 8d 65 f8 lea -0x8(%ebp),%esp 10f7e4: 5e pop %esi 10f7e5: 5f pop %edi 10f7e6: c9 leave 10f7e7: c3 ret CORE_message_queue_Control *the_message_queue, CORE_message_queue_Notify_Handler the_handler, void *the_argument ) { the_message_queue->notify_handler = the_handler; 10f7e8: c7 40 7c 00 00 00 00 movl $0x0,0x7c(%eax) the_message_queue->notify_argument = the_argument; 10f7ef: c7 80 80 00 00 00 00 movl $0x0,0x80(%eax) 10f7f6: 00 00 00 10f7f9: eb df jmp 10f7da <== ALWAYS TAKEN 10f7fb: 90 nop <== NOT EXECUTED case OBJECTS_LOCAL: the_mq = the_mq_fd->Queue; if ( notification ) { if ( _CORE_message_queue_Is_notify_enabled( &the_mq->Message_queue ) ) { _Thread_Enable_dispatch(); 10f7fc: e8 9f 39 00 00 call 1131a0 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EBUSY ); 10f801: e8 5e 9e 00 00 call 119664 <__errno> 10f806: c7 00 10 00 00 00 movl $0x10,(%eax) 10f80c: b8 ff ff ff ff mov $0xffffffff,%eax 10f811: eb 8d jmp 10f7a0 <== ALWAYS TAKEN 0010f84c : int oflag, ... /* mode_t mode, */ /* struct mq_attr attr */ ) { 10f84c: 55 push %ebp 10f84d: 89 e5 mov %esp,%ebp 10f84f: 57 push %edi 10f850: 56 push %esi 10f851: 53 push %ebx 10f852: 83 ec 2c sub $0x2c,%esp 10f855: 8b 75 0c mov 0xc(%ebp),%esi rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10f858: a1 f8 ff 12 00 mov 0x12fff8,%eax 10f85d: 40 inc %eax 10f85e: a3 f8 ff 12 00 mov %eax,0x12fff8 POSIX_Message_queue_Control_fd *the_mq_fd; Objects_Locations location; _Thread_Disable_dispatch(); if ( oflag & O_CREAT ) { 10f863: 89 f0 mov %esi,%eax 10f865: 25 00 02 00 00 and $0x200,%eax 10f86a: 89 45 d4 mov %eax,-0x2c(%ebp) 10f86d: 0f 85 c9 00 00 00 jne 10f93c 10f873: c7 45 d0 00 00 00 00 movl $0x0,-0x30(%ebp) */ RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control_fd * _POSIX_Message_queue_Allocate_fd( void ) { return (POSIX_Message_queue_Control_fd *) 10f87a: 83 ec 0c sub $0xc,%esp 10f87d: 68 60 05 13 00 push $0x130560 10f882: e8 a5 2b 00 00 call 11242c <_Objects_Allocate> 10f887: 89 c3 mov %eax,%ebx attr = (struct mq_attr *) va_arg( arg, struct mq_attr * ); va_end(arg); } the_mq_fd = _POSIX_Message_queue_Allocate_fd(); if ( !the_mq_fd ) { 10f889: 83 c4 10 add $0x10,%esp 10f88c: 85 c0 test %eax,%eax 10f88e: 0f 84 b4 00 00 00 je 10f948 _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( ENFILE ); } the_mq_fd->oflag = oflag; 10f894: 89 70 14 mov %esi,0x14(%eax) status = _POSIX_Message_queue_Name_to_id( name, &the_mq_id ); 10f897: 83 ec 08 sub $0x8,%esp 10f89a: 8d 45 e4 lea -0x1c(%ebp),%eax 10f89d: 50 push %eax 10f89e: ff 75 08 pushl 0x8(%ebp) 10f8a1: e8 ce 64 00 00 call 115d74 <_POSIX_Message_queue_Name_to_id> 10f8a6: 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 ) { 10f8a8: 83 c4 10 add $0x10,%esp 10f8ab: 85 c0 test %eax,%eax 10f8ad: 75 59 jne 10f908 } else { /* name -> ID translation succeeded */ /* * Check for existence with creation. */ if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) { 10f8af: 81 e6 00 0a 00 00 and $0xa00,%esi 10f8b5: 81 fe 00 0a 00 00 cmp $0xa00,%esi 10f8bb: 0f 84 a7 00 00 00 je 10f968 RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control *_POSIX_Message_queue_Get ( Objects_Id id, Objects_Locations *location ) { return (POSIX_Message_queue_Control *) 10f8c1: 50 push %eax 10f8c2: 8d 45 dc lea -0x24(%ebp),%eax 10f8c5: 50 push %eax 10f8c6: ff 75 e4 pushl -0x1c(%ebp) 10f8c9: 68 c0 03 13 00 push $0x1303c0 10f8ce: e8 09 30 00 00 call 1128dc <_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 ); 10f8d3: 89 45 e0 mov %eax,-0x20(%ebp) the_mq->open_count += 1; 10f8d6: ff 40 18 incl 0x18(%eax) the_mq_fd->Queue = the_mq; 10f8d9: 89 43 10 mov %eax,0x10(%ebx) #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10f8dc: 0f b7 53 08 movzwl 0x8(%ebx),%edx 10f8e0: a1 7c 05 13 00 mov 0x13057c,%eax 10f8e5: 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; 10f8e8: 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(); 10f8ef: e8 ac 38 00 00 call 1131a0 <_Thread_Enable_dispatch> _Thread_Enable_dispatch(); 10f8f4: e8 a7 38 00 00 call 1131a0 <_Thread_Enable_dispatch> return (mqd_t)the_mq_fd->Object.id; 10f8f9: 8b 43 08 mov 0x8(%ebx),%eax 10f8fc: 83 c4 10 add $0x10,%esp ); _Thread_Enable_dispatch(); return (mqd_t) the_mq_fd->Object.id; } 10f8ff: 8d 65 f4 lea -0xc(%ebp),%esp 10f902: 5b pop %ebx 10f903: 5e pop %esi 10f904: 5f pop %edi 10f905: c9 leave 10f906: c3 ret 10f907: 90 nop <== NOT EXECUTED if ( status ) { /* * 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) ) ) { 10f908: 83 f8 02 cmp $0x2,%eax 10f90b: 0f 84 87 00 00 00 je 10f998 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 ); 10f911: 83 ec 08 sub $0x8,%esp 10f914: 53 push %ebx 10f915: 68 60 05 13 00 push $0x130560 10f91a: e8 8d 2e 00 00 call 1127ac <_Objects_Free> _POSIX_Message_queue_Free_fd( the_mq_fd ); _Thread_Enable_dispatch(); 10f91f: e8 7c 38 00 00 call 1131a0 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one_cast( status, mqd_t ); 10f924: e8 3b 9d 00 00 call 119664 <__errno> 10f929: 89 38 mov %edi,(%eax) 10f92b: b8 ff ff ff ff mov $0xffffffff,%eax 10f930: 83 c4 10 add $0x10,%esp ); _Thread_Enable_dispatch(); return (mqd_t) the_mq_fd->Object.id; } 10f933: 8d 65 f4 lea -0xc(%ebp),%esp 10f936: 5b pop %ebx 10f937: 5e pop %esi 10f938: 5f pop %edi 10f939: c9 leave 10f93a: c3 ret 10f93b: 90 nop <== NOT EXECUTED _Thread_Disable_dispatch(); if ( oflag & O_CREAT ) { va_start(arg, oflag); mode = (mode_t) va_arg( arg, unsigned int ); attr = (struct mq_attr *) va_arg( arg, struct mq_attr * ); 10f93c: 8b 45 14 mov 0x14(%ebp),%eax 10f93f: 89 45 d0 mov %eax,-0x30(%ebp) 10f942: e9 33 ff ff ff jmp 10f87a <== ALWAYS TAKEN 10f947: 90 nop <== NOT EXECUTED va_end(arg); } the_mq_fd = _POSIX_Message_queue_Allocate_fd(); if ( !the_mq_fd ) { _Thread_Enable_dispatch(); 10f948: e8 53 38 00 00 call 1131a0 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( ENFILE ); 10f94d: e8 12 9d 00 00 call 119664 <__errno> 10f952: c7 00 17 00 00 00 movl $0x17,(%eax) 10f958: b8 ff ff ff ff mov $0xffffffff,%eax ); _Thread_Enable_dispatch(); return (mqd_t) the_mq_fd->Object.id; } 10f95d: 8d 65 f4 lea -0xc(%ebp),%esp 10f960: 5b pop %ebx 10f961: 5e pop %esi 10f962: 5f pop %edi 10f963: c9 leave 10f964: c3 ret 10f965: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 10f968: 83 ec 08 sub $0x8,%esp 10f96b: 53 push %ebx 10f96c: 68 60 05 13 00 push $0x130560 10f971: e8 36 2e 00 00 call 1127ac <_Objects_Free> /* * Check for existence with creation. */ if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) { _POSIX_Message_queue_Free_fd( the_mq_fd ); _Thread_Enable_dispatch(); 10f976: e8 25 38 00 00 call 1131a0 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one_cast( EEXIST, mqd_t ); 10f97b: e8 e4 9c 00 00 call 119664 <__errno> 10f980: c7 00 11 00 00 00 movl $0x11,(%eax) 10f986: b8 ff ff ff ff mov $0xffffffff,%eax 10f98b: 83 c4 10 add $0x10,%esp ); _Thread_Enable_dispatch(); return (mqd_t) the_mq_fd->Object.id; } 10f98e: 8d 65 f4 lea -0xc(%ebp),%esp 10f991: 5b pop %ebx 10f992: 5e pop %esi 10f993: 5f pop %edi 10f994: c9 leave 10f995: c3 ret 10f996: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( status ) { /* * 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) ) ) { 10f998: 8b 55 d4 mov -0x2c(%ebp),%edx 10f99b: 85 d2 test %edx,%edx 10f99d: 0f 84 6e ff ff ff je 10f911 /* * 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( 10f9a3: 8d 45 e0 lea -0x20(%ebp),%eax 10f9a6: 50 push %eax 10f9a7: ff 75 d0 pushl -0x30(%ebp) 10f9aa: 6a 01 push $0x1 10f9ac: ff 75 08 pushl 0x8(%ebp) 10f9af: e8 2c 62 00 00 call 115be0 <_POSIX_Message_queue_Create_support> ); /* * errno was set by Create_support, so don't set it again. */ if ( status == -1 ) { 10f9b4: 83 c4 10 add $0x10,%esp 10f9b7: 40 inc %eax 10f9b8: 74 26 je 10f9e0 _POSIX_Message_queue_Free_fd( the_mq_fd ); _Thread_Enable_dispatch(); return (mqd_t) -1; } the_mq_fd->Queue = the_mq; 10f9ba: 8b 45 e0 mov -0x20(%ebp),%eax 10f9bd: 89 43 10 mov %eax,0x10(%ebx) #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10f9c0: 0f b7 53 08 movzwl 0x8(%ebx),%edx 10f9c4: a1 7c 05 13 00 mov 0x13057c,%eax 10f9c9: 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; 10f9cc: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx) &_POSIX_Message_queue_Information_fds, &the_mq_fd->Object, NULL ); _Thread_Enable_dispatch(); 10f9d3: e8 c8 37 00 00 call 1131a0 <_Thread_Enable_dispatch> return (mqd_t) the_mq_fd->Object.id; 10f9d8: 8b 43 08 mov 0x8(%ebx),%eax 10f9db: e9 1f ff ff ff jmp 10f8ff <== ALWAYS TAKEN 10f9e0: 83 ec 08 sub $0x8,%esp 10f9e3: 53 push %ebx 10f9e4: 68 60 05 13 00 push $0x130560 10f9e9: e8 be 2d 00 00 call 1127ac <_Objects_Free> /* * errno was set by Create_support, so don't set it again. */ if ( status == -1 ) { _POSIX_Message_queue_Free_fd( the_mq_fd ); _Thread_Enable_dispatch(); 10f9ee: e8 ad 37 00 00 call 1131a0 <_Thread_Enable_dispatch> 10f9f3: b8 ff ff ff ff mov $0xffffffff,%eax return (mqd_t) -1; 10f9f8: 83 c4 10 add $0x10,%esp 10f9fb: e9 ff fe ff ff jmp 10f8ff <== ALWAYS TAKEN 0010fa00 : mqd_t mqdes, char *msg_ptr, size_t msg_len, unsigned int *msg_prio ) { 10fa00: 55 push %ebp 10fa01: 89 e5 mov %esp,%ebp 10fa03: 83 ec 10 sub $0x10,%esp return _POSIX_Message_queue_Receive_support( 10fa06: 6a 00 push $0x0 10fa08: 6a 01 push $0x1 10fa0a: ff 75 14 pushl 0x14(%ebp) 10fa0d: ff 75 10 pushl 0x10(%ebp) 10fa10: ff 75 0c pushl 0xc(%ebp) 10fa13: ff 75 08 pushl 0x8(%ebp) 10fa16: e8 05 00 00 00 call 10fa20 <_POSIX_Message_queue_Receive_support> <== ALWAYS TAKEN msg_len, msg_prio, true, THREAD_QUEUE_WAIT_FOREVER ); } 10fa1b: c9 leave 10fa1c: c3 ret 0010fb3c : mqd_t mqdes, const char *msg_ptr, size_t msg_len, unsigned int msg_prio ) { 10fb3c: 55 push %ebp 10fb3d: 89 e5 mov %esp,%ebp 10fb3f: 83 ec 10 sub $0x10,%esp return _POSIX_Message_queue_Send_support( 10fb42: 6a 00 push $0x0 10fb44: 6a 01 push $0x1 10fb46: ff 75 14 pushl 0x14(%ebp) 10fb49: ff 75 10 pushl 0x10(%ebp) 10fb4c: ff 75 0c pushl 0xc(%ebp) 10fb4f: ff 75 08 pushl 0x8(%ebp) 10fb52: e8 05 00 00 00 call 10fb5c <_POSIX_Message_queue_Send_support> <== ALWAYS TAKEN msg_len, msg_prio, true, THREAD_QUEUE_WAIT_FOREVER ); } 10fb57: c9 leave 10fb58: c3 ret 0010fc60 : int mq_setattr( mqd_t mqdes, const struct mq_attr *mqstat, struct mq_attr *omqstat ) { 10fc60: 55 push %ebp 10fc61: 89 e5 mov %esp,%ebp 10fc63: 56 push %esi 10fc64: 53 push %ebx 10fc65: 83 ec 10 sub $0x10,%esp 10fc68: 8b 75 0c mov 0xc(%ebp),%esi 10fc6b: 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 ) 10fc6e: 85 f6 test %esi,%esi 10fc70: 74 60 je 10fcd2 10fc72: 51 push %ecx 10fc73: 8d 45 f4 lea -0xc(%ebp),%eax 10fc76: 50 push %eax 10fc77: ff 75 08 pushl 0x8(%ebp) 10fc7a: 68 60 05 13 00 push $0x130560 10fc7f: e8 58 2c 00 00 call 1128dc <_Objects_Get> rtems_set_errno_and_return_minus_one( EINVAL ); the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { 10fc84: 83 c4 10 add $0x10,%esp 10fc87: 8b 55 f4 mov -0xc(%ebp),%edx 10fc8a: 85 d2 test %edx,%edx 10fc8c: 75 32 jne 10fcc0 case OBJECTS_LOCAL: the_core_mq = &the_mq_fd->Queue->Message_queue; 10fc8e: 8b 50 10 mov 0x10(%eax),%edx /* * Return the old values. */ if ( omqstat ) { 10fc91: 85 db test %ebx,%ebx 10fc93: 74 17 je 10fcac omqstat->mq_flags = the_mq_fd->oflag; 10fc95: 8b 48 14 mov 0x14(%eax),%ecx 10fc98: 89 0b mov %ecx,(%ebx) omqstat->mq_msgsize = the_core_mq->maximum_message_size; 10fc9a: 8b 4a 68 mov 0x68(%edx),%ecx 10fc9d: 89 4b 08 mov %ecx,0x8(%ebx) omqstat->mq_maxmsg = the_core_mq->maximum_pending_messages; 10fca0: 8b 4a 60 mov 0x60(%edx),%ecx 10fca3: 89 4b 04 mov %ecx,0x4(%ebx) omqstat->mq_curmsgs = the_core_mq->number_of_pending_messages; 10fca6: 8b 52 64 mov 0x64(%edx),%edx 10fca9: 89 53 0c mov %edx,0xc(%ebx) } the_mq_fd->oflag = mqstat->mq_flags; 10fcac: 8b 16 mov (%esi),%edx 10fcae: 89 50 14 mov %edx,0x14(%eax) _Thread_Enable_dispatch(); 10fcb1: e8 ea 34 00 00 call 1131a0 <_Thread_Enable_dispatch> 10fcb6: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); } 10fcb8: 8d 65 f8 lea -0x8(%ebp),%esp 10fcbb: 5b pop %ebx 10fcbc: 5e pop %esi 10fcbd: c9 leave 10fcbe: c3 ret 10fcbf: 90 nop <== NOT EXECUTED #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); 10fcc0: e8 9f 99 00 00 call 119664 <__errno> 10fcc5: c7 00 09 00 00 00 movl $0x9,(%eax) 10fccb: b8 ff ff ff ff mov $0xffffffff,%eax 10fcd0: eb e6 jmp 10fcb8 <== ALWAYS TAKEN POSIX_Message_queue_Control_fd *the_mq_fd; CORE_message_queue_Control *the_core_mq; Objects_Locations location; if ( !mqstat ) rtems_set_errno_and_return_minus_one( EINVAL ); 10fcd2: e8 8d 99 00 00 call 119664 <__errno> 10fcd7: c7 00 16 00 00 00 movl $0x16,(%eax) 10fcdd: b8 ff ff ff ff mov $0xffffffff,%eax 10fce2: eb d4 jmp 10fcb8 <== ALWAYS TAKEN 0010fce4 : char *msg_ptr, size_t msg_len, unsigned int *msg_prio, const struct timespec *abstime ) { 10fce4: 55 push %ebp 10fce5: 89 e5 mov %esp,%ebp 10fce7: 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 ); 10fcea: 8d 45 f4 lea -0xc(%ebp),%eax 10fced: 50 push %eax 10fcee: ff 75 18 pushl 0x18(%ebp) 10fcf1: e8 d6 00 00 00 call 10fdcc <_POSIX_Absolute_timeout_to_ticks> <== ALWAYS TAKEN if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE ) do_wait = false; return _POSIX_Message_queue_Receive_support( 10fcf6: 5a pop %edx 10fcf7: 59 pop %ecx 10fcf8: ff 75 f4 pushl -0xc(%ebp) 10fcfb: 83 f8 03 cmp $0x3,%eax 10fcfe: 0f 94 c0 sete %al 10fd01: 0f b6 c0 movzbl %al,%eax 10fd04: 50 push %eax 10fd05: ff 75 14 pushl 0x14(%ebp) 10fd08: ff 75 10 pushl 0x10(%ebp) 10fd0b: ff 75 0c pushl 0xc(%ebp) 10fd0e: ff 75 08 pushl 0x8(%ebp) 10fd11: e8 0a fd ff ff call 10fa20 <_POSIX_Message_queue_Receive_support> <== ALWAYS TAKEN msg_len, msg_prio, do_wait, ticks ); } 10fd16: c9 leave 10fd17: c3 ret 0010fd18 : const char *msg_ptr, size_t msg_len, unsigned int msg_prio, const struct timespec *abstime ) { 10fd18: 55 push %ebp 10fd19: 89 e5 mov %esp,%ebp 10fd1b: 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 ); 10fd1e: 8d 45 f4 lea -0xc(%ebp),%eax 10fd21: 50 push %eax 10fd22: ff 75 18 pushl 0x18(%ebp) 10fd25: e8 a2 00 00 00 call 10fdcc <_POSIX_Absolute_timeout_to_ticks> <== ALWAYS TAKEN if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE ) do_wait = false; return _POSIX_Message_queue_Send_support( 10fd2a: 5a pop %edx 10fd2b: 59 pop %ecx 10fd2c: ff 75 f4 pushl -0xc(%ebp) 10fd2f: 83 f8 03 cmp $0x3,%eax 10fd32: 0f 94 c0 sete %al 10fd35: 0f b6 c0 movzbl %al,%eax 10fd38: 50 push %eax 10fd39: ff 75 14 pushl 0x14(%ebp) 10fd3c: ff 75 10 pushl 0x10(%ebp) 10fd3f: ff 75 0c pushl 0xc(%ebp) 10fd42: ff 75 08 pushl 0x8(%ebp) 10fd45: e8 12 fe ff ff call 10fb5c <_POSIX_Message_queue_Send_support> <== ALWAYS TAKEN msg_len, msg_prio, do_wait, ticks ); } 10fd4a: c9 leave 10fd4b: c3 ret 0010fd5c : */ int mq_unlink( const char *name ) { 10fd5c: 55 push %ebp 10fd5d: 89 e5 mov %esp,%ebp 10fd5f: 53 push %ebx 10fd60: 83 ec 1c sub $0x1c,%esp 10fd63: a1 f8 ff 12 00 mov 0x12fff8,%eax 10fd68: 40 inc %eax 10fd69: a3 f8 ff 12 00 mov %eax,0x12fff8 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 ); 10fd6e: 8d 45 f4 lea -0xc(%ebp),%eax 10fd71: 50 push %eax 10fd72: ff 75 08 pushl 0x8(%ebp) 10fd75: e8 fa 5f 00 00 call 115d74 <_POSIX_Message_queue_Name_to_id> 10fd7a: 89 c3 mov %eax,%ebx if ( status != 0 ) { 10fd7c: 83 c4 10 add $0x10,%esp 10fd7f: 85 c0 test %eax,%eax 10fd81: 75 35 jne 10fdb8 _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( status ); } the_mq = (POSIX_Message_queue_Control *) _Objects_Get_local_object( 10fd83: 0f b7 55 f4 movzwl -0xc(%ebp),%edx 10fd87: a1 dc 03 13 00 mov 0x1303dc,%eax 10fd8c: 8b 1c 90 mov (%eax,%edx,4),%ebx &_POSIX_Message_queue_Information, _Objects_Get_index( the_mq_id ) ); the_mq->linked = false; 10fd8f: 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( 10fd93: 83 ec 08 sub $0x8,%esp 10fd96: 53 push %ebx 10fd97: 68 c0 03 13 00 push $0x1303c0 10fd9c: e8 8b 2c 00 00 call 112a2c <_Objects_Namespace_remove> _POSIX_Message_queue_Namespace_remove( the_mq ); _POSIX_Message_queue_Delete( the_mq ); 10fda1: 89 1c 24 mov %ebx,(%esp) 10fda4: e8 fb f8 ff ff call 10f6a4 <_POSIX_Message_queue_Delete> <== ALWAYS TAKEN _Thread_Enable_dispatch(); 10fda9: e8 f2 33 00 00 call 1131a0 <_Thread_Enable_dispatch> 10fdae: 31 c0 xor %eax,%eax return 0; 10fdb0: 83 c4 10 add $0x10,%esp } 10fdb3: 8b 5d fc mov -0x4(%ebp),%ebx 10fdb6: c9 leave 10fdb7: c3 ret _Thread_Disable_dispatch(); status = _POSIX_Message_queue_Name_to_id( name, &the_mq_id ); if ( status != 0 ) { _Thread_Enable_dispatch(); 10fdb8: e8 e3 33 00 00 call 1131a0 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( status ); 10fdbd: e8 a2 98 00 00 call 119664 <__errno> 10fdc2: 89 18 mov %ebx,(%eax) 10fdc4: b8 ff ff ff ff mov $0xffffffff,%eax 10fdc9: eb e8 jmp 10fdb3 <== ALWAYS TAKEN 00129000 : int nanosleep( const struct timespec *rqtp, struct timespec *rmtp ) { 129000: 55 push %ebp 129001: 89 e5 mov %esp,%ebp 129003: 56 push %esi 129004: 53 push %ebx 129005: 8b 5d 08 mov 0x8(%ebp),%ebx 129008: 8b 75 0c mov 0xc(%ebp),%esi Watchdog_Interval ticks; if ( !_Timespec_Is_valid( rqtp ) ) 12900b: 83 ec 0c sub $0xc,%esp 12900e: 53 push %ebx 12900f: e8 18 01 00 00 call 12912c <_Timespec_Is_valid> <== ALWAYS TAKEN 129014: 83 c4 10 add $0x10,%esp 129017: 84 c0 test %al,%al 129019: 0f 84 e1 00 00 00 je 129100 * 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 ) 12901f: 8b 13 mov (%ebx),%edx 129021: 85 d2 test %edx,%edx 129023: 0f 88 d7 00 00 00 js 129100 <== ALWAYS TAKEN 129029: 8b 43 04 mov 0x4(%ebx),%eax 12902c: 85 c0 test %eax,%eax 12902e: 0f 88 cc 00 00 00 js 129100 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); ticks = _Timespec_To_ticks( rqtp ); 129034: 83 ec 0c sub $0xc,%esp 129037: 53 push %ebx 129038: e8 57 fd fe ff call 118d94 <_Timespec_To_ticks> 12903d: 89 c3 mov %eax,%ebx * 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 ) { 12903f: 83 c4 10 add $0x10,%esp 129042: 85 c0 test %eax,%eax 129044: 75 36 jne 12907c rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 129046: a1 f8 4f 13 00 mov 0x134ff8,%eax 12904b: 40 inc %eax 12904c: a3 f8 4f 13 00 mov %eax,0x134ff8 _Thread_Disable_dispatch(); _Thread_Yield_processor(); 129051: e8 d6 9d fe ff call 112e2c <_Thread_Yield_processor> _Thread_Enable_dispatch(); 129056: e8 c9 91 fe ff call 112224 <_Thread_Enable_dispatch> if ( rmtp ) { 12905b: 85 f6 test %esi,%esi 12905d: 0f 84 93 00 00 00 je 1290f6 rmtp->tv_sec = 0; 129063: c7 06 00 00 00 00 movl $0x0,(%esi) rmtp->tv_nsec = 0; 129069: c7 46 04 00 00 00 00 movl $0x0,0x4(%esi) 129070: 31 c0 xor %eax,%eax rtems_set_errno_and_return_minus_one( EINTR ); #endif } return 0; } 129072: 8d 65 f8 lea -0x8(%ebp),%esp 129075: 5b pop %ebx 129076: 5e pop %esi 129077: c9 leave 129078: c3 ret 129079: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 12907c: a1 f8 4f 13 00 mov 0x134ff8,%eax 129081: 40 inc %eax 129082: a3 f8 4f 13 00 mov %eax,0x134ff8 /* * Block for the desired amount of time */ _Thread_Disable_dispatch(); _Thread_Set_state( 129087: 83 ec 08 sub $0x8,%esp 12908a: 68 08 00 00 10 push $0x10000008 12908f: ff 35 b8 50 13 00 pushl 0x1350b8 129095: e8 7a 9a fe ff call 112b14 <_Thread_Set_state> STATES_DELAYING | STATES_INTERRUPTIBLE_BY_SIGNAL ); _Watchdog_Initialize( &_Thread_Executing->Timer, _Thread_Delay_ended, _Thread_Executing->Object.id, 12909a: 8b 15 b8 50 13 00 mov 0x1350b8,%edx _Thread_Disable_dispatch(); _Thread_Set_state( _Thread_Executing, STATES_DELAYING | STATES_INTERRUPTIBLE_BY_SIGNAL ); _Watchdog_Initialize( 1290a0: 8b 42 08 mov 0x8(%edx),%eax Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 1290a3: c7 42 50 00 00 00 00 movl $0x0,0x50(%edx) the_watchdog->routine = routine; 1290aa: c7 42 64 8c 20 11 00 movl $0x11208c,0x64(%edx) the_watchdog->id = id; 1290b1: 89 42 68 mov %eax,0x68(%edx) the_watchdog->user_data = user_data; 1290b4: c7 42 6c 00 00 00 00 movl $0x0,0x6c(%edx) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 1290bb: 89 5a 54 mov %ebx,0x54(%edx) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 1290be: 58 pop %eax 1290bf: 59 pop %ecx 1290c0: 83 c2 48 add $0x48,%edx 1290c3: 52 push %edx 1290c4: 68 d8 50 13 00 push $0x1350d8 1290c9: e8 3e a1 fe ff call 11320c <_Watchdog_Insert> _Thread_Delay_ended, _Thread_Executing->Object.id, NULL ); _Watchdog_Insert_ticks( &_Thread_Executing->Timer, ticks ); _Thread_Enable_dispatch(); 1290ce: e8 51 91 fe ff call 112224 <_Thread_Enable_dispatch> /* calculate time remaining */ if ( rmtp ) { 1290d3: 83 c4 10 add $0x10,%esp 1290d6: 85 f6 test %esi,%esi 1290d8: 74 1c je 1290f6 ticks -= _Thread_Executing->Timer.stop_time - _Thread_Executing->Timer.start_time; 1290da: a1 b8 50 13 00 mov 0x1350b8,%eax _Thread_Enable_dispatch(); /* calculate time remaining */ if ( rmtp ) { ticks -= 1290df: 03 58 5c add 0x5c(%eax),%ebx 1290e2: 2b 58 60 sub 0x60(%eax),%ebx _Thread_Executing->Timer.stop_time - _Thread_Executing->Timer.start_time; _Timespec_From_ticks( ticks, rmtp ); 1290e5: 83 ec 08 sub $0x8,%esp 1290e8: 56 push %esi 1290e9: 53 push %ebx 1290ea: e8 5d fc fe ff call 118d4c <_Timespec_From_ticks> */ #if defined(RTEMS_POSIX_API) /* * If there is time remaining, then we were interrupted by a signal. */ if ( ticks ) 1290ef: 83 c4 10 add $0x10,%esp 1290f2: 85 db test %ebx,%ebx 1290f4: 75 1f jne 129115 rtems_set_errno_and_return_minus_one( EINTR ); 1290f6: 31 c0 xor %eax,%eax #endif } return 0; } 1290f8: 8d 65 f8 lea -0x8(%ebp),%esp 1290fb: 5b pop %ebx 1290fc: 5e pop %esi 1290fd: c9 leave 1290fe: c3 ret 1290ff: 90 nop <== NOT EXECUTED * * 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 ) rtems_set_errno_and_return_minus_one( EINVAL ); 129100: e8 2b 2d ff ff call 11be30 <__errno> 129105: c7 00 16 00 00 00 movl $0x16,(%eax) 12910b: b8 ff ff ff ff mov $0xffffffff,%eax 129110: e9 5d ff ff ff jmp 129072 <== ALWAYS TAKEN #if defined(RTEMS_POSIX_API) /* * If there is time remaining, then we were interrupted by a signal. */ if ( ticks ) rtems_set_errno_and_return_minus_one( EINTR ); 129115: e8 16 2d ff ff call 11be30 <__errno> 12911a: c7 00 04 00 00 00 movl $0x4,(%eax) 129120: b8 ff ff ff ff mov $0xffffffff,%eax 129125: e9 48 ff ff ff jmp 129072 <== ALWAYS TAKEN 001087c4 : */ bool newlib_create_hook( rtems_tcb *current_task __attribute__((unused)), rtems_tcb *creating_task ) { 1087c4: 55 push %ebp 1087c5: 89 e5 mov %esp,%ebp 1087c7: 57 push %edi 1087c8: 56 push %esi 1087c9: 53 push %ebx 1087ca: 83 ec 0c sub $0xc,%esp struct _reent *ptr; if (_Thread_libc_reent == 0) 1087cd: a1 64 74 12 00 mov 0x127464,%eax 1087d2: 85 c0 test %eax,%eax 1087d4: 0f 84 52 02 00 00 je 108a2c ptr = (struct _reent *) calloc(1, sizeof(struct _reent)); #else /* It is OK to allocate from the workspace because these * hooks run with thread dispatching disabled. */ ptr = (struct _reent *) _Workspace_Allocate(sizeof(struct _reent)); 1087da: 83 ec 0c sub $0xc,%esp 1087dd: 68 24 04 00 00 push $0x424 1087e2: e8 55 5e 00 00 call 10e63c <_Workspace_Allocate> 1087e7: 89 c2 mov %eax,%edx #endif if (ptr) { 1087e9: 83 c4 10 add $0x10,%esp 1087ec: 85 c0 test %eax,%eax 1087ee: 0f 84 2c 02 00 00 je 108a20 _REENT_INIT_PTR((ptr)); /* GCC extension: structure constants */ 1087f4: c7 00 00 00 00 00 movl $0x0,(%eax) 1087fa: 8d 98 ec 02 00 00 lea 0x2ec(%eax),%ebx 108800: 89 58 04 mov %ebx,0x4(%eax) 108803: 8d 80 54 03 00 00 lea 0x354(%eax),%eax 108809: 89 42 08 mov %eax,0x8(%edx) 10880c: 8d 82 bc 03 00 00 lea 0x3bc(%edx),%eax 108812: 89 42 0c mov %eax,0xc(%edx) 108815: c7 42 10 00 00 00 00 movl $0x0,0x10(%edx) 10881c: 8d 72 14 lea 0x14(%edx),%esi 10881f: 31 c0 xor %eax,%eax 108821: b9 19 00 00 00 mov $0x19,%ecx 108826: 89 f7 mov %esi,%edi 108828: f3 aa rep stos %al,%es:(%edi) 10882a: c7 42 30 00 00 00 00 movl $0x0,0x30(%edx) 108831: c7 42 34 c8 0c 12 00 movl $0x120cc8,0x34(%edx) 108838: c7 42 38 00 00 00 00 movl $0x0,0x38(%edx) 10883f: c7 42 3c 00 00 00 00 movl $0x0,0x3c(%edx) 108846: c7 42 40 00 00 00 00 movl $0x0,0x40(%edx) 10884d: c7 42 44 00 00 00 00 movl $0x0,0x44(%edx) 108854: c7 42 48 00 00 00 00 movl $0x0,0x48(%edx) 10885b: c7 42 4c 00 00 00 00 movl $0x0,0x4c(%edx) 108862: c7 42 50 00 00 00 00 movl $0x0,0x50(%edx) 108869: c7 42 54 00 00 00 00 movl $0x0,0x54(%edx) 108870: c7 42 58 00 00 00 00 movl $0x0,0x58(%edx) 108877: c7 42 5c 00 00 00 00 movl $0x0,0x5c(%edx) 10887e: c6 42 60 00 movb $0x0,0x60(%edx) 108882: 8d 72 7c lea 0x7c(%edx),%esi 108885: b1 24 mov $0x24,%cl 108887: 89 f7 mov %esi,%edi 108889: f3 aa rep stos %al,%es:(%edi) 10888b: c7 82 a0 00 00 00 00 movl $0x0,0xa0(%edx) 108892: 00 00 00 108895: c7 82 a4 00 00 00 01 movl $0x1,0xa4(%edx) 10889c: 00 00 00 10889f: c7 82 a8 00 00 00 00 movl $0x0,0xa8(%edx) 1088a6: 00 00 00 1088a9: 66 c7 82 ac 00 00 00 movw $0x330e,0xac(%edx) 1088b0: 0e 33 1088b2: 66 c7 82 ae 00 00 00 movw $0xabcd,0xae(%edx) 1088b9: cd ab 1088bb: 66 c7 82 b0 00 00 00 movw $0x1234,0xb0(%edx) 1088c2: 34 12 1088c4: 66 c7 82 b2 00 00 00 movw $0xe66d,0xb2(%edx) 1088cb: 6d e6 1088cd: 66 c7 82 b4 00 00 00 movw $0xdeec,0xb4(%edx) 1088d4: ec de 1088d6: 66 c7 82 b6 00 00 00 movw $0x5,0xb6(%edx) 1088dd: 05 00 1088df: 66 c7 82 b8 00 00 00 movw $0xb,0xb8(%edx) 1088e6: 0b 00 1088e8: c7 82 bc 00 00 00 00 movl $0x0,0xbc(%edx) 1088ef: 00 00 00 1088f2: c7 82 c0 00 00 00 00 movl $0x0,0xc0(%edx) 1088f9: 00 00 00 1088fc: c7 82 c4 00 00 00 00 movl $0x0,0xc4(%edx) 108903: 00 00 00 108906: c7 82 c8 00 00 00 00 movl $0x0,0xc8(%edx) 10890d: 00 00 00 108910: c7 82 cc 00 00 00 00 movl $0x0,0xcc(%edx) 108917: 00 00 00 10891a: c7 82 d0 00 00 00 00 movl $0x0,0xd0(%edx) 108921: 00 00 00 108924: c7 82 f8 00 00 00 00 movl $0x0,0xf8(%edx) 10892b: 00 00 00 10892e: c7 82 fc 00 00 00 00 movl $0x0,0xfc(%edx) 108935: 00 00 00 108938: c7 82 00 01 00 00 00 movl $0x0,0x100(%edx) 10893f: 00 00 00 108942: c7 82 04 01 00 00 00 movl $0x0,0x104(%edx) 108949: 00 00 00 10894c: c7 82 08 01 00 00 00 movl $0x0,0x108(%edx) 108953: 00 00 00 108956: c7 82 0c 01 00 00 00 movl $0x0,0x10c(%edx) 10895d: 00 00 00 108960: c7 82 10 01 00 00 00 movl $0x0,0x110(%edx) 108967: 00 00 00 10896a: c7 82 14 01 00 00 00 movl $0x0,0x114(%edx) 108971: 00 00 00 108974: c7 82 18 01 00 00 00 movl $0x0,0x118(%edx) 10897b: 00 00 00 10897e: c7 82 1c 01 00 00 00 movl $0x0,0x11c(%edx) 108985: 00 00 00 108988: c6 82 d4 00 00 00 00 movb $0x0,0xd4(%edx) 10898f: c6 82 dc 00 00 00 00 movb $0x0,0xdc(%edx) 108996: c7 82 f4 00 00 00 00 movl $0x0,0xf4(%edx) 10899d: 00 00 00 1089a0: c7 82 48 01 00 00 00 movl $0x0,0x148(%edx) 1089a7: 00 00 00 1089aa: c7 82 4c 01 00 00 00 movl $0x0,0x14c(%edx) 1089b1: 00 00 00 1089b4: c7 82 50 01 00 00 00 movl $0x0,0x150(%edx) 1089bb: 00 00 00 1089be: c7 82 54 01 00 00 00 movl $0x0,0x154(%edx) 1089c5: 00 00 00 1089c8: c7 82 d4 02 00 00 00 movl $0x0,0x2d4(%edx) 1089cf: 00 00 00 1089d2: c7 82 d4 01 00 00 00 movl $0x0,0x1d4(%edx) 1089d9: 00 00 00 1089dc: c7 82 dc 02 00 00 00 movl $0x0,0x2dc(%edx) 1089e3: 00 00 00 1089e6: c7 82 e0 02 00 00 00 movl $0x0,0x2e0(%edx) 1089ed: 00 00 00 1089f0: c7 82 e4 02 00 00 00 movl $0x0,0x2e4(%edx) 1089f7: 00 00 00 1089fa: c7 82 e8 02 00 00 00 movl $0x0,0x2e8(%edx) 108a01: 00 00 00 108a04: 66 b9 38 01 mov $0x138,%cx 108a08: 89 df mov %ebx,%edi 108a0a: f3 aa rep stos %al,%es:(%edi) creating_task->libc_reent = ptr; 108a0c: 8b 45 0c mov 0xc(%ebp),%eax 108a0f: 89 90 f0 00 00 00 mov %edx,0xf0(%eax) 108a15: b0 01 mov $0x1,%al return TRUE; } return FALSE; } 108a17: 8d 65 f4 lea -0xc(%ebp),%esp 108a1a: 5b pop %ebx 108a1b: 5e pop %esi 108a1c: 5f pop %edi 108a1d: c9 leave 108a1e: c3 ret 108a1f: 90 nop <== NOT EXECUTED * hooks run with thread dispatching disabled. */ ptr = (struct _reent *) _Workspace_Allocate(sizeof(struct _reent)); #endif if (ptr) { 108a20: 31 c0 xor %eax,%eax creating_task->libc_reent = ptr; return TRUE; } return FALSE; } 108a22: 8d 65 f4 lea -0xc(%ebp),%esp 108a25: 5b pop %ebx 108a26: 5e pop %esi 108a27: 5f pop %edi 108a28: c9 leave 108a29: c3 ret 108a2a: 66 90 xchg %ax,%ax <== NOT EXECUTED { struct _reent *ptr; if (_Thread_libc_reent == 0) { _REENT = _global_impure_ptr; 108a2c: a1 40 19 12 00 mov 0x121940,%eax 108a31: a3 00 51 12 00 mov %eax,0x125100 RTEMS_INLINE_ROUTINE void _Thread_Set_libc_reent ( struct _reent **libc_reent ) { _Thread_libc_reent = libc_reent; 108a36: c7 05 64 74 12 00 00 movl $0x125100,0x127464 108a3d: 51 12 00 108a40: e9 95 fd ff ff jmp 1087da <== ALWAYS TAKEN 001086f8 : void newlib_delete_hook( rtems_tcb *current_task, rtems_tcb *deleted_task ) { 1086f8: 55 push %ebp 1086f9: 89 e5 mov %esp,%ebp 1086fb: 57 push %edi 1086fc: 56 push %esi 1086fd: 53 push %ebx 1086fe: 83 ec 0c sub $0xc,%esp 108701: 8b 7d 08 mov 0x8(%ebp),%edi 108704: 8b 5d 0c mov 0xc(%ebp),%ebx /* * The reentrancy structure was allocated by newlib using malloc() */ if (current_task == deleted_task) { 108707: 39 df cmp %ebx,%edi 108709: 74 55 je 108760 ptr = _REENT; } else { ptr = deleted_task->libc_reent; 10870b: 8b b3 f0 00 00 00 mov 0xf0(%ebx),%esi } if (ptr && ptr != _global_impure_ptr) { 108711: 85 f6 test %esi,%esi 108713: 74 21 je 108736 <== ALWAYS TAKEN 108715: 3b 35 40 19 12 00 cmp 0x121940,%esi 10871b: 74 19 je 108736 _reclaim_reent(ptr); */ /* * Just in case there are some buffers lying around. */ _fwalk(ptr, newlib_free_buffers); 10871d: 83 ec 08 sub $0x8,%esp 108720: 68 68 87 10 00 push $0x108768 108725: 56 push %esi 108726: e8 6d b8 00 00 call 113f98 <_fwalk> #if REENT_MALLOCED free(ptr); #else _Workspace_Free(ptr); 10872b: 89 34 24 mov %esi,(%esp) 10872e: e8 25 5f 00 00 call 10e658 <_Workspace_Free> 108733: 83 c4 10 add $0x10,%esp #endif } deleted_task->libc_reent = NULL; 108736: c7 83 f0 00 00 00 00 movl $0x0,0xf0(%ebx) 10873d: 00 00 00 /* * Require the switch back to another task to install its own */ if ( current_task == deleted_task ) { 108740: 39 df cmp %ebx,%edi 108742: 74 08 je 10874c _REENT = 0; } } 108744: 8d 65 f4 lea -0xc(%ebp),%esp 108747: 5b pop %ebx 108748: 5e pop %esi 108749: 5f pop %edi 10874a: c9 leave 10874b: c3 ret /* * Require the switch back to another task to install its own */ if ( current_task == deleted_task ) { _REENT = 0; 10874c: c7 05 00 51 12 00 00 movl $0x0,0x125100 108753: 00 00 00 } } 108756: 8d 65 f4 lea -0xc(%ebp),%esp 108759: 5b pop %ebx 10875a: 5e pop %esi 10875b: 5f pop %edi 10875c: c9 leave 10875d: c3 ret 10875e: 66 90 xchg %ax,%ax <== NOT EXECUTED /* * The reentrancy structure was allocated by newlib using malloc() */ if (current_task == deleted_task) { ptr = _REENT; 108760: 8b 35 00 51 12 00 mov 0x125100,%esi 108766: eb a9 jmp 108711 <== ALWAYS TAKEN 00108768 : */ int newlib_free_buffers( FILE *fp ) { 108768: 55 push %ebp 108769: 89 e5 mov %esp,%ebp 10876b: 53 push %ebx 10876c: 83 ec 10 sub $0x10,%esp 10876f: 8b 5d 08 mov 0x8(%ebp),%ebx switch ( fileno(fp) ) { 108772: 53 push %ebx 108773: e8 28 b4 00 00 call 113ba0 108778: 83 c4 10 add $0x10,%esp 10877b: 83 f8 02 cmp $0x2,%eax 10877e: 76 14 jbe 108794 <== NEVER TAKEN fp->_flags &= ~__SMBF; fp->_bf._base = fp->_p = (unsigned char *) NULL; } break; default: fclose(fp); 108780: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 108783: 53 push %ebx <== NOT EXECUTED 108784: e8 d3 b1 00 00 call 11395c <== NOT EXECUTED 108789: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } return 0; } 10878c: 31 c0 xor %eax,%eax 10878e: 8b 5d fc mov -0x4(%ebp),%ebx 108791: c9 leave 108792: c3 ret 108793: 90 nop <== NOT EXECUTED { switch ( fileno(fp) ) { case 0: case 1: case 2: if (fp->_flags & __SMBF) { 108794: 80 7b 0c 00 cmpb $0x0,0xc(%ebx) 108798: 79 f2 jns 10878c <== NEVER TAKEN free( fp->_bf._base ); 10879a: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10879d: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED 1087a0: e8 37 f8 ff ff call 107fdc <== NOT EXECUTED fp->_flags &= ~__SMBF; 1087a5: 66 81 63 0c 7f ff andw $0xff7f,0xc(%ebx) <== NOT EXECUTED fp->_bf._base = fp->_p = (unsigned char *) NULL; 1087ab: c7 03 00 00 00 00 movl $0x0,(%ebx) <== NOT EXECUTED 1087b1: c7 43 10 00 00 00 00 movl $0x0,0x10(%ebx) <== NOT EXECUTED 1087b8: 83 c4 10 add $0x10,%esp <== NOT EXECUTED break; default: fclose(fp); } return 0; } 1087bb: 31 c0 xor %eax,%eax <== NOT EXECUTED 1087bd: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 1087c0: c9 leave <== NOT EXECUTED 1087c1: c3 ret <== NOT EXECUTED 00108660 : rtems_device_driver null_initialize( rtems_device_major_number major, rtems_device_minor_number minor __attribute__((unused)), void *pargp __attribute__((unused)) ) { 108660: 55 push %ebp 108661: 89 e5 mov %esp,%ebp 108663: 53 push %ebx 108664: 83 ec 04 sub $0x4,%esp 108667: 8b 5d 08 mov 0x8(%ebp),%ebx rtems_device_driver status; if ( !initialized ) { 10866a: 80 3d 98 96 12 00 00 cmpb $0x0,0x129698 108671: 74 09 je 10867c NULL_major = major; } return RTEMS_SUCCESSFUL; } 108673: 31 c0 xor %eax,%eax 108675: 8b 5d fc mov -0x4(%ebp),%ebx 108678: c9 leave 108679: c3 ret 10867a: 66 90 xchg %ax,%ax <== NOT EXECUTED ) { rtems_device_driver status; if ( !initialized ) { initialized = 1; 10867c: c6 05 98 96 12 00 01 movb $0x1,0x129698 status = rtems_io_register_name( 108683: 50 push %eax 108684: 6a 00 push $0x0 108686: 53 push %ebx 108687: 68 ab 24 12 00 push $0x1224ab 10868c: e8 1f 01 00 00 call 1087b0 <== ALWAYS TAKEN "/dev/null", major, (rtems_device_minor_number) 0 ); if (status != RTEMS_SUCCESSFUL) 108691: 83 c4 10 add $0x10,%esp 108694: 85 c0 test %eax,%eax 108696: 75 0d jne 1086a5 <== ALWAYS TAKEN rtems_fatal_error_occurred(status); NULL_major = major; 108698: 89 1d 00 9a 12 00 mov %ebx,0x129a00 } return RTEMS_SUCCESSFUL; } 10869e: 31 c0 xor %eax,%eax 1086a0: 8b 5d fc mov -0x4(%ebp),%ebx 1086a3: c9 leave 1086a4: c3 ret major, (rtems_device_minor_number) 0 ); if (status != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred(status); 1086a5: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1086a8: 50 push %eax <== NOT EXECUTED 1086a9: e8 96 42 00 00 call 10c944 <== NOT EXECUTED 00108644 : rtems_device_driver null_write( rtems_device_major_number major __attribute__((unused)), rtems_device_minor_number minor __attribute__((unused)), void *pargp ) { 108644: 55 push %ebp 108645: 89 e5 mov %esp,%ebp 108647: 8b 45 10 mov 0x10(%ebp),%eax rtems_libio_rw_args_t *rw_args = (rtems_libio_rw_args_t *) pargp; if ( rw_args ) 10864a: 85 c0 test %eax,%eax 10864c: 74 06 je 108654 <== NEVER TAKEN rw_args->bytes_moved = rw_args->count; 10864e: 8b 50 10 mov 0x10(%eax),%edx <== NOT EXECUTED 108651: 89 50 18 mov %edx,0x18(%eax) <== NOT EXECUTED return NULL_SUCCESSFUL; } 108654: 31 c0 xor %eax,%eax 108656: c9 leave 108657: c3 ret 00108aa8 : int open( const char *pathname, int flags, ... ) { 108aa8: 55 push %ebp 108aa9: 89 e5 mov %esp,%ebp 108aab: 57 push %edi 108aac: 56 push %esi 108aad: 53 push %ebx 108aae: 83 ec 4c sub $0x4c,%esp /* * Set the Evaluation flags */ eval_flags = 0; status = flags + 1; 108ab1: 8b 45 0c mov 0xc(%ebp),%eax 108ab4: 40 inc %eax if ( ( status & _FREAD ) == _FREAD ) 108ab5: 89 c6 mov %eax,%esi 108ab7: 83 e6 01 and $0x1,%esi 108aba: f7 de neg %esi 108abc: 83 e6 04 and $0x4,%esi eval_flags |= RTEMS_LIBIO_PERMS_READ; if ( ( status & _FWRITE ) == _FWRITE ) 108abf: a8 02 test $0x2,%al 108ac1: 74 03 je 108ac6 eval_flags |= RTEMS_LIBIO_PERMS_WRITE; 108ac3: 83 ce 02 or $0x2,%esi va_start(ap, flags); mode = va_arg( ap, int ); 108ac6: 8b 45 10 mov 0x10(%ebp),%eax 108ac9: 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(); 108acc: e8 7f 71 00 00 call 10fc50 <== ALWAYS TAKEN 108ad1: 89 c3 mov %eax,%ebx if ( iop == 0 ) { 108ad3: 85 c0 test %eax,%eax 108ad5: 0f 84 bd 00 00 00 je 108b98 /* * See if the file exists. */ status = rtems_filesystem_evaluate_path( pathname, strlen( pathname ), eval_flags, &loc, true ); 108adb: b9 ff ff ff ff mov $0xffffffff,%ecx 108ae0: 8b 7d 08 mov 0x8(%ebp),%edi 108ae3: 31 c0 xor %eax,%eax 108ae5: f2 ae repnz scas %es:(%edi),%al 108ae7: f7 d1 not %ecx 108ae9: 49 dec %ecx /* * See if the file exists. */ status = rtems_filesystem_evaluate_path( 108aea: 83 ec 0c sub $0xc,%esp 108aed: 6a 01 push $0x1 108aef: 8d 45 d4 lea -0x2c(%ebp),%eax 108af2: 89 45 b4 mov %eax,-0x4c(%ebp) 108af5: 50 push %eax 108af6: 56 push %esi 108af7: 51 push %ecx 108af8: ff 75 08 pushl 0x8(%ebp) 108afb: e8 28 f4 ff ff call 107f28 <== ALWAYS TAKEN 108b00: 89 c6 mov %eax,%esi pathname, strlen( pathname ), eval_flags, &loc, true ); if ( status == -1 ) { 108b02: 83 c4 20 add $0x20,%esp 108b05: 83 f8 ff cmp $0xffffffff,%eax 108b08: 0f 84 f2 00 00 00 je 108c00 if ( status != 0 ) { /* The file did not exist */ rc = EACCES; goto done; } } else if ((flags & (O_EXCL|O_CREAT)) == (O_EXCL|O_CREAT)) { 108b0e: 8b 45 0c mov 0xc(%ebp),%eax 108b11: 25 00 0a 00 00 and $0xa00,%eax 108b16: 3d 00 0a 00 00 cmp $0xa00,%eax 108b1b: 0f 84 8b 00 00 00 je 108bac <== ALWAYS TAKEN /* * Fill in the file control block based on the loc structure * returned by successful path evaluation. */ iop->handlers = loc.handlers; 108b21: 8b 45 dc mov -0x24(%ebp),%eax 108b24: 89 43 3c mov %eax,0x3c(%ebx) iop->file_info = loc.node_access; 108b27: 8b 45 d4 mov -0x2c(%ebp),%eax 108b2a: 89 43 38 mov %eax,0x38(%ebx) iop->flags |= rtems_libio_fcntl_flags( flags ); 108b2d: 8b 73 14 mov 0x14(%ebx),%esi 108b30: 83 ec 0c sub $0xc,%esp 108b33: ff 75 0c pushl 0xc(%ebp) 108b36: e8 a1 71 00 00 call 10fcdc <== ALWAYS TAKEN 108b3b: 09 f0 or %esi,%eax 108b3d: 89 43 14 mov %eax,0x14(%ebx) iop->pathinfo = loc; 108b40: 8d 7b 18 lea 0x18(%ebx),%edi 108b43: b9 05 00 00 00 mov $0x5,%ecx 108b48: 8b 75 b4 mov -0x4c(%ebp),%esi 108b4b: f3 a5 rep movsl %ds:(%esi),%es:(%edi) if ( !iop->handlers || !iop->handlers->open_h ) { 108b4d: 8b 43 3c mov 0x3c(%ebx),%eax 108b50: 83 c4 10 add $0x10,%esp 108b53: 85 c0 test %eax,%eax 108b55: 0f 84 99 00 00 00 je 108bf4 <== ALWAYS TAKEN 108b5b: 8b 00 mov (%eax),%eax 108b5d: 85 c0 test %eax,%eax 108b5f: 0f 84 8f 00 00 00 je 108bf4 <== ALWAYS TAKEN rc = ENOTSUP; goto done; } rc = (*iop->handlers->open_h)( iop, pathname, flags, mode ); 108b65: ff 75 c4 pushl -0x3c(%ebp) 108b68: ff 75 0c pushl 0xc(%ebp) 108b6b: ff 75 08 pushl 0x8(%ebp) 108b6e: 53 push %ebx 108b6f: ff d0 call *%eax if ( rc ) { 108b71: 83 c4 10 add $0x10,%esp 108b74: 85 c0 test %eax,%eax 108b76: 75 6c jne 108be4 /* * Optionally truncate the file. */ if ( (flags & O_TRUNC) == O_TRUNC ) { 108b78: f7 45 0c 00 04 00 00 testl $0x400,0xc(%ebp) 108b7f: 0f 85 93 00 00 00 jne 108c18 if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); rtems_set_errno_and_return_minus_one( rc ); } return iop - rtems_libio_iops; 108b85: 89 d8 mov %ebx,%eax 108b87: 2b 05 40 72 12 00 sub 0x127240,%eax 108b8d: c1 f8 06 sar $0x6,%eax } 108b90: 8d 65 f4 lea -0xc(%ebp),%esp 108b93: 5b pop %ebx 108b94: 5e pop %esi 108b95: 5f pop %edi 108b96: c9 leave 108b97: c3 ret * descriptors are obtained using socket(), not open(). */ /* allocate a file control block */ iop = rtems_libio_allocate(); if ( iop == 0 ) { 108b98: be 17 00 00 00 mov $0x17,%esi if ( rc ) { if ( iop ) rtems_libio_free( iop ); if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); rtems_set_errno_and_return_minus_one( rc ); 108b9d: e8 6e ac 00 00 call 113810 <__errno> 108ba2: 89 30 mov %esi,(%eax) 108ba4: b8 ff ff ff ff mov $0xffffffff,%eax 108ba9: eb e5 jmp 108b90 <== ALWAYS TAKEN 108bab: 90 nop <== NOT EXECUTED if ( status != 0 ) { /* The file did not exist */ rc = EACCES; goto done; } } else if ((flags & (O_EXCL|O_CREAT)) == (O_EXCL|O_CREAT)) { 108bac: 8d 7d d4 lea -0x2c(%ebp),%edi 108baf: be 11 00 00 00 mov $0x11,%esi done: va_end(ap); if ( rc ) { if ( iop ) 108bb4: 85 db test %ebx,%ebx 108bb6: 74 0c je 108bc4 <== ALWAYS TAKEN rtems_libio_free( iop ); 108bb8: 83 ec 0c sub $0xc,%esp 108bbb: 53 push %ebx 108bbc: e8 37 70 00 00 call 10fbf8 108bc1: 83 c4 10 add $0x10,%esp if ( loc_to_free ) 108bc4: 85 ff test %edi,%edi 108bc6: 74 d5 je 108b9d rtems_filesystem_freenode( loc_to_free ); 108bc8: 8b 47 0c mov 0xc(%edi),%eax 108bcb: 85 c0 test %eax,%eax 108bcd: 74 ce je 108b9d <== ALWAYS TAKEN 108bcf: 8b 40 1c mov 0x1c(%eax),%eax 108bd2: 85 c0 test %eax,%eax 108bd4: 74 c7 je 108b9d <== ALWAYS TAKEN 108bd6: 83 ec 0c sub $0xc,%esp 108bd9: 57 push %edi 108bda: ff d0 call *%eax 108bdc: 83 c4 10 add $0x10,%esp 108bdf: eb bc jmp 108b9d <== ALWAYS TAKEN 108be1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED goto done; } rc = (*iop->handlers->open_h)( iop, pathname, flags, mode ); if ( rc ) { rc = errno; 108be4: e8 27 ac 00 00 call 113810 <__errno> 108be9: 8b 30 mov (%eax),%esi 108beb: 8d 7d d4 lea -0x2c(%ebp),%edi */ done: va_end(ap); if ( rc ) { 108bee: 85 f6 test %esi,%esi 108bf0: 74 93 je 108b85 <== ALWAYS TAKEN 108bf2: eb c0 jmp 108bb4 <== ALWAYS TAKEN if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); rtems_set_errno_and_return_minus_one( rc ); } return iop - rtems_libio_iops; 108bf4: 8d 7d d4 lea -0x2c(%ebp),%edi <== NOT EXECUTED 108bf7: be 86 00 00 00 mov $0x86,%esi <== NOT EXECUTED 108bfc: eb b6 jmp 108bb4 <== NOT EXECUTED 108bfe: 66 90 xchg %ax,%ax <== NOT EXECUTED status = rtems_filesystem_evaluate_path( pathname, strlen( pathname ), eval_flags, &loc, true ); if ( status == -1 ) { if ( errno != ENOENT ) { 108c00: e8 0b ac 00 00 call 113810 <__errno> 108c05: 83 38 02 cmpl $0x2,(%eax) 108c08: 74 5e je 108c68 } /* Create the node for the new regular file */ rc = mknod( pathname, S_IFREG | mode, 0LL ); if ( rc ) { rc = errno; 108c0a: e8 01 ac 00 00 call 113810 <__errno> 108c0f: 8b 30 mov (%eax),%esi 108c11: 31 ff xor %edi,%edi goto done; 108c13: eb d9 jmp 108bee <== ALWAYS TAKEN 108c15: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED /* * Optionally truncate the file. */ if ( (flags & O_TRUNC) == O_TRUNC ) { rc = ftruncate( iop - rtems_libio_iops, 0 ); 108c18: 83 ec 08 sub $0x8,%esp 108c1b: 6a 00 push $0x0 108c1d: 89 d8 mov %ebx,%eax 108c1f: 2b 05 40 72 12 00 sub 0x127240,%eax 108c25: c1 f8 06 sar $0x6,%eax 108c28: 50 push %eax 108c29: e8 5a 6d 00 00 call 10f988 108c2e: 89 c6 mov %eax,%esi if ( rc ) { 108c30: 83 c4 10 add $0x10,%esp 108c33: 85 c0 test %eax,%eax 108c35: 0f 84 4a ff ff ff je 108b85 <== NEVER TAKEN if(errno) rc = errno; 108c3b: e8 d0 ab 00 00 call 113810 <__errno> <== NOT EXECUTED 108c40: 8b 00 mov (%eax),%eax <== NOT EXECUTED 108c42: 85 c0 test %eax,%eax <== NOT EXECUTED 108c44: 0f 85 8b 00 00 00 jne 108cd5 <== NOT EXECUTED close( iop - rtems_libio_iops ); 108c4a: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 108c4d: 2b 1d 40 72 12 00 sub 0x127240,%ebx <== NOT EXECUTED 108c53: c1 fb 06 sar $0x6,%ebx <== NOT EXECUTED 108c56: 53 push %ebx <== NOT EXECUTED 108c57: e8 9c 6c 00 00 call 10f8f8 <== NOT EXECUTED 108c5c: 31 ff xor %edi,%edi <== NOT EXECUTED 108c5e: 31 db xor %ebx,%ebx <== NOT EXECUTED 108c60: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 108c63: eb 89 jmp 108bee <== NOT EXECUTED 108c65: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED rc = errno; goto done; } /* If the file does not exist and we are not trying to create it--> error */ if ( !(flags & O_CREAT) ) { 108c68: f7 45 0c 00 02 00 00 testl $0x200,0xc(%ebp) 108c6f: 75 0f jne 108c80 108c71: 31 ff xor %edi,%edi 108c73: be 02 00 00 00 mov $0x2,%esi 108c78: e9 37 ff ff ff jmp 108bb4 <== ALWAYS TAKEN 108c7d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED rc = ENOENT; goto done; } /* Create the node for the new regular file */ rc = mknod( pathname, S_IFREG | mode, 0LL ); 108c80: 6a 00 push $0x0 108c82: 6a 00 push $0x0 108c84: 8b 45 c4 mov -0x3c(%ebp),%eax 108c87: 80 cc 80 or $0x80,%ah 108c8a: 50 push %eax 108c8b: ff 75 08 pushl 0x8(%ebp) 108c8e: e8 75 f6 ff ff call 108308 <== ALWAYS TAKEN if ( rc ) { 108c93: 83 c4 10 add $0x10,%esp 108c96: 85 c0 test %eax,%eax 108c98: 0f 85 6c ff ff ff jne 108c0a <== ALWAYS TAKEN rc = errno; goto done; } /* Sanity check to see if the file name exists after the mknod() */ status = rtems_filesystem_evaluate_path( pathname, strlen( pathname ), 0x0, &loc, true ); 108c9e: 89 f1 mov %esi,%ecx 108ca0: 8b 7d 08 mov 0x8(%ebp),%edi 108ca3: 31 c0 xor %eax,%eax 108ca5: f2 ae repnz scas %es:(%edi),%al 108ca7: f7 d1 not %ecx 108ca9: 49 dec %ecx 108caa: 83 ec 0c sub $0xc,%esp 108cad: 6a 01 push $0x1 108caf: 8d 45 d4 lea -0x2c(%ebp),%eax 108cb2: 50 push %eax 108cb3: 6a 00 push $0x0 108cb5: 51 push %ecx 108cb6: ff 75 08 pushl 0x8(%ebp) 108cb9: e8 6a f2 ff ff call 107f28 if ( status != 0 ) { /* The file did not exist */ 108cbe: 83 c4 20 add $0x20,%esp 108cc1: 85 c0 test %eax,%eax 108cc3: 0f 84 58 fe ff ff je 108b21 <== NEVER TAKEN 108cc9: 31 ff xor %edi,%edi <== NOT EXECUTED 108ccb: be 0d 00 00 00 mov $0xd,%esi <== NOT EXECUTED 108cd0: e9 df fe ff ff jmp 108bb4 <== NOT EXECUTED */ if ( (flags & O_TRUNC) == O_TRUNC ) { rc = ftruncate( iop - rtems_libio_iops, 0 ); if ( rc ) { if(errno) rc = errno; 108cd5: e8 36 ab 00 00 call 113810 <__errno> <== NOT EXECUTED 108cda: 8b 30 mov (%eax),%esi <== NOT EXECUTED 108cdc: e9 69 ff ff ff jmp 108c4a <== NOT EXECUTED 00108a48 : /* * This is a replaceable stub which opens the console, if present. */ void open_dev_console(void) { 108a48: 55 push %ebp 108a49: 89 e5 mov %esp,%ebp 108a4b: 83 ec 0c sub $0xc,%esp int stderr_fd; /* * Attempt to open /dev/console. */ if ((stdin_fd = open("/dev/console", O_RDONLY, 0)) == -1) { 108a4e: 6a 00 push $0x0 108a50: 6a 00 push $0x0 108a52: 68 d0 f4 11 00 push $0x11f4d0 108a57: e8 4c 00 00 00 call 108aa8 <== ALWAYS TAKEN 108a5c: 83 c4 10 add $0x10,%esp 108a5f: 40 inc %eax 108a60: 74 2a je 108a8c /* * 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) 108a62: 52 push %edx 108a63: 6a 00 push $0x0 108a65: 6a 01 push $0x1 108a67: 68 d0 f4 11 00 push $0x11f4d0 108a6c: e8 37 00 00 00 call 108aa8 <== ALWAYS TAKEN 108a71: 83 c4 10 add $0x10,%esp 108a74: 40 inc %eax 108a75: 74 24 je 108a9b <== ALWAYS TAKEN rtems_fatal_error_occurred( 0x55544431 ); /* error STD1 */ if ((stderr_fd = open("/dev/console", O_WRONLY, 0)) == -1) 108a77: 50 push %eax 108a78: 6a 00 push $0x0 108a7a: 6a 01 push $0x1 108a7c: 68 d0 f4 11 00 push $0x11f4d0 108a81: e8 22 00 00 00 call 108aa8 <== ALWAYS TAKEN 108a86: 83 c4 10 add $0x10,%esp 108a89: 40 inc %eax 108a8a: 74 02 je 108a8e <== ALWAYS TAKEN rtems_fatal_error_occurred( 0x55544432 ); /* error STD2 */ } 108a8c: c9 leave 108a8d: c3 ret */ if ((stdout_fd = open("/dev/console", O_WRONLY, 0)) == -1) rtems_fatal_error_occurred( 0x55544431 ); /* error STD1 */ if ((stderr_fd = open("/dev/console", O_WRONLY, 0)) == -1) rtems_fatal_error_occurred( 0x55544432 ); /* error STD2 */ 108a8e: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 108a91: 68 32 44 54 55 push $0x55544432 <== NOT EXECUTED 108a96: e8 01 31 00 00 call 10bb9c <== NOT EXECUTED /* * 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) rtems_fatal_error_occurred( 0x55544431 ); /* error STD1 */ 108a9b: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 108a9e: 68 31 44 54 55 push $0x55544431 <== NOT EXECUTED 108aa3: e8 f4 30 00 00 call 10bb9c <== NOT EXECUTED 001095c4 : /* * Handle output processing */ static void oproc (unsigned char c, struct rtems_termios_tty *tty) { 1095c4: 55 push %ebp 1095c5: 89 e5 mov %esp,%ebp 1095c7: 56 push %esi 1095c8: 53 push %ebx 1095c9: 83 ec 10 sub $0x10,%esp 1095cc: 88 45 f4 mov %al,-0xc(%ebp) int i; if (tty->termios.c_oflag & OPOST) { 1095cf: 8b 4a 34 mov 0x34(%edx),%ecx 1095d2: f6 c1 01 test $0x1,%cl 1095d5: 74 31 je 109608 <== ALWAYS TAKEN switch (c) { 1095d7: 3c 09 cmp $0x9,%al 1095d9: 0f 84 b1 00 00 00 je 109690 1095df: 76 3f jbe 109620 <== ALWAYS TAKEN 1095e1: 3c 0a cmp $0xa,%al 1095e3: 74 4f je 109634 1095e5: 3c 0d cmp $0xd,%al 1095e7: 74 7f je 109668 <== ALWAYS TAKEN if (tty->column > 0) tty->column--; break; default: if (tty->termios.c_oflag & OLCUC) 1095e9: 83 e1 02 and $0x2,%ecx 1095ec: 0f 85 c6 00 00 00 jne 1096b8 <== ALWAYS TAKEN 1095f2: 8b 0d e8 50 12 00 mov 0x1250e8,%ecx c = toupper(c); if (!iscntrl(c)) 1095f8: 0f b6 c0 movzbl %al,%eax 1095fb: f6 44 01 01 20 testb $0x20,0x1(%ecx,%eax,1) 109600: 75 06 jne 109608 <== ALWAYS TAKEN tty->column++; 109602: ff 42 28 incl 0x28(%edx) 109605: 8d 76 00 lea 0x0(%esi),%esi break; } } rtems_termios_puts (&c, 1, tty); 109608: 50 push %eax 109609: 52 push %edx 10960a: 6a 01 push $0x1 10960c: 8d 45 f4 lea -0xc(%ebp),%eax 10960f: 50 push %eax 109610: e8 7b fe ff ff call 109490 <== ALWAYS TAKEN 109615: 83 c4 10 add $0x10,%esp } 109618: 8d 65 f8 lea -0x8(%ebp),%esp 10961b: 5b pop %ebx 10961c: 5e pop %esi 10961d: c9 leave 10961e: c3 ret 10961f: 90 nop <== NOT EXECUTED oproc (unsigned char c, struct rtems_termios_tty *tty) { int i; if (tty->termios.c_oflag & OPOST) { switch (c) { 109620: 3c 08 cmp $0x8,%al <== NOT EXECUTED 109622: 75 c5 jne 1095e9 <== NOT EXECUTED } tty->column += i; break; case '\b': if (tty->column > 0) 109624: 8b 42 28 mov 0x28(%edx),%eax <== NOT EXECUTED 109627: 85 c0 test %eax,%eax <== NOT EXECUTED 109629: 7e dd jle 109608 <== NOT EXECUTED tty->column--; 10962b: 48 dec %eax <== NOT EXECUTED 10962c: 89 42 28 mov %eax,0x28(%edx) <== NOT EXECUTED 10962f: eb d7 jmp 109608 <== NOT EXECUTED 109631: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED int i; if (tty->termios.c_oflag & OPOST) { switch (c) { case '\n': if (tty->termios.c_oflag & ONLRET) 109634: f6 c1 20 test $0x20,%cl 109637: 74 07 je 109640 <== NEVER TAKEN tty->column = 0; 109639: c7 42 28 00 00 00 00 movl $0x0,0x28(%edx) <== NOT EXECUTED if (tty->termios.c_oflag & ONLCR) { 109640: 83 e1 04 and $0x4,%ecx 109643: 74 c3 je 109608 <== ALWAYS TAKEN rtems_termios_puts ("\r", 1, tty); 109645: 56 push %esi 109646: 52 push %edx 109647: 6a 01 push $0x1 109649: 68 ca 0c 12 00 push $0x120cca 10964e: 89 55 f0 mov %edx,-0x10(%ebp) 109651: e8 3a fe ff ff call 109490 <== ALWAYS TAKEN tty->column = 0; 109656: 8b 55 f0 mov -0x10(%ebp),%edx 109659: c7 42 28 00 00 00 00 movl $0x0,0x28(%edx) 109660: 83 c4 10 add $0x10,%esp 109663: eb a3 jmp 109608 <== ALWAYS TAKEN 109665: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED } break; case '\r': if ((tty->termios.c_oflag & ONOCR) && (tty->column == 0)) 109668: f6 c1 10 test $0x10,%cl <== NOT EXECUTED 10966b: 74 07 je 109674 <== NOT EXECUTED 10966d: 8b 5a 28 mov 0x28(%edx),%ebx <== NOT EXECUTED 109670: 85 db test %ebx,%ebx <== NOT EXECUTED 109672: 74 a4 je 109618 <== NOT EXECUTED return; if (tty->termios.c_oflag & OCRNL) { 109674: f6 c1 08 test $0x8,%cl <== NOT EXECUTED 109677: 74 09 je 109682 <== NOT EXECUTED c = '\n'; 109679: c6 45 f4 0a movb $0xa,-0xc(%ebp) <== NOT EXECUTED if (tty->termios.c_oflag & ONLRET) 10967d: 83 e1 20 and $0x20,%ecx <== NOT EXECUTED 109680: 74 86 je 109608 <== NOT EXECUTED tty->column = 0; break; } tty->column = 0; 109682: c7 42 28 00 00 00 00 movl $0x0,0x28(%edx) <== NOT EXECUTED break; 109689: e9 7a ff ff ff jmp 109608 <== NOT EXECUTED 10968e: 66 90 xchg %ax,%ax <== NOT EXECUTED case '\t': i = 8 - (tty->column & 7); 109690: 8b 5a 28 mov 0x28(%edx),%ebx 109693: 89 de mov %ebx,%esi 109695: 83 e6 07 and $0x7,%esi 109698: b8 08 00 00 00 mov $0x8,%eax 10969d: 29 f0 sub %esi,%eax if ((tty->termios.c_oflag & TABDLY) == XTABS) { 10969f: 81 e1 00 18 00 00 and $0x1800,%ecx 1096a5: 81 f9 00 18 00 00 cmp $0x1800,%ecx 1096ab: 74 37 je 1096e4 <== NEVER TAKEN tty->column += i; rtems_termios_puts ( " ", i, tty); return; } tty->column += i; 1096ad: 01 d8 add %ebx,%eax <== NOT EXECUTED 1096af: 89 42 28 mov %eax,0x28(%edx) <== NOT EXECUTED break; 1096b2: e9 51 ff ff ff jmp 109608 <== NOT EXECUTED 1096b7: 90 nop <== NOT EXECUTED tty->column--; break; default: if (tty->termios.c_oflag & OLCUC) c = toupper(c); 1096b8: 8b 0d e8 50 12 00 mov 0x1250e8,%ecx <== NOT EXECUTED 1096be: 0f b6 c0 movzbl %al,%eax <== NOT EXECUTED 1096c1: 0f be 5c 01 01 movsbl 0x1(%ecx,%eax,1),%ebx <== NOT EXECUTED 1096c6: 83 e3 03 and $0x3,%ebx <== NOT EXECUTED 1096c9: 83 fb 02 cmp $0x2,%ebx <== NOT EXECUTED 1096cc: 74 0e je 1096dc <== NOT EXECUTED 1096ce: 89 c3 mov %eax,%ebx <== NOT EXECUTED 1096d0: 88 d8 mov %bl,%al <== NOT EXECUTED 1096d2: 88 5d f4 mov %bl,-0xc(%ebp) <== NOT EXECUTED 1096d5: e9 1e ff ff ff jmp 1095f8 <== NOT EXECUTED 1096da: 66 90 xchg %ax,%ax <== NOT EXECUTED 1096dc: 8d 58 e0 lea -0x20(%eax),%ebx <== NOT EXECUTED 1096df: eb ef jmp 1096d0 <== NOT EXECUTED 1096e1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED break; case '\t': i = 8 - (tty->column & 7); if ((tty->termios.c_oflag & TABDLY) == XTABS) { tty->column += i; 1096e4: 8d 1c 18 lea (%eax,%ebx,1),%ebx 1096e7: 89 5a 28 mov %ebx,0x28(%edx) rtems_termios_puts ( " ", i, tty); 1096ea: 51 push %ecx 1096eb: 52 push %edx 1096ec: 50 push %eax 1096ed: 68 dc 09 12 00 push $0x1209dc 1096f2: e8 99 fd ff ff call 109490 <== ALWAYS TAKEN return; 1096f7: 83 c4 10 add $0x10,%esp 1096fa: e9 19 ff ff ff jmp 109618 <== ALWAYS TAKEN 0010a41c : long pathconf( const char *path, int name ) { 10a41c: 55 push %ebp 10a41d: 89 e5 mov %esp,%ebp 10a41f: 56 push %esi 10a420: 53 push %ebx int status; int fd; fd = open( path, O_RDONLY ); 10a421: 83 ec 08 sub $0x8,%esp 10a424: 6a 00 push $0x0 10a426: ff 75 08 pushl 0x8(%ebp) 10a429: e8 92 fd ff ff call 10a1c0 <== ALWAYS TAKEN 10a42e: 89 c3 mov %eax,%ebx if ( fd == -1 ) 10a430: 83 c4 10 add $0x10,%esp 10a433: 83 f8 ff cmp $0xffffffff,%eax 10a436: 74 24 je 10a45c return -1; status = fpathconf( fd, name ); 10a438: 83 ec 08 sub $0x8,%esp 10a43b: ff 75 0c pushl 0xc(%ebp) 10a43e: 50 push %eax 10a43f: e8 10 ed ff ff call 109154 10a444: 89 c6 mov %eax,%esi (void) close( fd ); 10a446: 89 1c 24 mov %ebx,(%esp) 10a449: e8 e2 e7 ff ff call 108c30 return status; 10a44e: 83 c4 10 add $0x10,%esp } 10a451: 89 f0 mov %esi,%eax 10a453: 8d 65 f8 lea -0x8(%ebp),%esp 10a456: 5b pop %ebx 10a457: 5e pop %esi 10a458: c9 leave 10a459: c3 ret 10a45a: 66 90 xchg %ax,%ax <== NOT EXECUTED { int status; int fd; fd = open( path, O_RDONLY ); if ( fd == -1 ) 10a45c: be ff ff ff ff mov $0xffffffff,%esi status = fpathconf( fd, name ); (void) close( fd ); return status; } 10a461: 89 f0 mov %esi,%eax 10a463: 8d 65 f8 lea -0x8(%ebp),%esp 10a466: 5b pop %ebx 10a467: 5e pop %esi 10a468: c9 leave 10a469: c3 ret 00112e64 : * Called by pipe() to create an anonymous pipe. */ int pipe_create( int filsdes[2] ) { 112e64: 55 push %ebp 112e65: 89 e5 mov %esp,%ebp 112e67: 57 push %edi 112e68: 56 push %esi 112e69: 53 push %ebx 112e6a: 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) 112e6d: 6a 01 push $0x1 112e6f: 8d 5d c4 lea -0x3c(%ebp),%ebx 112e72: 53 push %ebx 112e73: 6a 07 push $0x7 112e75: 6a 03 push $0x3 112e77: 68 77 15 12 00 push $0x121577 112e7c: e8 a7 50 ff ff call 107f28 112e81: 83 c4 20 add $0x20,%esp 112e84: 85 c0 test %eax,%eax 112e86: 0f 85 e0 00 00 00 jne 112f6c <== NEVER TAKEN return -1; if (mkdir("/tmp", S_IRWXU|S_IRWXG|S_IRWXO|S_ISVTX) != 0) return -1; } else rtems_filesystem_freenode(&loc); 112e8c: 8b 45 d0 mov -0x30(%ebp),%eax <== NOT EXECUTED 112e8f: 85 c0 test %eax,%eax <== NOT EXECUTED 112e91: 74 10 je 112ea3 <== NOT EXECUTED 112e93: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 112e96: 85 c0 test %eax,%eax <== NOT EXECUTED 112e98: 74 09 je 112ea3 <== NOT EXECUTED 112e9a: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 112e9d: 53 push %ebx <== NOT EXECUTED 112e9e: ff d0 call *%eax <== NOT EXECUTED 112ea0: 83 c4 10 add $0x10,%esp <== NOT EXECUTED /* /tmp/.fifoXXXX */ char fifopath[15]; memcpy(fifopath, "/tmp/.fifo", 10); 112ea3: 8d 5d d9 lea -0x27(%ebp),%ebx 112ea6: be 7c 15 12 00 mov $0x12157c,%esi 112eab: b9 0a 00 00 00 mov $0xa,%ecx 112eb0: 89 df mov %ebx,%edi 112eb2: f3 a4 rep movsb %ds:(%esi),%es:(%edi) sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); 112eb4: 0f b7 05 14 70 12 00 movzwl 0x127014,%eax 112ebb: 8d 50 01 lea 0x1(%eax),%edx 112ebe: 66 89 15 14 70 12 00 mov %dx,0x127014 112ec5: 51 push %ecx 112ec6: 50 push %eax 112ec7: 68 87 15 12 00 push $0x121587 112ecc: 8d 45 e3 lea -0x1d(%ebp),%eax 112ecf: 50 push %eax 112ed0: e8 53 12 00 00 call 114128 /* Try creating FIFO file until find an available file name */ while (mkfifo(fifopath, S_IRUSR|S_IWUSR) != 0) { 112ed5: 58 pop %eax 112ed6: 5a pop %edx 112ed7: 68 80 01 00 00 push $0x180 112edc: 53 push %ebx 112edd: e8 4a 01 00 00 call 11302c 112ee2: 83 c4 10 add $0x10,%esp 112ee5: 85 c0 test %eax,%eax 112ee7: 75 6f jne 112f58 <== ALWAYS TAKEN 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); 112ee9: 83 ec 08 sub $0x8,%esp 112eec: 68 00 40 00 00 push $0x4000 112ef1: 53 push %ebx 112ef2: e8 b1 5b ff ff call 108aa8 112ef7: 8b 55 08 mov 0x8(%ebp),%edx 112efa: 89 02 mov %eax,(%edx) if (filsdes[0] < 0) { 112efc: 83 c4 10 add $0x10,%esp 112eff: 85 c0 test %eax,%eax 112f01: 0f 88 a1 00 00 00 js 112fa8 <== NEVER TAKEN the file node will be deleted after it is closed by all. */ unlink(fifopath); } else { /* Reset open file to blocking mode */ iop = rtems_libio_iop(filsdes[0]); 112f07: 3b 05 4c 31 12 00 cmp 0x12314c,%eax <== NOT EXECUTED 112f0d: 0f 82 85 00 00 00 jb 112f98 <== NOT EXECUTED 112f13: 31 c0 xor %eax,%eax <== NOT EXECUTED iop->flags &= ~LIBIO_FLAGS_NO_DELAY; 112f15: 83 60 14 fe andl $0xfffffffe,0x14(%eax) <== NOT EXECUTED filsdes[1] = open(fifopath, O_WRONLY); 112f19: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 112f1c: 6a 01 push $0x1 <== NOT EXECUTED 112f1e: 53 push %ebx <== NOT EXECUTED 112f1f: e8 84 5b ff ff call 108aa8 <== NOT EXECUTED 112f24: 8b 55 08 mov 0x8(%ebp),%edx <== NOT EXECUTED 112f27: 89 42 04 mov %eax,0x4(%edx) <== NOT EXECUTED if (filsdes[1] < 0) { 112f2a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 112f2d: 85 c0 test %eax,%eax <== NOT EXECUTED 112f2f: 0f 88 8b 00 00 00 js 112fc0 <== NOT EXECUTED 112f35: 31 f6 xor %esi,%esi <== NOT EXECUTED err = errno; close(filsdes[0]); } unlink(fifopath); 112f37: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 112f3a: 53 push %ebx <== NOT EXECUTED 112f3b: e8 08 01 00 00 call 113048 <== NOT EXECUTED 112f40: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } rtems_set_errno_and_return_minus_one(err); 112f43: e8 c8 08 00 00 call 113810 <__errno> 112f48: 89 30 mov %esi,(%eax) } 112f4a: b8 ff ff ff ff mov $0xffffffff,%eax 112f4f: 8d 65 f4 lea -0xc(%ebp),%esp 112f52: 5b pop %ebx 112f53: 5e pop %esi 112f54: 5f pop %edi 112f55: c9 leave 112f56: c3 ret 112f57: 90 nop <== NOT EXECUTED memcpy(fifopath, "/tmp/.fifo", 10); sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); /* Try creating FIFO file until find an available file name */ while (mkfifo(fifopath, S_IRUSR|S_IWUSR) != 0) { if (errno != EEXIST){ 112f58: e8 b3 08 00 00 call 113810 <__errno> <== NOT EXECUTED } unlink(fifopath); } rtems_set_errno_and_return_minus_one(err); } 112f5d: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 112f62: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 112f65: 5b pop %ebx <== NOT EXECUTED 112f66: 5e pop %esi <== NOT EXECUTED 112f67: 5f pop %edi <== NOT EXECUTED 112f68: c9 leave <== NOT EXECUTED 112f69: c3 ret <== NOT EXECUTED 112f6a: 66 90 xchg %ax,%ax <== NOT EXECUTED 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) != 0) { if (errno != ENOENT) 112f6c: e8 9f 08 00 00 call 113810 <__errno> 112f71: 83 38 02 cmpl $0x2,(%eax) 112f74: 75 e7 jne 112f5d <== ALWAYS TAKEN return -1; if (mkdir("/tmp", S_IRWXU|S_IRWXG|S_IRWXO|S_ISVTX) != 0) 112f76: 83 ec 08 sub $0x8,%esp 112f79: 68 ff 03 00 00 push $0x3ff 112f7e: 68 77 15 12 00 push $0x121577 112f83: e8 64 53 ff ff call 1082ec 112f88: 83 c4 10 add $0x10,%esp 112f8b: 85 c0 test %eax,%eax 112f8d: 0f 84 10 ff ff ff je 112ea3 <== NEVER TAKEN 112f93: eb c8 jmp 112f5d <== NOT EXECUTED 112f95: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED the file node will be deleted after it is closed by all. */ unlink(fifopath); } else { /* Reset open file to blocking mode */ iop = rtems_libio_iop(filsdes[0]); 112f98: c1 e0 06 shl $0x6,%eax <== NOT EXECUTED 112f9b: 03 05 40 72 12 00 add 0x127240,%eax <== NOT EXECUTED 112fa1: e9 6f ff ff ff jmp 112f15 <== NOT EXECUTED 112fa6: 66 90 xchg %ax,%ax <== NOT EXECUTED } /* Non-blocking open to avoid waiting for writers */ filsdes[0] = open(fifopath, O_RDONLY | O_NONBLOCK); if (filsdes[0] < 0) { err = errno; 112fa8: e8 63 08 00 00 call 113810 <__errno> 112fad: 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); 112faf: 83 ec 0c sub $0xc,%esp 112fb2: 53 push %ebx 112fb3: e8 90 00 00 00 call 113048 112fb8: 83 c4 10 add $0x10,%esp 112fbb: eb 86 jmp 112f43 <== ALWAYS TAKEN 112fbd: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED iop->flags &= ~LIBIO_FLAGS_NO_DELAY; filsdes[1] = open(fifopath, O_WRONLY); if (filsdes[1] < 0) { err = errno; 112fc0: e8 4b 08 00 00 call 113810 <__errno> <== NOT EXECUTED 112fc5: 8b 30 mov (%eax),%esi <== NOT EXECUTED close(filsdes[0]); 112fc7: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 112fca: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 112fcd: ff 30 pushl (%eax) <== NOT EXECUTED 112fcf: e8 24 c9 ff ff call 10f8f8 <== NOT EXECUTED 112fd4: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 112fd7: e9 5b ff ff ff jmp 112f37 <== NOT EXECUTED 001116e0 : pipe_control_t *pipe, uint32_t cmd, void *buffer, rtems_libio_t *iop ) { 1116e0: 55 push %ebp <== NOT EXECUTED 1116e1: 89 e5 mov %esp,%ebp <== NOT EXECUTED 1116e3: 56 push %esi <== NOT EXECUTED 1116e4: 53 push %ebx <== NOT EXECUTED 1116e5: 8b 75 08 mov 0x8(%ebp),%esi <== NOT EXECUTED 1116e8: 8b 5d 10 mov 0x10(%ebp),%ebx <== NOT EXECUTED if (cmd == FIONREAD) { 1116eb: 81 7d 0c 7f 66 04 40 cmpl $0x4004667f,0xc(%ebp) <== NOT EXECUTED 1116f2: 74 0c je 111700 <== NOT EXECUTED 1116f4: b8 ea ff ff ff mov $0xffffffea,%eax <== NOT EXECUTED PIPE_UNLOCK(pipe); return 0; } return -EINVAL; } 1116f9: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED 1116fc: 5b pop %ebx <== NOT EXECUTED 1116fd: 5e pop %esi <== NOT EXECUTED 1116fe: c9 leave <== NOT EXECUTED 1116ff: c3 ret <== NOT EXECUTED void *buffer, rtems_libio_t *iop ) { if (cmd == FIONREAD) { if (buffer == NULL) 111700: 85 db test %ebx,%ebx <== NOT EXECUTED 111702: 75 07 jne 11170b <== NOT EXECUTED 111704: b8 f2 ff ff ff mov $0xfffffff2,%eax <== NOT EXECUTED 111709: eb ee jmp 1116f9 <== NOT EXECUTED return -EFAULT; if (! PIPE_LOCK(pipe)) 11170b: 52 push %edx <== NOT EXECUTED 11170c: 6a 00 push $0x0 <== NOT EXECUTED 11170e: 6a 00 push $0x0 <== NOT EXECUTED 111710: ff 76 28 pushl 0x28(%esi) <== NOT EXECUTED 111713: e8 48 9e ff ff call 10b560 <== NOT EXECUTED 111718: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 11171b: 85 c0 test %eax,%eax <== NOT EXECUTED 11171d: 74 07 je 111726 <== NOT EXECUTED 11171f: b8 fc ff ff ff mov $0xfffffffc,%eax <== NOT EXECUTED 111724: eb d3 jmp 1116f9 <== NOT EXECUTED return -EINTR; /* Return length of pipe */ *(uint *)buffer = pipe->Length; 111726: 8b 46 0c mov 0xc(%esi),%eax <== NOT EXECUTED 111729: 89 03 mov %eax,(%ebx) <== NOT EXECUTED PIPE_UNLOCK(pipe); 11172b: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 11172e: ff 76 28 pushl 0x28(%esi) <== NOT EXECUTED 111731: e8 26 9f ff ff call 10b65c <== NOT EXECUTED 111736: 31 c0 xor %eax,%eax <== NOT EXECUTED return 0; 111738: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 11173b: eb bc jmp 1116f9 <== NOT EXECUTED 00111680 : pipe_control_t *pipe, off_t offset, int whence, rtems_libio_t *iop ) { 111680: 55 push %ebp <== NOT EXECUTED 111681: 89 e5 mov %esp,%ebp <== NOT EXECUTED /* Seek on pipe is not supported */ return -ESPIPE; } 111683: b8 e3 ff ff ff mov $0xffffffe3,%eax <== NOT EXECUTED 111688: c9 leave <== NOT EXECUTED 111689: c3 ret <== NOT EXECUTED 00111740 : pipe_control_t *pipe, void *buffer, size_t count, rtems_libio_t *iop ) { 111740: 55 push %ebp <== NOT EXECUTED 111741: 89 e5 mov %esp,%ebp <== NOT EXECUTED 111743: 57 push %edi <== NOT EXECUTED 111744: 56 push %esi <== NOT EXECUTED 111745: 53 push %ebx <== NOT EXECUTED 111746: 83 ec 30 sub $0x30,%esp <== NOT EXECUTED 111749: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) 11174c: 6a 00 push $0x0 <== NOT EXECUTED 11174e: 6a 00 push $0x0 <== NOT EXECUTED 111750: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED 111753: e8 08 9e ff ff call 10b560 <== NOT EXECUTED 111758: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 11175b: 85 c0 test %eax,%eax <== NOT EXECUTED 11175d: 0f 85 b1 00 00 00 jne 111814 <== NOT EXECUTED return -EINTR; while (read < count) { 111763: 8b 4d 10 mov 0x10(%ebp),%ecx <== NOT EXECUTED 111766: 85 c9 test %ecx,%ecx <== NOT EXECUTED 111768: 0f 84 82 01 00 00 je 1118f0 <== NOT EXECUTED /* WARN waitingReaders not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingReaders --; if (ret != 0) 11176e: c7 45 d0 00 00 00 00 movl $0x0,-0x30(%ebp) <== NOT EXECUTED 111775: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp) <== NOT EXECUTED if (! PIPE_LOCK(pipe)) return -EINTR; while (read < count) { while (PIPE_EMPTY(pipe)) { 11177c: 8b 53 0c mov 0xc(%ebx),%edx <== NOT EXECUTED 11177f: 85 d2 test %edx,%edx <== NOT EXECUTED 111781: 0f 85 a1 00 00 00 jne 111828 <== NOT EXECUTED /* Not an error */ if (pipe->Writers == 0) 111787: 8b 53 14 mov 0x14(%ebx),%edx <== NOT EXECUTED 11178a: 85 d2 test %edx,%edx <== NOT EXECUTED 11178c: 0f 84 06 01 00 00 je 111898 <== NOT EXECUTED goto out_locked; if (LIBIO_NODELAY(iop)) { 111792: 8b 45 14 mov 0x14(%ebp),%eax <== NOT EXECUTED 111795: f6 40 14 01 testb $0x1,0x14(%eax) <== NOT EXECUTED 111799: 0f 85 01 01 00 00 jne 1118a0 <== NOT EXECUTED ret = -EAGAIN; goto out_locked; } /* Wait until pipe is no more empty or no writer exists */ pipe->waitingReaders ++; 11179f: ff 43 18 incl 0x18(%ebx) <== NOT EXECUTED PIPE_UNLOCK(pipe); 1117a2: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1117a5: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED 1117a8: e8 af 9e ff ff call 10b65c <== NOT EXECUTED if (! PIPE_READWAIT(pipe)) 1117ad: 5f pop %edi <== NOT EXECUTED 1117ae: 58 pop %eax <== NOT EXECUTED 1117af: 6a 00 push $0x0 <== NOT EXECUTED 1117b1: ff 73 2c pushl 0x2c(%ebx) <== NOT EXECUTED 1117b4: e8 27 11 00 00 call 1128e0 <== NOT EXECUTED 1117b9: 83 c4 0c add $0xc,%esp <== NOT EXECUTED 1117bc: 83 f8 01 cmp $0x1,%eax <== NOT EXECUTED 1117bf: 19 f6 sbb %esi,%esi <== NOT EXECUTED 1117c1: f7 d6 not %esi <== NOT EXECUTED 1117c3: 83 e6 fc and $0xfffffffc,%esi <== NOT EXECUTED ret = -EINTR; if (! PIPE_LOCK(pipe)) { 1117c6: 6a 00 push $0x0 <== NOT EXECUTED 1117c8: 6a 00 push $0x0 <== NOT EXECUTED 1117ca: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED 1117cd: e8 8e 9d ff ff call 10b560 <== NOT EXECUTED 1117d2: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 1117d5: 85 c0 test %eax,%eax <== NOT EXECUTED 1117d7: 0f 85 cf 00 00 00 jne 1118ac <== NOT EXECUTED /* WARN waitingReaders not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingReaders --; 1117dd: ff 4b 18 decl 0x18(%ebx) <== NOT EXECUTED if (ret != 0) 1117e0: 85 f6 test %esi,%esi <== NOT EXECUTED 1117e2: 74 98 je 11177c <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); read += chunk; } out_locked: PIPE_UNLOCK(pipe); 1117e4: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1117e7: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED 1117ea: e8 6d 9e ff ff call 10b65c <== NOT EXECUTED 1117ef: 83 c4 10 add $0x10,%esp <== NOT EXECUTED out_nolock: if (read > 0) 1117f2: 8b 4d d4 mov -0x2c(%ebp),%ecx <== NOT EXECUTED 1117f5: 85 c9 test %ecx,%ecx <== NOT EXECUTED 1117f7: 7e 0b jle 111804 <== NOT EXECUTED return read; return ret; } 1117f9: 8b 45 d4 mov -0x2c(%ebp),%eax <== NOT EXECUTED 1117fc: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 1117ff: 5b pop %ebx <== NOT EXECUTED 111800: 5e pop %esi <== NOT EXECUTED 111801: 5f pop %edi <== NOT EXECUTED 111802: c9 leave <== NOT EXECUTED 111803: c3 ret <== NOT EXECUTED out_locked: PIPE_UNLOCK(pipe); out_nolock: if (read > 0) 111804: 89 75 d4 mov %esi,-0x2c(%ebp) <== NOT EXECUTED return read; return ret; } 111807: 8b 45 d4 mov -0x2c(%ebp),%eax <== NOT EXECUTED 11180a: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 11180d: 5b pop %ebx <== NOT EXECUTED 11180e: 5e pop %esi <== NOT EXECUTED 11180f: 5f pop %edi <== NOT EXECUTED 111810: c9 leave <== NOT EXECUTED 111811: c3 ret <== NOT EXECUTED 111812: 66 90 xchg %ax,%ax <== NOT EXECUTED rtems_libio_t *iop ) { int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) 111814: c7 45 d4 fc ff ff ff movl $0xfffffffc,-0x2c(%ebp) <== NOT EXECUTED out_nolock: if (read > 0) return read; return ret; } 11181b: 8b 45 d4 mov -0x2c(%ebp),%eax <== NOT EXECUTED 11181e: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 111821: 5b pop %ebx <== NOT EXECUTED 111822: 5e pop %esi <== NOT EXECUTED 111823: 5f pop %edi <== NOT EXECUTED 111824: c9 leave <== NOT EXECUTED 111825: c3 ret <== NOT EXECUTED 111826: 66 90 xchg %ax,%ax <== NOT EXECUTED if (ret != 0) goto out_locked; } /* Read chunk bytes */ chunk = MIN(count - read, pipe->Length); 111828: 8b 45 10 mov 0x10(%ebp),%eax <== NOT EXECUTED 11182b: 2b 45 d0 sub -0x30(%ebp),%eax <== NOT EXECUTED 11182e: 89 55 cc mov %edx,-0x34(%ebp) <== NOT EXECUTED 111831: 39 c2 cmp %eax,%edx <== NOT EXECUTED 111833: 76 03 jbe 111838 <== NOT EXECUTED 111835: 89 45 cc mov %eax,-0x34(%ebp) <== NOT EXECUTED chunk1 = pipe->Size - pipe->Start; 111838: 8b 73 08 mov 0x8(%ebx),%esi <== NOT EXECUTED 11183b: 8b 43 04 mov 0x4(%ebx),%eax <== NOT EXECUTED 11183e: 29 f0 sub %esi,%eax <== NOT EXECUTED if (chunk > chunk1) { 111840: 39 45 cc cmp %eax,-0x34(%ebp) <== NOT EXECUTED 111843: 7f 71 jg 1118b6 <== NOT EXECUTED memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk1); memcpy(buffer + read + chunk1, pipe->Buffer, chunk - chunk1); } else memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk); 111845: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED 111848: 03 45 d0 add -0x30(%ebp),%eax <== NOT EXECUTED 11184b: 03 33 add (%ebx),%esi <== NOT EXECUTED 11184d: 89 c7 mov %eax,%edi <== NOT EXECUTED 11184f: 8b 4d cc mov -0x34(%ebp),%ecx <== NOT EXECUTED 111852: f3 a4 rep movsb %ds:(%esi),%es:(%edi) <== NOT EXECUTED pipe->Start += chunk; 111854: 8b 45 cc mov -0x34(%ebp),%eax <== NOT EXECUTED 111857: 03 43 08 add 0x8(%ebx),%eax <== NOT EXECUTED pipe->Start %= pipe->Size; 11185a: 31 d2 xor %edx,%edx <== NOT EXECUTED 11185c: f7 73 04 divl 0x4(%ebx) <== NOT EXECUTED 11185f: 89 53 08 mov %edx,0x8(%ebx) <== NOT EXECUTED pipe->Length -= chunk; 111862: 8b 43 0c mov 0xc(%ebx),%eax <== NOT EXECUTED 111865: 2b 45 cc sub -0x34(%ebp),%eax <== NOT EXECUTED 111868: 89 43 0c mov %eax,0xc(%ebx) <== NOT EXECUTED /* For buffering optimization */ if (PIPE_EMPTY(pipe)) 11186b: 85 c0 test %eax,%eax <== NOT EXECUTED 11186d: 75 07 jne 111876 <== NOT EXECUTED pipe->Start = 0; 11186f: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx) <== NOT EXECUTED if (pipe->waitingWriters > 0) 111876: 8b 73 1c mov 0x1c(%ebx),%esi <== NOT EXECUTED 111879: 85 f6 test %esi,%esi <== NOT EXECUTED 11187b: 75 5f jne 1118dc <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); read += chunk; 11187d: 8b 45 cc mov -0x34(%ebp),%eax <== NOT EXECUTED 111880: 01 45 d4 add %eax,-0x2c(%ebp) <== NOT EXECUTED int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) return -EINTR; while (read < count) { 111883: 8b 45 d4 mov -0x2c(%ebp),%eax <== NOT EXECUTED 111886: 89 45 d0 mov %eax,-0x30(%ebp) <== NOT EXECUTED 111889: 8b 45 10 mov 0x10(%ebp),%eax <== NOT EXECUTED 11188c: 39 45 d4 cmp %eax,-0x2c(%ebp) <== NOT EXECUTED 11188f: 0f 82 e7 fe ff ff jb 11177c <== NOT EXECUTED 111895: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 111898: 31 f6 xor %esi,%esi <== NOT EXECUTED 11189a: e9 45 ff ff ff jmp 1117e4 <== NOT EXECUTED 11189f: 90 nop <== NOT EXECUTED while (PIPE_EMPTY(pipe)) { /* Not an error */ if (pipe->Writers == 0) goto out_locked; if (LIBIO_NODELAY(iop)) { 1118a0: be f5 ff ff ff mov $0xfffffff5,%esi <== NOT EXECUTED 1118a5: e9 3a ff ff ff jmp 1117e4 <== NOT EXECUTED 1118aa: 66 90 xchg %ax,%ax <== NOT EXECUTED /* Wait until pipe is no more empty or no writer exists */ pipe->waitingReaders ++; PIPE_UNLOCK(pipe); if (! PIPE_READWAIT(pipe)) ret = -EINTR; if (! PIPE_LOCK(pipe)) { 1118ac: be fc ff ff ff mov $0xfffffffc,%esi <== NOT EXECUTED 1118b1: e9 3c ff ff ff jmp 1117f2 <== NOT EXECUTED /* Read chunk bytes */ chunk = MIN(count - read, pipe->Length); chunk1 = pipe->Size - pipe->Start; if (chunk > chunk1) { memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk1); 1118b6: 8b 55 0c mov 0xc(%ebp),%edx <== NOT EXECUTED 1118b9: 03 55 d0 add -0x30(%ebp),%edx <== NOT EXECUTED 1118bc: 03 33 add (%ebx),%esi <== NOT EXECUTED 1118be: 89 d7 mov %edx,%edi <== NOT EXECUTED 1118c0: 89 c1 mov %eax,%ecx <== NOT EXECUTED 1118c2: f3 a4 rep movsb %ds:(%esi),%es:(%edi) <== NOT EXECUTED memcpy(buffer + read + chunk1, pipe->Buffer, chunk - chunk1); 1118c4: 8b 55 d0 mov -0x30(%ebp),%edx <== NOT EXECUTED 1118c7: 01 c2 add %eax,%edx <== NOT EXECUTED 1118c9: 03 55 0c add 0xc(%ebp),%edx <== NOT EXECUTED 1118cc: 8b 4d cc mov -0x34(%ebp),%ecx <== NOT EXECUTED 1118cf: 29 c1 sub %eax,%ecx <== NOT EXECUTED 1118d1: 8b 33 mov (%ebx),%esi <== NOT EXECUTED 1118d3: 89 d7 mov %edx,%edi <== NOT EXECUTED 1118d5: f3 a4 rep movsb %ds:(%esi),%es:(%edi) <== NOT EXECUTED 1118d7: e9 78 ff ff ff jmp 111854 <== NOT EXECUTED /* For buffering optimization */ if (PIPE_EMPTY(pipe)) pipe->Start = 0; if (pipe->waitingWriters > 0) PIPE_WAKEUPWRITERS(pipe); 1118dc: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 1118df: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED 1118e2: 50 push %eax <== NOT EXECUTED 1118e3: ff 73 30 pushl 0x30(%ebx) <== NOT EXECUTED 1118e6: e8 91 0f 00 00 call 11287c <== NOT EXECUTED 1118eb: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 1118ee: eb 8d jmp 11187d <== NOT EXECUTED int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) return -EINTR; while (read < count) { 1118f0: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp) <== NOT EXECUTED 1118f7: 31 f6 xor %esi,%esi 1118f9: e9 e6 fe ff ff jmp 1117e4 <== NOT EXECUTED 00111b00 : */ int pipe_release( pipe_control_t **pipep, rtems_libio_t *iop ) { 111b00: 55 push %ebp <== NOT EXECUTED 111b01: 89 e5 mov %esp,%ebp <== NOT EXECUTED 111b03: 57 push %edi <== NOT EXECUTED 111b04: 56 push %esi <== NOT EXECUTED 111b05: 53 push %ebx <== NOT EXECUTED 111b06: 83 ec 20 sub $0x20,%esp <== NOT EXECUTED 111b09: 8b 7d 08 mov 0x8(%ebp),%edi <== NOT EXECUTED pipe_control_t *pipe = *pipep; 111b0c: 8b 1f mov (%edi),%ebx <== NOT EXECUTED uint32_t mode; rtems_status_code sc; sc = rtems_semaphore_obtain(pipe->Semaphore, 111b0e: 6a 00 push $0x0 <== NOT EXECUTED 111b10: 6a 00 push $0x0 <== NOT EXECUTED 111b12: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED 111b15: e8 46 9a ff ff call 10b560 <== NOT EXECUTED RTEMS_WAIT, RTEMS_NO_TIMEOUT); /* WARN pipe not released! */ if(sc != RTEMS_SUCCESSFUL) 111b1a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 111b1d: 85 c0 test %eax,%eax <== NOT EXECUTED 111b1f: 0f 85 e3 00 00 00 jne 111c08 <== NOT EXECUTED rtems_fatal_error_occurred(sc); mode = LIBIO_ACCMODE(iop); 111b25: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED 111b28: 8b 40 14 mov 0x14(%eax),%eax <== NOT EXECUTED 111b2b: 89 c6 mov %eax,%esi <== NOT EXECUTED 111b2d: 83 e6 06 and $0x6,%esi <== NOT EXECUTED if (mode & LIBIO_FLAGS_READ) 111b30: a8 02 test $0x2,%al <== NOT EXECUTED 111b32: 74 03 je 111b37 <== NOT EXECUTED pipe->Readers --; 111b34: ff 4b 10 decl 0x10(%ebx) <== NOT EXECUTED if (mode & LIBIO_FLAGS_WRITE) 111b37: f7 c6 04 00 00 00 test $0x4,%esi <== NOT EXECUTED 111b3d: 75 69 jne 111ba8 <== NOT EXECUTED pipe->Writers --; sc = rtems_semaphore_obtain(rtems_pipe_semaphore, 111b3f: 51 push %ecx <== NOT EXECUTED 111b40: 6a 00 push $0x0 <== NOT EXECUTED 111b42: 6a 00 push $0x0 <== NOT EXECUTED 111b44: ff 35 0c 70 12 00 pushl 0x12700c <== NOT EXECUTED 111b4a: e8 11 9a ff ff call 10b560 <== NOT EXECUTED RTEMS_WAIT, RTEMS_NO_TIMEOUT); /* WARN pipe not freed and pipep not set to NULL! */ if(sc != RTEMS_SUCCESSFUL) 111b4f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 111b52: 85 c0 test %eax,%eax <== NOT EXECUTED 111b54: 0f 85 ae 00 00 00 jne 111c08 <== NOT EXECUTED rtems_fatal_error_occurred(sc); PIPE_UNLOCK(pipe); 111b5a: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 111b5d: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED 111b60: e8 f7 9a ff ff call 10b65c <== NOT EXECUTED if (pipe->Readers == 0 && pipe->Writers == 0) { 111b65: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 111b68: 8b 53 10 mov 0x10(%ebx),%edx <== NOT EXECUTED 111b6b: 85 d2 test %edx,%edx <== NOT EXECUTED 111b6d: 74 41 je 111bb0 <== NOT EXECUTED *pipep = NULL; } else if (pipe->Readers == 0 && mode != LIBIO_FLAGS_WRITE) /* Notify waiting Writers that all their partners left */ PIPE_WAKEUPWRITERS(pipe); else if (pipe->Writers == 0 && mode != LIBIO_FLAGS_READ) 111b6f: 8b 43 14 mov 0x14(%ebx),%eax <== NOT EXECUTED 111b72: 85 c0 test %eax,%eax <== NOT EXECUTED 111b74: 75 17 jne 111b8d <== NOT EXECUTED 111b76: 83 fe 02 cmp $0x2,%esi <== NOT EXECUTED 111b79: 74 12 je 111b8d <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); 111b7b: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 111b7e: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED 111b81: 50 push %eax <== NOT EXECUTED 111b82: ff 73 2c pushl 0x2c(%ebx) <== NOT EXECUTED 111b85: e8 f2 0c 00 00 call 11287c <== NOT EXECUTED 111b8a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_semaphore_release(rtems_pipe_semaphore); 111b8d: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 111b90: ff 35 0c 70 12 00 pushl 0x12700c <== NOT EXECUTED 111b96: e8 c1 9a ff ff call 10b65c <== NOT EXECUTED if(iop->pathinfo.ops->unlink_h(&iop->pathinfo)) return -errno; #endif return 0; } 111b9b: 31 c0 xor %eax,%eax <== NOT EXECUTED 111b9d: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 111ba0: 5b pop %ebx <== NOT EXECUTED 111ba1: 5e pop %esi <== NOT EXECUTED 111ba2: 5f pop %edi <== NOT EXECUTED 111ba3: c9 leave <== NOT EXECUTED 111ba4: c3 ret <== NOT EXECUTED 111ba5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED mode = LIBIO_ACCMODE(iop); if (mode & LIBIO_FLAGS_READ) pipe->Readers --; if (mode & LIBIO_FLAGS_WRITE) pipe->Writers --; 111ba8: ff 4b 14 decl 0x14(%ebx) <== NOT EXECUTED 111bab: eb 92 jmp 111b3f <== NOT EXECUTED 111bad: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if(sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred(sc); PIPE_UNLOCK(pipe); if (pipe->Readers == 0 && pipe->Writers == 0) { 111bb0: 8b 43 14 mov 0x14(%ebx),%eax <== NOT EXECUTED 111bb3: 85 c0 test %eax,%eax <== NOT EXECUTED 111bb5: 74 19 je 111bd0 <== NOT EXECUTED delfile = TRUE; #endif pipe_free(pipe); *pipep = NULL; } else if (pipe->Readers == 0 && mode != LIBIO_FLAGS_WRITE) 111bb7: 83 fe 04 cmp $0x4,%esi <== NOT EXECUTED 111bba: 74 d1 je 111b8d <== NOT EXECUTED /* Notify waiting Writers that all their partners left */ PIPE_WAKEUPWRITERS(pipe); 111bbc: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 111bbf: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED 111bc2: 50 push %eax <== NOT EXECUTED 111bc3: ff 73 30 pushl 0x30(%ebx) <== NOT EXECUTED 111bc6: e8 b1 0c 00 00 call 11287c <== NOT EXECUTED delfile = TRUE; #endif pipe_free(pipe); *pipep = NULL; } else if (pipe->Readers == 0 && mode != LIBIO_FLAGS_WRITE) 111bcb: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 111bce: eb bd jmp 111b8d <== NOT EXECUTED /* Called with rtems_pipe_semaphore held. */ static inline void pipe_free( pipe_control_t *pipe ) { rtems_barrier_delete(pipe->readBarrier); 111bd0: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 111bd3: ff 73 2c pushl 0x2c(%ebx) <== NOT EXECUTED 111bd6: e8 39 0c 00 00 call 112814 <== NOT EXECUTED rtems_barrier_delete(pipe->writeBarrier); 111bdb: 5e pop %esi <== NOT EXECUTED 111bdc: ff 73 30 pushl 0x30(%ebx) <== NOT EXECUTED 111bdf: e8 30 0c 00 00 call 112814 <== NOT EXECUTED rtems_semaphore_delete(pipe->Semaphore); 111be4: 59 pop %ecx <== NOT EXECUTED 111be5: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED 111be8: e8 cf 98 ff ff call 10b4bc <== NOT EXECUTED free(pipe->Buffer); 111bed: 5a pop %edx <== NOT EXECUTED 111bee: ff 33 pushl (%ebx) <== NOT EXECUTED 111bf0: e8 e7 63 ff ff call 107fdc <== NOT EXECUTED free(pipe); 111bf5: 89 1c 24 mov %ebx,(%esp) <== NOT EXECUTED 111bf8: e8 df 63 ff ff call 107fdc <== NOT EXECUTED /* To delete an anonymous pipe file when all users closed it */ if (pipe->Anonymous) delfile = TRUE; #endif pipe_free(pipe); *pipep = NULL; 111bfd: 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) { 111c03: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 111c06: eb 85 jmp 111b8d <== NOT EXECUTED sc = rtems_semaphore_obtain(rtems_pipe_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT); /* WARN pipe not freed and pipep not set to NULL! */ if(sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred(sc); 111c08: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 111c0b: 50 push %eax <== NOT EXECUTED 111c0c: e8 8b 9f ff ff call 10bb9c <== NOT EXECUTED 00111900 : pipe_control_t *pipe, const void *buffer, size_t count, rtems_libio_t *iop ) { 111900: 55 push %ebp <== NOT EXECUTED 111901: 89 e5 mov %esp,%ebp <== NOT EXECUTED 111903: 57 push %edi <== NOT EXECUTED 111904: 56 push %esi <== NOT EXECUTED 111905: 53 push %ebx <== NOT EXECUTED 111906: 83 ec 2c sub $0x2c,%esp <== NOT EXECUTED int chunk, chunk1, written = 0, ret = 0; /* Write nothing */ if (count == 0) 111909: 8b 7d 10 mov 0x10(%ebp),%edi <== NOT EXECUTED 11190c: 85 ff test %edi,%edi <== NOT EXECUTED 11190e: 75 0c jne 11191c <== NOT EXECUTED 111910: 31 db xor %ebx,%ebx <== NOT EXECUTED #endif if (written > 0) return written; return ret; } 111912: 89 d8 mov %ebx,%eax <== NOT EXECUTED 111914: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 111917: 5b pop %ebx <== NOT EXECUTED 111918: 5e pop %esi <== NOT EXECUTED 111919: 5f pop %edi <== NOT EXECUTED 11191a: c9 leave <== NOT EXECUTED 11191b: c3 ret <== NOT EXECUTED /* Write nothing */ if (count == 0) return 0; if (! PIPE_LOCK(pipe)) 11191c: 56 push %esi <== NOT EXECUTED 11191d: 6a 00 push $0x0 <== NOT EXECUTED 11191f: 6a 00 push $0x0 <== NOT EXECUTED 111921: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 111924: ff 70 28 pushl 0x28(%eax) <== NOT EXECUTED 111927: e8 34 9c ff ff call 10b560 <== NOT EXECUTED 11192c: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 11192f: 85 c0 test %eax,%eax <== NOT EXECUTED 111931: 0f 85 1d 01 00 00 jne 111a54 <== NOT EXECUTED return -EINTR; if (pipe->Readers == 0) { 111937: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 11193a: 8b 58 10 mov 0x10(%eax),%ebx <== NOT EXECUTED 11193d: 85 db test %ebx,%ebx <== NOT EXECUTED 11193f: 0f 84 50 01 00 00 je 111a95 <== NOT EXECUTED ret = -EPIPE; goto out_locked; } /* Write of PIPE_BUF bytes or less shall not be interleaved */ chunk = count <= pipe->Size ? count : 1; 111945: 8b 48 04 mov 0x4(%eax),%ecx <== NOT EXECUTED 111948: 39 4d 10 cmp %ecx,0x10(%ebp) <== NOT EXECUTED 11194b: 0f 87 3a 01 00 00 ja 111a8b <== NOT EXECUTED 111951: 8b 7d 10 mov 0x10(%ebp),%edi <== NOT EXECUTED } pipe->waitingWriters --; if (ret != 0) goto out_locked; if (pipe->Readers == 0) { 111954: c7 45 d0 00 00 00 00 movl $0x0,-0x30(%ebp) <== NOT EXECUTED 11195b: 31 db xor %ebx,%ebx <== NOT EXECUTED else memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk); pipe->Length += chunk; if (pipe->waitingReaders > 0) PIPE_WAKEUPREADERS(pipe); 11195d: 89 5d d4 mov %ebx,-0x2c(%ebp) <== NOT EXECUTED 111960: 8b 5d 08 mov 0x8(%ebp),%ebx <== 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) { 111963: 8b 43 0c mov 0xc(%ebx),%eax <== NOT EXECUTED 111966: 89 ca mov %ecx,%edx <== NOT EXECUTED 111968: 29 c2 sub %eax,%edx <== NOT EXECUTED 11196a: 39 fa cmp %edi,%edx <== NOT EXECUTED 11196c: 73 6f jae 1119dd <== NOT EXECUTED if (LIBIO_NODELAY(iop)) { 11196e: 8b 45 14 mov 0x14(%ebp),%eax <== NOT EXECUTED 111971: f6 40 14 01 testb $0x1,0x14(%eax) <== NOT EXECUTED 111975: 0f 85 47 01 00 00 jne 111ac2 <== NOT EXECUTED ret = -EAGAIN; goto out_locked; } /* Wait until there is chunk bytes space or no reader exists */ pipe->waitingWriters ++; 11197b: ff 43 1c incl 0x1c(%ebx) <== NOT EXECUTED PIPE_UNLOCK(pipe); 11197e: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 111981: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED 111984: e8 d3 9c ff ff call 10b65c <== NOT EXECUTED if (! PIPE_WRITEWAIT(pipe)) 111989: 5a pop %edx <== NOT EXECUTED 11198a: 59 pop %ecx <== NOT EXECUTED 11198b: 6a 00 push $0x0 <== NOT EXECUTED 11198d: ff 73 30 pushl 0x30(%ebx) <== NOT EXECUTED 111990: e8 4b 0f 00 00 call 1128e0 <== NOT EXECUTED 111995: 83 c4 0c add $0xc,%esp <== NOT EXECUTED 111998: 83 f8 01 cmp $0x1,%eax <== NOT EXECUTED 11199b: 19 f6 sbb %esi,%esi <== NOT EXECUTED 11199d: f7 d6 not %esi <== NOT EXECUTED 11199f: 83 e6 fc and $0xfffffffc,%esi <== NOT EXECUTED ret = -EINTR; if (! PIPE_LOCK(pipe)) { 1119a2: 6a 00 push $0x0 <== NOT EXECUTED 1119a4: 6a 00 push $0x0 <== NOT EXECUTED 1119a6: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED 1119a9: e8 b2 9b ff ff call 10b560 <== NOT EXECUTED 1119ae: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 1119b1: 85 c0 test %eax,%eax <== NOT EXECUTED 1119b3: 0f 85 ff 00 00 00 jne 111ab8 <== NOT EXECUTED /* WARN waitingWriters not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingWriters --; 1119b9: ff 4b 1c decl 0x1c(%ebx) <== NOT EXECUTED if (ret != 0) 1119bc: 85 f6 test %esi,%esi <== NOT EXECUTED 1119be: 0f 85 ef 00 00 00 jne 111ab3 <== NOT EXECUTED goto out_locked; if (pipe->Readers == 0) { 1119c4: 8b 43 10 mov 0x10(%ebx),%eax <== NOT EXECUTED 1119c7: 85 c0 test %eax,%eax <== NOT EXECUTED 1119c9: 0f 84 8f 00 00 00 je 111a5e <== NOT EXECUTED 1119cf: 8b 4b 04 mov 0x4(%ebx),%ecx <== 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) { 1119d2: 8b 43 0c mov 0xc(%ebx),%eax <== NOT EXECUTED 1119d5: 89 ca mov %ecx,%edx <== NOT EXECUTED 1119d7: 29 c2 sub %eax,%edx <== NOT EXECUTED 1119d9: 39 fa cmp %edi,%edx <== NOT EXECUTED 1119db: 72 91 jb 11196e <== NOT EXECUTED ret = -EPIPE; goto out_locked; } } chunk = MIN(count - written, PIPE_SPACE(pipe)); 1119dd: 8b 75 10 mov 0x10(%ebp),%esi <== NOT EXECUTED 1119e0: 2b 75 d0 sub -0x30(%ebp),%esi <== NOT EXECUTED 1119e3: 89 55 cc mov %edx,-0x34(%ebp) <== NOT EXECUTED 1119e6: 39 f2 cmp %esi,%edx <== NOT EXECUTED 1119e8: 76 03 jbe 1119ed <== NOT EXECUTED 1119ea: 89 75 cc mov %esi,-0x34(%ebp) <== NOT EXECUTED chunk1 = pipe->Size - PIPE_WSTART(pipe); 1119ed: 03 43 08 add 0x8(%ebx),%eax <== NOT EXECUTED 1119f0: 31 d2 xor %edx,%edx <== NOT EXECUTED 1119f2: f7 f1 div %ecx <== NOT EXECUTED 1119f4: 89 c8 mov %ecx,%eax <== NOT EXECUTED 1119f6: 29 d0 sub %edx,%eax <== NOT EXECUTED if (chunk > chunk1) { 1119f8: 39 45 cc cmp %eax,-0x34(%ebp) <== NOT EXECUTED 1119fb: 0f 8e cb 00 00 00 jle 111acc <== NOT EXECUTED memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk1); 111a01: 03 13 add (%ebx),%edx <== NOT EXECUTED 111a03: 8b 75 0c mov 0xc(%ebp),%esi <== NOT EXECUTED 111a06: 03 75 d0 add -0x30(%ebp),%esi <== NOT EXECUTED 111a09: 89 d7 mov %edx,%edi <== NOT EXECUTED 111a0b: 89 c1 mov %eax,%ecx <== NOT EXECUTED 111a0d: f3 a4 rep movsb %ds:(%esi),%es:(%edi) <== NOT EXECUTED memcpy(pipe->Buffer, buffer + written + chunk1, chunk - chunk1); 111a0f: 8b 13 mov (%ebx),%edx <== NOT EXECUTED 111a11: 8b 4d cc mov -0x34(%ebp),%ecx <== NOT EXECUTED 111a14: 29 c1 sub %eax,%ecx <== NOT EXECUTED 111a16: 03 45 d0 add -0x30(%ebp),%eax <== NOT EXECUTED 111a19: 8b 75 0c mov 0xc(%ebp),%esi <== NOT EXECUTED 111a1c: 01 c6 add %eax,%esi <== NOT EXECUTED 111a1e: 89 d7 mov %edx,%edi <== NOT EXECUTED 111a20: f3 a4 rep movsb %ds:(%esi),%es:(%edi) <== NOT EXECUTED } else memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk); pipe->Length += chunk; 111a22: 8b 45 cc mov -0x34(%ebp),%eax <== NOT EXECUTED 111a25: 01 43 0c add %eax,0xc(%ebx) <== NOT EXECUTED if (pipe->waitingReaders > 0) 111a28: 83 7b 18 00 cmpl $0x0,0x18(%ebx) <== NOT EXECUTED 111a2c: 0f 85 ae 00 00 00 jne 111ae0 <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); written += chunk; 111a32: 8b 45 cc mov -0x34(%ebp),%eax <== NOT EXECUTED 111a35: 01 45 d4 add %eax,-0x2c(%ebp) <== NOT EXECUTED } /* Write of PIPE_BUF bytes or less shall not be interleaved */ chunk = count <= pipe->Size ? count : 1; while (written < count) { 111a38: 8b 45 d4 mov -0x2c(%ebp),%eax <== NOT EXECUTED 111a3b: 89 45 d0 mov %eax,-0x30(%ebp) <== NOT EXECUTED 111a3e: 39 45 10 cmp %eax,0x10(%ebp) <== NOT EXECUTED 111a41: 0f 86 af 00 00 00 jbe 111af6 <== NOT EXECUTED 111a47: 8b 4b 04 mov 0x4(%ebx),%ecx <== NOT EXECUTED 111a4a: bf 01 00 00 00 mov $0x1,%edi <== NOT EXECUTED 111a4f: e9 0f ff ff ff jmp 111963 <== NOT EXECUTED /* Write nothing */ if (count == 0) return 0; if (! PIPE_LOCK(pipe)) 111a54: bb fc ff ff ff mov $0xfffffffc,%ebx <== NOT EXECUTED 111a59: e9 b4 fe ff ff jmp 111912 <== NOT EXECUTED 111a5e: 8b 5d d4 mov -0x2c(%ebp),%ebx <== NOT EXECUTED } pipe->waitingWriters --; if (ret != 0) goto out_locked; if (pipe->Readers == 0) { 111a61: be e0 ff ff ff mov $0xffffffe0,%esi <== NOT EXECUTED /* Write of more than PIPE_BUF bytes can be interleaved */ chunk = 1; } out_locked: PIPE_UNLOCK(pipe); 111a66: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 111a69: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 111a6c: ff 70 28 pushl 0x28(%eax) <== NOT EXECUTED 111a6f: e8 e8 9b ff ff call 10b65c <== NOT EXECUTED 111a74: 83 c4 10 add $0x10,%esp <== NOT EXECUTED out_nolock: #ifdef RTEMS_POSIX_API /* Signal SIGPIPE */ if (ret == -EPIPE) 111a77: 83 fe e0 cmp $0xffffffe0,%esi <== NOT EXECUTED 111a7a: 74 22 je 111a9e <== NOT EXECUTED kill(getpid(), SIGPIPE); #endif if (written > 0) 111a7c: 85 db test %ebx,%ebx <== NOT EXECUTED 111a7e: 0f 8f 8e fe ff ff jg 111912 <== NOT EXECUTED 111a84: 89 f3 mov %esi,%ebx <== NOT EXECUTED 111a86: e9 87 fe ff ff jmp 111912 <== NOT EXECUTED } pipe->waitingWriters --; if (ret != 0) goto out_locked; if (pipe->Readers == 0) { 111a8b: bf 01 00 00 00 mov $0x1,%edi <== NOT EXECUTED 111a90: e9 bf fe ff ff jmp 111954 <== NOT EXECUTED } /* Write of PIPE_BUF bytes or less shall not be interleaved */ chunk = count <= pipe->Size ? count : 1; while (written < count) { 111a95: be e0 ff ff ff mov $0xffffffe0,%esi <== NOT EXECUTED 111a9a: 31 db xor %ebx,%ebx <== NOT EXECUTED 111a9c: eb c8 jmp 111a66 <== NOT EXECUTED out_nolock: #ifdef RTEMS_POSIX_API /* Signal SIGPIPE */ if (ret == -EPIPE) kill(getpid(), SIGPIPE); 111a9e: e8 7d 08 00 00 call 112320 <== NOT EXECUTED 111aa3: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 111aa6: 6a 0d push $0xd <== NOT EXECUTED 111aa8: 50 push %eax <== NOT EXECUTED 111aa9: e8 52 0a 00 00 call 112500 <== NOT EXECUTED 111aae: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 111ab1: eb c9 jmp 111a7c <== NOT EXECUTED 111ab3: 8b 5d d4 mov -0x2c(%ebp),%ebx <== NOT EXECUTED 111ab6: eb ae jmp 111a66 <== NOT EXECUTED 111ab8: 8b 5d d4 mov -0x2c(%ebp),%ebx <== NOT EXECUTED /* Wait until there is chunk bytes space or no reader exists */ pipe->waitingWriters ++; PIPE_UNLOCK(pipe); if (! PIPE_WRITEWAIT(pipe)) ret = -EINTR; if (! PIPE_LOCK(pipe)) { 111abb: be fc ff ff ff mov $0xfffffffc,%esi <== NOT EXECUTED 111ac0: eb ba jmp 111a7c <== NOT EXECUTED 111ac2: 8b 5d d4 mov -0x2c(%ebp),%ebx <== 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) { if (LIBIO_NODELAY(iop)) { 111ac5: be f5 ff ff ff mov $0xfffffff5,%esi <== NOT EXECUTED 111aca: eb 9a jmp 111a66 <== NOT EXECUTED if (chunk > chunk1) { memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk1); memcpy(pipe->Buffer, buffer + written + chunk1, chunk - chunk1); } else memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk); 111acc: 03 13 add (%ebx),%edx <== NOT EXECUTED 111ace: 8b 75 0c mov 0xc(%ebp),%esi <== NOT EXECUTED 111ad1: 03 75 d0 add -0x30(%ebp),%esi <== NOT EXECUTED 111ad4: 89 d7 mov %edx,%edi <== NOT EXECUTED 111ad6: 8b 4d cc mov -0x34(%ebp),%ecx <== NOT EXECUTED 111ad9: f3 a4 rep movsb %ds:(%esi),%es:(%edi) <== NOT EXECUTED 111adb: e9 42 ff ff ff jmp 111a22 <== NOT EXECUTED pipe->Length += chunk; if (pipe->waitingReaders > 0) PIPE_WAKEUPREADERS(pipe); 111ae0: 56 push %esi <== NOT EXECUTED 111ae1: 56 push %esi <== NOT EXECUTED 111ae2: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED 111ae5: 50 push %eax <== NOT EXECUTED 111ae6: ff 73 2c pushl 0x2c(%ebx) <== NOT EXECUTED 111ae9: e8 8e 0d 00 00 call 11287c <== NOT EXECUTED 111aee: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 111af1: e9 3c ff ff ff jmp 111a32 <== NOT EXECUTED 111af6: 89 c3 mov %eax,%ebx <== NOT EXECUTED } /* Write of PIPE_BUF bytes or less shall not be interleaved */ chunk = count <= pipe->Size ? count : 1; while (written < count) { 111af8: 31 f6 xor %esi,%esi 111afa: e9 67 ff ff ff jmp 111a66 <== NOT EXECUTED 0010b674 : int posix_memalign( void **pointer, size_t alignment, size_t size ) { 10b674: 55 push %ebp 10b675: 89 e5 mov %esp,%ebp 10b677: 53 push %ebx 10b678: 83 ec 04 sub $0x4,%esp 10b67b: 8b 45 0c mov 0xc(%ebp),%eax /* * Update call statistics */ MSBUMP(memalign_calls, 1); 10b67e: ff 05 c8 de 12 00 incl 0x12dec8 if (((alignment - 1) & alignment) != 0 || (alignment < sizeof(void *))) 10b684: 8d 50 ff lea -0x1(%eax),%edx 10b687: 85 c2 test %eax,%edx 10b689: 75 05 jne 10b690 <== ALWAYS TAKEN 10b68b: 83 f8 03 cmp $0x3,%eax 10b68e: 77 0c ja 10b69c /* * rtems_memalign does all of the error checking work EXCEPT * for adding restrictionso on the alignment. */ return rtems_memalign( pointer, alignment, size ); } 10b690: b8 16 00 00 00 mov $0x16,%eax 10b695: 5a pop %edx 10b696: 5b pop %ebx 10b697: c9 leave 10b698: c3 ret 10b699: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 10b69c: 59 pop %ecx 10b69d: 5b pop %ebx 10b69e: c9 leave /* * rtems_memalign does all of the error checking work EXCEPT * for adding restrictionso on the alignment. */ return rtems_memalign( pointer, alignment, size ); 10b69f: e9 20 01 00 00 jmp 10b7c4 <== ALWAYS TAKEN 0010fb80 : #include int pthread_attr_destroy( pthread_attr_t *attr ) { 10fb80: 55 push %ebp 10fb81: 89 e5 mov %esp,%ebp 10fb83: 8b 45 08 mov 0x8(%ebp),%eax if ( !attr || !attr->is_initialized ) 10fb86: 85 c0 test %eax,%eax 10fb88: 74 12 je 10fb9c 10fb8a: 8b 10 mov (%eax),%edx 10fb8c: 85 d2 test %edx,%edx 10fb8e: 74 0c je 10fb9c return EINVAL; attr->is_initialized = false; 10fb90: c7 00 00 00 00 00 movl $0x0,(%eax) 10fb96: 31 c0 xor %eax,%eax return 0; } 10fb98: c9 leave 10fb99: c3 ret 10fb9a: 66 90 xchg %ax,%ax <== NOT EXECUTED { if ( !attr || !attr->is_initialized ) return EINVAL; attr->is_initialized = false; return 0; 10fb9c: b8 16 00 00 00 mov $0x16,%eax } 10fba1: c9 leave 10fba2: c3 ret 0010fbf4 : int pthread_attr_getschedparam( const pthread_attr_t *attr, struct sched_param *param ) { 10fbf4: 55 push %ebp 10fbf5: 89 e5 mov %esp,%ebp 10fbf7: 57 push %edi 10fbf8: 56 push %esi 10fbf9: 8b 75 08 mov 0x8(%ebp),%esi 10fbfc: 8b 45 0c mov 0xc(%ebp),%eax if ( !attr || !attr->is_initialized || !param ) 10fbff: 85 f6 test %esi,%esi 10fc01: 74 1d je 10fc20 10fc03: 8b 16 mov (%esi),%edx 10fc05: 85 d2 test %edx,%edx 10fc07: 74 17 je 10fc20 10fc09: 85 c0 test %eax,%eax 10fc0b: 74 13 je 10fc20 return EINVAL; *param = attr->schedparam; 10fc0d: 83 c6 18 add $0x18,%esi 10fc10: b9 06 00 00 00 mov $0x6,%ecx 10fc15: 89 c7 mov %eax,%edi 10fc17: f3 a5 rep movsl %ds:(%esi),%es:(%edi) 10fc19: 31 c0 xor %eax,%eax return 0; } 10fc1b: 5e pop %esi 10fc1c: 5f pop %edi 10fc1d: c9 leave 10fc1e: c3 ret 10fc1f: 90 nop <== NOT EXECUTED { if ( !attr || !attr->is_initialized || !param ) return EINVAL; *param = attr->schedparam; return 0; 10fc20: b8 16 00 00 00 mov $0x16,%eax } 10fc25: 5e pop %esi 10fc26: 5f pop %edi 10fc27: c9 leave 10fc28: c3 ret 00110614 : int pthread_attr_setcputime( pthread_attr_t *attr, int clock_allowed ) { 110614: 55 push %ebp 110615: 89 e5 mov %esp,%ebp 110617: 8b 45 08 mov 0x8(%ebp),%eax 11061a: 8b 55 0c mov 0xc(%ebp),%edx if ( !attr || !attr->is_initialized ) 11061d: 85 c0 test %eax,%eax 11061f: 74 0b je 11062c 110621: 8b 08 mov (%eax),%ecx 110623: 85 c9 test %ecx,%ecx 110625: 74 05 je 11062c return EINVAL; switch ( clock_allowed ) { 110627: 83 fa 01 cmp $0x1,%edx 11062a: 76 08 jbe 110634 case CLOCK_ENABLED: case CLOCK_DISABLED: attr->cputime_clock_allowed = clock_allowed; return 0; 11062c: b8 16 00 00 00 mov $0x16,%eax default: return EINVAL; } } 110631: c9 leave 110632: c3 ret 110633: 90 nop <== NOT EXECUTED return EINVAL; switch ( clock_allowed ) { case CLOCK_ENABLED: case CLOCK_DISABLED: attr->cputime_clock_allowed = clock_allowed; 110634: 89 50 30 mov %edx,0x30(%eax) 110637: 31 c0 xor %eax,%eax return 0; default: return EINVAL; } } 110639: c9 leave 11063a: c3 ret 0010fcf4 : int pthread_attr_setdetachstate( pthread_attr_t *attr, int detachstate ) { 10fcf4: 55 push %ebp 10fcf5: 89 e5 mov %esp,%ebp 10fcf7: 8b 45 08 mov 0x8(%ebp),%eax 10fcfa: 8b 55 0c mov 0xc(%ebp),%edx if ( !attr || !attr->is_initialized ) 10fcfd: 85 c0 test %eax,%eax 10fcff: 74 0b je 10fd0c 10fd01: 8b 08 mov (%eax),%ecx 10fd03: 85 c9 test %ecx,%ecx 10fd05: 74 05 je 10fd0c return EINVAL; switch ( detachstate ) { 10fd07: 83 fa 01 cmp $0x1,%edx 10fd0a: 76 08 jbe 10fd14 case PTHREAD_CREATE_DETACHED: case PTHREAD_CREATE_JOINABLE: attr->detachstate = detachstate; return 0; 10fd0c: b8 16 00 00 00 mov $0x16,%eax default: return EINVAL; } } 10fd11: c9 leave 10fd12: c3 ret 10fd13: 90 nop <== NOT EXECUTED return EINVAL; switch ( detachstate ) { case PTHREAD_CREATE_DETACHED: case PTHREAD_CREATE_JOINABLE: attr->detachstate = detachstate; 10fd14: 89 50 34 mov %edx,0x34(%eax) 10fd17: 31 c0 xor %eax,%eax return 0; default: return EINVAL; } } 10fd19: c9 leave 10fd1a: c3 ret 00111304 : int pthread_attr_setinheritsched( pthread_attr_t *attr, int inheritsched ) { 111304: 55 push %ebp 111305: 89 e5 mov %esp,%ebp 111307: 8b 45 08 mov 0x8(%ebp),%eax 11130a: 8b 55 0c mov 0xc(%ebp),%edx if ( !attr || !attr->is_initialized ) 11130d: 85 c0 test %eax,%eax 11130f: 74 1f je 111330 111311: 8b 08 mov (%eax),%ecx 111313: 85 c9 test %ecx,%ecx 111315: 74 19 je 111330 return EINVAL; switch ( inheritsched ) { 111317: 8d 4a ff lea -0x1(%edx),%ecx 11131a: 83 f9 01 cmp $0x1,%ecx 11131d: 76 09 jbe 111328 11131f: b8 86 00 00 00 mov $0x86,%eax return 0; default: return ENOTSUP; } } 111324: c9 leave 111325: c3 ret 111326: 66 90 xchg %ax,%ax <== NOT EXECUTED return EINVAL; switch ( inheritsched ) { case PTHREAD_INHERIT_SCHED: case PTHREAD_EXPLICIT_SCHED: attr->inheritsched = inheritsched; 111328: 89 50 10 mov %edx,0x10(%eax) 11132b: 31 c0 xor %eax,%eax return 0; default: return ENOTSUP; } } 11132d: c9 leave 11132e: c3 ret 11132f: 90 nop <== NOT EXECUTED switch ( inheritsched ) { case PTHREAD_INHERIT_SCHED: case PTHREAD_EXPLICIT_SCHED: attr->inheritsched = inheritsched; return 0; 111330: b8 16 00 00 00 mov $0x16,%eax default: return ENOTSUP; } } 111335: c9 leave 111336: c3 ret 0010fd50 : int pthread_attr_setschedparam( pthread_attr_t *attr, const struct sched_param *param ) { 10fd50: 55 push %ebp 10fd51: 89 e5 mov %esp,%ebp 10fd53: 57 push %edi 10fd54: 56 push %esi 10fd55: 8b 7d 08 mov 0x8(%ebp),%edi 10fd58: 8b 75 0c mov 0xc(%ebp),%esi if ( !attr || !attr->is_initialized || !param ) 10fd5b: 85 ff test %edi,%edi 10fd5d: 74 1d je 10fd7c 10fd5f: 8b 07 mov (%edi),%eax 10fd61: 85 c0 test %eax,%eax 10fd63: 74 17 je 10fd7c 10fd65: 85 f6 test %esi,%esi 10fd67: 74 13 je 10fd7c return EINVAL; attr->schedparam = *param; 10fd69: 83 c7 18 add $0x18,%edi 10fd6c: b9 06 00 00 00 mov $0x6,%ecx 10fd71: f3 a5 rep movsl %ds:(%esi),%es:(%edi) 10fd73: 31 c0 xor %eax,%eax return 0; } 10fd75: 5e pop %esi 10fd76: 5f pop %edi 10fd77: c9 leave 10fd78: c3 ret 10fd79: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED { if ( !attr || !attr->is_initialized || !param ) return EINVAL; attr->schedparam = *param; return 0; 10fd7c: b8 16 00 00 00 mov $0x16,%eax } 10fd81: 5e pop %esi 10fd82: 5f pop %edi 10fd83: c9 leave 10fd84: c3 ret 0010fd88 : int pthread_attr_setschedpolicy( pthread_attr_t *attr, int policy ) { 10fd88: 55 push %ebp 10fd89: 89 e5 mov %esp,%ebp 10fd8b: 8b 45 08 mov 0x8(%ebp),%eax 10fd8e: 8b 55 0c mov 0xc(%ebp),%edx if ( !attr || !attr->is_initialized ) 10fd91: 85 c0 test %eax,%eax 10fd93: 74 1b je 10fdb0 10fd95: 8b 08 mov (%eax),%ecx 10fd97: 85 c9 test %ecx,%ecx 10fd99: 74 15 je 10fdb0 return EINVAL; switch ( policy ) { 10fd9b: 83 fa 03 cmp $0x3,%edx 10fd9e: 76 08 jbe 10fda8 10fda0: b8 86 00 00 00 mov $0x86,%eax return 0; default: return ENOTSUP; } } 10fda5: c9 leave 10fda6: c3 ret 10fda7: 90 nop <== NOT EXECUTED switch ( policy ) { case SCHED_OTHER: case SCHED_FIFO: case SCHED_RR: case SCHED_SPORADIC: attr->schedpolicy = policy; 10fda8: 89 50 14 mov %edx,0x14(%eax) 10fdab: 31 c0 xor %eax,%eax return 0; default: return ENOTSUP; } } 10fdad: c9 leave 10fdae: c3 ret 10fdaf: 90 nop <== NOT EXECUTED case SCHED_OTHER: case SCHED_FIFO: case SCHED_RR: case SCHED_SPORADIC: attr->schedpolicy = policy; return 0; 10fdb0: b8 16 00 00 00 mov $0x16,%eax default: return ENOTSUP; } } 10fdb5: c9 leave 10fdb6: c3 ret 0010fdb8 : int pthread_attr_setscope( pthread_attr_t *attr, int contentionscope ) { 10fdb8: 55 push %ebp 10fdb9: 89 e5 mov %esp,%ebp 10fdbb: 8b 45 08 mov 0x8(%ebp),%eax 10fdbe: 8b 55 0c mov 0xc(%ebp),%edx if ( !attr || !attr->is_initialized ) 10fdc1: 85 c0 test %eax,%eax 10fdc3: 74 1a je 10fddf 10fdc5: 8b 08 mov (%eax),%ecx 10fdc7: 85 c9 test %ecx,%ecx 10fdc9: 74 14 je 10fddf return EINVAL; switch ( contentionscope ) { 10fdcb: 85 d2 test %edx,%edx 10fdcd: 75 0d jne 10fddc case PTHREAD_SCOPE_PROCESS: attr->contentionscope = contentionscope; 10fdcf: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax) 10fdd6: 31 c0 xor %eax,%eax return ENOTSUP; default: return EINVAL; } } 10fdd8: c9 leave 10fdd9: c3 ret 10fdda: 66 90 xchg %ax,%ax <== NOT EXECUTED ) { if ( !attr || !attr->is_initialized ) return EINVAL; switch ( contentionscope ) { 10fddc: 4a dec %edx 10fddd: 74 09 je 10fde8 case PTHREAD_SCOPE_PROCESS: attr->contentionscope = contentionscope; return 0; 10fddf: b8 16 00 00 00 mov $0x16,%eax return ENOTSUP; default: return EINVAL; } } 10fde4: c9 leave 10fde5: c3 ret 10fde6: 66 90 xchg %ax,%ax <== NOT EXECUTED ) { if ( !attr || !attr->is_initialized ) return EINVAL; switch ( contentionscope ) { 10fde8: b8 86 00 00 00 mov $0x86,%eax return ENOTSUP; default: return EINVAL; } } 10fded: c9 leave 10fdee: c3 ret 0010fdf0 : int pthread_attr_setstackaddr( pthread_attr_t *attr, void *stackaddr ) { 10fdf0: 55 push %ebp 10fdf1: 89 e5 mov %esp,%ebp 10fdf3: 8b 45 08 mov 0x8(%ebp),%eax if ( !attr || !attr->is_initialized ) 10fdf6: 85 c0 test %eax,%eax 10fdf8: 74 12 je 10fe0c 10fdfa: 8b 10 mov (%eax),%edx 10fdfc: 85 d2 test %edx,%edx 10fdfe: 74 0c je 10fe0c return EINVAL; attr->stackaddr = stackaddr; 10fe00: 8b 55 0c mov 0xc(%ebp),%edx 10fe03: 89 50 04 mov %edx,0x4(%eax) 10fe06: 31 c0 xor %eax,%eax return 0; } 10fe08: c9 leave 10fe09: c3 ret 10fe0a: 66 90 xchg %ax,%ax <== NOT EXECUTED { if ( !attr || !attr->is_initialized ) return EINVAL; attr->stackaddr = stackaddr; return 0; 10fe0c: b8 16 00 00 00 mov $0x16,%eax } 10fe11: c9 leave 10fe12: c3 ret 00111338 : int pthread_attr_setstacksize( pthread_attr_t *attr, size_t stacksize ) { 111338: 55 push %ebp 111339: 89 e5 mov %esp,%ebp 11133b: 8b 45 08 mov 0x8(%ebp),%eax 11133e: 8b 55 0c mov 0xc(%ebp),%edx if ( !attr || !attr->is_initialized ) 111341: 85 c0 test %eax,%eax 111343: 74 23 je 111368 111345: 8b 08 mov (%eax),%ecx 111347: 85 c9 test %ecx,%ecx 111349: 74 1d je 111368 return EINVAL; if (stacksize < PTHREAD_MINIMUM_STACK_SIZE) 11134b: 8b 0d 58 45 12 00 mov 0x124558,%ecx 111351: d1 e1 shl %ecx 111353: 39 d1 cmp %edx,%ecx 111355: 77 09 ja 111360 attr->stacksize = PTHREAD_MINIMUM_STACK_SIZE; else attr->stacksize = stacksize; 111357: 89 50 08 mov %edx,0x8(%eax) 11135a: 31 c0 xor %eax,%eax return 0; } 11135c: c9 leave 11135d: c3 ret 11135e: 66 90 xchg %ax,%ax <== NOT EXECUTED { if ( !attr || !attr->is_initialized ) return EINVAL; if (stacksize < PTHREAD_MINIMUM_STACK_SIZE) attr->stacksize = PTHREAD_MINIMUM_STACK_SIZE; 111360: 89 48 08 mov %ecx,0x8(%eax) 111363: 31 c0 xor %eax,%eax else attr->stacksize = stacksize; return 0; } 111365: c9 leave 111366: c3 ret 111367: 90 nop <== NOT EXECUTED return EINVAL; if (stacksize < PTHREAD_MINIMUM_STACK_SIZE) attr->stacksize = PTHREAD_MINIMUM_STACK_SIZE; else attr->stacksize = stacksize; 111368: b8 16 00 00 00 mov $0x16,%eax return 0; } 11136d: c9 leave 11136e: c3 ret 0010b7a0 : */ int pthread_barrier_destroy( pthread_barrier_t *barrier ) { 10b7a0: 55 push %ebp 10b7a1: 89 e5 mov %esp,%ebp 10b7a3: 83 ec 28 sub $0x28,%esp 10b7a6: 8b 45 08 mov 0x8(%ebp),%eax POSIX_Barrier_Control *the_barrier = NULL; Objects_Locations location; if ( !barrier ) 10b7a9: 85 c0 test %eax,%eax 10b7ab: 74 2f je 10b7dc RTEMS_INLINE_ROUTINE POSIX_Barrier_Control *_POSIX_Barrier_Get ( pthread_barrier_t *barrier, Objects_Locations *location ) { return (POSIX_Barrier_Control *) _Objects_Get( 10b7ad: 51 push %ecx 10b7ae: 8d 55 f4 lea -0xc(%ebp),%edx 10b7b1: 52 push %edx 10b7b2: ff 30 pushl (%eax) 10b7b4: 68 60 90 12 00 push $0x129060 10b7b9: e8 62 25 00 00 call 10dd20 <_Objects_Get> return EINVAL; the_barrier = _POSIX_Barrier_Get( barrier, &location ); switch ( location ) { 10b7be: 83 c4 10 add $0x10,%esp 10b7c1: 8b 55 f4 mov -0xc(%ebp),%edx 10b7c4: 85 d2 test %edx,%edx 10b7c6: 75 14 jne 10b7dc case OBJECTS_LOCAL: if ( the_barrier->Barrier.number_of_waiting_threads != 0 ) { 10b7c8: 8b 48 58 mov 0x58(%eax),%ecx 10b7cb: 85 c9 test %ecx,%ecx 10b7cd: 74 15 je 10b7e4 _Thread_Enable_dispatch(); 10b7cf: e8 c0 2d 00 00 call 10e594 <_Thread_Enable_dispatch> 10b7d4: b8 10 00 00 00 mov $0x10,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10b7d9: c9 leave 10b7da: c3 ret 10b7db: 90 nop <== NOT EXECUTED _Objects_Close( &_POSIX_Barrier_Information, &the_barrier->Object ); _POSIX_Barrier_Free( the_barrier ); _Thread_Enable_dispatch(); return 0; 10b7dc: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10b7e1: c9 leave 10b7e2: c3 ret 10b7e3: 90 nop <== NOT EXECUTED if ( the_barrier->Barrier.number_of_waiting_threads != 0 ) { _Thread_Enable_dispatch(); return EBUSY; } _Objects_Close( &_POSIX_Barrier_Information, &the_barrier->Object ); 10b7e4: 83 ec 08 sub $0x8,%esp 10b7e7: 50 push %eax 10b7e8: 68 60 90 12 00 push $0x129060 10b7ed: 89 45 e4 mov %eax,-0x1c(%ebp) 10b7f0: e8 f7 20 00 00 call 10d8ec <_Objects_Close> */ RTEMS_INLINE_ROUTINE void _POSIX_Barrier_Free ( POSIX_Barrier_Control *the_barrier ) { _Objects_Free( &_POSIX_Barrier_Information, &the_barrier->Object ); 10b7f5: 58 pop %eax 10b7f6: 5a pop %edx 10b7f7: 8b 45 e4 mov -0x1c(%ebp),%eax 10b7fa: 50 push %eax 10b7fb: 68 60 90 12 00 push $0x129060 10b800: e8 eb 23 00 00 call 10dbf0 <_Objects_Free> _POSIX_Barrier_Free( the_barrier ); _Thread_Enable_dispatch(); 10b805: e8 8a 2d 00 00 call 10e594 <_Thread_Enable_dispatch> 10b80a: 31 c0 xor %eax,%eax return 0; 10b80c: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return EINVAL; } 10b80f: c9 leave 10b810: c3 ret 0010b814 : int pthread_barrier_init( pthread_barrier_t *barrier, const pthread_barrierattr_t *attr, unsigned int count ) { 10b814: 55 push %ebp 10b815: 89 e5 mov %esp,%ebp 10b817: 57 push %edi 10b818: 56 push %esi 10b819: 53 push %ebx 10b81a: 83 ec 2c sub $0x2c,%esp 10b81d: 8b 5d 08 mov 0x8(%ebp),%ebx 10b820: 8b 7d 0c mov 0xc(%ebp),%edi 10b823: 8b 75 10 mov 0x10(%ebp),%esi const pthread_barrierattr_t *the_attr; /* * Error check parameters */ if ( !barrier ) 10b826: 85 db test %ebx,%ebx 10b828: 0f 84 82 00 00 00 je 10b8b0 return EINVAL; if ( count == 0 ) 10b82e: 85 f6 test %esi,%esi 10b830: 74 7e je 10b8b0 return EINVAL; /* * If the user passed in NULL, use the default attributes */ if ( attr ) { 10b832: 85 ff test %edi,%edi 10b834: 0f 84 92 00 00 00 je 10b8cc } /* * Now start error checking the attributes that we are going to use */ if ( !the_attr->is_initialized ) 10b83a: 8b 17 mov (%edi),%edx 10b83c: 85 d2 test %edx,%edx 10b83e: 74 70 je 10b8b0 return EINVAL; switch ( the_attr->process_shared ) { 10b840: 8b 47 04 mov 0x4(%edi),%eax 10b843: 85 c0 test %eax,%eax 10b845: 75 69 jne 10b8b0 <== ALWAYS TAKEN } /* * Convert from POSIX attributes to Core Barrier attributes */ the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE; 10b847: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) the_attributes.maximum_count = count; 10b84e: 89 75 e4 mov %esi,-0x1c(%ebp) rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10b851: a1 18 8c 12 00 mov 0x128c18,%eax 10b856: 40 inc %eax 10b857: a3 18 8c 12 00 mov %eax,0x128c18 * 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 *) 10b85c: 83 ec 0c sub $0xc,%esp 10b85f: 68 60 90 12 00 push $0x129060 10b864: e8 07 20 00 00 call 10d870 <_Objects_Allocate> */ _Thread_Disable_dispatch(); /* prevents deletion */ the_barrier = _POSIX_Barrier_Allocate(); if ( !the_barrier ) { 10b869: 83 c4 10 add $0x10,%esp 10b86c: 85 c0 test %eax,%eax 10b86e: 74 50 je 10b8c0 _Thread_Enable_dispatch(); return EAGAIN; } _CORE_barrier_Initialize( &the_barrier->Barrier, &the_attributes ); 10b870: 83 ec 08 sub $0x8,%esp 10b873: 8d 55 e0 lea -0x20(%ebp),%edx 10b876: 52 push %edx 10b877: 8d 50 10 lea 0x10(%eax),%edx 10b87a: 52 push %edx 10b87b: 89 45 d4 mov %eax,-0x2c(%ebp) 10b87e: e8 65 16 00 00 call 10cee8 <_CORE_barrier_Initialize> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10b883: 8b 45 d4 mov -0x2c(%ebp),%eax 10b886: 8b 50 08 mov 0x8(%eax),%edx 10b889: 0f b7 f2 movzwl %dx,%esi 10b88c: 8b 0d 7c 90 12 00 mov 0x12907c,%ecx 10b892: 89 04 b1 mov %eax,(%ecx,%esi,4) _Objects_Get_index( the_object->id ), the_object ); /* ASSERT: information->is_string == false */ the_object->name.name_u32 = name; 10b895: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax) ); /* * Exit the critical section and return the user an operational barrier */ *barrier = the_barrier->Object.id; 10b89c: 89 13 mov %edx,(%ebx) _Thread_Enable_dispatch(); 10b89e: e8 f1 2c 00 00 call 10e594 <_Thread_Enable_dispatch> 10b8a3: 31 c0 xor %eax,%eax return 0; 10b8a5: 83 c4 10 add $0x10,%esp } 10b8a8: 8d 65 f4 lea -0xc(%ebp),%esp 10b8ab: 5b pop %ebx 10b8ac: 5e pop %esi 10b8ad: 5f pop %edi 10b8ae: c9 leave 10b8af: c3 ret /* * Exit the critical section and return the user an operational barrier */ *barrier = the_barrier->Object.id; _Thread_Enable_dispatch(); return 0; 10b8b0: b8 16 00 00 00 mov $0x16,%eax } 10b8b5: 8d 65 f4 lea -0xc(%ebp),%esp 10b8b8: 5b pop %ebx 10b8b9: 5e pop %esi 10b8ba: 5f pop %edi 10b8bb: c9 leave 10b8bc: c3 ret 10b8bd: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED _Thread_Disable_dispatch(); /* prevents deletion */ the_barrier = _POSIX_Barrier_Allocate(); if ( !the_barrier ) { _Thread_Enable_dispatch(); 10b8c0: e8 cf 2c 00 00 call 10e594 <_Thread_Enable_dispatch> 10b8c5: b8 0b 00 00 00 mov $0xb,%eax return EAGAIN; 10b8ca: eb e9 jmp 10b8b5 <== ALWAYS TAKEN * If the user passed in NULL, use the default attributes */ if ( attr ) { the_attr = attr; } else { (void) pthread_barrierattr_init( &my_attr ); 10b8cc: 83 ec 0c sub $0xc,%esp 10b8cf: 8d 7d d8 lea -0x28(%ebp),%edi 10b8d2: 57 push %edi 10b8d3: e8 80 fe ff ff call 10b758 <== ALWAYS TAKEN 10b8d8: 83 c4 10 add $0x10,%esp 10b8db: e9 5a ff ff ff jmp 10b83a <== ALWAYS TAKEN 0010b8e0 : */ int pthread_barrier_wait( pthread_barrier_t *barrier ) { 10b8e0: 55 push %ebp 10b8e1: 89 e5 mov %esp,%ebp 10b8e3: 83 ec 18 sub $0x18,%esp 10b8e6: 8b 45 08 mov 0x8(%ebp),%eax POSIX_Barrier_Control *the_barrier = NULL; Objects_Locations location; if ( !barrier ) 10b8e9: 85 c0 test %eax,%eax 10b8eb: 74 4f je 10b93c RTEMS_INLINE_ROUTINE POSIX_Barrier_Control *_POSIX_Barrier_Get ( pthread_barrier_t *barrier, Objects_Locations *location ) { return (POSIX_Barrier_Control *) _Objects_Get( 10b8ed: 51 push %ecx 10b8ee: 8d 55 f4 lea -0xc(%ebp),%edx 10b8f1: 52 push %edx 10b8f2: ff 30 pushl (%eax) 10b8f4: 68 60 90 12 00 push $0x129060 10b8f9: e8 22 24 00 00 call 10dd20 <_Objects_Get> return EINVAL; the_barrier = _POSIX_Barrier_Get( barrier, &location ); switch ( location ) { 10b8fe: 83 c4 10 add $0x10,%esp 10b901: 8b 55 f4 mov -0xc(%ebp),%edx 10b904: 85 d2 test %edx,%edx 10b906: 75 34 jne 10b93c case OBJECTS_LOCAL: _CORE_barrier_Wait( 10b908: 83 ec 0c sub $0xc,%esp 10b90b: 6a 00 push $0x0 10b90d: 6a 00 push $0x0 10b90f: 6a 01 push $0x1 10b911: ff 70 08 pushl 0x8(%eax) 10b914: 83 c0 10 add $0x10,%eax 10b917: 50 push %eax 10b918: e8 ff 15 00 00 call 10cf1c <_CORE_barrier_Wait> the_barrier->Object.id, true, 0, NULL ); _Thread_Enable_dispatch(); 10b91d: 83 c4 20 add $0x20,%esp 10b920: e8 6f 2c 00 00 call 10e594 <_Thread_Enable_dispatch> return _POSIX_Barrier_Translate_core_barrier_return_code( 10b925: 83 ec 0c sub $0xc,%esp 10b928: a1 d8 8c 12 00 mov 0x128cd8,%eax 10b92d: ff 70 34 pushl 0x34(%eax) 10b930: e8 7f 57 00 00 call 1110b4 <_POSIX_Barrier_Translate_core_barrier_return_code> 10b935: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return EINVAL; } 10b938: c9 leave 10b939: c3 ret 10b93a: 66 90 xchg %ax,%ax <== NOT EXECUTED true, 0, NULL ); _Thread_Enable_dispatch(); return _POSIX_Barrier_Translate_core_barrier_return_code( 10b93c: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10b941: c9 leave 10b942: c3 ret 0010b710 : */ int pthread_barrierattr_destroy( pthread_barrierattr_t *attr ) { 10b710: 55 push %ebp 10b711: 89 e5 mov %esp,%ebp 10b713: 8b 45 08 mov 0x8(%ebp),%eax if ( !attr || attr->is_initialized == false ) 10b716: 85 c0 test %eax,%eax 10b718: 74 12 je 10b72c 10b71a: 8b 10 mov (%eax),%edx 10b71c: 85 d2 test %edx,%edx 10b71e: 74 0c je 10b72c return EINVAL; attr->is_initialized = false; 10b720: c7 00 00 00 00 00 movl $0x0,(%eax) 10b726: 31 c0 xor %eax,%eax return 0; } 10b728: c9 leave 10b729: c3 ret 10b72a: 66 90 xchg %ax,%ax <== NOT EXECUTED { if ( !attr || attr->is_initialized == false ) return EINVAL; attr->is_initialized = false; return 0; 10b72c: b8 16 00 00 00 mov $0x16,%eax } 10b731: c9 leave 10b732: c3 ret 0010b758 : */ int pthread_barrierattr_init( pthread_barrierattr_t *attr ) { 10b758: 55 push %ebp 10b759: 89 e5 mov %esp,%ebp 10b75b: 8b 45 08 mov 0x8(%ebp),%eax if ( !attr ) 10b75e: 85 c0 test %eax,%eax 10b760: 74 12 je 10b774 return EINVAL; attr->is_initialized = true; 10b762: c7 00 01 00 00 00 movl $0x1,(%eax) attr->process_shared = PTHREAD_PROCESS_PRIVATE; 10b768: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax) 10b76f: 31 c0 xor %eax,%eax return 0; } 10b771: c9 leave 10b772: c3 ret 10b773: 90 nop <== NOT EXECUTED int pthread_barrierattr_init( pthread_barrierattr_t *attr ) { if ( !attr ) 10b774: b0 16 mov $0x16,%al return EINVAL; attr->is_initialized = true; attr->process_shared = PTHREAD_PROCESS_PRIVATE; return 0; } 10b776: c9 leave 10b777: c3 ret 0010b778 : int pthread_barrierattr_setpshared( pthread_barrierattr_t *attr, int pshared ) { 10b778: 55 push %ebp 10b779: 89 e5 mov %esp,%ebp 10b77b: 8b 45 08 mov 0x8(%ebp),%eax 10b77e: 8b 55 0c mov 0xc(%ebp),%edx if ( !attr ) 10b781: 85 c0 test %eax,%eax 10b783: 74 0b je 10b790 return EINVAL; if ( !attr->is_initialized ) 10b785: 8b 08 mov (%eax),%ecx 10b787: 85 c9 test %ecx,%ecx 10b789: 74 05 je 10b790 return EINVAL; switch ( pshared ) { 10b78b: 83 fa 01 cmp $0x1,%edx 10b78e: 76 08 jbe 10b798 case PTHREAD_PROCESS_SHARED: case PTHREAD_PROCESS_PRIVATE: attr->process_shared = pshared; return 0; 10b790: b8 16 00 00 00 mov $0x16,%eax default: return EINVAL; } } 10b795: c9 leave 10b796: c3 ret 10b797: 90 nop <== NOT EXECUTED return EINVAL; switch ( pshared ) { case PTHREAD_PROCESS_SHARED: case PTHREAD_PROCESS_PRIVATE: attr->process_shared = pshared; 10b798: 89 50 04 mov %edx,0x4(%eax) 10b79b: 31 c0 xor %eax,%eax return 0; default: return EINVAL; } } 10b79d: c9 leave 10b79e: c3 ret 0010aff0 : */ int pthread_cancel( pthread_t thread ) { 10aff0: 55 push %ebp 10aff1: 89 e5 mov %esp,%ebp 10aff3: 83 ec 18 sub $0x18,%esp /* * Don't even think about deleting a resource from an ISR. */ if ( _ISR_Is_in_progress() ) 10aff6: a1 54 89 12 00 mov 0x128954,%eax 10affb: 85 c0 test %eax,%eax 10affd: 74 09 je 10b008 10afff: b8 47 00 00 00 mov $0x47,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10b004: c9 leave 10b005: c3 ret 10b006: 66 90 xchg %ax,%ax <== NOT EXECUTED RTEMS_INLINE_ROUTINE Thread_Control *_POSIX_Threads_Get ( pthread_t id, Objects_Locations *location ) { return (Thread_Control *) 10b008: 51 push %ecx 10b009: 8d 45 f4 lea -0xc(%ebp),%eax 10b00c: 50 push %eax 10b00d: ff 75 08 pushl 0x8(%ebp) 10b010: 68 80 8b 12 00 push $0x128b80 10b015: e8 72 20 00 00 call 10d08c <_Objects_Get> if ( _ISR_Is_in_progress() ) return EPROTO; the_thread = _POSIX_Threads_Get( thread, &location ); switch ( location ) { 10b01a: 83 c4 10 add $0x10,%esp 10b01d: 8b 55 f4 mov -0xc(%ebp),%edx 10b020: 85 d2 test %edx,%edx 10b022: 75 20 jne 10b044 case OBJECTS_LOCAL: thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ]; thread_support->cancelation_requested = 1; 10b024: 8b 90 f8 00 00 00 mov 0xf8(%eax),%edx 10b02a: c7 82 d4 00 00 00 01 movl $0x1,0xd4(%edx) 10b031: 00 00 00 /* This enables dispatch implicitly */ _POSIX_Thread_Evaluate_cancellation_and_enable_dispatch( the_thread ); 10b034: 83 ec 0c sub $0xc,%esp 10b037: 50 push %eax 10b038: e8 27 51 00 00 call 110164 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch> 10b03d: 31 c0 xor %eax,%eax return 0; 10b03f: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return EINVAL; } 10b042: c9 leave 10b043: c3 ret if ( _ISR_Is_in_progress() ) return EPROTO; the_thread = _POSIX_Threads_Get( thread, &location ); switch ( location ) { 10b044: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10b049: c9 leave 10b04a: c3 ret 0010ae60 : */ void pthread_cleanup_pop( int execute ) { 10ae60: 55 push %ebp 10ae61: 89 e5 mov %esp,%ebp 10ae63: 57 push %edi 10ae64: 56 push %esi 10ae65: 53 push %ebx 10ae66: 83 ec 1c sub $0x1c,%esp 10ae69: 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 ]; 10ae6c: a1 98 74 12 00 mov 0x127498,%eax 10ae71: 8b 80 f8 00 00 00 mov 0xf8(%eax),%eax rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10ae77: 8b 15 d8 73 12 00 mov 0x1273d8,%edx 10ae7d: 42 inc %edx 10ae7e: 89 15 d8 73 12 00 mov %edx,0x1273d8 * 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 ); 10ae84: 9c pushf 10ae85: fa cli 10ae86: 5e pop %esi */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10ae87: 8d 90 dc 00 00 00 lea 0xdc(%eax),%edx POSIX_API_Control *thread_support; ISR_Level level; thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; handler_stack = &thread_support->Cancellation_Handlers; 10ae8d: 39 90 d8 00 00 00 cmp %edx,0xd8(%eax) 10ae93: 74 4f je 10aee4 _Thread_Enable_dispatch(); _ISR_Enable( level ); return; } handler = (POSIX_Cancel_Handler_control *) 10ae95: 8b 42 04 mov 0x4(%edx),%eax ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 10ae98: 8b 08 mov (%eax),%ecx previous = the_node->previous; 10ae9a: 8b 50 04 mov 0x4(%eax),%edx next->previous = previous; 10ae9d: 89 51 04 mov %edx,0x4(%ecx) previous->next = next; 10aea0: 89 0a mov %ecx,(%edx) _Chain_Tail( handler_stack )->previous; _Chain_Extract_unprotected( &handler->Node ); _ISR_Enable( level ); 10aea2: 56 push %esi 10aea3: 9d popf tmp_handler = *handler; 10aea4: 8d 7d d8 lea -0x28(%ebp),%edi 10aea7: b9 04 00 00 00 mov $0x4,%ecx 10aeac: 89 c6 mov %eax,%esi 10aeae: f3 a5 rep movsl %ds:(%esi),%es:(%edi) 10aeb0: 8b 75 e0 mov -0x20(%ebp),%esi 10aeb3: 8b 7d e4 mov -0x1c(%ebp),%edi _Workspace_Free( handler ); 10aeb6: 83 ec 0c sub $0xc,%esp 10aeb9: 50 push %eax 10aeba: e8 5d 38 00 00 call 10e71c <_Workspace_Free> _Thread_Enable_dispatch(); 10aebf: e8 b4 26 00 00 call 10d578 <_Thread_Enable_dispatch> if ( execute ) 10aec4: 83 c4 10 add $0x10,%esp 10aec7: 85 db test %ebx,%ebx 10aec9: 75 09 jne 10aed4 (*tmp_handler.routine)( tmp_handler.arg ); } 10aecb: 8d 65 f4 lea -0xc(%ebp),%esp 10aece: 5b pop %ebx 10aecf: 5e pop %esi 10aed0: 5f pop %edi 10aed1: c9 leave 10aed2: c3 ret 10aed3: 90 nop <== NOT EXECUTED _Workspace_Free( handler ); _Thread_Enable_dispatch(); if ( execute ) (*tmp_handler.routine)( tmp_handler.arg ); 10aed4: 89 7d 08 mov %edi,0x8(%ebp) 10aed7: 89 f0 mov %esi,%eax } 10aed9: 8d 65 f4 lea -0xc(%ebp),%esp 10aedc: 5b pop %ebx 10aedd: 5e pop %esi 10aede: 5f pop %edi 10aedf: c9 leave _Workspace_Free( handler ); _Thread_Enable_dispatch(); if ( execute ) (*tmp_handler.routine)( tmp_handler.arg ); 10aee0: ff e0 jmp *%eax 10aee2: 66 90 xchg %ax,%ax <== NOT EXECUTED _Thread_Disable_dispatch(); _ISR_Disable( level ); if ( _Chain_Is_empty( handler_stack ) ) { _Thread_Enable_dispatch(); 10aee4: e8 8f 26 00 00 call 10d578 <_Thread_Enable_dispatch> _ISR_Enable( level ); 10aee9: 56 push %esi 10aeea: 9d popf _Thread_Enable_dispatch(); if ( execute ) (*tmp_handler.routine)( tmp_handler.arg ); } 10aeeb: 8d 65 f4 lea -0xc(%ebp),%esp 10aeee: 5b pop %ebx 10aeef: 5e pop %esi 10aef0: 5f pop %edi 10aef1: c9 leave 10aef2: c3 ret 0010b1fc : void pthread_cleanup_push( void (*routine)( void * ), void *arg ) { 10b1fc: 55 push %ebp 10b1fd: 89 e5 mov %esp,%ebp 10b1ff: 56 push %esi 10b200: 53 push %ebx 10b201: 8b 5d 08 mov 0x8(%ebp),%ebx 10b204: 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 ) 10b207: 85 db test %ebx,%ebx 10b209: 74 4d je 10b258 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10b20b: a1 18 90 12 00 mov 0x129018,%eax 10b210: 40 inc %eax 10b211: a3 18 90 12 00 mov %eax,0x129018 return; _Thread_Disable_dispatch(); handler = _Workspace_Allocate( sizeof( POSIX_Cancel_Handler_control ) ); 10b216: 83 ec 0c sub $0xc,%esp 10b219: 6a 10 push $0x10 10b21b: e8 dc 3f 00 00 call 10f1fc <_Workspace_Allocate> if ( handler ) { 10b220: 83 c4 10 add $0x10,%esp 10b223: 85 c0 test %eax,%eax 10b225: 74 25 je 10b24c <== ALWAYS TAKEN thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; handler_stack = &thread_support->Cancellation_Handlers; 10b227: 8b 15 d8 90 12 00 mov 0x1290d8,%edx 10b22d: 8b 92 f8 00 00 00 mov 0xf8(%edx),%edx 10b233: 81 c2 d8 00 00 00 add $0xd8,%edx handler->routine = routine; 10b239: 89 58 08 mov %ebx,0x8(%eax) handler->arg = arg; 10b23c: 89 70 0c mov %esi,0xc(%eax) _Chain_Append( handler_stack, &handler->Node ); 10b23f: 83 ec 08 sub $0x8,%esp 10b242: 50 push %eax 10b243: 52 push %edx 10b244: e8 5f 17 00 00 call 10c9a8 <_Chain_Append> 10b249: 83 c4 10 add $0x10,%esp } _Thread_Enable_dispatch(); } 10b24c: 8d 65 f8 lea -0x8(%ebp),%esp 10b24f: 5b pop %ebx 10b250: 5e pop %esi 10b251: c9 leave handler->routine = routine; handler->arg = arg; _Chain_Append( handler_stack, &handler->Node ); } _Thread_Enable_dispatch(); 10b252: e9 8d 2d 00 00 jmp 10dfe4 <_Thread_Enable_dispatch> 10b257: 90 nop <== NOT EXECUTED } 10b258: 8d 65 f8 lea -0x8(%ebp),%esp 10b25b: 5b pop %ebx 10b25c: 5e pop %esi 10b25d: c9 leave 10b25e: c3 ret 0010bf08 : */ int pthread_cond_destroy( pthread_cond_t *cond ) { 10bf08: 55 push %ebp 10bf09: 89 e5 mov %esp,%ebp 10bf0b: 53 push %ebx 10bf0c: 83 ec 1c sub $0x1c,%esp POSIX_Condition_variables_Control *the_cond; Objects_Locations location; the_cond = _POSIX_Condition_variables_Get( cond, &location ); 10bf0f: 8d 45 f4 lea -0xc(%ebp),%eax 10bf12: 50 push %eax 10bf13: ff 75 08 pushl 0x8(%ebp) 10bf16: e8 65 00 00 00 call 10bf80 <_POSIX_Condition_variables_Get> <== ALWAYS TAKEN 10bf1b: 89 c3 mov %eax,%ebx switch ( location ) { 10bf1d: 83 c4 10 add $0x10,%esp 10bf20: 8b 4d f4 mov -0xc(%ebp),%ecx 10bf23: 85 c9 test %ecx,%ecx 10bf25: 75 25 jne 10bf4c case OBJECTS_LOCAL: if ( _Thread_queue_First( &the_cond->Wait_queue ) ) { 10bf27: 83 ec 0c sub $0xc,%esp 10bf2a: 8d 40 18 lea 0x18(%eax),%eax 10bf2d: 50 push %eax 10bf2e: e8 01 3b 00 00 call 10fa34 <_Thread_queue_First> 10bf33: 83 c4 10 add $0x10,%esp 10bf36: 85 c0 test %eax,%eax 10bf38: 74 1e je 10bf58 _Thread_Enable_dispatch(); 10bf3a: e8 b1 33 00 00 call 10f2f0 <_Thread_Enable_dispatch> 10bf3f: b8 10 00 00 00 mov $0x10,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10bf44: 8b 5d fc mov -0x4(%ebp),%ebx 10bf47: c9 leave 10bf48: c3 ret 10bf49: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED { POSIX_Condition_variables_Control *the_cond; Objects_Locations location; the_cond = _POSIX_Condition_variables_Get( cond, &location ); switch ( location ) { 10bf4c: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10bf51: 8b 5d fc mov -0x4(%ebp),%ebx 10bf54: c9 leave 10bf55: c3 ret 10bf56: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( _Thread_queue_First( &the_cond->Wait_queue ) ) { _Thread_Enable_dispatch(); return EBUSY; } _Objects_Close( 10bf58: 83 ec 08 sub $0x8,%esp 10bf5b: 53 push %ebx 10bf5c: 68 e0 a1 12 00 push $0x12a1e0 10bf61: e8 e2 26 00 00 call 10e648 <_Objects_Close> RTEMS_INLINE_ROUTINE void _POSIX_Condition_variables_Free ( POSIX_Condition_variables_Control *the_condition_variable ) { _Objects_Free( 10bf66: 58 pop %eax 10bf67: 5a pop %edx 10bf68: 53 push %ebx 10bf69: 68 e0 a1 12 00 push $0x12a1e0 10bf6e: e8 d9 29 00 00 call 10e94c <_Objects_Free> &_POSIX_Condition_variables_Information, &the_cond->Object ); _POSIX_Condition_variables_Free( the_cond ); _Thread_Enable_dispatch(); 10bf73: e8 78 33 00 00 call 10f2f0 <_Thread_Enable_dispatch> 10bf78: 31 c0 xor %eax,%eax return 0; 10bf7a: 83 c4 10 add $0x10,%esp 10bf7d: eb d2 jmp 10bf51 <== ALWAYS TAKEN 0010bfd4 : int pthread_cond_init( pthread_cond_t *cond, const pthread_condattr_t *attr ) { 10bfd4: 55 push %ebp 10bfd5: 89 e5 mov %esp,%ebp 10bfd7: 53 push %ebx 10bfd8: 83 ec 14 sub $0x14,%esp 10bfdb: 8b 5d 0c mov 0xc(%ebp),%ebx POSIX_Condition_variables_Control *the_cond; const pthread_condattr_t *the_attr; if ( attr ) the_attr = attr; 10bfde: 85 db test %ebx,%ebx 10bfe0: 0f 84 86 00 00 00 je 10c06c /* * Be careful about attributes when global!!! */ if ( the_attr->process_shared == PTHREAD_PROCESS_SHARED ) 10bfe6: 83 7b 04 01 cmpl $0x1,0x4(%ebx) 10bfea: 74 06 je 10bff2 <== ALWAYS TAKEN return EINVAL; if ( !the_attr->is_initialized ) 10bfec: 8b 03 mov (%ebx),%eax 10bfee: 85 c0 test %eax,%eax 10bff0: 75 0a jne 10bffc *cond = the_cond->Object.id; _Thread_Enable_dispatch(); return 0; 10bff2: b8 16 00 00 00 mov $0x16,%eax } 10bff7: 8b 5d fc mov -0x4(%ebp),%ebx 10bffa: c9 leave 10bffb: c3 ret rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10bffc: a1 f8 9c 12 00 mov 0x129cf8,%eax 10c001: 40 inc %eax 10c002: a3 f8 9c 12 00 mov %eax,0x129cf8 */ RTEMS_INLINE_ROUTINE POSIX_Condition_variables_Control *_POSIX_Condition_variables_Allocate( void ) { return (POSIX_Condition_variables_Control *) 10c007: 83 ec 0c sub $0xc,%esp 10c00a: 68 e0 a1 12 00 push $0x12a1e0 10c00f: e8 b8 25 00 00 call 10e5cc <_Objects_Allocate> _Thread_Disable_dispatch(); the_cond = _POSIX_Condition_variables_Allocate(); if ( !the_cond ) { 10c014: 83 c4 10 add $0x10,%esp 10c017: 85 c0 test %eax,%eax 10c019: 74 5d je 10c078 _Thread_Enable_dispatch(); return ENOMEM; } the_cond->process_shared = the_attr->process_shared; 10c01b: 8b 53 04 mov 0x4(%ebx),%edx 10c01e: 89 50 10 mov %edx,0x10(%eax) the_cond->Mutex = POSIX_CONDITION_VARIABLES_NO_MUTEX; 10c021: c7 40 14 00 00 00 00 movl $0x0,0x14(%eax) /* XXX some more initialization might need to go here */ _Thread_queue_Initialize( 10c028: 6a 74 push $0x74 10c02a: 68 00 08 00 00 push $0x800 10c02f: 6a 00 push $0x0 10c031: 8d 50 18 lea 0x18(%eax),%edx 10c034: 52 push %edx 10c035: 89 45 f4 mov %eax,-0xc(%ebp) 10c038: e8 77 3a 00 00 call 10fab4 <_Thread_queue_Initialize> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10c03d: 8b 45 f4 mov -0xc(%ebp),%eax 10c040: 8b 50 08 mov 0x8(%eax),%edx 10c043: 0f b7 da movzwl %dx,%ebx 10c046: 8b 0d fc a1 12 00 mov 0x12a1fc,%ecx 10c04c: 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; 10c04f: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax) &_POSIX_Condition_variables_Information, &the_cond->Object, 0 ); *cond = the_cond->Object.id; 10c056: 8b 45 08 mov 0x8(%ebp),%eax 10c059: 89 10 mov %edx,(%eax) _Thread_Enable_dispatch(); 10c05b: e8 90 32 00 00 call 10f2f0 <_Thread_Enable_dispatch> 10c060: 31 c0 xor %eax,%eax return 0; 10c062: 83 c4 10 add $0x10,%esp } 10c065: 8b 5d fc mov -0x4(%ebp),%ebx 10c068: c9 leave 10c069: c3 ret 10c06a: 66 90 xchg %ax,%ax <== NOT EXECUTED ) { POSIX_Condition_variables_Control *the_cond; const pthread_condattr_t *the_attr; if ( attr ) the_attr = attr; 10c06c: bb c4 33 12 00 mov $0x1233c4,%ebx 10c071: e9 70 ff ff ff jmp 10bfe6 <== ALWAYS TAKEN 10c076: 66 90 xchg %ax,%ax <== NOT EXECUTED _Thread_Disable_dispatch(); the_cond = _POSIX_Condition_variables_Allocate(); if ( !the_cond ) { _Thread_Enable_dispatch(); 10c078: e8 73 32 00 00 call 10f2f0 <_Thread_Enable_dispatch> 10c07d: b8 0c 00 00 00 mov $0xc,%eax return ENOMEM; 10c082: e9 70 ff ff ff jmp 10bff7 <== ALWAYS TAKEN 0010c088 : */ int pthread_cond_signal( pthread_cond_t *cond ) { 10c088: 55 push %ebp 10c089: 89 e5 mov %esp,%ebp 10c08b: 83 ec 10 sub $0x10,%esp return _POSIX_Condition_variables_Signal_support( cond, false ); 10c08e: 6a 00 push $0x0 10c090: ff 75 08 pushl 0x8(%ebp) 10c093: e8 04 00 00 00 call 10c09c <_POSIX_Condition_variables_Signal_support> <== ALWAYS TAKEN } 10c098: c9 leave 10c099: c3 ret 0010c10c : int pthread_cond_timedwait( pthread_cond_t *cond, pthread_mutex_t *mutex, const struct timespec *abstime ) { 10c10c: 55 push %ebp 10c10d: 89 e5 mov %esp,%ebp 10c10f: 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) ) { 10c112: 8d 45 f4 lea -0xc(%ebp),%eax 10c115: 50 push %eax 10c116: ff 75 10 pushl 0x10(%ebp) 10c119: e8 8a 04 00 00 call 10c5a8 <_POSIX_Absolute_timeout_to_ticks> <== ALWAYS TAKEN 10c11e: 83 c4 10 add $0x10,%esp 10c121: 85 c0 test %eax,%eax 10c123: 75 07 jne 10c12c 10c125: b8 16 00 00 00 mov $0x16,%eax cond, mutex, ticks, already_timedout ); } 10c12a: c9 leave 10c12b: c3 ret * 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) ) { 10c12c: 83 f8 02 cmp $0x2,%eax 10c12f: 0f 96 c0 setbe %al 10c132: 0f b6 c0 movzbl %al,%eax default: /* only to silence warnings */ already_timedout = false; break; } return _POSIX_Condition_variables_Wait_support( 10c135: 50 push %eax 10c136: ff 75 f4 pushl -0xc(%ebp) 10c139: ff 75 0c pushl 0xc(%ebp) 10c13c: ff 75 08 pushl 0x8(%ebp) 10c13f: e8 20 00 00 00 call 10c164 <_POSIX_Condition_variables_Wait_support> <== ALWAYS TAKEN 10c144: 83 c4 10 add $0x10,%esp cond, mutex, ticks, already_timedout ); } 10c147: c9 leave 10c148: c3 ret 0010c14c : int pthread_cond_wait( pthread_cond_t *cond, pthread_mutex_t *mutex ) { 10c14c: 55 push %ebp 10c14d: 89 e5 mov %esp,%ebp 10c14f: 83 ec 08 sub $0x8,%esp return _POSIX_Condition_variables_Wait_support( 10c152: 6a 00 push $0x0 10c154: 6a 00 push $0x0 10c156: ff 75 0c pushl 0xc(%ebp) 10c159: ff 75 08 pushl 0x8(%ebp) 10c15c: e8 03 00 00 00 call 10c164 <_POSIX_Condition_variables_Wait_support> <== ALWAYS TAKEN cond, mutex, THREAD_QUEUE_WAIT_FOREVER, false ); } 10c161: c9 leave 10c162: c3 ret 0010be6c : */ int pthread_condattr_destroy( pthread_condattr_t *attr ) { 10be6c: 55 push %ebp 10be6d: 89 e5 mov %esp,%ebp 10be6f: 8b 45 08 mov 0x8(%ebp),%eax if ( !attr || attr->is_initialized == false ) 10be72: 85 c0 test %eax,%eax 10be74: 74 12 je 10be88 10be76: 8b 10 mov (%eax),%edx 10be78: 85 d2 test %edx,%edx 10be7a: 74 0c je 10be88 <== ALWAYS TAKEN return EINVAL; attr->is_initialized = false; 10be7c: c7 00 00 00 00 00 movl $0x0,(%eax) 10be82: 31 c0 xor %eax,%eax return 0; } 10be84: c9 leave 10be85: c3 ret 10be86: 66 90 xchg %ax,%ax <== NOT EXECUTED { if ( !attr || attr->is_initialized == false ) return EINVAL; attr->is_initialized = false; return 0; 10be88: b8 16 00 00 00 mov $0x16,%eax } 10be8d: c9 leave 10be8e: c3 ret 0010be90 : int pthread_condattr_getpshared( const pthread_condattr_t *attr, int *pshared ) { 10be90: 55 push %ebp 10be91: 89 e5 mov %esp,%ebp 10be93: 8b 45 08 mov 0x8(%ebp),%eax if ( !attr ) 10be96: 85 c0 test %eax,%eax 10be98: 74 0e je 10bea8 return EINVAL; *pshared = attr->process_shared; 10be9a: 8b 50 04 mov 0x4(%eax),%edx 10be9d: 8b 45 0c mov 0xc(%ebp),%eax 10bea0: 89 10 mov %edx,(%eax) 10bea2: 31 c0 xor %eax,%eax return 0; } 10bea4: c9 leave 10bea5: c3 ret 10bea6: 66 90 xchg %ax,%ax <== NOT EXECUTED int pthread_condattr_getpshared( const pthread_condattr_t *attr, int *pshared ) { if ( !attr ) 10bea8: b0 16 mov $0x16,%al return EINVAL; *pshared = attr->process_shared; return 0; } 10beaa: c9 leave 10beab: c3 ret 0010beac : */ int pthread_condattr_init( pthread_condattr_t *attr ) { 10beac: 55 push %ebp 10bead: 89 e5 mov %esp,%ebp 10beaf: 8b 45 08 mov 0x8(%ebp),%eax if ( !attr ) 10beb2: 85 c0 test %eax,%eax 10beb4: 74 16 je 10becc return EINVAL; *attr = _POSIX_Condition_variables_Default_attributes; 10beb6: 8b 15 c4 33 12 00 mov 0x1233c4,%edx 10bebc: 8b 0d c8 33 12 00 mov 0x1233c8,%ecx 10bec2: 89 10 mov %edx,(%eax) 10bec4: 89 48 04 mov %ecx,0x4(%eax) 10bec7: 31 c0 xor %eax,%eax return 0; } 10bec9: c9 leave 10beca: c3 ret 10becb: 90 nop <== NOT EXECUTED int pthread_condattr_init( pthread_condattr_t *attr ) { if ( !attr ) 10becc: b0 16 mov $0x16,%al return EINVAL; *attr = _POSIX_Condition_variables_Default_attributes; return 0; } 10bece: c9 leave 10becf: c3 ret 0010bed0 : int pthread_condattr_setpshared( pthread_condattr_t *attr, int pshared ) { 10bed0: 55 push %ebp 10bed1: 89 e5 mov %esp,%ebp 10bed3: 8b 45 08 mov 0x8(%ebp),%eax 10bed6: 8b 55 0c mov 0xc(%ebp),%edx if ( !attr ) 10bed9: 85 c0 test %eax,%eax 10bedb: 74 05 je 10bee2 return EINVAL; switch ( pshared ) { 10bedd: 83 fa 01 cmp $0x1,%edx 10bee0: 76 0a jbe 10beec case PTHREAD_PROCESS_SHARED: case PTHREAD_PROCESS_PRIVATE: attr->process_shared = pshared; return 0; 10bee2: b8 16 00 00 00 mov $0x16,%eax default: return EINVAL; } } 10bee7: c9 leave 10bee8: c3 ret 10bee9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED return EINVAL; switch ( pshared ) { case PTHREAD_PROCESS_SHARED: case PTHREAD_PROCESS_PRIVATE: attr->process_shared = pshared; 10beec: 89 50 04 mov %edx,0x4(%eax) 10beef: 31 c0 xor %eax,%eax return 0; default: return EINVAL; } } 10bef1: c9 leave 10bef2: c3 ret 0010b584 : pthread_t *thread, const pthread_attr_t *attr, void *(*start_routine)( void * ), void *arg ) { 10b584: 55 push %ebp 10b585: 89 e5 mov %esp,%ebp 10b587: 57 push %edi 10b588: 56 push %esi 10b589: 53 push %ebx 10b58a: 83 ec 4c sub $0x4c,%esp 10b58d: 8b 5d 0c mov 0xc(%ebp),%ebx int schedpolicy = SCHED_RR; struct sched_param schedparam; Objects_Name name; int rc; if ( !start_routine ) 10b590: 8b 7d 10 mov 0x10(%ebp),%edi 10b593: 85 ff test %edi,%edi 10b595: 0f 84 79 01 00 00 je 10b714 return EFAULT; the_attr = (attr) ? attr : &_POSIX_Threads_Default_attributes; 10b59b: 85 db test %ebx,%ebx 10b59d: 74 65 je 10b604 if ( !the_attr->is_initialized ) 10b59f: 8b 33 mov (%ebx),%esi 10b5a1: 85 f6 test %esi,%esi 10b5a3: 74 1f je 10b5c4 * 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) ) 10b5a5: 8b 4b 04 mov 0x4(%ebx),%ecx 10b5a8: 85 c9 test %ecx,%ecx 10b5aa: 74 0b je 10b5b7 10b5ac: 8b 43 08 mov 0x8(%ebx),%eax 10b5af: 3b 05 58 45 12 00 cmp 0x124558,%eax 10b5b5: 72 0d jb 10b5c4 * 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 ) { 10b5b7: 8b 43 10 mov 0x10(%ebx),%eax 10b5ba: 83 f8 01 cmp $0x1,%eax 10b5bd: 74 4d je 10b60c 10b5bf: 83 f8 02 cmp $0x2,%eax 10b5c2: 74 10 je 10b5d4 * Return the id and indicate we successfully created the thread */ *thread = the_thread->Object.id; _RTEMS_Unlock_allocator(); return 0; 10b5c4: ba 16 00 00 00 mov $0x16,%edx } 10b5c9: 89 d0 mov %edx,%eax 10b5cb: 8d 65 f4 lea -0xc(%ebp),%esp 10b5ce: 5b pop %ebx 10b5cf: 5e pop %esi 10b5d0: 5f pop %edi 10b5d1: c9 leave 10b5d2: c3 ret 10b5d3: 90 nop <== NOT EXECUTED schedpolicy = api->schedpolicy; schedparam = api->schedparam; break; case PTHREAD_EXPLICIT_SCHED: schedpolicy = the_attr->schedpolicy; 10b5d4: 8b 43 14 mov 0x14(%ebx),%eax 10b5d7: 89 45 c0 mov %eax,-0x40(%ebp) schedparam = the_attr->schedparam; 10b5da: 8d 4d c8 lea -0x38(%ebp),%ecx 10b5dd: 89 4d c4 mov %ecx,-0x3c(%ebp) 10b5e0: 8d 73 18 lea 0x18(%ebx),%esi 10b5e3: b9 06 00 00 00 mov $0x6,%ecx 10b5e8: 8b 7d c4 mov -0x3c(%ebp),%edi 10b5eb: 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 ) 10b5ed: 8b 53 0c mov 0xc(%ebx),%edx 10b5f0: 85 d2 test %edx,%edx 10b5f2: 74 43 je 10b637 <== NEVER TAKEN 10b5f4: ba 86 00 00 00 mov $0x86,%edx */ *thread = the_thread->Object.id; _RTEMS_Unlock_allocator(); return 0; } 10b5f9: 89 d0 mov %edx,%eax 10b5fb: 8d 65 f4 lea -0xc(%ebp),%esp 10b5fe: 5b pop %ebx 10b5ff: 5e pop %esi 10b600: 5f pop %edi 10b601: c9 leave 10b602: c3 ret 10b603: 90 nop <== NOT EXECUTED int rc; if ( !start_routine ) return EFAULT; the_attr = (attr) ? attr : &_POSIX_Threads_Default_attributes; 10b604: bb 00 1e 12 00 mov $0x121e00,%ebx 10b609: eb 94 jmp 10b59f <== ALWAYS TAKEN 10b60b: 90 nop <== NOT EXECUTED * PTHREAD_EXPLICIT_SCHED, then scheduling parameters come from the * attributes structure. */ switch ( the_attr->inheritsched ) { case PTHREAD_INHERIT_SCHED: api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; 10b60c: a1 b8 87 12 00 mov 0x1287b8,%eax 10b611: 8b b0 f8 00 00 00 mov 0xf8(%eax),%esi schedpolicy = api->schedpolicy; 10b617: 8b 46 7c mov 0x7c(%esi),%eax 10b61a: 89 45 c0 mov %eax,-0x40(%ebp) schedparam = api->schedparam; 10b61d: 8d 4d c8 lea -0x38(%ebp),%ecx 10b620: 89 4d c4 mov %ecx,-0x3c(%ebp) 10b623: 83 ee 80 sub $0xffffff80,%esi 10b626: b9 06 00 00 00 mov $0x6,%ecx 10b62b: 8b 7d c4 mov -0x3c(%ebp),%edi 10b62e: 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 ) 10b630: 8b 53 0c mov 0xc(%ebx),%edx 10b633: 85 d2 test %edx,%edx 10b635: 75 bd jne 10b5f4 return ENOTSUP; /* * Interpret the scheduling parameters. */ if ( !_POSIX_Priority_Is_valid( schedparam.sched_priority ) ) 10b637: 83 ec 0c sub $0xc,%esp 10b63a: ff 75 c8 pushl -0x38(%ebp) 10b63d: e8 92 5b 00 00 call 1111d4 <_POSIX_Priority_Is_valid> <== ALWAYS TAKEN 10b642: 83 c4 10 add $0x10,%esp 10b645: 84 c0 test %al,%al 10b647: 0f 84 77 ff ff ff je 10b5c4 <== ALWAYS TAKEN return EINVAL; core_priority = _POSIX_Priority_To_core( schedparam.sched_priority ); 10b64d: 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); 10b650: 0f b6 35 5c 45 12 00 movzbl 0x12455c,%esi /* * Set the core scheduling policy information. */ rc = _POSIX_Thread_Translate_sched_param( 10b657: 8d 45 e0 lea -0x20(%ebp),%eax 10b65a: 50 push %eax 10b65b: 8d 45 e4 lea -0x1c(%ebp),%eax 10b65e: 50 push %eax 10b65f: ff 75 c4 pushl -0x3c(%ebp) 10b662: ff 75 c0 pushl -0x40(%ebp) 10b665: e8 86 5b 00 00 call 1111f0 <_POSIX_Thread_Translate_sched_param> <== ALWAYS TAKEN 10b66a: 89 c2 mov %eax,%edx schedpolicy, &schedparam, &budget_algorithm, &budget_callout ); if ( rc ) 10b66c: 83 c4 10 add $0x10,%esp 10b66f: 85 c0 test %eax,%eax 10b671: 0f 85 52 ff ff ff jne 10b5c9 #endif /* * Lock the allocator mutex for protection */ _RTEMS_Lock_allocator(); 10b677: 83 ec 0c sub $0xc,%esp 10b67a: ff 35 b0 87 12 00 pushl 0x1287b0 10b680: 89 45 b4 mov %eax,-0x4c(%ebp) 10b683: e8 20 17 00 00 call 10cda8 <_API_Mutex_Lock> * _POSIX_Threads_Allocate */ RTEMS_INLINE_ROUTINE Thread_Control *_POSIX_Threads_Allocate( void ) { return (Thread_Control *) _Objects_Allocate( &_POSIX_Threads_Information ); 10b688: c7 04 24 c0 89 12 00 movl $0x1289c0,(%esp) 10b68f: e8 a4 20 00 00 call 10d738 <_Objects_Allocate> 10b694: 89 45 bc mov %eax,-0x44(%ebp) * Allocate the thread control block. * * NOTE: Global threads are not currently supported. */ the_thread = _POSIX_Threads_Allocate(); if ( !the_thread ) { 10b697: 83 c4 10 add $0x10,%esp 10b69a: 85 c0 test %eax,%eax 10b69c: 8b 55 b4 mov -0x4c(%ebp),%edx 10b69f: 0f 84 fe 00 00 00 je 10b7a3 /* * Initialize the core thread for this task. */ name.name_p = NULL; /* posix threads don't have a name by default */ status = _Thread_Initialize( 10b6a5: 8b 4b 08 mov 0x8(%ebx),%ecx 10b6a8: 50 push %eax 10b6a9: 6a 00 push $0x0 10b6ab: 6a 00 push $0x0 10b6ad: ff 75 e0 pushl -0x20(%ebp) 10b6b0: ff 75 e4 pushl -0x1c(%ebp) 10b6b3: 6a 01 push $0x1 10b6b5: 81 e6 ff 00 00 00 and $0xff,%esi 10b6bb: 29 fe sub %edi,%esi 10b6bd: 56 push %esi 10b6be: 6a 01 push $0x1 10b6c0: a1 58 45 12 00 mov 0x124558,%eax 10b6c5: d1 e0 shl %eax 10b6c7: 39 c8 cmp %ecx,%eax 10b6c9: 73 02 jae 10b6cd 10b6cb: 89 c8 mov %ecx,%eax 10b6cd: 50 push %eax 10b6ce: ff 73 04 pushl 0x4(%ebx) 10b6d1: ff 75 bc pushl -0x44(%ebp) 10b6d4: 68 c0 89 12 00 push $0x1289c0 10b6d9: 89 55 b4 mov %edx,-0x4c(%ebp) 10b6dc: e8 43 2e 00 00 call 10e524 <_Thread_Initialize> budget_callout, 0, /* isr level */ name /* posix threads don't have a name */ ); if ( !status ) { 10b6e1: 83 c4 30 add $0x30,%esp 10b6e4: 84 c0 test %al,%al 10b6e6: 8b 55 b4 mov -0x4c(%ebp),%edx 10b6e9: 75 33 jne 10b71e RTEMS_INLINE_ROUTINE void _POSIX_Threads_Free ( Thread_Control *the_pthread ) { _Objects_Free( &_POSIX_Threads_Information, &the_pthread->Object ); 10b6eb: 83 ec 08 sub $0x8,%esp 10b6ee: ff 75 bc pushl -0x44(%ebp) 10b6f1: 68 c0 89 12 00 push $0x1289c0 10b6f6: e8 bd 23 00 00 call 10dab8 <_Objects_Free> _POSIX_Threads_Free( the_thread ); _RTEMS_Unlock_allocator(); 10b6fb: 59 pop %ecx 10b6fc: ff 35 b0 87 12 00 pushl 0x1287b0 10b702: e8 e9 16 00 00 call 10cdf0 <_API_Mutex_Unlock> 10b707: ba 0b 00 00 00 mov $0xb,%edx return EAGAIN; 10b70c: 83 c4 10 add $0x10,%esp 10b70f: e9 b5 fe ff ff jmp 10b5c9 <== ALWAYS TAKEN int schedpolicy = SCHED_RR; struct sched_param schedparam; Objects_Name name; int rc; if ( !start_routine ) 10b714: ba 0e 00 00 00 mov $0xe,%edx 10b719: e9 ab fe ff ff jmp 10b5c9 <== ALWAYS TAKEN } /* * finish initializing the per API structure */ api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 10b71e: 8b 45 bc mov -0x44(%ebp),%eax 10b721: 8b 80 f8 00 00 00 mov 0xf8(%eax),%eax 10b727: 89 45 b8 mov %eax,-0x48(%ebp) api->Attributes = *the_attr; 10b72a: b9 0e 00 00 00 mov $0xe,%ecx 10b72f: 89 c7 mov %eax,%edi 10b731: 89 de mov %ebx,%esi 10b733: f3 a5 rep movsl %ds:(%esi),%es:(%edi) api->detachstate = the_attr->detachstate; 10b735: 8b 43 34 mov 0x34(%ebx),%eax 10b738: 8b 4d b8 mov -0x48(%ebp),%ecx 10b73b: 89 41 38 mov %eax,0x38(%ecx) api->schedpolicy = schedpolicy; 10b73e: 8b 45 c0 mov -0x40(%ebp),%eax 10b741: 89 41 7c mov %eax,0x7c(%ecx) api->schedparam = schedparam; 10b744: 89 cf mov %ecx,%edi 10b746: 83 ef 80 sub $0xffffff80,%edi 10b749: b9 06 00 00 00 mov $0x6,%ecx 10b74e: 8b 75 c4 mov -0x3c(%ebp),%esi 10b751: 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; 10b753: 8b 4d bc mov -0x44(%ebp),%ecx 10b756: c6 41 74 01 movb $0x1,0x74(%ecx) /* * POSIX threads are allocated and started in one operation. */ status = _Thread_Start( 10b75a: 83 ec 0c sub $0xc,%esp 10b75d: 6a 00 push $0x0 10b75f: ff 75 14 pushl 0x14(%ebp) 10b762: ff 75 10 pushl 0x10(%ebp) 10b765: 6a 01 push $0x1 10b767: 51 push %ecx 10b768: 89 55 b4 mov %edx,-0x4c(%ebp) 10b76b: e8 28 38 00 00 call 10ef98 <_Thread_Start> _RTEMS_Unlock_allocator(); return EINVAL; } #endif if ( schedpolicy == SCHED_SPORADIC ) { 10b770: 83 c4 20 add $0x20,%esp 10b773: 83 7d c0 03 cmpl $0x3,-0x40(%ebp) 10b777: 8b 55 b4 mov -0x4c(%ebp),%edx 10b77a: 74 42 je 10b7be } /* * Return the id and indicate we successfully created the thread */ *thread = the_thread->Object.id; 10b77c: 8b 45 bc mov -0x44(%ebp),%eax 10b77f: 8b 48 08 mov 0x8(%eax),%ecx 10b782: 8b 45 08 mov 0x8(%ebp),%eax 10b785: 89 08 mov %ecx,(%eax) _RTEMS_Unlock_allocator(); 10b787: 83 ec 0c sub $0xc,%esp 10b78a: ff 35 b0 87 12 00 pushl 0x1287b0 10b790: 89 55 b4 mov %edx,-0x4c(%ebp) 10b793: e8 58 16 00 00 call 10cdf0 <_API_Mutex_Unlock> return 0; 10b798: 83 c4 10 add $0x10,%esp 10b79b: 8b 55 b4 mov -0x4c(%ebp),%edx 10b79e: e9 26 fe ff ff jmp 10b5c9 <== ALWAYS TAKEN * * NOTE: Global threads are not currently supported. */ the_thread = _POSIX_Threads_Allocate(); if ( !the_thread ) { _RTEMS_Unlock_allocator(); 10b7a3: 83 ec 0c sub $0xc,%esp 10b7a6: ff 35 b0 87 12 00 pushl 0x1287b0 10b7ac: e8 3f 16 00 00 call 10cdf0 <_API_Mutex_Unlock> 10b7b1: ba 0b 00 00 00 mov $0xb,%edx return EAGAIN; 10b7b6: 83 c4 10 add $0x10,%esp 10b7b9: e9 0b fe ff ff jmp 10b5c9 <== ALWAYS TAKEN return EINVAL; } #endif if ( schedpolicy == SCHED_SPORADIC ) { _Watchdog_Insert_ticks( 10b7be: 83 ec 0c sub $0xc,%esp 10b7c1: 8b 45 b8 mov -0x48(%ebp),%eax 10b7c4: 05 88 00 00 00 add $0x88,%eax 10b7c9: 50 push %eax 10b7ca: e8 b9 39 00 00 call 10f188 <_Timespec_To_ticks> Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 10b7cf: 8b 4d b8 mov -0x48(%ebp),%ecx 10b7d2: 89 81 a8 00 00 00 mov %eax,0xa8(%ecx) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 10b7d8: 58 pop %eax 10b7d9: 5a pop %edx 10b7da: 89 c8 mov %ecx,%eax 10b7dc: 05 9c 00 00 00 add $0x9c,%eax 10b7e1: 50 push %eax 10b7e2: 68 d8 87 12 00 push $0x1287d8 10b7e7: e8 c0 3c 00 00 call 10f4ac <_Watchdog_Insert> 10b7ec: 83 c4 10 add $0x10,%esp 10b7ef: 8b 55 b4 mov -0x4c(%ebp),%edx 10b7f2: eb 88 jmp 10b77c <== ALWAYS TAKEN 0010b690 : #include int pthread_detach( pthread_t thread ) { 10b690: 55 push %ebp 10b691: 89 e5 mov %esp,%ebp 10b693: 83 ec 1c sub $0x1c,%esp RTEMS_INLINE_ROUTINE Thread_Control *_POSIX_Threads_Get ( pthread_t id, Objects_Locations *location ) { return (Thread_Control *) 10b696: 8d 45 f4 lea -0xc(%ebp),%eax 10b699: 50 push %eax 10b69a: ff 75 08 pushl 0x8(%ebp) 10b69d: 68 a0 96 12 00 push $0x1296a0 10b6a2: e8 75 22 00 00 call 10d91c <_Objects_Get> register Thread_Control *the_thread; POSIX_API_Control *api; Objects_Locations location; the_thread = _POSIX_Threads_Get( thread, &location ); switch ( location ) { 10b6a7: 83 c4 10 add $0x10,%esp 10b6aa: 8b 55 f4 mov -0xc(%ebp),%edx 10b6ad: 85 d2 test %edx,%edx 10b6af: 75 17 jne 10b6c8 case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_POSIX ]; api->detachstate = PTHREAD_CREATE_DETACHED; 10b6b1: 8b 80 f8 00 00 00 mov 0xf8(%eax),%eax 10b6b7: c7 40 38 00 00 00 00 movl $0x0,0x38(%eax) _Thread_Enable_dispatch(); 10b6be: e8 cd 2a 00 00 call 10e190 <_Thread_Enable_dispatch> 10b6c3: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return ESRCH; } 10b6c5: c9 leave 10b6c6: c3 ret 10b6c7: 90 nop <== NOT EXECUTED register Thread_Control *the_thread; POSIX_API_Control *api; Objects_Locations location; the_thread = _POSIX_Threads_Get( thread, &location ); switch ( location ) { 10b6c8: b8 03 00 00 00 mov $0x3,%eax case OBJECTS_ERROR: break; } return ESRCH; } 10b6cd: c9 leave 10b6ce: c3 ret 00112710 : } void pthread_exit( void *value_ptr ) { 112710: 55 push %ebp 112711: 89 e5 mov %esp,%ebp 112713: 83 ec 10 sub $0x10,%esp _POSIX_Thread_Exit( _Thread_Executing, value_ptr ); 112716: ff 75 08 pushl 0x8(%ebp) 112719: ff 35 98 74 12 00 pushl 0x127498 11271f: e8 88 ff ff ff call 1126ac <_POSIX_Thread_Exit> <== ALWAYS TAKEN 112724: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } 112727: c9 leave <== NOT EXECUTED 112728: c3 ret <== NOT EXECUTED 0010d7bc : int pthread_getschedparam( pthread_t thread, int *policy, struct sched_param *param ) { 10d7bc: 55 push %ebp 10d7bd: 89 e5 mov %esp,%ebp 10d7bf: 57 push %edi 10d7c0: 56 push %esi 10d7c1: 53 push %ebx 10d7c2: 83 ec 1c sub $0x1c,%esp 10d7c5: 8b 7d 0c mov 0xc(%ebp),%edi 10d7c8: 8b 5d 10 mov 0x10(%ebp),%ebx Objects_Locations location; POSIX_API_Control *api; register Thread_Control *the_thread; if ( !policy || !param ) 10d7cb: 85 ff test %edi,%edi 10d7cd: 74 65 je 10d834 10d7cf: 85 db test %ebx,%ebx 10d7d1: 74 61 je 10d834 RTEMS_INLINE_ROUTINE Thread_Control *_POSIX_Threads_Get ( pthread_t id, Objects_Locations *location ) { return (Thread_Control *) 10d7d3: 51 push %ecx 10d7d4: 8d 45 e4 lea -0x1c(%ebp),%eax 10d7d7: 50 push %eax 10d7d8: ff 75 08 pushl 0x8(%ebp) 10d7db: 68 00 b7 12 00 push $0x12b700 10d7e0: e8 5f 23 00 00 call 10fb44 <_Objects_Get> return EINVAL; the_thread = _POSIX_Threads_Get( thread, &location ); switch ( location ) { 10d7e5: 83 c4 10 add $0x10,%esp 10d7e8: 8b 55 e4 mov -0x1c(%ebp),%edx 10d7eb: 85 d2 test %edx,%edx 10d7ed: 75 35 jne 10d824 case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 10d7ef: 8b b0 f8 00 00 00 mov 0xf8(%eax),%esi if ( policy ) *policy = api->schedpolicy; 10d7f5: 8b 56 7c mov 0x7c(%esi),%edx 10d7f8: 89 17 mov %edx,(%edi) if ( param ) { *param = api->schedparam; 10d7fa: 83 ee 80 sub $0xffffff80,%esi 10d7fd: b9 06 00 00 00 mov $0x6,%ecx 10d802: 89 df mov %ebx,%edi 10d804: f3 a5 rep movsl %ds:(%esi),%es:(%edi) param->sched_priority = 10d806: 0f b6 15 5c 72 12 00 movzbl 0x12725c,%edx 10d80d: 2b 50 14 sub 0x14(%eax),%edx 10d810: 89 13 mov %edx,(%ebx) _POSIX_Priority_From_core( the_thread->current_priority ); } _Thread_Enable_dispatch(); 10d812: e8 a1 2b 00 00 call 1103b8 <_Thread_Enable_dispatch> 10d817: 31 c0 xor %eax,%eax break; } return ESRCH; } 10d819: 8d 65 f4 lea -0xc(%ebp),%esp 10d81c: 5b pop %ebx 10d81d: 5e pop %esi 10d81e: 5f pop %edi 10d81f: c9 leave 10d820: c3 ret 10d821: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if ( !policy || !param ) return EINVAL; the_thread = _POSIX_Threads_Get( thread, &location ); switch ( location ) { 10d824: b8 03 00 00 00 mov $0x3,%eax break; } return ESRCH; } 10d829: 8d 65 f4 lea -0xc(%ebp),%esp 10d82c: 5b pop %ebx 10d82d: 5e pop %esi 10d82e: 5f pop %edi 10d82f: c9 leave 10d830: c3 ret 10d831: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED *param = api->schedparam; param->sched_priority = _POSIX_Priority_From_core( the_thread->current_priority ); } _Thread_Enable_dispatch(); return 0; 10d834: b8 16 00 00 00 mov $0x16,%eax break; } return ESRCH; } 10d839: 8d 65 f4 lea -0xc(%ebp),%esp 10d83c: 5b pop %ebx 10d83d: 5e pop %esi 10d83e: 5f pop %edi 10d83f: c9 leave 10d840: c3 ret 0010b57c : */ void *pthread_getspecific( pthread_key_t key ) { 10b57c: 55 push %ebp 10b57d: 89 e5 mov %esp,%ebp 10b57f: 83 ec 2c sub $0x2c,%esp RTEMS_INLINE_ROUTINE POSIX_Keys_Control *_POSIX_Keys_Get ( pthread_key_t id, Objects_Locations *location ) { return (POSIX_Keys_Control *) 10b582: 8d 45 f4 lea -0xc(%ebp),%eax 10b585: 50 push %eax 10b586: ff 75 08 pushl 0x8(%ebp) 10b589: 68 20 99 12 00 push $0x129920 10b58e: e8 a9 24 00 00 call 10da3c <_Objects_Get> uint32_t index; Objects_Locations location; void *key_data; the_key = _POSIX_Keys_Get( key, &location ); switch ( location ) { 10b593: 83 c4 10 add $0x10,%esp 10b596: 8b 55 f4 mov -0xc(%ebp),%edx 10b599: 85 d2 test %edx,%edx 10b59b: 75 2b jne 10b5c8 case OBJECTS_LOCAL: api = _Objects_Get_API( _Thread_Executing->Object.id ); 10b59d: 8b 15 38 95 12 00 mov 0x129538,%edx 10b5a3: 8b 4a 08 mov 0x8(%edx),%ecx index = _Objects_Get_index( _Thread_Executing->Object.id ); key_data = (void *) the_key->Values[ api ][ index ]; 10b5a6: 89 ca mov %ecx,%edx 10b5a8: c1 ea 18 shr $0x18,%edx 10b5ab: 83 e2 07 and $0x7,%edx 10b5ae: 0f b7 c9 movzwl %cx,%ecx 10b5b1: 8b 44 90 14 mov 0x14(%eax,%edx,4),%eax 10b5b5: 8b 04 88 mov (%eax,%ecx,4),%eax _Thread_Enable_dispatch(); 10b5b8: 89 45 e4 mov %eax,-0x1c(%ebp) 10b5bb: e8 f0 2c 00 00 call 10e2b0 <_Thread_Enable_dispatch> 10b5c0: 8b 45 e4 mov -0x1c(%ebp),%eax case OBJECTS_ERROR: break; } return NULL; } 10b5c3: c9 leave 10b5c4: c3 ret 10b5c5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED uint32_t index; Objects_Locations location; void *key_data; the_key = _POSIX_Keys_Get( key, &location ); switch ( location ) { 10b5c8: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return NULL; } 10b5ca: c9 leave 10b5cb: c3 ret 00110260 : int pthread_join( pthread_t thread, void **value_ptr ) { 110260: 55 push %ebp 110261: 89 e5 mov %esp,%ebp 110263: 53 push %ebx 110264: 83 ec 18 sub $0x18,%esp 110267: 8b 5d 0c mov 0xc(%ebp),%ebx 11026a: 8d 45 f4 lea -0xc(%ebp),%eax 11026d: 50 push %eax 11026e: ff 75 08 pushl 0x8(%ebp) 110271: 68 20 0a 13 00 push $0x130a20 110276: e8 05 23 00 00 call 112580 <_Objects_Get> POSIX_API_Control *api; Objects_Locations location; void *return_pointer; the_thread = _POSIX_Threads_Get( thread, &location ); switch ( location ) { 11027b: 83 c4 10 add $0x10,%esp 11027e: 8b 55 f4 mov -0xc(%ebp),%edx 110281: 85 d2 test %edx,%edx 110283: 74 0b je 110290 110285: b8 03 00 00 00 mov $0x3,%eax case OBJECTS_ERROR: break; } return ESRCH; } 11028a: 8b 5d fc mov -0x4(%ebp),%ebx 11028d: c9 leave 11028e: c3 ret 11028f: 90 nop <== NOT EXECUTED the_thread = _POSIX_Threads_Get( thread, &location ); switch ( location ) { case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 110290: 8b 90 f8 00 00 00 mov 0xf8(%eax),%edx if ( api->detachstate == PTHREAD_CREATE_DETACHED ) { 110296: 8b 4a 38 mov 0x38(%edx),%ecx 110299: 85 c9 test %ecx,%ecx 11029b: 74 43 je 1102e0 RTEMS_INLINE_ROUTINE bool _Thread_Is_executing ( const Thread_Control *the_thread ) { return ( the_thread == _Thread_Executing ); 11029d: 8b 0d 18 08 13 00 mov 0x130818,%ecx _Thread_Enable_dispatch(); return EINVAL; } if ( _Thread_Is_executing( the_thread ) ) { 1102a3: 39 c8 cmp %ecx,%eax 1102a5: 74 49 je 1102f0 /* * Put ourself on the threads join list */ _Thread_Executing->Wait.return_argument = &return_pointer; 1102a7: 8d 45 f0 lea -0x10(%ebp),%eax 1102aa: 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; 1102ad: 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 ); 1102b4: 50 push %eax 1102b5: 68 14 36 11 00 push $0x113614 1102ba: 6a 00 push $0x0 1102bc: 83 c2 3c add $0x3c,%edx 1102bf: 52 push %edx 1102c0: e8 3f 30 00 00 call 113304 <_Thread_queue_Enqueue_with_handler> _Thread_Enable_dispatch(); 1102c5: e8 2a 2b 00 00 call 112df4 <_Thread_Enable_dispatch> if ( value_ptr ) 1102ca: 83 c4 10 add $0x10,%esp 1102cd: 85 db test %ebx,%ebx 1102cf: 74 05 je 1102d6 *value_ptr = return_pointer; 1102d1: 8b 45 f0 mov -0x10(%ebp),%eax 1102d4: 89 03 mov %eax,(%ebx) 1102d6: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return ESRCH; } 1102d8: 8b 5d fc mov -0x4(%ebp),%ebx 1102db: c9 leave 1102dc: c3 ret 1102dd: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_POSIX ]; if ( api->detachstate == PTHREAD_CREATE_DETACHED ) { _Thread_Enable_dispatch(); 1102e0: e8 0f 2b 00 00 call 112df4 <_Thread_Enable_dispatch> 1102e5: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return ESRCH; } 1102ea: 8b 5d fc mov -0x4(%ebp),%ebx 1102ed: c9 leave 1102ee: c3 ret 1102ef: 90 nop <== NOT EXECUTED _Thread_Enable_dispatch(); return EINVAL; } if ( _Thread_Is_executing( the_thread ) ) { _Thread_Enable_dispatch(); 1102f0: e8 ff 2a 00 00 call 112df4 <_Thread_Enable_dispatch> 1102f5: b8 2d 00 00 00 mov $0x2d,%eax return EDEADLK; 1102fa: eb 8e jmp 11028a <== ALWAYS TAKEN 0010b400 : int pthread_key_create( pthread_key_t *key, void (*destructor)( void * ) ) { 10b400: 55 push %ebp 10b401: 89 e5 mov %esp,%ebp 10b403: 57 push %edi 10b404: 56 push %esi 10b405: 53 push %ebx 10b406: 83 ec 28 sub $0x28,%esp 10b409: a1 78 94 12 00 mov 0x129478,%eax 10b40e: 40 inc %eax 10b40f: a3 78 94 12 00 mov %eax,0x129478 * 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 ); 10b414: 68 20 99 12 00 push $0x129920 10b419: e8 6e 21 00 00 call 10d58c <_Objects_Allocate> 10b41e: 89 c6 mov %eax,%esi _Thread_Disable_dispatch(); the_key = _POSIX_Keys_Allocate(); if ( !the_key ) { 10b420: 83 c4 10 add $0x10,%esp 10b423: 85 c0 test %eax,%eax 10b425: 0f 84 81 00 00 00 je 10b4ac _Thread_Enable_dispatch(); return EAGAIN; } the_key->destructor = destructor; 10b42b: 8b 45 0c mov 0xc(%ebp),%eax 10b42e: 89 46 10 mov %eax,0x10(%esi) 10b431: bb 01 00 00 00 mov $0x1,%ebx for ( the_api = 1; the_api <= OBJECTS_APIS_LAST; the_api++ ) { if ( _Objects_Information_table[ the_api ] ) { 10b436: 8b 04 9d 4c 94 12 00 mov 0x12944c(,%ebx,4),%eax 10b43d: 85 c0 test %eax,%eax 10b43f: 74 5f je 10b4a0 INTERNAL_ERROR_CORE, true, INTERNAL_ERROR_IMPLEMENTATION_KEY_CREATE_INCONSISTENCY ); #endif bytes_to_allocate = sizeof( void * ) * 10b441: 8b 40 04 mov 0x4(%eax),%eax 10b444: 0f b7 40 10 movzwl 0x10(%eax),%eax 10b448: 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 ); 10b44f: 83 ec 0c sub $0xc,%esp 10b452: 51 push %ecx 10b453: 89 4d e4 mov %ecx,-0x1c(%ebp) 10b456: e8 e5 40 00 00 call 10f540 <_Workspace_Allocate> if ( !table ) { 10b45b: 83 c4 10 add $0x10,%esp 10b45e: 85 c0 test %eax,%eax 10b460: 8b 4d e4 mov -0x1c(%ebp),%ecx 10b463: 74 5b je 10b4c0 _POSIX_Keys_Free( the_key ); _Thread_Enable_dispatch(); return ENOMEM; } the_key->Values[ the_api ] = table; 10b465: 89 44 9e 14 mov %eax,0x14(%esi,%ebx,4) memset( table, '\0', bytes_to_allocate ); 10b469: 89 c7 mov %eax,%edi 10b46b: 31 c0 xor %eax,%eax 10b46d: f3 aa rep stos %al,%es:(%edi) * for. [NOTE: Currently RTEMS Classic API tasks are always enabled.] */ for ( the_api = 1; the_api <= OBJECTS_APIS_LAST; the_api++ ) { 10b46f: 43 inc %ebx * 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; 10b470: 83 fb 05 cmp $0x5,%ebx 10b473: 75 c1 jne 10b436 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10b475: 8b 46 08 mov 0x8(%esi),%eax 10b478: 0f b7 c8 movzwl %ax,%ecx 10b47b: 8b 15 3c 99 12 00 mov 0x12993c,%edx 10b481: 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; 10b484: c7 46 0c 00 00 00 00 movl $0x0,0xc(%esi) } _Objects_Open_u32( &_POSIX_Keys_Information, &the_key->Object, 0 ); *key = the_key->Object.id; 10b48b: 8b 55 08 mov 0x8(%ebp),%edx 10b48e: 89 02 mov %eax,(%edx) _Thread_Enable_dispatch(); 10b490: e8 1b 2e 00 00 call 10e2b0 <_Thread_Enable_dispatch> 10b495: 31 c0 xor %eax,%eax return 0; } 10b497: 8d 65 f4 lea -0xc(%ebp),%esp 10b49a: 5b pop %ebx 10b49b: 5e pop %esi 10b49c: 5f pop %edi 10b49d: c9 leave 10b49e: c3 ret 10b49f: 90 nop <== NOT EXECUTED } the_key->Values[ the_api ] = table; memset( table, '\0', bytes_to_allocate ); } else { the_key->Values[ the_api ] = NULL; 10b4a0: c7 44 9e 14 00 00 00 movl $0x0,0x14(%esi,%ebx,4) 10b4a7: 00 10b4a8: eb c5 jmp 10b46f <== ALWAYS TAKEN 10b4aa: 66 90 xchg %ax,%ax <== NOT EXECUTED _Thread_Disable_dispatch(); the_key = _POSIX_Keys_Allocate(); if ( !the_key ) { _Thread_Enable_dispatch(); 10b4ac: e8 ff 2d 00 00 call 10e2b0 <_Thread_Enable_dispatch> 10b4b1: b8 0b 00 00 00 mov $0xb,%eax *key = the_key->Object.id; _Thread_Enable_dispatch(); return 0; } 10b4b6: 8d 65 f4 lea -0xc(%ebp),%esp 10b4b9: 5b pop %ebx 10b4ba: 5e pop %esi 10b4bb: 5f pop %edi 10b4bc: c9 leave 10b4bd: c3 ret 10b4be: 66 90 xchg %ax,%ax <== NOT EXECUTED #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; 10b4c0: 89 df mov %ebx,%edi 10b4c2: 4f dec %edi 10b4c3: 74 1a je 10b4df 10b4c5: 8d 5c 9e 10 lea 0x10(%esi,%ebx,4),%ebx 10b4c9: 8d 76 00 lea 0x0(%esi),%esi the_api >= 1; the_api-- ) _Workspace_Free( the_key->Values[ the_api ] ); 10b4cc: 83 ec 0c sub $0xc,%esp 10b4cf: ff 33 pushl (%ebx) 10b4d1: e8 86 40 00 00 call 10f55c <_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-- ) 10b4d6: 83 eb 04 sub $0x4,%ebx #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; 10b4d9: 83 c4 10 add $0x10,%esp 10b4dc: 4f dec %edi 10b4dd: 75 ed jne 10b4cc */ RTEMS_INLINE_ROUTINE void _POSIX_Keys_Free ( POSIX_Keys_Control *the_key ) { _Objects_Free( &_POSIX_Keys_Information, &the_key->Object ); 10b4df: 83 ec 08 sub $0x8,%esp 10b4e2: 56 push %esi 10b4e3: 68 20 99 12 00 push $0x129920 10b4e8: e8 1f 24 00 00 call 10d90c <_Objects_Free> the_api >= 1; the_api-- ) _Workspace_Free( the_key->Values[ the_api ] ); _POSIX_Keys_Free( the_key ); _Thread_Enable_dispatch(); 10b4ed: e8 be 2d 00 00 call 10e2b0 <_Thread_Enable_dispatch> 10b4f2: b8 0c 00 00 00 mov $0xc,%eax return ENOMEM; 10b4f7: 83 c4 10 add $0x10,%esp 10b4fa: eb 9b jmp 10b497 <== ALWAYS TAKEN 001136b8 : int pthread_kill( pthread_t thread, int sig ) { 1136b8: 55 push %ebp 1136b9: 89 e5 mov %esp,%ebp 1136bb: 57 push %edi 1136bc: 56 push %esi 1136bd: 53 push %ebx 1136be: 83 ec 1c sub $0x1c,%esp 1136c1: 8b 5d 0c mov 0xc(%ebp),%ebx POSIX_API_Control *api; Thread_Control *the_thread; Objects_Locations location; if ( !sig ) 1136c4: 85 db test %ebx,%ebx 1136c6: 0f 84 8c 00 00 00 je 113758 static inline bool is_valid_signo( int signo ) { return ((signo) >= 1 && (signo) <= 32 ); 1136cc: 8d 7b ff lea -0x1(%ebx),%edi rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) ) 1136cf: 83 ff 1f cmp $0x1f,%edi 1136d2: 0f 87 80 00 00 00 ja 113758 RTEMS_INLINE_ROUTINE Thread_Control *_POSIX_Threads_Get ( pthread_t id, Objects_Locations *location ) { return (Thread_Control *) 1136d8: 51 push %ecx 1136d9: 8d 45 e4 lea -0x1c(%ebp),%eax 1136dc: 50 push %eax 1136dd: ff 75 08 pushl 0x8(%ebp) 1136e0: 68 a0 76 12 00 push $0x1276a0 1136e5: e8 56 95 ff ff call 10cc40 <_Objects_Get> 1136ea: 89 c6 mov %eax,%esi rtems_set_errno_and_return_minus_one( EINVAL ); the_thread = _POSIX_Threads_Get( thread, &location ); switch ( location ) { 1136ec: 83 c4 10 add $0x10,%esp 1136ef: 8b 55 e4 mov -0x1c(%ebp),%edx 1136f2: 85 d2 test %edx,%edx 1136f4: 75 76 jne 11376c case OBJECTS_LOCAL: /* * If sig == 0 then just validate arguments */ api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 1136f6: 8b 90 f8 00 00 00 mov 0xf8(%eax),%edx if ( sig ) { if ( _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN ) { 1136fc: 8d 04 5b lea (%ebx,%ebx,2),%eax 1136ff: 83 3c 85 c8 79 12 00 cmpl $0x1,0x1279c8(,%eax,4) 113706: 01 113707: 74 31 je 11373a return 0; } /* XXX critical section */ api->signals_pending |= signo_to_mask( sig ); 113709: b8 01 00 00 00 mov $0x1,%eax 11370e: 89 f9 mov %edi,%ecx 113710: d3 e0 shl %cl,%eax 113712: 09 82 c8 00 00 00 or %eax,0xc8(%edx) (void) _POSIX_signals_Unblock_thread( the_thread, sig, NULL ); 113718: 50 push %eax 113719: 6a 00 push $0x0 11371b: 53 push %ebx 11371c: 56 push %esi 11371d: e8 7a fe ff ff call 11359c <_POSIX_signals_Unblock_thread> the_thread->do_post_task_switch_extension = true; 113722: c6 46 74 01 movb $0x1,0x74(%esi) if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) 113726: a1 74 74 12 00 mov 0x127474,%eax 11372b: 83 c4 10 add $0x10,%esp 11372e: 85 c0 test %eax,%eax 113730: 74 08 je 11373a 113732: 3b 35 98 74 12 00 cmp 0x127498,%esi 113738: 74 12 je 11374c _ISR_Signals_to_thread_executing = true; } _Thread_Enable_dispatch(); 11373a: e8 75 9d ff ff call 10d4b4 <_Thread_Enable_dispatch> 11373f: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( ESRCH ); } 113741: 8d 65 f4 lea -0xc(%ebp),%esp 113744: 5b pop %ebx 113745: 5e pop %esi 113746: 5f pop %edi 113747: c9 leave 113748: c3 ret 113749: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED (void) _POSIX_signals_Unblock_thread( the_thread, sig, NULL ); the_thread->do_post_task_switch_extension = true; if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) _ISR_Signals_to_thread_executing = true; 11374c: c6 05 48 75 12 00 01 movb $0x1,0x127548 113753: eb e5 jmp 11373a <== ALWAYS TAKEN 113755: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if ( !sig ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) ) rtems_set_errno_and_return_minus_one( EINVAL ); 113758: e8 b3 00 00 00 call 113810 <__errno> 11375d: c7 00 16 00 00 00 movl $0x16,(%eax) 113763: b8 ff ff ff ff mov $0xffffffff,%eax 113768: eb d7 jmp 113741 <== ALWAYS TAKEN 11376a: 66 90 xchg %ax,%ax <== NOT EXECUTED #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( ESRCH ); 11376c: e8 9f 00 00 00 call 113810 <__errno> 113771: c7 00 03 00 00 00 movl $0x3,(%eax) 113777: b8 ff ff ff ff mov $0xffffffff,%eax 11377c: eb c3 jmp 113741 <== ALWAYS TAKEN 0010cfac : */ int pthread_mutex_destroy( pthread_mutex_t *mutex ) { 10cfac: 55 push %ebp 10cfad: 89 e5 mov %esp,%ebp 10cfaf: 83 ec 30 sub $0x30,%esp register POSIX_Mutex_Control *the_mutex; Objects_Locations location; the_mutex = _POSIX_Mutex_Get( mutex, &location ); 10cfb2: 8d 45 f4 lea -0xc(%ebp),%eax 10cfb5: 50 push %eax 10cfb6: ff 75 08 pushl 0x8(%ebp) 10cfb9: e8 ba 00 00 00 call 10d078 <_POSIX_Mutex_Get> <== ALWAYS TAKEN switch ( location ) { 10cfbe: 83 c4 10 add $0x10,%esp 10cfc1: 8b 55 f4 mov -0xc(%ebp),%edx 10cfc4: 85 d2 test %edx,%edx 10cfc6: 74 08 je 10cfd0 10cfc8: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10cfcd: c9 leave 10cfce: c3 ret 10cfcf: 90 nop <== NOT EXECUTED /* * 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 ) ) { 10cfd0: 8b 48 64 mov 0x64(%eax),%ecx 10cfd3: 85 c9 test %ecx,%ecx 10cfd5: 75 0d jne 10cfe4 _Thread_Enable_dispatch(); 10cfd7: e8 dc 33 00 00 call 1103b8 <_Thread_Enable_dispatch> 10cfdc: b8 10 00 00 00 mov $0x10,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10cfe1: c9 leave 10cfe2: c3 ret 10cfe3: 90 nop <== NOT EXECUTED if ( _CORE_mutex_Is_locked( &the_mutex->Mutex ) ) { _Thread_Enable_dispatch(); return EBUSY; } _Objects_Close( &_POSIX_Mutex_Information, &the_mutex->Object ); 10cfe4: 83 ec 08 sub $0x8,%esp 10cfe7: 50 push %eax 10cfe8: 68 40 b8 12 00 push $0x12b840 10cfed: 89 45 e4 mov %eax,-0x1c(%ebp) 10cff0: e8 1b 27 00 00 call 10f710 <_Objects_Close> _CORE_mutex_Flush( &the_mutex->Mutex, NULL, EINVAL ); 10cff5: 83 c4 0c add $0xc,%esp 10cff8: 6a 16 push $0x16 10cffa: 6a 00 push $0x0 10cffc: 8b 45 e4 mov -0x1c(%ebp),%eax 10cfff: 8d 50 14 lea 0x14(%eax),%edx 10d002: 52 push %edx 10d003: e8 2c 1e 00 00 call 10ee34 <_CORE_mutex_Flush> RTEMS_INLINE_ROUTINE void _POSIX_Mutex_Free ( POSIX_Mutex_Control *the_mutex ) { _Objects_Free( &_POSIX_Mutex_Information, &the_mutex->Object ); 10d008: 58 pop %eax 10d009: 5a pop %edx 10d00a: 8b 45 e4 mov -0x1c(%ebp),%eax 10d00d: 50 push %eax 10d00e: 68 40 b8 12 00 push $0x12b840 10d013: e8 fc 29 00 00 call 10fa14 <_Objects_Free> _POSIX_Mutex_Free( the_mutex ); _Thread_Enable_dispatch(); 10d018: e8 9b 33 00 00 call 1103b8 <_Thread_Enable_dispatch> 10d01d: 31 c0 xor %eax,%eax return 0; 10d01f: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return EINVAL; } 10d022: c9 leave 10d023: c3 ret 0010d0cc : int pthread_mutex_getprioceiling( pthread_mutex_t *mutex, int *prioceiling ) { 10d0cc: 55 push %ebp 10d0cd: 89 e5 mov %esp,%ebp 10d0cf: 53 push %ebx 10d0d0: 83 ec 14 sub $0x14,%esp 10d0d3: 8b 5d 0c mov 0xc(%ebp),%ebx register POSIX_Mutex_Control *the_mutex; Objects_Locations location; if ( !prioceiling ) 10d0d6: 85 db test %ebx,%ebx 10d0d8: 74 19 je 10d0f3 return EINVAL; the_mutex = _POSIX_Mutex_Get( mutex, &location ); 10d0da: 83 ec 08 sub $0x8,%esp 10d0dd: 8d 45 f4 lea -0xc(%ebp),%eax 10d0e0: 50 push %eax 10d0e1: ff 75 08 pushl 0x8(%ebp) 10d0e4: e8 8f ff ff ff call 10d078 <_POSIX_Mutex_Get> <== ALWAYS TAKEN switch ( location ) { 10d0e9: 83 c4 10 add $0x10,%esp 10d0ec: 8b 55 f4 mov -0xc(%ebp),%edx 10d0ef: 85 d2 test %edx,%edx 10d0f1: 74 0d je 10d100 case OBJECTS_LOCAL: *prioceiling = _POSIX_Priority_From_core( the_mutex->Mutex.Attributes.priority_ceiling ); _Thread_Enable_dispatch(); return 0; 10d0f3: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10d0f8: 8b 5d fc mov -0x4(%ebp),%ebx 10d0fb: c9 leave 10d0fc: c3 ret 10d0fd: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED the_mutex = _POSIX_Mutex_Get( mutex, &location ); switch ( location ) { case OBJECTS_LOCAL: *prioceiling = _POSIX_Priority_From_core( 10d100: 0f b6 15 5c 72 12 00 movzbl 0x12725c,%edx 10d107: 2b 50 60 sub 0x60(%eax),%edx 10d10a: 89 13 mov %edx,(%ebx) the_mutex->Mutex.Attributes.priority_ceiling ); _Thread_Enable_dispatch(); 10d10c: e8 a7 32 00 00 call 1103b8 <_Thread_Enable_dispatch> 10d111: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10d113: 8b 5d fc mov -0x4(%ebp),%ebx 10d116: c9 leave 10d117: c3 ret 0010d118 : int pthread_mutex_init( pthread_mutex_t *mutex, const pthread_mutexattr_t *attr ) { 10d118: 55 push %ebp 10d119: 89 e5 mov %esp,%ebp 10d11b: 57 push %edi 10d11c: 56 push %esi 10d11d: 53 push %ebx 10d11e: 83 ec 1c sub $0x1c,%esp 10d121: 8b 75 08 mov 0x8(%ebp),%esi 10d124: 8b 5d 0c mov 0xc(%ebp),%ebx 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; 10d127: 85 db test %ebx,%ebx 10d129: 0f 84 09 01 00 00 je 10d238 else the_attr = &_POSIX_Mutex_Default_attributes; /* Check for NULL mutex */ if ( !mutex ) 10d12f: 85 f6 test %esi,%esi 10d131: 0f 84 e5 00 00 00 je 10d21c } } } #endif if ( !the_attr->is_initialized ) 10d137: 8b 13 mov (%ebx),%edx 10d139: 85 d2 test %edx,%edx 10d13b: 0f 84 db 00 00 00 je 10d21c return EINVAL; /* * We only support process private mutexes. */ if ( the_attr->process_shared == PTHREAD_PROCESS_SHARED ) 10d141: 8b 43 04 mov 0x4(%ebx),%eax 10d144: 83 f8 01 cmp $0x1,%eax 10d147: 0f 84 f7 00 00 00 je 10d244 return ENOSYS; if ( the_attr->process_shared != PTHREAD_PROCESS_PRIVATE ) 10d14d: 85 c0 test %eax,%eax 10d14f: 0f 85 c7 00 00 00 jne 10d21c return EINVAL; /* * Determine the discipline of the mutex */ switch ( the_attr->protocol ) { 10d155: 8b 43 0c mov 0xc(%ebx),%eax 10d158: 83 f8 01 cmp $0x1,%eax 10d15b: 0f 84 e7 00 00 00 je 10d248 10d161: 83 f8 02 cmp $0x2,%eax 10d164: 0f 84 c2 00 00 00 je 10d22c 10d16a: 85 c0 test %eax,%eax 10d16c: 0f 85 aa 00 00 00 jne 10d21c 10d172: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) } /* * Validate the priority ceiling field -- should always be valid. */ if ( !_POSIX_Priority_Is_valid( the_attr->prio_ceiling ) ) 10d179: 83 ec 0c sub $0xc,%esp 10d17c: ff 73 08 pushl 0x8(%ebx) 10d17f: e8 2c 03 00 00 call 10d4b0 <_POSIX_Priority_Is_valid> <== ALWAYS TAKEN 10d184: 83 c4 10 add $0x10,%esp 10d187: 84 c0 test %al,%al 10d189: 0f 84 8d 00 00 00 je 10d21c #if defined(_UNIX98_THREAD_MUTEX_ATTRIBUTES) /* * Validate the mutex type and set appropriate SuperCore mutex * attributes. */ switch ( the_attr->type ) { 10d18f: 83 7b 10 03 cmpl $0x3,0x10(%ebx) 10d193: 0f 87 83 00 00 00 ja 10d21c 10d199: a1 38 b4 12 00 mov 0x12b438,%eax 10d19e: 40 inc %eax 10d19f: a3 38 b4 12 00 mov %eax,0x12b438 * _POSIX_Mutex_Allocate */ RTEMS_INLINE_ROUTINE POSIX_Mutex_Control *_POSIX_Mutex_Allocate( void ) { return (POSIX_Mutex_Control *) _Objects_Allocate( &_POSIX_Mutex_Information ); 10d1a4: 83 ec 0c sub $0xc,%esp 10d1a7: 68 40 b8 12 00 push $0x12b840 10d1ac: e8 e3 24 00 00 call 10f694 <_Objects_Allocate> 10d1b1: 89 c7 mov %eax,%edi */ _Thread_Disable_dispatch(); the_mutex = _POSIX_Mutex_Allocate(); if ( !the_mutex ) { 10d1b3: 83 c4 10 add $0x10,%esp 10d1b6: 85 c0 test %eax,%eax 10d1b8: 0f 84 96 00 00 00 je 10d254 _Thread_Enable_dispatch(); return EAGAIN; } the_mutex->process_shared = the_attr->process_shared; 10d1be: 8b 43 04 mov 0x4(%ebx),%eax 10d1c1: 89 47 10 mov %eax,0x10(%edi) the_mutex_attr = &the_mutex->Mutex.Attributes; if ( the_attr->recursive ) the_mutex_attr->lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; 10d1c4: 31 c0 xor %eax,%eax 10d1c6: 83 7b 14 00 cmpl $0x0,0x14(%ebx) 10d1ca: 0f 94 c0 sete %al 10d1cd: 89 47 54 mov %eax,0x54(%edi) else the_mutex_attr->lock_nesting_behavior = CORE_MUTEX_NESTING_IS_ERROR; the_mutex_attr->only_owner_release = true; 10d1d0: c6 47 58 01 movb $0x1,0x58(%edi) the_mutex_attr->priority_ceiling = 10d1d4: 0f b6 05 5c 72 12 00 movzbl 0x12725c,%eax 10d1db: 2b 43 08 sub 0x8(%ebx),%eax 10d1de: 89 47 60 mov %eax,0x60(%edi) _POSIX_Priority_To_core( the_attr->prio_ceiling ); the_mutex_attr->discipline = the_discipline; 10d1e1: 8b 45 e4 mov -0x1c(%ebp),%eax 10d1e4: 89 47 5c mov %eax,0x5c(%edi) /* * Must be initialized to unlocked. */ _CORE_mutex_Initialize( 10d1e7: 50 push %eax 10d1e8: 6a 01 push $0x1 10d1ea: 8d 47 54 lea 0x54(%edi),%eax 10d1ed: 50 push %eax 10d1ee: 8d 47 14 lea 0x14(%edi),%eax 10d1f1: 50 push %eax 10d1f2: e8 49 1c 00 00 call 10ee40 <_CORE_mutex_Initialize> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10d1f7: 8b 47 08 mov 0x8(%edi),%eax 10d1fa: 0f b7 c8 movzwl %ax,%ecx 10d1fd: 8b 15 5c b8 12 00 mov 0x12b85c,%edx 10d203: 89 3c 8a mov %edi,(%edx,%ecx,4) _Objects_Get_index( the_object->id ), the_object ); /* ASSERT: information->is_string == false */ the_object->name.name_u32 = name; 10d206: c7 47 0c 00 00 00 00 movl $0x0,0xc(%edi) CORE_MUTEX_UNLOCKED ); _Objects_Open_u32( &_POSIX_Mutex_Information, &the_mutex->Object, 0 ); *mutex = the_mutex->Object.id; 10d20d: 89 06 mov %eax,(%esi) _Thread_Enable_dispatch(); 10d20f: e8 a4 31 00 00 call 1103b8 <_Thread_Enable_dispatch> 10d214: 31 c0 xor %eax,%eax return 0; 10d216: 83 c4 10 add $0x10,%esp 10d219: eb 06 jmp 10d221 <== ALWAYS TAKEN 10d21b: 90 nop <== NOT EXECUTED 10d21c: b8 16 00 00 00 mov $0x16,%eax } 10d221: 8d 65 f4 lea -0xc(%ebp),%esp 10d224: 5b pop %ebx 10d225: 5e pop %esi 10d226: 5f pop %edi 10d227: c9 leave 10d228: c3 ret 10d229: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED return EINVAL; /* * Determine the discipline of the mutex */ switch ( the_attr->protocol ) { 10d22c: c7 45 e4 03 00 00 00 movl $0x3,-0x1c(%ebp) case PTHREAD_PRIO_INHERIT: the_discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; break; case PTHREAD_PRIO_PROTECT: the_discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING; break; 10d233: e9 41 ff ff ff jmp 10d179 <== ALWAYS TAKEN 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; 10d238: bb c0 b8 12 00 mov $0x12b8c0,%ebx 10d23d: e9 ed fe ff ff jmp 10d12f <== ALWAYS TAKEN 10d242: 66 90 xchg %ax,%ax <== NOT EXECUTED return EINVAL; /* * We only support process private mutexes. */ if ( the_attr->process_shared == PTHREAD_PROCESS_SHARED ) 10d244: b0 58 mov $0x58,%al 10d246: eb d9 jmp 10d221 <== ALWAYS TAKEN return EINVAL; /* * Determine the discipline of the mutex */ switch ( the_attr->protocol ) { 10d248: c7 45 e4 02 00 00 00 movl $0x2,-0x1c(%ebp) 10d24f: e9 25 ff ff ff jmp 10d179 <== ALWAYS TAKEN _Thread_Disable_dispatch(); the_mutex = _POSIX_Mutex_Allocate(); if ( !the_mutex ) { _Thread_Enable_dispatch(); 10d254: e8 5f 31 00 00 call 1103b8 <_Thread_Enable_dispatch> 10d259: b8 0b 00 00 00 mov $0xb,%eax return EAGAIN; 10d25e: eb c1 jmp 10d221 <== ALWAYS TAKEN 0010d260 : */ int pthread_mutex_lock( pthread_mutex_t *mutex ) { 10d260: 55 push %ebp 10d261: 89 e5 mov %esp,%ebp 10d263: 83 ec 0c sub $0xc,%esp return _POSIX_Mutex_Lock_support( mutex, true, THREAD_QUEUE_WAIT_FOREVER ); 10d266: 6a 00 push $0x0 10d268: 6a 01 push $0x1 10d26a: ff 75 08 pushl 0x8(%ebp) 10d26d: e8 02 00 00 00 call 10d274 <_POSIX_Mutex_Lock_support> <== ALWAYS TAKEN } 10d272: c9 leave 10d273: c3 ret 0010d2d8 : int pthread_mutex_setprioceiling( pthread_mutex_t *mutex, int prioceiling, int *old_ceiling ) { 10d2d8: 55 push %ebp 10d2d9: 89 e5 mov %esp,%ebp 10d2db: 57 push %edi 10d2dc: 56 push %esi 10d2dd: 53 push %ebx 10d2de: 83 ec 2c sub $0x2c,%esp 10d2e1: 8b 7d 08 mov 0x8(%ebp),%edi 10d2e4: 8b 75 0c mov 0xc(%ebp),%esi 10d2e7: 8b 5d 10 mov 0x10(%ebp),%ebx register POSIX_Mutex_Control *the_mutex; Objects_Locations location; Priority_Control the_priority; if ( !old_ceiling ) 10d2ea: 85 db test %ebx,%ebx 10d2ec: 74 10 je 10d2fe return EINVAL; if ( !_POSIX_Priority_Is_valid( prioceiling ) ) 10d2ee: 83 ec 0c sub $0xc,%esp 10d2f1: 56 push %esi 10d2f2: e8 b9 01 00 00 call 10d4b0 <_POSIX_Priority_Is_valid> <== ALWAYS TAKEN 10d2f7: 83 c4 10 add $0x10,%esp 10d2fa: 84 c0 test %al,%al 10d2fc: 75 0e jne 10d30c the_mutex->Object.id, NULL ); _Thread_Enable_dispatch(); return 0; 10d2fe: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10d303: 8d 65 f4 lea -0xc(%ebp),%esp 10d306: 5b pop %ebx 10d307: 5e pop %esi 10d308: 5f pop %edi 10d309: c9 leave 10d30a: c3 ret 10d30b: 90 nop <== NOT EXECUTED RTEMS_INLINE_ROUTINE Priority_Control _POSIX_Priority_To_core( int priority ) { return (Priority_Control) (POSIX_SCHEDULER_MAXIMUM_PRIORITY - priority + 1); 10d30c: a0 5c 72 12 00 mov 0x12725c,%al 10d311: 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 ); 10d314: 83 ec 0c sub $0xc,%esp 10d317: 57 push %edi 10d318: e8 43 ff ff ff call 10d260 <== 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 ); 10d31d: 58 pop %eax 10d31e: 5a pop %edx 10d31f: 8d 45 e4 lea -0x1c(%ebp),%eax 10d322: 50 push %eax 10d323: 57 push %edi 10d324: e8 4f fd ff ff call 10d078 <_POSIX_Mutex_Get> <== ALWAYS TAKEN switch ( location ) { 10d329: 83 c4 10 add $0x10,%esp 10d32c: 8b 4d e4 mov -0x1c(%ebp),%ecx 10d32f: 85 c9 test %ecx,%ecx 10d331: 75 cb jne 10d2fe case OBJECTS_LOCAL: *old_ceiling = _POSIX_Priority_From_core( 10d333: 0f b6 15 5c 72 12 00 movzbl 0x12725c,%edx 10d33a: 2b 50 60 sub 0x60(%eax),%edx 10d33d: 89 13 mov %edx,(%ebx) the_mutex->Mutex.Attributes.priority_ceiling ); the_mutex->Mutex.Attributes.priority_ceiling = the_priority; 10d33f: 0f b6 55 d7 movzbl -0x29(%ebp),%edx 10d343: 29 f2 sub %esi,%edx 10d345: 89 50 60 mov %edx,0x60(%eax) /* * We are required to unlock the mutex before we return. */ _CORE_mutex_Surrender( 10d348: 52 push %edx 10d349: 6a 00 push $0x0 10d34b: ff 70 08 pushl 0x8(%eax) 10d34e: 83 c0 14 add $0x14,%eax 10d351: 50 push %eax 10d352: e8 81 1c 00 00 call 10efd8 <_CORE_mutex_Surrender> &the_mutex->Mutex, the_mutex->Object.id, NULL ); _Thread_Enable_dispatch(); 10d357: e8 5c 30 00 00 call 1103b8 <_Thread_Enable_dispatch> 10d35c: 31 c0 xor %eax,%eax return 0; 10d35e: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return EINVAL; } 10d361: 8d 65 f4 lea -0xc(%ebp),%esp 10d364: 5b pop %ebx 10d365: 5e pop %esi 10d366: 5f pop %edi 10d367: c9 leave 10d368: c3 ret 0010d36c : int pthread_mutex_timedlock( pthread_mutex_t *mutex, const struct timespec *abstime ) { 10d36c: 55 push %ebp 10d36d: 89 e5 mov %esp,%ebp 10d36f: 53 push %ebx 10d370: 83 ec 1c sub $0x1c,%esp 10d373: 8b 5d 08 mov 0x8(%ebp),%ebx * * 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 ); 10d376: 8d 45 f4 lea -0xc(%ebp),%eax 10d379: 50 push %eax 10d37a: ff 75 0c pushl 0xc(%ebp) 10d37d: e8 a6 00 00 00 call 10d428 <_POSIX_Absolute_timeout_to_ticks> <== ALWAYS TAKEN if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE ) 10d382: 83 c4 10 add $0x10,%esp 10d385: 83 f8 03 cmp $0x3,%eax 10d388: 74 16 je 10d3a0 do_wait = false; lock_status = _POSIX_Mutex_Lock_support( mutex, do_wait, ticks ); 10d38a: 50 push %eax 10d38b: ff 75 f4 pushl -0xc(%ebp) 10d38e: 6a 00 push $0x0 10d390: 53 push %ebx 10d391: e8 de fe ff ff call 10d274 <_POSIX_Mutex_Lock_support> <== ALWAYS TAKEN 10d396: 83 c4 10 add $0x10,%esp break; } } return lock_status; } 10d399: 8b 5d fc mov -0x4(%ebp),%ebx 10d39c: c9 leave 10d39d: c3 ret 10d39e: 66 90 xchg %ax,%ax <== NOT EXECUTED */ status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks ); if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE ) do_wait = false; lock_status = _POSIX_Mutex_Lock_support( mutex, do_wait, ticks ); 10d3a0: 52 push %edx 10d3a1: ff 75 f4 pushl -0xc(%ebp) 10d3a4: 6a 01 push $0x1 10d3a6: 53 push %ebx 10d3a7: e8 c8 fe ff ff call 10d274 <_POSIX_Mutex_Lock_support> <== ALWAYS TAKEN 10d3ac: 83 c4 10 add $0x10,%esp break; } } return lock_status; } 10d3af: 8b 5d fc mov -0x4(%ebp),%ebx 10d3b2: c9 leave 10d3b3: c3 ret 0010d3c4 : */ int pthread_mutex_trylock( pthread_mutex_t *mutex ) { 10d3c4: 55 push %ebp 10d3c5: 89 e5 mov %esp,%ebp 10d3c7: 83 ec 0c sub $0xc,%esp return _POSIX_Mutex_Lock_support( mutex, false, THREAD_QUEUE_WAIT_FOREVER ); 10d3ca: 6a 00 push $0x0 10d3cc: 6a 00 push $0x0 10d3ce: ff 75 08 pushl 0x8(%ebp) 10d3d1: e8 9e fe ff ff call 10d274 <_POSIX_Mutex_Lock_support> <== ALWAYS TAKEN } 10d3d6: c9 leave 10d3d7: c3 ret 0010d3d8 : */ int pthread_mutex_unlock( pthread_mutex_t *mutex ) { 10d3d8: 55 push %ebp 10d3d9: 89 e5 mov %esp,%ebp 10d3db: 53 push %ebx 10d3dc: 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 ); 10d3df: 8d 45 f4 lea -0xc(%ebp),%eax 10d3e2: 50 push %eax 10d3e3: ff 75 08 pushl 0x8(%ebp) 10d3e6: e8 8d fc ff ff call 10d078 <_POSIX_Mutex_Get> <== ALWAYS TAKEN switch ( location ) { 10d3eb: 83 c4 10 add $0x10,%esp 10d3ee: 8b 4d f4 mov -0xc(%ebp),%ecx 10d3f1: 85 c9 test %ecx,%ecx 10d3f3: 75 27 jne 10d41c case OBJECTS_LOCAL: status = _CORE_mutex_Surrender( 10d3f5: 52 push %edx 10d3f6: 6a 00 push $0x0 10d3f8: ff 70 08 pushl 0x8(%eax) 10d3fb: 83 c0 14 add $0x14,%eax 10d3fe: 50 push %eax 10d3ff: e8 d4 1b 00 00 call 10efd8 <_CORE_mutex_Surrender> 10d404: 89 c3 mov %eax,%ebx &the_mutex->Mutex, the_mutex->Object.id, NULL ); _Thread_Enable_dispatch(); 10d406: e8 ad 2f 00 00 call 1103b8 <_Thread_Enable_dispatch> return _POSIX_Mutex_Translate_core_mutex_return_code( status ); 10d40b: 89 1c 24 mov %ebx,(%esp) 10d40e: e8 a1 ff ff ff call 10d3b4 <_POSIX_Mutex_Translate_core_mutex_return_code> <== ALWAYS TAKEN 10d413: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return EINVAL; } 10d416: 8b 5d fc mov -0x4(%ebp),%ebx 10d419: c9 leave 10d41a: c3 ret 10d41b: 90 nop <== NOT EXECUTED register POSIX_Mutex_Control *the_mutex; Objects_Locations location; CORE_mutex_Status status; the_mutex = _POSIX_Mutex_Get( mutex, &location ); switch ( location ) { 10d41c: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10d421: 8b 5d fc mov -0x4(%ebp),%ebx 10d424: c9 leave 10d425: c3 ret 0010ce58 : */ int pthread_mutexattr_destroy( pthread_mutexattr_t *attr ) { 10ce58: 55 push %ebp 10ce59: 89 e5 mov %esp,%ebp 10ce5b: 8b 45 08 mov 0x8(%ebp),%eax if ( !attr || !attr->is_initialized ) 10ce5e: 85 c0 test %eax,%eax 10ce60: 74 12 je 10ce74 10ce62: 8b 10 mov (%eax),%edx 10ce64: 85 d2 test %edx,%edx 10ce66: 74 0c je 10ce74 return EINVAL; attr->is_initialized = false; 10ce68: c7 00 00 00 00 00 movl $0x0,(%eax) 10ce6e: 31 c0 xor %eax,%eax return 0; } 10ce70: c9 leave 10ce71: c3 ret 10ce72: 66 90 xchg %ax,%ax <== NOT EXECUTED { if ( !attr || !attr->is_initialized ) return EINVAL; attr->is_initialized = false; return 0; 10ce74: b8 16 00 00 00 mov $0x16,%eax } 10ce79: c9 leave 10ce7a: c3 ret 0010b0a0 : #if defined(_UNIX98_THREAD_MUTEX_ATTRIBUTES) int pthread_mutexattr_gettype( const pthread_mutexattr_t *attr, int *type ) { 10b0a0: 55 push %ebp 10b0a1: 89 e5 mov %esp,%ebp 10b0a3: 8b 45 08 mov 0x8(%ebp),%eax 10b0a6: 8b 55 0c mov 0xc(%ebp),%edx if ( !attr ) 10b0a9: 85 c0 test %eax,%eax 10b0ab: 74 13 je 10b0c0 return EINVAL; if ( !attr->is_initialized ) 10b0ad: 8b 08 mov (%eax),%ecx 10b0af: 85 c9 test %ecx,%ecx 10b0b1: 74 0d je 10b0c0 return EINVAL; if ( !type ) 10b0b3: 85 d2 test %edx,%edx 10b0b5: 74 09 je 10b0c0 <== ALWAYS TAKEN return EINVAL; *type = attr->type; 10b0b7: 8b 40 10 mov 0x10(%eax),%eax 10b0ba: 89 02 mov %eax,(%edx) 10b0bc: 31 c0 xor %eax,%eax return 0; } 10b0be: c9 leave 10b0bf: c3 ret if ( !type ) return EINVAL; *type = attr->type; return 0; 10b0c0: b8 16 00 00 00 mov $0x16,%eax } 10b0c5: c9 leave 10b0c6: c3 ret 0010cf1c : int pthread_mutexattr_setprioceiling( pthread_mutexattr_t *attr, int prioceiling ) { 10cf1c: 55 push %ebp 10cf1d: 89 e5 mov %esp,%ebp 10cf1f: 56 push %esi 10cf20: 53 push %ebx 10cf21: 8b 5d 08 mov 0x8(%ebp),%ebx 10cf24: 8b 75 0c mov 0xc(%ebp),%esi if ( !attr || !attr->is_initialized ) 10cf27: 85 db test %ebx,%ebx 10cf29: 74 06 je 10cf31 10cf2b: 8b 03 mov (%ebx),%eax 10cf2d: 85 c0 test %eax,%eax 10cf2f: 75 0f jne 10cf40 if ( !_POSIX_Priority_Is_valid( prioceiling ) ) return EINVAL; attr->prio_ceiling = prioceiling; return 0; 10cf31: b8 16 00 00 00 mov $0x16,%eax } 10cf36: 8d 65 f8 lea -0x8(%ebp),%esp 10cf39: 5b pop %ebx 10cf3a: 5e pop %esi 10cf3b: c9 leave 10cf3c: c3 ret 10cf3d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED ) { if ( !attr || !attr->is_initialized ) return EINVAL; if ( !_POSIX_Priority_Is_valid( prioceiling ) ) 10cf40: 83 ec 0c sub $0xc,%esp 10cf43: 56 push %esi 10cf44: e8 67 05 00 00 call 10d4b0 <_POSIX_Priority_Is_valid> 10cf49: 83 c4 10 add $0x10,%esp 10cf4c: 84 c0 test %al,%al 10cf4e: 74 e1 je 10cf31 return EINVAL; attr->prio_ceiling = prioceiling; 10cf50: 89 73 08 mov %esi,0x8(%ebx) 10cf53: 31 c0 xor %eax,%eax return 0; } 10cf55: 8d 65 f8 lea -0x8(%ebp),%esp 10cf58: 5b pop %ebx 10cf59: 5e pop %esi 10cf5a: c9 leave 10cf5b: c3 ret 0010cf5c : int pthread_mutexattr_setprotocol( pthread_mutexattr_t *attr, int protocol ) { 10cf5c: 55 push %ebp 10cf5d: 89 e5 mov %esp,%ebp 10cf5f: 8b 45 08 mov 0x8(%ebp),%eax 10cf62: 8b 55 0c mov 0xc(%ebp),%edx if ( !attr || !attr->is_initialized ) 10cf65: 85 c0 test %eax,%eax 10cf67: 74 0b je 10cf74 10cf69: 8b 08 mov (%eax),%ecx 10cf6b: 85 c9 test %ecx,%ecx 10cf6d: 74 05 je 10cf74 return EINVAL; switch ( protocol ) { 10cf6f: 83 fa 02 cmp $0x2,%edx 10cf72: 76 08 jbe 10cf7c case PTHREAD_PRIO_NONE: case PTHREAD_PRIO_INHERIT: case PTHREAD_PRIO_PROTECT: attr->protocol = protocol; return 0; 10cf74: b8 16 00 00 00 mov $0x16,%eax default: return EINVAL; } } 10cf79: c9 leave 10cf7a: c3 ret 10cf7b: 90 nop <== NOT EXECUTED switch ( protocol ) { case PTHREAD_PRIO_NONE: case PTHREAD_PRIO_INHERIT: case PTHREAD_PRIO_PROTECT: attr->protocol = protocol; 10cf7c: 89 50 0c mov %edx,0xc(%eax) 10cf7f: 31 c0 xor %eax,%eax return 0; default: return EINVAL; } } 10cf81: c9 leave 10cf82: c3 ret 0010cf84 : int pthread_mutexattr_setpshared( pthread_mutexattr_t *attr, int pshared ) { 10cf84: 55 push %ebp 10cf85: 89 e5 mov %esp,%ebp 10cf87: 8b 45 08 mov 0x8(%ebp),%eax 10cf8a: 8b 55 0c mov 0xc(%ebp),%edx if ( !attr || !attr->is_initialized ) 10cf8d: 85 c0 test %eax,%eax 10cf8f: 74 0b je 10cf9c 10cf91: 8b 08 mov (%eax),%ecx 10cf93: 85 c9 test %ecx,%ecx 10cf95: 74 05 je 10cf9c return EINVAL; switch ( pshared ) { 10cf97: 83 fa 01 cmp $0x1,%edx 10cf9a: 76 08 jbe 10cfa4 <== NEVER TAKEN case PTHREAD_PROCESS_SHARED: case PTHREAD_PROCESS_PRIVATE: attr->process_shared = pshared; return 0; 10cf9c: b8 16 00 00 00 mov $0x16,%eax default: return EINVAL; } } 10cfa1: c9 leave 10cfa2: c3 ret 10cfa3: 90 nop <== NOT EXECUTED return EINVAL; switch ( pshared ) { case PTHREAD_PROCESS_SHARED: case PTHREAD_PROCESS_PRIVATE: attr->process_shared = pshared; 10cfa4: 89 50 04 mov %edx,0x4(%eax) 10cfa7: 31 c0 xor %eax,%eax return 0; default: return EINVAL; } } 10cfa9: c9 leave 10cfaa: c3 ret 0010b0f0 : #if defined(_UNIX98_THREAD_MUTEX_ATTRIBUTES) int pthread_mutexattr_settype( pthread_mutexattr_t *attr, int type ) { 10b0f0: 55 push %ebp 10b0f1: 89 e5 mov %esp,%ebp 10b0f3: 8b 45 08 mov 0x8(%ebp),%eax 10b0f6: 8b 55 0c mov 0xc(%ebp),%edx if ( !attr || !attr->is_initialized ) 10b0f9: 85 c0 test %eax,%eax 10b0fb: 74 0b je 10b108 10b0fd: 8b 08 mov (%eax),%ecx 10b0ff: 85 c9 test %ecx,%ecx 10b101: 74 05 je 10b108 <== ALWAYS TAKEN return EINVAL; switch ( type ) { 10b103: 83 fa 03 cmp $0x3,%edx 10b106: 76 08 jbe 10b110 case PTHREAD_MUTEX_NORMAL: case PTHREAD_MUTEX_RECURSIVE: case PTHREAD_MUTEX_ERRORCHECK: case PTHREAD_MUTEX_DEFAULT: attr->type = type; return 0; 10b108: b8 16 00 00 00 mov $0x16,%eax default: return EINVAL; } } 10b10d: c9 leave 10b10e: c3 ret 10b10f: 90 nop <== NOT EXECUTED switch ( type ) { case PTHREAD_MUTEX_NORMAL: case PTHREAD_MUTEX_RECURSIVE: case PTHREAD_MUTEX_ERRORCHECK: case PTHREAD_MUTEX_DEFAULT: attr->type = type; 10b110: 89 50 10 mov %edx,0x10(%eax) 10b113: 31 c0 xor %eax,%eax return 0; default: return EINVAL; } } 10b115: c9 leave 10b116: c3 ret 0010bc04 : int pthread_once( pthread_once_t *once_control, void (*init_routine)(void) ) { 10bc04: 55 push %ebp 10bc05: 89 e5 mov %esp,%ebp 10bc07: 57 push %edi 10bc08: 56 push %esi 10bc09: 53 push %ebx 10bc0a: 83 ec 1c sub $0x1c,%esp 10bc0d: 8b 5d 08 mov 0x8(%ebp),%ebx 10bc10: 8b 75 0c mov 0xc(%ebp),%esi if ( !once_control || !init_routine ) 10bc13: 85 db test %ebx,%ebx 10bc15: 74 51 je 10bc68 10bc17: 85 f6 test %esi,%esi 10bc19: 74 4d je 10bc68 return EINVAL; if ( !once_control->init_executed ) { 10bc1b: 8b 7b 04 mov 0x4(%ebx),%edi 10bc1e: 85 ff test %edi,%edi 10bc20: 74 0a je 10bc2c 10bc22: 31 c0 xor %eax,%eax (*init_routine)(); } rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode); } return 0; } 10bc24: 8d 65 f4 lea -0xc(%ebp),%esp 10bc27: 5b pop %ebx 10bc28: 5e pop %esi 10bc29: 5f pop %edi 10bc2a: c9 leave 10bc2b: c3 ret if ( !once_control || !init_routine ) return EINVAL; if ( !once_control->init_executed ) { rtems_mode saveMode; rtems_task_mode(RTEMS_NO_PREEMPT, RTEMS_PREEMPT_MASK, &saveMode); 10bc2c: 51 push %ecx 10bc2d: 8d 7d e4 lea -0x1c(%ebp),%edi 10bc30: 57 push %edi 10bc31: 68 00 01 00 00 push $0x100 10bc36: 68 00 01 00 00 push $0x100 10bc3b: e8 c8 0b 00 00 call 10c808 if ( !once_control->init_executed ) { 10bc40: 83 c4 10 add $0x10,%esp 10bc43: 8b 53 04 mov 0x4(%ebx),%edx 10bc46: 85 d2 test %edx,%edx 10bc48: 74 2e je 10bc78 <== NEVER TAKEN once_control->is_initialized = true; once_control->init_executed = true; (*init_routine)(); } rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode); 10bc4a: 50 push %eax 10bc4b: 57 push %edi 10bc4c: 68 00 01 00 00 push $0x100 10bc51: ff 75 e4 pushl -0x1c(%ebp) 10bc54: e8 af 0b 00 00 call 10c808 10bc59: 31 c0 xor %eax,%eax 10bc5b: 83 c4 10 add $0x10,%esp } return 0; } 10bc5e: 8d 65 f4 lea -0xc(%ebp),%esp 10bc61: 5b pop %ebx 10bc62: 5e pop %esi 10bc63: 5f pop %edi 10bc64: c9 leave 10bc65: c3 ret 10bc66: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( !once_control->init_executed ) { once_control->is_initialized = true; once_control->init_executed = true; (*init_routine)(); } rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode); 10bc68: b8 16 00 00 00 mov $0x16,%eax } return 0; } 10bc6d: 8d 65 f4 lea -0xc(%ebp),%esp 10bc70: 5b pop %ebx 10bc71: 5e pop %esi 10bc72: 5f pop %edi 10bc73: c9 leave 10bc74: c3 ret 10bc75: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if ( !once_control->init_executed ) { rtems_mode saveMode; rtems_task_mode(RTEMS_NO_PREEMPT, RTEMS_PREEMPT_MASK, &saveMode); if ( !once_control->init_executed ) { once_control->is_initialized = true; 10bc78: c7 03 01 00 00 00 movl $0x1,(%ebx) once_control->init_executed = true; 10bc7e: c7 43 04 01 00 00 00 movl $0x1,0x4(%ebx) (*init_routine)(); 10bc85: ff d6 call *%esi 10bc87: eb c1 jmp 10bc4a <== ALWAYS TAKEN 0010c0dc : */ int pthread_rwlock_destroy( pthread_rwlock_t *rwlock ) { 10c0dc: 55 push %ebp 10c0dd: 89 e5 mov %esp,%ebp 10c0df: 53 push %ebx 10c0e0: 83 ec 14 sub $0x14,%esp 10c0e3: 8b 45 08 mov 0x8(%ebp),%eax POSIX_RWLock_Control *the_rwlock = NULL; Objects_Locations location; if ( !rwlock ) 10c0e6: 85 c0 test %eax,%eax 10c0e8: 74 42 je 10c12c RTEMS_INLINE_ROUTINE POSIX_RWLock_Control *_POSIX_RWLock_Get ( pthread_rwlock_t *RWLock, Objects_Locations *location ) { return (POSIX_RWLock_Control *) _Objects_Get( 10c0ea: 53 push %ebx 10c0eb: 8d 55 f4 lea -0xc(%ebp),%edx 10c0ee: 52 push %edx 10c0ef: ff 30 pushl (%eax) 10c0f1: 68 00 a4 12 00 push $0x12a400 10c0f6: e8 29 2b 00 00 call 10ec24 <_Objects_Get> 10c0fb: 89 c3 mov %eax,%ebx return EINVAL; the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { 10c0fd: 83 c4 10 add $0x10,%esp 10c100: 8b 4d f4 mov -0xc(%ebp),%ecx 10c103: 85 c9 test %ecx,%ecx 10c105: 75 25 jne 10c12c 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 ) { 10c107: 83 ec 0c sub $0xc,%esp 10c10a: 8d 40 10 lea 0x10(%eax),%eax 10c10d: 50 push %eax 10c10e: e8 b5 3b 00 00 call 10fcc8 <_Thread_queue_First> 10c113: 83 c4 10 add $0x10,%esp 10c116: 85 c0 test %eax,%eax 10c118: 74 1e je 10c138 _Thread_Enable_dispatch(); 10c11a: e8 79 33 00 00 call 10f498 <_Thread_Enable_dispatch> 10c11f: b8 10 00 00 00 mov $0x10,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10c124: 8b 5d fc mov -0x4(%ebp),%ebx 10c127: c9 leave 10c128: c3 ret 10c129: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED _Objects_Close( &_POSIX_RWLock_Information, &the_rwlock->Object ); _POSIX_RWLock_Free( the_rwlock ); _Thread_Enable_dispatch(); return 0; 10c12c: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10c131: 8b 5d fc mov -0x4(%ebp),%ebx 10c134: c9 leave 10c135: c3 ret 10c136: 66 90 xchg %ax,%ax <== NOT EXECUTED /* * POSIX doesn't require behavior when it is locked. */ _Objects_Close( &_POSIX_RWLock_Information, &the_rwlock->Object ); 10c138: 83 ec 08 sub $0x8,%esp 10c13b: 53 push %ebx 10c13c: 68 00 a4 12 00 push $0x12a400 10c141: e8 aa 26 00 00 call 10e7f0 <_Objects_Close> */ RTEMS_INLINE_ROUTINE void _POSIX_RWLock_Free ( POSIX_RWLock_Control *the_RWLock ) { _Objects_Free( &_POSIX_RWLock_Information, &the_RWLock->Object ); 10c146: 58 pop %eax 10c147: 5a pop %edx 10c148: 53 push %ebx 10c149: 68 00 a4 12 00 push $0x12a400 10c14e: e8 a1 29 00 00 call 10eaf4 <_Objects_Free> _POSIX_RWLock_Free( the_rwlock ); _Thread_Enable_dispatch(); 10c153: e8 40 33 00 00 call 10f498 <_Thread_Enable_dispatch> 10c158: 31 c0 xor %eax,%eax return 0; 10c15a: 83 c4 10 add $0x10,%esp 10c15d: eb d2 jmp 10c131 <== ALWAYS TAKEN 0010c160 : int pthread_rwlock_init( pthread_rwlock_t *rwlock, const pthread_rwlockattr_t *attr ) { 10c160: 55 push %ebp 10c161: 89 e5 mov %esp,%ebp 10c163: 56 push %esi 10c164: 53 push %ebx 10c165: 83 ec 20 sub $0x20,%esp 10c168: 8b 5d 08 mov 0x8(%ebp),%ebx 10c16b: 8b 75 0c mov 0xc(%ebp),%esi const pthread_rwlockattr_t *the_attr; /* * Error check parameters */ if ( !rwlock ) 10c16e: 85 db test %ebx,%ebx 10c170: 74 15 je 10c187 return EINVAL; /* * If the user passed in NULL, use the default attributes */ if ( attr ) { 10c172: 85 f6 test %esi,%esi 10c174: 0f 84 86 00 00 00 je 10c200 } /* * Now start error checking the attributes that we are going to use */ if ( !the_attr->is_initialized ) 10c17a: 8b 16 mov (%esi),%edx 10c17c: 85 d2 test %edx,%edx 10c17e: 74 07 je 10c187 <== ALWAYS TAKEN return EINVAL; switch ( the_attr->process_shared ) { 10c180: 8b 46 04 mov 0x4(%esi),%eax 10c183: 85 c0 test %eax,%eax 10c185: 74 0d je 10c194 <== NEVER TAKEN ); *rwlock = the_rwlock->Object.id; _Thread_Enable_dispatch(); return 0; 10c187: b8 16 00 00 00 mov $0x16,%eax } 10c18c: 8d 65 f8 lea -0x8(%ebp),%esp 10c18f: 5b pop %ebx 10c190: 5e pop %esi 10c191: c9 leave 10c192: c3 ret 10c193: 90 nop <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10c194: a1 78 a1 12 00 mov 0x12a178,%eax 10c199: 40 inc %eax 10c19a: a3 78 a1 12 00 mov %eax,0x12a178 * 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 *) 10c19f: 83 ec 0c sub $0xc,%esp 10c1a2: 68 00 a4 12 00 push $0x12a400 10c1a7: e8 c8 25 00 00 call 10e774 <_Objects_Allocate> */ _Thread_Disable_dispatch(); /* prevents deletion */ the_rwlock = _POSIX_RWLock_Allocate(); if ( !the_rwlock ) { 10c1ac: 83 c4 10 add $0x10,%esp 10c1af: 85 c0 test %eax,%eax 10c1b1: 74 41 je 10c1f4 _Thread_Enable_dispatch(); return EAGAIN; } _CORE_RWLock_Initialize( &the_rwlock->RWLock, &the_attributes ); 10c1b3: 83 ec 08 sub $0x8,%esp 10c1b6: 8d 55 f4 lea -0xc(%ebp),%edx 10c1b9: 52 push %edx 10c1ba: 8d 50 10 lea 0x10(%eax),%edx 10c1bd: 52 push %edx 10c1be: 89 45 e4 mov %eax,-0x1c(%ebp) 10c1c1: e8 ca 1d 00 00 call 10df90 <_CORE_RWLock_Initialize> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10c1c6: 8b 45 e4 mov -0x1c(%ebp),%eax 10c1c9: 8b 50 08 mov 0x8(%eax),%edx 10c1cc: 0f b7 f2 movzwl %dx,%esi 10c1cf: 8b 0d 1c a4 12 00 mov 0x12a41c,%ecx 10c1d5: 89 04 b1 mov %eax,(%ecx,%esi,4) _Objects_Get_index( the_object->id ), the_object ); /* ASSERT: information->is_string == false */ the_object->name.name_u32 = name; 10c1d8: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax) &_POSIX_RWLock_Information, &the_rwlock->Object, 0 ); *rwlock = the_rwlock->Object.id; 10c1df: 89 13 mov %edx,(%ebx) _Thread_Enable_dispatch(); 10c1e1: e8 b2 32 00 00 call 10f498 <_Thread_Enable_dispatch> 10c1e6: 31 c0 xor %eax,%eax return 0; 10c1e8: 83 c4 10 add $0x10,%esp } 10c1eb: 8d 65 f8 lea -0x8(%ebp),%esp 10c1ee: 5b pop %ebx 10c1ef: 5e pop %esi 10c1f0: c9 leave 10c1f1: c3 ret 10c1f2: 66 90 xchg %ax,%ax <== NOT EXECUTED _Thread_Disable_dispatch(); /* prevents deletion */ the_rwlock = _POSIX_RWLock_Allocate(); if ( !the_rwlock ) { _Thread_Enable_dispatch(); 10c1f4: e8 9f 32 00 00 call 10f498 <_Thread_Enable_dispatch> 10c1f9: b8 0b 00 00 00 mov $0xb,%eax return EAGAIN; 10c1fe: eb 8c jmp 10c18c <== ALWAYS TAKEN * If the user passed in NULL, use the default attributes */ if ( attr ) { the_attr = attr; } else { (void) pthread_rwlockattr_init( &default_attr ); 10c200: 83 ec 0c sub $0xc,%esp 10c203: 8d 75 ec lea -0x14(%ebp),%esi 10c206: 56 push %esi 10c207: e8 38 09 00 00 call 10cb44 <== ALWAYS TAKEN 10c20c: 83 c4 10 add $0x10,%esp 10c20f: e9 66 ff ff ff jmp 10c17a <== ALWAYS TAKEN 0010c214 : */ int pthread_rwlock_rdlock( pthread_rwlock_t *rwlock ) { 10c214: 55 push %ebp 10c215: 89 e5 mov %esp,%ebp 10c217: 53 push %ebx 10c218: 83 ec 14 sub $0x14,%esp 10c21b: 8b 5d 08 mov 0x8(%ebp),%ebx POSIX_RWLock_Control *the_rwlock; Objects_Locations location; if ( !rwlock ) 10c21e: 85 db test %ebx,%ebx 10c220: 74 1b je 10c23d RTEMS_INLINE_ROUTINE POSIX_RWLock_Control *_POSIX_RWLock_Get ( pthread_rwlock_t *RWLock, Objects_Locations *location ) { return (POSIX_RWLock_Control *) _Objects_Get( 10c222: 51 push %ecx 10c223: 8d 45 f4 lea -0xc(%ebp),%eax 10c226: 50 push %eax 10c227: ff 33 pushl (%ebx) 10c229: 68 00 a4 12 00 push $0x12a400 10c22e: e8 f1 29 00 00 call 10ec24 <_Objects_Get> return EINVAL; the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { 10c233: 83 c4 10 add $0x10,%esp 10c236: 8b 55 f4 mov -0xc(%ebp),%edx 10c239: 85 d2 test %edx,%edx 10c23b: 74 0b je 10c248 0, NULL ); _Thread_Enable_dispatch(); return _POSIX_RWLock_Translate_core_RWLock_return_code( 10c23d: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10c242: 8b 5d fc mov -0x4(%ebp),%ebx 10c245: c9 leave 10c246: c3 ret 10c247: 90 nop <== NOT EXECUTED the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { case OBJECTS_LOCAL: _CORE_RWLock_Obtain_for_reading( 10c248: 83 ec 0c sub $0xc,%esp 10c24b: 6a 00 push $0x0 10c24d: 6a 00 push $0x0 10c24f: 6a 01 push $0x1 10c251: ff 33 pushl (%ebx) 10c253: 83 c0 10 add $0x10,%eax 10c256: 50 push %eax 10c257: e8 68 1d 00 00 call 10dfc4 <_CORE_RWLock_Obtain_for_reading> true, /* we are willing to wait forever */ 0, NULL ); _Thread_Enable_dispatch(); 10c25c: 83 c4 20 add $0x20,%esp 10c25f: e8 34 32 00 00 call 10f498 <_Thread_Enable_dispatch> return _POSIX_RWLock_Translate_core_RWLock_return_code( 10c264: 83 ec 0c sub $0xc,%esp 10c267: a1 38 a2 12 00 mov 0x12a238,%eax 10c26c: ff 70 34 pushl 0x34(%eax) 10c26f: e8 70 01 00 00 call 10c3e4 <_POSIX_RWLock_Translate_core_RWLock_return_code> <== ALWAYS TAKEN 10c274: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return EINVAL; } 10c277: 8b 5d fc mov -0x4(%ebp),%ebx 10c27a: c9 leave 10c27b: c3 ret 0010c27c : int pthread_rwlock_timedrdlock( pthread_rwlock_t *rwlock, const struct timespec *abstime ) { 10c27c: 55 push %ebp 10c27d: 89 e5 mov %esp,%ebp 10c27f: 56 push %esi 10c280: 53 push %ebx 10c281: 83 ec 20 sub $0x20,%esp 10c284: 8b 5d 08 mov 0x8(%ebp),%ebx Objects_Locations location; Watchdog_Interval ticks; bool do_wait = true; POSIX_Absolute_timeout_conversion_results_t status; if ( !rwlock ) 10c287: 85 db test %ebx,%ebx 10c289: 74 7d je 10c308 * * 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 ); 10c28b: 83 ec 08 sub $0x8,%esp 10c28e: 8d 45 f0 lea -0x10(%ebp),%eax 10c291: 50 push %eax 10c292: ff 75 0c pushl 0xc(%ebp) 10c295: e8 aa 5e 00 00 call 112144 <_POSIX_Absolute_timeout_to_ticks> 10c29a: 89 c6 mov %eax,%esi 10c29c: 83 c4 0c add $0xc,%esp 10c29f: 8d 45 f4 lea -0xc(%ebp),%eax 10c2a2: 50 push %eax 10c2a3: ff 33 pushl (%ebx) 10c2a5: 68 00 a4 12 00 push $0x12a400 10c2aa: e8 75 29 00 00 call 10ec24 <_Objects_Get> if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE ) do_wait = false; the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { 10c2af: 83 c4 10 add $0x10,%esp 10c2b2: 8b 55 f4 mov -0xc(%ebp),%edx 10c2b5: 85 d2 test %edx,%edx 10c2b7: 75 4f jne 10c308 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, 10c2b9: 83 fe 03 cmp $0x3,%esi 10c2bc: 0f 94 c2 sete %dl case OBJECTS_LOCAL: _CORE_RWLock_Obtain_for_reading( 10c2bf: 83 ec 0c sub $0xc,%esp 10c2c2: 6a 00 push $0x0 10c2c4: ff 75 f0 pushl -0x10(%ebp) 10c2c7: 0f b6 ca movzbl %dl,%ecx 10c2ca: 51 push %ecx 10c2cb: ff 33 pushl (%ebx) 10c2cd: 83 c0 10 add $0x10,%eax 10c2d0: 50 push %eax 10c2d1: 88 55 e4 mov %dl,-0x1c(%ebp) 10c2d4: e8 eb 1c 00 00 call 10dfc4 <_CORE_RWLock_Obtain_for_reading> do_wait, ticks, NULL ); _Thread_Enable_dispatch(); 10c2d9: 83 c4 20 add $0x20,%esp 10c2dc: e8 b7 31 00 00 call 10f498 <_Thread_Enable_dispatch> if ( !do_wait ) { 10c2e1: 8a 55 e4 mov -0x1c(%ebp),%dl 10c2e4: 84 d2 test %dl,%dl 10c2e6: 75 3c jne 10c324 if ( _Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE ) { 10c2e8: a1 38 a2 12 00 mov 0x12a238,%eax 10c2ed: 8b 40 34 mov 0x34(%eax),%eax 10c2f0: 83 f8 02 cmp $0x2,%eax 10c2f3: 74 1f je 10c314 break; } } } return _POSIX_RWLock_Translate_core_RWLock_return_code( 10c2f5: 83 ec 0c sub $0xc,%esp 10c2f8: 50 push %eax 10c2f9: e8 e6 00 00 00 call 10c3e4 <_POSIX_RWLock_Translate_core_RWLock_return_code> <== ALWAYS TAKEN 10c2fe: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return EINVAL; } 10c301: 8d 65 f8 lea -0x8(%ebp),%esp 10c304: 5b pop %ebx 10c305: 5e pop %esi 10c306: c9 leave 10c307: c3 ret break; } } } return _POSIX_RWLock_Translate_core_RWLock_return_code( 10c308: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10c30d: 8d 65 f8 lea -0x8(%ebp),%esp 10c310: 5b pop %ebx 10c311: 5e pop %esi 10c312: c9 leave 10c313: c3 ret ); _Thread_Enable_dispatch(); if ( !do_wait ) { if ( _Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE ) { switch (status) { 10c314: 85 f6 test %esi,%esi 10c316: 74 f0 je 10c308 <== ALWAYS TAKEN 10c318: 83 fe 02 cmp $0x2,%esi 10c31b: 77 d8 ja 10c2f5 <== ALWAYS TAKEN 10c31d: b0 74 mov $0x74,%al 10c31f: eb ec jmp 10c30d <== ALWAYS TAKEN 10c321: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 10c324: a1 38 a2 12 00 mov 0x12a238,%eax 10c329: 8b 40 34 mov 0x34(%eax),%eax 10c32c: eb c7 jmp 10c2f5 <== ALWAYS TAKEN 0010c330 : int pthread_rwlock_timedwrlock( pthread_rwlock_t *rwlock, const struct timespec *abstime ) { 10c330: 55 push %ebp 10c331: 89 e5 mov %esp,%ebp 10c333: 56 push %esi 10c334: 53 push %ebx 10c335: 83 ec 20 sub $0x20,%esp 10c338: 8b 5d 08 mov 0x8(%ebp),%ebx Objects_Locations location; Watchdog_Interval ticks; bool do_wait = true; POSIX_Absolute_timeout_conversion_results_t status; if ( !rwlock ) 10c33b: 85 db test %ebx,%ebx 10c33d: 74 7d je 10c3bc * * 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 ); 10c33f: 83 ec 08 sub $0x8,%esp 10c342: 8d 45 f0 lea -0x10(%ebp),%eax 10c345: 50 push %eax 10c346: ff 75 0c pushl 0xc(%ebp) 10c349: e8 f6 5d 00 00 call 112144 <_POSIX_Absolute_timeout_to_ticks> 10c34e: 89 c6 mov %eax,%esi 10c350: 83 c4 0c add $0xc,%esp 10c353: 8d 45 f4 lea -0xc(%ebp),%eax 10c356: 50 push %eax 10c357: ff 33 pushl (%ebx) 10c359: 68 00 a4 12 00 push $0x12a400 10c35e: e8 c1 28 00 00 call 10ec24 <_Objects_Get> if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE ) do_wait = false; the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { 10c363: 83 c4 10 add $0x10,%esp 10c366: 8b 55 f4 mov -0xc(%ebp),%edx 10c369: 85 d2 test %edx,%edx 10c36b: 75 4f jne 10c3bc (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, 10c36d: 83 fe 03 cmp $0x3,%esi 10c370: 0f 94 c2 sete %dl case OBJECTS_LOCAL: _CORE_RWLock_Obtain_for_writing( 10c373: 83 ec 0c sub $0xc,%esp 10c376: 6a 00 push $0x0 10c378: ff 75 f0 pushl -0x10(%ebp) 10c37b: 0f b6 ca movzbl %dl,%ecx 10c37e: 51 push %ecx 10c37f: ff 33 pushl (%ebx) 10c381: 83 c0 10 add $0x10,%eax 10c384: 50 push %eax 10c385: 88 55 e4 mov %dl,-0x1c(%ebp) 10c388: e8 ff 1c 00 00 call 10e08c <_CORE_RWLock_Obtain_for_writing> do_wait, ticks, NULL ); _Thread_Enable_dispatch(); 10c38d: 83 c4 20 add $0x20,%esp 10c390: e8 03 31 00 00 call 10f498 <_Thread_Enable_dispatch> if ( !do_wait && 10c395: 8a 55 e4 mov -0x1c(%ebp),%dl 10c398: 84 d2 test %dl,%dl 10c39a: 75 3c jne 10c3d8 (_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) { 10c39c: a1 38 a2 12 00 mov 0x12a238,%eax 10c3a1: 8b 40 34 mov 0x34(%eax),%eax ticks, NULL ); _Thread_Enable_dispatch(); if ( !do_wait && 10c3a4: 83 f8 02 cmp $0x2,%eax 10c3a7: 74 1f je 10c3c8 case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE: break; } } return _POSIX_RWLock_Translate_core_RWLock_return_code( 10c3a9: 83 ec 0c sub $0xc,%esp 10c3ac: 50 push %eax 10c3ad: e8 32 00 00 00 call 10c3e4 <_POSIX_RWLock_Translate_core_RWLock_return_code> <== ALWAYS TAKEN 10c3b2: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return EINVAL; } 10c3b5: 8d 65 f8 lea -0x8(%ebp),%esp 10c3b8: 5b pop %ebx 10c3b9: 5e pop %esi 10c3ba: c9 leave 10c3bb: c3 ret case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE: break; } } return _POSIX_RWLock_Translate_core_RWLock_return_code( 10c3bc: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10c3c1: 8d 65 f8 lea -0x8(%ebp),%esp 10c3c4: 5b pop %ebx 10c3c5: 5e pop %esi 10c3c6: c9 leave 10c3c7: c3 ret ); _Thread_Enable_dispatch(); if ( !do_wait && (_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) { switch (status) { 10c3c8: 85 f6 test %esi,%esi 10c3ca: 74 f0 je 10c3bc <== ALWAYS TAKEN 10c3cc: 83 fe 02 cmp $0x2,%esi 10c3cf: 77 d8 ja 10c3a9 <== ALWAYS TAKEN 10c3d1: b0 74 mov $0x74,%al 10c3d3: eb ec jmp 10c3c1 <== ALWAYS TAKEN 10c3d5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 10c3d8: a1 38 a2 12 00 mov 0x12a238,%eax 10c3dd: 8b 40 34 mov 0x34(%eax),%eax 10c3e0: eb c7 jmp 10c3a9 <== ALWAYS TAKEN 0010c3f4 : */ int pthread_rwlock_tryrdlock( pthread_rwlock_t *rwlock ) { 10c3f4: 55 push %ebp 10c3f5: 89 e5 mov %esp,%ebp 10c3f7: 53 push %ebx 10c3f8: 83 ec 14 sub $0x14,%esp 10c3fb: 8b 5d 08 mov 0x8(%ebp),%ebx POSIX_RWLock_Control *the_rwlock; Objects_Locations location; if ( !rwlock ) 10c3fe: 85 db test %ebx,%ebx 10c400: 74 1b je 10c41d 10c402: 51 push %ecx 10c403: 8d 45 f4 lea -0xc(%ebp),%eax 10c406: 50 push %eax 10c407: ff 33 pushl (%ebx) 10c409: 68 00 a4 12 00 push $0x12a400 10c40e: e8 11 28 00 00 call 10ec24 <_Objects_Get> return EINVAL; the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { 10c413: 83 c4 10 add $0x10,%esp 10c416: 8b 55 f4 mov -0xc(%ebp),%edx 10c419: 85 d2 test %edx,%edx 10c41b: 74 0b je 10c428 NULL ); _Thread_Enable_dispatch(); return _POSIX_RWLock_Translate_core_RWLock_return_code( 10c41d: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10c422: 8b 5d fc mov -0x4(%ebp),%ebx 10c425: c9 leave 10c426: c3 ret 10c427: 90 nop <== NOT EXECUTED the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { case OBJECTS_LOCAL: _CORE_RWLock_Obtain_for_reading( 10c428: 83 ec 0c sub $0xc,%esp 10c42b: 6a 00 push $0x0 10c42d: 6a 00 push $0x0 10c42f: 6a 00 push $0x0 10c431: ff 33 pushl (%ebx) 10c433: 83 c0 10 add $0x10,%eax 10c436: 50 push %eax 10c437: e8 88 1b 00 00 call 10dfc4 <_CORE_RWLock_Obtain_for_reading> 0, NULL ); _Thread_Enable_dispatch(); 10c43c: 83 c4 20 add $0x20,%esp 10c43f: e8 54 30 00 00 call 10f498 <_Thread_Enable_dispatch> return _POSIX_RWLock_Translate_core_RWLock_return_code( 10c444: 83 ec 0c sub $0xc,%esp 10c447: a1 38 a2 12 00 mov 0x12a238,%eax 10c44c: ff 70 34 pushl 0x34(%eax) 10c44f: e8 90 ff ff ff call 10c3e4 <_POSIX_RWLock_Translate_core_RWLock_return_code> <== ALWAYS TAKEN 10c454: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return EINVAL; } 10c457: 8b 5d fc mov -0x4(%ebp),%ebx 10c45a: c9 leave 10c45b: c3 ret 0010c45c : */ int pthread_rwlock_trywrlock( pthread_rwlock_t *rwlock ) { 10c45c: 55 push %ebp 10c45d: 89 e5 mov %esp,%ebp 10c45f: 53 push %ebx 10c460: 83 ec 14 sub $0x14,%esp 10c463: 8b 5d 08 mov 0x8(%ebp),%ebx POSIX_RWLock_Control *the_rwlock; Objects_Locations location; if ( !rwlock ) 10c466: 85 db test %ebx,%ebx 10c468: 74 1b je 10c485 10c46a: 51 push %ecx 10c46b: 8d 45 f4 lea -0xc(%ebp),%eax 10c46e: 50 push %eax 10c46f: ff 33 pushl (%ebx) 10c471: 68 00 a4 12 00 push $0x12a400 10c476: e8 a9 27 00 00 call 10ec24 <_Objects_Get> return EINVAL; the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { 10c47b: 83 c4 10 add $0x10,%esp 10c47e: 8b 55 f4 mov -0xc(%ebp),%edx 10c481: 85 d2 test %edx,%edx 10c483: 74 0b je 10c490 0, NULL ); _Thread_Enable_dispatch(); return _POSIX_RWLock_Translate_core_RWLock_return_code( 10c485: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10c48a: 8b 5d fc mov -0x4(%ebp),%ebx 10c48d: c9 leave 10c48e: c3 ret 10c48f: 90 nop <== NOT EXECUTED the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { case OBJECTS_LOCAL: _CORE_RWLock_Obtain_for_writing( 10c490: 83 ec 0c sub $0xc,%esp 10c493: 6a 00 push $0x0 10c495: 6a 00 push $0x0 10c497: 6a 00 push $0x0 10c499: ff 33 pushl (%ebx) 10c49b: 83 c0 10 add $0x10,%eax 10c49e: 50 push %eax 10c49f: e8 e8 1b 00 00 call 10e08c <_CORE_RWLock_Obtain_for_writing> false, /* we are not willing to wait */ 0, NULL ); _Thread_Enable_dispatch(); 10c4a4: 83 c4 20 add $0x20,%esp 10c4a7: e8 ec 2f 00 00 call 10f498 <_Thread_Enable_dispatch> return _POSIX_RWLock_Translate_core_RWLock_return_code( 10c4ac: 83 ec 0c sub $0xc,%esp 10c4af: a1 38 a2 12 00 mov 0x12a238,%eax 10c4b4: ff 70 34 pushl 0x34(%eax) 10c4b7: e8 28 ff ff ff call 10c3e4 <_POSIX_RWLock_Translate_core_RWLock_return_code> <== ALWAYS TAKEN 10c4bc: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return EINVAL; } 10c4bf: 8b 5d fc mov -0x4(%ebp),%ebx 10c4c2: c9 leave 10c4c3: c3 ret 0010c4c4 : */ int pthread_rwlock_unlock( pthread_rwlock_t *rwlock ) { 10c4c4: 55 push %ebp 10c4c5: 89 e5 mov %esp,%ebp 10c4c7: 53 push %ebx 10c4c8: 83 ec 14 sub $0x14,%esp 10c4cb: 8b 45 08 mov 0x8(%ebp),%eax POSIX_RWLock_Control *the_rwlock; Objects_Locations location; CORE_RWLock_Status status; if ( !rwlock ) 10c4ce: 85 c0 test %eax,%eax 10c4d0: 74 1b je 10c4ed 10c4d2: 51 push %ecx 10c4d3: 8d 55 f4 lea -0xc(%ebp),%edx 10c4d6: 52 push %edx 10c4d7: ff 30 pushl (%eax) 10c4d9: 68 00 a4 12 00 push $0x12a400 10c4de: e8 41 27 00 00 call 10ec24 <_Objects_Get> return EINVAL; the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { 10c4e3: 83 c4 10 add $0x10,%esp 10c4e6: 8b 55 f4 mov -0xc(%ebp),%edx 10c4e9: 85 d2 test %edx,%edx 10c4eb: 74 0b je 10c4f8 case OBJECTS_LOCAL: status = _CORE_RWLock_Release( &the_rwlock->RWLock ); _Thread_Enable_dispatch(); return _POSIX_RWLock_Translate_core_RWLock_return_code( status ); 10c4ed: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10c4f2: 8b 5d fc mov -0x4(%ebp),%ebx 10c4f5: c9 leave 10c4f6: c3 ret 10c4f7: 90 nop <== NOT EXECUTED the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { case OBJECTS_LOCAL: status = _CORE_RWLock_Release( &the_rwlock->RWLock ); 10c4f8: 83 ec 0c sub $0xc,%esp 10c4fb: 83 c0 10 add $0x10,%eax 10c4fe: 50 push %eax 10c4ff: e8 14 1c 00 00 call 10e118 <_CORE_RWLock_Release> 10c504: 89 c3 mov %eax,%ebx _Thread_Enable_dispatch(); 10c506: e8 8d 2f 00 00 call 10f498 <_Thread_Enable_dispatch> return _POSIX_RWLock_Translate_core_RWLock_return_code( status ); 10c50b: 89 1c 24 mov %ebx,(%esp) 10c50e: e8 d1 fe ff ff call 10c3e4 <_POSIX_RWLock_Translate_core_RWLock_return_code> <== ALWAYS TAKEN 10c513: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return EINVAL; } 10c516: 8b 5d fc mov -0x4(%ebp),%ebx 10c519: c9 leave 10c51a: c3 ret 0010c51c : */ int pthread_rwlock_wrlock( pthread_rwlock_t *rwlock ) { 10c51c: 55 push %ebp 10c51d: 89 e5 mov %esp,%ebp 10c51f: 53 push %ebx 10c520: 83 ec 14 sub $0x14,%esp 10c523: 8b 5d 08 mov 0x8(%ebp),%ebx POSIX_RWLock_Control *the_rwlock; Objects_Locations location; if ( !rwlock ) 10c526: 85 db test %ebx,%ebx 10c528: 74 1b je 10c545 10c52a: 51 push %ecx 10c52b: 8d 45 f4 lea -0xc(%ebp),%eax 10c52e: 50 push %eax 10c52f: ff 33 pushl (%ebx) 10c531: 68 00 a4 12 00 push $0x12a400 10c536: e8 e9 26 00 00 call 10ec24 <_Objects_Get> return EINVAL; the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { 10c53b: 83 c4 10 add $0x10,%esp 10c53e: 8b 55 f4 mov -0xc(%ebp),%edx 10c541: 85 d2 test %edx,%edx 10c543: 74 0b je 10c550 0, NULL ); _Thread_Enable_dispatch(); return _POSIX_RWLock_Translate_core_RWLock_return_code( 10c545: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10c54a: 8b 5d fc mov -0x4(%ebp),%ebx 10c54d: c9 leave 10c54e: c3 ret 10c54f: 90 nop <== NOT EXECUTED the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { case OBJECTS_LOCAL: _CORE_RWLock_Obtain_for_writing( 10c550: 83 ec 0c sub $0xc,%esp 10c553: 6a 00 push $0x0 10c555: 6a 00 push $0x0 10c557: 6a 01 push $0x1 10c559: ff 33 pushl (%ebx) 10c55b: 83 c0 10 add $0x10,%eax 10c55e: 50 push %eax 10c55f: e8 28 1b 00 00 call 10e08c <_CORE_RWLock_Obtain_for_writing> true, /* do not timeout -- wait forever */ 0, NULL ); _Thread_Enable_dispatch(); 10c564: 83 c4 20 add $0x20,%esp 10c567: e8 2c 2f 00 00 call 10f498 <_Thread_Enable_dispatch> return _POSIX_RWLock_Translate_core_RWLock_return_code( 10c56c: 83 ec 0c sub $0xc,%esp 10c56f: a1 38 a2 12 00 mov 0x12a238,%eax 10c574: ff 70 34 pushl 0x34(%eax) 10c577: e8 68 fe ff ff call 10c3e4 <_POSIX_RWLock_Translate_core_RWLock_return_code> <== ALWAYS TAKEN 10c57c: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return EINVAL; } 10c57f: 8b 5d fc mov -0x4(%ebp),%ebx 10c582: c9 leave 10c583: c3 ret 0010cafc : */ int pthread_rwlockattr_destroy( pthread_rwlockattr_t *attr ) { 10cafc: 55 push %ebp 10cafd: 89 e5 mov %esp,%ebp 10caff: 8b 45 08 mov 0x8(%ebp),%eax if ( !attr || attr->is_initialized == false ) 10cb02: 85 c0 test %eax,%eax 10cb04: 74 12 je 10cb18 10cb06: 8b 10 mov (%eax),%edx 10cb08: 85 d2 test %edx,%edx 10cb0a: 74 0c je 10cb18 return EINVAL; attr->is_initialized = false; 10cb0c: c7 00 00 00 00 00 movl $0x0,(%eax) 10cb12: 31 c0 xor %eax,%eax return 0; } 10cb14: c9 leave 10cb15: c3 ret 10cb16: 66 90 xchg %ax,%ax <== NOT EXECUTED { if ( !attr || attr->is_initialized == false ) return EINVAL; attr->is_initialized = false; return 0; 10cb18: b8 16 00 00 00 mov $0x16,%eax } 10cb1d: c9 leave 10cb1e: c3 ret 0010cb44 : */ int pthread_rwlockattr_init( pthread_rwlockattr_t *attr ) { 10cb44: 55 push %ebp 10cb45: 89 e5 mov %esp,%ebp 10cb47: 8b 45 08 mov 0x8(%ebp),%eax if ( !attr ) 10cb4a: 85 c0 test %eax,%eax 10cb4c: 74 12 je 10cb60 return EINVAL; attr->is_initialized = true; 10cb4e: c7 00 01 00 00 00 movl $0x1,(%eax) attr->process_shared = PTHREAD_PROCESS_PRIVATE; 10cb54: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax) 10cb5b: 31 c0 xor %eax,%eax return 0; } 10cb5d: c9 leave 10cb5e: c3 ret 10cb5f: 90 nop <== NOT EXECUTED int pthread_rwlockattr_init( pthread_rwlockattr_t *attr ) { if ( !attr ) 10cb60: b0 16 mov $0x16,%al return EINVAL; attr->is_initialized = true; attr->process_shared = PTHREAD_PROCESS_PRIVATE; return 0; } 10cb62: c9 leave 10cb63: c3 ret 0010cb64 : int pthread_rwlockattr_setpshared( pthread_rwlockattr_t *attr, int pshared ) { 10cb64: 55 push %ebp 10cb65: 89 e5 mov %esp,%ebp 10cb67: 8b 45 08 mov 0x8(%ebp),%eax 10cb6a: 8b 55 0c mov 0xc(%ebp),%edx if ( !attr ) 10cb6d: 85 c0 test %eax,%eax 10cb6f: 74 0b je 10cb7c return EINVAL; if ( !attr->is_initialized ) 10cb71: 8b 08 mov (%eax),%ecx 10cb73: 85 c9 test %ecx,%ecx 10cb75: 74 05 je 10cb7c return EINVAL; switch ( pshared ) { 10cb77: 83 fa 01 cmp $0x1,%edx 10cb7a: 76 08 jbe 10cb84 <== NEVER TAKEN case PTHREAD_PROCESS_SHARED: case PTHREAD_PROCESS_PRIVATE: attr->process_shared = pshared; return 0; 10cb7c: b8 16 00 00 00 mov $0x16,%eax default: return EINVAL; } } 10cb81: c9 leave 10cb82: c3 ret 10cb83: 90 nop <== NOT EXECUTED return EINVAL; switch ( pshared ) { case PTHREAD_PROCESS_SHARED: case PTHREAD_PROCESS_PRIVATE: attr->process_shared = pshared; 10cb84: 89 50 04 mov %edx,0x4(%eax) 10cb87: 31 c0 xor %eax,%eax return 0; default: return EINVAL; } } 10cb89: c9 leave 10cb8a: c3 ret 0010b0d0 : int pthread_setcancelstate( int state, int *oldstate ) { 10b0d0: 55 push %ebp 10b0d1: 89 e5 mov %esp,%ebp 10b0d3: 53 push %ebx 10b0d4: 83 ec 04 sub $0x4,%esp 10b0d7: 8b 4d 08 mov 0x8(%ebp),%ecx 10b0da: 8b 55 0c mov 0xc(%ebp),%edx * 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() ) 10b0dd: a1 54 89 12 00 mov 0x128954,%eax 10b0e2: 85 c0 test %eax,%eax 10b0e4: 75 16 jne 10b0fc return EPROTO; if ( !oldstate ) 10b0e6: 85 d2 test %edx,%edx 10b0e8: 74 05 je 10b0ef return EINVAL; if ( state != PTHREAD_CANCEL_ENABLE && state != PTHREAD_CANCEL_DISABLE ) 10b0ea: 83 f9 01 cmp $0x1,%ecx 10b0ed: 76 19 jbe 10b108 /* * _Thread_Enable_dispatch is invoked by above call. */ return 0; 10b0ef: b8 16 00 00 00 mov $0x16,%eax } 10b0f4: 8b 5d fc mov -0x4(%ebp),%ebx 10b0f7: c9 leave 10b0f8: c3 ret 10b0f9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED * 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() ) 10b0fc: b8 47 00 00 00 mov $0x47,%eax /* * _Thread_Enable_dispatch is invoked by above call. */ return 0; } 10b101: 8b 5d fc mov -0x4(%ebp),%ebx 10b104: c9 leave 10b105: c3 ret 10b106: 66 90 xchg %ax,%ax <== NOT EXECUTED return EINVAL; if ( state != PTHREAD_CANCEL_ENABLE && state != PTHREAD_CANCEL_DISABLE ) return EINVAL; thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; 10b108: a1 78 89 12 00 mov 0x128978,%eax 10b10d: 8b 80 f8 00 00 00 mov 0xf8(%eax),%eax rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10b113: 8b 1d b8 88 12 00 mov 0x1288b8,%ebx 10b119: 43 inc %ebx 10b11a: 89 1d b8 88 12 00 mov %ebx,0x1288b8 _Thread_Disable_dispatch(); *oldstate = thread_support->cancelability_state; 10b120: 8b 98 cc 00 00 00 mov 0xcc(%eax),%ebx 10b126: 89 1a mov %ebx,(%edx) thread_support->cancelability_state = state; 10b128: 89 88 cc 00 00 00 mov %ecx,0xcc(%eax) _POSIX_Thread_Evaluate_cancellation_and_enable_dispatch(_Thread_Executing); 10b12e: 83 ec 0c sub $0xc,%esp 10b131: ff 35 78 89 12 00 pushl 0x128978 10b137: e8 28 50 00 00 call 110164 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch> 10b13c: 31 c0 xor %eax,%eax /* * _Thread_Enable_dispatch is invoked by above call. */ return 0; 10b13e: 83 c4 10 add $0x10,%esp } 10b141: 8b 5d fc mov -0x4(%ebp),%ebx 10b144: c9 leave 10b145: c3 ret 0010b148 : int pthread_setcanceltype( int type, int *oldtype ) { 10b148: 55 push %ebp 10b149: 89 e5 mov %esp,%ebp 10b14b: 53 push %ebx 10b14c: 83 ec 04 sub $0x4,%esp 10b14f: 8b 4d 08 mov 0x8(%ebp),%ecx 10b152: 8b 55 0c mov 0xc(%ebp),%edx * 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() ) 10b155: a1 54 89 12 00 mov 0x128954,%eax 10b15a: 85 c0 test %eax,%eax 10b15c: 75 16 jne 10b174 return EPROTO; if ( !oldtype ) 10b15e: 85 d2 test %edx,%edx 10b160: 74 05 je 10b167 return EINVAL; if ( type != PTHREAD_CANCEL_DEFERRED && type != PTHREAD_CANCEL_ASYNCHRONOUS ) 10b162: 83 f9 01 cmp $0x1,%ecx 10b165: 76 19 jbe 10b180 _POSIX_Thread_Evaluate_cancellation_and_enable_dispatch(_Thread_Executing); /* * _Thread_Enable_dispatch is invoked by above call. */ return 0; 10b167: b8 16 00 00 00 mov $0x16,%eax } 10b16c: 8b 5d fc mov -0x4(%ebp),%ebx 10b16f: c9 leave 10b170: c3 ret 10b171: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED * 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() ) 10b174: b8 47 00 00 00 mov $0x47,%eax /* * _Thread_Enable_dispatch is invoked by above call. */ return 0; } 10b179: 8b 5d fc mov -0x4(%ebp),%ebx 10b17c: c9 leave 10b17d: c3 ret 10b17e: 66 90 xchg %ax,%ax <== NOT EXECUTED return EINVAL; if ( type != PTHREAD_CANCEL_DEFERRED && type != PTHREAD_CANCEL_ASYNCHRONOUS ) return EINVAL; thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; 10b180: a1 78 89 12 00 mov 0x128978,%eax 10b185: 8b 80 f8 00 00 00 mov 0xf8(%eax),%eax 10b18b: 8b 1d b8 88 12 00 mov 0x1288b8,%ebx 10b191: 43 inc %ebx 10b192: 89 1d b8 88 12 00 mov %ebx,0x1288b8 _Thread_Disable_dispatch(); *oldtype = thread_support->cancelability_type; 10b198: 8b 98 d0 00 00 00 mov 0xd0(%eax),%ebx 10b19e: 89 1a mov %ebx,(%edx) thread_support->cancelability_type = type; 10b1a0: 89 88 d0 00 00 00 mov %ecx,0xd0(%eax) _POSIX_Thread_Evaluate_cancellation_and_enable_dispatch(_Thread_Executing); 10b1a6: 83 ec 0c sub $0xc,%esp 10b1a9: ff 35 78 89 12 00 pushl 0x128978 10b1af: e8 b0 4f 00 00 call 110164 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch> 10b1b4: 31 c0 xor %eax,%eax /* * _Thread_Enable_dispatch is invoked by above call. */ return 0; 10b1b6: 83 c4 10 add $0x10,%esp } 10b1b9: 8b 5d fc mov -0x4(%ebp),%ebx 10b1bc: c9 leave 10b1bd: c3 ret 0010dbd0 : int pthread_setschedparam( pthread_t thread, int policy, struct sched_param *param ) { 10dbd0: 55 push %ebp 10dbd1: 89 e5 mov %esp,%ebp 10dbd3: 57 push %edi 10dbd4: 56 push %esi 10dbd5: 53 push %ebx 10dbd6: 83 ec 2c sub $0x2c,%esp 10dbd9: 8b 75 10 mov 0x10(%ebp),%esi int rc; /* * Check all the parameters */ if ( !param ) 10dbdc: 85 f6 test %esi,%esi 10dbde: 0f 84 c4 00 00 00 je 10dca8 return EINVAL; rc = _POSIX_Thread_Translate_sched_param( 10dbe4: 8d 45 e0 lea -0x20(%ebp),%eax 10dbe7: 50 push %eax 10dbe8: 8d 45 e4 lea -0x1c(%ebp),%eax 10dbeb: 50 push %eax 10dbec: 56 push %esi 10dbed: ff 75 0c pushl 0xc(%ebp) 10dbf0: e8 07 55 00 00 call 1130fc <_POSIX_Thread_Translate_sched_param> 10dbf5: 89 c3 mov %eax,%ebx policy, param, &budget_algorithm, &budget_callout ); if ( rc ) 10dbf7: 83 c4 10 add $0x10,%esp 10dbfa: 85 c0 test %eax,%eax 10dbfc: 74 0a je 10dc08 case OBJECTS_ERROR: break; } return ESRCH; } 10dbfe: 89 d8 mov %ebx,%eax 10dc00: 8d 65 f4 lea -0xc(%ebp),%esp 10dc03: 5b pop %ebx 10dc04: 5e pop %esi 10dc05: 5f pop %edi 10dc06: c9 leave 10dc07: c3 ret 10dc08: 50 push %eax 10dc09: 8d 45 dc lea -0x24(%ebp),%eax 10dc0c: 50 push %eax 10dc0d: ff 75 08 pushl 0x8(%ebp) 10dc10: 68 00 b7 12 00 push $0x12b700 10dc15: e8 2a 1f 00 00 call 10fb44 <_Objects_Get> 10dc1a: 89 c2 mov %eax,%edx /* * Actually change the scheduling policy and parameters */ the_thread = _POSIX_Threads_Get( thread, &location ); switch ( location ) { 10dc1c: 83 c4 10 add $0x10,%esp 10dc1f: 8b 7d dc mov -0x24(%ebp),%edi 10dc22: 85 ff test %edi,%edi 10dc24: 0f 85 8e 00 00 00 jne 10dcb8 case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 10dc2a: 8b 80 f8 00 00 00 mov 0xf8(%eax),%eax 10dc30: 89 45 d4 mov %eax,-0x2c(%ebp) if ( api->schedpolicy == SCHED_SPORADIC ) 10dc33: 83 78 7c 03 cmpl $0x3,0x7c(%eax) 10dc37: 0f 84 c3 00 00 00 je 10dd00 (void) _Watchdog_Remove( &api->Sporadic_timer ); api->schedpolicy = policy; 10dc3d: 8b 45 0c mov 0xc(%ebp),%eax 10dc40: 8b 4d d4 mov -0x2c(%ebp),%ecx 10dc43: 89 41 7c mov %eax,0x7c(%ecx) api->schedparam = *param; 10dc46: 89 cf mov %ecx,%edi 10dc48: 83 ef 80 sub $0xffffff80,%edi 10dc4b: b9 06 00 00 00 mov $0x6,%ecx 10dc50: f3 a5 rep movsl %ds:(%esi),%es:(%edi) the_thread->budget_algorithm = budget_algorithm; 10dc52: 8b 45 e4 mov -0x1c(%ebp),%eax 10dc55: 89 42 7c mov %eax,0x7c(%edx) the_thread->budget_callout = budget_callout; 10dc58: 8b 45 e0 mov -0x20(%ebp),%eax 10dc5b: 89 82 80 00 00 00 mov %eax,0x80(%edx) switch ( api->schedpolicy ) { 10dc61: 8b 75 0c mov 0xc(%ebp),%esi 10dc64: 85 f6 test %esi,%esi 10dc66: 78 2e js 10dc96 <== ALWAYS TAKEN 10dc68: 83 7d 0c 02 cmpl $0x2,0xc(%ebp) 10dc6c: 7f 56 jg 10dcc4 case SCHED_OTHER: case SCHED_FIFO: case SCHED_RR: the_thread->cpu_time_budget = _Thread_Ticks_per_timeslice; 10dc6e: a1 04 b4 12 00 mov 0x12b404,%eax 10dc73: 89 42 78 mov %eax,0x78(%edx) 10dc76: 0f b6 05 5c 72 12 00 movzbl 0x12725c,%eax 10dc7d: 8b 4d d4 mov -0x2c(%ebp),%ecx 10dc80: 2b 81 80 00 00 00 sub 0x80(%ecx),%eax the_thread->real_priority = 10dc86: 89 42 18 mov %eax,0x18(%edx) _POSIX_Priority_To_core( api->schedparam.sched_priority ); _Thread_Change_priority( 10dc89: 51 push %ecx 10dc8a: 6a 01 push $0x1 10dc8c: 50 push %eax 10dc8d: 52 push %edx 10dc8e: e8 3d 22 00 00 call 10fed0 <_Thread_Change_priority> the_thread, the_thread->real_priority, true ); break; 10dc93: 83 c4 10 add $0x10,%esp _Watchdog_Remove( &api->Sporadic_timer ); _POSIX_Threads_Sporadic_budget_TSR( 0, the_thread ); break; } _Thread_Enable_dispatch(); 10dc96: e8 1d 27 00 00 call 1103b8 <_Thread_Enable_dispatch> case OBJECTS_ERROR: break; } return ESRCH; } 10dc9b: 89 d8 mov %ebx,%eax 10dc9d: 8d 65 f4 lea -0xc(%ebp),%esp 10dca0: 5b pop %ebx 10dca1: 5e pop %esi 10dca2: 5f pop %edi 10dca3: c9 leave 10dca4: c3 ret 10dca5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED int rc; /* * Check all the parameters */ if ( !param ) 10dca8: bb 16 00 00 00 mov $0x16,%ebx case OBJECTS_ERROR: break; } return ESRCH; } 10dcad: 89 d8 mov %ebx,%eax 10dcaf: 8d 65 f4 lea -0xc(%ebp),%esp 10dcb2: 5b pop %ebx 10dcb3: 5e pop %esi 10dcb4: 5f pop %edi 10dcb5: c9 leave 10dcb6: c3 ret 10dcb7: 90 nop <== NOT EXECUTED /* * Actually change the scheduling policy and parameters */ the_thread = _POSIX_Threads_Get( thread, &location ); switch ( location ) { 10dcb8: b3 03 mov $0x3,%bl case OBJECTS_ERROR: break; } return ESRCH; } 10dcba: 89 d8 mov %ebx,%eax 10dcbc: 8d 65 f4 lea -0xc(%ebp),%esp 10dcbf: 5b pop %ebx 10dcc0: 5e pop %esi 10dcc1: 5f pop %edi 10dcc2: c9 leave 10dcc3: c3 ret api->schedpolicy = policy; api->schedparam = *param; the_thread->budget_algorithm = budget_algorithm; the_thread->budget_callout = budget_callout; switch ( api->schedpolicy ) { 10dcc4: 83 7d 0c 03 cmpl $0x3,0xc(%ebp) 10dcc8: 75 cc jne 10dc96 <== ALWAYS TAKEN true ); break; case SCHED_SPORADIC: api->ss_high_priority = api->schedparam.sched_priority; 10dcca: 8b 4d d4 mov -0x2c(%ebp),%ecx 10dccd: 8b 81 80 00 00 00 mov 0x80(%ecx),%eax 10dcd3: 89 81 98 00 00 00 mov %eax,0x98(%ecx) _Watchdog_Remove( &api->Sporadic_timer ); 10dcd9: 83 ec 0c sub $0xc,%esp 10dcdc: 89 c8 mov %ecx,%eax 10dcde: 05 9c 00 00 00 add $0x9c,%eax 10dce3: 50 push %eax 10dce4: 89 55 d0 mov %edx,-0x30(%ebp) 10dce7: e8 a4 38 00 00 call 111590 <_Watchdog_Remove> _POSIX_Threads_Sporadic_budget_TSR( 0, the_thread ); 10dcec: 58 pop %eax 10dced: 5a pop %edx 10dcee: 8b 55 d0 mov -0x30(%ebp),%edx 10dcf1: 52 push %edx 10dcf2: 6a 00 push $0x0 10dcf4: e8 43 fe ff ff call 10db3c <_POSIX_Threads_Sporadic_budget_TSR> 10dcf9: 83 c4 10 add $0x10,%esp 10dcfc: eb 98 jmp 10dc96 <== ALWAYS TAKEN 10dcfe: 66 90 xchg %ax,%ax <== NOT EXECUTED case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_POSIX ]; if ( api->schedpolicy == SCHED_SPORADIC ) (void) _Watchdog_Remove( &api->Sporadic_timer ); 10dd00: 83 ec 0c sub $0xc,%esp 10dd03: 05 9c 00 00 00 add $0x9c,%eax 10dd08: 50 push %eax 10dd09: 89 55 d0 mov %edx,-0x30(%ebp) 10dd0c: e8 7f 38 00 00 call 111590 <_Watchdog_Remove> 10dd11: 83 c4 10 add $0x10,%esp 10dd14: 8b 55 d0 mov -0x30(%ebp),%edx 10dd17: e9 21 ff ff ff jmp 10dc3d <== ALWAYS TAKEN 00111548 : int pthread_sigmask( int how, const sigset_t *set, sigset_t *oset ) { 111548: 55 push %ebp 111549: 89 e5 mov %esp,%ebp 11154b: 57 push %edi 11154c: 56 push %esi 11154d: 53 push %ebx 11154e: 83 ec 0c sub $0xc,%esp 111551: 8b 4d 08 mov 0x8(%ebp),%ecx 111554: 8b 55 0c mov 0xc(%ebp),%edx 111557: 8b 5d 10 mov 0x10(%ebp),%ebx POSIX_API_Control *api; if ( !set && !oset ) 11155a: 85 d2 test %edx,%edx 11155c: 0f 84 9a 00 00 00 je 1115fc rtems_set_errno_and_return_minus_one( EINVAL ); api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; 111562: 8b 35 78 94 12 00 mov 0x129478,%esi 111568: 8b 86 f8 00 00 00 mov 0xf8(%esi),%eax if ( oset ) 11156e: 85 db test %ebx,%ebx 111570: 74 0c je 11157e *oset = api->signals_blocked; 111572: 8b b8 c4 00 00 00 mov 0xc4(%eax),%edi 111578: 89 3b mov %edi,(%ebx) if ( !set ) 11157a: 85 d2 test %edx,%edx 11157c: 74 42 je 1115c0 return 0; switch ( how ) { 11157e: 83 f9 01 cmp $0x1,%ecx 111581: 74 6d je 1115f0 111583: 83 f9 02 cmp $0x2,%ecx 111586: 74 44 je 1115cc 111588: 85 c9 test %ecx,%ecx 11158a: 75 4c jne 1115d8 break; case SIG_UNBLOCK: api->signals_blocked &= ~*set; break; case SIG_SETMASK: api->signals_blocked = *set; 11158c: 8b 12 mov (%edx),%edx 11158e: 89 90 c4 00 00 00 mov %edx,0xc4(%eax) /* XXX are there critical section problems here? */ /* XXX evaluate the new set */ if ( ~api->signals_blocked & (api->signals_pending | _POSIX_signals_Pending) ) { 111594: 8b 15 80 9b 12 00 mov 0x129b80,%edx 11159a: 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 & 1115a0: 8b 80 c4 00 00 00 mov 0xc4(%eax),%eax 1115a6: f7 d0 not %eax 1115a8: 85 c2 test %eax,%edx 1115aa: 74 14 je 1115c0 (api->signals_pending | _POSIX_signals_Pending) ) { _Thread_Executing->do_post_task_switch_extension = true; 1115ac: c6 46 74 01 movb $0x1,0x74(%esi) _Thread_Dispatch(); 1115b0: e8 bf cc ff ff call 10e274 <_Thread_Dispatch> 1115b5: 31 c0 xor %eax,%eax } return 0; } 1115b7: 83 c4 0c add $0xc,%esp 1115ba: 5b pop %ebx 1115bb: 5e pop %esi 1115bc: 5f pop %edi 1115bd: c9 leave 1115be: c3 ret 1115bf: 90 nop <== NOT EXECUTED /* XXX evaluate the new set */ if ( ~api->signals_blocked & (api->signals_pending | _POSIX_signals_Pending) ) { _Thread_Executing->do_post_task_switch_extension = true; _Thread_Dispatch(); 1115c0: 31 c0 xor %eax,%eax } return 0; } 1115c2: 83 c4 0c add $0xc,%esp 1115c5: 5b pop %ebx 1115c6: 5e pop %esi 1115c7: 5f pop %edi 1115c8: c9 leave 1115c9: c3 ret 1115ca: 66 90 xchg %ax,%ax <== NOT EXECUTED switch ( how ) { case SIG_BLOCK: api->signals_blocked |= *set; break; case SIG_UNBLOCK: api->signals_blocked &= ~*set; 1115cc: 8b 12 mov (%edx),%edx 1115ce: f7 d2 not %edx 1115d0: 21 90 c4 00 00 00 and %edx,0xc4(%eax) break; 1115d6: eb bc jmp 111594 <== ALWAYS TAKEN case SIG_SETMASK: api->signals_blocked = *set; break; default: rtems_set_errno_and_return_minus_one( EINVAL ); 1115d8: e8 1f 30 00 00 call 1145fc <__errno> 1115dd: c7 00 16 00 00 00 movl $0x16,(%eax) 1115e3: b8 ff ff ff ff mov $0xffffffff,%eax _Thread_Executing->do_post_task_switch_extension = true; _Thread_Dispatch(); } return 0; } 1115e8: 83 c4 0c add $0xc,%esp 1115eb: 5b pop %ebx 1115ec: 5e pop %esi 1115ed: 5f pop %edi 1115ee: c9 leave 1115ef: c3 ret if ( !set ) return 0; switch ( how ) { case SIG_BLOCK: api->signals_blocked |= *set; 1115f0: 8b 12 mov (%edx),%edx 1115f2: 09 90 c4 00 00 00 or %edx,0xc4(%eax) break; 1115f8: eb 9a jmp 111594 <== ALWAYS TAKEN 1115fa: 66 90 xchg %ax,%ax <== NOT EXECUTED sigset_t *oset ) { POSIX_API_Control *api; if ( !set && !oset ) 1115fc: 85 db test %ebx,%ebx 1115fe: 74 d8 je 1115d8 rtems_set_errno_and_return_minus_one( EINVAL ); api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; 111600: 8b 35 78 94 12 00 mov 0x129478,%esi 111606: 8b 86 f8 00 00 00 mov 0xf8(%esi),%eax 11160c: e9 61 ff ff ff jmp 111572 <== ALWAYS TAKEN 0010b5b0 : */ int pthread_spin_destroy( pthread_spinlock_t *spinlock ) { 10b5b0: 55 push %ebp 10b5b1: 89 e5 mov %esp,%ebp 10b5b3: 83 ec 28 sub $0x28,%esp 10b5b6: 8b 45 08 mov 0x8(%ebp),%eax POSIX_Spinlock_Control *the_spinlock = NULL; Objects_Locations location; if ( !spinlock ) 10b5b9: 85 c0 test %eax,%eax 10b5bb: 74 2f je 10b5ec RTEMS_INLINE_ROUTINE POSIX_Spinlock_Control *_POSIX_Spinlock_Get ( pthread_spinlock_t *spinlock, Objects_Locations *location ) { return (POSIX_Spinlock_Control *) _Objects_Get( 10b5bd: 52 push %edx 10b5be: 8d 55 f4 lea -0xc(%ebp),%edx 10b5c1: 52 push %edx 10b5c2: ff 30 pushl (%eax) 10b5c4: 68 a0 89 12 00 push $0x1289a0 10b5c9: e8 ae 20 00 00 call 10d67c <_Objects_Get> return EINVAL; the_spinlock = _POSIX_Spinlock_Get( spinlock, &location ); switch ( location ) { 10b5ce: 83 c4 10 add $0x10,%esp 10b5d1: 8b 4d f4 mov -0xc(%ebp),%ecx 10b5d4: 85 c9 test %ecx,%ecx 10b5d6: 75 14 jne 10b5ec */ RTEMS_INLINE_ROUTINE bool _CORE_spinlock_Is_busy( CORE_spinlock_Control *the_spinlock ) { return (the_spinlock->users != 0); 10b5d8: 8b 50 18 mov 0x18(%eax),%edx case OBJECTS_LOCAL: if ( _CORE_spinlock_Is_busy( &the_spinlock->Spinlock ) ) { 10b5db: 85 d2 test %edx,%edx 10b5dd: 74 15 je 10b5f4 _Thread_Enable_dispatch(); 10b5df: e8 0c 29 00 00 call 10def0 <_Thread_Enable_dispatch> 10b5e4: b8 10 00 00 00 mov $0x10,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10b5e9: c9 leave 10b5ea: c3 ret 10b5eb: 90 nop <== NOT EXECUTED _Objects_Close( &_POSIX_Spinlock_Information, &the_spinlock->Object ); _POSIX_Spinlock_Free( the_spinlock ); _Thread_Enable_dispatch(); return 0; 10b5ec: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10b5f1: c9 leave 10b5f2: c3 ret 10b5f3: 90 nop <== NOT EXECUTED if ( _CORE_spinlock_Is_busy( &the_spinlock->Spinlock ) ) { _Thread_Enable_dispatch(); return EBUSY; } _Objects_Close( &_POSIX_Spinlock_Information, &the_spinlock->Object ); 10b5f4: 83 ec 08 sub $0x8,%esp 10b5f7: 50 push %eax 10b5f8: 68 a0 89 12 00 push $0x1289a0 10b5fd: 89 45 e4 mov %eax,-0x1c(%ebp) 10b600: e8 43 1c 00 00 call 10d248 <_Objects_Close> */ RTEMS_INLINE_ROUTINE void _POSIX_Spinlock_Free ( POSIX_Spinlock_Control *the_spinlock ) { _Objects_Free( &_POSIX_Spinlock_Information, &the_spinlock->Object ); 10b605: 58 pop %eax 10b606: 5a pop %edx 10b607: 8b 45 e4 mov -0x1c(%ebp),%eax 10b60a: 50 push %eax 10b60b: 68 a0 89 12 00 push $0x1289a0 10b610: e8 37 1f 00 00 call 10d54c <_Objects_Free> _POSIX_Spinlock_Free( the_spinlock ); _Thread_Enable_dispatch(); 10b615: e8 d6 28 00 00 call 10def0 <_Thread_Enable_dispatch> 10b61a: 31 c0 xor %eax,%eax return 0; 10b61c: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return EINVAL; } 10b61f: c9 leave 10b620: c3 ret 0010b624 : int pthread_spin_init( pthread_spinlock_t *spinlock, int pshared ) { 10b624: 55 push %ebp 10b625: 89 e5 mov %esp,%ebp 10b627: 56 push %esi 10b628: 53 push %ebx 10b629: 83 ec 20 sub $0x20,%esp 10b62c: 8b 5d 08 mov 0x8(%ebp),%ebx POSIX_Spinlock_Control *the_spinlock; CORE_spinlock_Attributes attributes; if ( !spinlock ) 10b62f: 85 db test %ebx,%ebx 10b631: 74 65 je 10b698 return EINVAL; switch ( pshared ) { 10b633: 8b 45 0c mov 0xc(%ebp),%eax 10b636: 85 c0 test %eax,%eax 10b638: 75 5e jne 10b698 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10b63a: a1 98 86 12 00 mov 0x128698,%eax 10b63f: 40 inc %eax 10b640: a3 98 86 12 00 mov %eax,0x128698 * 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 *) 10b645: 83 ec 0c sub $0xc,%esp 10b648: 68 a0 89 12 00 push $0x1289a0 10b64d: e8 7a 1b 00 00 call 10d1cc <_Objects_Allocate> _Thread_Disable_dispatch(); /* prevents deletion */ the_spinlock = _POSIX_Spinlock_Allocate(); if ( !the_spinlock ) { 10b652: 83 c4 10 add $0x10,%esp 10b655: 85 c0 test %eax,%eax 10b657: 74 4b je 10b6a4 _Thread_Enable_dispatch(); return EAGAIN; } _CORE_spinlock_Initialize( &the_spinlock->Spinlock, &attributes ); 10b659: 83 ec 08 sub $0x8,%esp 10b65c: 8d 55 f4 lea -0xc(%ebp),%edx 10b65f: 52 push %edx 10b660: 8d 50 10 lea 0x10(%eax),%edx 10b663: 52 push %edx 10b664: 89 45 e4 mov %eax,-0x1c(%ebp) 10b667: e8 f4 15 00 00 call 10cc60 <_CORE_spinlock_Initialize> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10b66c: 8b 45 e4 mov -0x1c(%ebp),%eax 10b66f: 8b 50 08 mov 0x8(%eax),%edx 10b672: 0f b7 f2 movzwl %dx,%esi 10b675: 8b 0d bc 89 12 00 mov 0x1289bc,%ecx 10b67b: 89 04 b1 mov %eax,(%ecx,%esi,4) _Objects_Get_index( the_object->id ), the_object ); /* ASSERT: information->is_string == false */ the_object->name.name_u32 = name; 10b67e: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax) _Objects_Open_u32( &_POSIX_Spinlock_Information, &the_spinlock->Object, 0 ); *spinlock = the_spinlock->Object.id; 10b685: 89 13 mov %edx,(%ebx) _Thread_Enable_dispatch(); 10b687: e8 64 28 00 00 call 10def0 <_Thread_Enable_dispatch> 10b68c: 31 c0 xor %eax,%eax return 0; 10b68e: 83 c4 10 add $0x10,%esp } 10b691: 8d 65 f8 lea -0x8(%ebp),%esp 10b694: 5b pop %ebx 10b695: 5e pop %esi 10b696: c9 leave 10b697: c3 ret _Objects_Open_u32( &_POSIX_Spinlock_Information, &the_spinlock->Object, 0 ); *spinlock = the_spinlock->Object.id; _Thread_Enable_dispatch(); return 0; 10b698: b8 16 00 00 00 mov $0x16,%eax } 10b69d: 8d 65 f8 lea -0x8(%ebp),%esp 10b6a0: 5b pop %ebx 10b6a1: 5e pop %esi 10b6a2: c9 leave 10b6a3: c3 ret _Thread_Disable_dispatch(); /* prevents deletion */ the_spinlock = _POSIX_Spinlock_Allocate(); if ( !the_spinlock ) { _Thread_Enable_dispatch(); 10b6a4: e8 47 28 00 00 call 10def0 <_Thread_Enable_dispatch> 10b6a9: b8 0b 00 00 00 mov $0xb,%eax return EAGAIN; 10b6ae: eb ed jmp 10b69d <== ALWAYS TAKEN 0010b6b0 : */ int pthread_spin_lock( pthread_spinlock_t *spinlock ) { 10b6b0: 55 push %ebp 10b6b1: 89 e5 mov %esp,%ebp 10b6b3: 53 push %ebx 10b6b4: 83 ec 14 sub $0x14,%esp 10b6b7: 8b 45 08 mov 0x8(%ebp),%eax POSIX_Spinlock_Control *the_spinlock = NULL; Objects_Locations location; CORE_spinlock_Status status; if ( !spinlock ) 10b6ba: 85 c0 test %eax,%eax 10b6bc: 74 1b je 10b6d9 RTEMS_INLINE_ROUTINE POSIX_Spinlock_Control *_POSIX_Spinlock_Get ( pthread_spinlock_t *spinlock, Objects_Locations *location ) { return (POSIX_Spinlock_Control *) _Objects_Get( 10b6be: 53 push %ebx 10b6bf: 8d 55 f4 lea -0xc(%ebp),%edx 10b6c2: 52 push %edx 10b6c3: ff 30 pushl (%eax) 10b6c5: 68 a0 89 12 00 push $0x1289a0 10b6ca: e8 ad 1f 00 00 call 10d67c <_Objects_Get> return EINVAL; the_spinlock = _POSIX_Spinlock_Get( spinlock, &location ); switch ( location ) { 10b6cf: 83 c4 10 add $0x10,%esp 10b6d2: 8b 4d f4 mov -0xc(%ebp),%ecx 10b6d5: 85 c9 test %ecx,%ecx 10b6d7: 74 0b je 10b6e4 case OBJECTS_LOCAL: status = _CORE_spinlock_Wait( &the_spinlock->Spinlock, true, 0 ); _Thread_Enable_dispatch(); return _POSIX_Spinlock_Translate_core_spinlock_return_code( status ); 10b6d9: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10b6de: 8b 5d fc mov -0x4(%ebp),%ebx 10b6e1: c9 leave 10b6e2: c3 ret 10b6e3: 90 nop <== NOT EXECUTED the_spinlock = _POSIX_Spinlock_Get( spinlock, &location ); switch ( location ) { case OBJECTS_LOCAL: status = _CORE_spinlock_Wait( &the_spinlock->Spinlock, true, 0 ); 10b6e4: 52 push %edx 10b6e5: 6a 00 push $0x0 10b6e7: 6a 01 push $0x1 10b6e9: 83 c0 10 add $0x10,%eax 10b6ec: 50 push %eax 10b6ed: e8 e2 15 00 00 call 10ccd4 <_CORE_spinlock_Wait> 10b6f2: 89 c3 mov %eax,%ebx _Thread_Enable_dispatch(); 10b6f4: e8 f7 27 00 00 call 10def0 <_Thread_Enable_dispatch> return _POSIX_Spinlock_Translate_core_spinlock_return_code( status ); 10b6f9: 89 1c 24 mov %ebx,(%esp) 10b6fc: e8 0b 00 00 00 call 10b70c <_POSIX_Spinlock_Translate_core_spinlock_return_code> <== ALWAYS TAKEN 10b701: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return EINVAL; } 10b704: 8b 5d fc mov -0x4(%ebp),%ebx 10b707: c9 leave 10b708: c3 ret 0010b71c : */ int pthread_spin_trylock( pthread_spinlock_t *spinlock ) { 10b71c: 55 push %ebp 10b71d: 89 e5 mov %esp,%ebp 10b71f: 53 push %ebx 10b720: 83 ec 14 sub $0x14,%esp 10b723: 8b 45 08 mov 0x8(%ebp),%eax POSIX_Spinlock_Control *the_spinlock = NULL; Objects_Locations location; CORE_spinlock_Status status; if ( !spinlock ) 10b726: 85 c0 test %eax,%eax 10b728: 74 1b je 10b745 10b72a: 53 push %ebx 10b72b: 8d 55 f4 lea -0xc(%ebp),%edx 10b72e: 52 push %edx 10b72f: ff 30 pushl (%eax) 10b731: 68 a0 89 12 00 push $0x1289a0 10b736: e8 41 1f 00 00 call 10d67c <_Objects_Get> return EINVAL; the_spinlock = _POSIX_Spinlock_Get( spinlock, &location ); switch ( location ) { 10b73b: 83 c4 10 add $0x10,%esp 10b73e: 8b 4d f4 mov -0xc(%ebp),%ecx 10b741: 85 c9 test %ecx,%ecx 10b743: 74 0b je 10b750 case OBJECTS_LOCAL: status = _CORE_spinlock_Wait( &the_spinlock->Spinlock, false, 0 ); _Thread_Enable_dispatch(); return _POSIX_Spinlock_Translate_core_spinlock_return_code( status ); 10b745: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10b74a: 8b 5d fc mov -0x4(%ebp),%ebx 10b74d: c9 leave 10b74e: c3 ret 10b74f: 90 nop <== NOT EXECUTED the_spinlock = _POSIX_Spinlock_Get( spinlock, &location ); switch ( location ) { case OBJECTS_LOCAL: status = _CORE_spinlock_Wait( &the_spinlock->Spinlock, false, 0 ); 10b750: 52 push %edx 10b751: 6a 00 push $0x0 10b753: 6a 00 push $0x0 10b755: 83 c0 10 add $0x10,%eax 10b758: 50 push %eax 10b759: e8 76 15 00 00 call 10ccd4 <_CORE_spinlock_Wait> 10b75e: 89 c3 mov %eax,%ebx _Thread_Enable_dispatch(); 10b760: e8 8b 27 00 00 call 10def0 <_Thread_Enable_dispatch> return _POSIX_Spinlock_Translate_core_spinlock_return_code( status ); 10b765: 89 1c 24 mov %ebx,(%esp) 10b768: e8 9f ff ff ff call 10b70c <_POSIX_Spinlock_Translate_core_spinlock_return_code> <== ALWAYS TAKEN 10b76d: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return EINVAL; } 10b770: 8b 5d fc mov -0x4(%ebp),%ebx 10b773: c9 leave 10b774: c3 ret 0010b778 : */ int pthread_spin_unlock( pthread_spinlock_t *spinlock ) { 10b778: 55 push %ebp 10b779: 89 e5 mov %esp,%ebp 10b77b: 53 push %ebx 10b77c: 83 ec 14 sub $0x14,%esp 10b77f: 8b 45 08 mov 0x8(%ebp),%eax POSIX_Spinlock_Control *the_spinlock = NULL; Objects_Locations location; CORE_spinlock_Status status; if ( !spinlock ) 10b782: 85 c0 test %eax,%eax 10b784: 74 1b je 10b7a1 10b786: 51 push %ecx 10b787: 8d 55 f4 lea -0xc(%ebp),%edx 10b78a: 52 push %edx 10b78b: ff 30 pushl (%eax) 10b78d: 68 a0 89 12 00 push $0x1289a0 10b792: e8 e5 1e 00 00 call 10d67c <_Objects_Get> return EINVAL; the_spinlock = _POSIX_Spinlock_Get( spinlock, &location ); switch ( location ) { 10b797: 83 c4 10 add $0x10,%esp 10b79a: 8b 55 f4 mov -0xc(%ebp),%edx 10b79d: 85 d2 test %edx,%edx 10b79f: 74 0b je 10b7ac case OBJECTS_LOCAL: status = _CORE_spinlock_Release( &the_spinlock->Spinlock ); _Thread_Enable_dispatch(); return _POSIX_Spinlock_Translate_core_spinlock_return_code( status ); 10b7a1: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10b7a6: 8b 5d fc mov -0x4(%ebp),%ebx 10b7a9: c9 leave 10b7aa: c3 ret 10b7ab: 90 nop <== NOT EXECUTED the_spinlock = _POSIX_Spinlock_Get( spinlock, &location ); switch ( location ) { case OBJECTS_LOCAL: status = _CORE_spinlock_Release( &the_spinlock->Spinlock ); 10b7ac: 83 ec 0c sub $0xc,%esp 10b7af: 83 c0 10 add $0x10,%eax 10b7b2: 50 push %eax 10b7b3: e8 cc 14 00 00 call 10cc84 <_CORE_spinlock_Release> 10b7b8: 89 c3 mov %eax,%ebx _Thread_Enable_dispatch(); 10b7ba: e8 31 27 00 00 call 10def0 <_Thread_Enable_dispatch> return _POSIX_Spinlock_Translate_core_spinlock_return_code( status ); 10b7bf: 89 1c 24 mov %ebx,(%esp) 10b7c2: e8 45 ff ff ff call 10b70c <_POSIX_Spinlock_Translate_core_spinlock_return_code> <== ALWAYS TAKEN 10b7c7: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return EINVAL; } 10b7ca: 8b 5d fc mov -0x4(%ebp),%ebx 10b7cd: c9 leave 10b7ce: c3 ret 0010b9d8 : * * 18.2.2 Setting Cancelability State, P1003.1c/Draft 10, p. 183 */ void pthread_testcancel( void ) { 10b9d8: 55 push %ebp 10b9d9: 89 e5 mov %esp,%ebp 10b9db: 83 ec 08 sub $0x8,%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() ) 10b9de: a1 b4 90 12 00 mov 0x1290b4,%eax 10b9e3: 85 c0 test %eax,%eax 10b9e5: 75 44 jne 10ba2b <== ALWAYS TAKEN return; thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; 10b9e7: a1 d8 90 12 00 mov 0x1290d8,%eax 10b9ec: 8b 80 f8 00 00 00 mov 0xf8(%eax),%eax 10b9f2: 8b 15 18 90 12 00 mov 0x129018,%edx 10b9f8: 42 inc %edx 10b9f9: 89 15 18 90 12 00 mov %edx,0x129018 _Thread_Disable_dispatch(); if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && 10b9ff: 8b 90 cc 00 00 00 mov 0xcc(%eax),%edx 10ba05: 85 d2 test %edx,%edx 10ba07: 75 27 jne 10ba30 <== ALWAYS TAKEN thread_support->cancelation_requested ) 10ba09: 8b 80 d4 00 00 00 mov 0xd4(%eax),%eax 10ba0f: 85 c0 test %eax,%eax 10ba11: 74 1d je 10ba30 cancel = true; _Thread_Enable_dispatch(); 10ba13: e8 cc 25 00 00 call 10dfe4 <_Thread_Enable_dispatch> if ( cancel ) _POSIX_Thread_Exit( _Thread_Executing, PTHREAD_CANCELED ); 10ba18: 83 ec 08 sub $0x8,%esp 10ba1b: 6a ff push $0xffffffff 10ba1d: ff 35 d8 90 12 00 pushl 0x1290d8 10ba23: e8 a8 54 00 00 call 110ed0 <_POSIX_Thread_Exit> 10ba28: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } 10ba2b: c9 leave <== NOT EXECUTED 10ba2c: c3 ret <== NOT EXECUTED 10ba2d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 10ba30: c9 leave _Thread_Disable_dispatch(); if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && thread_support->cancelation_requested ) cancel = true; _Thread_Enable_dispatch(); 10ba31: e9 ae 25 00 00 jmp 10dfe4 <_Thread_Enable_dispatch> 00108e0c : * putk * * Kernel putk (e.g. puts) function requiring minimal infrastrure. */ void putk(const char *s) { 108e0c: 55 push %ebp 108e0d: 89 e5 mov %esp,%ebp 108e0f: 53 push %ebx 108e10: 83 ec 04 sub $0x4,%esp 108e13: 8b 5d 08 mov 0x8(%ebp),%ebx const char *p = s; for (p=s ; *p ; p++ ) 108e16: 8a 03 mov (%ebx),%al 108e18: 84 c0 test %al,%al 108e1a: 74 17 je 108e33 <== ALWAYS TAKEN BSP_output_char(*p); 108e1c: 83 ec 0c sub $0xc,%esp 108e1f: 0f be c0 movsbl %al,%eax 108e22: 50 push %eax 108e23: ff 15 44 32 12 00 call *0x123244 */ void putk(const char *s) { const char *p = s; for (p=s ; *p ; p++ ) 108e29: 43 inc %ebx 108e2a: 8a 03 mov (%ebx),%al 108e2c: 83 c4 10 add $0x10,%esp 108e2f: 84 c0 test %al,%al 108e31: 75 e9 jne 108e1c BSP_output_char(*p); BSP_output_char('\n'); 108e33: c7 45 08 0a 00 00 00 movl $0xa,0x8(%ebp) 108e3a: a1 44 32 12 00 mov 0x123244,%eax } 108e3f: 8b 5d fc mov -0x4(%ebp),%ebx 108e42: c9 leave { const char *p = s; for (p=s ; *p ; p++ ) BSP_output_char(*p); BSP_output_char('\n'); 108e43: ff e0 jmp *%eax 0011ec90 : ssize_t read( int fd, void *buffer, size_t count ) { 11ec90: 55 push %ebp 11ec91: 89 e5 mov %esp,%ebp 11ec93: 53 push %ebx 11ec94: 83 ec 04 sub $0x4,%esp 11ec97: 8b 5d 08 mov 0x8(%ebp),%ebx 11ec9a: 8b 45 0c mov 0xc(%ebp),%eax 11ec9d: 8b 55 10 mov 0x10(%ebp),%edx ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 11eca0: 3b 1d 4c 31 12 00 cmp 0x12314c,%ebx 11eca6: 73 50 jae 11ecf8 <== ALWAYS TAKEN iop = rtems_libio_iop( fd ); 11eca8: c1 e3 06 shl $0x6,%ebx 11ecab: 03 1d 40 72 12 00 add 0x127240,%ebx rtems_libio_check_is_open( iop ); 11ecb1: 8b 4b 14 mov 0x14(%ebx),%ecx 11ecb4: f6 c5 01 test $0x1,%ch 11ecb7: 74 3f je 11ecf8 rtems_libio_check_buffer( buffer ); 11ecb9: 85 c0 test %eax,%eax 11ecbb: 74 4f je 11ed0c <== ALWAYS TAKEN rtems_libio_check_count( count ); 11ecbd: 85 d2 test %edx,%edx 11ecbf: 74 2f je 11ecf0 <== ALWAYS TAKEN rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); 11ecc1: 83 e1 02 and $0x2,%ecx 11ecc4: 74 46 je 11ed0c <== ALWAYS TAKEN /* * Now process the read(). */ if ( !iop->handlers->read_h ) 11ecc6: 8b 4b 3c mov 0x3c(%ebx),%ecx 11ecc9: 8b 49 08 mov 0x8(%ecx),%ecx 11eccc: 85 c9 test %ecx,%ecx 11ecce: 74 4e je 11ed1e <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); rc = (*iop->handlers->read_h)( iop, buffer, count ); 11ecd0: 83 ec 04 sub $0x4,%esp 11ecd3: 52 push %edx 11ecd4: 50 push %eax 11ecd5: 53 push %ebx 11ecd6: ff d1 call *%ecx if ( rc > 0 ) 11ecd8: 83 c4 10 add $0x10,%esp 11ecdb: 85 c0 test %eax,%eax 11ecdd: 7e 0b jle 11ecea iop->offset += rc; 11ecdf: 89 c1 mov %eax,%ecx 11ece1: c1 f9 1f sar $0x1f,%ecx 11ece4: 01 43 0c add %eax,0xc(%ebx) 11ece7: 11 4b 10 adc %ecx,0x10(%ebx) return rc; } 11ecea: 8b 5d fc mov -0x4(%ebp),%ebx 11eced: c9 leave 11ecee: c3 ret 11ecef: 90 nop <== NOT EXECUTED rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open( iop ); rtems_libio_check_buffer( buffer ); rtems_libio_check_count( count ); 11ecf0: 31 c0 xor %eax,%eax <== NOT EXECUTED if ( rc > 0 ) iop->offset += rc; return rc; } 11ecf2: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 11ecf5: c9 leave <== NOT EXECUTED 11ecf6: c3 ret <== NOT EXECUTED 11ecf7: 90 nop <== NOT EXECUTED ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open( iop ); 11ecf8: e8 13 4b ff ff call 113810 <__errno> 11ecfd: c7 00 09 00 00 00 movl $0x9,(%eax) 11ed03: b8 ff ff ff ff mov $0xffffffff,%eax 11ed08: eb e0 jmp 11ecea <== ALWAYS TAKEN 11ed0a: 66 90 xchg %ax,%ax <== NOT EXECUTED rtems_libio_check_buffer( buffer ); rtems_libio_check_count( count ); rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); 11ed0c: e8 ff 4a ff ff call 113810 <__errno> <== NOT EXECUTED 11ed11: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 11ed17: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 11ed1c: eb cc jmp 11ecea <== NOT EXECUTED /* * Now process the read(). */ if ( !iop->handlers->read_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 11ed1e: e8 ed 4a ff ff call 113810 <__errno> <== NOT EXECUTED 11ed23: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 11ed29: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 11ed2e: eb ba jmp 11ecea <== NOT EXECUTED 0012c92c : ssize_t readlink( const char *pathname, char *buf, size_t bufsize ) { 12c92c: 55 push %ebp 12c92d: 89 e5 mov %esp,%ebp 12c92f: 57 push %edi 12c930: 56 push %esi 12c931: 53 push %ebx 12c932: 83 ec 2c sub $0x2c,%esp 12c935: 8b 55 08 mov 0x8(%ebp),%edx 12c938: 8b 5d 0c mov 0xc(%ebp),%ebx rtems_filesystem_location_info_t loc; int result; if (!buf) 12c93b: 85 db test %ebx,%ebx 12c93d: 0f 84 ad 00 00 00 je 12c9f0 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EFAULT ); result = rtems_filesystem_evaluate_path( pathname, strlen( pathname ), 12c943: 31 c0 xor %eax,%eax 12c945: b9 ff ff ff ff mov $0xffffffff,%ecx 12c94a: 89 d7 mov %edx,%edi 12c94c: f2 ae repnz scas %es:(%edi),%al 12c94e: f7 d1 not %ecx 12c950: 49 dec %ecx 12c951: 83 ec 0c sub $0xc,%esp 12c954: 6a 00 push $0x0 12c956: 8d 75 d4 lea -0x2c(%ebp),%esi 12c959: 56 push %esi 12c95a: 6a 00 push $0x0 12c95c: 51 push %ecx 12c95d: 52 push %edx 12c95e: e8 dd 04 fe ff call 10ce40 0, &loc, false ); if ( result != 0 ) 12c963: 83 c4 20 add $0x20,%esp 12c966: 85 c0 test %eax,%eax 12c968: 75 76 jne 12c9e0 <== ALWAYS TAKEN return -1; if ( !loc.ops->node_type_h ){ 12c96a: 8b 55 e0 mov -0x20(%ebp),%edx 12c96d: 8b 42 10 mov 0x10(%edx),%eax 12c970: 85 c0 test %eax,%eax 12c972: 74 4e je 12c9c2 <== ALWAYS TAKEN rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_SYM_LINK ){ 12c974: 83 ec 0c sub $0xc,%esp 12c977: 56 push %esi 12c978: ff d0 call *%eax 12c97a: 83 c4 10 add $0x10,%esp 12c97d: 83 f8 04 cmp $0x4,%eax 12c980: 0f 85 86 00 00 00 jne 12ca0c rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( EINVAL ); } if ( !loc.ops->readlink_h ){ 12c986: 8b 55 e0 mov -0x20(%ebp),%edx 12c989: 8b 42 3c mov 0x3c(%edx),%eax 12c98c: 85 c0 test %eax,%eax 12c98e: 0f 84 a1 00 00 00 je 12ca35 <== ALWAYS TAKEN rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.ops->readlink_h)( &loc, buf, bufsize ); 12c994: 52 push %edx 12c995: ff 75 10 pushl 0x10(%ebp) 12c998: 53 push %ebx 12c999: 56 push %esi 12c99a: ff d0 call *%eax 12c99c: 89 c3 mov %eax,%ebx rtems_filesystem_freenode( &loc ); 12c99e: 8b 45 e0 mov -0x20(%ebp),%eax 12c9a1: 83 c4 10 add $0x10,%esp 12c9a4: 85 c0 test %eax,%eax 12c9a6: 74 10 je 12c9b8 <== ALWAYS TAKEN 12c9a8: 8b 40 1c mov 0x1c(%eax),%eax 12c9ab: 85 c0 test %eax,%eax 12c9ad: 74 09 je 12c9b8 <== ALWAYS TAKEN 12c9af: 83 ec 0c sub $0xc,%esp 12c9b2: 56 push %esi 12c9b3: ff d0 call *%eax 12c9b5: 83 c4 10 add $0x10,%esp return result; } 12c9b8: 89 d8 mov %ebx,%eax 12c9ba: 8d 65 f4 lea -0xc(%ebp),%esp 12c9bd: 5b pop %ebx 12c9be: 5e pop %esi 12c9bf: 5f pop %edi 12c9c0: c9 leave 12c9c1: c3 ret 0, &loc, false ); if ( result != 0 ) return -1; if ( !loc.ops->node_type_h ){ rtems_filesystem_freenode( &loc ); 12c9c2: 8b 42 1c mov 0x1c(%edx),%eax <== NOT EXECUTED 12c9c5: 85 c0 test %eax,%eax <== NOT EXECUTED 12c9c7: 74 09 je 12c9d2 <== NOT EXECUTED 12c9c9: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12c9cc: 56 push %esi <== NOT EXECUTED 12c9cd: ff d0 call *%eax <== NOT EXECUTED 12c9cf: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 12c9d2: e8 39 5b 01 00 call 142510 <__errno> <== NOT EXECUTED 12c9d7: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 12c9dd: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 12c9e0: bb ff ff ff ff mov $0xffffffff,%ebx <== NOT EXECUTED result = (*loc.ops->readlink_h)( &loc, buf, bufsize ); rtems_filesystem_freenode( &loc ); return result; } 12c9e5: 89 d8 mov %ebx,%eax <== NOT EXECUTED 12c9e7: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 12c9ea: 5b pop %ebx <== NOT EXECUTED 12c9eb: 5e pop %esi <== NOT EXECUTED 12c9ec: 5f pop %edi <== NOT EXECUTED 12c9ed: c9 leave <== NOT EXECUTED 12c9ee: c3 ret <== NOT EXECUTED 12c9ef: 90 nop <== NOT EXECUTED { rtems_filesystem_location_info_t loc; int result; if (!buf) rtems_set_errno_and_return_minus_one( EFAULT ); 12c9f0: e8 1b 5b 01 00 call 142510 <__errno> <== NOT EXECUTED 12c9f5: c7 00 0e 00 00 00 movl $0xe,(%eax) <== NOT EXECUTED 12c9fb: bb ff ff ff ff mov $0xffffffff,%ebx <== NOT EXECUTED result = (*loc.ops->readlink_h)( &loc, buf, bufsize ); rtems_filesystem_freenode( &loc ); return result; } 12ca00: 89 d8 mov %ebx,%eax <== NOT EXECUTED 12ca02: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 12ca05: 5b pop %ebx <== NOT EXECUTED 12ca06: 5e pop %esi <== NOT EXECUTED 12ca07: 5f pop %edi <== NOT EXECUTED 12ca08: c9 leave <== NOT EXECUTED 12ca09: c3 ret <== NOT EXECUTED 12ca0a: 66 90 xchg %ax,%ax <== NOT EXECUTED rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_SYM_LINK ){ rtems_filesystem_freenode( &loc ); 12ca0c: 8b 45 e0 mov -0x20(%ebp),%eax 12ca0f: 85 c0 test %eax,%eax 12ca11: 74 10 je 12ca23 <== ALWAYS TAKEN 12ca13: 8b 40 1c mov 0x1c(%eax),%eax 12ca16: 85 c0 test %eax,%eax 12ca18: 74 09 je 12ca23 <== ALWAYS TAKEN 12ca1a: 83 ec 0c sub $0xc,%esp 12ca1d: 56 push %esi 12ca1e: ff d0 call *%eax 12ca20: 83 c4 10 add $0x10,%esp rtems_set_errno_and_return_minus_one( EINVAL ); 12ca23: e8 e8 5a 01 00 call 142510 <__errno> 12ca28: c7 00 16 00 00 00 movl $0x16,(%eax) 12ca2e: bb ff ff ff ff mov $0xffffffff,%ebx 12ca33: eb 83 jmp 12c9b8 <== ALWAYS TAKEN } if ( !loc.ops->readlink_h ){ rtems_filesystem_freenode( &loc ); 12ca35: 8b 42 1c mov 0x1c(%edx),%eax <== NOT EXECUTED 12ca38: 85 c0 test %eax,%eax <== NOT EXECUTED 12ca3a: 74 09 je 12ca45 <== NOT EXECUTED 12ca3c: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12ca3f: 56 push %esi <== NOT EXECUTED 12ca40: ff d0 call *%eax <== NOT EXECUTED 12ca42: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 12ca45: e8 c6 5a 01 00 call 142510 <__errno> <== NOT EXECUTED 12ca4a: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 12ca50: bb ff ff ff ff mov $0xffffffff,%ebx <== NOT EXECUTED 12ca55: e9 5e ff ff ff jmp 12c9b8 <== NOT EXECUTED 00109d9c : ssize_t readv( int fd, const struct iovec *iov, int iovcnt ) { 109d9c: 55 push %ebp 109d9d: 89 e5 mov %esp,%ebp 109d9f: 57 push %edi 109da0: 56 push %esi 109da1: 53 push %ebx 109da2: 83 ec 1c sub $0x1c,%esp 109da5: 8b 7d 08 mov 0x8(%ebp),%edi 109da8: 8b 5d 0c mov 0xc(%ebp),%ebx int v; int bytes; rtems_libio_t *iop; bool all_zeros; rtems_libio_check_fd( fd ); 109dab: 3b 3d 4c 61 12 00 cmp 0x12614c,%edi 109db1: 0f 83 e2 00 00 00 jae 109e99 <== ALWAYS TAKEN iop = rtems_libio_iop( fd ); 109db7: c1 e7 06 shl $0x6,%edi 109dba: 03 3d 40 aa 12 00 add 0x12aa40,%edi rtems_libio_check_is_open( iop ); 109dc0: 8b 47 14 mov 0x14(%edi),%eax 109dc3: f6 c4 01 test $0x1,%ah 109dc6: 0f 84 cd 00 00 00 je 109e99 <== ALWAYS TAKEN rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); 109dcc: a8 02 test $0x2,%al 109dce: 0f 84 a8 00 00 00 je 109e7c <== ALWAYS TAKEN /* * Argument validation on IO vector */ if ( !iov ) 109dd4: 85 db test %ebx,%ebx 109dd6: 0f 84 a0 00 00 00 je 109e7c rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt <= 0 ) 109ddc: 8b 75 10 mov 0x10(%ebp),%esi 109ddf: 85 f6 test %esi,%esi 109de1: 0f 8e 95 00 00 00 jle 109e7c rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt > IOV_MAX ) 109de7: 81 7d 10 00 04 00 00 cmpl $0x400,0x10(%ebp) 109dee: 0f 8f 88 00 00 00 jg 109e7c <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); if ( !iop->handlers->read_h ) 109df4: 8b 47 3c mov 0x3c(%edi),%eax 109df7: 8b 40 08 mov 0x8(%eax),%eax 109dfa: 89 45 e0 mov %eax,-0x20(%ebp) 109dfd: 85 c0 test %eax,%eax 109dff: 0f 84 a8 00 00 00 je 109ead <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); 109e05: 31 c0 xor %eax,%eax 109e07: 31 d2 xor %edx,%edx 109e09: 8b 75 10 mov 0x10(%ebp),%esi 109e0c: eb 04 jmp 109e12 <== ALWAYS TAKEN 109e0e: 66 90 xchg %ax,%ax <== NOT EXECUTED * 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++ ) { 109e10: 89 ca mov %ecx,%edx ssize_t old; if ( !iov[v].iov_base ) 109e12: 8b 0c c3 mov (%ebx,%eax,8),%ecx 109e15: 85 c9 test %ecx,%ecx 109e17: 74 63 je 109e7c rtems_set_errno_and_return_minus_one( EINVAL ); if ( iov[v].iov_len <= 0 ) 109e19: 8b 4c c3 04 mov 0x4(%ebx,%eax,8),%ecx 109e1d: 85 c9 test %ecx,%ecx 109e1f: 74 5b je 109e7c <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); /* check for wrap */ old = total; total += iov[v].iov_len; 109e21: 8d 0c 0a lea (%edx,%ecx,1),%ecx if ( total < old ) 109e24: 39 ca cmp %ecx,%edx 109e26: 7f 54 jg 109e7c * 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++ ) { 109e28: 40 inc %eax 109e29: 39 c6 cmp %eax,%esi 109e2b: 7f e3 jg 109e10 109e2d: 31 f6 xor %esi,%esi 109e2f: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) 109e36: 8b 45 e0 mov -0x20(%ebp),%eax 109e39: eb 23 jmp 109e5e <== ALWAYS TAKEN 109e3b: 90 nop <== NOT EXECUTED bytes = (*iop->handlers->read_h)( iop, iov[v].iov_base, iov[v].iov_len ); if ( bytes < 0 ) return -1; if ( bytes > 0 ) { 109e3c: 74 0e je 109e4c <== NEVER TAKEN iop->offset += bytes; 109e3e: 89 c1 mov %eax,%ecx <== NOT EXECUTED 109e40: c1 f9 1f sar $0x1f,%ecx <== NOT EXECUTED 109e43: 01 47 0c add %eax,0xc(%edi) <== NOT EXECUTED 109e46: 11 4f 10 adc %ecx,0x10(%edi) <== NOT EXECUTED total += bytes; 109e49: 01 45 e4 add %eax,-0x1c(%ebp) <== NOT EXECUTED } if (bytes != iov[ v ].iov_len) 109e4c: 3b 44 f3 04 cmp 0x4(%ebx,%esi,8),%eax 109e50: 75 3c jne 109e8e <== NEVER TAKEN } /* * Now process the readv(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { 109e52: 46 inc %esi <== NOT EXECUTED 109e53: 39 75 10 cmp %esi,0x10(%ebp) <== NOT EXECUTED 109e56: 7e 36 jle 109e8e <== NOT EXECUTED 109e58: 8b 47 3c mov 0x3c(%edi),%eax <== NOT EXECUTED 109e5b: 8b 40 08 mov 0x8(%eax),%eax <== NOT EXECUTED bytes = (*iop->handlers->read_h)( iop, iov[v].iov_base, iov[v].iov_len ); 109e5e: 52 push %edx 109e5f: ff 74 f3 04 pushl 0x4(%ebx,%esi,8) 109e63: ff 34 f3 pushl (%ebx,%esi,8) 109e66: 57 push %edi 109e67: ff d0 call *%eax if ( bytes < 0 ) 109e69: 83 c4 10 add $0x10,%esp 109e6c: 83 f8 00 cmp $0x0,%eax 109e6f: 7d cb jge 109e3c <== NEVER TAKEN } /* * Now process the readv(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { 109e71: c7 45 e4 ff ff ff ff movl $0xffffffff,-0x1c(%ebp) <== NOT EXECUTED 109e78: eb 14 jmp 109e8e <== NOT EXECUTED 109e7a: 66 90 xchg %ax,%ax <== NOT EXECUTED /* check for wrap */ old = total; total += iov[v].iov_len; if ( total < old ) rtems_set_errno_and_return_minus_one( EINVAL ); 109e7c: e8 27 bc 00 00 call 115aa8 <__errno> 109e81: c7 00 16 00 00 00 movl $0x16,(%eax) 109e87: c7 45 e4 ff ff ff ff movl $0xffffffff,-0x1c(%ebp) if (bytes != iov[ v ].iov_len) break; } return total; } 109e8e: 8b 45 e4 mov -0x1c(%ebp),%eax 109e91: 8d 65 f4 lea -0xc(%ebp),%esp 109e94: 5b pop %ebx 109e95: 5e pop %esi 109e96: 5f pop %edi 109e97: c9 leave 109e98: c3 ret rtems_libio_t *iop; bool all_zeros; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open( iop ); 109e99: e8 0a bc 00 00 call 115aa8 <__errno> <== NOT EXECUTED 109e9e: c7 00 09 00 00 00 movl $0x9,(%eax) <== NOT EXECUTED 109ea4: c7 45 e4 ff ff ff ff movl $0xffffffff,-0x1c(%ebp) <== NOT EXECUTED 109eab: eb e1 jmp 109e8e <== NOT EXECUTED if ( iovcnt > IOV_MAX ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( !iop->handlers->read_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 109ead: e8 f6 bb 00 00 call 115aa8 <__errno> <== NOT EXECUTED 109eb2: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 109eb8: c7 45 e4 ff ff ff ff movl $0xffffffff,-0x1c(%ebp) <== NOT EXECUTED 109ebf: eb cd jmp 109e8e <== NOT EXECUTED 0011edb0 : { uintptr_t old_size; char *new_area; uintptr_t resize; MSBUMP(realloc_calls, 1); 11edb0: 55 push %ebp 11edb1: 89 e5 mov %esp,%ebp 11edb3: 57 push %edi 11edb4: 56 push %esi 11edb5: 53 push %ebx 11edb6: 83 ec 2c sub $0x2c,%esp 11edb9: 8b 5d 08 mov 0x8(%ebp),%ebx 11edbc: 8b 75 0c mov 0xc(%ebp),%esi 11edbf: ff 05 70 72 12 00 incl 0x127270 /* * Do not attempt to allocate memory if in a critical section or ISR. */ if (_System_state_Is_up(_System_state_Get())) { 11edc5: 83 3d a0 75 12 00 03 cmpl $0x3,0x1275a0 11edcc: 74 72 je 11ee40 <== NEVER TAKEN } /* * Continue with realloc(). */ if ( !ptr ) 11edce: 85 db test %ebx,%ebx 11edd0: 74 5e je 11ee30 return malloc( size ); if ( !size ) { 11edd2: 85 f6 test %esi,%esi 11edd4: 74 3a je 11ee10 <== ALWAYS TAKEN free( ptr ); return (void *) 0; } if ( !_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, ptr, &old_size) ) { 11edd6: 52 push %edx 11edd7: 8d 45 e4 lea -0x1c(%ebp),%eax 11edda: 50 push %eax 11eddb: 53 push %ebx 11eddc: ff 35 58 31 12 00 pushl 0x123158 11ede2: e8 59 01 00 00 call 11ef40 <_Protected_heap_Get_block_size> 11ede7: 83 c4 10 add $0x10,%esp 11edea: 84 c0 test %al,%al 11edec: 74 32 je 11ee20 #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 ) ) { 11edee: 50 push %eax 11edef: 56 push %esi 11edf0: 53 push %ebx 11edf1: ff 35 58 31 12 00 pushl 0x123158 11edf7: e8 7c 01 00 00 call 11ef78 <_Protected_heap_Resize_block> 11edfc: 83 c4 10 add $0x10,%esp 11edff: 84 c0 test %al,%al 11ee01: 74 5d je 11ee60 memcpy( new_area, ptr, (size < old_size) ? size : old_size ); free( ptr ); return new_area; } 11ee03: 89 d8 mov %ebx,%eax 11ee05: 8d 65 f4 lea -0xc(%ebp),%esp 11ee08: 5b pop %ebx 11ee09: 5e pop %esi 11ee0a: 5f pop %edi 11ee0b: c9 leave 11ee0c: c3 ret 11ee0d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED */ if ( !ptr ) return malloc( size ); if ( !size ) { free( ptr ); 11ee10: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 11ee13: 53 push %ebx <== NOT EXECUTED 11ee14: e8 c3 91 fe ff call 107fdc <== NOT EXECUTED 11ee19: 31 db xor %ebx,%ebx <== NOT EXECUTED return (void *) 0; 11ee1b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 11ee1e: eb e3 jmp 11ee03 <== NOT EXECUTED } if ( !_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, ptr, &old_size) ) { errno = EINVAL; 11ee20: e8 eb 49 ff ff call 113810 <__errno> 11ee25: c7 00 16 00 00 00 movl $0x16,(%eax) 11ee2b: 31 db xor %ebx,%ebx return (void *) 0; 11ee2d: eb d4 jmp 11ee03 <== ALWAYS TAKEN 11ee2f: 90 nop <== NOT EXECUTED /* * Continue with realloc(). */ if ( !ptr ) return malloc( size ); 11ee30: 83 ec 0c sub $0xc,%esp 11ee33: 56 push %esi 11ee34: e8 f3 93 fe ff call 10822c <== ALWAYS TAKEN 11ee39: 89 c3 mov %eax,%ebx 11ee3b: 83 c4 10 add $0x10,%esp 11ee3e: eb c3 jmp 11ee03 <== ALWAYS TAKEN /* * Do not attempt to allocate memory if in a critical section or ISR. */ if (_System_state_Is_up(_System_state_Get())) { if (_Thread_Dispatch_disable_level > 0) 11ee40: a1 d8 73 12 00 mov 0x1273d8,%eax 11ee45: 85 c0 test %eax,%eax 11ee47: 74 04 je 11ee4d <== NEVER TAKEN } memcpy( new_area, ptr, (size < old_size) ? size : old_size ); free( ptr ); return new_area; 11ee49: 31 db xor %ebx,%ebx 11ee4b: eb b6 jmp 11ee03 <== ALWAYS TAKEN if (_System_state_Is_up(_System_state_Get())) { if (_Thread_Dispatch_disable_level > 0) return (void *) 0; if (_ISR_Nest_level > 0) 11ee4d: a1 74 74 12 00 mov 0x127474,%eax 11ee52: 85 c0 test %eax,%eax 11ee54: 0f 84 74 ff ff ff je 11edce <== NEVER TAKEN } memcpy( new_area, ptr, (size < old_size) ? size : old_size ); free( ptr ); return new_area; 11ee5a: 31 db xor %ebx,%ebx <== NOT EXECUTED 11ee5c: eb a5 jmp 11ee03 <== NOT EXECUTED 11ee5e: 66 90 xchg %ax,%ax <== NOT EXECUTED * There used to be a free on this error case but it is wrong to * free the memory per OpenGroup Single UNIX Specification V2 * and the C Standard. */ new_area = malloc( size ); 11ee60: 83 ec 0c sub $0xc,%esp 11ee63: 56 push %esi 11ee64: e8 c3 93 fe ff call 10822c MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */ 11ee69: ff 0d 64 72 12 00 decl 0x127264 if ( !new_area ) { 11ee6f: 83 c4 10 add $0x10,%esp 11ee72: 85 c0 test %eax,%eax 11ee74: 74 d3 je 11ee49 return (void *) 0; } memcpy( new_area, ptr, (size < old_size) ? size : old_size ); 11ee76: 8b 55 e4 mov -0x1c(%ebp),%edx 11ee79: 89 f1 mov %esi,%ecx 11ee7b: 39 d6 cmp %edx,%esi 11ee7d: 76 02 jbe 11ee81 <== ALWAYS TAKEN 11ee7f: 89 d1 mov %edx,%ecx 11ee81: 89 c7 mov %eax,%edi 11ee83: 89 de mov %ebx,%esi 11ee85: f3 a4 rep movsb %ds:(%esi),%es:(%edi) free( ptr ); 11ee87: 83 ec 0c sub $0xc,%esp 11ee8a: 53 push %ebx 11ee8b: 89 45 d4 mov %eax,-0x2c(%ebp) 11ee8e: e8 49 91 fe ff call 107fdc 11ee93: 8b 45 d4 mov -0x2c(%ebp),%eax 11ee96: 89 c3 mov %eax,%ebx return new_area; 11ee98: 83 c4 10 add $0x10,%esp 11ee9b: e9 63 ff ff ff jmp 11ee03 <== ALWAYS TAKEN 0010e190 : #include int rmdir( const char *pathname ) { 10e190: 55 push %ebp 10e191: 89 e5 mov %esp,%ebp 10e193: 57 push %edi 10e194: 56 push %esi 10e195: 53 push %ebx 10e196: 83 ec 58 sub $0x58,%esp 10e199: 8b 55 08 mov 0x8(%ebp),%edx /* * Get the parent node of the node we wish to remove. Find the parent path. */ parentpathlen = rtems_filesystem_dirname ( pathname ); 10e19c: 52 push %edx 10e19d: 89 55 ac mov %edx,-0x54(%ebp) 10e1a0: e8 77 eb ff ff call 10cd1c 10e1a5: 89 c3 mov %eax,%ebx if ( parentpathlen == 0 ) 10e1a7: 83 c4 10 add $0x10,%esp 10e1aa: 85 c0 test %eax,%eax 10e1ac: 8b 55 ac mov -0x54(%ebp),%edx 10e1af: 0f 85 7f 01 00 00 jne 10e334 rtems_filesystem_get_start_loc( pathname, &i, &parentloc ); 10e1b5: 8a 02 mov (%edx),%al 10e1b7: 3c 2f cmp $0x2f,%al 10e1b9: 74 0c je 10e1c7 <== NEVER TAKEN 10e1bb: 3c 5c cmp $0x5c,%al <== NOT EXECUTED 10e1bd: 74 08 je 10e1c7 <== NOT EXECUTED 10e1bf: 84 c0 test %al,%al <== NOT EXECUTED 10e1c1: 0f 85 ed 00 00 00 jne 10e2b4 <== NOT EXECUTED 10e1c7: 8d 45 d4 lea -0x2c(%ebp),%eax 10e1ca: 89 45 b4 mov %eax,-0x4c(%ebp) 10e1cd: 8b 35 c4 93 16 00 mov 0x1693c4,%esi 10e1d3: 83 c6 18 add $0x18,%esi 10e1d6: b9 05 00 00 00 mov $0x5,%ecx 10e1db: 89 c7 mov %eax,%edi 10e1dd: f3 a5 rep movsl %ds:(%esi),%es:(%edi) 10e1df: c6 45 b3 00 movb $0x0,-0x4d(%ebp) /* * Start from the parent to find the node that should be under it. */ loc = parentloc; 10e1e3: 8d 7d c0 lea -0x40(%ebp),%edi 10e1e6: b9 05 00 00 00 mov $0x5,%ecx 10e1eb: 8b 75 b4 mov -0x4c(%ebp),%esi 10e1ee: f3 a5 rep movsl %ds:(%esi),%es:(%edi) name = pathname + parentpathlen; 10e1f0: 8d 1c 1a lea (%edx,%ebx,1),%ebx name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 10e1f3: be ff ff ff ff mov $0xffffffff,%esi 10e1f8: 89 f1 mov %esi,%ecx 10e1fa: 89 df mov %ebx,%edi 10e1fc: 31 c0 xor %eax,%eax 10e1fe: f2 ae repnz scas %es:(%edi),%al 10e200: f7 d1 not %ecx 10e202: 49 dec %ecx 10e203: 83 ec 08 sub $0x8,%esp 10e206: 51 push %ecx 10e207: 53 push %ebx 10e208: e8 d3 ea ff ff call 10cce0 10e20d: 01 c3 add %eax,%ebx result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 10e20f: 89 f1 mov %esi,%ecx 10e211: 89 df mov %ebx,%edi 10e213: 31 c0 xor %eax,%eax 10e215: f2 ae repnz scas %es:(%edi),%al 10e217: f7 d1 not %ecx 10e219: 49 dec %ecx 10e21a: c7 04 24 00 00 00 00 movl $0x0,(%esp) 10e221: 8d 75 c0 lea -0x40(%ebp),%esi 10e224: 56 push %esi 10e225: 6a 00 push $0x0 10e227: 51 push %ecx 10e228: 53 push %ebx 10e229: e8 3e eb ff ff call 10cd6c 0, &loc, false ); if ( result != 0 ) { 10e22e: 83 c4 20 add $0x20,%esp 10e231: 85 c0 test %eax,%eax 10e233: 0f 85 e7 00 00 00 jne 10e320 /* * Verify you can remove this node as a directory. */ if ( !loc.ops->node_type_h ){ 10e239: 8b 55 cc mov -0x34(%ebp),%edx 10e23c: 8b 42 10 mov 0x10(%edx),%eax 10e23f: 85 c0 test %eax,%eax 10e241: 0f 84 65 01 00 00 je 10e3ac <== ALWAYS TAKEN 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 ){ 10e247: 83 ec 0c sub $0xc,%esp 10e24a: 56 push %esi 10e24b: ff d0 call *%eax 10e24d: 83 c4 10 add $0x10,%esp 10e250: 48 dec %eax 10e251: 0f 85 81 00 00 00 jne 10e2d8 /* * Use the filesystems rmnod to remove the node. */ if ( !loc.handlers->rmnod_h ){ 10e257: 8b 45 c8 mov -0x38(%ebp),%eax 10e25a: 8b 40 34 mov 0x34(%eax),%eax 10e25d: 85 c0 test %eax,%eax 10e25f: 0f 84 fb 00 00 00 je 10e360 <== ALWAYS TAKEN if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.handlers->rmnod_h)( &parentloc, &loc ); 10e265: 83 ec 08 sub $0x8,%esp 10e268: 56 push %esi 10e269: ff 75 b4 pushl -0x4c(%ebp) 10e26c: ff d0 call *%eax 10e26e: 89 c3 mov %eax,%ebx rtems_filesystem_freenode( &loc ); 10e270: 8b 45 cc mov -0x34(%ebp),%eax 10e273: 83 c4 10 add $0x10,%esp 10e276: 85 c0 test %eax,%eax 10e278: 74 10 je 10e28a <== ALWAYS TAKEN 10e27a: 8b 40 1c mov 0x1c(%eax),%eax 10e27d: 85 c0 test %eax,%eax 10e27f: 74 09 je 10e28a <== ALWAYS TAKEN 10e281: 83 ec 0c sub $0xc,%esp 10e284: 56 push %esi 10e285: ff d0 call *%eax 10e287: 83 c4 10 add $0x10,%esp if ( free_parentloc ) 10e28a: 80 7d b3 00 cmpb $0x0,-0x4d(%ebp) 10e28e: 74 19 je 10e2a9 rtems_filesystem_freenode( &parentloc ); 10e290: 8b 45 e0 mov -0x20(%ebp),%eax 10e293: 85 c0 test %eax,%eax 10e295: 74 12 je 10e2a9 <== ALWAYS TAKEN 10e297: 8b 40 1c mov 0x1c(%eax),%eax 10e29a: 85 c0 test %eax,%eax 10e29c: 74 0b je 10e2a9 <== ALWAYS TAKEN 10e29e: 83 ec 0c sub $0xc,%esp 10e2a1: ff 75 b4 pushl -0x4c(%ebp) 10e2a4: ff d0 call *%eax 10e2a6: 83 c4 10 add $0x10,%esp return result; } 10e2a9: 89 d8 mov %ebx,%eax 10e2ab: 8d 65 f4 lea -0xc(%ebp),%esp 10e2ae: 5b pop %ebx 10e2af: 5e pop %esi 10e2b0: 5f pop %edi 10e2b1: c9 leave 10e2b2: c3 ret 10e2b3: 90 nop <== NOT EXECUTED */ parentpathlen = rtems_filesystem_dirname ( pathname ); if ( parentpathlen == 0 ) rtems_filesystem_get_start_loc( pathname, &i, &parentloc ); 10e2b4: 8d 45 d4 lea -0x2c(%ebp),%eax <== NOT EXECUTED 10e2b7: 89 45 b4 mov %eax,-0x4c(%ebp) <== NOT EXECUTED 10e2ba: 8b 35 c4 93 16 00 mov 0x1693c4,%esi <== NOT EXECUTED 10e2c0: 83 c6 04 add $0x4,%esi <== NOT EXECUTED 10e2c3: b9 05 00 00 00 mov $0x5,%ecx <== NOT EXECUTED 10e2c8: 89 c7 mov %eax,%edi <== NOT EXECUTED 10e2ca: f3 a5 rep movsl %ds:(%esi),%es:(%edi) <== NOT EXECUTED 10e2cc: c6 45 b3 00 movb $0x0,-0x4d(%ebp) <== NOT EXECUTED 10e2d0: e9 0e ff ff ff jmp 10e1e3 <== NOT EXECUTED 10e2d5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED rtems_filesystem_freenode( &parentloc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ){ rtems_filesystem_freenode( &loc ); 10e2d8: 8b 45 cc mov -0x34(%ebp),%eax 10e2db: 85 c0 test %eax,%eax 10e2dd: 74 10 je 10e2ef <== ALWAYS TAKEN 10e2df: 8b 40 1c mov 0x1c(%eax),%eax 10e2e2: 85 c0 test %eax,%eax 10e2e4: 74 09 je 10e2ef <== ALWAYS TAKEN 10e2e6: 83 ec 0c sub $0xc,%esp 10e2e9: 56 push %esi 10e2ea: ff d0 call *%eax 10e2ec: 83 c4 10 add $0x10,%esp if ( free_parentloc ) 10e2ef: 80 7d b3 00 cmpb $0x0,-0x4d(%ebp) 10e2f3: 74 19 je 10e30e <== ALWAYS TAKEN rtems_filesystem_freenode( &parentloc ); 10e2f5: 8b 45 e0 mov -0x20(%ebp),%eax 10e2f8: 85 c0 test %eax,%eax 10e2fa: 74 12 je 10e30e <== ALWAYS TAKEN 10e2fc: 8b 40 1c mov 0x1c(%eax),%eax 10e2ff: 85 c0 test %eax,%eax 10e301: 74 0b je 10e30e <== ALWAYS TAKEN 10e303: 83 ec 0c sub $0xc,%esp 10e306: ff 75 b4 pushl -0x4c(%ebp) 10e309: ff d0 call *%eax 10e30b: 83 c4 10 add $0x10,%esp rtems_set_errno_and_return_minus_one( ENOTDIR ); 10e30e: e8 fd 41 03 00 call 142510 <__errno> 10e313: c7 00 14 00 00 00 movl $0x14,(%eax) 10e319: bb ff ff ff ff mov $0xffffffff,%ebx 10e31e: eb 89 jmp 10e2a9 <== ALWAYS TAKEN name += rtems_filesystem_prefix_separators( name, strlen( name ) ); result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 0, &loc, false ); if ( result != 0 ) { if ( free_parentloc ) 10e320: 80 7d b3 00 cmpb $0x0,-0x4d(%ebp) 10e324: 0f 85 8b 00 00 00 jne 10e3b5 <== ALWAYS TAKEN result = (*loc.handlers->rmnod_h)( &parentloc, &loc ); rtems_filesystem_freenode( &loc ); if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); 10e32a: bb ff ff ff ff mov $0xffffffff,%ebx 10e32f: e9 75 ff ff ff jmp 10e2a9 <== ALWAYS TAKEN parentpathlen = rtems_filesystem_dirname ( pathname ); if ( parentpathlen == 0 ) rtems_filesystem_get_start_loc( pathname, &i, &parentloc ); else { result = rtems_filesystem_evaluate_path(pathname, parentpathlen, 10e334: 83 ec 0c sub $0xc,%esp 10e337: 6a 00 push $0x0 10e339: 8d 45 d4 lea -0x2c(%ebp),%eax 10e33c: 89 45 b4 mov %eax,-0x4c(%ebp) 10e33f: 50 push %eax 10e340: 6a 02 push $0x2 10e342: 53 push %ebx 10e343: 52 push %edx 10e344: 89 55 ac mov %edx,-0x54(%ebp) 10e347: e8 f4 ea ff ff call 10ce40 RTEMS_LIBIO_PERMS_WRITE, &parentloc, false ); if ( result != 0 ) 10e34c: 83 c4 20 add $0x20,%esp 10e34f: 85 c0 test %eax,%eax 10e351: 8b 55 ac mov -0x54(%ebp),%edx 10e354: 75 d4 jne 10e32a <== ALWAYS TAKEN 10e356: c6 45 b3 01 movb $0x1,-0x4d(%ebp) 10e35a: e9 84 fe ff ff jmp 10e1e3 <== ALWAYS TAKEN 10e35f: 90 nop <== NOT EXECUTED /* * Use the filesystems rmnod to remove the node. */ if ( !loc.handlers->rmnod_h ){ rtems_filesystem_freenode( &loc ); 10e360: 8b 45 cc mov -0x34(%ebp),%eax <== NOT EXECUTED 10e363: 85 c0 test %eax,%eax <== NOT EXECUTED 10e365: 74 10 je 10e377 <== NOT EXECUTED 10e367: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 10e36a: 85 c0 test %eax,%eax <== NOT EXECUTED 10e36c: 74 09 je 10e377 <== NOT EXECUTED 10e36e: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10e371: 56 push %esi <== NOT EXECUTED 10e372: ff d0 call *%eax <== NOT EXECUTED 10e374: 83 c4 10 add $0x10,%esp <== NOT EXECUTED if ( free_parentloc ) 10e377: 80 7d b3 00 cmpb $0x0,-0x4d(%ebp) <== NOT EXECUTED 10e37b: 74 19 je 10e396 <== NOT EXECUTED rtems_filesystem_freenode( &parentloc ); 10e37d: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED 10e380: 85 c0 test %eax,%eax <== NOT EXECUTED 10e382: 74 12 je 10e396 <== NOT EXECUTED 10e384: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 10e387: 85 c0 test %eax,%eax <== NOT EXECUTED 10e389: 74 0b je 10e396 <== NOT EXECUTED 10e38b: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10e38e: ff 75 b4 pushl -0x4c(%ebp) <== NOT EXECUTED 10e391: ff d0 call *%eax <== NOT EXECUTED 10e393: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 10e396: e8 75 41 03 00 call 142510 <__errno> <== NOT EXECUTED 10e39b: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 10e3a1: bb ff ff ff ff mov $0xffffffff,%ebx <== NOT EXECUTED 10e3a6: e9 fe fe ff ff jmp 10e2a9 <== NOT EXECUTED 10e3ab: 90 nop <== NOT EXECUTED /* * Verify you can remove this node as a directory. */ if ( !loc.ops->node_type_h ){ rtems_filesystem_freenode( &loc ); 10e3ac: 8b 42 1c mov 0x1c(%edx),%eax <== NOT EXECUTED 10e3af: 85 c0 test %eax,%eax <== NOT EXECUTED 10e3b1: 75 bb jne 10e36e <== NOT EXECUTED 10e3b3: eb c2 jmp 10e377 <== NOT EXECUTED result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 0, &loc, false ); if ( result != 0 ) { if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); 10e3b5: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED 10e3b8: 85 c0 test %eax,%eax <== NOT EXECUTED 10e3ba: 0f 84 6a ff ff ff je 10e32a <== NOT EXECUTED 10e3c0: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 10e3c3: 85 c0 test %eax,%eax <== NOT EXECUTED 10e3c5: 0f 84 5f ff ff ff je 10e32a <== NOT EXECUTED 10e3cb: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10e3ce: ff 75 b4 pushl -0x4c(%ebp) <== NOT EXECUTED 10e3d1: ff d0 call *%eax <== NOT EXECUTED 10e3d3: 83 cb ff or $0xffffffff,%ebx <== NOT EXECUTED 10e3d6: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10e3d9: e9 cb fe ff ff jmp 10e2a9 <== NOT EXECUTED 001122a8 : uint32_t rtems_assoc_local_by_remote( const rtems_assoc_t *ap, uint32_t remote_value ) { 1122a8: 55 push %ebp 1122a9: 89 e5 mov %esp,%ebp 1122ab: 83 ec 10 sub $0x10,%esp const rtems_assoc_t *nap; nap = rtems_assoc_ptr_by_remote(ap, remote_value); 1122ae: ff 75 0c pushl 0xc(%ebp) 1122b1: ff 75 08 pushl 0x8(%ebp) 1122b4: e8 0f 00 00 00 call 1122c8 <== ALWAYS TAKEN if (nap) 1122b9: 83 c4 10 add $0x10,%esp 1122bc: 85 c0 test %eax,%eax 1122be: 74 03 je 1122c3 return nap->local_value; 1122c0: 8b 40 04 mov 0x4(%eax),%eax return 0; } 1122c3: c9 leave 1122c4: c3 ret 00112258 : uint32_t rtems_assoc_local_by_remote_bitfield( const rtems_assoc_t *ap, uint32_t remote_value ) { 112258: 55 push %ebp 112259: 89 e5 mov %esp,%ebp 11225b: 57 push %edi 11225c: 56 push %esi 11225d: 53 push %ebx 11225e: 83 ec 1c sub $0x1c,%esp 112261: 8b 7d 0c mov 0xc(%ebp),%edi 112264: 31 f6 xor %esi,%esi 112266: bb 01 00 00 00 mov $0x1,%ebx 11226b: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) 112272: eb 08 jmp 11227c <== ALWAYS TAKEN uint32_t b; uint32_t local_value = 0; for (b = 1; b; b <<= 1) { 112274: d1 e3 shl %ebx 112276: 46 inc %esi 112277: 83 fe 20 cmp $0x20,%esi 11227a: 74 1e je 11229a if (b & remote_value) 11227c: 85 fb test %edi,%ebx 11227e: 74 f4 je 112274 local_value |= rtems_assoc_local_by_remote(ap, b); 112280: 83 ec 08 sub $0x8,%esp 112283: 53 push %ebx 112284: ff 75 08 pushl 0x8(%ebp) 112287: e8 1c 00 00 00 call 1122a8 <== ALWAYS TAKEN 11228c: 09 45 e4 or %eax,-0x1c(%ebp) 11228f: 83 c4 10 add $0x10,%esp ) { uint32_t b; uint32_t local_value = 0; for (b = 1; b; b <<= 1) { 112292: d1 e3 shl %ebx 112294: 46 inc %esi 112295: 83 fe 20 cmp $0x20,%esi 112298: 75 e2 jne 11227c <== NEVER TAKEN if (b & remote_value) local_value |= rtems_assoc_local_by_remote(ap, b); } return local_value; } 11229a: 8b 45 e4 mov -0x1c(%ebp),%eax 11229d: 8d 65 f4 lea -0xc(%ebp),%esp 1122a0: 5b pop %ebx 1122a1: 5e pop %esi 1122a2: 5f pop %edi 1122a3: c9 leave 1122a4: c3 ret 001191a4 : uint32_t bad_value #else uint32_t bad_value __attribute((unused)) #endif ) { 1191a4: 55 push %ebp <== NOT EXECUTED 1191a5: 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; } 1191a7: b8 40 d4 12 00 mov $0x12d440,%eax <== NOT EXECUTED 1191ac: c9 leave <== NOT EXECUTED 1191ad: c3 ret <== NOT EXECUTED 00115c30 : const char *rtems_assoc_name_by_local( const rtems_assoc_t *ap, uint32_t local_value ) { 115c30: 55 push %ebp 115c31: 89 e5 mov %esp,%ebp 115c33: 53 push %ebx 115c34: 83 ec 0c sub $0xc,%esp 115c37: 8b 5d 0c mov 0xc(%ebp),%ebx const rtems_assoc_t *nap; nap = rtems_assoc_ptr_by_local(ap, local_value); 115c3a: 53 push %ebx 115c3b: ff 75 08 pushl 0x8(%ebp) 115c3e: e8 1d 00 00 00 call 115c60 <== ALWAYS TAKEN if (nap) 115c43: 83 c4 10 add $0x10,%esp 115c46: 85 c0 test %eax,%eax 115c48: 74 0a je 115c54 <== ALWAYS TAKEN return nap->name; 115c4a: 8b 00 mov (%eax),%eax return rtems_assoc_name_bad(local_value); } 115c4c: 8b 5d fc mov -0x4(%ebp),%ebx 115c4f: c9 leave 115c50: c3 ret 115c51: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED nap = rtems_assoc_ptr_by_local(ap, local_value); if (nap) return nap->name; return rtems_assoc_name_bad(local_value); 115c54: 89 5d 08 mov %ebx,0x8(%ebp) <== NOT EXECUTED } 115c57: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 115c5a: 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); 115c5b: e9 44 35 00 00 jmp 1191a4 <== NOT EXECUTED 001137a0 : const rtems_assoc_t *rtems_assoc_ptr_by_local( const rtems_assoc_t *ap, uint32_t local_value ) { 1137a0: 55 push %ebp 1137a1: 89 e5 mov %esp,%ebp 1137a3: 57 push %edi 1137a4: 56 push %esi 1137a5: 53 push %ebx 1137a6: 8b 45 08 mov 0x8(%ebp),%eax 1137a9: 8b 55 0c mov 0xc(%ebp),%edx const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) 1137ac: 8b 30 mov (%eax),%esi 1137ae: 85 f6 test %esi,%esi 1137b0: 74 3e je 1137f0 <== ALWAYS TAKEN 1137b2: bf 6d 15 12 00 mov $0x12156d,%edi 1137b7: b9 0a 00 00 00 mov $0xa,%ecx 1137bc: f3 a6 repz cmpsb %es:(%edi),%ds:(%esi) <== NEVER TAKEN 1137be: 74 18 je 1137d8 <== ALWAYS TAKEN 1137c0: 31 c9 xor %ecx,%ecx 1137c2: eb 09 jmp 1137cd <== ALWAYS TAKEN default_ap = ap++; for ( ; ap->name; ap++) 1137c4: 83 c0 0c add $0xc,%eax 1137c7: 8b 18 mov (%eax),%ebx 1137c9: 85 db test %ebx,%ebx 1137cb: 74 1b je 1137e8 if (ap->local_value == local_value) 1137cd: 39 50 04 cmp %edx,0x4(%eax) 1137d0: 75 f2 jne 1137c4 return ap; return default_ap; } 1137d2: 5b pop %ebx 1137d3: 5e pop %esi 1137d4: 5f pop %edi 1137d5: c9 leave 1137d6: c3 ret 1137d7: 90 nop <== NOT EXECUTED ) { const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) default_ap = ap++; 1137d8: 8d 58 0c lea 0xc(%eax),%ebx <== NOT EXECUTED for ( ; ap->name; ap++) 1137db: 8b 70 0c mov 0xc(%eax),%esi <== NOT EXECUTED 1137de: 85 f6 test %esi,%esi <== NOT EXECUTED 1137e0: 74 f0 je 1137d2 <== NOT EXECUTED 1137e2: 89 c1 mov %eax,%ecx <== NOT EXECUTED 1137e4: 89 d8 mov %ebx,%eax <== NOT EXECUTED 1137e6: eb e5 jmp 1137cd <== NOT EXECUTED 1137e8: 89 c8 mov %ecx,%eax if (ap->local_value == local_value) return ap; return default_ap; } 1137ea: 5b pop %ebx 1137eb: 5e pop %esi 1137ec: 5f pop %edi 1137ed: c9 leave 1137ee: c3 ret 1137ef: 90 nop <== NOT EXECUTED uint32_t local_value ) { const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) 1137f0: 31 c0 xor %eax,%eax <== NOT EXECUTED for ( ; ap->name; ap++) if (ap->local_value == local_value) return ap; return default_ap; } 1137f2: 5b pop %ebx <== NOT EXECUTED 1137f3: 5e pop %esi <== NOT EXECUTED 1137f4: 5f pop %edi <== NOT EXECUTED 1137f5: c9 leave <== NOT EXECUTED 1137f6: c3 ret <== NOT EXECUTED 001122c8 : const rtems_assoc_t *rtems_assoc_ptr_by_remote( const rtems_assoc_t *ap, uint32_t remote_value ) { 1122c8: 55 push %ebp 1122c9: 89 e5 mov %esp,%ebp 1122cb: 57 push %edi 1122cc: 56 push %esi 1122cd: 53 push %ebx 1122ce: 8b 45 08 mov 0x8(%ebp),%eax 1122d1: 8b 55 0c mov 0xc(%ebp),%edx const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) 1122d4: 8b 30 mov (%eax),%esi 1122d6: 85 f6 test %esi,%esi 1122d8: 74 3e je 112318 <== ALWAYS TAKEN 1122da: bf 6d 15 12 00 mov $0x12156d,%edi 1122df: b9 0a 00 00 00 mov $0xa,%ecx 1122e4: f3 a6 repz cmpsb %es:(%edi),%ds:(%esi) <== NEVER TAKEN 1122e6: 74 18 je 112300 <== ALWAYS TAKEN 1122e8: 31 c9 xor %ecx,%ecx 1122ea: eb 09 jmp 1122f5 <== ALWAYS TAKEN default_ap = ap++; for ( ; ap->name; ap++) 1122ec: 83 c0 0c add $0xc,%eax 1122ef: 8b 18 mov (%eax),%ebx 1122f1: 85 db test %ebx,%ebx 1122f3: 74 1b je 112310 if (ap->remote_value == remote_value) 1122f5: 39 50 08 cmp %edx,0x8(%eax) 1122f8: 75 f2 jne 1122ec return ap; return default_ap; } 1122fa: 5b pop %ebx 1122fb: 5e pop %esi 1122fc: 5f pop %edi 1122fd: c9 leave 1122fe: c3 ret 1122ff: 90 nop <== NOT EXECUTED ) { const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) default_ap = ap++; 112300: 8d 58 0c lea 0xc(%eax),%ebx <== NOT EXECUTED for ( ; ap->name; ap++) 112303: 8b 70 0c mov 0xc(%eax),%esi <== NOT EXECUTED 112306: 85 f6 test %esi,%esi <== NOT EXECUTED 112308: 74 f0 je 1122fa <== NOT EXECUTED 11230a: 89 c1 mov %eax,%ecx <== NOT EXECUTED 11230c: 89 d8 mov %ebx,%eax <== NOT EXECUTED 11230e: eb e5 jmp 1122f5 <== NOT EXECUTED 112310: 89 c8 mov %ecx,%eax if (ap->remote_value == remote_value) return ap; return default_ap; } 112312: 5b pop %ebx 112313: 5e pop %esi 112314: 5f pop %edi 112315: c9 leave 112316: c3 ret 112317: 90 nop <== NOT EXECUTED uint32_t remote_value ) { const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) 112318: 31 c0 xor %eax,%eax <== NOT EXECUTED for ( ; ap->name; ap++) if (ap->remote_value == remote_value) return ap; return default_ap; } 11231a: 5b pop %ebx <== NOT EXECUTED 11231b: 5e pop %esi <== NOT EXECUTED 11231c: 5f pop %edi <== NOT EXECUTED 11231d: c9 leave <== NOT EXECUTED 11231e: c3 ret <== NOT EXECUTED 0011300c : uint32_t rtems_assoc_remote_by_local( const rtems_assoc_t *ap, uint32_t local_value ) { 11300c: 55 push %ebp <== NOT EXECUTED 11300d: 89 e5 mov %esp,%ebp <== NOT EXECUTED 11300f: 83 ec 10 sub $0x10,%esp <== NOT EXECUTED const rtems_assoc_t *nap; nap = rtems_assoc_ptr_by_local(ap, local_value); 113012: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED 113015: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED 113018: e8 83 07 00 00 call 1137a0 <== NOT EXECUTED if (nap) 11301d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 113020: 85 c0 test %eax,%eax <== NOT EXECUTED 113022: 74 03 je 113027 <== NOT EXECUTED return nap->remote_value; 113024: 8b 40 08 mov 0x8(%eax),%eax <== NOT EXECUTED return 0; } 113027: c9 leave <== NOT EXECUTED 113028: c3 ret <== NOT EXECUTED 0011272c : rtems_name name, rtems_attribute attribute_set, uint32_t maximum_waiters, rtems_id *id ) { 11272c: 55 push %ebp 11272d: 89 e5 mov %esp,%ebp 11272f: 57 push %edi 112730: 56 push %esi 112731: 53 push %ebx 112732: 83 ec 2c sub $0x2c,%esp 112735: 8b 5d 08 mov 0x8(%ebp),%ebx 112738: 8b 7d 0c mov 0xc(%ebp),%edi 11273b: 8b 45 10 mov 0x10(%ebp),%eax 11273e: 8b 75 14 mov 0x14(%ebp),%esi Barrier_Control *the_barrier; CORE_barrier_Attributes the_attributes; if ( !rtems_is_name_valid( name ) ) 112741: 85 db test %ebx,%ebx 112743: 0f 84 87 00 00 00 je 1127d0 return RTEMS_INVALID_NAME; if ( !id ) 112749: 85 f6 test %esi,%esi 11274b: 0f 84 bb 00 00 00 je 11280c return RTEMS_INVALID_ADDRESS; /* Initialize core barrier attributes */ if ( _Attributes_Is_barrier_automatic( attribute_set ) ) { 112751: f7 c7 10 00 00 00 test $0x10,%edi 112757: 0f 84 83 00 00 00 je 1127e0 the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE; if ( maximum_waiters == 0 ) 11275d: 85 c0 test %eax,%eax 11275f: 0f 84 87 00 00 00 je 1127ec if ( !id ) return RTEMS_INVALID_ADDRESS; /* Initialize core barrier attributes */ if ( _Attributes_Is_barrier_automatic( attribute_set ) ) { the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE; 112765: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) if ( maximum_waiters == 0 ) return RTEMS_INVALID_NUMBER; } else the_attributes.discipline = CORE_BARRIER_MANUAL_RELEASE; the_attributes.maximum_count = maximum_waiters; 11276c: 89 45 e4 mov %eax,-0x1c(%ebp) 11276f: a1 d8 73 12 00 mov 0x1273d8,%eax 112774: 40 inc %eax 112775: a3 d8 73 12 00 mov %eax,0x1273d8 * 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 ); 11277a: 83 ec 0c sub $0xc,%esp 11277d: 68 60 7e 12 00 push $0x127e60 112782: e8 09 a0 ff ff call 10c790 <_Objects_Allocate> _Thread_Disable_dispatch(); /* prevents deletion */ the_barrier = _Barrier_Allocate(); if ( !the_barrier ) { 112787: 83 c4 10 add $0x10,%esp 11278a: 85 c0 test %eax,%eax 11278c: 74 6a je 1127f8 _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } the_barrier->attribute_set = attribute_set; 11278e: 89 78 10 mov %edi,0x10(%eax) _CORE_barrier_Initialize( &the_barrier->Barrier, &the_attributes ); 112791: 83 ec 08 sub $0x8,%esp 112794: 8d 55 e0 lea -0x20(%ebp),%edx 112797: 52 push %edx 112798: 8d 50 14 lea 0x14(%eax),%edx 11279b: 52 push %edx 11279c: 89 45 d4 mov %eax,-0x2c(%ebp) 11279f: e8 5c 04 00 00 call 112c00 <_CORE_barrier_Initialize> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 1127a4: 8b 45 d4 mov -0x2c(%ebp),%eax 1127a7: 8b 50 08 mov 0x8(%eax),%edx 1127aa: 0f b7 fa movzwl %dx,%edi 1127ad: 8b 0d 7c 7e 12 00 mov 0x127e7c,%ecx 1127b3: 89 04 b9 mov %eax,(%ecx,%edi,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 1127b6: 89 58 0c mov %ebx,0xc(%eax) &_Barrier_Information, &the_barrier->Object, (Objects_Name) name ); *id = the_barrier->Object.id; 1127b9: 89 16 mov %edx,(%esi) _Thread_Enable_dispatch(); 1127bb: e8 f4 ac ff ff call 10d4b4 <_Thread_Enable_dispatch> 1127c0: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 1127c2: 83 c4 10 add $0x10,%esp } 1127c5: 8d 65 f4 lea -0xc(%ebp),%esp 1127c8: 5b pop %ebx 1127c9: 5e pop %esi 1127ca: 5f pop %edi 1127cb: c9 leave 1127cc: c3 ret 1127cd: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED ) { Barrier_Control *the_barrier; CORE_barrier_Attributes the_attributes; if ( !rtems_is_name_valid( name ) ) 1127d0: b8 03 00 00 00 mov $0x3,%eax *id = the_barrier->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 1127d5: 8d 65 f4 lea -0xc(%ebp),%esp 1127d8: 5b pop %ebx 1127d9: 5e pop %esi 1127da: 5f pop %edi 1127db: c9 leave 1127dc: c3 ret 1127dd: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if ( _Attributes_Is_barrier_automatic( attribute_set ) ) { the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE; if ( maximum_waiters == 0 ) return RTEMS_INVALID_NUMBER; } else the_attributes.discipline = CORE_BARRIER_MANUAL_RELEASE; 1127e0: c7 45 e0 01 00 00 00 movl $0x1,-0x20(%ebp) 1127e7: eb 83 jmp 11276c <== ALWAYS TAKEN 1127e9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED return RTEMS_INVALID_ADDRESS; /* Initialize core barrier attributes */ if ( _Attributes_Is_barrier_automatic( attribute_set ) ) { the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE; if ( maximum_waiters == 0 ) 1127ec: b0 0a mov $0xa,%al *id = the_barrier->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 1127ee: 8d 65 f4 lea -0xc(%ebp),%esp 1127f1: 5b pop %ebx 1127f2: 5e pop %esi 1127f3: 5f pop %edi 1127f4: c9 leave 1127f5: c3 ret 1127f6: 66 90 xchg %ax,%ax <== NOT EXECUTED _Thread_Disable_dispatch(); /* prevents deletion */ the_barrier = _Barrier_Allocate(); if ( !the_barrier ) { _Thread_Enable_dispatch(); 1127f8: e8 b7 ac ff ff call 10d4b4 <_Thread_Enable_dispatch> 1127fd: b8 05 00 00 00 mov $0x5,%eax *id = the_barrier->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 112802: 8d 65 f4 lea -0xc(%ebp),%esp 112805: 5b pop %ebx 112806: 5e pop %esi 112807: 5f pop %edi 112808: c9 leave 112809: c3 ret 11280a: 66 90 xchg %ax,%ax <== NOT EXECUTED CORE_barrier_Attributes the_attributes; if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; if ( !id ) 11280c: b8 09 00 00 00 mov $0x9,%eax 112811: eb b2 jmp 1127c5 <== ALWAYS TAKEN 00112814 : */ rtems_status_code rtems_barrier_delete( rtems_id id ) { 112814: 55 push %ebp 112815: 89 e5 mov %esp,%ebp 112817: 53 push %ebx 112818: 83 ec 18 sub $0x18,%esp RTEMS_INLINE_ROUTINE Barrier_Control *_Barrier_Get ( Objects_Id id, Objects_Locations *location ) { return (Barrier_Control *) 11281b: 8d 45 f4 lea -0xc(%ebp),%eax 11281e: 50 push %eax 11281f: ff 75 08 pushl 0x8(%ebp) 112822: 68 60 7e 12 00 push $0x127e60 112827: e8 14 a4 ff ff call 10cc40 <_Objects_Get> 11282c: 89 c3 mov %eax,%ebx Barrier_Control *the_barrier; Objects_Locations location; the_barrier = _Barrier_Get( id, &location ); switch ( location ) { 11282e: 83 c4 10 add $0x10,%esp 112831: 8b 4d f4 mov -0xc(%ebp),%ecx 112834: 85 c9 test %ecx,%ecx 112836: 75 38 jne 112870 case OBJECTS_LOCAL: _CORE_barrier_Flush( 112838: 52 push %edx 112839: 6a 02 push $0x2 11283b: 6a 00 push $0x0 11283d: 8d 40 14 lea 0x14(%eax),%eax 112840: 50 push %eax 112841: e8 b2 b3 ff ff call 10dbf8 <_Thread_queue_Flush> &the_barrier->Barrier, NULL, CORE_BARRIER_WAS_DELETED ); _Objects_Close( &_Barrier_Information, &the_barrier->Object ); 112846: 59 pop %ecx 112847: 58 pop %eax 112848: 53 push %ebx 112849: 68 60 7e 12 00 push $0x127e60 11284e: e8 b9 9f ff ff call 10c80c <_Objects_Close> */ RTEMS_INLINE_ROUTINE void _Barrier_Free ( Barrier_Control *the_barrier ) { _Objects_Free( &_Barrier_Information, &the_barrier->Object ); 112853: 58 pop %eax 112854: 5a pop %edx 112855: 53 push %ebx 112856: 68 60 7e 12 00 push $0x127e60 11285b: e8 b0 a2 ff ff call 10cb10 <_Objects_Free> _Barrier_Free( the_barrier ); _Thread_Enable_dispatch(); 112860: e8 4f ac ff ff call 10d4b4 <_Thread_Enable_dispatch> 112865: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 112867: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11286a: 8b 5d fc mov -0x4(%ebp),%ebx 11286d: c9 leave 11286e: c3 ret 11286f: 90 nop <== NOT EXECUTED { Barrier_Control *the_barrier; Objects_Locations location; the_barrier = _Barrier_Get( id, &location ); switch ( location ) { 112870: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 112875: 8b 5d fc mov -0x4(%ebp),%ebx 112878: c9 leave 112879: c3 ret 001128e0 : rtems_status_code rtems_barrier_wait( rtems_id id, rtems_interval timeout ) { 1128e0: 55 push %ebp 1128e1: 89 e5 mov %esp,%ebp 1128e3: 53 push %ebx 1128e4: 83 ec 18 sub $0x18,%esp 1128e7: 8b 5d 08 mov 0x8(%ebp),%ebx 1128ea: 8d 45 f4 lea -0xc(%ebp),%eax 1128ed: 50 push %eax 1128ee: 53 push %ebx 1128ef: 68 60 7e 12 00 push $0x127e60 1128f4: e8 47 a3 ff ff call 10cc40 <_Objects_Get> Barrier_Control *the_barrier; Objects_Locations location; the_barrier = _Barrier_Get( id, &location ); switch ( location ) { 1128f9: 83 c4 10 add $0x10,%esp 1128fc: 8b 55 f4 mov -0xc(%ebp),%edx 1128ff: 85 d2 test %edx,%edx 112901: 75 35 jne 112938 <== ALWAYS TAKEN case OBJECTS_LOCAL: _CORE_barrier_Wait( 112903: 83 ec 0c sub $0xc,%esp 112906: 6a 00 push $0x0 112908: ff 75 0c pushl 0xc(%ebp) 11290b: 6a 01 push $0x1 11290d: 53 push %ebx 11290e: 83 c0 14 add $0x14,%eax 112911: 50 push %eax 112912: e8 4d 03 00 00 call 112c64 <_CORE_barrier_Wait> id, true, timeout, NULL ); _Thread_Enable_dispatch(); 112917: 83 c4 20 add $0x20,%esp 11291a: e8 95 ab ff ff call 10d4b4 <_Thread_Enable_dispatch> return _Barrier_Translate_core_barrier_return_code( 11291f: 83 ec 0c sub $0xc,%esp 112922: a1 98 74 12 00 mov 0x127498,%eax 112927: ff 70 34 pushl 0x34(%eax) 11292a: e8 61 0e 00 00 call 113790 <_Barrier_Translate_core_barrier_return_code> 11292f: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 112932: 8b 5d fc mov -0x4(%ebp),%ebx 112935: c9 leave 112936: c3 ret 112937: 90 nop <== NOT EXECUTED { Barrier_Control *the_barrier; Objects_Locations location; the_barrier = _Barrier_Get( id, &location ); switch ( location ) { 112938: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11293d: 8b 5d fc mov -0x4(%ebp),%ebx 112940: c9 leave 112941: c3 ret 00107ff8 : const char *rtems_bsp_cmdline_get_param( const char *name, char *value, size_t length ) { 107ff8: 55 push %ebp 107ff9: 89 e5 mov %esp,%ebp 107ffb: 57 push %edi 107ffc: 56 push %esi 107ffd: 53 push %ebx 107ffe: 83 ec 1c sub $0x1c,%esp 108001: 8b 45 08 mov 0x8(%ebp),%eax 108004: 8b 5d 0c mov 0xc(%ebp),%ebx 108007: 8b 75 10 mov 0x10(%ebp),%esi const char *p; if ( !name ) 10800a: 85 c0 test %eax,%eax 10800c: 75 0e jne 10801c int i; int quotes; const char *p = start; quotes=0; for (i=0 ; *p && i return NULL; if ( !length ) 108020: 85 f6 test %esi,%esi 108022: 74 ea je 10800e return NULL; value[0] = '\0'; 108024: c6 03 00 movb $0x0,(%ebx) p = rtems_bsp_cmdline_get_param_raw( name ); 108027: 83 ec 0c sub $0xc,%esp 10802a: 50 push %eax 10802b: e8 48 00 00 00 call 108078 <== ALWAYS TAKEN if ( !p ) 108030: 83 c4 10 add $0x10,%esp 108033: 85 c0 test %eax,%eax 108035: 74 d7 je 10800e int i; int quotes; const char *p = start; quotes=0; for (i=0 ; *p && i <== ALWAYS TAKEN 10803d: 4e dec %esi 10803e: 89 75 e4 mov %esi,-0x1c(%ebp) 108041: 74 cd je 108010 <== ALWAYS TAKEN 108043: 31 f6 xor %esi,%esi 108045: 31 d2 xor %edx,%edx 108047: 31 ff xor %edi,%edi 108049: eb 24 jmp 10806f <== ALWAYS TAKEN 10804b: 90 nop <== NOT EXECUTED if ( *p == '\"' ) { quotes++; } else if ( ((quotes % 2) == 0) && *p == ' ' ) 10804c: f7 c7 01 00 00 00 test $0x1,%edi 108052: 75 05 jne 108059 <== ALWAYS TAKEN 108054: 80 f9 20 cmp $0x20,%cl 108057: 74 b7 je 108010 <== ALWAYS TAKEN break; value[i++] = *p++; 108059: 88 0c 33 mov %cl,(%ebx,%esi,1) 10805c: 42 inc %edx 10805d: 89 d6 mov %edx,%esi value[i] = '\0'; 10805f: c6 04 13 00 movb $0x0,(%ebx,%edx,1) int i; int quotes; const char *p = start; quotes=0; for (i=0 ; *p && i 10806a: 3b 55 e4 cmp -0x1c(%ebp),%edx 10806d: 73 a1 jae 108010 <== ALWAYS TAKEN if ( *p == '\"' ) { 10806f: 80 f9 22 cmp $0x22,%cl 108072: 75 d8 jne 10804c <== NEVER TAKEN quotes++; 108074: 47 inc %edi <== NOT EXECUTED 108075: eb e2 jmp 108059 <== NOT EXECUTED 00108078 : extern const char *bsp_boot_cmdline; const char *rtems_bsp_cmdline_get_param_raw( const char *name ) { 108078: 55 push %ebp 108079: 89 e5 mov %esp,%ebp 10807b: 83 ec 08 sub $0x8,%esp 10807e: 8b 45 08 mov 0x8(%ebp),%eax const char *p; if ( !name ) 108081: 85 c0 test %eax,%eax 108083: 75 07 jne 10808c if ( !bsp_boot_cmdline ) return NULL; p = strstr(bsp_boot_cmdline, name); /* printf( "raw: %p (%s)\n", p, p ); */ return p; 108085: 31 c0 xor %eax,%eax } 108087: c9 leave 108088: c3 ret 108089: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED const char *p; if ( !name ) return NULL; if ( !bsp_boot_cmdline ) 10808c: 8b 15 98 70 12 00 mov 0x127098,%edx 108092: 85 d2 test %edx,%edx 108094: 74 ef je 108085 return NULL; p = strstr(bsp_boot_cmdline, name); 108096: 83 ec 08 sub $0x8,%esp 108099: 50 push %eax 10809a: 52 push %edx 10809b: e8 90 cd 00 00 call 114e30 1080a0: 83 c4 10 add $0x10,%esp /* printf( "raw: %p (%s)\n", p, p ); */ return p; } 1080a3: c9 leave 1080a4: c3 ret 001080a8 : const char *rtems_bsp_cmdline_get_param_rhs( const char *name, char *value, size_t length ) { 1080a8: 55 push %ebp <== NOT EXECUTED 1080a9: 89 e5 mov %esp,%ebp <== NOT EXECUTED 1080ab: 57 push %edi <== NOT EXECUTED 1080ac: 53 push %ebx <== NOT EXECUTED 1080ad: 8b 7d 08 mov 0x8(%ebp),%edi <== NOT EXECUTED 1080b0: 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 ); 1080b3: 50 push %eax <== NOT EXECUTED 1080b4: ff 75 10 pushl 0x10(%ebp) <== NOT EXECUTED 1080b7: 53 push %ebx <== NOT EXECUTED 1080b8: 57 push %edi <== NOT EXECUTED 1080b9: e8 3a ff ff ff call 107ff8 <== NOT EXECUTED 1080be: 89 c2 mov %eax,%edx <== NOT EXECUTED if ( !p ) 1080c0: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 1080c3: 85 c0 test %eax,%eax <== NOT EXECUTED 1080c5: 75 0d jne 1080d4 <== NOT EXECUTED *d++ = *rhs++; if ( *(d-1) == '\"' ) d--; *d = '\0'; return value; 1080c7: 31 db xor %ebx,%ebx <== NOT EXECUTED } 1080c9: 89 d8 mov %ebx,%eax <== NOT EXECUTED 1080cb: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED 1080ce: 5b pop %ebx <== NOT EXECUTED 1080cf: 5f pop %edi <== NOT EXECUTED 1080d0: c9 leave <== NOT EXECUTED 1080d1: c3 ret <== NOT EXECUTED 1080d2: 66 90 xchg %ax,%ax <== NOT EXECUTED p = rtems_bsp_cmdline_get_param( name, value, length ); if ( !p ) return NULL; rhs = &p[strlen(name)]; 1080d4: 31 c0 xor %eax,%eax <== NOT EXECUTED 1080d6: b9 ff ff ff ff mov $0xffffffff,%ecx <== NOT EXECUTED 1080db: f2 ae repnz scas %es:(%edi),%al <== NOT EXECUTED 1080dd: f7 d1 not %ecx <== NOT EXECUTED 1080df: 8d 44 0a ff lea -0x1(%edx,%ecx,1),%eax <== NOT EXECUTED if ( *rhs != '=' ) 1080e3: 80 38 3d cmpb $0x3d,(%eax) <== NOT EXECUTED 1080e6: 75 df jne 1080c7 <== NOT EXECUTED return NULL; rhs++; 1080e8: 8d 48 01 lea 0x1(%eax),%ecx <== NOT EXECUTED if ( *rhs == '\"' ) 1080eb: 8a 50 01 mov 0x1(%eax),%dl <== NOT EXECUTED 1080ee: 80 fa 22 cmp $0x22,%dl <== NOT EXECUTED 1080f1: 74 2d je 108120 <== NOT EXECUTED rhs++; for ( d=value ; *rhs ; ) 1080f3: 84 d2 test %dl,%dl <== NOT EXECUTED 1080f5: 74 31 je 108128 <== NOT EXECUTED 1080f7: 89 d8 mov %ebx,%eax <== NOT EXECUTED 1080f9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED *d++ = *rhs++; 1080fc: 88 10 mov %dl,(%eax) <== NOT EXECUTED 1080fe: 40 inc %eax <== NOT EXECUTED 1080ff: 41 inc %ecx <== NOT EXECUTED return NULL; rhs++; if ( *rhs == '\"' ) rhs++; for ( d=value ; *rhs ; ) 108100: 8a 11 mov (%ecx),%dl <== NOT EXECUTED 108102: 84 d2 test %dl,%dl <== NOT EXECUTED 108104: 75 f6 jne 1080fc <== NOT EXECUTED *d++ = *rhs++; if ( *(d-1) == '\"' ) 108106: 8d 50 ff lea -0x1(%eax),%edx <== NOT EXECUTED 108109: 80 78 ff 22 cmpb $0x22,-0x1(%eax) <== NOT EXECUTED 10810d: 74 02 je 108111 <== NOT EXECUTED 10810f: 89 c2 mov %eax,%edx <== NOT EXECUTED d--; *d = '\0'; 108111: c6 02 00 movb $0x0,(%edx) <== NOT EXECUTED return value; } 108114: 89 d8 mov %ebx,%eax <== NOT EXECUTED 108116: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED 108119: 5b pop %ebx <== NOT EXECUTED 10811a: 5f pop %edi <== NOT EXECUTED 10811b: c9 leave <== NOT EXECUTED 10811c: c3 ret <== NOT EXECUTED 10811d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if ( *rhs != '=' ) return NULL; rhs++; if ( *rhs == '\"' ) rhs++; 108120: 8d 48 02 lea 0x2(%eax),%ecx <== NOT EXECUTED 108123: 8a 50 02 mov 0x2(%eax),%dl <== NOT EXECUTED 108126: eb cb jmp 1080f3 <== NOT EXECUTED for ( d=value ; *rhs ; ) 108128: 89 d8 mov %ebx,%eax <== NOT EXECUTED 10812a: eb da jmp 108106 <== NOT EXECUTED 00110ad4 : rtems_status_code rtems_clock_get( rtems_clock_get_options option, void *time_buffer ) { 110ad4: 55 push %ebp 110ad5: 89 e5 mov %esp,%ebp 110ad7: 53 push %ebx 110ad8: 83 ec 04 sub $0x4,%esp 110adb: 8b 45 08 mov 0x8(%ebp),%eax 110ade: 8b 5d 0c mov 0xc(%ebp),%ebx if ( !time_buffer ) 110ae1: 85 db test %ebx,%ebx 110ae3: 74 3b je 110b20 return RTEMS_INVALID_ADDRESS; if ( option == RTEMS_CLOCK_GET_TOD ) 110ae5: 85 c0 test %eax,%eax 110ae7: 74 2b je 110b14 return rtems_clock_get_tod( (rtems_time_of_day *)time_buffer ); if ( option == RTEMS_CLOCK_GET_SECONDS_SINCE_EPOCH ) 110ae9: 83 f8 01 cmp $0x1,%eax 110aec: 74 3e je 110b2c return rtems_clock_get_seconds_since_epoch((rtems_interval *)time_buffer); if ( option == RTEMS_CLOCK_GET_TICKS_SINCE_BOOT ) { 110aee: 83 f8 02 cmp $0x2,%eax 110af1: 74 45 je 110b38 *interval = rtems_clock_get_ticks_since_boot(); return RTEMS_SUCCESSFUL; } if ( option == RTEMS_CLOCK_GET_TICKS_PER_SECOND ) { 110af3: 83 f8 03 cmp $0x3,%eax 110af6: 74 4c je 110b44 *interval = rtems_clock_get_ticks_per_second(); return RTEMS_SUCCESSFUL; } if ( option == RTEMS_CLOCK_GET_TIME_VALUE ) 110af8: 83 f8 04 cmp $0x4,%eax 110afb: 74 0b je 110b08 110afd: b8 0a 00 00 00 mov $0xa,%eax return rtems_clock_get_tod_timeval( (struct timeval *)time_buffer ); return RTEMS_INVALID_NUMBER; } 110b02: 5a pop %edx 110b03: 5b pop %ebx 110b04: c9 leave 110b05: c3 ret 110b06: 66 90 xchg %ax,%ax <== NOT EXECUTED *interval = rtems_clock_get_ticks_per_second(); return RTEMS_SUCCESSFUL; } if ( option == RTEMS_CLOCK_GET_TIME_VALUE ) return rtems_clock_get_tod_timeval( (struct timeval *)time_buffer ); 110b08: 89 5d 08 mov %ebx,0x8(%ebp) return RTEMS_INVALID_NUMBER; } 110b0b: 59 pop %ecx 110b0c: 5b pop %ebx 110b0d: 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 ); 110b0e: e9 49 01 00 00 jmp 110c5c <== ALWAYS TAKEN 110b13: 90 nop <== NOT EXECUTED { if ( !time_buffer ) return RTEMS_INVALID_ADDRESS; if ( option == RTEMS_CLOCK_GET_TOD ) return rtems_clock_get_tod( (rtems_time_of_day *)time_buffer ); 110b14: 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; } 110b17: 58 pop %eax 110b18: 5b pop %ebx 110b19: 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 ); 110b1a: e9 7d 00 00 00 jmp 110b9c <== ALWAYS TAKEN 110b1f: 90 nop <== NOT EXECUTED rtems_status_code rtems_clock_get( rtems_clock_get_options option, void *time_buffer ) { if ( !time_buffer ) 110b20: b8 09 00 00 00 mov $0x9,%eax if ( option == RTEMS_CLOCK_GET_TIME_VALUE ) return rtems_clock_get_tod_timeval( (struct timeval *)time_buffer ); return RTEMS_INVALID_NUMBER; } 110b25: 5a pop %edx 110b26: 5b pop %ebx 110b27: c9 leave 110b28: c3 ret 110b29: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if ( option == RTEMS_CLOCK_GET_TOD ) return rtems_clock_get_tod( (rtems_time_of_day *)time_buffer ); if ( option == RTEMS_CLOCK_GET_SECONDS_SINCE_EPOCH ) return rtems_clock_get_seconds_since_epoch((rtems_interval *)time_buffer); 110b2c: 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; } 110b2f: 5b pop %ebx 110b30: 5b pop %ebx 110b31: 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); 110b32: e9 19 00 00 00 jmp 110b50 <== ALWAYS TAKEN 110b37: 90 nop <== NOT EXECUTED if ( option == RTEMS_CLOCK_GET_TICKS_SINCE_BOOT ) { rtems_interval *interval = (rtems_interval *)time_buffer; *interval = rtems_clock_get_ticks_since_boot(); 110b38: e8 53 00 00 00 call 110b90 <== ALWAYS TAKEN 110b3d: 89 03 mov %eax,(%ebx) 110b3f: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 110b41: eb bf jmp 110b02 <== ALWAYS TAKEN 110b43: 90 nop <== NOT EXECUTED } if ( option == RTEMS_CLOCK_GET_TICKS_PER_SECOND ) { rtems_interval *interval = (rtems_interval *)time_buffer; *interval = rtems_clock_get_ticks_per_second(); 110b44: e8 33 00 00 00 call 110b7c <== ALWAYS TAKEN 110b49: 89 03 mov %eax,(%ebx) 110b4b: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 110b4d: eb b3 jmp 110b02 <== ALWAYS TAKEN 0010be34 : #include rtems_status_code rtems_clock_get_seconds_since_epoch( rtems_interval *the_interval ) { 10be34: 55 push %ebp 10be35: 89 e5 mov %esp,%ebp 10be37: 8b 45 08 mov 0x8(%ebp),%eax if ( !the_interval ) 10be3a: 85 c0 test %eax,%eax 10be3c: 74 1e je 10be5c return RTEMS_INVALID_ADDRESS; if ( !_TOD_Is_set ) 10be3e: 80 3d 2c 22 13 00 00 cmpb $0x0,0x13222c 10be45: 74 0d je 10be54 return RTEMS_NOT_DEFINED; *the_interval = _TOD_Seconds_since_epoch(); 10be47: 8b 15 ac 22 13 00 mov 0x1322ac,%edx 10be4d: 89 10 mov %edx,(%eax) 10be4f: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; } 10be51: c9 leave 10be52: c3 ret 10be53: 90 nop <== NOT EXECUTED ) { if ( !the_interval ) return RTEMS_INVALID_ADDRESS; if ( !_TOD_Is_set ) 10be54: b8 0b 00 00 00 mov $0xb,%eax return RTEMS_NOT_DEFINED; *the_interval = _TOD_Seconds_since_epoch(); return RTEMS_SUCCESSFUL; } 10be59: c9 leave 10be5a: c3 ret 10be5b: 90 nop <== NOT EXECUTED rtems_status_code rtems_clock_get_seconds_since_epoch( rtems_interval *the_interval ) { if ( !the_interval ) 10be5c: b0 09 mov $0x9,%al if ( !_TOD_Is_set ) return RTEMS_NOT_DEFINED; *the_interval = _TOD_Seconds_since_epoch(); return RTEMS_SUCCESSFUL; } 10be5e: c9 leave 10be5f: c3 ret 0010be80 : #include rtems_status_code rtems_clock_get_tod( rtems_time_of_day *time_buffer ) { 10be80: 55 push %ebp 10be81: 89 e5 mov %esp,%ebp 10be83: 56 push %esi 10be84: 53 push %ebx 10be85: 83 ec 50 sub $0x50,%esp 10be88: 8b 5d 08 mov 0x8(%ebp),%ebx rtems_time_of_day *tmbuf = time_buffer; struct tm time; struct timeval now; if ( !time_buffer ) 10be8b: 85 db test %ebx,%ebx 10be8d: 0f 84 a1 00 00 00 je 10bf34 return RTEMS_INVALID_ADDRESS; if ( !_TOD_Is_set ) 10be93: 80 3d 2c 22 13 00 00 cmpb $0x0,0x13222c 10be9a: 75 0c jne 10bea8 10be9c: b8 0b 00 00 00 mov $0xb,%eax tmbuf->second = time.tm_sec; tmbuf->ticks = now.tv_usec / rtems_configuration_get_microseconds_per_tick(); return RTEMS_SUCCESSFUL; } 10bea1: 8d 65 f8 lea -0x8(%ebp),%esp 10bea4: 5b pop %ebx 10bea5: 5e pop %esi 10bea6: c9 leave 10bea7: c3 ret { ISR_Level level; struct timespec now; suseconds_t useconds; _ISR_Disable(level); 10bea8: 9c pushf 10bea9: fa cli 10beaa: 5e pop %esi _TOD_Get( &now ); 10beab: 83 ec 0c sub $0xc,%esp 10beae: 8d 45 e8 lea -0x18(%ebp),%eax 10beb1: 50 push %eax 10beb2: e8 31 19 00 00 call 10d7e8 <_TOD_Get> _ISR_Enable(level); 10beb7: 56 push %esi 10beb8: 9d popf useconds = (suseconds_t)now.tv_nsec; 10beb9: 8b 4d ec mov -0x14(%ebp),%ecx useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND; time->tv_sec = now.tv_sec; 10bebc: 8b 45 e8 mov -0x18(%ebp),%eax 10bebf: 89 45 f0 mov %eax,-0x10(%ebp) time->tv_usec = useconds; 10bec2: be d3 4d 62 10 mov $0x10624dd3,%esi 10bec7: 89 c8 mov %ecx,%eax 10bec9: f7 ee imul %esi 10becb: 89 45 b0 mov %eax,-0x50(%ebp) 10bece: 89 55 b4 mov %edx,-0x4c(%ebp) 10bed1: 8b 75 b4 mov -0x4c(%ebp),%esi 10bed4: c1 fe 06 sar $0x6,%esi 10bed7: 89 c8 mov %ecx,%eax 10bed9: 99 cltd 10beda: 29 d6 sub %edx,%esi 10bedc: 89 75 f4 mov %esi,-0xc(%ebp) /* Obtain the current time */ _TOD_Get_timeval( &now ); /* Split it into a closer format */ gmtime_r( &now.tv_sec, &time ); 10bedf: 58 pop %eax 10bee0: 5a pop %edx 10bee1: 8d 45 c4 lea -0x3c(%ebp),%eax 10bee4: 50 push %eax 10bee5: 8d 45 f0 lea -0x10(%ebp),%eax 10bee8: 50 push %eax 10bee9: e8 3a 98 00 00 call 115728 /* Now adjust it to the RTEMS format */ tmbuf->year = time.tm_year + 1900; 10beee: 8b 45 d8 mov -0x28(%ebp),%eax 10bef1: 05 6c 07 00 00 add $0x76c,%eax 10bef6: 89 03 mov %eax,(%ebx) tmbuf->month = time.tm_mon + 1; 10bef8: 8b 45 d4 mov -0x2c(%ebp),%eax 10befb: 40 inc %eax 10befc: 89 43 04 mov %eax,0x4(%ebx) tmbuf->day = time.tm_mday; 10beff: 8b 45 d0 mov -0x30(%ebp),%eax 10bf02: 89 43 08 mov %eax,0x8(%ebx) tmbuf->hour = time.tm_hour; 10bf05: 8b 45 cc mov -0x34(%ebp),%eax 10bf08: 89 43 0c mov %eax,0xc(%ebx) tmbuf->minute = time.tm_min; 10bf0b: 8b 45 c8 mov -0x38(%ebp),%eax 10bf0e: 89 43 10 mov %eax,0x10(%ebx) tmbuf->second = time.tm_sec; 10bf11: 8b 45 c4 mov -0x3c(%ebp),%eax 10bf14: 89 43 14 mov %eax,0x14(%ebx) tmbuf->ticks = now.tv_usec / 10bf17: 8b 45 f4 mov -0xc(%ebp),%eax 10bf1a: 31 d2 xor %edx,%edx 10bf1c: f7 35 2c 62 12 00 divl 0x12622c 10bf22: 89 43 18 mov %eax,0x18(%ebx) 10bf25: 31 c0 xor %eax,%eax rtems_configuration_get_microseconds_per_tick(); return RTEMS_SUCCESSFUL; 10bf27: 83 c4 10 add $0x10,%esp } 10bf2a: 8d 65 f8 lea -0x8(%ebp),%esp 10bf2d: 5b pop %ebx 10bf2e: 5e pop %esi 10bf2f: c9 leave 10bf30: c3 ret 10bf31: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED { rtems_time_of_day *tmbuf = time_buffer; struct tm time; struct timeval now; if ( !time_buffer ) 10bf34: b8 09 00 00 00 mov $0x9,%eax 10bf39: e9 63 ff ff ff jmp 10bea1 <== ALWAYS TAKEN 00110c5c : #include rtems_status_code rtems_clock_get_tod_timeval( struct timeval *time ) { 110c5c: 55 push %ebp 110c5d: 89 e5 mov %esp,%ebp 110c5f: 56 push %esi 110c60: 53 push %ebx 110c61: 83 ec 20 sub $0x20,%esp 110c64: 8b 5d 08 mov 0x8(%ebp),%ebx if ( !time ) 110c67: 85 db test %ebx,%ebx 110c69: 74 59 je 110cc4 return RTEMS_INVALID_ADDRESS; if ( !_TOD_Is_set ) 110c6b: 80 3d 4c f0 16 00 00 cmpb $0x0,0x16f04c 110c72: 75 0c jne 110c80 110c74: b8 0b 00 00 00 mov $0xb,%eax return RTEMS_NOT_DEFINED; _TOD_Get_timeval( time ); return RTEMS_SUCCESSFUL; } 110c79: 8d 65 f8 lea -0x8(%ebp),%esp 110c7c: 5b pop %ebx 110c7d: 5e pop %esi 110c7e: c9 leave 110c7f: c3 ret { ISR_Level level; struct timespec now; suseconds_t useconds; _ISR_Disable(level); 110c80: 9c pushf 110c81: fa cli 110c82: 5e pop %esi _TOD_Get( &now ); 110c83: 83 ec 0c sub $0xc,%esp 110c86: 8d 45 f0 lea -0x10(%ebp),%eax 110c89: 50 push %eax 110c8a: e8 39 19 00 00 call 1125c8 <_TOD_Get> _ISR_Enable(level); 110c8f: 56 push %esi 110c90: 9d popf useconds = (suseconds_t)now.tv_nsec; 110c91: 8b 4d f4 mov -0xc(%ebp),%ecx useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND; time->tv_sec = now.tv_sec; 110c94: 8b 45 f0 mov -0x10(%ebp),%eax 110c97: 89 03 mov %eax,(%ebx) time->tv_usec = useconds; 110c99: be d3 4d 62 10 mov $0x10624dd3,%esi 110c9e: 89 c8 mov %ecx,%eax 110ca0: f7 ee imul %esi 110ca2: 89 45 e0 mov %eax,-0x20(%ebp) 110ca5: 89 55 e4 mov %edx,-0x1c(%ebp) 110ca8: 8b 75 e4 mov -0x1c(%ebp),%esi 110cab: c1 fe 06 sar $0x6,%esi 110cae: 89 c8 mov %ecx,%eax 110cb0: 99 cltd 110cb1: 29 d6 sub %edx,%esi 110cb3: 89 73 04 mov %esi,0x4(%ebx) 110cb6: 31 c0 xor %eax,%eax if ( !_TOD_Is_set ) return RTEMS_NOT_DEFINED; _TOD_Get_timeval( time ); return RTEMS_SUCCESSFUL; 110cb8: 83 c4 10 add $0x10,%esp } 110cbb: 8d 65 f8 lea -0x8(%ebp),%esp 110cbe: 5b pop %ebx 110cbf: 5e pop %esi 110cc0: c9 leave 110cc1: c3 ret 110cc2: 66 90 xchg %ax,%ax <== NOT EXECUTED rtems_status_code rtems_clock_get_tod_timeval( struct timeval *time ) { if ( !time ) 110cc4: b8 09 00 00 00 mov $0x9,%eax 110cc9: eb ae jmp 110c79 <== ALWAYS TAKEN 0012d96c : * error code - if unsuccessful */ rtems_status_code rtems_clock_get_uptime( struct timespec *uptime ) { 12d96c: 55 push %ebp 12d96d: 89 e5 mov %esp,%ebp 12d96f: 83 ec 08 sub $0x8,%esp 12d972: 8b 45 08 mov 0x8(%ebp),%eax if ( !uptime ) 12d975: 85 c0 test %eax,%eax 12d977: 74 13 je 12d98c return RTEMS_INVALID_ADDRESS; _TOD_Get_uptime_as_timespec( uptime ); 12d979: 83 ec 0c sub $0xc,%esp 12d97c: 50 push %eax 12d97d: e8 e2 0f 00 00 call 12e964 <_TOD_Get_uptime_as_timespec> 12d982: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 12d984: 83 c4 10 add $0x10,%esp } 12d987: c9 leave 12d988: c3 ret 12d989: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED */ rtems_status_code rtems_clock_get_uptime( struct timespec *uptime ) { if ( !uptime ) 12d98c: b0 09 mov $0x9,%al return RTEMS_INVALID_ADDRESS; _TOD_Get_uptime_as_timespec( uptime ); return RTEMS_SUCCESSFUL; } 12d98e: c9 leave 12d98f: c3 ret 0010bf58 : */ rtems_status_code rtems_clock_set( rtems_time_of_day *time_buffer ) { 10bf58: 55 push %ebp 10bf59: 89 e5 mov %esp,%ebp 10bf5b: 53 push %ebx 10bf5c: 83 ec 14 sub $0x14,%esp 10bf5f: 8b 5d 08 mov 0x8(%ebp),%ebx struct timespec newtime; if ( !time_buffer ) 10bf62: 85 db test %ebx,%ebx 10bf64: 74 66 je 10bfcc return RTEMS_INVALID_ADDRESS; if ( _TOD_Validate( time_buffer ) ) { 10bf66: 83 ec 0c sub $0xc,%esp 10bf69: 53 push %ebx 10bf6a: e8 39 01 00 00 call 10c0a8 <_TOD_Validate> <== ALWAYS TAKEN 10bf6f: 83 c4 10 add $0x10,%esp 10bf72: 84 c0 test %al,%al 10bf74: 75 0a jne 10bf80 10bf76: b8 14 00 00 00 mov $0x14,%eax _TOD_Set( &newtime ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } return RTEMS_INVALID_CLOCK; } 10bf7b: 8b 5d fc mov -0x4(%ebp),%ebx 10bf7e: c9 leave 10bf7f: c3 ret if ( !time_buffer ) return RTEMS_INVALID_ADDRESS; if ( _TOD_Validate( time_buffer ) ) { newtime.tv_sec = _TOD_To_seconds( time_buffer ); 10bf80: 83 ec 0c sub $0xc,%esp 10bf83: 53 push %ebx 10bf84: e8 93 00 00 00 call 10c01c <_TOD_To_seconds> <== ALWAYS TAKEN 10bf89: 89 45 f0 mov %eax,-0x10(%ebp) newtime.tv_nsec = time_buffer->ticks * 10bf8c: 8b 43 18 mov 0x18(%ebx),%eax 10bf8f: 0f af 05 2c 62 12 00 imul 0x12622c,%eax 10bf96: 8d 04 80 lea (%eax,%eax,4),%eax 10bf99: 8d 04 80 lea (%eax,%eax,4),%eax 10bf9c: 8d 04 80 lea (%eax,%eax,4),%eax 10bf9f: c1 e0 03 shl $0x3,%eax 10bfa2: 89 45 f4 mov %eax,-0xc(%ebp) rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10bfa5: a1 18 22 13 00 mov 0x132218,%eax 10bfaa: 40 inc %eax 10bfab: a3 18 22 13 00 mov %eax,0x132218 rtems_configuration_get_nanoseconds_per_tick(); _Thread_Disable_dispatch(); _TOD_Set( &newtime ); 10bfb0: 8d 45 f0 lea -0x10(%ebp),%eax 10bfb3: 89 04 24 mov %eax,(%esp) 10bfb6: e8 11 19 00 00 call 10d8cc <_TOD_Set> _Thread_Enable_dispatch(); 10bfbb: e8 20 2c 00 00 call 10ebe0 <_Thread_Enable_dispatch> 10bfc0: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 10bfc2: 83 c4 10 add $0x10,%esp } return RTEMS_INVALID_CLOCK; } 10bfc5: 8b 5d fc mov -0x4(%ebp),%ebx 10bfc8: c9 leave 10bfc9: c3 ret 10bfca: 66 90 xchg %ax,%ax <== NOT EXECUTED rtems_time_of_day *time_buffer ) { struct timespec newtime; if ( !time_buffer ) 10bfcc: b8 09 00 00 00 mov $0x9,%eax _TOD_Set( &newtime ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } return RTEMS_INVALID_CLOCK; } 10bfd1: 8b 5d fc mov -0x4(%ebp),%ebx 10bfd4: c9 leave 10bfd5: c3 ret 0010ae70 : * error code - if unsuccessful */ rtems_status_code rtems_clock_set_nanoseconds_extension( rtems_nanoseconds_extension_routine routine ) { 10ae70: 55 push %ebp 10ae71: 89 e5 mov %esp,%ebp 10ae73: 8b 45 08 mov 0x8(%ebp),%eax if ( !routine ) 10ae76: 85 c0 test %eax,%eax 10ae78: 74 0a je 10ae84 return RTEMS_INVALID_ADDRESS; _Watchdog_Nanoseconds_since_tick_handler = routine; 10ae7a: a3 a4 75 12 00 mov %eax,0x1275a4 10ae7f: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; } 10ae81: c9 leave 10ae82: c3 ret 10ae83: 90 nop <== NOT EXECUTED */ rtems_status_code rtems_clock_set_nanoseconds_extension( rtems_nanoseconds_extension_routine routine ) { if ( !routine ) 10ae84: b0 09 mov $0x9,%al return RTEMS_INVALID_ADDRESS; _Watchdog_Nanoseconds_since_tick_handler = routine; return RTEMS_SUCCESSFUL; } 10ae86: c9 leave 10ae87: c3 ret 0010ae88 : * * NOTE: This routine only works for leap-years through 2099. */ rtems_status_code rtems_clock_tick( void ) { 10ae88: 55 push %ebp 10ae89: 89 e5 mov %esp,%ebp 10ae8b: 83 ec 08 sub $0x8,%esp _TOD_Tickle_ticks(); 10ae8e: e8 c5 14 00 00 call 10c358 <_TOD_Tickle_ticks> */ RTEMS_INLINE_ROUTINE void _Watchdog_Tickle_ticks( void ) { _Watchdog_Tickle( &_Watchdog_Ticks_chain ); 10ae93: 83 ec 0c sub $0xc,%esp 10ae96: 68 b8 74 12 00 push $0x1274b8 10ae9b: e8 04 37 00 00 call 10e5a4 <_Watchdog_Tickle> _Watchdog_Tickle_ticks(); _Thread_Tickle_timeslice(); 10aea0: e8 7f 31 00 00 call 10e024 <_Thread_Tickle_timeslice> * otherwise. */ RTEMS_INLINE_ROUTINE bool _Thread_Is_context_switch_necessary( void ) { return ( _Context_Switch_necessary ); 10aea5: a0 a8 74 12 00 mov 0x1274a8,%al if ( _Thread_Is_context_switch_necessary() && 10aeaa: 83 c4 10 add $0x10,%esp 10aead: 84 c0 test %al,%al 10aeaf: 74 09 je 10aeba * otherwise. */ RTEMS_INLINE_ROUTINE bool _Thread_Is_dispatching_enabled( void ) { return ( _Thread_Dispatch_disable_level == 0 ); 10aeb1: a1 d8 73 12 00 mov 0x1273d8,%eax 10aeb6: 85 c0 test %eax,%eax 10aeb8: 74 06 je 10aec0 _Thread_Is_dispatching_enabled() ) _Thread_Dispatch(); return RTEMS_SUCCESSFUL; } 10aeba: 31 c0 xor %eax,%eax 10aebc: c9 leave 10aebd: c3 ret 10aebe: 66 90 xchg %ax,%ax <== NOT EXECUTED _Thread_Tickle_timeslice(); if ( _Thread_Is_context_switch_necessary() && _Thread_Is_dispatching_enabled() ) _Thread_Dispatch(); 10aec0: e8 93 24 00 00 call 10d358 <_Thread_Dispatch> return RTEMS_SUCCESSFUL; } 10aec5: 31 c0 xor %eax,%eax 10aec7: c9 leave 10aec8: c3 ret 0010884c : void rtems_cpu_usage_report( void ) { 10884c: 55 push %ebp 10884d: 89 e5 mov %esp,%ebp 10884f: 83 ec 10 sub $0x10,%esp rtems_cpu_usage_report_with_plugin( NULL, printk_plugin ); 108852: 68 e8 9c 10 00 push $0x109ce8 108857: 6a 00 push $0x0 108859: e8 6e fe ff ff call 1086cc <== ALWAYS TAKEN 10885e: 83 c4 10 add $0x10,%esp } 108861: c9 leave 108862: c3 ret 001086cc : void rtems_cpu_usage_report_with_plugin( void *context, rtems_printk_plugin_t print ) { 1086cc: 55 push %ebp 1086cd: 89 e5 mov %esp,%ebp 1086cf: 57 push %edi 1086d0: 56 push %esi 1086d1: 53 push %ebx 1086d2: 83 ec 6c sub $0x6c,%esp 1086d5: 8b 7d 08 mov 0x8(%ebp),%edi Timestamp_Control uptime, total, ran; #else uint32_t total_units = 0; #endif if ( !print ) 1086d8: 8b 45 0c mov 0xc(%ebp),%eax 1086db: 85 c0 test %eax,%eax 1086dd: 0f 84 5f 01 00 00 je 108842 <== 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 ); 1086e3: 83 ec 0c sub $0xc,%esp 1086e6: 8d 45 d8 lea -0x28(%ebp),%eax 1086e9: 50 push %eax 1086ea: e8 51 51 00 00 call 10d840 <_TOD_Get_uptime> _Timestamp_Subtract( &CPU_usage_Uptime_at_last_reset, &uptime, &total ); 1086ef: 83 c4 0c add $0xc,%esp 1086f2: 8d 55 d0 lea -0x30(%ebp),%edx 1086f5: 52 push %edx 1086f6: 8d 4d d8 lea -0x28(%ebp),%ecx 1086f9: 51 push %ecx 1086fa: 68 2c 28 13 00 push $0x13282c 1086ff: e8 c8 73 00 00 call 10facc <_Timespec_Subtract> } } } #endif (*print)( 108704: 5b pop %ebx 108705: 5e pop %esi 108706: 68 68 2f 12 00 push $0x122f68 10870b: 57 push %edi 10870c: ff 55 0c call *0xc(%ebp) 10870f: c7 45 a4 01 00 00 00 movl $0x1,-0x5c(%ebp) 108716: 83 c4 10 add $0x10,%esp ); for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { if ( !_Objects_Information_table[ api_index ] ) 108719: 8b 5d a4 mov -0x5c(%ebp),%ebx 10871c: 8b 04 9d ec 21 13 00 mov 0x1321ec(,%ebx,4),%eax 108723: 85 c0 test %eax,%eax 108725: 0f 84 ed 00 00 00 je 108818 continue; information = _Objects_Information_table[ api_index ][ 1 ]; 10872b: 8b 70 04 mov 0x4(%eax),%esi if ( information ) { 10872e: 85 f6 test %esi,%esi 108730: 0f 84 e2 00 00 00 je 108818 <== ALWAYS TAKEN for ( i=1 ; i <= information->maximum ; i++ ) { 108736: 66 83 7e 10 00 cmpw $0x0,0x10(%esi) 10873b: 0f 84 d7 00 00 00 je 108818 108741: bb 01 00 00 00 mov $0x1,%ebx if ( _Thread_Executing->Object.id == the_thread->Object.id ) { Timestamp_Control used; _Timestamp_Subtract( &_Thread_Time_of_last_context_switch, &uptime, &used ); _Timestamp_Add_to( &ran, &used ); 108746: 89 5d 94 mov %ebx,-0x6c(%ebp) 108749: eb 4b jmp 108796 <== ALWAYS TAKEN 10874b: 90 nop <== NOT EXECUTED }; _Timestamp_Divide( &ran, &total, &ival, &fval ); 10874c: 8d 5d e0 lea -0x20(%ebp),%ebx 10874f: 53 push %ebx 108750: 8d 45 e4 lea -0x1c(%ebp),%eax 108753: 50 push %eax 108754: 8d 55 d0 lea -0x30(%ebp),%edx 108757: 52 push %edx 108758: 8d 4d c8 lea -0x38(%ebp),%ecx 10875b: 51 push %ecx 10875c: e8 97 72 00 00 call 10f9f8 <_Timespec_Divide> /* * Print the information */ (*print)( context, 108761: 58 pop %eax 108762: 5a pop %edx 108763: ff 75 e0 pushl -0x20(%ebp) 108766: ff 75 e4 pushl -0x1c(%ebp) 108769: ba d3 4d 62 10 mov $0x10624dd3,%edx 10876e: 8b 45 cc mov -0x34(%ebp),%eax 108771: f7 e2 mul %edx 108773: c1 ea 06 shr $0x6,%edx 108776: 52 push %edx 108777: ff 75 c8 pushl -0x38(%ebp) 10877a: 68 db 31 12 00 push $0x1231db 10877f: 57 push %edi 108780: ff 55 0c call *0xc(%ebp) 108783: 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++ ) { 108786: ff 45 94 incl -0x6c(%ebp) 108789: 0f b7 46 10 movzwl 0x10(%esi),%eax 10878d: 3b 45 94 cmp -0x6c(%ebp),%eax 108790: 0f 82 82 00 00 00 jb 108818 the_thread = (Thread_Control *)information->local_table[ i ]; 108796: 8b 46 1c mov 0x1c(%esi),%eax 108799: 8b 4d 94 mov -0x6c(%ebp),%ecx 10879c: 8b 14 88 mov (%eax,%ecx,4),%edx if ( !the_thread ) 10879f: 85 d2 test %edx,%edx 1087a1: 74 e3 je 108786 <== ALWAYS TAKEN continue; rtems_object_get_name( the_thread->Object.id, sizeof(name), name ); 1087a3: 51 push %ecx 1087a4: 8d 5d b3 lea -0x4d(%ebp),%ebx 1087a7: 53 push %ebx 1087a8: 6a 0d push $0xd 1087aa: ff 72 08 pushl 0x8(%edx) 1087ad: 89 55 a0 mov %edx,-0x60(%ebp) 1087b0: e8 83 3d 00 00 call 10c538 (*print)( 1087b5: 53 push %ebx 1087b6: 8b 55 a0 mov -0x60(%ebp),%edx 1087b9: ff 72 08 pushl 0x8(%edx) 1087bc: 68 c8 31 12 00 push $0x1231c8 1087c1: 57 push %edi 1087c2: 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; 1087c5: 8b 55 a0 mov -0x60(%ebp),%edx 1087c8: 8b 8a 84 00 00 00 mov 0x84(%edx),%ecx 1087ce: 8b 9a 88 00 00 00 mov 0x88(%edx),%ebx 1087d4: 89 4d c8 mov %ecx,-0x38(%ebp) 1087d7: 89 5d cc mov %ebx,-0x34(%ebp) if ( _Thread_Executing->Object.id == the_thread->Object.id ) { 1087da: 83 c4 20 add $0x20,%esp 1087dd: a1 d8 22 13 00 mov 0x1322d8,%eax 1087e2: 8b 40 08 mov 0x8(%eax),%eax 1087e5: 3b 42 08 cmp 0x8(%edx),%eax 1087e8: 0f 85 5e ff ff ff jne 10874c Timestamp_Control used; _Timestamp_Subtract( 1087ee: 52 push %edx 1087ef: 8d 5d c0 lea -0x40(%ebp),%ebx 1087f2: 53 push %ebx 1087f3: 8d 45 d8 lea -0x28(%ebp),%eax 1087f6: 50 push %eax 1087f7: 68 e0 22 13 00 push $0x1322e0 1087fc: e8 cb 72 00 00 call 10facc <_Timespec_Subtract> &_Thread_Time_of_last_context_switch, &uptime, &used ); _Timestamp_Add_to( &ran, &used ); 108801: 59 pop %ecx 108802: 58 pop %eax 108803: 53 push %ebx 108804: 8d 4d c8 lea -0x38(%ebp),%ecx 108807: 51 push %ecx 108808: e8 af 71 00 00 call 10f9bc <_Timespec_Add_to> 10880d: 83 c4 10 add $0x10,%esp 108810: e9 37 ff ff ff jmp 10874c <== ALWAYS TAKEN 108815: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED "------------+----------------------------------------+---------------+---------\n" ); for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { 108818: ff 45 a4 incl -0x5c(%ebp) " ID | NAME | TICKS | PERCENT\n" #endif "------------+----------------------------------------+---------------+---------\n" ); for ( api_index = 1 ; 10881b: 83 7d a4 05 cmpl $0x5,-0x5c(%ebp) 10881f: 0f 85 f4 fe ff ff jne 108719 } } } #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ (*print)( 108825: ba d3 4d 62 10 mov $0x10624dd3,%edx 10882a: 8b 45 d4 mov -0x2c(%ebp),%eax 10882d: f7 e2 mul %edx 10882f: c1 ea 06 shr $0x6,%edx 108832: 52 push %edx 108833: ff 75 d0 pushl -0x30(%ebp) 108836: 68 dc 30 12 00 push $0x1230dc 10883b: 57 push %edi 10883c: ff 55 0c call *0xc(%ebp) 10883f: 83 c4 10 add $0x10,%esp "-------------------------------------------------------------------------------\n", _Watchdog_Ticks_since_boot - CPU_usage_Ticks_at_last_reset, total_units ); #endif } 108842: 8d 65 f4 lea -0xc(%ebp),%esp 108845: 5b pop %ebx 108846: 5e pop %esi 108847: 5f pop %edi 108848: c9 leave 108849: c3 ret 00112fdc : { 0, 0, 0 }, }; int rtems_deviceio_errno(rtems_status_code code) { 112fdc: 55 push %ebp <== NOT EXECUTED 112fdd: 89 e5 mov %esp,%ebp <== NOT EXECUTED 112fdf: 53 push %ebx <== NOT EXECUTED 112fe0: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED int rc; if ((rc = rtems_assoc_remote_by_local(errno_assoc, (uint32_t ) code))) 112fe3: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED 112fe6: 68 00 16 12 00 push $0x121600 <== NOT EXECUTED 112feb: e8 1c 00 00 00 call 11300c <== NOT EXECUTED 112ff0: 89 c3 mov %eax,%ebx <== NOT EXECUTED 112ff2: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 112ff5: 85 c0 test %eax,%eax <== NOT EXECUTED 112ff7: 74 07 je 113000 <== NOT EXECUTED { errno = rc; 112ff9: e8 12 08 00 00 call 113810 <__errno> <== NOT EXECUTED 112ffe: 89 18 mov %ebx,(%eax) <== NOT EXECUTED return -1; } return -1; } 113000: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 113005: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 113008: c9 leave <== NOT EXECUTED 113009: c3 ret <== NOT EXECUTED 0010ccf8 : int rtems_error( rtems_error_code_t error_flag, const char *printf_format, ... ) { 10ccf8: 55 push %ebp <== NOT EXECUTED 10ccf9: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10ccfb: 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( 10ccfe: 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); 10cd01: 8b 55 0c mov 0xc(%ebp),%edx <== NOT EXECUTED 10cd04: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 10cd07: e8 34 fe ff ff call 10cb40 <== NOT EXECUTED va_end(arglist); return chars_written; } 10cd0c: c9 leave <== NOT EXECUTED 10cd0d: c3 ret <== NOT EXECUTED 0010aecc : rtems_event_set event_in, rtems_option option_set, rtems_interval ticks, rtems_event_set *event_out ) { 10aecc: 55 push %ebp 10aecd: 89 e5 mov %esp,%ebp 10aecf: 83 ec 08 sub $0x8,%esp 10aed2: 8b 55 08 mov 0x8(%ebp),%edx 10aed5: 8b 45 14 mov 0x14(%ebp),%eax RTEMS_API_Control *api; if ( !event_out ) 10aed8: 85 c0 test %eax,%eax 10aeda: 74 44 je 10af20 return RTEMS_INVALID_ADDRESS; api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ]; 10aedc: 8b 0d 98 74 12 00 mov 0x127498,%ecx 10aee2: 8b 89 f4 00 00 00 mov 0xf4(%ecx),%ecx if ( _Event_sets_Is_empty( event_in ) ) { 10aee8: 85 d2 test %edx,%edx 10aeea: 75 08 jne 10aef4 *event_out = api->pending_events; 10aeec: 8b 11 mov (%ecx),%edx 10aeee: 89 10 mov %edx,(%eax) 10aef0: 31 c0 xor %eax,%eax _Thread_Disable_dispatch(); _Event_Seize( event_in, option_set, ticks, event_out ); _Thread_Enable_dispatch(); return( _Thread_Executing->Wait.return_code ); } 10aef2: c9 leave 10aef3: c3 ret rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10aef4: 8b 0d d8 73 12 00 mov 0x1273d8,%ecx 10aefa: 41 inc %ecx 10aefb: 89 0d d8 73 12 00 mov %ecx,0x1273d8 *event_out = api->pending_events; return RTEMS_SUCCESSFUL; } _Thread_Disable_dispatch(); _Event_Seize( event_in, option_set, ticks, event_out ); 10af01: 50 push %eax 10af02: ff 75 10 pushl 0x10(%ebp) 10af05: ff 75 0c pushl 0xc(%ebp) 10af08: 52 push %edx 10af09: e8 16 00 00 00 call 10af24 <_Event_Seize> <== ALWAYS TAKEN _Thread_Enable_dispatch(); 10af0e: e8 a1 25 00 00 call 10d4b4 <_Thread_Enable_dispatch> return( _Thread_Executing->Wait.return_code ); 10af13: a1 98 74 12 00 mov 0x127498,%eax 10af18: 8b 40 34 mov 0x34(%eax),%eax 10af1b: 83 c4 10 add $0x10,%esp } 10af1e: c9 leave 10af1f: c3 ret rtems_event_set *event_out ) { RTEMS_API_Control *api; if ( !event_out ) 10af20: b0 09 mov $0x9,%al _Thread_Disable_dispatch(); _Event_Seize( event_in, option_set, ticks, event_out ); _Thread_Enable_dispatch(); return( _Thread_Executing->Wait.return_code ); } 10af22: c9 leave 10af23: c3 ret 0010b050 : rtems_status_code rtems_event_send( rtems_id id, rtems_event_set event_in ) { 10b050: 55 push %ebp 10b051: 89 e5 mov %esp,%ebp 10b053: 53 push %ebx 10b054: 83 ec 1c sub $0x1c,%esp register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; the_thread = _Thread_Get( id, &location ); 10b057: 8d 45 f4 lea -0xc(%ebp),%eax 10b05a: 50 push %eax 10b05b: ff 75 08 pushl 0x8(%ebp) 10b05e: e8 75 24 00 00 call 10d4d8 <_Thread_Get> switch ( location ) { 10b063: 83 c4 10 add $0x10,%esp 10b066: 8b 55 f4 mov -0xc(%ebp),%edx 10b069: 85 d2 test %edx,%edx 10b06b: 75 2b jne 10b098 case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; 10b06d: 8b 90 f4 00 00 00 mov 0xf4(%eax),%edx rtems_event_set *the_event_set ) { ISR_Level level; _ISR_Disable( level ); 10b073: 9c pushf 10b074: fa cli 10b075: 59 pop %ecx *the_event_set |= the_new_events; 10b076: 8b 5d 0c mov 0xc(%ebp),%ebx 10b079: 09 1a or %ebx,(%edx) _ISR_Enable( level ); 10b07b: 51 push %ecx 10b07c: 9d popf _Event_sets_Post( event_in, &api->pending_events ); _Event_Surrender( the_thread ); 10b07d: 83 ec 0c sub $0xc,%esp 10b080: 50 push %eax 10b081: e8 1e 00 00 00 call 10b0a4 <_Event_Surrender> <== ALWAYS TAKEN _Thread_Enable_dispatch(); 10b086: e8 29 24 00 00 call 10d4b4 <_Thread_Enable_dispatch> 10b08b: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 10b08d: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10b090: 8b 5d fc mov -0x4(%ebp),%ebx 10b093: c9 leave 10b094: c3 ret 10b095: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; the_thread = _Thread_Get( id, &location ); switch ( location ) { 10b098: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10b09d: 8b 5d fc mov -0x4(%ebp),%ebx 10b0a0: c9 leave 10b0a1: c3 ret 00110768 : rtems_status_code rtems_extension_create( rtems_name name, const rtems_extensions_table *extension_table, rtems_id *id ) { 110768: 55 push %ebp 110769: 89 e5 mov %esp,%ebp 11076b: 57 push %edi 11076c: 56 push %esi 11076d: 53 push %ebx 11076e: 83 ec 1c sub $0x1c,%esp 110771: 8b 75 0c mov 0xc(%ebp),%esi 110774: 8b 5d 10 mov 0x10(%ebp),%ebx Extension_Control *the_extension; if ( !id ) 110777: 85 db test %ebx,%ebx 110779: 0f 84 85 00 00 00 je 110804 return RTEMS_INVALID_ADDRESS; if ( !rtems_is_name_valid( name ) ) 11077f: 8b 45 08 mov 0x8(%ebp),%eax 110782: 85 c0 test %eax,%eax 110784: 75 0e jne 110794 110786: b8 03 00 00 00 mov $0x3,%eax ); *id = the_extension->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 11078b: 8d 65 f4 lea -0xc(%ebp),%esp 11078e: 5b pop %ebx 11078f: 5e pop %esi 110790: 5f pop %edi 110791: c9 leave 110792: c3 ret 110793: 90 nop <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 110794: a1 f8 4f 13 00 mov 0x134ff8,%eax 110799: 40 inc %eax 11079a: a3 f8 4f 13 00 mov %eax,0x134ff8 #ifndef __EXTENSION_MANAGER_inl #define __EXTENSION_MANAGER_inl RTEMS_INLINE_ROUTINE Extension_Control *_Extension_Allocate( void ) { return (Extension_Control *) _Objects_Allocate( &_Extension_Information ); 11079f: 83 ec 0c sub $0xc,%esp 1107a2: 68 80 52 13 00 push $0x135280 1107a7: e8 e4 0c 00 00 call 111490 <_Objects_Allocate> _Thread_Disable_dispatch(); /* to prevent deletion */ the_extension = _Extension_Allocate(); if ( !the_extension ) { 1107ac: 83 c4 10 add $0x10,%esp 1107af: 85 c0 test %eax,%eax 1107b1: 74 45 je 1107f8 RTEMS_INLINE_ROUTINE void _User_extensions_Add_set_with_table( User_extensions_Control *extension, const User_extensions_Table *extension_table ) { extension->Callouts = *extension_table; 1107b3: 8d 78 24 lea 0x24(%eax),%edi 1107b6: b9 08 00 00 00 mov $0x8,%ecx 1107bb: f3 a5 rep movsl %ds:(%esi),%es:(%edi) _User_extensions_Add_set( extension ); 1107bd: 83 ec 0c sub $0xc,%esp 1107c0: 8d 50 10 lea 0x10(%eax),%edx 1107c3: 52 push %edx 1107c4: 89 45 e4 mov %eax,-0x1c(%ebp) 1107c7: e8 3c 27 00 00 call 112f08 <_User_extensions_Add_set> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 1107cc: 8b 45 e4 mov -0x1c(%ebp),%eax 1107cf: 8b 50 08 mov 0x8(%eax),%edx 1107d2: 0f b7 f2 movzwl %dx,%esi 1107d5: 8b 0d 9c 52 13 00 mov 0x13529c,%ecx 1107db: 89 04 b1 mov %eax,(%ecx,%esi,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 1107de: 8b 4d 08 mov 0x8(%ebp),%ecx 1107e1: 89 48 0c mov %ecx,0xc(%eax) &_Extension_Information, &the_extension->Object, (Objects_Name) name ); *id = the_extension->Object.id; 1107e4: 89 13 mov %edx,(%ebx) _Thread_Enable_dispatch(); 1107e6: e8 39 1a 00 00 call 112224 <_Thread_Enable_dispatch> 1107eb: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 1107ed: 83 c4 10 add $0x10,%esp } 1107f0: 8d 65 f4 lea -0xc(%ebp),%esp 1107f3: 5b pop %ebx 1107f4: 5e pop %esi 1107f5: 5f pop %edi 1107f6: c9 leave 1107f7: c3 ret _Thread_Disable_dispatch(); /* to prevent deletion */ the_extension = _Extension_Allocate(); if ( !the_extension ) { _Thread_Enable_dispatch(); 1107f8: e8 27 1a 00 00 call 112224 <_Thread_Enable_dispatch> 1107fd: b8 05 00 00 00 mov $0x5,%eax return RTEMS_TOO_MANY; 110802: eb 87 jmp 11078b <== ALWAYS TAKEN rtems_id *id ) { Extension_Control *the_extension; if ( !id ) 110804: b8 09 00 00 00 mov $0x9,%eax 110809: eb 80 jmp 11078b <== ALWAYS TAKEN 0011080c : #include rtems_status_code rtems_extension_delete( rtems_id id ) { 11080c: 55 push %ebp 11080d: 89 e5 mov %esp,%ebp 11080f: 53 push %ebx 110810: 83 ec 18 sub $0x18,%esp RTEMS_INLINE_ROUTINE Extension_Control *_Extension_Get ( Objects_Id id, Objects_Locations *location ) { return (Extension_Control *) 110813: 8d 45 f4 lea -0xc(%ebp),%eax 110816: 50 push %eax 110817: ff 75 08 pushl 0x8(%ebp) 11081a: 68 80 52 13 00 push $0x135280 11081f: e8 1c 11 00 00 call 111940 <_Objects_Get> 110824: 89 c3 mov %eax,%ebx Extension_Control *the_extension; Objects_Locations location; the_extension = _Extension_Get( id, &location ); switch ( location ) { 110826: 83 c4 10 add $0x10,%esp 110829: 8b 55 f4 mov -0xc(%ebp),%edx 11082c: 85 d2 test %edx,%edx 11082e: 75 38 jne 110868 case OBJECTS_LOCAL: _User_extensions_Remove_set( &the_extension->Extension ); 110830: 83 ec 0c sub $0xc,%esp 110833: 8d 40 10 lea 0x10(%eax),%eax 110836: 50 push %eax 110837: e8 cc 27 00 00 call 113008 <_User_extensions_Remove_set> _Objects_Close( &_Extension_Information, &the_extension->Object ); 11083c: 59 pop %ecx 11083d: 58 pop %eax 11083e: 53 push %ebx 11083f: 68 80 52 13 00 push $0x135280 110844: e8 c3 0c 00 00 call 11150c <_Objects_Close> RTEMS_INLINE_ROUTINE void _Extension_Free ( Extension_Control *the_extension ) { _Objects_Free( &_Extension_Information, &the_extension->Object ); 110849: 58 pop %eax 11084a: 5a pop %edx 11084b: 53 push %ebx 11084c: 68 80 52 13 00 push $0x135280 110851: e8 ba 0f 00 00 call 111810 <_Objects_Free> <== ALWAYS TAKEN _Extension_Free( the_extension ); _Thread_Enable_dispatch(); 110856: e8 c9 19 00 00 call 112224 <_Thread_Enable_dispatch> 11085b: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 11085d: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 110860: 8b 5d fc mov -0x4(%ebp),%ebx 110863: c9 leave 110864: c3 ret 110865: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED { Extension_Control *the_extension; Objects_Locations location; the_extension = _Extension_Get( id, &location ); switch ( location ) { 110868: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11086d: 8b 5d fc mov -0x4(%ebp),%ebx 110870: c9 leave 110871: c3 ret 00107e04 : } int rtems_filesystem_dirname( const char *pathname ) { 107e04: 55 push %ebp 107e05: 89 e5 mov %esp,%ebp 107e07: 57 push %edi 107e08: 8b 55 08 mov 0x8(%ebp),%edx int len = strlen( pathname ); 107e0b: 31 c0 xor %eax,%eax 107e0d: b9 ff ff ff ff mov $0xffffffff,%ecx 107e12: 89 d7 mov %edx,%edi 107e14: f2 ae repnz scas %es:(%edi),%al 107e16: f7 d1 not %ecx 107e18: 8d 79 ff lea -0x1(%ecx),%edi 107e1b: 89 f8 mov %edi,%eax while ( len ) { 107e1d: 85 ff test %edi,%edi 107e1f: 74 2e je 107e4f <== ALWAYS TAKEN len--; 107e21: 8d 41 fe lea -0x2(%ecx),%eax if ( rtems_filesystem_is_separator( pathname[len] ) ) 107e24: 8a 0c 02 mov (%edx,%eax,1),%cl 107e27: 80 f9 2f cmp $0x2f,%cl 107e2a: 74 23 je 107e4f <== ALWAYS TAKEN 107e2c: 80 f9 5c cmp $0x5c,%cl 107e2f: 74 1e je 107e4f <== ALWAYS TAKEN 107e31: 84 c9 test %cl,%cl 107e33: 74 1a je 107e4f <== ALWAYS TAKEN 107e35: 01 fa add %edi,%edx 107e37: 90 nop const char *pathname ) { int len = strlen( pathname ); while ( len ) { 107e38: 85 c0 test %eax,%eax 107e3a: 74 13 je 107e4f <== ALWAYS TAKEN len--; 107e3c: 48 dec %eax if ( rtems_filesystem_is_separator( pathname[len] ) ) 107e3d: 8a 4a fe mov -0x2(%edx),%cl 107e40: 80 f9 2f cmp $0x2f,%cl 107e43: 74 0a je 107e4f 107e45: 80 f9 5c cmp $0x5c,%cl 107e48: 74 05 je 107e4f <== ALWAYS TAKEN 107e4a: 4a dec %edx 107e4b: 84 c9 test %cl,%cl 107e4d: 75 e9 jne 107e38 <== NEVER TAKEN break; } return len; } 107e4f: 5f pop %edi 107e50: c9 leave 107e51: c3 ret 00107f28 : int pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc, int follow_link ) { 107f28: 55 push %ebp 107f29: 89 e5 mov %esp,%ebp 107f2b: 57 push %edi 107f2c: 56 push %esi 107f2d: 53 push %ebx 107f2e: 83 ec 1c sub $0x1c,%esp 107f31: 8b 55 08 mov 0x8(%ebp),%edx 107f34: 8b 45 0c mov 0xc(%ebp),%eax 107f37: 89 45 e4 mov %eax,-0x1c(%ebp) 107f3a: 8b 45 10 mov 0x10(%ebp),%eax 107f3d: 89 45 e0 mov %eax,-0x20(%ebp) 107f40: 8b 45 14 mov 0x14(%ebp),%eax 107f43: 8b 5d 18 mov 0x18(%ebp),%ebx /* * Verify Input parameters. */ if ( !pathname ) 107f46: 85 d2 test %edx,%edx 107f48: 0f 84 80 00 00 00 je 107fce <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EFAULT ); if ( !pathloc ) 107f4e: 85 c0 test %eax,%eax 107f50: 74 64 je 107fb6 <== ALWAYS TAKEN /* * Evaluate the path using the optable evalpath. */ rtems_filesystem_get_start_loc( pathname, &i, pathloc ); 107f52: 8a 0a mov (%edx),%cl 107f54: 80 f9 2f cmp $0x2f,%cl 107f57: 74 09 je 107f62 107f59: 80 f9 5c cmp $0x5c,%cl 107f5c: 74 04 je 107f62 <== ALWAYS TAKEN 107f5e: 84 c9 test %cl,%cl 107f60: 75 3e jne 107fa0 <== NEVER TAKEN 107f62: 8b 35 f8 4f 12 00 mov 0x124ff8,%esi 107f68: 83 c6 18 add $0x18,%esi 107f6b: b9 05 00 00 00 mov $0x5,%ecx 107f70: 89 c7 mov %eax,%edi 107f72: f3 a5 rep movsl %ds:(%esi),%es:(%edi) 107f74: b1 01 mov $0x1,%cl 107f76: be 01 00 00 00 mov $0x1,%esi /* * We evaluation the path relative to the start location we get got. */ return rtems_filesystem_evaluate_relative_path( &pathname[i], 107f7b: 89 5d 18 mov %ebx,0x18(%ebp) 107f7e: 89 45 14 mov %eax,0x14(%ebp) 107f81: 8b 45 e0 mov -0x20(%ebp),%eax 107f84: 89 45 10 mov %eax,0x10(%ebp) 107f87: 8b 45 e4 mov -0x1c(%ebp),%eax 107f8a: 29 f0 sub %esi,%eax 107f8c: 89 45 0c mov %eax,0xc(%ebp) 107f8f: 01 ca add %ecx,%edx 107f91: 89 55 08 mov %edx,0x8(%ebp) pathnamelen - i, flags, pathloc, follow_link ); } 107f94: 83 c4 1c add $0x1c,%esp 107f97: 5b pop %ebx 107f98: 5e pop %esi 107f99: 5f pop %edi 107f9a: 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], 107f9b: e9 b4 fe ff ff jmp 107e54 <== ALWAYS TAKEN /* * Evaluate the path using the optable evalpath. */ rtems_filesystem_get_start_loc( pathname, &i, pathloc ); 107fa0: 8b 35 f8 4f 12 00 mov 0x124ff8,%esi 107fa6: 83 c6 04 add $0x4,%esi 107fa9: b9 05 00 00 00 mov $0x5,%ecx 107fae: 89 c7 mov %eax,%edi 107fb0: f3 a5 rep movsl %ds:(%esi),%es:(%edi) 107fb2: 31 f6 xor %esi,%esi 107fb4: eb c5 jmp 107f7b <== ALWAYS TAKEN if ( !pathname ) rtems_set_errno_and_return_minus_one( EFAULT ); if ( !pathloc ) rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */ 107fb6: e8 55 b8 00 00 call 113810 <__errno> <== NOT EXECUTED 107fbb: c7 00 05 00 00 00 movl $0x5,(%eax) <== NOT EXECUTED return rtems_filesystem_evaluate_relative_path( &pathname[i], pathnamelen - i, flags, pathloc, follow_link ); } 107fc1: b8 ff ff ff ff mov $0xffffffff,%eax 107fc6: 83 c4 1c add $0x1c,%esp 107fc9: 5b pop %ebx 107fca: 5e pop %esi 107fcb: 5f pop %edi 107fcc: c9 leave 107fcd: c3 ret /* * Verify Input parameters. */ if ( !pathname ) rtems_set_errno_and_return_minus_one( EFAULT ); 107fce: e8 3d b8 00 00 call 113810 <__errno> 107fd3: c7 00 0e 00 00 00 movl $0xe,(%eax) 107fd9: eb e6 jmp 107fc1 <== ALWAYS TAKEN 00107e54 : int pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc, int follow_link ) { 107e54: 55 push %ebp 107e55: 89 e5 mov %esp,%ebp 107e57: 57 push %edi 107e58: 56 push %esi 107e59: 53 push %ebx 107e5a: 83 ec 1c sub $0x1c,%esp 107e5d: 8b 45 08 mov 0x8(%ebp),%eax 107e60: 8b 4d 0c mov 0xc(%ebp),%ecx 107e63: 8b 7d 10 mov 0x10(%ebp),%edi 107e66: 8b 5d 14 mov 0x14(%ebp),%ebx 107e69: 8b 55 18 mov 0x18(%ebp),%edx 107e6c: 89 55 e4 mov %edx,-0x1c(%ebp) /* * Verify Input parameters. */ if ( !pathname ) 107e6f: 85 c0 test %eax,%eax 107e71: 0f 84 8c 00 00 00 je 107f03 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EFAULT ); if ( !pathloc ) 107e77: 85 db test %ebx,%ebx 107e79: 0f 84 96 00 00 00 je 107f15 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */ if ( !pathloc->ops->evalpath_h ) 107e7f: 8b 53 0c mov 0xc(%ebx),%edx 107e82: 8b 12 mov (%edx),%edx 107e84: 85 d2 test %edx,%edx 107e86: 74 69 je 107ef1 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); result = (*pathloc->ops->evalpath_h)( pathname, pathnamelen, flags, pathloc ); 107e88: 53 push %ebx 107e89: 57 push %edi 107e8a: 51 push %ecx 107e8b: 50 push %eax 107e8c: ff d2 call *%edx 107e8e: 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 ) { 107e90: 83 c4 10 add $0x10,%esp 107e93: 85 c0 test %eax,%eax 107e95: 75 25 jne 107ebc 107e97: 8b 45 e4 mov -0x1c(%ebp),%eax 107e9a: 85 c0 test %eax,%eax 107e9c: 74 1e je 107ebc if ( !pathloc->ops->node_type_h ){ 107e9e: 8b 53 0c mov 0xc(%ebx),%edx 107ea1: 8b 42 10 mov 0x10(%edx),%eax 107ea4: 85 c0 test %eax,%eax 107ea6: 74 39 je 107ee1 <== ALWAYS TAKEN rtems_filesystem_freenode( pathloc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } type = (*pathloc->ops->node_type_h)( pathloc ); 107ea8: 83 ec 0c sub $0xc,%esp 107eab: 53 push %ebx 107eac: ff d0 call *%eax if ( ( type == RTEMS_FILESYSTEM_HARD_LINK ) || 107eae: 83 e8 03 sub $0x3,%eax 107eb1: 83 c4 10 add $0x10,%esp 107eb4: 83 f8 01 cmp $0x1,%eax 107eb7: 76 0f jbe 107ec8 107eb9: 8d 76 00 lea 0x0(%esi),%esi result = (*pathloc->ops->eval_link_h)( pathloc, flags ); } } return result; } 107ebc: 89 f0 mov %esi,%eax 107ebe: 8d 65 f4 lea -0xc(%ebp),%esp 107ec1: 5b pop %ebx 107ec2: 5e pop %esi 107ec3: 5f pop %edi 107ec4: c9 leave 107ec5: c3 ret 107ec6: 66 90 xchg %ax,%ax <== NOT EXECUTED type = (*pathloc->ops->node_type_h)( pathloc ); if ( ( type == RTEMS_FILESYSTEM_HARD_LINK ) || ( type == RTEMS_FILESYSTEM_SYM_LINK ) ) { if ( !pathloc->ops->eval_link_h ){ 107ec8: 8b 53 0c mov 0xc(%ebx),%edx 107ecb: 8b 42 34 mov 0x34(%edx),%eax 107ece: 85 c0 test %eax,%eax 107ed0: 74 0f je 107ee1 <== ALWAYS TAKEN * 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 ); 107ed2: 89 7d 0c mov %edi,0xc(%ebp) 107ed5: 89 5d 08 mov %ebx,0x8(%ebp) } } return result; } 107ed8: 8d 65 f4 lea -0xc(%ebp),%esp 107edb: 5b pop %ebx 107edc: 5e pop %esi 107edd: 5f pop %edi 107ede: 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 ); 107edf: ff e0 jmp *%eax if ( ( type == RTEMS_FILESYSTEM_HARD_LINK ) || ( type == RTEMS_FILESYSTEM_SYM_LINK ) ) { if ( !pathloc->ops->eval_link_h ){ rtems_filesystem_freenode( pathloc ); 107ee1: 8b 42 1c mov 0x1c(%edx),%eax <== NOT EXECUTED 107ee4: 85 c0 test %eax,%eax <== NOT EXECUTED 107ee6: 74 09 je 107ef1 <== NOT EXECUTED 107ee8: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 107eeb: 53 push %ebx <== NOT EXECUTED 107eec: ff d0 call *%eax <== NOT EXECUTED 107eee: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 107ef1: e8 1a b9 00 00 call 113810 <__errno> <== NOT EXECUTED 107ef6: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 107efc: be ff ff ff ff mov $0xffffffff,%esi <== NOT EXECUTED 107f01: eb b9 jmp 107ebc <== NOT EXECUTED /* * Verify Input parameters. */ if ( !pathname ) rtems_set_errno_and_return_minus_one( EFAULT ); 107f03: e8 08 b9 00 00 call 113810 <__errno> <== NOT EXECUTED 107f08: c7 00 0e 00 00 00 movl $0xe,(%eax) <== NOT EXECUTED 107f0e: be ff ff ff ff mov $0xffffffff,%esi <== NOT EXECUTED 107f13: eb a7 jmp 107ebc <== NOT EXECUTED if ( !pathloc ) rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */ 107f15: e8 f6 b8 00 00 call 113810 <__errno> <== NOT EXECUTED 107f1a: c7 00 05 00 00 00 movl $0x5,(%eax) <== NOT EXECUTED 107f20: be ff ff ff ff mov $0xffffffff,%esi <== NOT EXECUTED 107f25: eb 95 jmp 107ebc <== NOT EXECUTED 00107cc8 : * configuration is a single instantiation of the IMFS or miniIMFS with * a single "/dev" directory in it. */ void rtems_filesystem_initialize( void ) { 107cc8: 55 push %ebp 107cc9: 89 e5 mov %esp,%ebp 107ccb: 57 push %edi 107ccc: 56 push %esi 107ccd: 53 push %ebx 107cce: 83 ec 2c sub $0x2c,%esp /* * Set the default umask to "022". */ rtems_filesystem_umask = 022; 107cd1: a1 f8 4f 12 00 mov 0x124ff8,%eax 107cd6: c7 40 2c 12 00 00 00 movl $0x12,0x2c(%eax) init_fs_mount_table(); 107cdd: e8 36 07 00 00 call 108418 <== ALWAYS TAKEN /* * mount the first filesystem. */ if ( rtems_filesystem_mount_table_size == 0 ) 107ce2: a1 ac f3 11 00 mov 0x11f3ac,%eax 107ce7: 85 c0 test %eax,%eax 107ce9: 0f 84 b2 00 00 00 je 107da1 <== ALWAYS TAKEN rtems_fatal_error_occurred( 0xABCD0001 ); mt = &rtems_filesystem_mount_table[0]; 107cef: a1 54 31 12 00 mov 0x123154,%eax status = mount( 107cf4: 83 ec 0c sub $0xc,%esp 107cf7: ff 70 0c pushl 0xc(%eax) 107cfa: ff 70 08 pushl 0x8(%eax) 107cfd: ff 70 04 pushl 0x4(%eax) 107d00: ff 30 pushl (%eax) 107d02: 8d 45 e4 lea -0x1c(%ebp),%eax 107d05: 50 push %eax 107d06: e8 35 07 00 00 call 108440 <== ALWAYS TAKEN &entry, mt->fs_ops, mt->fsoptions, mt->device, mt->mount_point ); if ( status == -1 ) 107d0b: 83 c4 20 add $0x20,%esp 107d0e: 40 inc %eax 107d0f: 0f 84 a6 00 00 00 je 107dbb <== ALWAYS TAKEN rtems_fatal_error_occurred( 0xABCD0002 ); rtems_filesystem_link_counts = 0; 107d15: 8b 3d f8 4f 12 00 mov 0x124ff8,%edi 107d1b: 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; 107d21: 83 c7 18 add $0x18,%edi 107d24: 8b 75 e4 mov -0x1c(%ebp),%esi 107d27: 83 c6 1c add $0x1c,%esi 107d2a: b9 05 00 00 00 mov $0x5,%ecx 107d2f: f3 a5 rep movsl %ds:(%esi),%es:(%edi) /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 107d31: 83 ec 0c sub $0xc,%esp 107d34: 6a 00 push $0x0 107d36: 8d 5d d0 lea -0x30(%ebp),%ebx 107d39: 53 push %ebx 107d3a: 6a 00 push $0x0 107d3c: 6a 01 push $0x1 107d3e: 68 87 0c 12 00 push $0x120c87 107d43: e8 e0 01 00 00 call 107f28 <== ALWAYS TAKEN rtems_filesystem_root = loc; 107d48: 8b 3d f8 4f 12 00 mov 0x124ff8,%edi 107d4e: 83 c7 18 add $0x18,%edi 107d51: b9 05 00 00 00 mov $0x5,%ecx 107d56: 89 de mov %ebx,%esi 107d58: f3 a5 rep movsl %ds:(%esi),%es:(%edi) /* One more clone for the current node */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 107d5a: 83 c4 14 add $0x14,%esp 107d5d: 6a 00 push $0x0 107d5f: 53 push %ebx 107d60: 6a 00 push $0x0 107d62: 6a 01 push $0x1 107d64: 68 87 0c 12 00 push $0x120c87 107d69: e8 ba 01 00 00 call 107f28 <== ALWAYS TAKEN rtems_filesystem_current = loc; 107d6e: 8b 3d f8 4f 12 00 mov 0x124ff8,%edi 107d74: 83 c7 04 add $0x4,%edi 107d77: b9 05 00 00 00 mov $0x5,%ecx 107d7c: 89 de mov %ebx,%esi 107d7e: 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); 107d80: 83 c4 18 add $0x18,%esp 107d83: 68 ff 01 00 00 push $0x1ff 107d88: 68 89 0c 12 00 push $0x120c89 107d8d: e8 5a 05 00 00 call 1082ec <== ALWAYS TAKEN if ( status != 0 ) 107d92: 83 c4 10 add $0x10,%esp 107d95: 85 c0 test %eax,%eax 107d97: 75 15 jne 107dae <== ALWAYS TAKEN * it will be mounted onto is created. Moreover, if it is going to * use a device, then it is REALLY unfair to attempt this * before device drivers are initialized. So we return via a base * filesystem image and nothing auto-mounted at this point. */ } 107d99: 8d 65 f4 lea -0xc(%ebp),%esp 107d9c: 5b pop %ebx 107d9d: 5e pop %esi 107d9e: 5f pop %edi 107d9f: c9 leave 107da0: c3 ret /* * mount the first filesystem. */ if ( rtems_filesystem_mount_table_size == 0 ) rtems_fatal_error_occurred( 0xABCD0001 ); 107da1: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 107da4: 68 01 00 cd ab push $0xabcd0001 <== NOT EXECUTED 107da9: e8 ee 3d 00 00 call 10bb9c <== NOT EXECUTED * created that way by the IMFS. */ status = mkdir( "/dev", 0777); if ( status != 0 ) rtems_fatal_error_occurred( 0xABCD0003 ); 107dae: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 107db1: 68 03 00 cd ab push $0xabcd0003 <== NOT EXECUTED 107db6: e8 e1 3d 00 00 call 10bb9c <== NOT EXECUTED status = mount( &entry, mt->fs_ops, mt->fsoptions, mt->device, mt->mount_point ); if ( status == -1 ) rtems_fatal_error_occurred( 0xABCD0002 ); 107dbb: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 107dbe: 68 02 00 cd ab push $0xabcd0002 <== NOT EXECUTED 107dc3: e8 d4 3d 00 00 call 10bb9c <== NOT EXECUTED 001104a4 : ); bool rtems_filesystem_nodes_equal( const rtems_filesystem_location_info_t *loc1, const rtems_filesystem_location_info_t *loc2 ){ 1104a4: 55 push %ebp <== NOT EXECUTED 1104a5: 89 e5 mov %esp,%ebp <== NOT EXECUTED 1104a7: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 1104aa: 8b 10 mov (%eax),%edx <== NOT EXECUTED 1104ac: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED 1104af: 3b 10 cmp (%eax),%edx <== NOT EXECUTED 1104b1: 0f 94 c0 sete %al <== NOT EXECUTED return ( loc1->node_access == loc2->node_access ); } 1104b4: c9 leave <== NOT EXECUTED 1104b5: c3 ret <== NOT EXECUTED 00107dc8 : int rtems_filesystem_prefix_separators( const char *pathname, int pathnamelen ) { 107dc8: 55 push %ebp 107dc9: 89 e5 mov %esp,%ebp 107dcb: 53 push %ebx 107dcc: 8b 4d 08 mov 0x8(%ebp),%ecx 107dcf: 8b 5d 0c mov 0xc(%ebp),%ebx /* * Eat any separators at start of the path. */ int stripped = 0; while ( *pathname && pathnamelen && rtems_filesystem_is_separator( *pathname ) ) 107dd2: 8a 11 mov (%ecx),%dl 107dd4: 84 d2 test %dl,%dl 107dd6: 74 27 je 107dff <== ALWAYS TAKEN 107dd8: 85 db test %ebx,%ebx 107dda: 74 23 je 107dff <== ALWAYS TAKEN 107ddc: 31 c0 xor %eax,%eax 107dde: 66 90 xchg %ax,%ax 107de0: 80 fa 2f cmp $0x2f,%dl 107de3: 74 0b je 107df0 107de5: 80 fa 5c cmp $0x5c,%dl 107de8: 74 06 je 107df0 <== ALWAYS TAKEN pathname++; pathnamelen--; stripped++; } return stripped; } 107dea: 5b pop %ebx 107deb: c9 leave 107dec: c3 ret 107ded: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED int stripped = 0; while ( *pathname && pathnamelen && rtems_filesystem_is_separator( *pathname ) ) { pathname++; pathnamelen--; stripped++; 107df0: 40 inc %eax { /* * Eat any separators at start of the path. */ int stripped = 0; while ( *pathname && pathnamelen && rtems_filesystem_is_separator( *pathname ) ) 107df1: 8a 14 01 mov (%ecx,%eax,1),%dl 107df4: 84 d2 test %dl,%dl 107df6: 74 f2 je 107dea <== ALWAYS TAKEN 107df8: 39 c3 cmp %eax,%ebx 107dfa: 75 e4 jne 107de0 <== NEVER TAKEN pathname++; pathnamelen--; stripped++; } return stripped; } 107dfc: 5b pop %ebx <== NOT EXECUTED 107dfd: c9 leave <== NOT EXECUTED 107dfe: c3 ret <== NOT EXECUTED { /* * Eat any separators at start of the path. */ int stripped = 0; while ( *pathname && pathnamelen && rtems_filesystem_is_separator( *pathname ) ) 107dff: 31 c0 xor %eax,%eax 107e01: eb e7 jmp 107dea <== NOT EXECUTED 0010bac8 : #endif Objects_Information *_Internal_Objects[ OBJECTS_INTERNAL_CLASSES_LAST + 1 ]; void rtems_initialize_data_structures(void) { 10bac8: 55 push %ebp 10bac9: 89 e5 mov %esp,%ebp 10bacb: 83 ec 08 sub $0x8,%esp 10bace: c7 05 a0 75 12 00 00 movl $0x0,0x1275a0 10bad5: 00 00 00 #endif /* * Initialize any target architecture specific support as early as possible */ _CPU_Initialize(); 10bad8: e8 b3 2d 00 00 call 10e890 <_CPU_Initialize> /* * Do this as early as possible to ensure no debugging output * is even attempted to be printed. */ _Debug_Manager_initialization(); 10badd: e8 22 4e 00 00 call 110904 <_Debug_Manager_initialization> <== ALWAYS TAKEN _API_extensions_Initialization(); 10bae2: e8 21 02 00 00 call 10bd08 <_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; 10bae7: c7 05 d8 73 12 00 01 movl $0x1,0x1273d8 10baee: 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(); 10baf1: e8 7a 2b 00 00 call 10e670 <_Workspace_Handler_initialization> _User_extensions_Handler_initialization(); 10baf6: e8 71 26 00 00 call 10e16c <_User_extensions_Handler_initialization> _ISR_Handler_initialization(); 10bafb: e8 38 0c 00 00 call 10c738 <_ISR_Handler_initialization> <== ALWAYS TAKEN /* * Initialize the internal support API and allocator Mutex */ _Objects_Information_table[OBJECTS_INTERNAL_API] = _Internal_Objects; 10bb00: c7 05 b0 73 12 00 f0 movl $0x1273f0,0x1273b0 10bb07: 73 12 00 _API_Mutex_Initialization( 1 ); 10bb0a: 83 ec 0c sub $0xc,%esp 10bb0d: 6a 01 push $0x1 10bb0f: e8 10 03 00 00 call 10be24 <_API_Mutex_Initialization> <== ALWAYS TAKEN _API_Mutex_Allocate( &_RTEMS_Allocator_Mutex ); 10bb14: c7 04 24 90 74 12 00 movl $0x127490,(%esp) 10bb1b: e8 88 02 00 00 call 10bda8 <_API_Mutex_Allocate> <== ALWAYS TAKEN RTEMS_INLINE_ROUTINE void _Priority_Handler_initialization( void ) { int index; _Priority_Major_bit_map = 0; 10bb20: 66 c7 05 8c 74 12 00 movw $0x0,0x12748c 10bb27: 00 00 10bb29: 31 c0 xor %eax,%eax 10bb2b: 83 c4 10 add $0x10,%esp 10bb2e: 66 90 xchg %ax,%ax for ( index=0 ; index <16 ; index++ ) _Priority_Bit_map[ index ] = 0; 10bb30: 66 c7 84 00 20 75 12 movw $0x0,0x127520(%eax,%eax,1) 10bb37: 00 00 00 RTEMS_INLINE_ROUTINE void _Priority_Handler_initialization( void ) { int index; _Priority_Major_bit_map = 0; for ( index=0 ; index <16 ; index++ ) 10bb3a: 40 inc %eax 10bb3b: 83 f8 10 cmp $0x10,%eax 10bb3e: 75 f0 jne 10bb30 _Priority_Handler_initialization(); _Watchdog_Handler_initialization(); 10bb40: e8 93 29 00 00 call 10e4d8 <_Watchdog_Handler_initialization> _TOD_Handler_initialization(); 10bb45: e8 da 07 00 00 call 10c324 <_TOD_Handler_initialization> <== ALWAYS TAKEN _Thread_Handler_initialization(); 10bb4a: e8 7d 1c 00 00 call 10d7cc <_Thread_Handler_initialization> _MPCI_Handler_initialization( RTEMS_TIMEOUT ); #endif /* MANAGERS */ _RTEMS_API_Initialize(); 10bb4f: e8 6c 01 00 00 call 10bcc0 <_RTEMS_API_Initialize> <== ALWAYS TAKEN _Extension_Manager_initialization(); 10bb54: e8 1b 00 00 00 call 10bb74 <_Extension_Manager_initialization> <== ALWAYS TAKEN _IO_Manager_initialization(); 10bb59: e8 82 00 00 00 call 10bbe0 <_IO_Manager_initialization> <== ALWAYS TAKEN #ifdef RTEMS_POSIX_API _POSIX_API_Initialize(); 10bb5e: e8 15 01 00 00 call 10bc78 <_POSIX_API_Initialize> <== ALWAYS TAKEN 10bb63: c7 05 a0 75 12 00 01 movl $0x1,0x1275a0 10bb6a: 00 00 00 _Thread_Create_idle(); /* * Scheduling can properly occur now as long as we avoid dispatching. */ } 10bb6d: 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(); 10bb6e: e9 15 17 00 00 jmp 10d288 <_Thread_Create_idle> 0010bab4 : _API_extensions_Run_predriver(); #endif } void rtems_initialize_device_drivers(void) { 10bab4: 55 push %ebp 10bab5: 89 e5 mov %esp,%ebp 10bab7: 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(); 10baba: e8 f1 00 00 00 call 10bbb0 <_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(); } 10babf: c9 leave /* * Run the APIs and BSPs postdriver hooks. * * The API extensions are supposed to create user initialization tasks. */ _API_extensions_Run_postdriver(); 10bac0: e9 67 02 00 00 jmp 10bd2c <_API_extensions_Run_postdriver> <== ALWAYS TAKEN 00112a84 : rtems_status_code rtems_io_close( rtems_device_major_number major, rtems_device_minor_number minor, void *argument ) { 112a84: 55 push %ebp 112a85: 89 e5 mov %esp,%ebp 112a87: 56 push %esi 112a88: 53 push %ebx 112a89: 8b 45 08 mov 0x8(%ebp),%eax 112a8c: 8b 4d 0c mov 0xc(%ebp),%ecx 112a8f: 8b 5d 10 mov 0x10(%ebp),%ebx rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 112a92: 39 05 00 7e 12 00 cmp %eax,0x127e00 112a98: 76 22 jbe 112abc return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].close_entry; 112a9a: 8d 34 40 lea (%eax,%eax,2),%esi 112a9d: 8b 15 04 7e 12 00 mov 0x127e04,%edx 112aa3: 8b 54 f2 08 mov 0x8(%edx,%esi,8),%edx return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 112aa7: 85 d2 test %edx,%edx 112aa9: 74 1d je 112ac8 112aab: 89 5d 10 mov %ebx,0x10(%ebp) 112aae: 89 4d 0c mov %ecx,0xc(%ebp) 112ab1: 89 45 08 mov %eax,0x8(%ebp) } 112ab4: 5b pop %ebx 112ab5: 5e pop %esi 112ab6: c9 leave if ( major >= _IO_Number_of_drivers ) return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].close_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 112ab7: ff e2 jmp *%edx 112ab9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED void *argument ) { rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 112abc: b8 0a 00 00 00 mov $0xa,%eax return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].close_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; } 112ac1: 5b pop %ebx 112ac2: 5e pop %esi 112ac3: c9 leave 112ac4: c3 ret 112ac5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if ( major >= _IO_Number_of_drivers ) return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].close_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 112ac8: 31 c0 xor %eax,%eax } 112aca: 5b pop %ebx 112acb: 5e pop %esi 112acc: c9 leave 112acd: c3 ret 00112ad0 : rtems_status_code rtems_io_control( rtems_device_major_number major, rtems_device_minor_number minor, void *argument ) { 112ad0: 55 push %ebp 112ad1: 89 e5 mov %esp,%ebp 112ad3: 56 push %esi 112ad4: 53 push %ebx 112ad5: 8b 45 08 mov 0x8(%ebp),%eax 112ad8: 8b 4d 0c mov 0xc(%ebp),%ecx 112adb: 8b 5d 10 mov 0x10(%ebp),%ebx rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 112ade: 39 05 00 7e 12 00 cmp %eax,0x127e00 112ae4: 76 22 jbe 112b08 return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].control_entry; 112ae6: 8d 34 40 lea (%eax,%eax,2),%esi 112ae9: 8b 15 04 7e 12 00 mov 0x127e04,%edx 112aef: 8b 54 f2 14 mov 0x14(%edx,%esi,8),%edx return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 112af3: 85 d2 test %edx,%edx 112af5: 74 1d je 112b14 112af7: 89 5d 10 mov %ebx,0x10(%ebp) 112afa: 89 4d 0c mov %ecx,0xc(%ebp) 112afd: 89 45 08 mov %eax,0x8(%ebp) } 112b00: 5b pop %ebx 112b01: 5e pop %esi 112b02: c9 leave if ( major >= _IO_Number_of_drivers ) return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].control_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 112b03: ff e2 jmp *%edx 112b05: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED void *argument ) { rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 112b08: b8 0a 00 00 00 mov $0xa,%eax return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].control_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; } 112b0d: 5b pop %ebx 112b0e: 5e pop %esi 112b0f: c9 leave 112b10: c3 ret 112b11: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if ( major >= _IO_Number_of_drivers ) return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].control_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 112b14: 31 c0 xor %eax,%eax } 112b16: 5b pop %ebx 112b17: 5e pop %esi 112b18: c9 leave 112b19: c3 ret 00110948 : rtems_status_code rtems_io_initialize( rtems_device_major_number major, rtems_device_minor_number minor, void *argument ) { 110948: 55 push %ebp 110949: 89 e5 mov %esp,%ebp 11094b: 56 push %esi 11094c: 53 push %ebx 11094d: 8b 45 08 mov 0x8(%ebp),%eax 110950: 8b 4d 0c mov 0xc(%ebp),%ecx 110953: 8b 5d 10 mov 0x10(%ebp),%ebx rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 110956: 39 05 00 7e 12 00 cmp %eax,0x127e00 11095c: 76 1e jbe 11097c return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].initialization_entry; 11095e: 8d 34 40 lea (%eax,%eax,2),%esi 110961: 8b 15 04 7e 12 00 mov 0x127e04,%edx 110967: 8b 14 f2 mov (%edx,%esi,8),%edx return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 11096a: 85 d2 test %edx,%edx 11096c: 74 1a je 110988 11096e: 89 5d 10 mov %ebx,0x10(%ebp) 110971: 89 4d 0c mov %ecx,0xc(%ebp) 110974: 89 45 08 mov %eax,0x8(%ebp) } 110977: 5b pop %ebx 110978: 5e pop %esi 110979: c9 leave if ( major >= _IO_Number_of_drivers ) return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].initialization_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 11097a: ff e2 jmp *%edx void *argument ) { rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 11097c: b8 0a 00 00 00 mov $0xa,%eax return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].initialization_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; } 110981: 5b pop %ebx 110982: 5e pop %esi 110983: c9 leave 110984: c3 ret 110985: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if ( major >= _IO_Number_of_drivers ) return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].initialization_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 110988: 31 c0 xor %eax,%eax } 11098a: 5b pop %ebx 11098b: 5e pop %esi 11098c: c9 leave 11098d: c3 ret 00107b5c : rtems_status_code rtems_io_lookup_name( const char *name, rtems_driver_name_t *device_info ) { 107b5c: 55 push %ebp <== NOT EXECUTED 107b5d: 89 e5 mov %esp,%ebp <== NOT EXECUTED 107b5f: 57 push %edi <== NOT EXECUTED 107b60: 56 push %esi <== NOT EXECUTED 107b61: 53 push %ebx <== NOT EXECUTED 107b62: 83 ec 48 sub $0x48,%esp <== NOT EXECUTED 107b65: 8b 75 08 mov 0x8(%ebp),%esi <== 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 ); 107b68: b9 ff ff ff ff mov $0xffffffff,%ecx <== NOT EXECUTED 107b6d: 89 f7 mov %esi,%edi <== NOT EXECUTED 107b6f: 31 c0 xor %eax,%eax <== NOT EXECUTED 107b71: f2 ae repnz scas %es:(%edi),%al <== NOT EXECUTED 107b73: f7 d1 not %ecx <== NOT EXECUTED 107b75: 49 dec %ecx <== NOT EXECUTED 107b76: 6a 01 push $0x1 <== NOT EXECUTED 107b78: 8d 5d d4 lea -0x2c(%ebp),%ebx <== NOT EXECUTED 107b7b: 53 push %ebx <== NOT EXECUTED 107b7c: 6a 00 push $0x0 <== NOT EXECUTED 107b7e: 51 push %ecx <== NOT EXECUTED 107b7f: 56 push %esi <== NOT EXECUTED 107b80: e8 a3 03 00 00 call 107f28 <== NOT EXECUTED 107b85: 89 c7 mov %eax,%edi <== NOT EXECUTED the_jnode = loc.node_access; 107b87: 8b 55 d4 mov -0x2c(%ebp),%edx <== NOT EXECUTED if ( !loc.ops->node_type_h ) { 107b8a: 8b 4d e0 mov -0x20(%ebp),%ecx <== NOT EXECUTED 107b8d: 8b 41 10 mov 0x10(%ecx),%eax <== NOT EXECUTED 107b90: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 107b93: 85 c0 test %eax,%eax <== NOT EXECUTED 107b95: 74 41 je 107bd8 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } node_type = (*loc.ops->node_type_h)( &loc ); 107b97: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 107b9a: 53 push %ebx <== NOT EXECUTED 107b9b: 89 55 c4 mov %edx,-0x3c(%ebp) <== NOT EXECUTED 107b9e: ff d0 call *%eax <== NOT EXECUTED if ( (result != 0) || node_type != RTEMS_FILESYSTEM_DEVICE ) { 107ba0: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 107ba3: 85 ff test %edi,%edi <== NOT EXECUTED 107ba5: 8b 55 c4 mov -0x3c(%ebp),%edx <== NOT EXECUTED 107ba8: 74 56 je 107c00 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 107baa: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED 107bad: 85 c0 test %eax,%eax <== NOT EXECUTED 107baf: 0f 84 93 00 00 00 je 107c48 <== NOT EXECUTED 107bb5: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 107bb8: 85 c0 test %eax,%eax <== NOT EXECUTED 107bba: 0f 84 88 00 00 00 je 107c48 <== NOT EXECUTED 107bc0: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 107bc3: 53 push %ebx <== NOT EXECUTED 107bc4: ff d0 call *%eax <== NOT EXECUTED 107bc6: b8 0d 00 00 00 mov $0xd,%eax <== NOT EXECUTED 107bcb: 83 c4 10 add $0x10,%esp <== NOT EXECUTED device_info->minor = the_jnode->info.device.minor; rtems_filesystem_freenode( &loc ); return RTEMS_SUCCESSFUL; } 107bce: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 107bd1: 5b pop %ebx <== NOT EXECUTED 107bd2: 5e pop %esi <== NOT EXECUTED 107bd3: 5f pop %edi <== NOT EXECUTED 107bd4: c9 leave <== NOT EXECUTED 107bd5: c3 ret <== NOT EXECUTED 107bd6: 66 90 xchg %ax,%ax <== NOT EXECUTED result = rtems_filesystem_evaluate_path( name, strlen( name ), 0x00, &loc, true ); the_jnode = loc.node_access; if ( !loc.ops->node_type_h ) { rtems_filesystem_freenode( &loc ); 107bd8: 8b 41 1c mov 0x1c(%ecx),%eax <== NOT EXECUTED 107bdb: 85 c0 test %eax,%eax <== NOT EXECUTED 107bdd: 74 09 je 107be8 <== NOT EXECUTED 107bdf: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 107be2: 53 push %ebx <== NOT EXECUTED 107be3: ff d0 call *%eax <== NOT EXECUTED 107be5: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 107be8: e8 23 bc 00 00 call 113810 <__errno> <== NOT EXECUTED 107bed: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 107bf3: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED device_info->minor = the_jnode->info.device.minor; rtems_filesystem_freenode( &loc ); return RTEMS_SUCCESSFUL; } 107bf8: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 107bfb: 5b pop %ebx <== NOT EXECUTED 107bfc: 5e pop %esi <== NOT EXECUTED 107bfd: 5f pop %edi <== NOT EXECUTED 107bfe: c9 leave <== NOT EXECUTED 107bff: c3 ret <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); } node_type = (*loc.ops->node_type_h)( &loc ); if ( (result != 0) || node_type != RTEMS_FILESYSTEM_DEVICE ) { 107c00: 83 f8 02 cmp $0x2,%eax <== NOT EXECUTED 107c03: 75 a5 jne 107baa <== NOT EXECUTED rtems_filesystem_freenode( &loc ); return RTEMS_UNSATISFIED; } device_info->device_name = (char *) name; 107c05: 8b 4d 0c mov 0xc(%ebp),%ecx <== NOT EXECUTED 107c08: 89 31 mov %esi,(%ecx) <== NOT EXECUTED device_info->device_name_length = strlen( name ); 107c0a: b9 ff ff ff ff mov $0xffffffff,%ecx <== NOT EXECUTED 107c0f: 89 f7 mov %esi,%edi <== NOT EXECUTED 107c11: 31 c0 xor %eax,%eax <== NOT EXECUTED 107c13: f2 ae repnz scas %es:(%edi),%al <== NOT EXECUTED 107c15: f7 d1 not %ecx <== NOT EXECUTED 107c17: 49 dec %ecx <== NOT EXECUTED 107c18: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED 107c1b: 89 48 04 mov %ecx,0x4(%eax) <== NOT EXECUTED device_info->major = the_jnode->info.device.major; 107c1e: 8b 42 50 mov 0x50(%edx),%eax <== NOT EXECUTED 107c21: 8b 4d 0c mov 0xc(%ebp),%ecx <== NOT EXECUTED 107c24: 89 41 08 mov %eax,0x8(%ecx) <== NOT EXECUTED device_info->minor = the_jnode->info.device.minor; 107c27: 8b 42 54 mov 0x54(%edx),%eax <== NOT EXECUTED 107c2a: 89 41 0c mov %eax,0xc(%ecx) <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 107c2d: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED 107c30: 85 c0 test %eax,%eax <== NOT EXECUTED 107c32: 74 21 je 107c55 <== NOT EXECUTED 107c34: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 107c37: 85 c0 test %eax,%eax <== NOT EXECUTED 107c39: 74 1a je 107c55 <== NOT EXECUTED 107c3b: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 107c3e: 53 push %ebx <== NOT EXECUTED 107c3f: ff d0 call *%eax <== NOT EXECUTED 107c41: 31 c0 xor %eax,%eax <== NOT EXECUTED 107c43: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 107c46: eb 86 jmp 107bce <== NOT EXECUTED 107c48: b8 0d 00 00 00 mov $0xd,%eax <== NOT EXECUTED return RTEMS_SUCCESSFUL; } 107c4d: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 107c50: 5b pop %ebx <== NOT EXECUTED 107c51: 5e pop %esi <== NOT EXECUTED 107c52: 5f pop %edi <== NOT EXECUTED 107c53: c9 leave <== NOT EXECUTED 107c54: c3 ret <== NOT EXECUTED device_info->device_name = (char *) name; device_info->device_name_length = strlen( name ); device_info->major = the_jnode->info.device.major; device_info->minor = the_jnode->info.device.minor; rtems_filesystem_freenode( &loc ); 107c55: 31 c0 xor %eax,%eax <== NOT EXECUTED 107c57: e9 72 ff ff ff jmp 107bce <== NOT EXECUTED 00112b1c : rtems_status_code rtems_io_open( rtems_device_major_number major, rtems_device_minor_number minor, void *argument ) { 112b1c: 55 push %ebp 112b1d: 89 e5 mov %esp,%ebp 112b1f: 56 push %esi 112b20: 53 push %ebx 112b21: 8b 45 08 mov 0x8(%ebp),%eax 112b24: 8b 4d 0c mov 0xc(%ebp),%ecx 112b27: 8b 5d 10 mov 0x10(%ebp),%ebx rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 112b2a: 39 05 00 7e 12 00 cmp %eax,0x127e00 112b30: 76 22 jbe 112b54 return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].open_entry; 112b32: 8d 34 40 lea (%eax,%eax,2),%esi 112b35: 8b 15 04 7e 12 00 mov 0x127e04,%edx 112b3b: 8b 54 f2 04 mov 0x4(%edx,%esi,8),%edx return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 112b3f: 85 d2 test %edx,%edx 112b41: 74 1d je 112b60 112b43: 89 5d 10 mov %ebx,0x10(%ebp) 112b46: 89 4d 0c mov %ecx,0xc(%ebp) 112b49: 89 45 08 mov %eax,0x8(%ebp) } 112b4c: 5b pop %ebx 112b4d: 5e pop %esi 112b4e: c9 leave if ( major >= _IO_Number_of_drivers ) return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].open_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 112b4f: ff e2 jmp *%edx 112b51: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED void *argument ) { rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 112b54: b8 0a 00 00 00 mov $0xa,%eax return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].open_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; } 112b59: 5b pop %ebx 112b5a: 5e pop %esi 112b5b: c9 leave 112b5c: c3 ret 112b5d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if ( major >= _IO_Number_of_drivers ) return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].open_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 112b60: 31 c0 xor %eax,%eax } 112b62: 5b pop %ebx 112b63: 5e pop %esi 112b64: c9 leave 112b65: c3 ret 00112b68 : rtems_status_code rtems_io_read( rtems_device_major_number major, rtems_device_minor_number minor, void *argument ) { 112b68: 55 push %ebp 112b69: 89 e5 mov %esp,%ebp 112b6b: 56 push %esi 112b6c: 53 push %ebx 112b6d: 8b 45 08 mov 0x8(%ebp),%eax 112b70: 8b 4d 0c mov 0xc(%ebp),%ecx 112b73: 8b 5d 10 mov 0x10(%ebp),%ebx rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 112b76: 39 05 00 7e 12 00 cmp %eax,0x127e00 112b7c: 76 22 jbe 112ba0 return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].read_entry; 112b7e: 8d 34 40 lea (%eax,%eax,2),%esi 112b81: 8b 15 04 7e 12 00 mov 0x127e04,%edx 112b87: 8b 54 f2 0c mov 0xc(%edx,%esi,8),%edx return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 112b8b: 85 d2 test %edx,%edx 112b8d: 74 1d je 112bac 112b8f: 89 5d 10 mov %ebx,0x10(%ebp) 112b92: 89 4d 0c mov %ecx,0xc(%ebp) 112b95: 89 45 08 mov %eax,0x8(%ebp) } 112b98: 5b pop %ebx 112b99: 5e pop %esi 112b9a: c9 leave if ( major >= _IO_Number_of_drivers ) return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].read_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 112b9b: ff e2 jmp *%edx 112b9d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED void *argument ) { rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 112ba0: b8 0a 00 00 00 mov $0xa,%eax return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].read_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; } 112ba5: 5b pop %ebx 112ba6: 5e pop %esi 112ba7: c9 leave 112ba8: c3 ret 112ba9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if ( major >= _IO_Number_of_drivers ) return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].read_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 112bac: 31 c0 xor %eax,%eax } 112bae: 5b pop %ebx 112baf: 5e pop %esi 112bb0: c9 leave 112bb1: c3 ret 0010d390 : 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 ) { 10d390: 55 push %ebp 10d391: 89 e5 mov %esp,%ebp 10d393: 57 push %edi 10d394: 56 push %esi 10d395: 53 push %ebx 10d396: 83 ec 0c sub $0xc,%esp 10d399: 8b 5d 08 mov 0x8(%ebp),%ebx 10d39c: 8b 75 0c mov 0xc(%ebp),%esi 10d39f: 8b 55 10 mov 0x10(%ebp),%edx rtems_device_major_number major_limit = _IO_Number_of_drivers; 10d3a2: a1 80 d6 12 00 mov 0x12d680,%eax if ( rtems_interrupt_is_in_progress() ) 10d3a7: 8b 0d 94 cc 12 00 mov 0x12cc94,%ecx 10d3ad: 85 c9 test %ecx,%ecx 10d3af: 0f 85 ab 00 00 00 jne 10d460 return RTEMS_CALLED_FROM_ISR; if ( registered_major == NULL ) 10d3b5: 85 d2 test %edx,%edx 10d3b7: 0f 84 e3 00 00 00 je 10d4a0 return RTEMS_INVALID_ADDRESS; /* Set it to an invalid value */ *registered_major = major_limit; 10d3bd: 89 02 mov %eax,(%edx) if ( driver_table == NULL ) 10d3bf: 85 f6 test %esi,%esi 10d3c1: 0f 84 d9 00 00 00 je 10d4a0 static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 10d3c7: 8b 3e mov (%esi),%edi 10d3c9: 85 ff test %edi,%edi 10d3cb: 0f 84 c3 00 00 00 je 10d494 return RTEMS_INVALID_ADDRESS; if ( rtems_io_is_empty_table( driver_table ) ) return RTEMS_INVALID_ADDRESS; if ( major >= major_limit ) 10d3d1: 39 d8 cmp %ebx,%eax 10d3d3: 76 7b jbe 10d450 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10d3d5: a1 f8 cb 12 00 mov 0x12cbf8,%eax 10d3da: 40 inc %eax 10d3db: a3 f8 cb 12 00 mov %eax,0x12cbf8 return RTEMS_INVALID_NUMBER; _Thread_Disable_dispatch(); if ( major == 0 ) { 10d3e0: 85 db test %ebx,%ebx 10d3e2: 0f 85 88 00 00 00 jne 10d470 static rtems_status_code rtems_io_obtain_major_number( rtems_device_major_number *major ) { rtems_device_major_number n = _IO_Number_of_drivers; 10d3e8: 8b 0d 80 d6 12 00 mov 0x12d680,%ecx rtems_device_major_number m = 0; /* major is error checked by caller */ for ( m = 0; m < n; ++m ) { 10d3ee: 85 c9 test %ecx,%ecx 10d3f0: 0f 84 b7 00 00 00 je 10d4ad <== ALWAYS TAKEN 10d3f6: 8b 3d 84 d6 12 00 mov 0x12d684,%edi 10d3fc: 89 f8 mov %edi,%eax 10d3fe: eb 08 jmp 10d408 <== ALWAYS TAKEN 10d400: 43 inc %ebx 10d401: 83 c0 18 add $0x18,%eax 10d404: 39 d9 cmp %ebx,%ecx 10d406: 76 0b jbe 10d413 static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 10d408: 83 38 00 cmpl $0x0,(%eax) 10d40b: 75 f3 jne 10d400 10d40d: 83 78 04 00 cmpl $0x0,0x4(%eax) 10d411: 75 ed jne 10d400 if ( rtems_io_is_empty_table( table ) ) break; } /* Assigns invalid value in case of failure */ *major = m; 10d413: 89 1a mov %ebx,(%edx) if ( m != n ) 10d415: 39 d9 cmp %ebx,%ecx 10d417: 0f 84 97 00 00 00 je 10d4b4 10d41d: 8d 04 5b lea (%ebx,%ebx,2),%eax 10d420: 8d 04 c7 lea (%edi,%eax,8),%eax } *registered_major = major; } _IO_Driver_address_table [major] = *driver_table; 10d423: b9 06 00 00 00 mov $0x6,%ecx 10d428: 89 c7 mov %eax,%edi 10d42a: f3 a5 rep movsl %ds:(%esi),%es:(%edi) _Thread_Enable_dispatch(); 10d42c: e8 2f 1a 00 00 call 10ee60 <_Thread_Enable_dispatch> return rtems_io_initialize( major, 0, NULL ); 10d431: c7 45 10 00 00 00 00 movl $0x0,0x10(%ebp) 10d438: c7 45 0c 00 00 00 00 movl $0x0,0xc(%ebp) 10d43f: 89 5d 08 mov %ebx,0x8(%ebp) } 10d442: 83 c4 0c add $0xc,%esp 10d445: 5b pop %ebx 10d446: 5e pop %esi 10d447: 5f pop %edi 10d448: c9 leave _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); 10d449: e9 62 85 00 00 jmp 1159b0 <== ALWAYS TAKEN 10d44e: 66 90 xchg %ax,%ax <== NOT EXECUTED return RTEMS_INVALID_ADDRESS; if ( rtems_io_is_empty_table( driver_table ) ) return RTEMS_INVALID_ADDRESS; if ( major >= major_limit ) 10d450: b8 0a 00 00 00 mov $0xa,%eax _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); } 10d455: 83 c4 0c add $0xc,%esp 10d458: 5b pop %ebx 10d459: 5e pop %esi 10d45a: 5f pop %edi 10d45b: c9 leave 10d45c: c3 ret 10d45d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED rtems_device_major_number *registered_major ) { rtems_device_major_number major_limit = _IO_Number_of_drivers; if ( rtems_interrupt_is_in_progress() ) 10d460: b8 12 00 00 00 mov $0x12,%eax _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); } 10d465: 83 c4 0c add $0xc,%esp 10d468: 5b pop %ebx 10d469: 5e pop %esi 10d46a: 5f pop %edi 10d46b: c9 leave 10d46c: c3 ret 10d46d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED _Thread_Enable_dispatch(); return sc; } major = *registered_major; } else { rtems_driver_address_table *const table = _IO_Driver_address_table + major; 10d470: 8d 04 5b lea (%ebx,%ebx,2),%eax 10d473: c1 e0 03 shl $0x3,%eax 10d476: 03 05 84 d6 12 00 add 0x12d684,%eax static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 10d47c: 8b 38 mov (%eax),%edi 10d47e: 85 ff test %edi,%edi 10d480: 74 3e je 10d4c0 major = *registered_major; } else { rtems_driver_address_table *const table = _IO_Driver_address_table + major; if ( !rtems_io_is_empty_table( table ) ) { _Thread_Enable_dispatch(); 10d482: e8 d9 19 00 00 call 10ee60 <_Thread_Enable_dispatch> 10d487: b8 0c 00 00 00 mov $0xc,%eax _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); } 10d48c: 83 c4 0c add $0xc,%esp 10d48f: 5b pop %ebx 10d490: 5e pop %esi 10d491: 5f pop %edi 10d492: c9 leave 10d493: c3 ret static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 10d494: 8b 4e 04 mov 0x4(%esi),%ecx 10d497: 85 c9 test %ecx,%ecx 10d499: 0f 85 32 ff ff ff jne 10d3d1 10d49f: 90 nop _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); 10d4a0: b8 09 00 00 00 mov $0x9,%eax } 10d4a5: 83 c4 0c add $0xc,%esp 10d4a8: 5b pop %ebx 10d4a9: 5e pop %esi 10d4aa: 5f pop %edi 10d4ab: c9 leave 10d4ac: c3 ret if ( rtems_io_is_empty_table( table ) ) break; } /* Assigns invalid value in case of failure */ *major = m; 10d4ad: c7 02 00 00 00 00 movl $0x0,(%edx) <== NOT EXECUTED 10d4b3: 90 nop <== NOT EXECUTED if ( major == 0 ) { rtems_status_code sc = rtems_io_obtain_major_number( registered_major ); if ( sc != RTEMS_SUCCESSFUL ) { _Thread_Enable_dispatch(); 10d4b4: e8 a7 19 00 00 call 10ee60 <_Thread_Enable_dispatch> 10d4b9: b8 05 00 00 00 mov $0x5,%eax return sc; 10d4be: eb 95 jmp 10d455 <== 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; 10d4c0: 8b 48 04 mov 0x4(%eax),%ecx 10d4c3: 85 c9 test %ecx,%ecx 10d4c5: 75 bb jne 10d482 if ( !rtems_io_is_empty_table( table ) ) { _Thread_Enable_dispatch(); return RTEMS_RESOURCE_IN_USE; } *registered_major = major; 10d4c7: 89 1a mov %ebx,(%edx) 10d4c9: e9 55 ff ff ff jmp 10d423 <== ALWAYS TAKEN 00107c5c : rtems_status_code rtems_io_register_name( const char *device_name, rtems_device_major_number major, rtems_device_minor_number minor ) { 107c5c: 55 push %ebp 107c5d: 89 e5 mov %esp,%ebp 107c5f: 83 ec 08 sub $0x8,%esp rtems_device_minor_number _minor ) { union __rtems_dev_t temp; temp.__overlay.major = _major; 107c62: 8b 45 0c mov 0xc(%ebp),%eax temp.__overlay.minor = _minor; 107c65: 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 ); 107c68: 52 push %edx 107c69: 50 push %eax 107c6a: 68 ff 21 00 00 push $0x21ff 107c6f: ff 75 08 pushl 0x8(%ebp) 107c72: e8 91 06 00 00 call 108308 <== ALWAYS TAKEN /* this is the only error returned by the old version */ if ( status ) 107c77: 83 c4 10 add $0x10,%esp 107c7a: 83 f8 01 cmp $0x1,%eax 107c7d: 19 c0 sbb %eax,%eax 107c7f: f7 d0 not %eax 107c81: 83 e0 05 and $0x5,%eax return RTEMS_TOO_MANY; return RTEMS_SUCCESSFUL; } 107c84: c9 leave 107c85: c3 ret 0010d4d0 : */ rtems_status_code rtems_io_unregister_driver( rtems_device_major_number major ) { 10d4d0: 55 push %ebp 10d4d1: 89 e5 mov %esp,%ebp 10d4d3: 57 push %edi 10d4d4: 83 ec 04 sub $0x4,%esp 10d4d7: 8b 45 08 mov 0x8(%ebp),%eax if ( rtems_interrupt_is_in_progress() ) 10d4da: 8b 15 94 cc 12 00 mov 0x12cc94,%edx 10d4e0: 85 d2 test %edx,%edx 10d4e2: 75 44 jne 10d528 return RTEMS_CALLED_FROM_ISR; if ( major < _IO_Number_of_drivers ) { 10d4e4: 39 05 80 d6 12 00 cmp %eax,0x12d680 10d4ea: 77 0c ja 10d4f8 10d4ec: b8 0d 00 00 00 mov $0xd,%eax return RTEMS_SUCCESSFUL; } return RTEMS_UNSATISFIED; } 10d4f1: 5a pop %edx 10d4f2: 5f pop %edi 10d4f3: c9 leave 10d4f4: c3 ret 10d4f5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 10d4f8: 8b 15 f8 cb 12 00 mov 0x12cbf8,%edx 10d4fe: 42 inc %edx 10d4ff: 89 15 f8 cb 12 00 mov %edx,0x12cbf8 if ( rtems_interrupt_is_in_progress() ) return RTEMS_CALLED_FROM_ISR; if ( major < _IO_Number_of_drivers ) { _Thread_Disable_dispatch(); memset( 10d505: 8d 14 40 lea (%eax,%eax,2),%edx 10d508: c1 e2 03 shl $0x3,%edx 10d50b: 03 15 84 d6 12 00 add 0x12d684,%edx 10d511: b9 18 00 00 00 mov $0x18,%ecx 10d516: 31 c0 xor %eax,%eax 10d518: 89 d7 mov %edx,%edi 10d51a: f3 aa rep stos %al,%es:(%edi) &_IO_Driver_address_table[major], 0, sizeof( rtems_driver_address_table ) ); _Thread_Enable_dispatch(); 10d51c: e8 3f 19 00 00 call 10ee60 <_Thread_Enable_dispatch> 10d521: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; } return RTEMS_UNSATISFIED; } 10d523: 5a pop %edx 10d524: 5f pop %edi 10d525: c9 leave 10d526: c3 ret 10d527: 90 nop <== NOT EXECUTED rtems_status_code rtems_io_unregister_driver( rtems_device_major_number major ) { if ( rtems_interrupt_is_in_progress() ) 10d528: b8 12 00 00 00 mov $0x12,%eax return RTEMS_SUCCESSFUL; } return RTEMS_UNSATISFIED; } 10d52d: 5a pop %edx 10d52e: 5f pop %edi 10d52f: c9 leave 10d530: c3 ret 00112bb4 : rtems_status_code rtems_io_write( rtems_device_major_number major, rtems_device_minor_number minor, void *argument ) { 112bb4: 55 push %ebp 112bb5: 89 e5 mov %esp,%ebp 112bb7: 56 push %esi 112bb8: 53 push %ebx 112bb9: 8b 45 08 mov 0x8(%ebp),%eax 112bbc: 8b 4d 0c mov 0xc(%ebp),%ecx 112bbf: 8b 5d 10 mov 0x10(%ebp),%ebx rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 112bc2: 39 05 00 7e 12 00 cmp %eax,0x127e00 112bc8: 76 22 jbe 112bec return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].write_entry; 112bca: 8d 34 40 lea (%eax,%eax,2),%esi 112bcd: 8b 15 04 7e 12 00 mov 0x127e04,%edx 112bd3: 8b 54 f2 10 mov 0x10(%edx,%esi,8),%edx return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 112bd7: 85 d2 test %edx,%edx 112bd9: 74 1d je 112bf8 112bdb: 89 5d 10 mov %ebx,0x10(%ebp) 112bde: 89 4d 0c mov %ecx,0xc(%ebp) 112be1: 89 45 08 mov %eax,0x8(%ebp) } 112be4: 5b pop %ebx 112be5: 5e pop %esi 112be6: c9 leave if ( major >= _IO_Number_of_drivers ) return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].write_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 112be7: ff e2 jmp *%edx 112be9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED void *argument ) { rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 112bec: b8 0a 00 00 00 mov $0xa,%eax return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].write_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; } 112bf1: 5b pop %ebx 112bf2: 5e pop %esi 112bf3: c9 leave 112bf4: c3 ret 112bf5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if ( major >= _IO_Number_of_drivers ) return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].write_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 112bf8: 31 c0 xor %eax,%eax } 112bfa: 5b pop %ebx 112bfb: 5e pop %esi 112bfc: c9 leave 112bfd: c3 ret 0010dd70 : #include #include void rtems_iterate_over_all_threads(rtems_per_thread_routine routine) { 10dd70: 55 push %ebp 10dd71: 89 e5 mov %esp,%ebp 10dd73: 57 push %edi 10dd74: 56 push %esi 10dd75: 53 push %ebx 10dd76: 83 ec 1c sub $0x1c,%esp 10dd79: 8b 7d 08 mov 0x8(%ebp),%edi uint32_t i; uint32_t api_index; Thread_Control *the_thread; Objects_Information *information; if ( !routine ) 10dd7c: 85 ff test %edi,%edi 10dd7e: 74 4d je 10ddcd <== ALWAYS TAKEN 10dd80: c7 45 e4 01 00 00 00 movl $0x1,-0x1c(%ebp) return; for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { if ( !_Objects_Information_table[ api_index ] ) 10dd87: 8b 55 e4 mov -0x1c(%ebp),%edx 10dd8a: 8b 04 95 ec 21 13 00 mov 0x1321ec(,%edx,4),%eax 10dd91: 85 c0 test %eax,%eax 10dd93: 74 2f je 10ddc4 continue; information = _Objects_Information_table[ api_index ][ 1 ]; 10dd95: 8b 70 04 mov 0x4(%eax),%esi if ( !information ) 10dd98: 85 f6 test %esi,%esi 10dd9a: 74 28 je 10ddc4 continue; for ( i=1 ; i <= information->maximum ; i++ ) { 10dd9c: 66 83 7e 10 00 cmpw $0x0,0x10(%esi) 10dda1: 74 21 je 10ddc4 10dda3: bb 01 00 00 00 mov $0x1,%ebx the_thread = (Thread_Control *)information->local_table[ i ]; 10dda8: 8b 46 1c mov 0x1c(%esi),%eax 10ddab: 8b 04 98 mov (%eax,%ebx,4),%eax if ( !the_thread ) 10ddae: 85 c0 test %eax,%eax 10ddb0: 74 09 je 10ddbb <== ALWAYS TAKEN continue; (*routine)(the_thread); 10ddb2: 83 ec 0c sub $0xc,%esp 10ddb5: 50 push %eax 10ddb6: ff d7 call *%edi 10ddb8: 83 c4 10 add $0x10,%esp information = _Objects_Information_table[ api_index ][ 1 ]; if ( !information ) continue; for ( i=1 ; i <= information->maximum ; i++ ) { 10ddbb: 43 inc %ebx 10ddbc: 0f b7 46 10 movzwl 0x10(%esi),%eax 10ddc0: 39 d8 cmp %ebx,%eax 10ddc2: 73 e4 jae 10dda8 Objects_Information *information; if ( !routine ) return; for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { 10ddc4: ff 45 e4 incl -0x1c(%ebp) 10ddc7: 83 7d e4 05 cmpl $0x5,-0x1c(%ebp) 10ddcb: 75 ba jne 10dd87 (*routine)(the_thread); } } } 10ddcd: 8d 65 f4 lea -0xc(%ebp),%esp 10ddd0: 5b pop %ebx 10ddd1: 5e pop %esi 10ddd2: 5f pop %edi 10ddd3: c9 leave 10ddd4: c3 ret 0010fc50 : * 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 ) { 10fc50: 55 push %ebp 10fc51: 89 e5 mov %esp,%ebp 10fc53: 57 push %edi 10fc54: 53 push %ebx 10fc55: 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 ); 10fc58: 6a 00 push $0x0 10fc5a: 6a 00 push $0x0 10fc5c: ff 35 48 72 12 00 pushl 0x127248 10fc62: e8 f9 b8 ff ff call 10b560 if (rtems_libio_iop_freelist) { 10fc67: a1 44 72 12 00 mov 0x127244,%eax 10fc6c: 83 c4 10 add $0x10,%esp 10fc6f: 85 c0 test %eax,%eax 10fc71: 75 19 jne 10fc8c next = iop->data1; (void) memset( iop, 0, sizeof(rtems_libio_t) ); iop->flags = LIBIO_FLAGS_OPEN; iop->sem = sema; rtems_libio_iop_freelist = next; goto done; 10fc73: 31 db xor %ebx,%ebx failed: iop = 0; done: rtems_semaphore_release( rtems_libio_semaphore ); 10fc75: 83 ec 0c sub $0xc,%esp 10fc78: ff 35 48 72 12 00 pushl 0x127248 10fc7e: e8 d9 b9 ff ff call 10b65c return iop; } 10fc83: 89 d8 mov %ebx,%eax 10fc85: 8d 65 f8 lea -0x8(%ebp),%esp 10fc88: 5b pop %ebx 10fc89: 5f pop %edi 10fc8a: c9 leave 10fc8b: c3 ret rtems_id sema; rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT ); if (rtems_libio_iop_freelist) { rc = rtems_semaphore_create( 10fc8c: 83 ec 0c sub $0xc,%esp 10fc8f: 8d 55 f4 lea -0xc(%ebp),%edx 10fc92: 52 push %edx 10fc93: 6a 00 push $0x0 10fc95: 6a 54 push $0x54 10fc97: 6a 01 push $0x1 10fc99: 2b 05 40 72 12 00 sub 0x127240,%eax 10fc9f: c1 f8 06 sar $0x6,%eax 10fca2: 0d 00 49 42 4c or $0x4c424900,%eax 10fca7: 50 push %eax 10fca8: e8 3b b6 ff ff call 10b2e8 1, RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &sema ); if (rc != RTEMS_SUCCESSFUL) 10fcad: 83 c4 20 add $0x20,%esp 10fcb0: 85 c0 test %eax,%eax 10fcb2: 75 bf jne 10fc73 <== ALWAYS TAKEN goto failed; iop = rtems_libio_iop_freelist; 10fcb4: 8b 1d 44 72 12 00 mov 0x127244,%ebx next = iop->data1; 10fcba: 8b 53 34 mov 0x34(%ebx),%edx (void) memset( iop, 0, sizeof(rtems_libio_t) ); 10fcbd: b9 40 00 00 00 mov $0x40,%ecx 10fcc2: 89 df mov %ebx,%edi 10fcc4: f3 aa rep stos %al,%es:(%edi) iop->flags = LIBIO_FLAGS_OPEN; 10fcc6: c7 43 14 00 01 00 00 movl $0x100,0x14(%ebx) iop->sem = sema; 10fccd: 8b 45 f4 mov -0xc(%ebp),%eax 10fcd0: 89 43 2c mov %eax,0x2c(%ebx) rtems_libio_iop_freelist = next; 10fcd3: 89 15 44 72 12 00 mov %edx,0x127244 goto done; 10fcd9: eb 9a jmp 10fc75 <== ALWAYS TAKEN 0010fbf8 : */ void rtems_libio_free( rtems_libio_t *iop ) { 10fbf8: 55 push %ebp 10fbf9: 89 e5 mov %esp,%ebp 10fbfb: 53 push %ebx 10fbfc: 83 ec 08 sub $0x8,%esp 10fbff: 8b 5d 08 mov 0x8(%ebp),%ebx rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT ); 10fc02: 6a 00 push $0x0 10fc04: 6a 00 push $0x0 10fc06: ff 35 48 72 12 00 pushl 0x127248 10fc0c: e8 4f b9 ff ff call 10b560 if (iop->sem) 10fc11: 8b 43 2c mov 0x2c(%ebx),%eax 10fc14: 83 c4 10 add $0x10,%esp 10fc17: 85 c0 test %eax,%eax 10fc19: 74 0c je 10fc27 <== ALWAYS TAKEN rtems_semaphore_delete(iop->sem); 10fc1b: 83 ec 0c sub $0xc,%esp 10fc1e: 50 push %eax 10fc1f: e8 98 b8 ff ff call 10b4bc 10fc24: 83 c4 10 add $0x10,%esp iop->flags &= ~LIBIO_FLAGS_OPEN; 10fc27: 81 63 14 ff fe ff ff andl $0xfffffeff,0x14(%ebx) iop->data1 = rtems_libio_iop_freelist; 10fc2e: a1 44 72 12 00 mov 0x127244,%eax 10fc33: 89 43 34 mov %eax,0x34(%ebx) rtems_libio_iop_freelist = iop; 10fc36: 89 1d 44 72 12 00 mov %ebx,0x127244 rtems_semaphore_release(rtems_libio_semaphore); 10fc3c: a1 48 72 12 00 mov 0x127248,%eax 10fc41: 89 45 08 mov %eax,0x8(%ebp) } 10fc44: 8b 5d fc mov -0x4(%ebp),%ebx 10fc47: c9 leave iop->flags &= ~LIBIO_FLAGS_OPEN; iop->data1 = rtems_libio_iop_freelist; rtems_libio_iop_freelist = iop; rtems_semaphore_release(rtems_libio_semaphore); 10fc48: e9 0f ba ff ff jmp 10b65c 00108058 : * * Called by BSP startup code to initialize the libio subsystem. */ void rtems_libio_init( void ) { 108058: 55 push %ebp 108059: 89 e5 mov %esp,%ebp 10805b: 53 push %ebx 10805c: 83 ec 04 sub $0x4,%esp rtems_status_code rc; uint32_t i; rtems_libio_t *iop; if (rtems_libio_number_iops > 0) 10805f: a1 4c 31 12 00 mov 0x12314c,%eax 108064: 85 c0 test %eax,%eax 108066: 74 4d je 1080b5 <== ALWAYS TAKEN { rtems_libio_iops = (rtems_libio_t *) calloc(rtems_libio_number_iops, 108068: 83 ec 08 sub $0x8,%esp 10806b: 6a 40 push $0x40 10806d: 50 push %eax 10806e: e8 49 78 00 00 call 10f8bc <== ALWAYS TAKEN 108073: 89 c2 mov %eax,%edx 108075: a3 40 72 12 00 mov %eax,0x127240 sizeof(rtems_libio_t)); if (rtems_libio_iops == NULL) 10807a: 83 c4 10 add $0x10,%esp 10807d: 85 c0 test %eax,%eax 10807f: 74 71 je 1080f2 <== ALWAYS TAKEN rtems_fatal_error_occurred(RTEMS_NO_MEMORY); iop = rtems_libio_iop_freelist = rtems_libio_iops; 108081: a3 44 72 12 00 mov %eax,0x127244 for (i = 0 ; (i + 1) < rtems_libio_number_iops ; i++, iop++) 108086: 8b 1d 4c 31 12 00 mov 0x12314c,%ebx 10808c: 83 fb 01 cmp $0x1,%ebx 10808f: 76 1d jbe 1080ae <== ALWAYS TAKEN 108091: 8d 50 40 lea 0x40(%eax),%edx 108094: b9 01 00 00 00 mov $0x1,%ecx 108099: 8d 76 00 lea 0x0(%esi),%esi iop->data1 = iop + 1; 10809c: 89 52 f4 mov %edx,-0xc(%edx) 10809f: 83 c2 40 add $0x40,%edx 1080a2: 41 inc %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++) 1080a3: 39 d9 cmp %ebx,%ecx 1080a5: 75 f5 jne 10809c 1080a7: c1 e1 06 shl $0x6,%ecx 1080aa: 8d 54 01 c0 lea -0x40(%ecx,%eax,1),%edx iop->data1 = iop + 1; iop->data1 = NULL; 1080ae: c7 42 34 00 00 00 00 movl $0x0,0x34(%edx) /* * Create the binary semaphore used to provide mutual exclusion * on the IOP Table. */ rc = rtems_semaphore_create( 1080b5: 83 ec 0c sub $0xc,%esp 1080b8: 68 48 72 12 00 push $0x127248 1080bd: 6a 00 push $0x0 1080bf: 6a 54 push $0x54 1080c1: 6a 01 push $0x1 1080c3: 68 4f 49 42 4c push $0x4c42494f 1080c8: e8 1b 32 00 00 call 10b2e8 1, RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &rtems_libio_semaphore ); if ( rc != RTEMS_SUCCESSFUL ) 1080cd: 83 c4 20 add $0x20,%esp 1080d0: 85 c0 test %eax,%eax 1080d2: 75 15 jne 1080e9 <== ALWAYS TAKEN /* * Initialize the base file system infrastructure. */ if (rtems_fs_init_helper) 1080d4: a1 48 31 12 00 mov 0x123148,%eax 1080d9: 85 c0 test %eax,%eax 1080db: 74 07 je 1080e4 <== ALWAYS TAKEN (* rtems_fs_init_helper)(); } 1080dd: 8b 5d fc mov -0x4(%ebp),%ebx 1080e0: c9 leave /* * Initialize the base file system infrastructure. */ if (rtems_fs_init_helper) (* rtems_fs_init_helper)(); 1080e1: ff e0 jmp *%eax 1080e3: 90 nop <== NOT EXECUTED } 1080e4: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 1080e7: c9 leave <== NOT EXECUTED 1080e8: c3 ret <== NOT EXECUTED RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &rtems_libio_semaphore ); if ( rc != RTEMS_SUCCESSFUL ) rtems_fatal_error_occurred( rc ); 1080e9: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1080ec: 50 push %eax <== NOT EXECUTED 1080ed: e8 aa 3a 00 00 call 10bb9c <== NOT EXECUTED if (rtems_libio_number_iops > 0) { rtems_libio_iops = (rtems_libio_t *) calloc(rtems_libio_number_iops, sizeof(rtems_libio_t)); if (rtems_libio_iops == NULL) rtems_fatal_error_occurred(RTEMS_NO_MEMORY); 1080f2: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1080f5: 6a 1a push $0x1a <== NOT EXECUTED 1080f7: e8 a0 3a 00 00 call 10bb9c <== NOT EXECUTED 0010fb30 : */ int rtems_libio_is_file_open( void *node_access ) { 10fb30: 55 push %ebp 10fb31: 89 e5 mov %esp,%ebp 10fb33: 53 push %ebx 10fb34: 83 ec 08 sub $0x8,%esp 10fb37: 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 ); 10fb3a: 6a 00 push $0x0 10fb3c: 6a 00 push $0x0 10fb3e: ff 35 48 72 12 00 pushl 0x127248 10fb44: e8 17 ba ff ff call 10b560 /* * Look for any active file descriptor entry. */ for (iop=rtems_libio_iops,i=0; i < rtems_libio_number_iops; iop++, i++){ 10fb49: a1 40 72 12 00 mov 0x127240,%eax 10fb4e: 8b 0d 4c 31 12 00 mov 0x12314c,%ecx 10fb54: 83 c4 10 add $0x10,%esp 10fb57: 85 c9 test %ecx,%ecx 10fb59: 74 18 je 10fb73 <== ALWAYS TAKEN 10fb5b: 31 d2 xor %edx,%edx 10fb5d: eb 04 jmp 10fb63 <== ALWAYS TAKEN 10fb5f: 90 nop <== NOT EXECUTED 10fb60: 83 c0 40 add $0x40,%eax if ((iop->flags & LIBIO_FLAGS_OPEN) != 0) { 10fb63: f6 40 15 01 testb $0x1,0x15(%eax) 10fb67: 74 05 je 10fb6e /* * Check if this node is under the file system that we * are trying to dismount. */ if ( iop->pathinfo.node_access == node_access ) { 10fb69: 39 58 18 cmp %ebx,0x18(%eax) 10fb6c: 74 1e je 10fb8c /* * Look for any active file descriptor entry. */ for (iop=rtems_libio_iops,i=0; i < rtems_libio_number_iops; iop++, i++){ 10fb6e: 42 inc %edx 10fb6f: 39 ca cmp %ecx,%edx 10fb71: 72 ed jb 10fb60 10fb73: 31 db xor %ebx,%ebx break; } } } rtems_semaphore_release( rtems_libio_semaphore ); 10fb75: 83 ec 0c sub $0xc,%esp 10fb78: ff 35 48 72 12 00 pushl 0x127248 10fb7e: e8 d9 ba ff ff call 10b65c return result; } 10fb83: 89 d8 mov %ebx,%eax 10fb85: 8b 5d fc mov -0x4(%ebp),%ebx 10fb88: c9 leave 10fb89: c3 ret 10fb8a: 66 90 xchg %ax,%ax <== NOT EXECUTED /* * Look for any active file descriptor entry. */ for (iop=rtems_libio_iops,i=0; i < rtems_libio_number_iops; iop++, i++){ 10fb8c: bb 01 00 00 00 mov $0x1,%ebx 10fb91: eb e2 jmp 10fb75 <== ALWAYS TAKEN 0010fb94 : */ int rtems_libio_is_open_files_in_fs( rtems_filesystem_mount_table_entry_t * fs_mt_entry ) { 10fb94: 55 push %ebp 10fb95: 89 e5 mov %esp,%ebp 10fb97: 53 push %ebx 10fb98: 83 ec 08 sub $0x8,%esp 10fb9b: 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 ); 10fb9e: 6a 00 push $0x0 10fba0: 6a 00 push $0x0 10fba2: ff 35 48 72 12 00 pushl 0x127248 10fba8: e8 b3 b9 ff ff call 10b560 /* * Look for any active file descriptor entry. */ for (iop=rtems_libio_iops,i=0; i < rtems_libio_number_iops; iop++, i++){ 10fbad: a1 40 72 12 00 mov 0x127240,%eax 10fbb2: 8b 0d 4c 31 12 00 mov 0x12314c,%ecx 10fbb8: 83 c4 10 add $0x10,%esp 10fbbb: 85 c9 test %ecx,%ecx 10fbbd: 74 18 je 10fbd7 <== ALWAYS TAKEN 10fbbf: 31 d2 xor %edx,%edx 10fbc1: eb 04 jmp 10fbc7 <== ALWAYS TAKEN 10fbc3: 90 nop <== NOT EXECUTED 10fbc4: 83 c0 40 add $0x40,%eax if ((iop->flags & LIBIO_FLAGS_OPEN) != 0) { 10fbc7: f6 40 15 01 testb $0x1,0x15(%eax) 10fbcb: 74 05 je 10fbd2 /* * Check if this node is under the file system that we * are trying to dismount. */ if ( iop->pathinfo.mt_entry == fs_mt_entry ) { 10fbcd: 39 58 28 cmp %ebx,0x28(%eax) 10fbd0: 74 1e je 10fbf0 /* * Look for any active file descriptor entry. */ for (iop=rtems_libio_iops,i=0; i < rtems_libio_number_iops; iop++, i++){ 10fbd2: 42 inc %edx 10fbd3: 39 ca cmp %ecx,%edx 10fbd5: 72 ed jb 10fbc4 10fbd7: 31 db xor %ebx,%ebx break; } } } rtems_semaphore_release( rtems_libio_semaphore ); 10fbd9: 83 ec 0c sub $0xc,%esp 10fbdc: ff 35 48 72 12 00 pushl 0x127248 10fbe2: e8 75 ba ff ff call 10b65c return result; } 10fbe7: 89 d8 mov %ebx,%eax 10fbe9: 8b 5d fc mov -0x4(%ebp),%ebx 10fbec: c9 leave 10fbed: c3 ret 10fbee: 66 90 xchg %ax,%ax <== NOT EXECUTED /* * Look for any active file descriptor entry. */ for (iop=rtems_libio_iops,i=0; i < rtems_libio_number_iops; iop++, i++){ 10fbf0: bb 01 00 00 00 mov $0x1,%ebx 10fbf5: eb e2 jmp 10fbd9 <== ALWAYS TAKEN 0012c824 : rtems_filesystem_freenode( &env->root_directory); free(env); } } rtems_status_code rtems_libio_set_private_env(void) { 12c824: 55 push %ebp 12c825: 89 e5 mov %esp,%ebp 12c827: 57 push %edi 12c828: 56 push %esi 12c829: 53 push %ebx 12c82a: 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); 12c82d: 8d 45 e4 lea -0x1c(%ebp),%eax 12c830: 50 push %eax 12c831: 6a 00 push $0x0 12c833: 6a 00 push $0x0 12c835: e8 26 17 00 00 call 12df60 if (sc != RTEMS_SUCCESSFUL) return sc; 12c83a: 83 c4 10 add $0x10,%esp 12c83d: 85 c0 test %eax,%eax 12c83f: 0f 85 89 00 00 00 jne 12c8ce <== ALWAYS TAKEN /* Only for the first time a malloc is necesary */ if (rtems_current_user_env==&rtems_global_user_env) { 12c845: 8b 1d c4 93 16 00 mov 0x1693c4,%ebx 12c84b: 81 fb 20 ef 16 00 cmp $0x16ef20,%ebx 12c851: 0f 84 81 00 00 00 je 12c8d8 return sc; } rtems_current_user_env = tmp; }; *rtems_current_user_env = rtems_global_user_env; /* get the global values*/ 12c857: be 20 ef 16 00 mov $0x16ef20,%esi 12c85c: b9 12 00 00 00 mov $0x12,%ecx 12c861: 89 df mov %ebx,%edi 12c863: f3 a5 rep movsl %ds:(%esi),%es:(%edi) rtems_current_user_env->task_id=task_id; /* mark the local values*/ 12c865: 8b 45 e4 mov -0x1c(%ebp),%eax 12c868: 89 03 mov %eax,(%ebx) /* get a clean root */ rtems_filesystem_root = THE_ROOT_FS_LOC; 12c86a: 8d 7b 18 lea 0x18(%ebx),%edi 12c86d: 8b 35 ec ee 16 00 mov 0x16eeec,%esi 12c873: 83 c6 1c add $0x1c,%esi 12c876: b1 05 mov $0x5,%cl 12c878: 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); 12c87a: 83 ec 0c sub $0xc,%esp 12c87d: 6a 00 push $0x0 12c87f: 8d 5d d0 lea -0x30(%ebp),%ebx 12c882: 53 push %ebx 12c883: 6a 00 push $0x0 12c885: 6a 01 push $0x1 12c887: 68 06 55 16 00 push $0x165506 12c88c: e8 af 05 fe ff call 10ce40 rtems_filesystem_root = loc; 12c891: 8b 3d c4 93 16 00 mov 0x1693c4,%edi 12c897: 83 c7 18 add $0x18,%edi 12c89a: b9 05 00 00 00 mov $0x5,%ecx 12c89f: 89 de mov %ebx,%esi 12c8a1: f3 a5 rep movsl %ds:(%esi),%es:(%edi) rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 12c8a3: 83 c4 14 add $0x14,%esp 12c8a6: 6a 00 push $0x0 12c8a8: 53 push %ebx 12c8a9: 6a 00 push $0x0 12c8ab: 6a 01 push $0x1 12c8ad: 68 06 55 16 00 push $0x165506 12c8b2: e8 89 05 fe ff call 10ce40 rtems_filesystem_current = loc; 12c8b7: 8b 3d c4 93 16 00 mov 0x1693c4,%edi 12c8bd: 83 c7 04 add $0x4,%edi 12c8c0: b9 05 00 00 00 mov $0x5,%ecx 12c8c5: 89 de mov %ebx,%esi 12c8c7: f3 a5 rep movsl %ds:(%esi),%es:(%edi) 12c8c9: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 12c8cb: 83 c4 20 add $0x20,%esp } 12c8ce: 8d 65 f4 lea -0xc(%ebp),%esp 12c8d1: 5b pop %ebx 12c8d2: 5e pop %esi 12c8d3: 5f pop %edi 12c8d4: c9 leave 12c8d5: c3 ret 12c8d6: 66 90 xchg %ax,%ax <== NOT EXECUTED sc=rtems_task_ident(RTEMS_SELF,0,&task_id); if (sc != RTEMS_SUCCESSFUL) return sc; /* Only for the first time a malloc is necesary */ if (rtems_current_user_env==&rtems_global_user_env) { rtems_user_env_t *tmp = malloc(sizeof(rtems_user_env_t)); 12c8d8: 83 ec 0c sub $0xc,%esp 12c8db: 6a 48 push $0x48 12c8dd: e8 4e 0b fe ff call 10d430 12c8e2: 89 c3 mov %eax,%ebx if (!tmp) 12c8e4: 83 c4 10 add $0x10,%esp 12c8e7: 85 c0 test %eax,%eax 12c8e9: 74 25 je 12c910 <== ALWAYS TAKEN #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); 12c8eb: 51 push %ecx 12c8ec: 68 30 c7 12 00 push $0x12c730 12c8f1: 68 c4 93 16 00 push $0x1693c4 12c8f6: 6a 00 push $0x0 12c8f8: e8 47 1a 00 00 call 12e344 if (sc != RTEMS_SUCCESSFUL) { 12c8fd: 83 c4 10 add $0x10,%esp 12c900: 85 c0 test %eax,%eax 12c902: 75 14 jne 12c918 <== ALWAYS TAKEN * not initialized yet */ free(tmp); return sc; } rtems_current_user_env = tmp; 12c904: 89 1d c4 93 16 00 mov %ebx,0x1693c4 12c90a: e9 48 ff ff ff jmp 12c857 <== ALWAYS TAKEN 12c90f: 90 nop <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) return sc; /* Only for the first time a malloc is necesary */ if (rtems_current_user_env==&rtems_global_user_env) { rtems_user_env_t *tmp = malloc(sizeof(rtems_user_env_t)); if (!tmp) 12c910: b8 1a 00 00 00 mov $0x1a,%eax <== NOT EXECUTED 12c915: eb b7 jmp 12c8ce <== NOT EXECUTED 12c917: 90 nop <== NOT EXECUTED sc = rtems_task_variable_add(RTEMS_SELF,(void*)&rtems_current_user_env,(void(*)(void *))free_user_env); if (sc != RTEMS_SUCCESSFUL) { /* don't use free_user_env because the pathlocs are * not initialized yet */ free(tmp); 12c918: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12c91b: 53 push %ebx <== NOT EXECUTED 12c91c: 89 45 c4 mov %eax,-0x3c(%ebp) <== NOT EXECUTED 12c91f: e8 d0 05 fe ff call 10cef4 <== NOT EXECUTED return sc; 12c924: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 12c927: 8b 45 c4 mov -0x3c(%ebp),%eax <== NOT EXECUTED 12c92a: eb a2 jmp 12c8ce <== NOT EXECUTED 0012c78c : * 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) { 12c78c: 55 push %ebp <== NOT EXECUTED 12c78d: 89 e5 mov %esp,%ebp <== NOT EXECUTED 12c78f: 53 push %ebx <== NOT EXECUTED 12c790: 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); 12c793: 8d 45 f0 lea -0x10(%ebp),%eax <== NOT EXECUTED 12c796: 50 push %eax <== NOT EXECUTED 12c797: 6a 00 push $0x0 <== NOT EXECUTED 12c799: 6a 00 push $0x0 <== NOT EXECUTED 12c79b: e8 c0 17 00 00 call 12df60 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) return sc; 12c7a0: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 12c7a3: 85 c0 test %eax,%eax <== NOT EXECUTED 12c7a5: 75 30 jne 12c7d7 <== NOT EXECUTED if (rtems_current_user_env->task_id==current_task_id) { 12c7a7: 8b 1d c4 93 16 00 mov 0x1693c4,%ebx <== NOT EXECUTED 12c7ad: 8b 03 mov (%ebx),%eax <== NOT EXECUTED 12c7af: 3b 45 f0 cmp -0x10(%ebp),%eax <== NOT EXECUTED 12c7b2: 74 28 je 12c7dc <== NOT EXECUTED free_user_env(tmp); }; /* AT THIS POINT, rtems_current_user_env is DANGLING */ sc = rtems_task_variable_get(task_id,(void*)&rtems_current_user_env, 12c7b4: 52 push %edx <== NOT EXECUTED 12c7b5: 8d 45 f4 lea -0xc(%ebp),%eax <== NOT EXECUTED 12c7b8: 50 push %eax <== NOT EXECUTED 12c7b9: 68 c4 93 16 00 push $0x1693c4 <== NOT EXECUTED 12c7be: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED 12c7c1: e8 ce 1c 00 00 call 12e494 <== NOT EXECUTED (void*)&shared_user_env ); if (sc != RTEMS_SUCCESSFUL) 12c7c6: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 12c7c9: 85 c0 test %eax,%eax <== NOT EXECUTED 12c7cb: 74 33 je 12c800 <== NOT EXECUTED return RTEMS_SUCCESSFUL; bailout: /* fallback to the global env */ rtems_current_user_env = &rtems_global_user_env; 12c7cd: c7 05 c4 93 16 00 20 movl $0x16ef20,0x1693c4 <== NOT EXECUTED 12c7d4: ef 16 00 <== NOT EXECUTED return sc; } 12c7d7: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 12c7da: c9 leave <== NOT EXECUTED 12c7db: c3 ret <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) return sc; if (rtems_current_user_env->task_id==current_task_id) { /* kill the current user env & task_var*/ rtems_user_env_t *tmp = rtems_current_user_env; sc = rtems_task_variable_delete(RTEMS_SELF,(void*)&rtems_current_user_env); 12c7dc: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 12c7df: 68 c4 93 16 00 push $0x1693c4 <== NOT EXECUTED 12c7e4: 6a 00 push $0x0 <== NOT EXECUTED 12c7e6: e8 1d 1c 00 00 call 12e408 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) return sc; 12c7eb: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 12c7ee: 85 c0 test %eax,%eax <== NOT EXECUTED 12c7f0: 75 e5 jne 12c7d7 <== NOT EXECUTED free_user_env(tmp); 12c7f2: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12c7f5: 53 push %ebx <== NOT EXECUTED 12c7f6: e8 35 ff ff ff call 12c730 <== NOT EXECUTED 12c7fb: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 12c7fe: eb b4 jmp 12c7b4 <== NOT EXECUTED sc = rtems_task_variable_get(task_id,(void*)&rtems_current_user_env, (void*)&shared_user_env ); if (sc != RTEMS_SUCCESSFUL) goto bailout; sc = rtems_task_variable_add(RTEMS_SELF,(void*)&rtems_current_user_env,free_user_env); 12c800: 50 push %eax <== NOT EXECUTED 12c801: 68 30 c7 12 00 push $0x12c730 <== NOT EXECUTED 12c806: 68 c4 93 16 00 push $0x1693c4 <== NOT EXECUTED 12c80b: 6a 00 push $0x0 <== NOT EXECUTED 12c80d: e8 32 1b 00 00 call 12e344 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 12c812: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 12c815: 85 c0 test %eax,%eax <== NOT EXECUTED 12c817: 75 b4 jne 12c7cd <== NOT EXECUTED goto bailout; /* the current_user_env is the same pointer that remote env */ rtems_current_user_env = shared_user_env; 12c819: 8b 55 f4 mov -0xc(%ebp),%edx <== NOT EXECUTED 12c81c: 89 15 c4 93 16 00 mov %edx,0x1693c4 <== NOT EXECUTED /* increase the reference count */ #ifdef HAVE_USERENV_REFCNT rtems_current_user_env->refcnt++; #endif return RTEMS_SUCCESSFUL; 12c822: eb b3 jmp 12c7d7 <== NOT EXECUTED 0010faf0 : */ uint32_t rtems_libio_to_fcntl_flags( uint32_t flags ) { 10faf0: 55 push %ebp 10faf1: 89 e5 mov %esp,%ebp 10faf3: 8b 55 08 mov 0x8(%ebp),%edx uint32_t fcntl_flags = 0; if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) { 10faf6: 89 d0 mov %edx,%eax 10faf8: 83 e0 06 and $0x6,%eax 10fafb: 83 f8 06 cmp $0x6,%eax 10fafe: 74 2c je 10fb2c <== ALWAYS TAKEN fcntl_flags |= O_RDWR; } else if ( (flags & LIBIO_FLAGS_READ) == LIBIO_FLAGS_READ) { 10fb00: f6 c2 02 test $0x2,%dl 10fb03: 75 23 jne 10fb28 <== NEVER TAKEN 10fb05: 89 d0 mov %edx,%eax <== NOT EXECUTED 10fb07: c1 e8 02 shr $0x2,%eax <== NOT EXECUTED 10fb0a: 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 ) { 10fb0d: f6 c2 01 test $0x1,%dl 10fb10: 74 03 je 10fb15 fcntl_flags |= O_NONBLOCK; 10fb12: 80 cc 40 or $0x40,%ah } if ( (flags & LIBIO_FLAGS_APPEND) == LIBIO_FLAGS_APPEND ) { 10fb15: f6 c6 02 test $0x2,%dh 10fb18: 74 03 je 10fb1d fcntl_flags |= O_APPEND; 10fb1a: 83 c8 08 or $0x8,%eax } if ( (flags & LIBIO_FLAGS_CREATE) == LIBIO_FLAGS_CREATE ) { 10fb1d: 80 e6 04 and $0x4,%dh 10fb20: 74 03 je 10fb25 fcntl_flags |= O_CREAT; 10fb22: 80 cc 02 or $0x2,%ah } return fcntl_flags; } 10fb25: c9 leave 10fb26: c3 ret 10fb27: 90 nop <== NOT EXECUTED { uint32_t fcntl_flags = 0; if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) { fcntl_flags |= O_RDWR; } else if ( (flags & LIBIO_FLAGS_READ) == LIBIO_FLAGS_READ) { 10fb28: 31 c0 xor %eax,%eax 10fb2a: eb e1 jmp 10fb0d <== ALWAYS TAKEN uint32_t flags ) { uint32_t fcntl_flags = 0; if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) { 10fb2c: b0 02 mov $0x2,%al <== NOT EXECUTED 10fb2e: eb dd jmp 10fb0d <== NOT EXECUTED 0010d4f0 : * size and thus we skip updating the statistics. */ static void rtems_malloc_statistics_at_free( void *pointer ) { 10d4f0: 55 push %ebp <== NOT EXECUTED 10d4f1: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10d4f3: 83 ec 1c sub $0x1c,%esp <== NOT EXECUTED uintptr_t size; if (_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &size) ) { 10d4f6: 8d 45 f4 lea -0xc(%ebp),%eax <== NOT EXECUTED 10d4f9: 50 push %eax <== NOT EXECUTED 10d4fa: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED 10d4fd: ff 35 b8 72 16 00 pushl 0x1672b8 <== NOT EXECUTED 10d503: e8 b4 5e 00 00 call 1133bc <_Protected_heap_Get_block_size> <== NOT EXECUTED 10d508: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10d50b: 84 c0 test %al,%al <== NOT EXECUTED 10d50d: 74 11 je 10d520 <== NOT EXECUTED MSBUMP(lifetime_freed, size); 10d50f: 8b 45 f4 mov -0xc(%ebp),%eax <== NOT EXECUTED 10d512: 31 d2 xor %edx,%edx <== NOT EXECUTED 10d514: 01 05 e4 ee 16 00 add %eax,0x16eee4 <== NOT EXECUTED 10d51a: 11 15 e8 ee 16 00 adc %edx,0x16eee8 <== NOT EXECUTED } } 10d520: c9 leave <== NOT EXECUTED 10d521: c3 ret <== NOT EXECUTED 0010d524 : } static void rtems_malloc_statistics_at_malloc( void *pointer ) { 10d524: 55 push %ebp <== NOT EXECUTED 10d525: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10d527: 83 ec 18 sub $0x18,%esp <== NOT EXECUTED 10d52a: 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 ) 10d52d: 85 c0 test %eax,%eax <== NOT EXECUTED 10d52f: 74 4a je 10d57b <== NOT EXECUTED static void rtems_malloc_statistics_at_malloc( void *pointer ) { uintptr_t actual_size = 0; 10d531: 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); 10d538: 52 push %edx <== NOT EXECUTED 10d539: 8d 55 f4 lea -0xc(%ebp),%edx <== NOT EXECUTED 10d53c: 52 push %edx <== NOT EXECUTED 10d53d: 50 push %eax <== NOT EXECUTED 10d53e: ff 35 b8 72 16 00 pushl 0x1672b8 <== NOT EXECUTED 10d544: e8 73 5e 00 00 call 1133bc <_Protected_heap_Get_block_size> <== NOT EXECUTED MSBUMP(lifetime_allocated, actual_size); 10d549: 8b 45 f4 mov -0xc(%ebp),%eax <== NOT EXECUTED 10d54c: 31 d2 xor %edx,%edx <== NOT EXECUTED 10d54e: 03 05 dc ee 16 00 add 0x16eedc,%eax <== NOT EXECUTED 10d554: 13 15 e0 ee 16 00 adc 0x16eee0,%edx <== NOT EXECUTED 10d55a: a3 dc ee 16 00 mov %eax,0x16eedc <== NOT EXECUTED 10d55f: 89 15 e0 ee 16 00 mov %edx,0x16eee0 <== NOT EXECUTED current_depth = (uint32_t) (s->lifetime_allocated - s->lifetime_freed); 10d565: 2b 05 e4 ee 16 00 sub 0x16eee4,%eax <== NOT EXECUTED if (current_depth > s->max_depth) 10d56b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10d56e: 3b 05 d8 ee 16 00 cmp 0x16eed8,%eax <== NOT EXECUTED 10d574: 76 05 jbe 10d57b <== NOT EXECUTED s->max_depth = current_depth; 10d576: a3 d8 ee 16 00 mov %eax,0x16eed8 <== NOT EXECUTED } 10d57b: c9 leave <== NOT EXECUTED 10d57c: c3 ret <== NOT EXECUTED 0010d580 : #include #include static void rtems_malloc_statistics_initialize( void ) { 10d580: 55 push %ebp <== NOT EXECUTED 10d581: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10d583: 57 push %edi <== NOT EXECUTED /* * Zero all the statistics */ (void) memset(&rtems_malloc_statistics, 0, sizeof(rtems_malloc_statistics)); 10d584: ba c0 ee 16 00 mov $0x16eec0,%edx <== NOT EXECUTED 10d589: b9 2c 00 00 00 mov $0x2c,%ecx <== NOT EXECUTED 10d58e: 31 c0 xor %eax,%eax <== NOT EXECUTED 10d590: 89 d7 mov %edx,%edi <== NOT EXECUTED 10d592: f3 aa rep stos %al,%es:(%edi) <== NOT EXECUTED } 10d594: 5f pop %edi <== NOT EXECUTED 10d595: c9 leave <== NOT EXECUTED 10d596: c3 ret <== NOT EXECUTED 00114928 : int rtems_memalign( void **pointer, size_t alignment, size_t size ) { 114928: 55 push %ebp 114929: 89 e5 mov %esp,%ebp 11492b: 53 push %ebx 11492c: 83 ec 14 sub $0x14,%esp 11492f: 8b 5d 08 mov 0x8(%ebp),%ebx void *return_this; /* * Parameter error checks */ if ( !pointer ) 114932: 85 db test %ebx,%ebx 114934: 74 5b je 114991 return EINVAL; *pointer = NULL; 114936: 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()) && 11493c: 83 3d c0 cd 12 00 03 cmpl $0x3,0x12cdc0 114943: 74 43 je 114988 <== NEVER TAKEN /* * * If some free's have been deferred, then do them now. */ malloc_deferred_frees_process(); 114945: e8 22 4c ff ff call 10956c <== ALWAYS TAKEN uintptr_t size, uintptr_t alignment ) { return _Protected_heap_Allocate_aligned_with_boundary( heap, size, alignment, 0 ); 11494a: 6a 00 push $0x0 11494c: ff 75 0c pushl 0xc(%ebp) 11494f: ff 75 10 pushl 0x10(%ebp) 114952: ff 35 78 88 12 00 pushl 0x128878 114958: e8 d7 9e ff ff call 10e834 <_Protected_heap_Allocate_aligned_with_boundary> return_this = _Protected_heap_Allocate_aligned( RTEMS_Malloc_Heap, size, alignment ); if ( !return_this ) 11495d: 83 c4 10 add $0x10,%esp 114960: 85 c0 test %eax,%eax 114962: 74 38 je 11499c return ENOMEM; /* * If configured, update the more involved statistics */ if ( rtems_malloc_statistics_helpers ) 114964: 8b 15 68 ad 12 00 mov 0x12ad68,%edx 11496a: 85 d2 test %edx,%edx 11496c: 74 10 je 11497e <== NEVER TAKEN (*rtems_malloc_statistics_helpers->at_malloc)(pointer); 11496e: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 114971: 53 push %ebx <== NOT EXECUTED 114972: 89 45 f4 mov %eax,-0xc(%ebp) <== NOT EXECUTED 114975: ff 52 04 call *0x4(%edx) <== NOT EXECUTED 114978: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 11497b: 8b 45 f4 mov -0xc(%ebp),%eax <== NOT EXECUTED */ if (rtems_malloc_boundary_helpers) (*rtems_malloc_boundary_helpers->at_malloc)(return_this, size); #endif *pointer = return_this; 11497e: 89 03 mov %eax,(%ebx) 114980: 31 c0 xor %eax,%eax return 0; } 114982: 8b 5d fc mov -0x4(%ebp),%ebx 114985: c9 leave 114986: c3 ret 114987: 90 nop <== NOT EXECUTED *pointer = NULL; /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) && 114988: e8 87 4b ff ff call 109514 <== ALWAYS TAKEN 11498d: 84 c0 test %al,%al 11498f: 75 b4 jne 114945 <== NEVER TAKEN if (rtems_malloc_boundary_helpers) (*rtems_malloc_boundary_helpers->at_malloc)(return_this, size); #endif *pointer = return_this; return 0; 114991: b8 16 00 00 00 mov $0x16,%eax } 114996: 8b 5d fc mov -0x4(%ebp),%ebx 114999: c9 leave 11499a: c3 ret 11499b: 90 nop <== NOT EXECUTED return_this = _Protected_heap_Allocate_aligned( RTEMS_Malloc_Heap, size, alignment ); if ( !return_this ) 11499c: b0 0c mov $0xc,%al 11499e: eb e2 jmp 114982 <== ALWAYS TAKEN 00115f10 : rtems_id id, const void *buffer, size_t size, uint32_t *count ) { 115f10: 55 push %ebp 115f11: 89 e5 mov %esp,%ebp 115f13: 57 push %edi 115f14: 56 push %esi 115f15: 53 push %ebx 115f16: 83 ec 1c sub $0x1c,%esp 115f19: 8b 7d 08 mov 0x8(%ebp),%edi 115f1c: 8b 5d 0c mov 0xc(%ebp),%ebx 115f1f: 8b 75 14 mov 0x14(%ebp),%esi register Message_queue_Control *the_message_queue; Objects_Locations location; CORE_message_queue_Status core_status; if ( !buffer ) 115f22: 85 db test %ebx,%ebx 115f24: 74 62 je 115f88 return RTEMS_INVALID_ADDRESS; if ( !count ) 115f26: 85 f6 test %esi,%esi 115f28: 74 5e je 115f88 RTEMS_INLINE_ROUTINE Message_queue_Control *_Message_queue_Get ( Objects_Id id, Objects_Locations *location ) { return (Message_queue_Control *) 115f2a: 51 push %ecx 115f2b: 8d 45 e4 lea -0x1c(%ebp),%eax 115f2e: 50 push %eax 115f2f: 57 push %edi 115f30: 68 60 25 14 00 push $0x142560 115f35: e8 1e 4d 00 00 call 11ac58 <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { 115f3a: 83 c4 10 add $0x10,%esp 115f3d: 8b 55 e4 mov -0x1c(%ebp),%edx 115f40: 85 d2 test %edx,%edx 115f42: 74 10 je 115f54 115f44: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 115f49: 8d 65 f4 lea -0xc(%ebp),%esp 115f4c: 5b pop %ebx 115f4d: 5e pop %esi 115f4e: 5f pop %edi 115f4f: c9 leave 115f50: c3 ret 115f51: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: core_status = _CORE_message_queue_Broadcast( 115f54: 83 ec 08 sub $0x8,%esp 115f57: 56 push %esi 115f58: 6a 00 push $0x0 115f5a: 57 push %edi 115f5b: ff 75 10 pushl 0x10(%ebp) 115f5e: 53 push %ebx 115f5f: 83 c0 14 add $0x14,%eax 115f62: 50 push %eax 115f63: e8 d4 34 00 00 call 11943c <_CORE_message_queue_Broadcast> 115f68: 89 c3 mov %eax,%ebx NULL, #endif count ); _Thread_Enable_dispatch(); 115f6a: 83 c4 20 add $0x20,%esp 115f6d: e8 ca 55 00 00 call 11b53c <_Thread_Enable_dispatch> return _Message_queue_Translate_core_message_queue_return_code( core_status ); 115f72: 83 ec 0c sub $0xc,%esp 115f75: 53 push %ebx 115f76: e8 69 03 00 00 call 1162e4 <_Message_queue_Translate_core_message_queue_return_code> <== ALWAYS TAKEN #endif count ); _Thread_Enable_dispatch(); return 115f7b: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 115f7e: 8d 65 f4 lea -0xc(%ebp),%esp 115f81: 5b pop %ebx 115f82: 5e pop %esi 115f83: 5f pop %edi 115f84: c9 leave 115f85: c3 ret 115f86: 66 90 xchg %ax,%ax <== NOT EXECUTED #endif count ); _Thread_Enable_dispatch(); return 115f88: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 115f8d: 8d 65 f4 lea -0xc(%ebp),%esp 115f90: 5b pop %ebx 115f91: 5e pop %esi 115f92: 5f pop %edi 115f93: c9 leave 115f94: c3 ret 00113ab8 : uint32_t count, size_t max_message_size, rtems_attribute attribute_set, rtems_id *id ) { 113ab8: 55 push %ebp 113ab9: 89 e5 mov %esp,%ebp 113abb: 57 push %edi 113abc: 56 push %esi 113abd: 53 push %ebx 113abe: 83 ec 2c sub $0x2c,%esp 113ac1: 8b 5d 08 mov 0x8(%ebp),%ebx 113ac4: 8b 75 0c mov 0xc(%ebp),%esi 113ac7: 8b 4d 10 mov 0x10(%ebp),%ecx 113aca: 8b 7d 18 mov 0x18(%ebp),%edi CORE_message_queue_Attributes the_msgq_attributes; #if defined(RTEMS_MULTIPROCESSING) bool is_global; #endif if ( !rtems_is_name_valid( name ) ) 113acd: 85 db test %ebx,%ebx 113acf: 74 2f je 113b00 return RTEMS_INVALID_NAME; if ( !id ) 113ad1: 85 ff test %edi,%edi 113ad3: 0f 84 a3 00 00 00 je 113b7c <== ALWAYS TAKEN if ( (is_global = _Attributes_Is_global( attribute_set ) ) && !_System_state_Is_multiprocessing ) return RTEMS_MP_NOT_CONFIGURED; #endif if ( count == 0 ) 113ad9: 85 f6 test %esi,%esi 113adb: 74 13 je 113af0 return RTEMS_INVALID_NUMBER; if ( max_message_size == 0 ) 113add: 85 c9 test %ecx,%ecx 113adf: 75 2f jne 113b10 113ae1: b8 08 00 00 00 mov $0x8,%eax ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 113ae6: 8d 65 f4 lea -0xc(%ebp),%esp 113ae9: 5b pop %ebx 113aea: 5e pop %esi 113aeb: 5f pop %edi 113aec: c9 leave 113aed: c3 ret 113aee: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( (is_global = _Attributes_Is_global( attribute_set ) ) && !_System_state_Is_multiprocessing ) return RTEMS_MP_NOT_CONFIGURED; #endif if ( count == 0 ) 113af0: b8 0a 00 00 00 mov $0xa,%eax ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 113af5: 8d 65 f4 lea -0xc(%ebp),%esp 113af8: 5b pop %ebx 113af9: 5e pop %esi 113afa: 5f pop %edi 113afb: c9 leave 113afc: c3 ret 113afd: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED CORE_message_queue_Attributes the_msgq_attributes; #if defined(RTEMS_MULTIPROCESSING) bool is_global; #endif if ( !rtems_is_name_valid( name ) ) 113b00: b8 03 00 00 00 mov $0x3,%eax ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 113b05: 8d 65 f4 lea -0xc(%ebp),%esp 113b08: 5b pop %ebx 113b09: 5e pop %esi 113b0a: 5f pop %edi 113b0b: c9 leave 113b0c: c3 ret 113b0d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 113b10: a1 f8 10 13 00 mov 0x1310f8,%eax 113b15: 40 inc %eax 113b16: a3 f8 10 13 00 mov %eax,0x1310f8 #endif #endif _Thread_Disable_dispatch(); /* protects object pointer */ the_message_queue = _Message_queue_Allocate(); 113b1b: 89 4d d4 mov %ecx,-0x2c(%ebp) 113b1e: e8 5d 5a 00 00 call 119580 <_Message_queue_Allocate> 113b23: 89 c2 mov %eax,%edx if ( !the_message_queue ) { 113b25: 85 c0 test %eax,%eax 113b27: 8b 4d d4 mov -0x2c(%ebp),%ecx 113b2a: 74 7c je 113ba8 _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } #endif the_message_queue->attribute_set = attribute_set; 113b2c: 8b 45 14 mov 0x14(%ebp),%eax 113b2f: 89 42 10 mov %eax,0x10(%edx) if (_Attributes_Is_priority( attribute_set ) ) the_msgq_attributes.discipline = CORE_MESSAGE_QUEUE_DISCIPLINES_PRIORITY; 113b32: a8 04 test $0x4,%al 113b34: 0f 95 c0 setne %al 113b37: 0f b6 c0 movzbl %al,%eax 113b3a: 89 45 e4 mov %eax,-0x1c(%ebp) else the_msgq_attributes.discipline = CORE_MESSAGE_QUEUE_DISCIPLINES_FIFO; if ( ! _CORE_message_queue_Initialize( 113b3d: 51 push %ecx 113b3e: 56 push %esi 113b3f: 8d 45 e4 lea -0x1c(%ebp),%eax 113b42: 50 push %eax 113b43: 8d 42 14 lea 0x14(%edx),%eax 113b46: 50 push %eax 113b47: 89 55 d4 mov %edx,-0x2c(%ebp) 113b4a: e8 f1 10 00 00 call 114c40 <_CORE_message_queue_Initialize> 113b4f: 83 c4 10 add $0x10,%esp 113b52: 84 c0 test %al,%al 113b54: 8b 55 d4 mov -0x2c(%ebp),%edx 113b57: 75 2f jne 113b88 */ RTEMS_INLINE_ROUTINE void _Message_queue_Free ( Message_queue_Control *the_message_queue ) { _Objects_Free( &_Message_queue_Information, &the_message_queue->Object ); 113b59: 83 ec 08 sub $0x8,%esp 113b5c: 52 push %edx 113b5d: 68 a0 1a 13 00 push $0x131aa0 113b62: e8 15 1f 00 00 call 115a7c <_Objects_Free> _Objects_MP_Close( &_Message_queue_Information, the_message_queue->Object.id); #endif _Message_queue_Free( the_message_queue ); _Thread_Enable_dispatch(); 113b67: e8 34 29 00 00 call 1164a0 <_Thread_Enable_dispatch> 113b6c: b8 0d 00 00 00 mov $0xd,%eax return RTEMS_UNSATISFIED; 113b71: 83 c4 10 add $0x10,%esp 113b74: e9 6d ff ff ff jmp 113ae6 113b79: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED #endif if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; if ( !id ) 113b7c: b8 09 00 00 00 mov $0x9,%eax 113b81: e9 60 ff ff ff jmp 113ae6 113b86: 66 90 xchg %ax,%ax <== NOT EXECUTED #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 113b88: 8b 42 08 mov 0x8(%edx),%eax 113b8b: 0f b7 f0 movzwl %ax,%esi 113b8e: 8b 0d bc 1a 13 00 mov 0x131abc,%ecx 113b94: 89 14 b1 mov %edx,(%ecx,%esi,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 113b97: 89 5a 0c mov %ebx,0xc(%edx) &_Message_queue_Information, &the_message_queue->Object, (Objects_Name) name ); *id = the_message_queue->Object.id; 113b9a: 89 07 mov %eax,(%edi) name, 0 ); #endif _Thread_Enable_dispatch(); 113b9c: e8 ff 28 00 00 call 1164a0 <_Thread_Enable_dispatch> 113ba1: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 113ba3: e9 3e ff ff ff jmp 113ae6 <== ALWAYS TAKEN _Thread_Disable_dispatch(); /* protects object pointer */ the_message_queue = _Message_queue_Allocate(); if ( !the_message_queue ) { _Thread_Enable_dispatch(); 113ba8: e8 f3 28 00 00 call 1164a0 <_Thread_Enable_dispatch> 113bad: b8 05 00 00 00 mov $0x5,%eax return RTEMS_TOO_MANY; 113bb2: e9 2f ff ff ff jmp 113ae6 00117ae0 : */ rtems_status_code rtems_message_queue_delete( rtems_id id ) { 117ae0: 55 push %ebp 117ae1: 89 e5 mov %esp,%ebp 117ae3: 53 push %ebx 117ae4: 83 ec 18 sub $0x18,%esp 117ae7: 8d 45 f4 lea -0xc(%ebp),%eax 117aea: 50 push %eax 117aeb: ff 75 08 pushl 0x8(%ebp) 117aee: 68 00 5a 13 00 push $0x135a00 117af3: e8 48 9e ff ff call 111940 <_Objects_Get> 117af8: 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 ) { 117afa: 83 c4 10 add $0x10,%esp 117afd: 8b 4d f4 mov -0xc(%ebp),%ecx 117b00: 85 c9 test %ecx,%ecx 117b02: 75 3c jne 117b40 case OBJECTS_LOCAL: _Objects_Close( &_Message_queue_Information, 117b04: 83 ec 08 sub $0x8,%esp 117b07: 50 push %eax 117b08: 68 00 5a 13 00 push $0x135a00 117b0d: e8 fa 99 ff ff call 11150c <_Objects_Close> &the_message_queue->Object ); _CORE_message_queue_Close( 117b12: 83 c4 0c add $0xc,%esp 117b15: 6a 05 push $0x5 117b17: 6a 00 push $0x0 117b19: 8d 43 14 lea 0x14(%ebx),%eax 117b1c: 50 push %eax 117b1d: e8 0e 05 00 00 call 118030 <_CORE_message_queue_Close> */ RTEMS_INLINE_ROUTINE void _Message_queue_Free ( Message_queue_Control *the_message_queue ) { _Objects_Free( &_Message_queue_Information, &the_message_queue->Object ); 117b22: 58 pop %eax 117b23: 5a pop %edx 117b24: 53 push %ebx 117b25: 68 00 5a 13 00 push $0x135a00 117b2a: e8 e1 9c ff ff call 111810 <_Objects_Free> 0, /* Not used */ 0 ); } #endif _Thread_Enable_dispatch(); 117b2f: e8 f0 a6 ff ff call 112224 <_Thread_Enable_dispatch> 117b34: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 117b36: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 117b39: 8b 5d fc mov -0x4(%ebp),%ebx 117b3c: c9 leave 117b3d: c3 ret 117b3e: 66 90 xchg %ax,%ax <== NOT EXECUTED { register Message_queue_Control *the_message_queue; Objects_Locations location; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { 117b40: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 117b45: 8b 5d fc mov -0x4(%ebp),%ebx 117b48: c9 leave 117b49: c3 ret 00116104 : rtems_status_code rtems_message_queue_flush( rtems_id id, uint32_t *count ) { 116104: 55 push %ebp 116105: 89 e5 mov %esp,%ebp 116107: 53 push %ebx 116108: 83 ec 14 sub $0x14,%esp 11610b: 8b 5d 0c mov 0xc(%ebp),%ebx register Message_queue_Control *the_message_queue; Objects_Locations location; if ( !count ) 11610e: 85 db test %ebx,%ebx 116110: 74 46 je 116158 RTEMS_INLINE_ROUTINE Message_queue_Control *_Message_queue_Get ( Objects_Id id, Objects_Locations *location ) { return (Message_queue_Control *) 116112: 51 push %ecx 116113: 8d 45 f4 lea -0xc(%ebp),%eax 116116: 50 push %eax 116117: ff 75 08 pushl 0x8(%ebp) 11611a: 68 60 25 14 00 push $0x142560 11611f: e8 34 4b 00 00 call 11ac58 <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { 116124: 83 c4 10 add $0x10,%esp 116127: 8b 55 f4 mov -0xc(%ebp),%edx 11612a: 85 d2 test %edx,%edx 11612c: 74 0a je 116138 11612e: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116133: 8b 5d fc mov -0x4(%ebp),%ebx 116136: c9 leave 116137: c3 ret the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: *count = _CORE_message_queue_Flush( &the_message_queue->message_queue ); 116138: 83 ec 0c sub $0xc,%esp 11613b: 83 c0 14 add $0x14,%eax 11613e: 50 push %eax 11613f: e8 b8 33 00 00 call 1194fc <_CORE_message_queue_Flush> 116144: 89 03 mov %eax,(%ebx) _Thread_Enable_dispatch(); 116146: e8 f1 53 00 00 call 11b53c <_Thread_Enable_dispatch> 11614b: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 11614d: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116150: 8b 5d fc mov -0x4(%ebp),%ebx 116153: c9 leave 116154: c3 ret 116155: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED ) { register Message_queue_Control *the_message_queue; Objects_Locations location; if ( !count ) 116158: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11615d: 8b 5d fc mov -0x4(%ebp),%ebx 116160: c9 leave 116161: c3 ret 00116164 : rtems_status_code rtems_message_queue_get_number_pending( rtems_id id, uint32_t *count ) { 116164: 55 push %ebp 116165: 89 e5 mov %esp,%ebp 116167: 53 push %ebx 116168: 83 ec 14 sub $0x14,%esp 11616b: 8b 5d 0c mov 0xc(%ebp),%ebx register Message_queue_Control *the_message_queue; Objects_Locations location; if ( !count ) 11616e: 85 db test %ebx,%ebx 116170: 74 3a je 1161ac 116172: 51 push %ecx 116173: 8d 45 f4 lea -0xc(%ebp),%eax 116176: 50 push %eax 116177: ff 75 08 pushl 0x8(%ebp) 11617a: 68 60 25 14 00 push $0x142560 11617f: e8 d4 4a 00 00 call 11ac58 <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { 116184: 83 c4 10 add $0x10,%esp 116187: 8b 55 f4 mov -0xc(%ebp),%edx 11618a: 85 d2 test %edx,%edx 11618c: 74 0a je 116198 11618e: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116193: 8b 5d fc mov -0x4(%ebp),%ebx 116196: c9 leave 116197: c3 ret the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: *count = the_message_queue->message_queue.number_of_pending_messages; 116198: 8b 40 5c mov 0x5c(%eax),%eax 11619b: 89 03 mov %eax,(%ebx) _Thread_Enable_dispatch(); 11619d: e8 9a 53 00 00 call 11b53c <_Thread_Enable_dispatch> 1161a2: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1161a4: 8b 5d fc mov -0x4(%ebp),%ebx 1161a7: c9 leave 1161a8: c3 ret 1161a9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED ) { register Message_queue_Control *the_message_queue; Objects_Locations location; if ( !count ) 1161ac: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1161b1: 8b 5d fc mov -0x4(%ebp),%ebx 1161b4: c9 leave 1161b5: c3 ret 00113bdc : void *buffer, size_t *size, rtems_option option_set, rtems_interval timeout ) { 113bdc: 55 push %ebp 113bdd: 89 e5 mov %esp,%ebp 113bdf: 56 push %esi 113be0: 53 push %ebx 113be1: 83 ec 10 sub $0x10,%esp 113be4: 8b 5d 0c mov 0xc(%ebp),%ebx 113be7: 8b 75 10 mov 0x10(%ebp),%esi register Message_queue_Control *the_message_queue; Objects_Locations location; bool wait; if ( !buffer ) 113bea: 85 db test %ebx,%ebx 113bec: 74 6e je 113c5c return RTEMS_INVALID_ADDRESS; if ( !size ) 113bee: 85 f6 test %esi,%esi 113bf0: 74 6a je 113c5c RTEMS_INLINE_ROUTINE Message_queue_Control *_Message_queue_Get ( Objects_Id id, Objects_Locations *location ) { return (Message_queue_Control *) 113bf2: 51 push %ecx 113bf3: 8d 45 f4 lea -0xc(%ebp),%eax 113bf6: 50 push %eax 113bf7: ff 75 08 pushl 0x8(%ebp) 113bfa: 68 a0 1a 13 00 push $0x131aa0 113bff: e8 a8 1f 00 00 call 115bac <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { 113c04: 83 c4 10 add $0x10,%esp 113c07: 8b 55 f4 mov -0xc(%ebp),%edx 113c0a: 85 d2 test %edx,%edx 113c0c: 75 42 jne 113c50 if ( _Options_Is_no_wait( option_set ) ) wait = false; else wait = true; _CORE_message_queue_Seize( 113c0e: 83 ec 08 sub $0x8,%esp 113c11: ff 75 18 pushl 0x18(%ebp) 113c14: 8b 55 14 mov 0x14(%ebp),%edx 113c17: 83 e2 01 and $0x1,%edx 113c1a: 83 f2 01 xor $0x1,%edx 113c1d: 52 push %edx 113c1e: 56 push %esi 113c1f: 53 push %ebx 113c20: ff 70 08 pushl 0x8(%eax) 113c23: 83 c0 14 add $0x14,%eax 113c26: 50 push %eax 113c27: e8 d4 10 00 00 call 114d00 <_CORE_message_queue_Seize> buffer, size, wait, timeout ); _Thread_Enable_dispatch(); 113c2c: 83 c4 20 add $0x20,%esp 113c2f: e8 6c 28 00 00 call 1164a0 <_Thread_Enable_dispatch> return _Message_queue_Translate_core_message_queue_return_code( 113c34: 83 ec 0c sub $0xc,%esp 113c37: a1 b8 11 13 00 mov 0x1311b8,%eax 113c3c: ff 70 34 pushl 0x34(%eax) 113c3f: e8 a0 00 00 00 call 113ce4 <_Message_queue_Translate_core_message_queue_return_code> <== ALWAYS TAKEN 113c44: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 113c47: 8d 65 f8 lea -0x8(%ebp),%esp 113c4a: 5b pop %ebx 113c4b: 5e pop %esi 113c4c: c9 leave 113c4d: c3 ret 113c4e: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( !size ) return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { 113c50: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 113c55: 8d 65 f8 lea -0x8(%ebp),%esp 113c58: 5b pop %ebx 113c59: 5e pop %esi 113c5a: c9 leave 113c5b: c3 ret size, wait, timeout ); _Thread_Enable_dispatch(); return _Message_queue_Translate_core_message_queue_return_code( 113c5c: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 113c61: 8d 65 f8 lea -0x8(%ebp),%esp 113c64: 5b pop %ebx 113c65: 5e pop %esi 113c66: c9 leave 113c67: c3 ret 0010b25c : rtems_status_code rtems_message_queue_send( rtems_id id, const void *buffer, size_t size ) { 10b25c: 55 push %ebp 10b25d: 89 e5 mov %esp,%ebp 10b25f: 56 push %esi 10b260: 53 push %ebx 10b261: 83 ec 10 sub $0x10,%esp 10b264: 8b 75 08 mov 0x8(%ebp),%esi 10b267: 8b 5d 0c mov 0xc(%ebp),%ebx register Message_queue_Control *the_message_queue; Objects_Locations location; CORE_message_queue_Status status; if ( !buffer ) 10b26a: 85 db test %ebx,%ebx 10b26c: 74 5e je 10b2cc RTEMS_INLINE_ROUTINE Message_queue_Control *_Message_queue_Get ( Objects_Id id, Objects_Locations *location ) { return (Message_queue_Control *) 10b26e: 51 push %ecx 10b26f: 8d 45 f4 lea -0xc(%ebp),%eax 10b272: 50 push %eax 10b273: 56 push %esi 10b274: 68 80 7d 12 00 push $0x127d80 10b279: e8 c2 19 00 00 call 10cc40 <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { 10b27e: 83 c4 10 add $0x10,%esp 10b281: 8b 55 f4 mov -0xc(%ebp),%edx 10b284: 85 d2 test %edx,%edx 10b286: 74 0c je 10b294 10b288: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10b28d: 8d 65 f8 lea -0x8(%ebp),%esp 10b290: 5b pop %ebx 10b291: 5e pop %esi 10b292: c9 leave 10b293: c3 ret CORE_message_queue_API_mp_support_callout api_message_queue_mp_support, bool wait, Watchdog_Interval timeout ) { return _CORE_message_queue_Submit( 10b294: 6a 00 push $0x0 10b296: 6a 00 push $0x0 10b298: 68 ff ff ff 7f push $0x7fffffff 10b29d: 6a 00 push $0x0 10b29f: 56 push %esi 10b2a0: ff 75 10 pushl 0x10(%ebp) 10b2a3: 53 push %ebx 10b2a4: 83 c0 14 add $0x14,%eax 10b2a7: 50 push %eax 10b2a8: e8 13 0c 00 00 call 10bec0 <_CORE_message_queue_Submit> 10b2ad: 89 c3 mov %eax,%ebx MESSAGE_QUEUE_MP_HANDLER, false, /* sender does not block */ 0 /* no timeout */ ); _Thread_Enable_dispatch(); 10b2af: 83 c4 20 add $0x20,%esp 10b2b2: e8 fd 21 00 00 call 10d4b4 <_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); 10b2b7: 83 ec 0c sub $0xc,%esp 10b2ba: 53 push %ebx 10b2bb: e8 18 00 00 00 call 10b2d8 <_Message_queue_Translate_core_message_queue_return_code> <== ALWAYS TAKEN 10b2c0: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10b2c3: 8d 65 f8 lea -0x8(%ebp),%esp 10b2c6: 5b pop %ebx 10b2c7: 5e pop %esi 10b2c8: c9 leave 10b2c9: c3 ret 10b2ca: 66 90 xchg %ax,%ax <== NOT EXECUTED { register Message_queue_Control *the_message_queue; Objects_Locations location; CORE_message_queue_Status status; if ( !buffer ) 10b2cc: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10b2d1: 8d 65 f8 lea -0x8(%ebp),%esp 10b2d4: 5b pop %ebx 10b2d5: 5e pop %esi 10b2d6: c9 leave 10b2d7: c3 ret 001162f4 : rtems_status_code rtems_message_queue_urgent( rtems_id id, const void *buffer, size_t size ) { 1162f4: 55 push %ebp 1162f5: 89 e5 mov %esp,%ebp 1162f7: 56 push %esi 1162f8: 53 push %ebx 1162f9: 83 ec 10 sub $0x10,%esp 1162fc: 8b 75 08 mov 0x8(%ebp),%esi 1162ff: 8b 5d 0c mov 0xc(%ebp),%ebx register Message_queue_Control *the_message_queue; Objects_Locations location; CORE_message_queue_Status status; if ( !buffer ) 116302: 85 db test %ebx,%ebx 116304: 74 5e je 116364 116306: 51 push %ecx 116307: 8d 45 f4 lea -0xc(%ebp),%eax 11630a: 50 push %eax 11630b: 56 push %esi 11630c: 68 60 25 14 00 push $0x142560 116311: e8 42 49 00 00 call 11ac58 <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { 116316: 83 c4 10 add $0x10,%esp 116319: 8b 55 f4 mov -0xc(%ebp),%edx 11631c: 85 d2 test %edx,%edx 11631e: 74 0c je 11632c 116320: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116325: 8d 65 f8 lea -0x8(%ebp),%esp 116328: 5b pop %ebx 116329: 5e pop %esi 11632a: c9 leave 11632b: c3 ret CORE_message_queue_API_mp_support_callout api_message_queue_mp_support, bool wait, Watchdog_Interval timeout ) { return _CORE_message_queue_Submit( 11632c: 6a 00 push $0x0 11632e: 6a 00 push $0x0 116330: 68 00 00 00 80 push $0x80000000 116335: 6a 00 push $0x0 116337: 56 push %esi 116338: ff 75 10 pushl 0x10(%ebp) 11633b: 53 push %ebx 11633c: 83 c0 14 add $0x14,%eax 11633f: 50 push %eax 116340: e8 0b 34 00 00 call 119750 <_CORE_message_queue_Submit> 116345: 89 c3 mov %eax,%ebx id, MESSAGE_QUEUE_MP_HANDLER, false, /* sender does not block */ 0 /* no timeout */ ); _Thread_Enable_dispatch(); 116347: 83 c4 20 add $0x20,%esp 11634a: e8 ed 51 00 00 call 11b53c <_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); 11634f: 83 ec 0c sub $0xc,%esp 116352: 53 push %ebx 116353: e8 8c ff ff ff call 1162e4 <_Message_queue_Translate_core_message_queue_return_code> <== ALWAYS TAKEN 116358: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11635b: 8d 65 f8 lea -0x8(%ebp),%esp 11635e: 5b pop %ebx 11635f: 5e pop %esi 116360: c9 leave 116361: c3 ret 116362: 66 90 xchg %ax,%ax <== NOT EXECUTED { register Message_queue_Control *the_message_queue; Objects_Locations location; CORE_message_queue_Status status; if ( !buffer ) 116364: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116369: 8d 65 f8 lea -0x8(%ebp),%esp 11636c: 5b pop %ebx 11636d: 5e pop %esi 11636e: c9 leave 11636f: c3 ret 0010b7bc : const char *rtems_object_get_api_class_name( int the_api, int the_class ) { 10b7bc: 55 push %ebp 10b7bd: 89 e5 mov %esp,%ebp 10b7bf: 83 ec 08 sub $0x8,%esp 10b7c2: 8b 45 08 mov 0x8(%ebp),%eax const rtems_assoc_t *api_assoc; const rtems_assoc_t *class_assoc; if ( the_api == OBJECTS_INTERNAL_API ) 10b7c5: 83 f8 01 cmp $0x1,%eax 10b7c8: 74 36 je 10b800 api_assoc = rtems_object_api_internal_assoc; else if ( the_api == OBJECTS_CLASSIC_API ) 10b7ca: 83 f8 02 cmp $0x2,%eax 10b7cd: 74 29 je 10b7f8 api_assoc = rtems_object_api_classic_assoc; #ifdef RTEMS_POSIX_API else if ( the_api == OBJECTS_POSIX_API ) 10b7cf: 83 f8 03 cmp $0x3,%eax 10b7d2: 74 08 je 10b7dc 10b7d4: b8 f9 1f 12 00 mov $0x121ff9,%eax return "BAD API"; class_assoc = rtems_assoc_ptr_by_local( api_assoc, the_class ); if ( class_assoc ) return class_assoc->name; return "BAD CLASS"; } 10b7d9: c9 leave 10b7da: c3 ret 10b7db: 90 nop <== NOT EXECUTED if ( the_api == OBJECTS_INTERNAL_API ) api_assoc = rtems_object_api_internal_assoc; else if ( the_api == OBJECTS_CLASSIC_API ) api_assoc = rtems_object_api_classic_assoc; #ifdef RTEMS_POSIX_API else if ( the_api == OBJECTS_POSIX_API ) 10b7dc: b8 00 6f 12 00 mov $0x126f00,%eax else if ( the_api == OBJECTS_ITRON_API ) api_assoc = rtems_object_api_itron_assoc; #endif else return "BAD API"; class_assoc = rtems_assoc_ptr_by_local( api_assoc, the_class ); 10b7e1: 83 ec 08 sub $0x8,%esp 10b7e4: ff 75 0c pushl 0xc(%ebp) 10b7e7: 50 push %eax 10b7e8: e8 1f 48 00 00 call 11000c if ( class_assoc ) 10b7ed: 83 c4 10 add $0x10,%esp 10b7f0: 85 c0 test %eax,%eax 10b7f2: 74 14 je 10b808 return class_assoc->name; 10b7f4: 8b 00 mov (%eax),%eax return "BAD CLASS"; } 10b7f6: c9 leave 10b7f7: c3 ret const rtems_assoc_t *api_assoc; const rtems_assoc_t *class_assoc; if ( the_api == OBJECTS_INTERNAL_API ) api_assoc = rtems_object_api_internal_assoc; else if ( the_api == OBJECTS_CLASSIC_API ) 10b7f8: b8 80 6e 12 00 mov $0x126e80,%eax 10b7fd: eb e2 jmp 10b7e1 <== ALWAYS TAKEN 10b7ff: 90 nop <== NOT EXECUTED ) { const rtems_assoc_t *api_assoc; const rtems_assoc_t *class_assoc; if ( the_api == OBJECTS_INTERNAL_API ) 10b800: b8 60 6e 12 00 mov $0x126e60,%eax 10b805: eb da jmp 10b7e1 <== ALWAYS TAKEN 10b807: 90 nop <== NOT EXECUTED api_assoc = rtems_object_api_itron_assoc; #endif else return "BAD API"; class_assoc = rtems_assoc_ptr_by_local( api_assoc, the_class ); if ( class_assoc ) 10b808: b8 01 20 12 00 mov $0x122001,%eax return class_assoc->name; return "BAD CLASS"; } 10b80d: c9 leave 10b80e: c3 ret 0010b810 : }; const char *rtems_object_get_api_name( int api ) { 10b810: 55 push %ebp 10b811: 89 e5 mov %esp,%ebp 10b813: 83 ec 10 sub $0x10,%esp const rtems_assoc_t *api_assoc; api_assoc = rtems_assoc_ptr_by_local( rtems_objects_api_assoc, api ); 10b816: ff 75 08 pushl 0x8(%ebp) 10b819: 68 a0 6f 12 00 push $0x126fa0 10b81e: e8 e9 47 00 00 call 11000c if ( api_assoc ) 10b823: 83 c4 10 add $0x10,%esp 10b826: 85 c0 test %eax,%eax 10b828: 74 06 je 10b830 return api_assoc->name; 10b82a: 8b 00 mov (%eax),%eax return "BAD CLASS"; } 10b82c: c9 leave 10b82d: c3 ret 10b82e: 66 90 xchg %ax,%ax <== NOT EXECUTED ) { const rtems_assoc_t *api_assoc; api_assoc = rtems_assoc_ptr_by_local( rtems_objects_api_assoc, api ); if ( api_assoc ) 10b830: b8 01 20 12 00 mov $0x122001,%eax return api_assoc->name; return "BAD CLASS"; } 10b835: c9 leave 10b836: c3 ret 0010cd38 : rtems_status_code rtems_object_get_class_information( int the_api, int the_class, rtems_object_api_class_information *info ) { 10cd38: 55 push %ebp 10cd39: 89 e5 mov %esp,%ebp 10cd3b: 57 push %edi 10cd3c: 56 push %esi 10cd3d: 53 push %ebx 10cd3e: 83 ec 0c sub $0xc,%esp 10cd41: 8b 5d 10 mov 0x10(%ebp),%ebx int i; /* * Validate parameters and look up information structure. */ if ( !info ) 10cd44: 85 db test %ebx,%ebx 10cd46: 74 5c je 10cda4 return RTEMS_INVALID_ADDRESS; obj_info = _Objects_Get_information( the_api, the_class ); 10cd48: 83 ec 08 sub $0x8,%esp 10cd4b: ff 75 0c pushl 0xc(%ebp) 10cd4e: ff 75 08 pushl 0x8(%ebp) 10cd51: e8 a2 1a 00 00 call 10e7f8 <_Objects_Get_information> if ( !obj_info ) 10cd56: 83 c4 10 add $0x10,%esp 10cd59: 85 c0 test %eax,%eax 10cd5b: 74 57 je 10cdb4 return RTEMS_INVALID_NUMBER; /* * Return information about this object class to the user. */ info->minimum_id = obj_info->minimum_id; 10cd5d: 8b 50 08 mov 0x8(%eax),%edx 10cd60: 89 13 mov %edx,(%ebx) info->maximum_id = obj_info->maximum_id; 10cd62: 8b 50 0c mov 0xc(%eax),%edx 10cd65: 89 53 04 mov %edx,0x4(%ebx) info->auto_extend = obj_info->auto_extend; 10cd68: 8a 50 12 mov 0x12(%eax),%dl 10cd6b: 88 53 0c mov %dl,0xc(%ebx) info->maximum = obj_info->maximum; 10cd6e: 0f b7 70 10 movzwl 0x10(%eax),%esi 10cd72: 89 73 08 mov %esi,0x8(%ebx) for ( unallocated=0, i=1 ; i <= info->maximum ; i++ ) 10cd75: 85 f6 test %esi,%esi 10cd77: 74 3f je 10cdb8 <== ALWAYS TAKEN 10cd79: 8b 78 1c mov 0x1c(%eax),%edi 10cd7c: b9 01 00 00 00 mov $0x1,%ecx 10cd81: b8 01 00 00 00 mov $0x1,%eax 10cd86: 31 d2 xor %edx,%edx if ( !obj_info->local_table[i] ) unallocated++; 10cd88: 83 3c 8f 01 cmpl $0x1,(%edi,%ecx,4) 10cd8c: 83 d2 00 adc $0x0,%edx info->minimum_id = obj_info->minimum_id; info->maximum_id = obj_info->maximum_id; info->auto_extend = obj_info->auto_extend; info->maximum = obj_info->maximum; for ( unallocated=0, i=1 ; i <= info->maximum ; i++ ) 10cd8f: 40 inc %eax 10cd90: 89 c1 mov %eax,%ecx 10cd92: 39 c6 cmp %eax,%esi 10cd94: 73 f2 jae 10cd88 if ( !obj_info->local_table[i] ) unallocated++; info->unallocated = unallocated; 10cd96: 89 53 10 mov %edx,0x10(%ebx) 10cd99: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; } 10cd9b: 8d 65 f4 lea -0xc(%ebp),%esp 10cd9e: 5b pop %ebx 10cd9f: 5e pop %esi 10cda0: 5f pop %edi 10cda1: c9 leave 10cda2: c3 ret 10cda3: 90 nop <== NOT EXECUTED int i; /* * Validate parameters and look up information structure. */ if ( !info ) 10cda4: b8 09 00 00 00 mov $0x9,%eax unallocated++; info->unallocated = unallocated; return RTEMS_SUCCESSFUL; } 10cda9: 8d 65 f4 lea -0xc(%ebp),%esp 10cdac: 5b pop %ebx 10cdad: 5e pop %esi 10cdae: 5f pop %edi 10cdaf: c9 leave 10cdb0: c3 ret 10cdb1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED */ if ( !info ) return RTEMS_INVALID_ADDRESS; obj_info = _Objects_Get_information( the_api, the_class ); if ( !obj_info ) 10cdb4: b0 0a mov $0xa,%al 10cdb6: eb e3 jmp 10cd9b <== ALWAYS TAKEN 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++ ) 10cdb8: 31 d2 xor %edx,%edx <== NOT EXECUTED 10cdba: eb da jmp 10cd96 <== NOT EXECUTED 0010fca0 : rtems_status_code rtems_object_get_classic_name( rtems_id id, rtems_name *name ) { 10fca0: 55 push %ebp 10fca1: 89 e5 mov %esp,%ebp 10fca3: 53 push %ebx 10fca4: 83 ec 14 sub $0x14,%esp 10fca7: 8b 5d 0c mov 0xc(%ebp),%ebx Objects_Name_or_id_lookup_errors status; Objects_Name name_u; if ( !name ) 10fcaa: 85 db test %ebx,%ebx 10fcac: 74 26 je 10fcd4 return RTEMS_INVALID_ADDRESS; status = _Objects_Id_to_name( id, &name_u ); 10fcae: 83 ec 08 sub $0x8,%esp 10fcb1: 8d 45 f4 lea -0xc(%ebp),%eax 10fcb4: 50 push %eax 10fcb5: ff 75 08 pushl 0x8(%ebp) 10fcb8: e8 eb 1c 00 00 call 1119a8 <_Objects_Id_to_name> *name = name_u.name_u32; 10fcbd: 8b 55 f4 mov -0xc(%ebp),%edx 10fcc0: 89 13 mov %edx,(%ebx) return _Status_Object_name_errors_to_status[ status ]; 10fcc2: 8b 04 85 ec be 12 00 mov 0x12beec(,%eax,4),%eax 10fcc9: 83 c4 10 add $0x10,%esp } 10fccc: 8b 5d fc mov -0x4(%ebp),%ebx 10fccf: c9 leave 10fcd0: c3 ret 10fcd1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED ) { Objects_Name_or_id_lookup_errors status; Objects_Name name_u; if ( !name ) 10fcd4: b8 09 00 00 00 mov $0x9,%eax status = _Objects_Id_to_name( id, &name_u ); *name = name_u.name_u32; return _Status_Object_name_errors_to_status[ status ]; } 10fcd9: 8b 5d fc mov -0x4(%ebp),%ebx 10fcdc: c9 leave 10fcdd: c3 ret 0010b844 : */ rtems_status_code rtems_object_set_name( rtems_id id, const char *name ) { 10b844: 55 push %ebp 10b845: 89 e5 mov %esp,%ebp 10b847: 57 push %edi 10b848: 56 push %esi 10b849: 53 push %ebx 10b84a: 83 ec 1c sub $0x1c,%esp 10b84d: 8b 75 08 mov 0x8(%ebp),%esi 10b850: 8b 7d 0c mov 0xc(%ebp),%edi Objects_Information *information; Objects_Locations location; Objects_Control *the_object; Objects_Id tmpId; if ( !name ) 10b853: 85 ff test %edi,%edi 10b855: 74 61 je 10b8b8 return RTEMS_INVALID_ADDRESS; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 10b857: 85 f6 test %esi,%esi 10b859: 74 35 je 10b890 information = _Objects_Get_information_id( tmpId ); 10b85b: 83 ec 0c sub $0xc,%esp 10b85e: 56 push %esi 10b85f: e8 80 18 00 00 call 10d0e4 <_Objects_Get_information_id> 10b864: 89 c3 mov %eax,%ebx if ( !information ) 10b866: 83 c4 10 add $0x10,%esp 10b869: 85 c0 test %eax,%eax 10b86b: 74 16 je 10b883 return RTEMS_INVALID_ID; the_object = _Objects_Get( information, tmpId, &location ); 10b86d: 50 push %eax 10b86e: 8d 45 e4 lea -0x1c(%ebp),%eax 10b871: 50 push %eax 10b872: 56 push %esi 10b873: 53 push %ebx 10b874: e8 0f 1a 00 00 call 10d288 <_Objects_Get> switch ( location ) { 10b879: 83 c4 10 add $0x10,%esp 10b87c: 8b 4d e4 mov -0x1c(%ebp),%ecx 10b87f: 85 c9 test %ecx,%ecx 10b881: 74 19 je 10b89c case OBJECTS_LOCAL: _Objects_Set_name( information, the_object, name ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; 10b883: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10b888: 8d 65 f4 lea -0xc(%ebp),%esp 10b88b: 5b pop %ebx 10b88c: 5e pop %esi 10b88d: 5f pop %edi 10b88e: c9 leave 10b88f: c3 ret Objects_Id tmpId; if ( !name ) return RTEMS_INVALID_ADDRESS; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 10b890: a1 38 94 12 00 mov 0x129438,%eax 10b895: 8b 70 08 mov 0x8(%eax),%esi 10b898: eb c1 jmp 10b85b <== ALWAYS TAKEN 10b89a: 66 90 xchg %ax,%ax <== NOT EXECUTED the_object = _Objects_Get( information, tmpId, &location ); switch ( location ) { case OBJECTS_LOCAL: _Objects_Set_name( information, the_object, name ); 10b89c: 52 push %edx 10b89d: 57 push %edi 10b89e: 50 push %eax 10b89f: 53 push %ebx 10b8a0: e8 df 1b 00 00 call 10d484 <_Objects_Set_name> _Thread_Enable_dispatch(); 10b8a5: e8 26 23 00 00 call 10dbd0 <_Thread_Enable_dispatch> 10b8aa: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 10b8ac: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10b8af: 8d 65 f4 lea -0xc(%ebp),%esp 10b8b2: 5b pop %ebx 10b8b3: 5e pop %esi 10b8b4: 5f pop %edi 10b8b5: c9 leave 10b8b6: c3 ret 10b8b7: 90 nop <== NOT EXECUTED Objects_Information *information; Objects_Locations location; Objects_Control *the_object; Objects_Id tmpId; if ( !name ) 10b8b8: b8 09 00 00 00 mov $0x9,%eax 10b8bd: eb c9 jmp 10b888 <== ALWAYS TAKEN 0010cce0 : void rtems_panic( const char *printf_format, ... ) { 10cce0: 55 push %ebp <== NOT EXECUTED 10cce1: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10cce3: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED /* * rtems_panic is shorthand for rtems_error(RTEMS_ERROR_PANIC, ...) */ void rtems_panic( 10cce6: 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); 10cce9: 8b 55 08 mov 0x8(%ebp),%edx <== NOT EXECUTED 10ccec: b8 00 00 00 20 mov $0x20000000,%eax <== NOT EXECUTED 10ccf1: e8 4a fe ff ff call 10cb40 <== NOT EXECUTED va_end(arglist); } 10ccf6: c9 leave <== NOT EXECUTED 10ccf7: c3 ret <== NOT EXECUTED 00116370 : uint32_t length, uint32_t buffer_size, rtems_attribute attribute_set, rtems_id *id ) { 116370: 55 push %ebp 116371: 89 e5 mov %esp,%ebp 116373: 57 push %edi 116374: 56 push %esi 116375: 53 push %ebx 116376: 83 ec 1c sub $0x1c,%esp 116379: 8b 5d 08 mov 0x8(%ebp),%ebx 11637c: 8b 75 0c mov 0xc(%ebp),%esi 11637f: 8b 55 10 mov 0x10(%ebp),%edx 116382: 8b 7d 14 mov 0x14(%ebp),%edi register Partition_Control *the_partition; if ( !rtems_is_name_valid( name ) ) 116385: 85 db test %ebx,%ebx 116387: 74 47 je 1163d0 return RTEMS_INVALID_NAME; if ( !starting_address ) 116389: 85 f6 test %esi,%esi 11638b: 74 23 je 1163b0 return RTEMS_INVALID_ADDRESS; if ( !id ) 11638d: 8b 45 1c mov 0x1c(%ebp),%eax 116390: 85 c0 test %eax,%eax 116392: 74 1c je 1163b0 <== ALWAYS TAKEN return RTEMS_INVALID_ADDRESS; if ( length == 0 || buffer_size == 0 || length < buffer_size || 116394: 85 d2 test %edx,%edx 116396: 74 28 je 1163c0 116398: 85 ff test %edi,%edi 11639a: 74 24 je 1163c0 11639c: 39 fa cmp %edi,%edx 11639e: 72 20 jb 1163c0 1163a0: f7 c7 03 00 00 00 test $0x3,%edi 1163a6: 75 18 jne 1163c0 !_Partition_Is_buffer_size_aligned( buffer_size ) ) return RTEMS_INVALID_SIZE; if ( !_Addresses_Is_aligned( starting_address ) ) 1163a8: f7 c6 03 00 00 00 test $0x3,%esi 1163ae: 74 30 je 1163e0 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; 1163b0: b8 09 00 00 00 mov $0x9,%eax } 1163b5: 8d 65 f4 lea -0xc(%ebp),%esp 1163b8: 5b pop %ebx 1163b9: 5e pop %esi 1163ba: 5f pop %edi 1163bb: c9 leave 1163bc: c3 ret 1163bd: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; 1163c0: b8 08 00 00 00 mov $0x8,%eax } 1163c5: 8d 65 f4 lea -0xc(%ebp),%esp 1163c8: 5b pop %ebx 1163c9: 5e pop %esi 1163ca: 5f pop %edi 1163cb: c9 leave 1163cc: c3 ret 1163cd: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED rtems_id *id ) { register Partition_Control *the_partition; if ( !rtems_is_name_valid( name ) ) 1163d0: b8 03 00 00 00 mov $0x3,%eax ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 1163d5: 8d 65 f4 lea -0xc(%ebp),%esp 1163d8: 5b pop %ebx 1163d9: 5e pop %esi 1163da: 5f pop %edi 1163db: c9 leave 1163dc: c3 ret 1163dd: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 1163e0: a1 b8 1b 14 00 mov 0x141bb8,%eax 1163e5: 40 inc %eax 1163e6: a3 b8 1b 14 00 mov %eax,0x141bb8 * 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 ); 1163eb: 83 ec 0c sub $0xc,%esp 1163ee: 68 40 1a 14 00 push $0x141a40 1163f3: 89 55 e0 mov %edx,-0x20(%ebp) 1163f6: e8 71 43 00 00 call 11a76c <_Objects_Allocate> 1163fb: 89 45 e4 mov %eax,-0x1c(%ebp) _Thread_Disable_dispatch(); /* prevents deletion */ the_partition = _Partition_Allocate(); if ( !the_partition ) { 1163fe: 83 c4 10 add $0x10,%esp 116401: 85 c0 test %eax,%eax 116403: 8b 55 e0 mov -0x20(%ebp),%edx 116406: 74 58 je 116460 _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } #endif the_partition->starting_address = starting_address; 116408: 8b 45 e4 mov -0x1c(%ebp),%eax 11640b: 89 70 10 mov %esi,0x10(%eax) the_partition->length = length; 11640e: 89 50 14 mov %edx,0x14(%eax) the_partition->buffer_size = buffer_size; 116411: 89 78 18 mov %edi,0x18(%eax) the_partition->attribute_set = attribute_set; 116414: 8b 4d 18 mov 0x18(%ebp),%ecx 116417: 89 48 1c mov %ecx,0x1c(%eax) the_partition->number_of_used_blocks = 0; 11641a: c7 40 20 00 00 00 00 movl $0x0,0x20(%eax) _Chain_Initialize( &the_partition->Memory, starting_address, 116421: 57 push %edi 116422: 89 d0 mov %edx,%eax 116424: 31 d2 xor %edx,%edx 116426: f7 f7 div %edi 116428: 50 push %eax 116429: 56 push %esi 11642a: 8b 45 e4 mov -0x1c(%ebp),%eax 11642d: 83 c0 24 add $0x24,%eax 116430: 50 push %eax 116431: e8 c6 2f 00 00 call 1193fc <_Chain_Initialize> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 116436: 8b 7d e4 mov -0x1c(%ebp),%edi 116439: 8b 47 08 mov 0x8(%edi),%eax 11643c: 0f b7 f0 movzwl %ax,%esi 11643f: 8b 15 5c 1a 14 00 mov 0x141a5c,%edx 116445: 89 3c b2 mov %edi,(%edx,%esi,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 116448: 89 5f 0c mov %ebx,0xc(%edi) &_Partition_Information, &the_partition->Object, (Objects_Name) name ); *id = the_partition->Object.id; 11644b: 8b 55 1c mov 0x1c(%ebp),%edx 11644e: 89 02 mov %eax,(%edx) name, 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); 116450: e8 e7 50 00 00 call 11b53c <_Thread_Enable_dispatch> 116455: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 116457: 83 c4 10 add $0x10,%esp 11645a: e9 66 ff ff ff jmp 1163c5 <== ALWAYS TAKEN 11645f: 90 nop <== NOT EXECUTED _Thread_Disable_dispatch(); /* prevents deletion */ the_partition = _Partition_Allocate(); if ( !the_partition ) { _Thread_Enable_dispatch(); 116460: e8 d7 50 00 00 call 11b53c <_Thread_Enable_dispatch> 116465: b8 05 00 00 00 mov $0x5,%eax return RTEMS_TOO_MANY; 11646a: e9 56 ff ff ff jmp 1163c5 <== ALWAYS TAKEN 00116470 : */ rtems_status_code rtems_partition_delete( rtems_id id ) { 116470: 55 push %ebp 116471: 89 e5 mov %esp,%ebp 116473: 83 ec 2c sub $0x2c,%esp RTEMS_INLINE_ROUTINE Partition_Control *_Partition_Get ( Objects_Id id, Objects_Locations *location ) { return (Partition_Control *) 116476: 8d 45 f4 lea -0xc(%ebp),%eax 116479: 50 push %eax 11647a: ff 75 08 pushl 0x8(%ebp) 11647d: 68 40 1a 14 00 push $0x141a40 116482: e8 d1 47 00 00 call 11ac58 <_Objects_Get> register Partition_Control *the_partition; Objects_Locations location; the_partition = _Partition_Get( id, &location ); switch ( location ) { 116487: 83 c4 10 add $0x10,%esp 11648a: 8b 55 f4 mov -0xc(%ebp),%edx 11648d: 85 d2 test %edx,%edx 11648f: 74 07 je 116498 116491: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116496: c9 leave 116497: c3 ret the_partition = _Partition_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( the_partition->number_of_used_blocks == 0 ) { 116498: 8b 48 20 mov 0x20(%eax),%ecx 11649b: 85 c9 test %ecx,%ecx 11649d: 74 0d je 1164ac #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 11649f: e8 98 50 00 00 call 11b53c <_Thread_Enable_dispatch> 1164a4: b8 0c 00 00 00 mov $0xc,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1164a9: c9 leave 1164aa: c3 ret 1164ab: 90 nop <== NOT EXECUTED the_partition = _Partition_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( the_partition->number_of_used_blocks == 0 ) { _Objects_Close( &_Partition_Information, &the_partition->Object ); 1164ac: 83 ec 08 sub $0x8,%esp 1164af: 50 push %eax 1164b0: 68 40 1a 14 00 push $0x141a40 1164b5: 89 45 e4 mov %eax,-0x1c(%ebp) 1164b8: e8 2b 43 00 00 call 11a7e8 <_Objects_Close> */ RTEMS_INLINE_ROUTINE void _Partition_Free ( Partition_Control *the_partition ) { _Objects_Free( &_Partition_Information, &the_partition->Object ); 1164bd: 58 pop %eax 1164be: 5a pop %edx 1164bf: 8b 45 e4 mov -0x1c(%ebp),%eax 1164c2: 50 push %eax 1164c3: 68 40 1a 14 00 push $0x141a40 1164c8: e8 1f 46 00 00 call 11aaec <_Objects_Free> 0 /* Not used */ ); } #endif _Thread_Enable_dispatch(); 1164cd: e8 6a 50 00 00 call 11b53c <_Thread_Enable_dispatch> 1164d2: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 1164d4: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1164d7: c9 leave 1164d8: c3 ret 001164dc : rtems_status_code rtems_partition_get_buffer( rtems_id id, void **buffer ) { 1164dc: 55 push %ebp 1164dd: 89 e5 mov %esp,%ebp 1164df: 56 push %esi 1164e0: 53 push %ebx 1164e1: 83 ec 20 sub $0x20,%esp 1164e4: 8b 5d 0c mov 0xc(%ebp),%ebx register Partition_Control *the_partition; Objects_Locations location; void *the_buffer; if ( !buffer ) 1164e7: 85 db test %ebx,%ebx 1164e9: 74 59 je 116544 RTEMS_INLINE_ROUTINE Partition_Control *_Partition_Get ( Objects_Id id, Objects_Locations *location ) { return (Partition_Control *) 1164eb: 52 push %edx 1164ec: 8d 45 f4 lea -0xc(%ebp),%eax 1164ef: 50 push %eax 1164f0: ff 75 08 pushl 0x8(%ebp) 1164f3: 68 40 1a 14 00 push $0x141a40 1164f8: e8 5b 47 00 00 call 11ac58 <_Objects_Get> 1164fd: 89 c6 mov %eax,%esi return RTEMS_INVALID_ADDRESS; the_partition = _Partition_Get( id, &location ); switch ( location ) { 1164ff: 83 c4 10 add $0x10,%esp 116502: 8b 45 f4 mov -0xc(%ebp),%eax 116505: 85 c0 test %eax,%eax 116507: 75 2f jne 116538 */ RTEMS_INLINE_ROUTINE void *_Partition_Allocate_buffer ( Partition_Control *the_partition ) { return _Chain_Get( &the_partition->Memory ); 116509: 83 ec 0c sub $0xc,%esp 11650c: 8d 46 24 lea 0x24(%esi),%eax 11650f: 50 push %eax 116510: e8 c3 2e 00 00 call 1193d8 <_Chain_Get> case OBJECTS_LOCAL: the_buffer = _Partition_Allocate_buffer( the_partition ); if ( the_buffer ) { 116515: 83 c4 10 add $0x10,%esp 116518: 85 c0 test %eax,%eax 11651a: 74 34 je 116550 the_partition->number_of_used_blocks += 1; 11651c: ff 46 20 incl 0x20(%esi) _Thread_Enable_dispatch(); 11651f: 89 45 e4 mov %eax,-0x1c(%ebp) 116522: e8 15 50 00 00 call 11b53c <_Thread_Enable_dispatch> *buffer = the_buffer; 116527: 8b 45 e4 mov -0x1c(%ebp),%eax 11652a: 89 03 mov %eax,(%ebx) 11652c: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11652e: 8d 65 f8 lea -0x8(%ebp),%esp 116531: 5b pop %ebx 116532: 5e pop %esi 116533: c9 leave 116534: c3 ret 116535: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if ( !buffer ) return RTEMS_INVALID_ADDRESS; the_partition = _Partition_Get( id, &location ); switch ( location ) { 116538: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11653d: 8d 65 f8 lea -0x8(%ebp),%esp 116540: 5b pop %ebx 116541: 5e pop %esi 116542: c9 leave 116543: c3 ret { register Partition_Control *the_partition; Objects_Locations location; void *the_buffer; if ( !buffer ) 116544: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116549: 8d 65 f8 lea -0x8(%ebp),%esp 11654c: 5b pop %ebx 11654d: 5e pop %esi 11654e: c9 leave 11654f: c3 ret the_partition->number_of_used_blocks += 1; _Thread_Enable_dispatch(); *buffer = the_buffer; return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 116550: e8 e7 4f 00 00 call 11b53c <_Thread_Enable_dispatch> 116555: b8 0d 00 00 00 mov $0xd,%eax return RTEMS_UNSATISFIED; 11655a: eb e1 jmp 11653d <== ALWAYS TAKEN 00116580 : rtems_status_code rtems_partition_return_buffer( rtems_id id, void *buffer ) { 116580: 55 push %ebp 116581: 89 e5 mov %esp,%ebp 116583: 56 push %esi 116584: 53 push %ebx 116585: 83 ec 14 sub $0x14,%esp 116588: 8b 75 0c mov 0xc(%ebp),%esi RTEMS_INLINE_ROUTINE Partition_Control *_Partition_Get ( Objects_Id id, Objects_Locations *location ) { return (Partition_Control *) 11658b: 8d 45 f4 lea -0xc(%ebp),%eax 11658e: 50 push %eax 11658f: ff 75 08 pushl 0x8(%ebp) 116592: 68 40 1a 14 00 push $0x141a40 116597: e8 bc 46 00 00 call 11ac58 <_Objects_Get> 11659c: 89 c3 mov %eax,%ebx register Partition_Control *the_partition; Objects_Locations location; the_partition = _Partition_Get( id, &location ); switch ( location ) { 11659e: 83 c4 10 add $0x10,%esp 1165a1: 8b 45 f4 mov -0xc(%ebp),%eax 1165a4: 85 c0 test %eax,%eax 1165a6: 74 0c je 1165b4 1165a8: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1165ad: 8d 65 f8 lea -0x8(%ebp),%esp 1165b0: 5b pop %ebx 1165b1: 5e pop %esi 1165b2: c9 leave 1165b3: c3 ret ) { void *starting; void *ending; starting = the_partition->starting_address; 1165b4: 8b 43 10 mov 0x10(%ebx),%eax ending = _Addresses_Add_offset( starting, the_partition->length ); 1165b7: 8b 53 14 mov 0x14(%ebx),%edx const void *address, const void *base, const void *limit ) { return (address >= base && address <= limit); 1165ba: 39 c6 cmp %eax,%esi 1165bc: 72 3a jb 1165f8 1165be: 8d 14 10 lea (%eax,%edx,1),%edx 1165c1: 39 d6 cmp %edx,%esi 1165c3: 77 33 ja 1165f8 <== ALWAYS TAKEN return ( 1165c5: 89 f2 mov %esi,%edx 1165c7: 29 c2 sub %eax,%edx 1165c9: 89 d0 mov %edx,%eax 1165cb: 31 d2 xor %edx,%edx 1165cd: f7 73 18 divl 0x18(%ebx) 1165d0: 85 d2 test %edx,%edx 1165d2: 75 24 jne 1165f8 RTEMS_INLINE_ROUTINE void _Partition_Free_buffer ( Partition_Control *the_partition, Chain_Node *the_buffer ) { _Chain_Append( &the_partition->Memory, the_buffer ); 1165d4: 83 ec 08 sub $0x8,%esp 1165d7: 56 push %esi 1165d8: 8d 43 24 lea 0x24(%ebx),%eax 1165db: 50 push %eax 1165dc: e8 d3 2d 00 00 call 1193b4 <_Chain_Append> <== ALWAYS TAKEN switch ( location ) { case OBJECTS_LOCAL: if ( _Partition_Is_buffer_valid( buffer, the_partition ) ) { _Partition_Free_buffer( the_partition, buffer ); the_partition->number_of_used_blocks -= 1; 1165e1: ff 4b 20 decl 0x20(%ebx) _Thread_Enable_dispatch(); 1165e4: e8 53 4f 00 00 call 11b53c <_Thread_Enable_dispatch> 1165e9: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 1165eb: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1165ee: 8d 65 f8 lea -0x8(%ebp),%esp 1165f1: 5b pop %ebx 1165f2: 5e pop %esi 1165f3: c9 leave 1165f4: c3 ret 1165f5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED _Partition_Free_buffer( the_partition, buffer ); the_partition->number_of_used_blocks -= 1; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 1165f8: e8 3f 4f 00 00 call 11b53c <_Thread_Enable_dispatch> 1165fd: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116602: 8d 65 f8 lea -0x8(%ebp),%esp 116605: 5b pop %ebx 116606: 5e pop %esi 116607: c9 leave 116608: c3 ret 0011168c : /* * Initialization of FIFO/pipe module. */ void rtems_pipe_initialize (void) { 11168c: 55 push %ebp 11168d: 89 e5 mov %esp,%ebp 11168f: 83 ec 08 sub $0x8,%esp if (!rtems_pipe_configured) 111692: 80 3d 04 56 12 00 00 cmpb $0x0,0x125604 111699: 74 09 je 1116a4 <== NEVER TAKEN return; if (rtems_pipe_semaphore) 11169b: a1 0c 70 12 00 mov 0x12700c,%eax <== NOT EXECUTED 1116a0: 85 c0 test %eax,%eax <== NOT EXECUTED 1116a2: 74 04 je 1116a8 <== NOT EXECUTED rtems_fatal_error_occurred (sc); rtems_interval now; now = rtems_clock_get_ticks_since_boot(); rtems_pipe_no = now; } 1116a4: c9 leave 1116a5: c3 ret 1116a6: 66 90 xchg %ax,%ax <== NOT EXECUTED if (rtems_pipe_semaphore) return; rtems_status_code sc; sc = rtems_semaphore_create( 1116a8: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1116ab: 68 0c 70 12 00 push $0x12700c <== NOT EXECUTED 1116b0: 6a 00 push $0x0 <== NOT EXECUTED 1116b2: 6a 54 push $0x54 <== NOT EXECUTED 1116b4: 6a 01 push $0x1 <== NOT EXECUTED 1116b6: 68 45 50 49 50 push $0x50495045 <== NOT EXECUTED 1116bb: e8 28 9c ff ff call 10b2e8 <== 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) 1116c0: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 1116c3: 85 c0 test %eax,%eax <== NOT EXECUTED 1116c5: 75 0d jne 1116d4 <== NOT EXECUTED rtems_fatal_error_occurred (sc); rtems_interval now; now = rtems_clock_get_ticks_since_boot(); 1116c7: e8 98 97 ff ff call 10ae64 <== NOT EXECUTED rtems_pipe_no = now; 1116cc: 66 a3 14 70 12 00 mov %ax,0x127014 <== NOT EXECUTED } 1116d2: c9 leave <== NOT EXECUTED 1116d3: c3 ret <== NOT EXECUTED sc = rtems_semaphore_create( 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) rtems_fatal_error_occurred (sc); 1116d4: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1116d7: 50 push %eax <== NOT EXECUTED 1116d8: e8 bf a4 ff ff call 10bb9c <== NOT EXECUTED 001159a8 : void *internal_start, void *external_start, uint32_t length, rtems_id *id ) { 1159a8: 55 push %ebp 1159a9: 89 e5 mov %esp,%ebp 1159ab: 57 push %edi 1159ac: 56 push %esi 1159ad: 53 push %ebx 1159ae: 83 ec 1c sub $0x1c,%esp 1159b1: 8b 5d 08 mov 0x8(%ebp),%ebx 1159b4: 8b 55 0c mov 0xc(%ebp),%edx 1159b7: 8b 7d 10 mov 0x10(%ebp),%edi 1159ba: 8b 75 18 mov 0x18(%ebp),%esi register Dual_ported_memory_Control *the_port; if ( !rtems_is_name_valid( name ) ) 1159bd: 85 db test %ebx,%ebx 1159bf: 74 1b je 1159dc return RTEMS_INVALID_NAME; if ( !id ) 1159c1: 85 f6 test %esi,%esi 1159c3: 74 08 je 1159cd return RTEMS_INVALID_ADDRESS; if ( !_Addresses_Is_aligned( internal_start ) || 1159c5: 89 f8 mov %edi,%eax 1159c7: 09 d0 or %edx,%eax 1159c9: a8 03 test $0x3,%al 1159cb: 74 1f je 1159ec (Objects_Name) name ); *id = the_port->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; 1159cd: b8 09 00 00 00 mov $0x9,%eax } 1159d2: 8d 65 f4 lea -0xc(%ebp),%esp 1159d5: 5b pop %ebx 1159d6: 5e pop %esi 1159d7: 5f pop %edi 1159d8: c9 leave 1159d9: c3 ret 1159da: 66 90 xchg %ax,%ax <== NOT EXECUTED rtems_id *id ) { register Dual_ported_memory_Control *the_port; if ( !rtems_is_name_valid( name ) ) 1159dc: b8 03 00 00 00 mov $0x3,%eax ); *id = the_port->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 1159e1: 8d 65 f4 lea -0xc(%ebp),%esp 1159e4: 5b pop %ebx 1159e5: 5e pop %esi 1159e6: 5f pop %edi 1159e7: c9 leave 1159e8: c3 ret 1159e9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 1159ec: a1 b8 1b 14 00 mov 0x141bb8,%eax 1159f1: 40 inc %eax 1159f2: a3 b8 1b 14 00 mov %eax,0x141bb8 * of free port control blocks. */ RTEMS_INLINE_ROUTINE Dual_ported_memory_Control *_Dual_ported_memory_Allocate ( void ) { return (Dual_ported_memory_Control *) 1159f7: 83 ec 0c sub $0xc,%esp 1159fa: 68 00 1a 14 00 push $0x141a00 1159ff: 89 55 e4 mov %edx,-0x1c(%ebp) 115a02: e8 65 4d 00 00 call 11a76c <_Objects_Allocate> _Thread_Disable_dispatch(); /* to prevent deletion */ the_port = _Dual_ported_memory_Allocate(); if ( !the_port ) { 115a07: 83 c4 10 add $0x10,%esp 115a0a: 85 c0 test %eax,%eax 115a0c: 8b 55 e4 mov -0x1c(%ebp),%edx 115a0f: 74 33 je 115a44 _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } the_port->internal_base = internal_start; 115a11: 89 50 10 mov %edx,0x10(%eax) the_port->external_base = external_start; 115a14: 89 78 14 mov %edi,0x14(%eax) the_port->length = length - 1; 115a17: 8b 55 14 mov 0x14(%ebp),%edx 115a1a: 4a dec %edx 115a1b: 89 50 18 mov %edx,0x18(%eax) #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 115a1e: 8b 50 08 mov 0x8(%eax),%edx 115a21: 0f b7 fa movzwl %dx,%edi 115a24: 8b 0d 1c 1a 14 00 mov 0x141a1c,%ecx 115a2a: 89 04 b9 mov %eax,(%ecx,%edi,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 115a2d: 89 58 0c mov %ebx,0xc(%eax) &_Dual_ported_memory_Information, &the_port->Object, (Objects_Name) name ); *id = the_port->Object.id; 115a30: 89 16 mov %edx,(%esi) _Thread_Enable_dispatch(); 115a32: e8 05 5b 00 00 call 11b53c <_Thread_Enable_dispatch> 115a37: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; } 115a39: 8d 65 f4 lea -0xc(%ebp),%esp 115a3c: 5b pop %ebx 115a3d: 5e pop %esi 115a3e: 5f pop %edi 115a3f: c9 leave 115a40: c3 ret 115a41: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED _Thread_Disable_dispatch(); /* to prevent deletion */ the_port = _Dual_ported_memory_Allocate(); if ( !the_port ) { _Thread_Enable_dispatch(); 115a44: e8 f3 5a 00 00 call 11b53c <_Thread_Enable_dispatch> 115a49: b8 05 00 00 00 mov $0x5,%eax return RTEMS_TOO_MANY; 115a4e: eb 82 jmp 1159d2 <== ALWAYS TAKEN 00115a50 : */ rtems_status_code rtems_port_delete( rtems_id id ) { 115a50: 55 push %ebp 115a51: 89 e5 mov %esp,%ebp 115a53: 83 ec 2c sub $0x2c,%esp RTEMS_INLINE_ROUTINE Dual_ported_memory_Control *_Dual_ported_memory_Get ( Objects_Id id, Objects_Locations *location ) { return (Dual_ported_memory_Control *) 115a56: 8d 45 f4 lea -0xc(%ebp),%eax 115a59: 50 push %eax 115a5a: ff 75 08 pushl 0x8(%ebp) 115a5d: 68 00 1a 14 00 push $0x141a00 115a62: e8 f1 51 00 00 call 11ac58 <_Objects_Get> register Dual_ported_memory_Control *the_port; Objects_Locations location; the_port = _Dual_ported_memory_Get( id, &location ); switch ( location ) { 115a67: 83 c4 10 add $0x10,%esp 115a6a: 8b 4d f4 mov -0xc(%ebp),%ecx 115a6d: 85 c9 test %ecx,%ecx 115a6f: 75 2f jne 115aa0 case OBJECTS_LOCAL: _Objects_Close( &_Dual_ported_memory_Information, &the_port->Object ); 115a71: 83 ec 08 sub $0x8,%esp 115a74: 50 push %eax 115a75: 68 00 1a 14 00 push $0x141a00 115a7a: 89 45 e4 mov %eax,-0x1c(%ebp) 115a7d: e8 66 4d 00 00 call 11a7e8 <_Objects_Close> */ RTEMS_INLINE_ROUTINE void _Dual_ported_memory_Free ( Dual_ported_memory_Control *the_port ) { _Objects_Free( &_Dual_ported_memory_Information, &the_port->Object ); 115a82: 58 pop %eax 115a83: 5a pop %edx 115a84: 8b 45 e4 mov -0x1c(%ebp),%eax 115a87: 50 push %eax 115a88: 68 00 1a 14 00 push $0x141a00 115a8d: e8 5a 50 00 00 call 11aaec <_Objects_Free> _Dual_ported_memory_Free( the_port ); _Thread_Enable_dispatch(); 115a92: e8 a5 5a 00 00 call 11b53c <_Thread_Enable_dispatch> 115a97: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 115a99: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 115a9c: c9 leave 115a9d: c3 ret 115a9e: 66 90 xchg %ax,%ax <== NOT EXECUTED { register Dual_ported_memory_Control *the_port; Objects_Locations location; the_port = _Dual_ported_memory_Get( id, &location ); switch ( location ) { 115aa0: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 115aa5: c9 leave 115aa6: c3 ret 00115aa8 : rtems_status_code rtems_port_external_to_internal( rtems_id id, void *external, void **internal ) { 115aa8: 55 push %ebp 115aa9: 89 e5 mov %esp,%ebp 115aab: 56 push %esi 115aac: 53 push %ebx 115aad: 83 ec 10 sub $0x10,%esp 115ab0: 8b 75 0c mov 0xc(%ebp),%esi 115ab3: 8b 5d 10 mov 0x10(%ebp),%ebx register Dual_ported_memory_Control *the_port; Objects_Locations location; uint32_t ending; if ( !internal ) 115ab6: 85 db test %ebx,%ebx 115ab8: 74 4e je 115b08 RTEMS_INLINE_ROUTINE Dual_ported_memory_Control *_Dual_ported_memory_Get ( Objects_Id id, Objects_Locations *location ) { return (Dual_ported_memory_Control *) 115aba: 51 push %ecx 115abb: 8d 45 f4 lea -0xc(%ebp),%eax 115abe: 50 push %eax 115abf: ff 75 08 pushl 0x8(%ebp) 115ac2: 68 00 1a 14 00 push $0x141a00 115ac7: e8 8c 51 00 00 call 11ac58 <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_port = _Dual_ported_memory_Get( id, &location ); switch ( location ) { 115acc: 83 c4 10 add $0x10,%esp 115acf: 8b 55 f4 mov -0xc(%ebp),%edx 115ad2: 85 d2 test %edx,%edx 115ad4: 74 0e je 115ae4 115ad6: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 115adb: 8d 65 f8 lea -0x8(%ebp),%esp 115ade: 5b pop %ebx 115adf: 5e pop %esi 115ae0: c9 leave 115ae1: c3 ret 115ae2: 66 90 xchg %ax,%ax <== NOT EXECUTED return RTEMS_INVALID_ADDRESS; the_port = _Dual_ported_memory_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: ending = _Addresses_Subtract( external, the_port->external_base ); 115ae4: 89 f2 mov %esi,%edx 115ae6: 2b 50 14 sub 0x14(%eax),%edx if ( ending > the_port->length ) 115ae9: 3b 50 18 cmp 0x18(%eax),%edx 115aec: 77 16 ja 115b04 *internal = external; else *internal = _Addresses_Add_offset( the_port->internal_base, 115aee: 03 50 10 add 0x10(%eax),%edx 115af1: 89 13 mov %edx,(%ebx) ending ); _Thread_Enable_dispatch(); 115af3: e8 44 5a 00 00 call 11b53c <_Thread_Enable_dispatch> 115af8: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 115afa: 8d 65 f8 lea -0x8(%ebp),%esp 115afd: 5b pop %ebx 115afe: 5e pop %esi 115aff: c9 leave 115b00: c3 ret 115b01: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED the_port = _Dual_ported_memory_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: ending = _Addresses_Subtract( external, the_port->external_base ); if ( ending > the_port->length ) *internal = external; 115b04: 89 33 mov %esi,(%ebx) 115b06: eb eb jmp 115af3 <== ALWAYS TAKEN { register Dual_ported_memory_Control *the_port; Objects_Locations location; uint32_t ending; if ( !internal ) 115b08: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 115b0d: 8d 65 f8 lea -0x8(%ebp),%esp 115b10: 5b pop %ebx 115b11: 5e pop %esi 115b12: c9 leave 115b13: c3 ret 00115b38 : rtems_status_code rtems_port_internal_to_external( rtems_id id, void *internal, void **external ) { 115b38: 55 push %ebp 115b39: 89 e5 mov %esp,%ebp 115b3b: 56 push %esi 115b3c: 53 push %ebx 115b3d: 83 ec 10 sub $0x10,%esp 115b40: 8b 75 0c mov 0xc(%ebp),%esi 115b43: 8b 5d 10 mov 0x10(%ebp),%ebx register Dual_ported_memory_Control *the_port; Objects_Locations location; uint32_t ending; if ( !external ) 115b46: 85 db test %ebx,%ebx 115b48: 74 4e je 115b98 115b4a: 51 push %ecx 115b4b: 8d 45 f4 lea -0xc(%ebp),%eax 115b4e: 50 push %eax 115b4f: ff 75 08 pushl 0x8(%ebp) 115b52: 68 00 1a 14 00 push $0x141a00 115b57: e8 fc 50 00 00 call 11ac58 <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_port = _Dual_ported_memory_Get( id, &location ); switch ( location ) { 115b5c: 83 c4 10 add $0x10,%esp 115b5f: 8b 55 f4 mov -0xc(%ebp),%edx 115b62: 85 d2 test %edx,%edx 115b64: 74 0e je 115b74 115b66: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 115b6b: 8d 65 f8 lea -0x8(%ebp),%esp 115b6e: 5b pop %ebx 115b6f: 5e pop %esi 115b70: c9 leave 115b71: c3 ret 115b72: 66 90 xchg %ax,%ax <== NOT EXECUTED the_port = _Dual_ported_memory_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: ending = _Addresses_Subtract( internal, the_port->internal_base ); 115b74: 89 f2 mov %esi,%edx 115b76: 2b 50 10 sub 0x10(%eax),%edx if ( ending > the_port->length ) 115b79: 3b 50 18 cmp 0x18(%eax),%edx 115b7c: 77 16 ja 115b94 *external = internal; else *external = _Addresses_Add_offset( the_port->external_base, 115b7e: 03 50 14 add 0x14(%eax),%edx 115b81: 89 13 mov %edx,(%ebx) ending ); _Thread_Enable_dispatch(); 115b83: e8 b4 59 00 00 call 11b53c <_Thread_Enable_dispatch> 115b88: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 115b8a: 8d 65 f8 lea -0x8(%ebp),%esp 115b8d: 5b pop %ebx 115b8e: 5e pop %esi 115b8f: c9 leave 115b90: c3 ret 115b91: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED switch ( location ) { case OBJECTS_LOCAL: ending = _Addresses_Subtract( internal, the_port->internal_base ); if ( ending > the_port->length ) *external = internal; 115b94: 89 33 mov %esi,(%ebx) 115b96: eb eb jmp 115b83 <== ALWAYS TAKEN { register Dual_ported_memory_Control *the_port; Objects_Locations location; uint32_t ending; if ( !external ) 115b98: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 115b9d: 8d 65 f8 lea -0x8(%ebp),%esp 115ba0: 5b pop %ebx 115ba1: 5e pop %esi 115ba2: c9 leave 115ba3: c3 ret 0011660c : */ rtems_status_code rtems_rate_monotonic_cancel( rtems_id id ) { 11660c: 55 push %ebp 11660d: 89 e5 mov %esp,%ebp 11660f: 53 push %ebx 116610: 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 *) 116613: 8d 45 f4 lea -0xc(%ebp),%eax 116616: 50 push %eax 116617: ff 75 08 pushl 0x8(%ebp) 11661a: 68 80 1a 14 00 push $0x141a80 11661f: e8 34 46 00 00 call 11ac58 <_Objects_Get> 116624: 89 c3 mov %eax,%ebx Rate_monotonic_Control *the_period; Objects_Locations location; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 116626: 83 c4 10 add $0x10,%esp 116629: 8b 45 f4 mov -0xc(%ebp),%eax 11662c: 85 c0 test %eax,%eax 11662e: 74 0c je 11663c 116630: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116635: 8b 5d fc mov -0x4(%ebp),%ebx 116638: c9 leave 116639: c3 ret 11663a: 66 90 xchg %ax,%ax <== NOT EXECUTED the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_Thread_Is_executing( the_period->owner ) ) { 11663c: 8b 43 40 mov 0x40(%ebx),%eax 11663f: 3b 05 78 1c 14 00 cmp 0x141c78,%eax 116645: 74 11 je 116658 _Thread_Enable_dispatch(); 116647: e8 f0 4e 00 00 call 11b53c <_Thread_Enable_dispatch> 11664c: b8 17 00 00 00 mov $0x17,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116651: 8b 5d fc mov -0x4(%ebp),%ebx 116654: c9 leave 116655: c3 ret 116656: 66 90 xchg %ax,%ax <== NOT EXECUTED case OBJECTS_LOCAL: if ( !_Thread_Is_executing( the_period->owner ) ) { _Thread_Enable_dispatch(); return RTEMS_NOT_OWNER_OF_RESOURCE; } (void) _Watchdog_Remove( &the_period->Timer ); 116658: 83 ec 0c sub $0xc,%esp 11665b: 8d 43 10 lea 0x10(%ebx),%eax 11665e: 50 push %eax 11665f: e8 1c 63 00 00 call 11c980 <_Watchdog_Remove> the_period->state = RATE_MONOTONIC_INACTIVE; 116664: c7 43 38 00 00 00 00 movl $0x0,0x38(%ebx) _Thread_Enable_dispatch(); 11666b: e8 cc 4e 00 00 call 11b53c <_Thread_Enable_dispatch> 116670: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 116672: 83 c4 10 add $0x10,%esp 116675: eb be jmp 116635 <== ALWAYS TAKEN 0010c1a8 : rtems_status_code rtems_rate_monotonic_create( rtems_name name, rtems_id *id ) { 10c1a8: 55 push %ebp 10c1a9: 89 e5 mov %esp,%ebp 10c1ab: 57 push %edi 10c1ac: 56 push %esi 10c1ad: 53 push %ebx 10c1ae: 83 ec 1c sub $0x1c,%esp 10c1b1: 8b 5d 08 mov 0x8(%ebp),%ebx 10c1b4: 8b 75 0c mov 0xc(%ebp),%esi Rate_monotonic_Control *the_period; if ( !rtems_is_name_valid( name ) ) 10c1b7: 85 db test %ebx,%ebx 10c1b9: 0f 84 a9 00 00 00 je 10c268 return RTEMS_INVALID_NAME; if ( !id ) 10c1bf: 85 f6 test %esi,%esi 10c1c1: 0f 84 c5 00 00 00 je 10c28c rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10c1c7: a1 f8 94 12 00 mov 0x1294f8,%eax 10c1cc: 40 inc %eax 10c1cd: a3 f8 94 12 00 mov %eax,0x1294f8 * 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 *) 10c1d2: 83 ec 0c sub $0xc,%esp 10c1d5: 68 00 94 12 00 push $0x129400 10c1da: e8 51 1e 00 00 call 10e030 <_Objects_Allocate> 10c1df: 89 c2 mov %eax,%edx _Thread_Disable_dispatch(); /* to prevent deletion */ the_period = _Rate_monotonic_Allocate(); if ( !the_period ) { 10c1e1: 83 c4 10 add $0x10,%esp 10c1e4: 85 c0 test %eax,%eax 10c1e6: 0f 84 8c 00 00 00 je 10c278 _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } the_period->owner = _Thread_Executing; 10c1ec: a1 b8 95 12 00 mov 0x1295b8,%eax 10c1f1: 89 42 40 mov %eax,0x40(%edx) the_period->state = RATE_MONOTONIC_INACTIVE; 10c1f4: 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; 10c1fb: c7 42 18 00 00 00 00 movl $0x0,0x18(%edx) the_watchdog->routine = routine; 10c202: c7 42 2c 00 00 00 00 movl $0x0,0x2c(%edx) the_watchdog->id = id; 10c209: c7 42 30 00 00 00 00 movl $0x0,0x30(%edx) the_watchdog->user_data = user_data; 10c210: 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 ); 10c217: 8d 42 54 lea 0x54(%edx),%eax 10c21a: 89 45 e4 mov %eax,-0x1c(%ebp) 10c21d: b9 38 00 00 00 mov $0x38,%ecx 10c222: 31 c0 xor %eax,%eax 10c224: 8b 7d e4 mov -0x1c(%ebp),%edi 10c227: f3 aa rep stos %al,%es:(%edi) 10c229: c7 42 5c ff ff ff 7f movl $0x7fffffff,0x5c(%edx) 10c230: c7 42 60 ff ff ff 7f movl $0x7fffffff,0x60(%edx) 10c237: c7 42 74 ff ff ff 7f movl $0x7fffffff,0x74(%edx) 10c23e: 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; 10c245: 8b 42 08 mov 0x8(%edx),%eax 10c248: 0f b7 f8 movzwl %ax,%edi 10c24b: 8b 0d 1c 94 12 00 mov 0x12941c,%ecx 10c251: 89 14 b9 mov %edx,(%ecx,%edi,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 10c254: 89 5a 0c mov %ebx,0xc(%edx) &_Rate_monotonic_Information, &the_period->Object, (Objects_Name) name ); *id = the_period->Object.id; 10c257: 89 06 mov %eax,(%esi) _Thread_Enable_dispatch(); 10c259: e8 da 2b 00 00 call 10ee38 <_Thread_Enable_dispatch> 10c25e: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; } 10c260: 8d 65 f4 lea -0xc(%ebp),%esp 10c263: 5b pop %ebx 10c264: 5e pop %esi 10c265: 5f pop %edi 10c266: c9 leave 10c267: c3 ret rtems_id *id ) { Rate_monotonic_Control *the_period; if ( !rtems_is_name_valid( name ) ) 10c268: b8 03 00 00 00 mov $0x3,%eax ); *id = the_period->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10c26d: 8d 65 f4 lea -0xc(%ebp),%esp 10c270: 5b pop %ebx 10c271: 5e pop %esi 10c272: 5f pop %edi 10c273: c9 leave 10c274: c3 ret 10c275: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED _Thread_Disable_dispatch(); /* to prevent deletion */ the_period = _Rate_monotonic_Allocate(); if ( !the_period ) { _Thread_Enable_dispatch(); 10c278: e8 bb 2b 00 00 call 10ee38 <_Thread_Enable_dispatch> 10c27d: b8 05 00 00 00 mov $0x5,%eax ); *id = the_period->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10c282: 8d 65 f4 lea -0xc(%ebp),%esp 10c285: 5b pop %ebx 10c286: 5e pop %esi 10c287: 5f pop %edi 10c288: c9 leave 10c289: c3 ret 10c28a: 66 90 xchg %ax,%ax <== NOT EXECUTED Rate_monotonic_Control *the_period; if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; if ( !id ) 10c28c: b8 09 00 00 00 mov $0x9,%eax ); *id = the_period->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10c291: 8d 65 f4 lea -0xc(%ebp),%esp 10c294: 5b pop %ebx 10c295: 5e pop %esi 10c296: 5f pop %edi 10c297: c9 leave 10c298: c3 ret 0013d4b0 : rtems_status_code rtems_rate_monotonic_get_status( rtems_id id, rtems_rate_monotonic_period_status *status ) { 13d4b0: 55 push %ebp 13d4b1: 89 e5 mov %esp,%ebp 13d4b3: 53 push %ebx 13d4b4: 83 ec 24 sub $0x24,%esp 13d4b7: 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 ) 13d4ba: 85 db test %ebx,%ebx 13d4bc: 0f 84 92 00 00 00 je 13d554 13d4c2: 50 push %eax 13d4c3: 8d 45 f4 lea -0xc(%ebp),%eax 13d4c6: 50 push %eax 13d4c7: ff 75 08 pushl 0x8(%ebp) 13d4ca: 68 e0 fc 16 00 push $0x16fce0 13d4cf: e8 b4 5b fd ff call 113088 <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 13d4d4: 83 c4 10 add $0x10,%esp 13d4d7: 8b 4d f4 mov -0xc(%ebp),%ecx 13d4da: 85 c9 test %ecx,%ecx 13d4dc: 74 0a je 13d4e8 13d4de: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 13d4e3: 8b 5d fc mov -0x4(%ebp),%ebx 13d4e6: c9 leave 13d4e7: c3 ret the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: status->owner = the_period->owner->Object.id; 13d4e8: 8b 50 40 mov 0x40(%eax),%edx 13d4eb: 8b 52 08 mov 0x8(%edx),%edx 13d4ee: 89 13 mov %edx,(%ebx) status->state = the_period->state; 13d4f0: 8b 50 38 mov 0x38(%eax),%edx 13d4f3: 89 53 04 mov %edx,0x4(%ebx) /* * If the period is inactive, there is no information. */ if ( status->state == RATE_MONOTONIC_INACTIVE ) { 13d4f6: 85 d2 test %edx,%edx 13d4f8: 75 2a jne 13d524 #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timespec_Set_to_zero( &status->since_last_period ); 13d4fa: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx) 13d501: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx) _Timespec_Set_to_zero( &status->executed_since_last_period ); 13d508: c7 43 10 00 00 00 00 movl $0x0,0x10(%ebx) 13d50f: c7 43 14 00 00 00 00 movl $0x0,0x14(%ebx) status->since_last_period = since_last_period; status->executed_since_last_period = executed; #endif } _Thread_Enable_dispatch(); 13d516: e8 91 64 fd ff call 1139ac <_Thread_Enable_dispatch> 13d51b: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 13d51d: 8b 5d fc mov -0x4(%ebp),%ebx 13d520: c9 leave 13d521: c3 ret 13d522: 66 90 xchg %ax,%ax <== NOT EXECUTED /* * Grab the current status. */ valid_status = _Rate_monotonic_Get_status( 13d524: 52 push %edx 13d525: 8d 55 ec lea -0x14(%ebp),%edx 13d528: 52 push %edx 13d529: 8d 55 e4 lea -0x1c(%ebp),%edx 13d52c: 52 push %edx 13d52d: 50 push %eax 13d52e: e8 b1 00 00 00 call 13d5e4 <_Rate_monotonic_Get_status> <== ALWAYS TAKEN the_period, &since_last_period, &executed ); if (!valid_status) { 13d533: 83 c4 10 add $0x10,%esp 13d536: 84 c0 test %al,%al 13d538: 74 26 je 13d560 _Thread_Enable_dispatch(); return RTEMS_NOT_DEFINED; } #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_To_timespec( 13d53a: 8b 45 e4 mov -0x1c(%ebp),%eax 13d53d: 8b 55 e8 mov -0x18(%ebp),%edx 13d540: 89 43 08 mov %eax,0x8(%ebx) 13d543: 89 53 0c mov %edx,0xc(%ebx) &since_last_period, &status->since_last_period ); _Timestamp_To_timespec( 13d546: 8b 45 ec mov -0x14(%ebp),%eax 13d549: 8b 55 f0 mov -0x10(%ebp),%edx 13d54c: 89 43 10 mov %eax,0x10(%ebx) 13d54f: 89 53 14 mov %edx,0x14(%ebx) 13d552: eb c2 jmp 13d516 <== ALWAYS TAKEN Objects_Locations location; Rate_monotonic_Period_time_t since_last_period; Rate_monotonic_Control *the_period; bool valid_status; if ( !status ) 13d554: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 13d559: 8b 5d fc mov -0x4(%ebp),%ebx 13d55c: c9 leave 13d55d: c3 ret 13d55e: 66 90 xchg %ax,%ax <== NOT EXECUTED valid_status = _Rate_monotonic_Get_status( the_period, &since_last_period, &executed ); if (!valid_status) { _Thread_Enable_dispatch(); 13d560: e8 47 64 fd ff call 1139ac <_Thread_Enable_dispatch> 13d565: b8 0b 00 00 00 mov $0xb,%eax return RTEMS_NOT_DEFINED; 13d56a: e9 74 ff ff ff jmp 13d4e3 <== ALWAYS TAKEN 0013d76c : rtems_status_code rtems_rate_monotonic_period( rtems_id id, rtems_interval length ) { 13d76c: 55 push %ebp 13d76d: 89 e5 mov %esp,%ebp 13d76f: 57 push %edi 13d770: 56 push %esi 13d771: 53 push %ebx 13d772: 83 ec 30 sub $0x30,%esp 13d775: 8b 5d 08 mov 0x8(%ebp),%ebx 13d778: 8b 75 0c mov 0xc(%ebp),%esi 13d77b: 8d 45 e4 lea -0x1c(%ebp),%eax 13d77e: 50 push %eax 13d77f: 53 push %ebx 13d780: 68 e0 fc 16 00 push $0x16fce0 13d785: e8 fe 58 fd ff call 113088 <_Objects_Get> rtems_rate_monotonic_period_states local_state; ISR_Level level; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 13d78a: 83 c4 10 add $0x10,%esp 13d78d: 8b 7d e4 mov -0x1c(%ebp),%edi 13d790: 85 ff test %edi,%edi 13d792: 74 10 je 13d7a4 the_period->state = RATE_MONOTONIC_ACTIVE; the_period->next_length = length; _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); return RTEMS_TIMEOUT; 13d794: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 13d799: 8d 65 f4 lea -0xc(%ebp),%esp 13d79c: 5b pop %ebx 13d79d: 5e pop %esi 13d79e: 5f pop %edi 13d79f: c9 leave 13d7a0: c3 ret 13d7a1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_Thread_Is_executing( the_period->owner ) ) { 13d7a4: 8b 50 40 mov 0x40(%eax),%edx 13d7a7: 3b 15 f8 f0 16 00 cmp 0x16f0f8,%edx 13d7ad: 74 15 je 13d7c4 _Thread_Enable_dispatch(); 13d7af: e8 f8 61 fd ff call 1139ac <_Thread_Enable_dispatch> 13d7b4: b8 17 00 00 00 mov $0x17,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 13d7b9: 8d 65 f4 lea -0xc(%ebp),%esp 13d7bc: 5b pop %ebx 13d7bd: 5e pop %esi 13d7be: 5f pop %edi 13d7bf: c9 leave 13d7c0: c3 ret 13d7c1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if ( !_Thread_Is_executing( the_period->owner ) ) { _Thread_Enable_dispatch(); return RTEMS_NOT_OWNER_OF_RESOURCE; } if ( length == RTEMS_PERIOD_STATUS ) { 13d7c4: 85 f6 test %esi,%esi 13d7c6: 0f 84 b0 00 00 00 je 13d87c } _Thread_Enable_dispatch(); return( return_value ); } _ISR_Disable( level ); 13d7cc: 9c pushf 13d7cd: fa cli 13d7ce: 5f pop %edi switch ( the_period->state ) { 13d7cf: 8b 50 38 mov 0x38(%eax),%edx 13d7d2: 83 fa 02 cmp $0x2,%edx 13d7d5: 0f 84 bd 00 00 00 je 13d898 13d7db: 83 fa 04 cmp $0x4,%edx 13d7de: 74 5c je 13d83c 13d7e0: 85 d2 test %edx,%edx 13d7e2: 75 b0 jne 13d794 <== ALWAYS TAKEN case RATE_MONOTONIC_INACTIVE: { _ISR_Enable( level ); 13d7e4: 57 push %edi 13d7e5: 9d popf /* * Baseline statistics information for the beginning of a period. */ _Rate_monotonic_Initiate_statistics( the_period ); 13d7e6: 83 ec 0c sub $0xc,%esp 13d7e9: 50 push %eax 13d7ea: 89 45 d4 mov %eax,-0x2c(%ebp) 13d7ed: e8 7e fd ff ff call 13d570 <_Rate_monotonic_Initiate_statistics> <== ALWAYS TAKEN the_period->state = RATE_MONOTONIC_ACTIVE; 13d7f2: 8b 45 d4 mov -0x2c(%ebp),%eax 13d7f5: c7 40 38 02 00 00 00 movl $0x2,0x38(%eax) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 13d7fc: c7 40 18 00 00 00 00 movl $0x0,0x18(%eax) the_watchdog->routine = routine; 13d803: c7 40 2c 1c d9 13 00 movl $0x13d91c,0x2c(%eax) the_watchdog->id = id; 13d80a: 89 58 30 mov %ebx,0x30(%eax) the_watchdog->user_data = user_data; 13d80d: c7 40 34 00 00 00 00 movl $0x0,0x34(%eax) _Rate_monotonic_Timeout, id, NULL ); the_period->next_length = length; 13d814: 89 70 3c mov %esi,0x3c(%eax) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 13d817: 89 70 1c mov %esi,0x1c(%eax) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 13d81a: 5a pop %edx 13d81b: 59 pop %ecx 13d81c: 83 c0 10 add $0x10,%eax 13d81f: 50 push %eax 13d820: 68 18 f1 16 00 push $0x16f118 13d825: e8 ce 70 fd ff call 1148f8 <_Watchdog_Insert> _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); 13d82a: e8 7d 61 fd ff call 1139ac <_Thread_Enable_dispatch> 13d82f: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 13d831: 83 c4 10 add $0x10,%esp 13d834: e9 60 ff ff ff jmp 13d799 <== ALWAYS TAKEN 13d839: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED case RATE_MONOTONIC_EXPIRED: /* * Update statistics from the concluding period */ _Rate_monotonic_Update_statistics( the_period ); 13d83c: 83 ec 0c sub $0xc,%esp 13d83f: 50 push %eax 13d840: 89 45 d4 mov %eax,-0x2c(%ebp) 13d843: e8 34 fe ff ff call 13d67c <_Rate_monotonic_Update_statistics> <== ALWAYS TAKEN _ISR_Enable( level ); 13d848: 57 push %edi 13d849: 9d popf the_period->state = RATE_MONOTONIC_ACTIVE; 13d84a: 8b 45 d4 mov -0x2c(%ebp),%eax 13d84d: c7 40 38 02 00 00 00 movl $0x2,0x38(%eax) the_period->next_length = length; 13d854: 89 70 3c mov %esi,0x3c(%eax) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 13d857: 89 70 1c mov %esi,0x1c(%eax) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 13d85a: 59 pop %ecx 13d85b: 5b pop %ebx 13d85c: 83 c0 10 add $0x10,%eax 13d85f: 50 push %eax 13d860: 68 18 f1 16 00 push $0x16f118 13d865: e8 8e 70 fd ff call 1148f8 <_Watchdog_Insert> _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); 13d86a: e8 3d 61 fd ff call 1139ac <_Thread_Enable_dispatch> 13d86f: b8 06 00 00 00 mov $0x6,%eax return RTEMS_TIMEOUT; 13d874: 83 c4 10 add $0x10,%esp 13d877: e9 1d ff ff ff jmp 13d799 <== ALWAYS TAKEN _Thread_Enable_dispatch(); return RTEMS_NOT_OWNER_OF_RESOURCE; } if ( length == RTEMS_PERIOD_STATUS ) { switch ( the_period->state ) { 13d87c: 8b 40 38 mov 0x38(%eax),%eax 13d87f: 83 f8 04 cmp $0x4,%eax 13d882: 76 74 jbe 13d8f8 <== NEVER TAKEN 13d884: 31 c0 xor %eax,%eax <== NOT EXECUTED case RATE_MONOTONIC_ACTIVE: default: /* unreached -- only to remove warnings */ return_value = RTEMS_SUCCESSFUL; break; } _Thread_Enable_dispatch(); 13d886: 89 45 d4 mov %eax,-0x2c(%ebp) 13d889: e8 1e 61 fd ff call 1139ac <_Thread_Enable_dispatch> return( return_value ); 13d88e: 8b 45 d4 mov -0x2c(%ebp),%eax 13d891: e9 03 ff ff ff jmp 13d799 <== ALWAYS TAKEN 13d896: 66 90 xchg %ax,%ax <== NOT EXECUTED case RATE_MONOTONIC_ACTIVE: /* * Update statistics from the concluding period. */ _Rate_monotonic_Update_statistics( the_period ); 13d898: 83 ec 0c sub $0xc,%esp 13d89b: 50 push %eax 13d89c: 89 45 d4 mov %eax,-0x2c(%ebp) 13d89f: e8 d8 fd ff ff call 13d67c <_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; 13d8a4: 8b 45 d4 mov -0x2c(%ebp),%eax 13d8a7: c7 40 38 01 00 00 00 movl $0x1,0x38(%eax) the_period->next_length = length; 13d8ae: 89 70 3c mov %esi,0x3c(%eax) _ISR_Enable( level ); 13d8b1: 57 push %edi 13d8b2: 9d popf _Thread_Executing->Wait.id = the_period->Object.id; 13d8b3: 8b 15 f8 f0 16 00 mov 0x16f0f8,%edx 13d8b9: 8b 48 08 mov 0x8(%eax),%ecx 13d8bc: 89 4a 20 mov %ecx,0x20(%edx) _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); 13d8bf: 5e pop %esi 13d8c0: 5f pop %edi 13d8c1: 68 00 40 00 00 push $0x4000 13d8c6: 52 push %edx 13d8c7: 89 45 d4 mov %eax,-0x2c(%ebp) 13d8ca: e8 a1 69 fd ff call 114270 <_Thread_Set_state> /* * Did the watchdog timer expire while we were actually blocking * on it? */ _ISR_Disable( level ); 13d8cf: 9c pushf 13d8d0: fa cli 13d8d1: 59 pop %ecx local_state = the_period->state; 13d8d2: 8b 45 d4 mov -0x2c(%ebp),%eax 13d8d5: 8b 50 38 mov 0x38(%eax),%edx the_period->state = RATE_MONOTONIC_ACTIVE; 13d8d8: c7 40 38 02 00 00 00 movl $0x2,0x38(%eax) _ISR_Enable( level ); 13d8df: 51 push %ecx 13d8e0: 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 ) 13d8e1: 83 c4 10 add $0x10,%esp 13d8e4: 83 fa 03 cmp $0x3,%edx 13d8e7: 74 18 je 13d901 _Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); _Thread_Enable_dispatch(); 13d8e9: e8 be 60 fd ff call 1139ac <_Thread_Enable_dispatch> 13d8ee: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 13d8f0: e9 a4 fe ff ff jmp 13d799 <== ALWAYS TAKEN 13d8f5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED _Thread_Enable_dispatch(); return RTEMS_NOT_OWNER_OF_RESOURCE; } if ( length == RTEMS_PERIOD_STATUS ) { switch ( the_period->state ) { 13d8f8: 8b 04 85 34 39 16 00 mov 0x163934(,%eax,4),%eax 13d8ff: eb 85 jmp 13d886 <== ALWAYS TAKEN /* * If it did, then we want to unblock ourself and continue as * if nothing happen. The period was reset in the timeout routine. */ if ( local_state == RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING ) _Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); 13d901: 83 ec 08 sub $0x8,%esp 13d904: 68 00 40 00 00 push $0x4000 13d909: ff 35 f8 f0 16 00 pushl 0x16f0f8 13d90f: e8 f0 5c fd ff call 113604 <_Thread_Clear_state> 13d914: 83 c4 10 add $0x10,%esp 13d917: eb d0 jmp 13d8e9 <== ALWAYS TAKEN 0012ddb8 : } } } void rtems_rate_monotonic_report_statistics( void ) { 12ddb8: 55 push %ebp 12ddb9: 89 e5 mov %esp,%ebp 12ddbb: 83 ec 10 sub $0x10,%esp rtems_rate_monotonic_report_statistics_with_plugin( NULL, printk_plugin ); 12ddbe: 68 c8 df 10 00 push $0x10dfc8 12ddc3: 6a 00 push $0x0 12ddc5: e8 0a fe ff ff call 12dbd4 <== ALWAYS TAKEN 12ddca: 83 c4 10 add $0x10,%esp } 12ddcd: c9 leave 12ddce: c3 ret 0012dbd4 : */ void rtems_rate_monotonic_report_statistics_with_plugin( void *context, rtems_printk_plugin_t print ) { 12dbd4: 55 push %ebp 12dbd5: 89 e5 mov %esp,%ebp 12dbd7: 57 push %edi 12dbd8: 56 push %esi 12dbd9: 53 push %ebx 12dbda: 83 ec 7c sub $0x7c,%esp 12dbdd: 8b 7d 08 mov 0x8(%ebp),%edi 12dbe0: 8b 75 0c mov 0xc(%ebp),%esi rtems_id id; rtems_rate_monotonic_period_statistics the_stats; rtems_rate_monotonic_period_status the_status; char name[5]; if ( !print ) 12dbe3: 85 f6 test %esi,%esi 12dbe5: 0f 84 bd 00 00 00 je 12dca8 <== ALWAYS TAKEN return; (*print)( context, "Period information by period\n" ); 12dbeb: 83 ec 08 sub $0x8,%esp 12dbee: 68 68 ff 15 00 push $0x15ff68 12dbf3: 57 push %edi 12dbf4: ff d6 call *%esi #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ (*print)( context, "--- CPU times are in seconds ---\n" ); 12dbf6: 59 pop %ecx 12dbf7: 5b pop %ebx 12dbf8: 68 a0 ff 15 00 push $0x15ffa0 12dbfd: 57 push %edi 12dbfe: ff d6 call *%esi (*print)( context, "--- Wall times are in seconds ---\n" ); 12dc00: 58 pop %eax 12dc01: 5a pop %edx 12dc02: 68 c4 ff 15 00 push $0x15ffc4 12dc07: 57 push %edi 12dc08: ff d6 call *%esi Be sure to test the various cases. (*print)( context,"\ 1234567890123456789012345678901234567890123456789012345678901234567890123456789\ \n"); */ (*print)( context, " ID OWNER COUNT MISSED " 12dc0a: 59 pop %ecx 12dc0b: 5b pop %ebx 12dc0c: 68 e8 ff 15 00 push $0x15ffe8 12dc11: 57 push %edi 12dc12: ff d6 call *%esi #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ " " #endif " WALL TIME\n" ); (*print)( context, " " 12dc14: 58 pop %eax 12dc15: 5a pop %edx 12dc16: 68 34 00 16 00 push $0x160034 12dc1b: 57 push %edi 12dc1c: ff d6 call *%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 ; 12dc1e: 8b 1d e8 fc 16 00 mov 0x16fce8,%ebx 12dc24: 83 c4 10 add $0x10,%esp 12dc27: 3b 1d ec fc 16 00 cmp 0x16fcec,%ebx 12dc2d: 77 79 ja 12dca8 <== ALWAYS TAKEN 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); 12dc2f: 89 75 84 mov %esi,-0x7c(%ebp) 12dc32: eb 09 jmp 12dc3d <== ALWAYS TAKEN * 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++ ) { 12dc34: 43 inc %ebx /* * Cycle through all possible ids and try to report on each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; 12dc35: 39 1d ec fc 16 00 cmp %ebx,0x16fcec 12dc3b: 72 6b jb 12dca8 id <= _Rate_monotonic_Information.maximum_id ; id++ ) { status = rtems_rate_monotonic_get_statistics( id, &the_stats ); 12dc3d: 83 ec 08 sub $0x8,%esp 12dc40: 8d 45 88 lea -0x78(%ebp),%eax 12dc43: 50 push %eax 12dc44: 53 push %ebx 12dc45: e8 ba f7 00 00 call 13d404 if ( status != RTEMS_SUCCESSFUL ) 12dc4a: 83 c4 10 add $0x10,%esp 12dc4d: 85 c0 test %eax,%eax 12dc4f: 75 e3 jne 12dc34 continue; /* If the above passed, so should this but check it anyway */ status = rtems_rate_monotonic_get_status( id, &the_status ); 12dc51: 83 ec 08 sub $0x8,%esp 12dc54: 8d 55 c0 lea -0x40(%ebp),%edx 12dc57: 52 push %edx 12dc58: 53 push %ebx 12dc59: e8 52 f8 00 00 call 13d4b0 #if defined(RTEMS_DEBUG) if ( status != RTEMS_SUCCESSFUL ) continue; #endif rtems_object_get_name( the_status.owner, sizeof(name), name ); 12dc5e: 83 c4 0c add $0xc,%esp 12dc61: 8d 45 e3 lea -0x1d(%ebp),%eax 12dc64: 50 push %eax 12dc65: 6a 05 push $0x5 12dc67: ff 75 c0 pushl -0x40(%ebp) 12dc6a: e8 cd 36 fe ff call 11133c <== ALWAYS TAKEN /* * Print part of report line that is not dependent on granularity */ (*print)( context, 12dc6f: 59 pop %ecx 12dc70: 5e pop %esi 12dc71: ff 75 8c pushl -0x74(%ebp) 12dc74: ff 75 88 pushl -0x78(%ebp) 12dc77: 8d 55 e3 lea -0x1d(%ebp),%edx 12dc7a: 52 push %edx 12dc7b: 53 push %ebx 12dc7c: 68 86 ff 15 00 push $0x15ff86 12dc81: 57 push %edi 12dc82: ff 55 84 call *-0x7c(%ebp) ); /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { 12dc85: 8b 45 88 mov -0x78(%ebp),%eax 12dc88: 83 c4 20 add $0x20,%esp 12dc8b: 85 c0 test %eax,%eax 12dc8d: 75 21 jne 12dcb0 (*print)( context, "\n" ); 12dc8f: 83 ec 08 sub $0x8,%esp 12dc92: 68 61 1d 16 00 push $0x161d61 12dc97: 57 push %edi 12dc98: ff 55 84 call *-0x7c(%ebp) continue; 12dc9b: 83 c4 10 add $0x10,%esp * Cycle through all possible ids and try to report on each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; id <= _Rate_monotonic_Information.maximum_id ; id++ ) { 12dc9e: 43 inc %ebx /* * Cycle through all possible ids and try to report on each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; 12dc9f: 39 1d ec fc 16 00 cmp %ebx,0x16fcec 12dca5: 73 96 jae 12dc3d <== NEVER TAKEN 12dca7: 90 nop <== NOT EXECUTED the_stats.min_wall_time, the_stats.max_wall_time, ival_wall, fval_wall ); #endif } } } 12dca8: 8d 65 f4 lea -0xc(%ebp),%esp 12dcab: 5b pop %ebx 12dcac: 5e pop %esi 12dcad: 5f pop %edi 12dcae: c9 leave 12dcaf: c3 ret struct timespec cpu_average; struct timespec *min_cpu = &the_stats.min_cpu_time; struct timespec *max_cpu = &the_stats.max_cpu_time; struct timespec *total_cpu = &the_stats.total_cpu_time; _Timespec_Divide_by_integer( total_cpu, the_stats.count, &cpu_average ); 12dcb0: 52 push %edx 12dcb1: 8d 55 d8 lea -0x28(%ebp),%edx 12dcb4: 52 push %edx 12dcb5: 50 push %eax 12dcb6: 8d 45 a0 lea -0x60(%ebp),%eax 12dcb9: 50 push %eax 12dcba: e8 0d 17 00 00 call 12f3cc <_Timespec_Divide_by_integer> (*print)( context, 12dcbf: 8b 4d dc mov -0x24(%ebp),%ecx 12dcc2: be d3 4d 62 10 mov $0x10624dd3,%esi 12dcc7: 89 c8 mov %ecx,%eax 12dcc9: f7 ee imul %esi 12dccb: 89 95 7c ff ff ff mov %edx,-0x84(%ebp) 12dcd1: 8b 85 7c ff ff ff mov -0x84(%ebp),%eax 12dcd7: c1 f8 06 sar $0x6,%eax 12dcda: c1 f9 1f sar $0x1f,%ecx 12dcdd: 29 c8 sub %ecx,%eax 12dcdf: 50 push %eax 12dce0: ff 75 d8 pushl -0x28(%ebp) 12dce3: 8b 4d 9c mov -0x64(%ebp),%ecx 12dce6: 89 c8 mov %ecx,%eax 12dce8: f7 ee imul %esi 12dcea: 89 95 7c ff ff ff mov %edx,-0x84(%ebp) 12dcf0: 8b 85 7c ff ff ff mov -0x84(%ebp),%eax 12dcf6: c1 f8 06 sar $0x6,%eax 12dcf9: c1 f9 1f sar $0x1f,%ecx 12dcfc: 29 c8 sub %ecx,%eax 12dcfe: 50 push %eax 12dcff: ff 75 98 pushl -0x68(%ebp) 12dd02: 8b 4d 94 mov -0x6c(%ebp),%ecx 12dd05: 89 c8 mov %ecx,%eax 12dd07: f7 ee imul %esi 12dd09: 89 85 78 ff ff ff mov %eax,-0x88(%ebp) 12dd0f: 89 95 7c ff ff ff mov %edx,-0x84(%ebp) 12dd15: 8b 85 7c ff ff ff mov -0x84(%ebp),%eax 12dd1b: c1 f8 06 sar $0x6,%eax 12dd1e: c1 f9 1f sar $0x1f,%ecx 12dd21: 29 c8 sub %ecx,%eax 12dd23: 50 push %eax 12dd24: ff 75 90 pushl -0x70(%ebp) 12dd27: 68 80 00 16 00 push $0x160080 12dd2c: 57 push %edi 12dd2d: ff 55 84 call *-0x7c(%ebp) struct timespec wall_average; struct timespec *min_wall = &the_stats.min_wall_time; struct timespec *max_wall = &the_stats.max_wall_time; struct timespec *total_wall = &the_stats.total_wall_time; _Timespec_Divide_by_integer(total_wall, the_stats.count, &wall_average); 12dd30: 83 c4 2c add $0x2c,%esp 12dd33: 8d 55 d8 lea -0x28(%ebp),%edx 12dd36: 52 push %edx 12dd37: ff 75 88 pushl -0x78(%ebp) 12dd3a: 8d 45 b8 lea -0x48(%ebp),%eax 12dd3d: 50 push %eax 12dd3e: e8 89 16 00 00 call 12f3cc <_Timespec_Divide_by_integer> (*print)( context, 12dd43: 8b 4d dc mov -0x24(%ebp),%ecx 12dd46: 89 c8 mov %ecx,%eax 12dd48: f7 ee imul %esi 12dd4a: 89 95 7c ff ff ff mov %edx,-0x84(%ebp) 12dd50: 8b 85 7c ff ff ff mov -0x84(%ebp),%eax 12dd56: c1 f8 06 sar $0x6,%eax 12dd59: c1 f9 1f sar $0x1f,%ecx 12dd5c: 29 c8 sub %ecx,%eax 12dd5e: 50 push %eax 12dd5f: ff 75 d8 pushl -0x28(%ebp) 12dd62: 8b 4d b4 mov -0x4c(%ebp),%ecx 12dd65: 89 c8 mov %ecx,%eax 12dd67: f7 ee imul %esi 12dd69: 89 95 7c ff ff ff mov %edx,-0x84(%ebp) 12dd6f: 8b 85 7c ff ff ff mov -0x84(%ebp),%eax 12dd75: c1 f8 06 sar $0x6,%eax 12dd78: c1 f9 1f sar $0x1f,%ecx 12dd7b: 29 c8 sub %ecx,%eax 12dd7d: 50 push %eax 12dd7e: ff 75 b0 pushl -0x50(%ebp) 12dd81: 8b 4d ac mov -0x54(%ebp),%ecx 12dd84: 89 c8 mov %ecx,%eax 12dd86: f7 ee imul %esi 12dd88: 89 85 78 ff ff ff mov %eax,-0x88(%ebp) 12dd8e: 89 95 7c ff ff ff mov %edx,-0x84(%ebp) 12dd94: 8b b5 7c ff ff ff mov -0x84(%ebp),%esi 12dd9a: c1 fe 06 sar $0x6,%esi 12dd9d: 89 c8 mov %ecx,%eax 12dd9f: 99 cltd 12dda0: 29 d6 sub %edx,%esi 12dda2: 56 push %esi 12dda3: ff 75 a8 pushl -0x58(%ebp) 12dda6: 68 a0 00 16 00 push $0x1600a0 12ddab: 57 push %edi 12ddac: ff 55 84 call *-0x7c(%ebp) 12ddaf: 83 c4 30 add $0x30,%esp 12ddb2: e9 7d fe ff ff jmp 12dc34 <== ALWAYS TAKEN 0012ddd0 : /* * rtems_rate_monotonic_reset_all_statistics */ void rtems_rate_monotonic_reset_all_statistics( void ) { 12ddd0: 55 push %ebp 12ddd1: 89 e5 mov %esp,%ebp 12ddd3: 53 push %ebx 12ddd4: 83 ec 04 sub $0x4,%esp 12ddd7: a1 38 f0 16 00 mov 0x16f038,%eax 12dddc: 40 inc %eax 12dddd: a3 38 f0 16 00 mov %eax,0x16f038 /* * 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 ; 12dde2: 8b 1d e8 fc 16 00 mov 0x16fce8,%ebx 12dde8: 3b 1d ec fc 16 00 cmp 0x16fcec,%ebx 12ddee: 77 15 ja 12de05 <== ALWAYS TAKEN id <= _Rate_monotonic_Information.maximum_id ; id++ ) { status = rtems_rate_monotonic_reset_statistics( id ); 12ddf0: 83 ec 0c sub $0xc,%esp 12ddf3: 53 push %ebx 12ddf4: e8 17 00 00 00 call 12de10 <== 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++ ) { 12ddf9: 43 inc %ebx /* * Cycle through all possible ids and try to reset each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; 12ddfa: 83 c4 10 add $0x10,%esp 12ddfd: 39 1d ec fc 16 00 cmp %ebx,0x16fcec 12de03: 73 eb jae 12ddf0 /* * Done so exit thread dispatching disabled critical section. */ _Thread_Enable_dispatch(); } 12de05: 8b 5d fc mov -0x4(%ebp),%ebx 12de08: c9 leave } /* * Done so exit thread dispatching disabled critical section. */ _Thread_Enable_dispatch(); 12de09: e9 9e 5b fe ff jmp 1139ac <_Thread_Enable_dispatch> 0012de10 : */ rtems_status_code rtems_rate_monotonic_reset_statistics( rtems_id id ) { 12de10: 55 push %ebp 12de11: 89 e5 mov %esp,%ebp 12de13: 57 push %edi 12de14: 53 push %ebx 12de15: 83 ec 14 sub $0x14,%esp RTEMS_INLINE_ROUTINE Rate_monotonic_Control *_Rate_monotonic_Get ( Objects_Id id, Objects_Locations *location ) { return (Rate_monotonic_Control *) 12de18: 8d 45 f4 lea -0xc(%ebp),%eax 12de1b: 50 push %eax 12de1c: ff 75 08 pushl 0x8(%ebp) 12de1f: 68 e0 fc 16 00 push $0x16fce0 12de24: e8 5f 52 fe ff call 113088 <_Objects_Get> 12de29: 89 c2 mov %eax,%edx Objects_Locations location; Rate_monotonic_Control *the_period; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 12de2b: 83 c4 10 add $0x10,%esp 12de2e: 8b 45 f4 mov -0xc(%ebp),%eax 12de31: 85 c0 test %eax,%eax 12de33: 75 3b jne 12de70 case OBJECTS_LOCAL: _Rate_monotonic_Reset_statistics( the_period ); 12de35: 8d 5a 54 lea 0x54(%edx),%ebx 12de38: b9 38 00 00 00 mov $0x38,%ecx 12de3d: 31 c0 xor %eax,%eax 12de3f: 89 df mov %ebx,%edi 12de41: f3 aa rep stos %al,%es:(%edi) 12de43: c7 42 5c ff ff ff 7f movl $0x7fffffff,0x5c(%edx) 12de4a: c7 42 60 ff ff ff 7f movl $0x7fffffff,0x60(%edx) 12de51: c7 42 74 ff ff ff 7f movl $0x7fffffff,0x74(%edx) 12de58: c7 42 78 ff ff ff 7f movl $0x7fffffff,0x78(%edx) _Thread_Enable_dispatch(); 12de5f: e8 48 5b fe ff call 1139ac <_Thread_Enable_dispatch> 12de64: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 12de66: 8d 65 f8 lea -0x8(%ebp),%esp 12de69: 5b pop %ebx 12de6a: 5f pop %edi 12de6b: c9 leave 12de6c: c3 ret 12de6d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED { Objects_Locations location; Rate_monotonic_Control *the_period; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 12de70: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 12de75: 8d 65 f8 lea -0x8(%ebp),%esp 12de78: 5b pop %ebx 12de79: 5f pop %edi 12de7a: c9 leave 12de7b: c3 ret 00116db0 : uintptr_t length, uintptr_t page_size, rtems_attribute attribute_set, rtems_id *id ) { 116db0: 55 push %ebp 116db1: 89 e5 mov %esp,%ebp 116db3: 57 push %edi 116db4: 56 push %esi 116db5: 53 push %ebx 116db6: 83 ec 1c sub $0x1c,%esp 116db9: 8b 75 08 mov 0x8(%ebp),%esi 116dbc: 8b 5d 0c mov 0xc(%ebp),%ebx 116dbf: 8b 7d 1c mov 0x1c(%ebp),%edi rtems_status_code return_status; Region_Control *the_region; if ( !rtems_is_name_valid( name ) ) 116dc2: 85 f6 test %esi,%esi 116dc4: 0f 84 92 00 00 00 je 116e5c return RTEMS_INVALID_NAME; if ( !starting_address ) 116dca: 85 db test %ebx,%ebx 116dcc: 74 09 je 116dd7 return RTEMS_INVALID_ADDRESS; if ( !id ) 116dce: 85 ff test %edi,%edi 116dd0: 74 05 je 116dd7 return RTEMS_INVALID_ADDRESS; if ( !_Addresses_Is_aligned( starting_address ) ) 116dd2: f6 c3 03 test $0x3,%bl 116dd5: 74 0d je 116de4 return_status = RTEMS_SUCCESSFUL; } } _RTEMS_Unlock_allocator(); return return_status; 116dd7: b8 09 00 00 00 mov $0x9,%eax } 116ddc: 8d 65 f4 lea -0xc(%ebp),%esp 116ddf: 5b pop %ebx 116de0: 5e pop %esi 116de1: 5f pop %edi 116de2: c9 leave 116de3: c3 ret return RTEMS_INVALID_ADDRESS; if ( !_Addresses_Is_aligned( starting_address ) ) return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); /* to prevent deletion */ 116de4: 83 ec 0c sub $0xc,%esp 116de7: ff 35 70 1c 14 00 pushl 0x141c70 116ded: e8 4a 25 00 00 call 11933c <_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 ); 116df2: c7 04 24 c0 1a 14 00 movl $0x141ac0,(%esp) 116df9: e8 6e 39 00 00 call 11a76c <_Objects_Allocate> 116dfe: 89 c2 mov %eax,%edx the_region = _Region_Allocate(); if ( !the_region ) 116e00: 83 c4 10 add $0x10,%esp 116e03: 85 c0 test %eax,%eax 116e05: 74 65 je 116e6c return_status = RTEMS_TOO_MANY; else { the_region->maximum_segment_size = _Heap_Initialize( 116e07: ff 75 14 pushl 0x14(%ebp) 116e0a: ff 75 10 pushl 0x10(%ebp) 116e0d: 53 push %ebx 116e0e: 8d 40 68 lea 0x68(%eax),%eax 116e11: 50 push %eax 116e12: 89 55 e4 mov %edx,-0x1c(%ebp) 116e15: e8 36 34 00 00 call 11a250 <_Heap_Initialize> 116e1a: 8b 55 e4 mov -0x1c(%ebp),%edx 116e1d: 89 42 5c mov %eax,0x5c(%edx) &the_region->Memory, starting_address, length, page_size ); if ( !the_region->maximum_segment_size ) { 116e20: 83 c4 10 add $0x10,%esp 116e23: 85 c0 test %eax,%eax 116e25: 75 4d jne 116e74 */ RTEMS_INLINE_ROUTINE void _Region_Free ( Region_Control *the_region ) { _Objects_Free( &_Region_Information, &the_region->Object ); 116e27: 83 ec 08 sub $0x8,%esp 116e2a: 52 push %edx 116e2b: 68 c0 1a 14 00 push $0x141ac0 116e30: e8 b7 3c 00 00 call 11aaec <_Objects_Free> 116e35: b8 08 00 00 00 mov $0x8,%eax 116e3a: 83 c4 10 add $0x10,%esp *id = the_region->Object.id; return_status = RTEMS_SUCCESSFUL; } } _RTEMS_Unlock_allocator(); 116e3d: 83 ec 0c sub $0xc,%esp 116e40: ff 35 70 1c 14 00 pushl 0x141c70 116e46: 89 45 e4 mov %eax,-0x1c(%ebp) 116e49: e8 36 25 00 00 call 119384 <_API_Mutex_Unlock> <== ALWAYS TAKEN return return_status; 116e4e: 83 c4 10 add $0x10,%esp 116e51: 8b 45 e4 mov -0x1c(%ebp),%eax } 116e54: 8d 65 f4 lea -0xc(%ebp),%esp 116e57: 5b pop %ebx 116e58: 5e pop %esi 116e59: 5f pop %edi 116e5a: c9 leave 116e5b: c3 ret ) { rtems_status_code return_status; Region_Control *the_region; if ( !rtems_is_name_valid( name ) ) 116e5c: b8 03 00 00 00 mov $0x3,%eax } } _RTEMS_Unlock_allocator(); return return_status; } 116e61: 8d 65 f4 lea -0xc(%ebp),%esp 116e64: 5b pop %ebx 116e65: 5e pop %esi 116e66: 5f pop %edi 116e67: c9 leave 116e68: c3 ret 116e69: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED _RTEMS_Lock_allocator(); /* to prevent deletion */ the_region = _Region_Allocate(); if ( !the_region ) 116e6c: b8 05 00 00 00 mov $0x5,%eax 116e71: eb ca jmp 116e3d <== ALWAYS TAKEN 116e73: 90 nop <== NOT EXECUTED return_status = RTEMS_INVALID_SIZE; } else { the_region->starting_address = starting_address; 116e74: 89 5a 50 mov %ebx,0x50(%edx) the_region->length = length; 116e77: 8b 45 10 mov 0x10(%ebp),%eax 116e7a: 89 42 54 mov %eax,0x54(%edx) the_region->page_size = page_size; 116e7d: 8b 45 14 mov 0x14(%ebp),%eax 116e80: 89 42 58 mov %eax,0x58(%edx) the_region->attribute_set = attribute_set; 116e83: 8b 45 18 mov 0x18(%ebp),%eax 116e86: 89 42 60 mov %eax,0x60(%edx) the_region->number_of_used_blocks = 0; 116e89: c7 42 64 00 00 00 00 movl $0x0,0x64(%edx) _Thread_queue_Initialize( 116e90: 6a 06 push $0x6 116e92: 6a 40 push $0x40 116e94: 8b 45 18 mov 0x18(%ebp),%eax 116e97: c1 e8 02 shr $0x2,%eax 116e9a: 83 e0 01 and $0x1,%eax 116e9d: 50 push %eax 116e9e: 8d 42 10 lea 0x10(%edx),%eax 116ea1: 50 push %eax 116ea2: 89 55 e4 mov %edx,-0x1c(%ebp) 116ea5: e8 2e 4e 00 00 call 11bcd8 <_Thread_queue_Initialize> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 116eaa: 8b 55 e4 mov -0x1c(%ebp),%edx 116ead: 8b 42 08 mov 0x8(%edx),%eax 116eb0: 0f b7 d8 movzwl %ax,%ebx 116eb3: 8b 0d dc 1a 14 00 mov 0x141adc,%ecx 116eb9: 89 14 99 mov %edx,(%ecx,%ebx,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 116ebc: 89 72 0c mov %esi,0xc(%edx) &_Region_Information, &the_region->Object, (Objects_Name) name ); *id = the_region->Object.id; 116ebf: 89 07 mov %eax,(%edi) 116ec1: 31 c0 xor %eax,%eax 116ec3: 83 c4 10 add $0x10,%esp 116ec6: e9 72 ff ff ff jmp 116e3d <== ALWAYS TAKEN 00116ecc : */ rtems_status_code rtems_region_delete( rtems_id id ) { 116ecc: 55 push %ebp 116ecd: 89 e5 mov %esp,%ebp 116ecf: 53 push %ebx 116ed0: 83 ec 30 sub $0x30,%esp Objects_Locations location; rtems_status_code return_status; Region_Control *the_region; _RTEMS_Lock_allocator(); 116ed3: ff 35 70 1c 14 00 pushl 0x141c70 116ed9: e8 5e 24 00 00 call 11933c <_API_Mutex_Lock> RTEMS_INLINE_ROUTINE Region_Control *_Region_Get ( Objects_Id id, Objects_Locations *location ) { return (Region_Control *) 116ede: 83 c4 0c add $0xc,%esp 116ee1: 8d 45 f4 lea -0xc(%ebp),%eax 116ee4: 50 push %eax 116ee5: ff 75 08 pushl 0x8(%ebp) 116ee8: 68 c0 1a 14 00 push $0x141ac0 116eed: e8 2a 3d 00 00 call 11ac1c <_Objects_Get_no_protection> the_region = _Region_Get( id, &location ); switch ( location ) { 116ef2: 83 c4 10 add $0x10,%esp 116ef5: 8b 5d f4 mov -0xc(%ebp),%ebx 116ef8: 85 db test %ebx,%ebx 116efa: 74 1c je 116f18 116efc: bb 04 00 00 00 mov $0x4,%ebx default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 116f01: 83 ec 0c sub $0xc,%esp 116f04: ff 35 70 1c 14 00 pushl 0x141c70 116f0a: e8 75 24 00 00 call 119384 <_API_Mutex_Unlock> return return_status; } 116f0f: 89 d8 mov %ebx,%eax 116f11: 8b 5d fc mov -0x4(%ebp),%ebx 116f14: c9 leave 116f15: c3 ret 116f16: 66 90 xchg %ax,%ax <== NOT EXECUTED the_region = _Region_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: _Region_Debug_Walk( the_region, 5 ); if ( the_region->number_of_used_blocks != 0 ) 116f18: 8b 48 64 mov 0x64(%eax),%ecx 116f1b: 85 c9 test %ecx,%ecx 116f1d: 74 09 je 116f28 116f1f: bb 0c 00 00 00 mov $0xc,%ebx 116f24: eb db jmp 116f01 <== ALWAYS TAKEN 116f26: 66 90 xchg %ax,%ax <== NOT EXECUTED return_status = RTEMS_RESOURCE_IN_USE; else { _Objects_Close( &_Region_Information, &the_region->Object ); 116f28: 83 ec 08 sub $0x8,%esp 116f2b: 50 push %eax 116f2c: 68 c0 1a 14 00 push $0x141ac0 116f31: 89 45 e4 mov %eax,-0x1c(%ebp) 116f34: e8 af 38 00 00 call 11a7e8 <_Objects_Close> */ RTEMS_INLINE_ROUTINE void _Region_Free ( Region_Control *the_region ) { _Objects_Free( &_Region_Information, &the_region->Object ); 116f39: 58 pop %eax 116f3a: 5a pop %edx 116f3b: 8b 45 e4 mov -0x1c(%ebp),%eax 116f3e: 50 push %eax 116f3f: 68 c0 1a 14 00 push $0x141ac0 116f44: e8 a3 3b 00 00 call 11aaec <_Objects_Free> 116f49: 31 db xor %ebx,%ebx 116f4b: 83 c4 10 add $0x10,%esp 116f4e: eb b1 jmp 116f01 <== ALWAYS TAKEN 00116f50 : rtems_status_code rtems_region_extend( rtems_id id, void *starting_address, uintptr_t length ) { 116f50: 55 push %ebp 116f51: 89 e5 mov %esp,%ebp 116f53: 56 push %esi 116f54: 53 push %ebx 116f55: 83 ec 10 sub $0x10,%esp 116f58: 8b 5d 0c mov 0xc(%ebp),%ebx Heap_Extend_status heap_status; Objects_Locations location; rtems_status_code return_status; Region_Control *the_region; if ( !starting_address ) 116f5b: 85 db test %ebx,%ebx 116f5d: 74 71 je 116fd0 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); /* to prevent deletion */ 116f5f: 83 ec 0c sub $0xc,%esp 116f62: ff 35 70 1c 14 00 pushl 0x141c70 116f68: e8 cf 23 00 00 call 11933c <_API_Mutex_Lock> RTEMS_INLINE_ROUTINE Region_Control *_Region_Get ( Objects_Id id, Objects_Locations *location ) { return (Region_Control *) 116f6d: 83 c4 0c add $0xc,%esp 116f70: 8d 45 f0 lea -0x10(%ebp),%eax 116f73: 50 push %eax 116f74: ff 75 08 pushl 0x8(%ebp) 116f77: 68 c0 1a 14 00 push $0x141ac0 116f7c: e8 9b 3c 00 00 call 11ac1c <_Objects_Get_no_protection> 116f81: 89 c6 mov %eax,%esi the_region = _Region_Get( id, &location ); switch ( location ) { 116f83: 83 c4 10 add $0x10,%esp 116f86: 8b 45 f0 mov -0x10(%ebp),%eax 116f89: 85 c0 test %eax,%eax 116f8b: 74 1f je 116fac 116f8d: bb 04 00 00 00 mov $0x4,%ebx default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 116f92: 83 ec 0c sub $0xc,%esp 116f95: ff 35 70 1c 14 00 pushl 0x141c70 116f9b: e8 e4 23 00 00 call 119384 <_API_Mutex_Unlock> return return_status; 116fa0: 83 c4 10 add $0x10,%esp } 116fa3: 89 d8 mov %ebx,%eax 116fa5: 8d 65 f8 lea -0x8(%ebp),%esp 116fa8: 5b pop %ebx 116fa9: 5e pop %esi 116faa: c9 leave 116fab: c3 ret the_region = _Region_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: heap_status = _Heap_Extend( 116fac: 8d 45 f4 lea -0xc(%ebp),%eax 116faf: 50 push %eax 116fb0: ff 75 10 pushl 0x10(%ebp) 116fb3: 53 push %ebx 116fb4: 8d 46 68 lea 0x68(%esi),%eax 116fb7: 50 push %eax 116fb8: e8 9b 2f 00 00 call 119f58 <_Heap_Extend> starting_address, length, &amount_extended ); if ( heap_status == HEAP_EXTEND_SUCCESSFUL ) { 116fbd: 83 c4 10 add $0x10,%esp 116fc0: 85 c0 test %eax,%eax 116fc2: 74 18 je 116fdc the_region->length += amount_extended; the_region->maximum_segment_size += amount_extended; return_status = RTEMS_SUCCESSFUL; } else if ( heap_status == HEAP_EXTEND_ERROR ) { 116fc4: 48 dec %eax 116fc5: 74 25 je 116fec 116fc7: bb 18 00 00 00 mov $0x18,%ebx 116fcc: eb c4 jmp 116f92 <== ALWAYS TAKEN 116fce: 66 90 xchg %ax,%ax <== NOT EXECUTED Heap_Extend_status heap_status; Objects_Locations location; rtems_status_code return_status; Region_Control *the_region; if ( !starting_address ) 116fd0: b3 09 mov $0x9,%bl break; } _RTEMS_Unlock_allocator(); return return_status; } 116fd2: 89 d8 mov %ebx,%eax 116fd4: 8d 65 f8 lea -0x8(%ebp),%esp 116fd7: 5b pop %ebx 116fd8: 5e pop %esi 116fd9: c9 leave 116fda: c3 ret 116fdb: 90 nop <== NOT EXECUTED length, &amount_extended ); if ( heap_status == HEAP_EXTEND_SUCCESSFUL ) { the_region->length += amount_extended; 116fdc: 8b 45 f4 mov -0xc(%ebp),%eax 116fdf: 01 46 54 add %eax,0x54(%esi) the_region->maximum_segment_size += amount_extended; 116fe2: 01 46 5c add %eax,0x5c(%esi) 116fe5: 31 db xor %ebx,%ebx 116fe7: eb a9 jmp 116f92 <== ALWAYS TAKEN 116fe9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED return_status = RTEMS_SUCCESSFUL; } else if ( heap_status == HEAP_EXTEND_ERROR ) { 116fec: bb 09 00 00 00 mov $0x9,%ebx 116ff1: eb 9f jmp 116f92 <== ALWAYS TAKEN 00116ff4 : rtems_status_code rtems_region_get_free_information( rtems_id id, Heap_Information_block *the_info ) { 116ff4: 55 push %ebp 116ff5: 89 e5 mov %esp,%ebp 116ff7: 53 push %ebx 116ff8: 83 ec 14 sub $0x14,%esp 116ffb: 8b 5d 0c mov 0xc(%ebp),%ebx Objects_Locations location; rtems_status_code return_status; register Region_Control *the_region; if ( !the_info ) 116ffe: 85 db test %ebx,%ebx 117000: 74 76 je 117078 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); 117002: 83 ec 0c sub $0xc,%esp 117005: ff 35 70 1c 14 00 pushl 0x141c70 11700b: e8 2c 23 00 00 call 11933c <_API_Mutex_Lock> 117010: 83 c4 0c add $0xc,%esp 117013: 8d 45 f4 lea -0xc(%ebp),%eax 117016: 50 push %eax 117017: ff 75 08 pushl 0x8(%ebp) 11701a: 68 c0 1a 14 00 push $0x141ac0 11701f: e8 f8 3b 00 00 call 11ac1c <_Objects_Get_no_protection> the_region = _Region_Get( id, &location ); switch ( location ) { 117024: 83 c4 10 add $0x10,%esp 117027: 8b 55 f4 mov -0xc(%ebp),%edx 11702a: 85 d2 test %edx,%edx 11702c: 74 1e je 11704c 11702e: bb 04 00 00 00 mov $0x4,%ebx default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 117033: 83 ec 0c sub $0xc,%esp 117036: ff 35 70 1c 14 00 pushl 0x141c70 11703c: e8 43 23 00 00 call 119384 <_API_Mutex_Unlock> return return_status; 117041: 83 c4 10 add $0x10,%esp } 117044: 89 d8 mov %ebx,%eax 117046: 8b 5d fc mov -0x4(%ebp),%ebx 117049: c9 leave 11704a: c3 ret 11704b: 90 nop <== NOT EXECUTED the_region = _Region_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: the_info->Used.number = 0; 11704c: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx) the_info->Used.total = 0; 117053: c7 43 14 00 00 00 00 movl $0x0,0x14(%ebx) the_info->Used.largest = 0; 11705a: c7 43 10 00 00 00 00 movl $0x0,0x10(%ebx) _Heap_Get_free_information( &the_region->Memory, &the_info->Free ); 117061: 83 ec 08 sub $0x8,%esp 117064: 53 push %ebx 117065: 83 c0 68 add $0x68,%eax 117068: 50 push %eax 117069: e8 fa 30 00 00 call 11a168 <_Heap_Get_free_information> 11706e: 31 db xor %ebx,%ebx return_status = RTEMS_SUCCESSFUL; break; 117070: 83 c4 10 add $0x10,%esp 117073: eb be jmp 117033 <== ALWAYS TAKEN 117075: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED { Objects_Locations location; rtems_status_code return_status; register Region_Control *the_region; if ( !the_info ) 117078: b3 09 mov $0x9,%bl break; } _RTEMS_Unlock_allocator(); return return_status; } 11707a: 89 d8 mov %ebx,%eax 11707c: 8b 5d fc mov -0x4(%ebp),%ebx 11707f: c9 leave 117080: c3 ret 00117084 : rtems_status_code rtems_region_get_information( rtems_id id, Heap_Information_block *the_info ) { 117084: 55 push %ebp 117085: 89 e5 mov %esp,%ebp 117087: 53 push %ebx 117088: 83 ec 14 sub $0x14,%esp 11708b: 8b 5d 0c mov 0xc(%ebp),%ebx Objects_Locations location; rtems_status_code return_status; register Region_Control *the_region; if ( !the_info ) 11708e: 85 db test %ebx,%ebx 117090: 74 5e je 1170f0 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); 117092: 83 ec 0c sub $0xc,%esp 117095: ff 35 70 1c 14 00 pushl 0x141c70 11709b: e8 9c 22 00 00 call 11933c <_API_Mutex_Lock> 1170a0: 83 c4 0c add $0xc,%esp 1170a3: 8d 45 f4 lea -0xc(%ebp),%eax 1170a6: 50 push %eax 1170a7: ff 75 08 pushl 0x8(%ebp) 1170aa: 68 c0 1a 14 00 push $0x141ac0 1170af: e8 68 3b 00 00 call 11ac1c <_Objects_Get_no_protection> the_region = _Region_Get( id, &location ); switch ( location ) { 1170b4: 83 c4 10 add $0x10,%esp 1170b7: 8b 55 f4 mov -0xc(%ebp),%edx 1170ba: 85 d2 test %edx,%edx 1170bc: 74 1e je 1170dc 1170be: bb 04 00 00 00 mov $0x4,%ebx default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 1170c3: 83 ec 0c sub $0xc,%esp 1170c6: ff 35 70 1c 14 00 pushl 0x141c70 1170cc: e8 b3 22 00 00 call 119384 <_API_Mutex_Unlock> return return_status; 1170d1: 83 c4 10 add $0x10,%esp } 1170d4: 89 d8 mov %ebx,%eax 1170d6: 8b 5d fc mov -0x4(%ebp),%ebx 1170d9: c9 leave 1170da: c3 ret 1170db: 90 nop <== NOT EXECUTED the_region = _Region_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: _Heap_Get_information( &the_region->Memory, the_info ); 1170dc: 83 ec 08 sub $0x8,%esp 1170df: 53 push %ebx 1170e0: 83 c0 68 add $0x68,%eax 1170e3: 50 push %eax 1170e4: e8 d7 30 00 00 call 11a1c0 <_Heap_Get_information> 1170e9: 31 db xor %ebx,%ebx return_status = RTEMS_SUCCESSFUL; break; 1170eb: 83 c4 10 add $0x10,%esp 1170ee: eb d3 jmp 1170c3 <== ALWAYS TAKEN { Objects_Locations location; rtems_status_code return_status; register Region_Control *the_region; if ( !the_info ) 1170f0: b3 09 mov $0x9,%bl break; } _RTEMS_Unlock_allocator(); return return_status; } 1170f2: 89 d8 mov %ebx,%eax 1170f4: 8b 5d fc mov -0x4(%ebp),%ebx 1170f7: c9 leave 1170f8: c3 ret 001170fc : uintptr_t size, rtems_option option_set, rtems_interval timeout, void **segment ) { 1170fc: 55 push %ebp 1170fd: 89 e5 mov %esp,%ebp 1170ff: 57 push %edi 117100: 56 push %esi 117101: 53 push %ebx 117102: 83 ec 2c sub $0x2c,%esp 117105: 8b 75 0c mov 0xc(%ebp),%esi 117108: 8b 5d 18 mov 0x18(%ebp),%ebx Objects_Locations location; rtems_status_code return_status; Region_Control *the_region; void *the_segment; if ( !segment ) 11710b: 85 db test %ebx,%ebx 11710d: 0f 84 a1 00 00 00 je 1171b4 return RTEMS_INVALID_ADDRESS; *segment = NULL; 117113: c7 03 00 00 00 00 movl $0x0,(%ebx) if ( size == 0 ) 117119: 85 f6 test %esi,%esi 11711b: 75 0f jne 11712c 11711d: b8 08 00 00 00 mov $0x8,%eax break; } _RTEMS_Unlock_allocator(); return return_status; } 117122: 8d 65 f4 lea -0xc(%ebp),%esp 117125: 5b pop %ebx 117126: 5e pop %esi 117127: 5f pop %edi 117128: c9 leave 117129: c3 ret 11712a: 66 90 xchg %ax,%ax <== NOT EXECUTED *segment = NULL; if ( size == 0 ) return RTEMS_INVALID_SIZE; _RTEMS_Lock_allocator(); 11712c: 83 ec 0c sub $0xc,%esp 11712f: ff 35 70 1c 14 00 pushl 0x141c70 117135: e8 02 22 00 00 call 11933c <_API_Mutex_Lock> executing = _Thread_Executing; 11713a: a1 78 1c 14 00 mov 0x141c78,%eax 11713f: 89 45 d4 mov %eax,-0x2c(%ebp) 117142: 83 c4 0c add $0xc,%esp 117145: 8d 45 e4 lea -0x1c(%ebp),%eax 117148: 50 push %eax 117149: ff 75 08 pushl 0x8(%ebp) 11714c: 68 c0 1a 14 00 push $0x141ac0 117151: e8 c6 3a 00 00 call 11ac1c <_Objects_Get_no_protection> 117156: 89 c7 mov %eax,%edi the_region = _Region_Get( id, &location ); switch ( location ) { 117158: 83 c4 10 add $0x10,%esp 11715b: 8b 45 e4 mov -0x1c(%ebp),%eax 11715e: 85 c0 test %eax,%eax 117160: 75 2a jne 11718c case OBJECTS_LOCAL: if ( size > the_region->maximum_segment_size ) 117162: 3b 77 5c cmp 0x5c(%edi),%esi 117165: 76 2d jbe 117194 117167: b8 08 00 00 00 mov $0x8,%eax default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 11716c: 83 ec 0c sub $0xc,%esp 11716f: ff 35 70 1c 14 00 pushl 0x141c70 117175: 89 45 d0 mov %eax,-0x30(%ebp) 117178: e8 07 22 00 00 call 119384 <_API_Mutex_Unlock> return return_status; 11717d: 83 c4 10 add $0x10,%esp 117180: 8b 45 d0 mov -0x30(%ebp),%eax } 117183: 8d 65 f4 lea -0xc(%ebp),%esp 117186: 5b pop %ebx 117187: 5e pop %esi 117188: 5f pop %edi 117189: c9 leave 11718a: c3 ret 11718b: 90 nop <== NOT EXECUTED _Thread_queue_Enqueue( &the_region->Wait_queue, timeout ); _Thread_Enable_dispatch(); return (rtems_status_code) executing->Wait.return_code; 11718c: b8 04 00 00 00 mov $0x4,%eax 117191: eb d9 jmp 11716c <== ALWAYS TAKEN 117193: 90 nop <== NOT EXECUTED * @brief See _Heap_Allocate_aligned_with_boundary() with alignment and * boundary equals zero. */ RTEMS_INLINE_ROUTINE void *_Heap_Allocate( Heap_Control *heap, uintptr_t size ) { return _Heap_Allocate_aligned_with_boundary( heap, size, 0, 0 ); 117194: 6a 00 push $0x0 117196: 6a 00 push $0x0 117198: 56 push %esi 117199: 8d 47 68 lea 0x68(%edi),%eax 11719c: 50 push %eax 11719d: e8 02 2c 00 00 call 119da4 <_Heap_Allocate_aligned_with_boundary> the_segment = _Region_Allocate_segment( the_region, size ); _Region_Debug_Walk( the_region, 2 ); if ( the_segment ) { 1171a2: 83 c4 10 add $0x10,%esp 1171a5: 85 c0 test %eax,%eax 1171a7: 74 17 je 1171c0 the_region->number_of_used_blocks += 1; 1171a9: ff 47 64 incl 0x64(%edi) *segment = the_segment; 1171ac: 89 03 mov %eax,(%ebx) 1171ae: 31 c0 xor %eax,%eax 1171b0: eb ba jmp 11716c <== ALWAYS TAKEN 1171b2: 66 90 xchg %ax,%ax <== NOT EXECUTED Objects_Locations location; rtems_status_code return_status; Region_Control *the_region; void *the_segment; if ( !segment ) 1171b4: b8 09 00 00 00 mov $0x9,%eax 1171b9: e9 64 ff ff ff jmp 117122 <== ALWAYS TAKEN 1171be: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( the_segment ) { the_region->number_of_used_blocks += 1; *segment = the_segment; return_status = RTEMS_SUCCESSFUL; } else if ( _Options_Is_no_wait( option_set ) ) { 1171c0: f6 45 10 01 testb $0x1,0x10(%ebp) 1171c4: 74 07 je 1171cd 1171c6: b8 0d 00 00 00 mov $0xd,%eax 1171cb: eb 9f jmp 11716c <== ALWAYS TAKEN rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 1171cd: a1 b8 1b 14 00 mov 0x141bb8,%eax 1171d2: 40 inc %eax 1171d3: a3 b8 1b 14 00 mov %eax,0x141bb8 * 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(); 1171d8: 83 ec 0c sub $0xc,%esp 1171db: ff 35 70 1c 14 00 pushl 0x141c70 1171e1: e8 9e 21 00 00 call 119384 <_API_Mutex_Unlock> executing->Wait.queue = &the_region->Wait_queue; 1171e6: 8d 47 10 lea 0x10(%edi),%eax 1171e9: 8b 55 d4 mov -0x2c(%ebp),%edx 1171ec: 89 42 44 mov %eax,0x44(%edx) executing->Wait.id = id; 1171ef: 8b 4d 08 mov 0x8(%ebp),%ecx 1171f2: 89 4a 20 mov %ecx,0x20(%edx) executing->Wait.count = size; 1171f5: 89 72 24 mov %esi,0x24(%edx) executing->Wait.return_argument = segment; 1171f8: 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; 1171fb: c7 47 40 01 00 00 00 movl $0x1,0x40(%edi) _Thread_queue_Enter_critical_section( &the_region->Wait_queue ); _Thread_queue_Enqueue( &the_region->Wait_queue, timeout ); 117202: 83 c4 0c add $0xc,%esp 117205: 68 88 bd 11 00 push $0x11bd88 11720a: ff 75 14 pushl 0x14(%ebp) 11720d: 50 push %eax 11720e: e8 65 48 00 00 call 11ba78 <_Thread_queue_Enqueue_with_handler> _Thread_Enable_dispatch(); 117213: e8 24 43 00 00 call 11b53c <_Thread_Enable_dispatch> return (rtems_status_code) executing->Wait.return_code; 117218: 8b 55 d4 mov -0x2c(%ebp),%edx 11721b: 8b 42 34 mov 0x34(%edx),%eax 11721e: 83 c4 10 add $0x10,%esp 117221: e9 fc fe ff ff jmp 117122 <== ALWAYS TAKEN 00117228 : rtems_status_code rtems_region_get_segment_size( rtems_id id, void *segment, uintptr_t *size ) { 117228: 55 push %ebp 117229: 89 e5 mov %esp,%ebp 11722b: 56 push %esi 11722c: 53 push %ebx 11722d: 83 ec 20 sub $0x20,%esp 117230: 8b 5d 0c mov 0xc(%ebp),%ebx 117233: 8b 75 10 mov 0x10(%ebp),%esi Objects_Locations location; rtems_status_code return_status = RTEMS_SUCCESSFUL; register Region_Control *the_region; if ( !segment ) 117236: 85 db test %ebx,%ebx 117238: 74 72 je 1172ac return RTEMS_INVALID_ADDRESS; if ( !size ) 11723a: 85 f6 test %esi,%esi 11723c: 74 6e je 1172ac return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); 11723e: 83 ec 0c sub $0xc,%esp 117241: ff 35 70 1c 14 00 pushl 0x141c70 117247: e8 f0 20 00 00 call 11933c <_API_Mutex_Lock> 11724c: 83 c4 0c add $0xc,%esp 11724f: 8d 45 f4 lea -0xc(%ebp),%eax 117252: 50 push %eax 117253: ff 75 08 pushl 0x8(%ebp) 117256: 68 c0 1a 14 00 push $0x141ac0 11725b: e8 bc 39 00 00 call 11ac1c <_Objects_Get_no_protection> the_region = _Region_Get( id, &location ); switch ( location ) { 117260: 83 c4 10 add $0x10,%esp 117263: 8b 55 f4 mov -0xc(%ebp),%edx 117266: 85 d2 test %edx,%edx 117268: 75 36 jne 1172a0 case OBJECTS_LOCAL: if ( !_Heap_Size_of_alloc_area( &the_region->Memory, segment, size ) ) 11726a: 52 push %edx 11726b: 56 push %esi 11726c: 53 push %ebx 11726d: 83 c0 68 add $0x68,%eax 117270: 50 push %eax 117271: e8 0a 34 00 00 call 11a680 <_Heap_Size_of_alloc_area> 117276: 83 c4 10 add $0x10,%esp 117279: 84 c0 test %al,%al 11727b: 74 3b je 1172b8 <== ALWAYS TAKEN 11727d: 31 c0 xor %eax,%eax case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 11727f: 83 ec 0c sub $0xc,%esp 117282: ff 35 70 1c 14 00 pushl 0x141c70 117288: 89 45 e4 mov %eax,-0x1c(%ebp) 11728b: e8 f4 20 00 00 call 119384 <_API_Mutex_Unlock> return return_status; 117290: 83 c4 10 add $0x10,%esp 117293: 8b 45 e4 mov -0x1c(%ebp),%eax } 117296: 8d 65 f8 lea -0x8(%ebp),%esp 117299: 5b pop %ebx 11729a: 5e pop %esi 11729b: c9 leave 11729c: c3 ret 11729d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); the_region = _Region_Get( id, &location ); switch ( location ) { 1172a0: 4a dec %edx 1172a1: 75 da jne 11727d <== ALWAYS TAKEN 1172a3: b8 04 00 00 00 mov $0x4,%eax 1172a8: eb d5 jmp 11727f <== ALWAYS TAKEN 1172aa: 66 90 xchg %ax,%ax <== NOT EXECUTED return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); return return_status; 1172ac: b8 09 00 00 00 mov $0x9,%eax } 1172b1: 8d 65 f8 lea -0x8(%ebp),%esp 1172b4: 5b pop %ebx 1172b5: 5e pop %esi 1172b6: c9 leave 1172b7: c3 ret the_region = _Region_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_Heap_Size_of_alloc_area( &the_region->Memory, segment, size ) ) 1172b8: b8 09 00 00 00 mov $0x9,%eax <== NOT EXECUTED 1172bd: eb c0 jmp 11727f <== NOT EXECUTED 001172e4 : rtems_id id, void *segment, uintptr_t size, uintptr_t *old_size ) { 1172e4: 55 push %ebp 1172e5: 89 e5 mov %esp,%ebp 1172e7: 56 push %esi 1172e8: 53 push %ebx 1172e9: 83 ec 20 sub $0x20,%esp 1172ec: 8b 5d 14 mov 0x14(%ebp),%ebx uintptr_t osize; rtems_status_code return_status; Heap_Resize_status status; register Region_Control *the_region; if ( !old_size ) 1172ef: 85 db test %ebx,%ebx 1172f1: 0f 84 a5 00 00 00 je 11739c return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); 1172f7: 83 ec 0c sub $0xc,%esp 1172fa: ff 35 70 1c 14 00 pushl 0x141c70 117300: e8 37 20 00 00 call 11933c <_API_Mutex_Lock> 117305: 83 c4 0c add $0xc,%esp 117308: 8d 45 f0 lea -0x10(%ebp),%eax 11730b: 50 push %eax 11730c: ff 75 08 pushl 0x8(%ebp) 11730f: 68 c0 1a 14 00 push $0x141ac0 117314: e8 03 39 00 00 call 11ac1c <_Objects_Get_no_protection> 117319: 89 c6 mov %eax,%esi the_region = _Region_Get( id, &location ); switch ( location ) { 11731b: 83 c4 10 add $0x10,%esp 11731e: 8b 45 f0 mov -0x10(%ebp),%eax 117321: 85 c0 test %eax,%eax 117323: 74 1f je 117344 default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 117325: 83 ec 0c sub $0xc,%esp 117328: ff 35 70 1c 14 00 pushl 0x141c70 11732e: e8 51 20 00 00 call 119384 <_API_Mutex_Unlock> 117333: b8 04 00 00 00 mov $0x4,%eax return return_status; 117338: 83 c4 10 add $0x10,%esp } 11733b: 8d 65 f8 lea -0x8(%ebp),%esp 11733e: 5b pop %ebx 11733f: 5e pop %esi 117340: c9 leave 117341: c3 ret 117342: 66 90 xchg %ax,%ax <== NOT EXECUTED case OBJECTS_LOCAL: _Region_Debug_Walk( the_region, 7 ); status = _Heap_Resize_block( 117344: 83 ec 0c sub $0xc,%esp 117347: 8d 45 f4 lea -0xc(%ebp),%eax 11734a: 50 push %eax 11734b: 8d 45 ec lea -0x14(%ebp),%eax 11734e: 50 push %eax 11734f: ff 75 10 pushl 0x10(%ebp) 117352: ff 75 0c pushl 0xc(%ebp) 117355: 8d 46 68 lea 0x68(%esi),%eax 117358: 50 push %eax 117359: e8 16 32 00 00 call 11a574 <_Heap_Resize_block> segment, (uint32_t) size, &osize, &avail_size ); *old_size = (uint32_t) osize; 11735e: 8b 55 ec mov -0x14(%ebp),%edx 117361: 89 13 mov %edx,(%ebx) _Region_Debug_Walk( the_region, 8 ); if ( status == HEAP_RESIZE_SUCCESSFUL ) 117363: 83 c4 20 add $0x20,%esp 117366: 85 c0 test %eax,%eax 117368: 75 16 jne 117380 _Region_Process_queue( the_region ); /* unlocks allocator */ 11736a: 83 ec 0c sub $0xc,%esp 11736d: 56 push %esi 11736e: e8 8d 77 00 00 call 11eb00 <_Region_Process_queue> 117373: 31 c0 xor %eax,%eax 117375: 83 c4 10 add $0x10,%esp break; } _RTEMS_Unlock_allocator(); return return_status; } 117378: 8d 65 f8 lea -0x8(%ebp),%esp 11737b: 5b pop %ebx 11737c: 5e pop %esi 11737d: c9 leave 11737e: c3 ret 11737f: 90 nop <== NOT EXECUTED _Region_Debug_Walk( the_region, 8 ); if ( status == HEAP_RESIZE_SUCCESSFUL ) _Region_Process_queue( the_region ); /* unlocks allocator */ else _RTEMS_Unlock_allocator(); 117380: 83 ec 0c sub $0xc,%esp 117383: ff 35 70 1c 14 00 pushl 0x141c70 117389: 89 45 e4 mov %eax,-0x1c(%ebp) 11738c: e8 f3 1f 00 00 call 119384 <_API_Mutex_Unlock> if (status == HEAP_RESIZE_SUCCESSFUL) return RTEMS_SUCCESSFUL; if (status == HEAP_RESIZE_UNSATISFIED) 117391: 83 c4 10 add $0x10,%esp 117394: 8b 45 e4 mov -0x1c(%ebp),%eax 117397: 83 f8 01 cmp $0x1,%eax 11739a: 74 0c je 1173a8 return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); return return_status; 11739c: b8 09 00 00 00 mov $0x9,%eax } 1173a1: 8d 65 f8 lea -0x8(%ebp),%esp 1173a4: 5b pop %ebx 1173a5: 5e pop %esi 1173a6: c9 leave 1173a7: c3 ret _RTEMS_Unlock_allocator(); if (status == HEAP_RESIZE_SUCCESSFUL) return RTEMS_SUCCESSFUL; if (status == HEAP_RESIZE_UNSATISFIED) 1173a8: b0 0d mov $0xd,%al 1173aa: eb 8f jmp 11733b <== ALWAYS TAKEN 001173ac : rtems_status_code rtems_region_return_segment( rtems_id id, void *segment ) { 1173ac: 55 push %ebp 1173ad: 89 e5 mov %esp,%ebp 1173af: 53 push %ebx 1173b0: 83 ec 20 sub $0x20,%esp uint32_t size; #endif int status; register Region_Control *the_region; _RTEMS_Lock_allocator(); 1173b3: ff 35 70 1c 14 00 pushl 0x141c70 1173b9: e8 7e 1f 00 00 call 11933c <_API_Mutex_Lock> 1173be: 83 c4 0c add $0xc,%esp 1173c1: 8d 45 f4 lea -0xc(%ebp),%eax 1173c4: 50 push %eax 1173c5: ff 75 08 pushl 0x8(%ebp) 1173c8: 68 c0 1a 14 00 push $0x141ac0 1173cd: e8 4a 38 00 00 call 11ac1c <_Objects_Get_no_protection> 1173d2: 89 c3 mov %eax,%ebx the_region = _Region_Get( id, &location ); switch ( location ) { 1173d4: 83 c4 10 add $0x10,%esp 1173d7: 8b 45 f4 mov -0xc(%ebp),%eax 1173da: 85 c0 test %eax,%eax 1173dc: 74 1e je 1173fc 1173de: bb 04 00 00 00 mov $0x4,%ebx default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 1173e3: 83 ec 0c sub $0xc,%esp 1173e6: ff 35 70 1c 14 00 pushl 0x141c70 1173ec: e8 93 1f 00 00 call 119384 <_API_Mutex_Unlock> return return_status; 1173f1: 83 c4 10 add $0x10,%esp } 1173f4: 89 d8 mov %ebx,%eax 1173f6: 8b 5d fc mov -0x4(%ebp),%ebx 1173f9: c9 leave 1173fa: c3 ret 1173fb: 90 nop <== NOT EXECUTED RTEMS_INLINE_ROUTINE bool _Region_Free_segment ( Region_Control *the_region, void *the_segment ) { return _Heap_Free( &the_region->Memory, the_segment ); 1173fc: 83 ec 08 sub $0x8,%esp 1173ff: ff 75 0c pushl 0xc(%ebp) 117402: 8d 43 68 lea 0x68(%ebx),%eax 117405: 50 push %eax 117406: e8 ed 2b 00 00 call 119ff8 <_Heap_Free> #endif status = _Region_Free_segment( the_region, segment ); _Region_Debug_Walk( the_region, 4 ); if ( !status ) 11740b: 83 c4 10 add $0x10,%esp 11740e: 84 c0 test %al,%al 117410: 75 0a jne 11741c else { the_region->number_of_used_blocks -= 1; _Region_Process_queue(the_region); /* unlocks allocator */ return RTEMS_SUCCESSFUL; 117412: bb 09 00 00 00 mov $0x9,%ebx 117417: eb ca jmp 1173e3 <== ALWAYS TAKEN 117419: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED _Region_Debug_Walk( the_region, 4 ); if ( !status ) return_status = RTEMS_INVALID_ADDRESS; else { the_region->number_of_used_blocks -= 1; 11741c: ff 4b 64 decl 0x64(%ebx) _Region_Process_queue(the_region); /* unlocks allocator */ 11741f: 83 ec 0c sub $0xc,%esp 117422: 53 push %ebx 117423: e8 d8 76 00 00 call 11eb00 <_Region_Process_queue> 117428: 31 db xor %ebx,%ebx return RTEMS_SUCCESSFUL; 11742a: 83 c4 10 add $0x10,%esp break; } _RTEMS_Unlock_allocator(); return return_status; } 11742d: 89 d8 mov %ebx,%eax 11742f: 8b 5d fc mov -0x4(%ebp),%ebx 117432: c9 leave 117433: c3 ret 0010b2e8 : uint32_t count, rtems_attribute attribute_set, rtems_task_priority priority_ceiling, rtems_id *id ) { 10b2e8: 55 push %ebp 10b2e9: 89 e5 mov %esp,%ebp 10b2eb: 57 push %edi 10b2ec: 56 push %esi 10b2ed: 53 push %ebx 10b2ee: 83 ec 3c sub $0x3c,%esp 10b2f1: 8b 75 08 mov 0x8(%ebp),%esi 10b2f4: 8b 5d 10 mov 0x10(%ebp),%ebx 10b2f7: 8b 7d 18 mov 0x18(%ebp),%edi register Semaphore_Control *the_semaphore; CORE_mutex_Attributes the_mutex_attr; CORE_semaphore_Attributes the_semaphore_attr; CORE_mutex_Status mutex_status; if ( !rtems_is_name_valid( name ) ) 10b2fa: 85 f6 test %esi,%esi 10b2fc: 74 4a je 10b348 return RTEMS_INVALID_NAME; if ( !id ) 10b2fe: 85 ff test %edi,%edi 10b300: 0f 84 f6 00 00 00 je 10b3fc return RTEMS_NOT_DEFINED; } else #endif if ( _Attributes_Is_inherit_priority( attribute_set ) || 10b306: 89 da mov %ebx,%edx 10b308: 81 e2 c0 00 00 00 and $0xc0,%edx 10b30e: 74 48 je 10b358 _Attributes_Is_priority_ceiling( attribute_set ) ) { if ( ! (_Attributes_Is_binary_semaphore( attribute_set ) && 10b310: 89 d8 mov %ebx,%eax 10b312: 83 e0 30 and $0x30,%eax 10b315: 83 f8 10 cmp $0x10,%eax 10b318: 74 0e je 10b328 name, 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; 10b31a: b8 0b 00 00 00 mov $0xb,%eax } 10b31f: 8d 65 f4 lea -0xc(%ebp),%esp 10b322: 5b pop %ebx 10b323: 5e pop %esi 10b324: 5f pop %edi 10b325: c9 leave 10b326: c3 ret 10b327: 90 nop <== NOT EXECUTED #endif if ( _Attributes_Is_inherit_priority( attribute_set ) || _Attributes_Is_priority_ceiling( attribute_set ) ) { if ( ! (_Attributes_Is_binary_semaphore( attribute_set ) && 10b328: f6 c3 04 test $0x4,%bl 10b32b: 74 ed je 10b31a _Attributes_Is_priority( attribute_set ) ) ) return RTEMS_NOT_DEFINED; } if ( _Attributes_Is_inherit_priority( attribute_set ) && 10b32d: 81 fa c0 00 00 00 cmp $0xc0,%edx 10b333: 74 e5 je 10b31a 10b335: b9 10 00 00 00 mov $0x10,%ecx _Attributes_Is_priority_ceiling( attribute_set ) ) return RTEMS_NOT_DEFINED; if ( !_Attributes_Is_counting_semaphore( attribute_set ) && ( count > 1 ) ) 10b33a: 83 7d 0c 01 cmpl $0x1,0xc(%ebp) 10b33e: 76 1f jbe 10b35f 10b340: b8 0a 00 00 00 mov $0xa,%eax 10b345: eb d8 jmp 10b31f <== ALWAYS TAKEN 10b347: 90 nop <== NOT EXECUTED 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 ) ) 10b348: b8 03 00 00 00 mov $0x3,%eax 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10b34d: 8d 65 f4 lea -0xc(%ebp),%esp 10b350: 5b pop %ebx 10b351: 5e pop %esi 10b352: 5f pop %edi 10b353: c9 leave 10b354: c3 ret 10b355: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if ( _Attributes_Is_inherit_priority( attribute_set ) && _Attributes_Is_priority_ceiling( attribute_set ) ) return RTEMS_NOT_DEFINED; if ( !_Attributes_Is_counting_semaphore( attribute_set ) && ( count > 1 ) ) 10b358: 89 d9 mov %ebx,%ecx 10b35a: 83 e1 30 and $0x30,%ecx 10b35d: 75 db jne 10b33a rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10b35f: a1 d8 73 12 00 mov 0x1273d8,%eax 10b364: 40 inc %eax 10b365: a3 d8 73 12 00 mov %eax,0x1273d8 * 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 ); 10b36a: 83 ec 0c sub $0xc,%esp 10b36d: 68 20 73 12 00 push $0x127320 10b372: 89 4d c4 mov %ecx,-0x3c(%ebp) 10b375: e8 16 14 00 00 call 10c790 <_Objects_Allocate> 10b37a: 89 c2 mov %eax,%edx _Thread_Disable_dispatch(); /* prevents deletion */ the_semaphore = _Semaphore_Allocate(); if ( !the_semaphore ) { 10b37c: 83 c4 10 add $0x10,%esp 10b37f: 85 c0 test %eax,%eax 10b381: 8b 4d c4 mov -0x3c(%ebp),%ecx 10b384: 0f 84 ba 00 00 00 je 10b444 _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } #endif the_semaphore->attribute_set = attribute_set; 10b38a: 89 58 10 mov %ebx,0x10(%eax) /* * Initialize it as a counting semaphore. */ if ( _Attributes_Is_counting_semaphore( attribute_set ) ) { 10b38d: 85 c9 test %ecx,%ecx 10b38f: 74 77 je 10b408 /* * 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; 10b391: 31 c0 xor %eax,%eax 10b393: f6 c3 04 test $0x4,%bl 10b396: 0f 95 c0 setne %al 10b399: 89 45 d8 mov %eax,-0x28(%ebp) else the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_FIFO; if ( _Attributes_Is_binary_semaphore( attribute_set ) ) { 10b39c: 83 f9 10 cmp $0x10,%ecx 10b39f: 0f 84 ae 00 00 00 je 10b453 the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING; the_mutex_attr.only_owner_release = true; } } } else /* must be simple binary semaphore */ { the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_BLOCKS; 10b3a5: c7 45 d0 02 00 00 00 movl $0x2,-0x30(%ebp) the_mutex_attr.only_owner_release = false; 10b3ac: c6 45 d4 00 movb $0x0,-0x2c(%ebp) } mutex_status = _CORE_mutex_Initialize( 10b3b0: 50 push %eax 10b3b1: 31 c0 xor %eax,%eax 10b3b3: 83 7d 0c 01 cmpl $0x1,0xc(%ebp) 10b3b7: 0f 94 c0 sete %al 10b3ba: 50 push %eax 10b3bb: 8d 45 d0 lea -0x30(%ebp),%eax 10b3be: 50 push %eax 10b3bf: 8d 42 14 lea 0x14(%edx),%eax 10b3c2: 50 push %eax 10b3c3: 89 55 c4 mov %edx,-0x3c(%ebp) 10b3c6: e8 35 0c 00 00 call 10c000 <_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 ) { 10b3cb: 83 c4 10 add $0x10,%esp 10b3ce: 83 f8 06 cmp $0x6,%eax 10b3d1: 8b 55 c4 mov -0x3c(%ebp),%edx 10b3d4: 0f 84 a9 00 00 00 je 10b483 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10b3da: 8b 42 08 mov 0x8(%edx),%eax 10b3dd: 0f b7 d8 movzwl %ax,%ebx 10b3e0: 8b 0d 3c 73 12 00 mov 0x12733c,%ecx 10b3e6: 89 14 99 mov %edx,(%ecx,%ebx,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 10b3e9: 89 72 0c mov %esi,0xc(%edx) &_Semaphore_Information, &the_semaphore->Object, (Objects_Name) name ); *id = the_semaphore->Object.id; 10b3ec: 89 07 mov %eax,(%edi) the_semaphore->Object.id, name, 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); 10b3ee: e8 c1 20 00 00 call 10d4b4 <_Thread_Enable_dispatch> 10b3f3: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 10b3f5: e9 25 ff ff ff jmp 10b31f <== ALWAYS TAKEN 10b3fa: 66 90 xchg %ax,%ax <== NOT EXECUTED CORE_mutex_Status mutex_status; if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; if ( !id ) 10b3fc: b8 09 00 00 00 mov $0x9,%eax 10b401: e9 19 ff ff ff jmp 10b31f <== ALWAYS TAKEN 10b406: 66 90 xchg %ax,%ax <== NOT EXECUTED */ if ( _Attributes_Is_counting_semaphore( attribute_set ) ) { /* * This effectively disables limit checking. */ the_semaphore_attr.maximum_count = 0xFFFFFFFF; 10b408: 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; 10b40f: 31 c0 xor %eax,%eax 10b411: f6 c3 04 test $0x4,%bl 10b414: 0f 95 c0 setne %al 10b417: 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; 10b41a: c7 45 d0 00 00 00 00 movl $0x0,-0x30(%ebp) the_mutex_attr.priority_ceiling = PRIORITY_MINIMUM; 10b421: c7 45 dc 00 00 00 00 movl $0x0,-0x24(%ebp) _CORE_semaphore_Initialize( 10b428: 51 push %ecx 10b429: ff 75 0c pushl 0xc(%ebp) 10b42c: 8d 45 e0 lea -0x20(%ebp),%eax 10b42f: 50 push %eax 10b430: 8d 42 14 lea 0x14(%edx),%eax 10b433: 50 push %eax 10b434: 89 55 c4 mov %edx,-0x3c(%ebp) 10b437: e8 68 0e 00 00 call 10c2a4 <_CORE_semaphore_Initialize> 10b43c: 83 c4 10 add $0x10,%esp 10b43f: 8b 55 c4 mov -0x3c(%ebp),%edx 10b442: eb 96 jmp 10b3da <== ALWAYS TAKEN _Thread_Disable_dispatch(); /* prevents deletion */ the_semaphore = _Semaphore_Allocate(); if ( !the_semaphore ) { _Thread_Enable_dispatch(); 10b444: e8 6b 20 00 00 call 10d4b4 <_Thread_Enable_dispatch> 10b449: b8 05 00 00 00 mov $0x5,%eax return RTEMS_TOO_MANY; 10b44e: e9 cc fe ff ff jmp 10b31f <== ALWAYS TAKEN the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY; else the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_FIFO; if ( _Attributes_Is_binary_semaphore( attribute_set ) ) { the_mutex_attr.priority_ceiling = priority_ceiling; 10b453: 8b 45 14 mov 0x14(%ebp),%eax 10b456: 89 45 dc mov %eax,-0x24(%ebp) the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; 10b459: c7 45 d0 00 00 00 00 movl $0x0,-0x30(%ebp) the_mutex_attr.only_owner_release = false; 10b460: c6 45 d4 00 movb $0x0,-0x2c(%ebp) if ( the_mutex_attr.discipline == CORE_MUTEX_DISCIPLINES_PRIORITY ) { 10b464: 83 7d d8 01 cmpl $0x1,-0x28(%ebp) 10b468: 0f 85 42 ff ff ff jne 10b3b0 if ( _Attributes_Is_inherit_priority( attribute_set ) ) { 10b46e: f6 c3 40 test $0x40,%bl 10b471: 74 30 je 10b4a3 the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; 10b473: c7 45 d8 02 00 00 00 movl $0x2,-0x28(%ebp) the_mutex_attr.only_owner_release = true; 10b47a: c6 45 d4 01 movb $0x1,-0x2c(%ebp) 10b47e: e9 2d ff ff ff jmp 10b3b0 <== ALWAYS TAKEN */ RTEMS_INLINE_ROUTINE void _Semaphore_Free ( Semaphore_Control *the_semaphore ) { _Objects_Free( &_Semaphore_Information, &the_semaphore->Object ); 10b483: 83 ec 08 sub $0x8,%esp 10b486: 52 push %edx 10b487: 68 20 73 12 00 push $0x127320 10b48c: e8 7f 16 00 00 call 10cb10 <_Objects_Free> (count == 1) ? CORE_MUTEX_UNLOCKED : CORE_MUTEX_LOCKED ); if ( mutex_status == CORE_MUTEX_STATUS_CEILING_VIOLATED ) { _Semaphore_Free( the_semaphore ); _Thread_Enable_dispatch(); 10b491: e8 1e 20 00 00 call 10d4b4 <_Thread_Enable_dispatch> 10b496: b8 13 00 00 00 mov $0x13,%eax return RTEMS_INVALID_PRIORITY; 10b49b: 83 c4 10 add $0x10,%esp 10b49e: e9 7c fe ff ff jmp 10b31f <== ALWAYS TAKEN if ( the_mutex_attr.discipline == CORE_MUTEX_DISCIPLINES_PRIORITY ) { if ( _Attributes_Is_inherit_priority( attribute_set ) ) { the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; the_mutex_attr.only_owner_release = true; } else if ( _Attributes_Is_priority_ceiling( attribute_set ) ) { 10b4a3: 84 db test %bl,%bl 10b4a5: 0f 89 05 ff ff ff jns 10b3b0 the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING; 10b4ab: c7 45 d8 03 00 00 00 movl $0x3,-0x28(%ebp) the_mutex_attr.only_owner_release = true; 10b4b2: c6 45 d4 01 movb $0x1,-0x2c(%ebp) 10b4b6: e9 f5 fe ff ff jmp 10b3b0 <== ALWAYS TAKEN 0010b4bc : #endif rtems_status_code rtems_semaphore_delete( rtems_id id ) { 10b4bc: 55 push %ebp 10b4bd: 89 e5 mov %esp,%ebp 10b4bf: 53 push %ebx 10b4c0: 83 ec 18 sub $0x18,%esp RTEMS_INLINE_ROUTINE Semaphore_Control *_Semaphore_Get ( Objects_Id id, Objects_Locations *location ) { return (Semaphore_Control *) 10b4c3: 8d 45 f4 lea -0xc(%ebp),%eax 10b4c6: 50 push %eax 10b4c7: ff 75 08 pushl 0x8(%ebp) 10b4ca: 68 20 73 12 00 push $0x127320 10b4cf: e8 6c 17 00 00 call 10cc40 <_Objects_Get> 10b4d4: 89 c3 mov %eax,%ebx register Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _Semaphore_Get( id, &location ); switch ( location ) { 10b4d6: 83 c4 10 add $0x10,%esp 10b4d9: 8b 4d f4 mov -0xc(%ebp),%ecx 10b4dc: 85 c9 test %ecx,%ecx 10b4de: 74 0c je 10b4ec 10b4e0: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10b4e5: 8b 5d fc mov -0x4(%ebp),%ebx 10b4e8: c9 leave 10b4e9: c3 ret 10b4ea: 66 90 xchg %ax,%ax <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE bool _Attributes_Is_counting_semaphore( rtems_attribute attribute_set ) { return ((attribute_set & RTEMS_SEMAPHORE_CLASS) == RTEMS_COUNTING_SEMAPHORE); 10b4ec: 8b 40 10 mov 0x10(%eax),%eax the_semaphore = _Semaphore_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) { 10b4ef: 83 e0 30 and $0x30,%eax 10b4f2: 74 58 je 10b54c if ( _CORE_mutex_Is_locked( &the_semaphore->Core_control.mutex ) && 10b4f4: 8b 53 64 mov 0x64(%ebx),%edx 10b4f7: 85 d2 test %edx,%edx 10b4f9: 75 15 jne 10b510 10b4fb: 83 f8 20 cmp $0x20,%eax 10b4fe: 74 10 je 10b510 !_Attributes_Is_simple_binary_semaphore( the_semaphore->attribute_set ) ) { _Thread_Enable_dispatch(); 10b500: e8 af 1f 00 00 call 10d4b4 <_Thread_Enable_dispatch> 10b505: b8 0c 00 00 00 mov $0xc,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10b50a: 8b 5d fc mov -0x4(%ebp),%ebx 10b50d: c9 leave 10b50e: c3 ret 10b50f: 90 nop <== NOT EXECUTED !_Attributes_Is_simple_binary_semaphore( the_semaphore->attribute_set ) ) { _Thread_Enable_dispatch(); return RTEMS_RESOURCE_IN_USE; } _CORE_mutex_Flush( 10b510: 50 push %eax 10b511: 6a 04 push $0x4 10b513: 6a 00 push $0x0 10b515: 8d 43 14 lea 0x14(%ebx),%eax 10b518: 50 push %eax 10b519: e8 d6 0a 00 00 call 10bff4 <_CORE_mutex_Flush> <== ALWAYS TAKEN 10b51e: 83 c4 10 add $0x10,%esp SEMAPHORE_MP_OBJECT_WAS_DELETED, CORE_SEMAPHORE_WAS_DELETED ); } _Objects_Close( &_Semaphore_Information, &the_semaphore->Object ); 10b521: 83 ec 08 sub $0x8,%esp 10b524: 53 push %ebx 10b525: 68 20 73 12 00 push $0x127320 10b52a: e8 dd 12 00 00 call 10c80c <_Objects_Close> */ RTEMS_INLINE_ROUTINE void _Semaphore_Free ( Semaphore_Control *the_semaphore ) { _Objects_Free( &_Semaphore_Information, &the_semaphore->Object ); 10b52f: 58 pop %eax 10b530: 5a pop %edx 10b531: 53 push %ebx 10b532: 68 20 73 12 00 push $0x127320 10b537: e8 d4 15 00 00 call 10cb10 <_Objects_Free> 0, /* Not used */ 0 /* Not used */ ); } #endif _Thread_Enable_dispatch(); 10b53c: e8 73 1f 00 00 call 10d4b4 <_Thread_Enable_dispatch> 10b541: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 10b543: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10b546: 8b 5d fc mov -0x4(%ebp),%ebx 10b549: c9 leave 10b54a: c3 ret 10b54b: 90 nop <== NOT EXECUTED &the_semaphore->Core_control.mutex, SEMAPHORE_MP_OBJECT_WAS_DELETED, CORE_MUTEX_WAS_DELETED ); } else { _CORE_semaphore_Flush( 10b54c: 51 push %ecx 10b54d: 6a 02 push $0x2 10b54f: 6a 00 push $0x0 10b551: 8d 43 14 lea 0x14(%ebx),%eax 10b554: 50 push %eax 10b555: e8 3e 0d 00 00 call 10c298 <_CORE_semaphore_Flush> 10b55a: 83 c4 10 add $0x10,%esp 10b55d: eb c2 jmp 10b521 <== ALWAYS TAKEN 00115500 : #endif rtems_status_code rtems_semaphore_flush( rtems_id id ) { 115500: 55 push %ebp 115501: 89 e5 mov %esp,%ebp 115503: 83 ec 1c sub $0x1c,%esp 115506: 8d 45 f4 lea -0xc(%ebp),%eax 115509: 50 push %eax 11550a: ff 75 08 pushl 0x8(%ebp) 11550d: 68 40 cb 12 00 push $0x12cb40 115512: e8 55 90 ff ff call 10e56c <_Objects_Get> register Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _Semaphore_Get( id, &location ); switch ( location ) { 115517: 83 c4 10 add $0x10,%esp 11551a: 8b 55 f4 mov -0xc(%ebp),%edx 11551d: 85 d2 test %edx,%edx 11551f: 74 07 je 115528 115521: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 115526: c9 leave 115527: c3 ret the_semaphore = _Semaphore_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) { 115528: f6 40 10 30 testb $0x30,0x10(%eax) 11552c: 75 1a jne 115548 &the_semaphore->Core_control.mutex, SEND_OBJECT_WAS_DELETED, CORE_MUTEX_STATUS_UNSATISFIED_NOWAIT ); } else { _CORE_semaphore_Flush( 11552e: 52 push %edx 11552f: 6a 01 push $0x1 115531: 6a 00 push $0x0 115533: 83 c0 14 add $0x14,%eax 115536: 50 push %eax 115537: e8 30 86 ff ff call 10db6c <_CORE_semaphore_Flush> 11553c: 83 c4 10 add $0x10,%esp &the_semaphore->Core_control.semaphore, SEND_OBJECT_WAS_DELETED, CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT ); } _Thread_Enable_dispatch(); 11553f: e8 1c 99 ff ff call 10ee60 <_Thread_Enable_dispatch> 115544: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 115546: c9 leave 115547: c3 ret the_semaphore = _Semaphore_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) { _CORE_mutex_Flush( 115548: 51 push %ecx 115549: 6a 01 push $0x1 11554b: 6a 00 push $0x0 11554d: 83 c0 14 add $0x14,%eax 115550: 50 push %eax 115551: e8 72 83 ff ff call 10d8c8 <_CORE_mutex_Flush> <== ALWAYS TAKEN 115556: 83 c4 10 add $0x10,%esp 115559: eb e4 jmp 11553f <== ALWAYS TAKEN 0010b560 : rtems_status_code rtems_semaphore_obtain( rtems_id id, rtems_option option_set, rtems_interval timeout ) { 10b560: 55 push %ebp 10b561: 89 e5 mov %esp,%ebp 10b563: 57 push %edi 10b564: 56 push %esi 10b565: 53 push %ebx 10b566: 83 ec 1c sub $0x1c,%esp 10b569: 8b 5d 08 mov 0x8(%ebp),%ebx 10b56c: 8b 75 0c mov 0xc(%ebp),%esi 10b56f: 8b 7d 10 mov 0x10(%ebp),%edi Objects_Id id, Objects_Locations *location, ISR_Level *level ) { return (Semaphore_Control *) 10b572: 8d 45 e0 lea -0x20(%ebp),%eax 10b575: 50 push %eax 10b576: 8d 45 e4 lea -0x1c(%ebp),%eax 10b579: 50 push %eax 10b57a: 53 push %ebx 10b57b: 68 20 73 12 00 push $0x127320 10b580: e8 63 16 00 00 call 10cbe8 <_Objects_Get_isr_disable> register Semaphore_Control *the_semaphore; Objects_Locations location; ISR_Level level; the_semaphore = _Semaphore_Get_interrupt_disable( id, &location, &level ); switch ( location ) { 10b585: 83 c4 10 add $0x10,%esp 10b588: 8b 4d e4 mov -0x1c(%ebp),%ecx 10b58b: 85 c9 test %ecx,%ecx 10b58d: 74 0d je 10b59c 10b58f: b8 04 00 00 00 mov $0x4,%eax break; } return RTEMS_INVALID_ID; } 10b594: 8d 65 f4 lea -0xc(%ebp),%esp 10b597: 5b pop %ebx 10b598: 5e pop %esi 10b599: 5f pop %edi 10b59a: c9 leave 10b59b: c3 ret the_semaphore = _Semaphore_Get_interrupt_disable( id, &location, &level ); switch ( location ) { case OBJECTS_LOCAL: if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) { 10b59c: f6 40 10 30 testb $0x30,0x10(%eax) 10b5a0: 74 36 je 10b5d8 _CORE_mutex_Seize( 10b5a2: 83 ec 0c sub $0xc,%esp 10b5a5: ff 75 e0 pushl -0x20(%ebp) 10b5a8: 57 push %edi 10b5a9: 83 e6 01 and $0x1,%esi 10b5ac: 83 f6 01 xor $0x1,%esi 10b5af: 56 push %esi 10b5b0: 53 push %ebx 10b5b1: 83 c0 14 add $0x14,%eax 10b5b4: 50 push %eax 10b5b5: e8 3e 0b 00 00 call 10c0f8 <_CORE_mutex_Seize> <== ALWAYS TAKEN id, ((_Options_Is_no_wait( option_set )) ? false : true), timeout, level ); return _Semaphore_Translate_core_mutex_return_code( 10b5ba: 83 c4 14 add $0x14,%esp 10b5bd: a1 98 74 12 00 mov 0x127498,%eax 10b5c2: ff 70 34 pushl 0x34(%eax) 10b5c5: e8 12 01 00 00 call 10b6dc <_Semaphore_Translate_core_mutex_return_code> <== ALWAYS TAKEN 10b5ca: 83 c4 10 add $0x10,%esp break; } return RTEMS_INVALID_ID; } 10b5cd: 8d 65 f4 lea -0xc(%ebp),%esp 10b5d0: 5b pop %ebx 10b5d1: 5e pop %esi 10b5d2: 5f pop %edi 10b5d3: c9 leave 10b5d4: c3 ret 10b5d5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED { Thread_Control *executing; /* disabled when you get here */ executing = _Thread_Executing; 10b5d8: 8b 15 98 74 12 00 mov 0x127498,%edx executing->Wait.return_code = CORE_SEMAPHORE_STATUS_SUCCESSFUL; 10b5de: c7 42 34 00 00 00 00 movl $0x0,0x34(%edx) if ( the_semaphore->count != 0 ) { 10b5e5: 8b 48 5c mov 0x5c(%eax),%ecx 10b5e8: 85 c9 test %ecx,%ecx 10b5ea: 75 2c jne 10b618 the_semaphore->count -= 1; _ISR_Enable( *level_p ); return; } if ( !wait ) { 10b5ec: 83 e6 01 and $0x1,%esi 10b5ef: 74 33 je 10b624 _ISR_Enable( *level_p ); 10b5f1: ff 75 e0 pushl -0x20(%ebp) 10b5f4: 9d popf executing->Wait.return_code = CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT; 10b5f5: c7 42 34 01 00 00 00 movl $0x1,0x34(%edx) id, ((_Options_Is_no_wait( option_set )) ? false : true), timeout, &level ); return _Semaphore_Translate_core_semaphore_return_code( 10b5fc: 83 ec 0c sub $0xc,%esp 10b5ff: a1 98 74 12 00 mov 0x127498,%eax 10b604: ff 70 34 pushl 0x34(%eax) 10b607: e8 e0 00 00 00 call 10b6ec <_Semaphore_Translate_core_semaphore_return_code> <== ALWAYS TAKEN 10b60c: 83 c4 10 add $0x10,%esp break; } return RTEMS_INVALID_ID; } 10b60f: 8d 65 f4 lea -0xc(%ebp),%esp 10b612: 5b pop %ebx 10b613: 5e pop %esi 10b614: 5f pop %edi 10b615: c9 leave 10b616: c3 ret 10b617: 90 nop <== NOT EXECUTED /* disabled when you get here */ executing = _Thread_Executing; executing->Wait.return_code = CORE_SEMAPHORE_STATUS_SUCCESSFUL; if ( the_semaphore->count != 0 ) { the_semaphore->count -= 1; 10b618: 49 dec %ecx 10b619: 89 48 5c mov %ecx,0x5c(%eax) _ISR_Enable( *level_p ); 10b61c: ff 75 e0 pushl -0x20(%ebp) 10b61f: 9d popf 10b620: eb da jmp 10b5fc <== ALWAYS TAKEN 10b622: 66 90 xchg %ax,%ax <== NOT EXECUTED 10b624: 8b 0d d8 73 12 00 mov 0x1273d8,%ecx 10b62a: 41 inc %ecx 10b62b: 89 0d d8 73 12 00 mov %ecx,0x1273d8 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; 10b631: c7 40 44 01 00 00 00 movl $0x1,0x44(%eax) return; } _Thread_Disable_dispatch(); _Thread_queue_Enter_critical_section( &the_semaphore->Wait_queue ); executing->Wait.queue = &the_semaphore->Wait_queue; 10b638: 83 c0 14 add $0x14,%eax 10b63b: 89 42 44 mov %eax,0x44(%edx) executing->Wait.id = id; 10b63e: 89 5a 20 mov %ebx,0x20(%edx) _ISR_Enable( *level_p ); 10b641: ff 75 e0 pushl -0x20(%ebp) 10b644: 9d popf _Thread_queue_Enqueue( &the_semaphore->Wait_queue, timeout ); 10b645: 52 push %edx 10b646: 68 d4 dc 10 00 push $0x10dcd4 10b64b: 57 push %edi 10b64c: 50 push %eax 10b64d: e8 72 23 00 00 call 10d9c4 <_Thread_queue_Enqueue_with_handler> _Thread_Enable_dispatch(); 10b652: e8 5d 1e 00 00 call 10d4b4 <_Thread_Enable_dispatch> 10b657: 83 c4 10 add $0x10,%esp 10b65a: eb a0 jmp 10b5fc <== ALWAYS TAKEN 0010b65c : #endif rtems_status_code rtems_semaphore_release( rtems_id id ) { 10b65c: 55 push %ebp 10b65d: 89 e5 mov %esp,%ebp 10b65f: 53 push %ebx 10b660: 83 ec 18 sub $0x18,%esp 10b663: 8b 5d 08 mov 0x8(%ebp),%ebx RTEMS_INLINE_ROUTINE Semaphore_Control *_Semaphore_Get ( Objects_Id id, Objects_Locations *location ) { return (Semaphore_Control *) 10b666: 8d 45 f4 lea -0xc(%ebp),%eax 10b669: 50 push %eax 10b66a: 53 push %ebx 10b66b: 68 20 73 12 00 push $0x127320 10b670: e8 cb 15 00 00 call 10cc40 <_Objects_Get> Objects_Locations location; CORE_mutex_Status mutex_status; CORE_semaphore_Status semaphore_status; the_semaphore = _Semaphore_Get( id, &location ); switch ( location ) { 10b675: 83 c4 10 add $0x10,%esp 10b678: 8b 55 f4 mov -0xc(%ebp),%edx 10b67b: 85 d2 test %edx,%edx 10b67d: 74 0d je 10b68c 10b67f: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10b684: 8b 5d fc mov -0x4(%ebp),%ebx 10b687: c9 leave 10b688: c3 ret 10b689: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED the_semaphore = _Semaphore_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) { 10b68c: f6 40 10 30 testb $0x30,0x10(%eax) 10b690: 75 26 jne 10b6b8 MUTEX_MP_SUPPORT ); _Thread_Enable_dispatch(); return _Semaphore_Translate_core_mutex_return_code( mutex_status ); } else { semaphore_status = _CORE_semaphore_Surrender( 10b692: 52 push %edx 10b693: 6a 00 push $0x0 10b695: 53 push %ebx 10b696: 83 c0 14 add $0x14,%eax 10b699: 50 push %eax 10b69a: e8 45 0c 00 00 call 10c2e4 <_CORE_semaphore_Surrender> 10b69f: 89 c3 mov %eax,%ebx &the_semaphore->Core_control.semaphore, id, MUTEX_MP_SUPPORT ); _Thread_Enable_dispatch(); 10b6a1: e8 0e 1e 00 00 call 10d4b4 <_Thread_Enable_dispatch> return _Semaphore_Translate_core_semaphore_return_code( semaphore_status ); 10b6a6: 89 1c 24 mov %ebx,(%esp) 10b6a9: e8 3e 00 00 00 call 10b6ec <_Semaphore_Translate_core_semaphore_return_code> <== ALWAYS TAKEN &the_semaphore->Core_control.semaphore, id, MUTEX_MP_SUPPORT ); _Thread_Enable_dispatch(); return 10b6ae: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10b6b1: 8b 5d fc mov -0x4(%ebp),%ebx 10b6b4: c9 leave 10b6b5: c3 ret 10b6b6: 66 90 xchg %ax,%ax <== NOT EXECUTED the_semaphore = _Semaphore_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) { mutex_status = _CORE_mutex_Surrender( 10b6b8: 51 push %ecx 10b6b9: 6a 00 push $0x0 10b6bb: 53 push %ebx 10b6bc: 83 c0 14 add $0x14,%eax 10b6bf: 50 push %eax 10b6c0: e8 d3 0a 00 00 call 10c198 <_CORE_mutex_Surrender> <== ALWAYS TAKEN 10b6c5: 89 c3 mov %eax,%ebx &the_semaphore->Core_control.mutex, id, MUTEX_MP_SUPPORT ); _Thread_Enable_dispatch(); 10b6c7: e8 e8 1d 00 00 call 10d4b4 <_Thread_Enable_dispatch> return _Semaphore_Translate_core_mutex_return_code( mutex_status ); 10b6cc: 89 1c 24 mov %ebx,(%esp) 10b6cf: e8 08 00 00 00 call 10b6dc <_Semaphore_Translate_core_mutex_return_code> <== ALWAYS TAKEN 10b6d4: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10b6d7: 8b 5d fc mov -0x4(%ebp),%ebx 10b6da: c9 leave 10b6db: c3 ret 0010c5ec : rtems_status_code rtems_signal_catch( rtems_asr_entry asr_handler, rtems_mode mode_set ) { 10c5ec: 55 push %ebp 10c5ed: 89 e5 mov %esp,%ebp 10c5ef: 83 ec 08 sub $0x8,%esp 10c5f2: 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 ]; 10c5f5: a1 78 9c 12 00 mov 0x129c78,%eax 10c5fa: 8b 80 f4 00 00 00 mov 0xf4(%eax),%eax 10c600: 8b 0d b8 9b 12 00 mov 0x129bb8,%ecx 10c606: 41 inc %ecx 10c607: 89 0d b8 9b 12 00 mov %ecx,0x129bb8 asr = &api->Signal; _Thread_Disable_dispatch(); /* cannot reschedule while */ /* the thread is inconsistent */ if ( !_ASR_Is_null_handler( asr_handler ) ) { 10c60d: 85 d2 test %edx,%edx 10c60f: 74 13 je 10c624 asr->mode_set = mode_set; 10c611: 8b 4d 0c mov 0xc(%ebp),%ecx 10c614: 89 48 10 mov %ecx,0x10(%eax) asr->handler = asr_handler; 10c617: 89 50 0c mov %edx,0xc(%eax) } else _ASR_Initialize( asr ); _Thread_Enable_dispatch(); 10c61a: e8 41 21 00 00 call 10e760 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; } 10c61f: 31 c0 xor %eax,%eax 10c621: c9 leave 10c622: c3 ret 10c623: 90 nop <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void _ASR_Initialize ( ASR_Information *information ) { information->is_enabled = false; 10c624: c6 40 08 00 movb $0x0,0x8(%eax) information->handler = NULL; 10c628: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax) information->mode_set = RTEMS_DEFAULT_MODES; 10c62f: c7 40 10 00 00 00 00 movl $0x0,0x10(%eax) information->signals_posted = 0; 10c636: c7 40 14 00 00 00 00 movl $0x0,0x14(%eax) information->signals_pending = 0; 10c63d: c7 40 18 00 00 00 00 movl $0x0,0x18(%eax) information->nest_level = 0; 10c644: c7 40 1c 00 00 00 00 movl $0x0,0x1c(%eax) asr->mode_set = mode_set; asr->handler = asr_handler; } else _ASR_Initialize( asr ); _Thread_Enable_dispatch(); 10c64b: e8 10 21 00 00 call 10e760 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; } 10c650: 31 c0 xor %eax,%eax 10c652: c9 leave 10c653: c3 ret 00117908 : rtems_status_code rtems_signal_send( rtems_id id, rtems_signal_set signal_set ) { 117908: 55 push %ebp 117909: 89 e5 mov %esp,%ebp 11790b: 53 push %ebx 11790c: 83 ec 14 sub $0x14,%esp 11790f: 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 ) 117912: 85 db test %ebx,%ebx 117914: 75 0a jne 117920 117916: b8 0a 00 00 00 mov $0xa,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11791b: 8b 5d fc mov -0x4(%ebp),%ebx 11791e: c9 leave 11791f: c3 ret ASR_Information *asr; if ( !signal_set ) return RTEMS_INVALID_NUMBER; the_thread = _Thread_Get( id, &location ); 117920: 83 ec 08 sub $0x8,%esp 117923: 8d 45 f4 lea -0xc(%ebp),%eax 117926: 50 push %eax 117927: ff 75 08 pushl 0x8(%ebp) 11792a: e8 5d 3c 00 00 call 11b58c <_Thread_Get> switch ( location ) { 11792f: 83 c4 10 add $0x10,%esp 117932: 8b 55 f4 mov -0xc(%ebp),%edx 117935: 85 d2 test %edx,%edx 117937: 74 0b je 117944 117939: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11793e: 8b 5d fc mov -0x4(%ebp),%ebx 117941: c9 leave 117942: c3 ret 117943: 90 nop <== NOT EXECUTED the_thread = _Thread_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; 117944: 8b 90 f4 00 00 00 mov 0xf4(%eax),%edx asr = &api->Signal; 11794a: 8b 4a 0c mov 0xc(%edx),%ecx 11794d: 85 c9 test %ecx,%ecx 11794f: 74 43 je 117994 if ( ! _ASR_Is_null_handler( asr->handler ) ) { if ( asr->is_enabled ) { 117951: 80 7a 08 00 cmpb $0x0,0x8(%edx) 117955: 74 29 je 117980 rtems_signal_set *signal_set ) { ISR_Level _level; _ISR_Disable( _level ); 117957: 9c pushf 117958: fa cli 117959: 59 pop %ecx *signal_set |= signals; 11795a: 09 5a 14 or %ebx,0x14(%edx) _ISR_Enable( _level ); 11795d: 51 push %ecx 11795e: 9d popf _ASR_Post_signals( signal_set, &asr->signals_posted ); the_thread->do_post_task_switch_extension = true; 11795f: c6 40 74 01 movb $0x1,0x74(%eax) if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) 117963: 8b 15 54 1c 14 00 mov 0x141c54,%edx 117969: 85 d2 test %edx,%edx 11796b: 74 1b je 117988 11796d: 3b 05 78 1c 14 00 cmp 0x141c78,%eax 117973: 75 13 jne 117988 <== ALWAYS TAKEN _ISR_Signals_to_thread_executing = true; 117975: c6 05 28 1d 14 00 01 movb $0x1,0x141d28 11797c: eb 0a jmp 117988 <== ALWAYS TAKEN 11797e: 66 90 xchg %ax,%ax <== NOT EXECUTED rtems_signal_set *signal_set ) { ISR_Level _level; _ISR_Disable( _level ); 117980: 9c pushf 117981: fa cli 117982: 58 pop %eax *signal_set |= signals; 117983: 09 5a 18 or %ebx,0x18(%edx) _ISR_Enable( _level ); 117986: 50 push %eax 117987: 9d popf } else { _ASR_Post_signals( signal_set, &asr->signals_pending ); } _Thread_Enable_dispatch(); 117988: e8 af 3b 00 00 call 11b53c <_Thread_Enable_dispatch> 11798d: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11798f: 8b 5d fc mov -0x4(%ebp),%ebx 117992: c9 leave 117993: c3 ret _ASR_Post_signals( signal_set, &asr->signals_pending ); } _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 117994: e8 a3 3b 00 00 call 11b53c <_Thread_Enable_dispatch> 117999: b8 0b 00 00 00 mov $0xb,%eax return RTEMS_NOT_DEFINED; 11799e: e9 78 ff ff ff jmp 11791b <== ALWAYS TAKEN 0010b43c : * rtems_stack_checker_Begin_extension */ void rtems_stack_checker_begin_extension( Thread_Control *the_thread ) { 10b43c: 55 push %ebp 10b43d: 89 e5 mov %esp,%ebp 10b43f: 57 push %edi 10b440: 56 push %esi 10b441: 8b 45 08 mov 0x8(%ebp),%eax Stack_check_Control *the_pattern; if ( the_thread->Object.id == 0 ) /* skip system tasks */ 10b444: 8b 50 08 mov 0x8(%eax),%edx 10b447: 85 d2 test %edx,%edx 10b449: 74 15 je 10b460 <== ALWAYS TAKEN return; the_pattern = Stack_check_Get_pattern_area(&the_thread->Start.Initial_stack); *the_pattern = Stack_check_Pattern; 10b44b: 8b b8 c8 00 00 00 mov 0xc8(%eax),%edi 10b451: 83 c7 08 add $0x8,%edi 10b454: be 80 ee 16 00 mov $0x16ee80,%esi 10b459: b9 04 00 00 00 mov $0x4,%ecx 10b45e: f3 a5 rep movsl %ds:(%esi),%es:(%edi) } 10b460: 5e pop %esi 10b461: 5f pop %edi 10b462: c9 leave 10b463: c3 ret 0010b854 : */ bool rtems_stack_checker_create_extension( Thread_Control *running __attribute__((unused)), Thread_Control *the_thread ) { 10b854: 55 push %ebp 10b855: 89 e5 mov %esp,%ebp 10b857: 57 push %edi 10b858: 8b 7d 0c mov 0xc(%ebp),%edi Stack_check_Initialize(); 10b85b: e8 94 ff ff ff call 10b7f4 <== ALWAYS TAKEN if (the_thread) 10b860: 85 ff test %edi,%edi 10b862: 74 12 je 10b876 <== ALWAYS TAKEN Stack_check_Dope_stack(&the_thread->Start.Initial_stack); 10b864: 8b 8f c4 00 00 00 mov 0xc4(%edi),%ecx 10b86a: 8b 97 c8 00 00 00 mov 0xc8(%edi),%edx 10b870: b0 a5 mov $0xa5,%al 10b872: 89 d7 mov %edx,%edi 10b874: f3 aa rep stos %al,%es:(%edi) return true; } 10b876: b0 01 mov $0x1,%al 10b878: 5f pop %edi 10b879: c9 leave 10b87a: c3 ret 0010b724 : /* * Check if blown */ bool rtems_stack_checker_is_blown( void ) { 10b724: 55 push %ebp 10b725: 89 e5 mov %esp,%ebp 10b727: 57 push %edi 10b728: 56 push %esi Stack_Control *the_stack = &_Thread_Executing->Start.Initial_stack; 10b729: a1 f8 f0 16 00 mov 0x16f0f8,%eax ) { #if defined(__GNUC__) void *sp = __builtin_frame_address(0); if ( sp < the_stack->area ) { 10b72e: 8b b0 c8 00 00 00 mov 0xc8(%eax),%esi 10b734: 39 f5 cmp %esi,%ebp 10b736: 73 48 jae 10b780 <== NEVER TAKEN 10b738: 31 c0 xor %eax,%eax <== NOT EXECUTED /* * The stack checker must be initialized before the pattern is there * to check. */ if ( Stack_check_Initialized ) { 10b73a: 8b 0d 18 c1 16 00 mov 0x16c118,%ecx 10b740: 85 c9 test %ecx,%ecx 10b742: 75 28 jne 10b76c <== NEVER TAKEN 10b744: b2 01 mov $0x1,%dl <== NOT EXECUTED } /* * The Stack Pointer and the Pattern Area are OK so return false. */ if ( sp_ok && pattern_ok ) 10b746: 84 c0 test %al,%al 10b748: 74 04 je 10b74e <== ALWAYS TAKEN 10b74a: 84 d2 test %dl,%dl 10b74c: 75 42 jne 10b790 <== NEVER TAKEN return false; /* * Let's report as much as we can. */ Stack_check_report_blown_task( _Thread_Executing, pattern_ok ); 10b74e: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 10b751: 0f b6 d2 movzbl %dl,%edx <== NOT EXECUTED 10b754: 52 push %edx <== NOT EXECUTED 10b755: ff 35 f8 f0 16 00 pushl 0x16f0f8 <== NOT EXECUTED 10b75b: e8 08 ff ff ff call 10b668 <== NOT EXECUTED 10b760: b0 01 mov $0x1,%al <== NOT EXECUTED return true; 10b762: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } 10b765: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED 10b768: 5e pop %esi <== NOT EXECUTED 10b769: 5f pop %edi <== NOT EXECUTED 10b76a: c9 leave <== NOT EXECUTED 10b76b: c3 ret <== NOT EXECUTED /* * The stack checker must be initialized before the pattern is there * to check. */ if ( Stack_check_Initialized ) { pattern_ok = (!memcmp( 10b76c: 83 c6 08 add $0x8,%esi 10b76f: bf 80 ee 16 00 mov $0x16ee80,%edi 10b774: b9 10 00 00 00 mov $0x10,%ecx 10b779: f3 a6 repz cmpsb %es:(%edi),%ds:(%esi) 10b77b: 0f 94 c2 sete %dl 10b77e: eb c6 jmp 10b746 <== ALWAYS TAKEN } /* * Check if blown */ bool rtems_stack_checker_is_blown( void ) 10b780: 8b 90 c4 00 00 00 mov 0xc4(%eax),%edx 10b786: 8d 04 16 lea (%esi,%edx,1),%eax 10b789: 39 c5 cmp %eax,%ebp 10b78b: 0f 96 c0 setbe %al 10b78e: eb aa jmp 10b73a <== ALWAYS TAKEN } /* * The Stack Pointer and the Pattern Area are OK so return false. */ if ( sp_ok && pattern_ok ) 10b790: 31 c0 xor %eax,%eax /* * Let's report as much as we can. */ Stack_check_report_blown_task( _Thread_Executing, pattern_ok ); return true; } 10b792: 8d 65 f8 lea -0x8(%ebp),%esp 10b795: 5e pop %esi 10b796: 5f pop %edi 10b797: c9 leave 10b798: c3 ret 0010b650 : void rtems_stack_checker_report_usage( void ) { 10b650: 55 push %ebp <== NOT EXECUTED 10b651: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10b653: 83 ec 10 sub $0x10,%esp <== NOT EXECUTED rtems_stack_checker_report_usage_with_plugin( NULL, printk_plugin ); 10b656: 68 c8 df 10 00 push $0x10dfc8 <== NOT EXECUTED 10b65b: 6a 00 push $0x0 <== NOT EXECUTED 10b65d: e8 8a ff ff ff call 10b5ec <== NOT EXECUTED 10b662: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } 10b665: c9 leave <== NOT EXECUTED 10b666: c3 ret <== NOT EXECUTED 0010b5ec : void rtems_stack_checker_report_usage_with_plugin( void *context, rtems_printk_plugin_t print ) { 10b5ec: 55 push %ebp <== NOT EXECUTED 10b5ed: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10b5ef: 56 push %esi <== NOT EXECUTED 10b5f0: 53 push %ebx <== NOT EXECUTED 10b5f1: 8b 75 08 mov 0x8(%ebp),%esi <== NOT EXECUTED 10b5f4: 8b 5d 0c mov 0xc(%ebp),%ebx <== NOT EXECUTED print_context = context; 10b5f7: 89 35 1c c1 16 00 mov %esi,0x16c11c <== NOT EXECUTED print_handler = print; 10b5fd: 89 1d 20 c1 16 00 mov %ebx,0x16c120 <== NOT EXECUTED (*print)( context, "Stack usage by thread\n"); 10b603: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 10b606: 68 88 ac 15 00 push $0x15ac88 <== NOT EXECUTED 10b60b: 56 push %esi <== NOT EXECUTED 10b60c: ff d3 call *%ebx <== NOT EXECUTED (*print)( context, 10b60e: 58 pop %eax <== NOT EXECUTED 10b60f: 5a pop %edx <== NOT EXECUTED 10b610: 68 08 ad 15 00 push $0x15ad08 <== NOT EXECUTED 10b615: 56 push %esi <== NOT EXECUTED 10b616: 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 ); 10b618: c7 04 24 9c b4 10 00 movl $0x10b49c,(%esp) <== NOT EXECUTED 10b61f: e8 68 74 00 00 call 112a8c <== NOT EXECUTED /* dump interrupt stack info if any */ Stack_check_Dump_threads_usage((Thread_Control *) -1); 10b624: c7 04 24 ff ff ff ff movl $0xffffffff,(%esp) <== NOT EXECUTED 10b62b: e8 6c fe ff ff call 10b49c <== NOT EXECUTED print_context = NULL; 10b630: c7 05 1c c1 16 00 00 movl $0x0,0x16c11c <== NOT EXECUTED 10b637: 00 00 00 <== NOT EXECUTED print_handler = NULL; 10b63a: c7 05 20 c1 16 00 00 movl $0x0,0x16c120 <== NOT EXECUTED 10b641: 00 00 00 <== NOT EXECUTED 10b644: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } 10b647: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED 10b64a: 5b pop %ebx <== NOT EXECUTED 10b64b: 5e pop %esi <== NOT EXECUTED 10b64c: c9 leave <== NOT EXECUTED 10b64d: c3 ret <== NOT EXECUTED 0010b79c : */ void rtems_stack_checker_switch_extension( Thread_Control *running __attribute__((unused)), Thread_Control *heir __attribute__((unused)) ) { 10b79c: 55 push %ebp 10b79d: 89 e5 mov %esp,%ebp 10b79f: 57 push %edi 10b7a0: 56 push %esi 10b7a1: 8b 45 08 mov 0x8(%ebp),%eax Stack_Control *the_stack = &running->Start.Initial_stack; void *pattern; bool sp_ok; bool pattern_ok = true; pattern = (void *) Stack_check_Get_pattern_area(the_stack)->pattern; 10b7a4: 8b 90 c8 00 00 00 mov 0xc8(%eax),%edx 10b7aa: 8d 72 08 lea 0x8(%edx),%esi ) { #if defined(__GNUC__) void *sp = __builtin_frame_address(0); if ( sp < the_stack->area ) { 10b7ad: 39 d5 cmp %edx,%ebp 10b7af: 72 0a jb 10b7bb <== ALWAYS TAKEN void rtems_stack_checker_switch_extension( Thread_Control *running __attribute__((unused)), Thread_Control *heir __attribute__((unused)) ) { Stack_Control *the_stack = &running->Start.Initial_stack; 10b7b1: 03 90 c4 00 00 00 add 0xc4(%eax),%edx 10b7b7: 39 d5 cmp %edx,%ebp 10b7b9: 76 21 jbe 10b7dc <== NEVER TAKEN /* * Check for an out of bounds stack pointer or an overwrite */ sp_ok = Stack_check_Frame_pointer_in_range( the_stack ); pattern_ok = (!memcmp( pattern, 10b7bb: bf 80 ee 16 00 mov $0x16ee80,%edi <== NOT EXECUTED 10b7c0: b9 10 00 00 00 mov $0x10,%ecx <== NOT EXECUTED 10b7c5: f3 a6 repz cmpsb %es:(%edi),%ds:(%esi) <== NOT EXECUTED 10b7c7: 0f 94 c2 sete %dl <== NOT EXECUTED (void *) Stack_check_Pattern.pattern, PATTERN_SIZE_BYTES)); if ( !sp_ok || !pattern_ok ) { Stack_check_report_blown_task( running, pattern_ok ); 10b7ca: 0f b6 d2 movzbl %dl,%edx <== NOT EXECUTED 10b7cd: 89 55 0c mov %edx,0xc(%ebp) <== NOT EXECUTED 10b7d0: 89 45 08 mov %eax,0x8(%ebp) <== NOT EXECUTED } } 10b7d3: 5e pop %esi <== NOT EXECUTED 10b7d4: 5f pop %edi <== NOT EXECUTED 10b7d5: 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 ); 10b7d6: e9 8d fe ff ff jmp 10b668 <== NOT EXECUTED 10b7db: 90 nop <== NOT EXECUTED /* * Check for an out of bounds stack pointer or an overwrite */ sp_ok = Stack_check_Frame_pointer_in_range( the_stack ); pattern_ok = (!memcmp( pattern, 10b7dc: bf 80 ee 16 00 mov $0x16ee80,%edi 10b7e1: b9 10 00 00 00 mov $0x10,%ecx (void *) Stack_check_Pattern.pattern, PATTERN_SIZE_BYTES)); if ( !sp_ok || !pattern_ok ) { 10b7e6: f3 a6 repz cmpsb %es:(%edi),%ds:(%esi) 10b7e8: 74 06 je 10b7f0 <== NEVER TAKEN 10b7ea: 31 d2 xor %edx,%edx <== NOT EXECUTED 10b7ec: eb dc jmp 10b7ca <== NOT EXECUTED 10b7ee: 66 90 xchg %ax,%ax <== NOT EXECUTED Stack_check_report_blown_task( running, pattern_ok ); } } 10b7f0: 5e pop %esi 10b7f1: 5f pop %edi 10b7f2: c9 leave 10b7f3: c3 ret 00110cf0 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 110cf0: 55 push %ebp 110cf1: 89 e5 mov %esp,%ebp 110cf3: 57 push %edi 110cf4: 56 push %esi 110cf5: 53 push %ebx 110cf6: 83 ec 2c sub $0x2c,%esp 110cf9: 8b 75 08 mov 0x8(%ebp),%esi 110cfc: 8b 5d 0c mov 0xc(%ebp),%ebx 110cff: 8b 7d 10 mov 0x10(%ebp),%edi STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 110d02: 85 db test %ebx,%ebx 110d04: 74 72 je 110d78 return RTEMS_INVALID_ADDRESS; errno = 0; 110d06: e8 91 2f 00 00 call 113c9c <__errno> 110d0b: c7 00 00 00 00 00 movl $0x0,(%eax) *n = 0; 110d11: c7 03 00 00 00 00 movl $0x0,(%ebx) 110d17: c7 43 04 00 00 00 00 movl $0x0,0x4(%ebx) #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); 110d1e: 83 ec 08 sub $0x8,%esp 110d21: 8d 45 e4 lea -0x1c(%ebp),%eax 110d24: 50 push %eax 110d25: 56 push %esi 110d26: e8 dd 59 00 00 call 116708 #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 ) 110d2b: 83 c4 10 add $0x10,%esp 110d2e: 85 ff test %edi,%edi 110d30: 74 05 je 110d37 *endptr = end; 110d32: 8b 45 e4 mov -0x1c(%ebp),%eax 110d35: 89 07 mov %eax,(%edi) /* nothing was converted */ if ( end == s ) 110d37: 39 75 e4 cmp %esi,-0x1c(%ebp) 110d3a: 74 4c je 110d88 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 110d3c: dd 05 70 55 12 00 fldl 0x125570 110d42: d9 c9 fxch %st(1) 110d44: dd e1 fucom %st(1) 110d46: df e0 fnstsw %ax 110d48: dd d9 fstp %st(1) 110d4a: f6 c4 45 test $0x45,%ah 110d4d: 74 0d je 110d5c /* there was an underflow */ if ( (result == STRING_TO_MIN) && (errno == ERANGE)) return RTEMS_INVALID_NUMBER; #endif *n = (STRING_TO_TYPE) result; 110d4f: dd 1b fstpl (%ebx) 110d51: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; } 110d53: 8d 65 f4 lea -0xc(%ebp),%esp 110d56: 5b pop %ebx 110d57: 5e pop %esi 110d58: 5f pop %edi 110d59: c9 leave 110d5a: c3 ret 110d5b: 90 nop <== NOT EXECUTED return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 110d5c: dd 5d c8 fstpl -0x38(%ebp) 110d5f: e8 38 2f 00 00 call 113c9c <__errno> 110d64: 83 38 22 cmpl $0x22,(%eax) 110d67: dd 45 c8 fldl -0x38(%ebp) 110d6a: 75 e3 jne 110d4f <== ALWAYS TAKEN 110d6c: dd d8 fstp %st(0) 110d6e: b8 0a 00 00 00 mov $0xa,%eax 110d73: eb de jmp 110d53 <== ALWAYS TAKEN 110d75: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED ) { STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 110d78: b8 09 00 00 00 mov $0x9,%eax return RTEMS_INVALID_NUMBER; #endif *n = (STRING_TO_TYPE) result; return RTEMS_SUCCESSFUL; } 110d7d: 8d 65 f4 lea -0xc(%ebp),%esp 110d80: 5b pop %ebx 110d81: 5e pop %esi 110d82: 5f pop %edi 110d83: c9 leave 110d84: c3 ret 110d85: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 110d88: dd d8 fstp %st(0) /* If the user wants the end pointer back, then return it. */ if ( endptr ) *endptr = end; /* nothing was converted */ if ( end == s ) 110d8a: b8 0b 00 00 00 mov $0xb,%eax 110d8f: eb c2 jmp 110d53 <== ALWAYS TAKEN 00110d94 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 110d94: 55 push %ebp 110d95: 89 e5 mov %esp,%ebp 110d97: 57 push %edi 110d98: 56 push %esi 110d99: 53 push %ebx 110d9a: 83 ec 2c sub $0x2c,%esp 110d9d: 8b 75 08 mov 0x8(%ebp),%esi 110da0: 8b 5d 0c mov 0xc(%ebp),%ebx 110da3: 8b 7d 10 mov 0x10(%ebp),%edi STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 110da6: 85 db test %ebx,%ebx 110da8: 74 6a je 110e14 return RTEMS_INVALID_ADDRESS; errno = 0; 110daa: e8 ed 2e 00 00 call 113c9c <__errno> 110daf: c7 00 00 00 00 00 movl $0x0,(%eax) *n = 0; 110db5: c7 03 00 00 00 00 movl $0x0,(%ebx) #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); 110dbb: 83 ec 08 sub $0x8,%esp 110dbe: 8d 45 e4 lea -0x1c(%ebp),%eax 110dc1: 50 push %eax 110dc2: 56 push %esi 110dc3: e8 fc 58 00 00 call 1166c4 #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 ) 110dc8: 83 c4 10 add $0x10,%esp 110dcb: 85 ff test %edi,%edi 110dcd: 74 05 je 110dd4 *endptr = end; 110dcf: 8b 45 e4 mov -0x1c(%ebp),%eax 110dd2: 89 07 mov %eax,(%edi) /* nothing was converted */ if ( end == s ) 110dd4: 39 75 e4 cmp %esi,-0x1c(%ebp) 110dd7: 74 4b je 110e24 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 110dd9: d9 05 78 55 12 00 flds 0x125578 110ddf: d9 c9 fxch %st(1) 110de1: dd e1 fucom %st(1) 110de3: df e0 fnstsw %ax 110de5: dd d9 fstp %st(1) 110de7: f6 c4 45 test $0x45,%ah 110dea: 74 0c je 110df8 /* there was an underflow */ if ( (result == STRING_TO_MIN) && (errno == ERANGE)) return RTEMS_INVALID_NUMBER; #endif *n = (STRING_TO_TYPE) result; 110dec: d9 1b fstps (%ebx) 110dee: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; } 110df0: 8d 65 f4 lea -0xc(%ebp),%esp 110df3: 5b pop %ebx 110df4: 5e pop %esi 110df5: 5f pop %edi 110df6: c9 leave 110df7: c3 ret return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 110df8: d9 5d c8 fstps -0x38(%ebp) 110dfb: e8 9c 2e 00 00 call 113c9c <__errno> 110e00: 83 38 22 cmpl $0x22,(%eax) 110e03: d9 45 c8 flds -0x38(%ebp) 110e06: 75 e4 jne 110dec <== ALWAYS TAKEN 110e08: dd d8 fstp %st(0) 110e0a: b8 0a 00 00 00 mov $0xa,%eax 110e0f: eb df jmp 110df0 <== ALWAYS TAKEN 110e11: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED ) { STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 110e14: b8 09 00 00 00 mov $0x9,%eax return RTEMS_INVALID_NUMBER; #endif *n = (STRING_TO_TYPE) result; return RTEMS_SUCCESSFUL; } 110e19: 8d 65 f4 lea -0xc(%ebp),%esp 110e1c: 5b pop %ebx 110e1d: 5e pop %esi 110e1e: 5f pop %edi 110e1f: c9 leave 110e20: c3 ret 110e21: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 110e24: dd d8 fstp %st(0) /* If the user wants the end pointer back, then return it. */ if ( endptr ) *endptr = end; /* nothing was converted */ if ( end == s ) 110e26: b8 0b 00 00 00 mov $0xb,%eax 110e2b: eb c3 jmp 110df0 <== ALWAYS TAKEN 00122d60 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 122d60: 55 push %ebp 122d61: 89 e5 mov %esp,%ebp 122d63: 57 push %edi 122d64: 56 push %esi 122d65: 53 push %ebx 122d66: 83 ec 2c sub $0x2c,%esp 122d69: 8b 75 08 mov 0x8(%ebp),%esi 122d6c: 8b 5d 0c mov 0xc(%ebp),%ebx 122d6f: 8b 7d 10 mov 0x10(%ebp),%edi STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 122d72: 85 db test %ebx,%ebx 122d74: 74 5e je 122dd4 return RTEMS_INVALID_ADDRESS; errno = 0; 122d76: e8 95 f7 01 00 call 142510 <__errno> 122d7b: c7 00 00 00 00 00 movl $0x0,(%eax) *n = 0; 122d81: 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 ); 122d87: 50 push %eax 122d88: ff 75 14 pushl 0x14(%ebp) 122d8b: 8d 45 e4 lea -0x1c(%ebp),%eax 122d8e: 50 push %eax 122d8f: 56 push %esi 122d90: e8 43 63 02 00 call 1490d8 122d95: 89 c2 mov %eax,%edx #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 122d97: 83 c4 10 add $0x10,%esp 122d9a: 85 ff test %edi,%edi 122d9c: 74 05 je 122da3 *endptr = end; 122d9e: 8b 45 e4 mov -0x1c(%ebp),%eax 122da1: 89 07 mov %eax,(%edi) /* nothing was converted */ if ( end == s ) 122da3: 39 75 e4 cmp %esi,-0x1c(%ebp) 122da6: 74 3c je 122de4 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 122da8: 81 fa ff ff ff 7f cmp $0x7fffffff,%edx 122dae: 74 0c je 122dbc /* there was an underflow */ if ( (result == STRING_TO_MIN) && (errno == ERANGE)) return RTEMS_INVALID_NUMBER; #endif *n = (STRING_TO_TYPE) result; 122db0: 89 13 mov %edx,(%ebx) 122db2: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; } 122db4: 8d 65 f4 lea -0xc(%ebp),%esp 122db7: 5b pop %ebx 122db8: 5e pop %esi 122db9: 5f pop %edi 122dba: c9 leave 122dbb: c3 ret return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 122dbc: 89 55 d4 mov %edx,-0x2c(%ebp) 122dbf: e8 4c f7 01 00 call 142510 <__errno> 122dc4: 83 38 22 cmpl $0x22,(%eax) 122dc7: 8b 55 d4 mov -0x2c(%ebp),%edx 122dca: 75 e4 jne 122db0 <== ALWAYS TAKEN 122dcc: b8 0a 00 00 00 mov $0xa,%eax 122dd1: eb e1 jmp 122db4 <== ALWAYS TAKEN 122dd3: 90 nop <== NOT EXECUTED ) { STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 122dd4: b8 09 00 00 00 mov $0x9,%eax return RTEMS_INVALID_NUMBER; #endif *n = (STRING_TO_TYPE) result; return RTEMS_SUCCESSFUL; } 122dd9: 8d 65 f4 lea -0xc(%ebp),%esp 122ddc: 5b pop %ebx 122ddd: 5e pop %esi 122dde: 5f pop %edi 122ddf: c9 leave 122de0: c3 ret 122de1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED /* If the user wants the end pointer back, then return it. */ if ( endptr ) *endptr = end; /* nothing was converted */ if ( end == s ) 122de4: b8 0b 00 00 00 mov $0xb,%eax 122de9: eb c9 jmp 122db4 <== ALWAYS TAKEN 00110f6c : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 110f6c: 55 push %ebp 110f6d: 89 e5 mov %esp,%ebp 110f6f: 57 push %edi 110f70: 56 push %esi 110f71: 53 push %ebx 110f72: 83 ec 1c sub $0x1c,%esp 110f75: 8b 7d 08 mov 0x8(%ebp),%edi 110f78: 8b 5d 0c mov 0xc(%ebp),%ebx STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 110f7b: 85 db test %ebx,%ebx 110f7d: 74 69 je 110fe8 return RTEMS_INVALID_ADDRESS; errno = 0; 110f7f: e8 18 2d 00 00 call 113c9c <__errno> 110f84: c7 00 00 00 00 00 movl $0x0,(%eax) *n = 0; 110f8a: 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 ); 110f90: 52 push %edx 110f91: ff 75 14 pushl 0x14(%ebp) 110f94: 8d 45 e4 lea -0x1c(%ebp),%eax 110f97: 50 push %eax 110f98: 57 push %edi 110f99: e8 06 59 00 00 call 1168a4 110f9e: 89 c6 mov %eax,%esi #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 110fa0: 83 c4 10 add $0x10,%esp 110fa3: 8b 45 10 mov 0x10(%ebp),%eax 110fa6: 85 c0 test %eax,%eax 110fa8: 74 08 je 110fb2 *endptr = end; 110faa: 8b 45 e4 mov -0x1c(%ebp),%eax 110fad: 8b 55 10 mov 0x10(%ebp),%edx 110fb0: 89 02 mov %eax,(%edx) /* nothing was converted */ if ( end == s ) 110fb2: 39 7d e4 cmp %edi,-0x1c(%ebp) 110fb5: 74 41 je 110ff8 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 110fb7: 81 fe ff ff ff 7f cmp $0x7fffffff,%esi 110fbd: 74 15 je 110fd4 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MIN /* there was an underflow */ if ( (result == STRING_TO_MIN) && (errno == ERANGE)) 110fbf: 81 fe 00 00 00 80 cmp $0x80000000,%esi 110fc5: 74 0d je 110fd4 return RTEMS_INVALID_NUMBER; #endif *n = (STRING_TO_TYPE) result; 110fc7: 89 33 mov %esi,(%ebx) 110fc9: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; } 110fcb: 8d 65 f4 lea -0xc(%ebp),%esp 110fce: 5b pop %ebx 110fcf: 5e pop %esi 110fd0: 5f pop %edi 110fd1: c9 leave 110fd2: c3 ret 110fd3: 90 nop <== NOT EXECUTED return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MIN /* there was an underflow */ if ( (result == STRING_TO_MIN) && (errno == ERANGE)) 110fd4: e8 c3 2c 00 00 call 113c9c <__errno> 110fd9: 83 38 22 cmpl $0x22,(%eax) 110fdc: 75 e9 jne 110fc7 <== ALWAYS TAKEN return RTEMS_INVALID_NUMBER; #endif *n = (STRING_TO_TYPE) result; return RTEMS_SUCCESSFUL; 110fde: b8 0a 00 00 00 mov $0xa,%eax 110fe3: eb e6 jmp 110fcb <== ALWAYS TAKEN 110fe5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED ) { STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 110fe8: b8 09 00 00 00 mov $0x9,%eax return RTEMS_INVALID_NUMBER; #endif *n = (STRING_TO_TYPE) result; return RTEMS_SUCCESSFUL; } 110fed: 8d 65 f4 lea -0xc(%ebp),%esp 110ff0: 5b pop %ebx 110ff1: 5e pop %esi 110ff2: 5f pop %edi 110ff3: c9 leave 110ff4: c3 ret 110ff5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED /* If the user wants the end pointer back, then return it. */ if ( endptr ) *endptr = end; /* nothing was converted */ if ( end == s ) 110ff8: b8 0b 00 00 00 mov $0xb,%eax 110ffd: eb cc jmp 110fcb <== ALWAYS TAKEN 00110ebc : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 110ebc: 55 push %ebp 110ebd: 89 e5 mov %esp,%ebp 110ebf: 57 push %edi 110ec0: 56 push %esi 110ec1: 53 push %ebx 110ec2: 83 ec 2c sub $0x2c,%esp 110ec5: 8b 7d 08 mov 0x8(%ebp),%edi 110ec8: 8b 5d 0c mov 0xc(%ebp),%ebx STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 110ecb: 85 db test %ebx,%ebx 110ecd: 0f 84 81 00 00 00 je 110f54 return RTEMS_INVALID_ADDRESS; errno = 0; 110ed3: e8 c4 2d 00 00 call 113c9c <__errno> 110ed8: c7 00 00 00 00 00 movl $0x0,(%eax) *n = 0; 110ede: c7 03 00 00 00 00 movl $0x0,(%ebx) 110ee4: 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 ); 110eeb: 52 push %edx 110eec: ff 75 14 pushl 0x14(%ebp) 110eef: 8d 45 e4 lea -0x1c(%ebp),%eax 110ef2: 50 push %eax 110ef3: 57 push %edi 110ef4: e8 c7 59 00 00 call 1168c0 110ef9: 89 c6 mov %eax,%esi #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 110efb: 83 c4 10 add $0x10,%esp 110efe: 8b 45 10 mov 0x10(%ebp),%eax 110f01: 85 c0 test %eax,%eax 110f03: 74 08 je 110f0d *endptr = end; 110f05: 8b 45 e4 mov -0x1c(%ebp),%eax 110f08: 8b 4d 10 mov 0x10(%ebp),%ecx 110f0b: 89 01 mov %eax,(%ecx) /* nothing was converted */ if ( end == s ) 110f0d: 39 7d e4 cmp %edi,-0x1c(%ebp) 110f10: 74 52 je 110f64 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 110f12: 89 d1 mov %edx,%ecx 110f14: 81 f1 ff ff ff 7f xor $0x7fffffff,%ecx 110f1a: 89 f0 mov %esi,%eax 110f1c: f7 d0 not %eax 110f1e: 09 c1 or %eax,%ecx 110f20: 74 1a je 110f3c return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MIN /* there was an underflow */ if ( (result == STRING_TO_MIN) && (errno == ERANGE)) 110f22: 8d 82 00 00 00 80 lea -0x80000000(%edx),%eax 110f28: 09 f0 or %esi,%eax 110f2a: 74 10 je 110f3c return RTEMS_INVALID_NUMBER; #endif *n = (STRING_TO_TYPE) result; 110f2c: 89 33 mov %esi,(%ebx) 110f2e: 89 53 04 mov %edx,0x4(%ebx) 110f31: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; } 110f33: 8d 65 f4 lea -0xc(%ebp),%esp 110f36: 5b pop %ebx 110f37: 5e pop %esi 110f38: 5f pop %edi 110f39: c9 leave 110f3a: c3 ret 110f3b: 90 nop <== NOT EXECUTED return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MIN /* there was an underflow */ if ( (result == STRING_TO_MIN) && (errno == ERANGE)) 110f3c: 89 55 d4 mov %edx,-0x2c(%ebp) 110f3f: e8 58 2d 00 00 call 113c9c <__errno> 110f44: 83 38 22 cmpl $0x22,(%eax) 110f47: 8b 55 d4 mov -0x2c(%ebp),%edx 110f4a: 75 e0 jne 110f2c <== ALWAYS TAKEN return RTEMS_INVALID_NUMBER; #endif *n = (STRING_TO_TYPE) result; return RTEMS_SUCCESSFUL; 110f4c: b8 0a 00 00 00 mov $0xa,%eax 110f51: eb e0 jmp 110f33 <== ALWAYS TAKEN 110f53: 90 nop <== NOT EXECUTED ) { STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 110f54: b8 09 00 00 00 mov $0x9,%eax return RTEMS_INVALID_NUMBER; #endif *n = (STRING_TO_TYPE) result; return RTEMS_SUCCESSFUL; } 110f59: 8d 65 f4 lea -0xc(%ebp),%esp 110f5c: 5b pop %ebx 110f5d: 5e pop %esi 110f5e: 5f pop %edi 110f5f: c9 leave 110f60: c3 ret 110f61: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED /* If the user wants the end pointer back, then return it. */ if ( endptr ) *endptr = end; /* nothing was converted */ if ( end == s ) 110f64: b8 0b 00 00 00 mov $0xb,%eax 110f69: eb c8 jmp 110f33 <== ALWAYS TAKEN 00122dec : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 122dec: 55 push %ebp 122ded: 89 e5 mov %esp,%ebp 122def: 57 push %edi 122df0: 56 push %esi 122df1: 53 push %ebx 122df2: 83 ec 2c sub $0x2c,%esp 122df5: 8b 75 08 mov 0x8(%ebp),%esi 122df8: 8b 5d 0c mov 0xc(%ebp),%ebx 122dfb: 8b 7d 10 mov 0x10(%ebp),%edi STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 122dfe: 85 db test %ebx,%ebx 122e00: 74 5a je 122e5c return RTEMS_INVALID_ADDRESS; errno = 0; 122e02: e8 09 f7 01 00 call 142510 <__errno> 122e07: c7 00 00 00 00 00 movl $0x0,(%eax) *n = 0; 122e0d: 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 ); 122e13: 50 push %eax 122e14: 6a 10 push $0x10 122e16: 8d 45 e4 lea -0x1c(%ebp),%eax 122e19: 50 push %eax 122e1a: 56 push %esi 122e1b: e8 34 67 02 00 call 149554 122e20: 89 c2 mov %eax,%edx #elif defined(STRING_TO_INTEGER) result = STRING_TO_METHOD( s, &end, base ); #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 122e22: 83 c4 10 add $0x10,%esp 122e25: 85 ff test %edi,%edi 122e27: 74 05 je 122e2e *endptr = end; 122e29: 8b 45 e4 mov -0x1c(%ebp),%eax 122e2c: 89 07 mov %eax,(%edi) /* nothing was converted */ if ( end == s ) 122e2e: 39 75 e4 cmp %esi,-0x1c(%ebp) 122e31: 74 39 je 122e6c return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 122e33: 83 fa ff cmp $0xffffffff,%edx 122e36: 74 0c je 122e44 <== ALWAYS TAKEN /* there was an underflow */ if ( (result == STRING_TO_MIN) && (errno == ERANGE)) return RTEMS_INVALID_NUMBER; #endif *n = (STRING_TO_TYPE) result; 122e38: 89 13 mov %edx,(%ebx) 122e3a: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; } 122e3c: 8d 65 f4 lea -0xc(%ebp),%esp 122e3f: 5b pop %ebx 122e40: 5e pop %esi 122e41: 5f pop %edi 122e42: c9 leave 122e43: c3 ret return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 122e44: 89 55 d4 mov %edx,-0x2c(%ebp) <== NOT EXECUTED 122e47: e8 c4 f6 01 00 call 142510 <__errno> <== NOT EXECUTED 122e4c: 83 38 22 cmpl $0x22,(%eax) <== NOT EXECUTED 122e4f: 8b 55 d4 mov -0x2c(%ebp),%edx <== NOT EXECUTED 122e52: 75 e4 jne 122e38 <== NOT EXECUTED 122e54: b8 0a 00 00 00 mov $0xa,%eax <== NOT EXECUTED 122e59: eb e1 jmp 122e3c <== NOT EXECUTED 122e5b: 90 nop <== NOT EXECUTED ) { STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 122e5c: b8 09 00 00 00 mov $0x9,%eax return RTEMS_INVALID_NUMBER; #endif *n = (STRING_TO_TYPE) result; return RTEMS_SUCCESSFUL; } 122e61: 8d 65 f4 lea -0xc(%ebp),%esp 122e64: 5b pop %ebx 122e65: 5e pop %esi 122e66: 5f pop %edi 122e67: c9 leave 122e68: c3 ret 122e69: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED /* If the user wants the end pointer back, then return it. */ if ( endptr ) *endptr = end; /* nothing was converted */ if ( end == s ) 122e6c: b8 0b 00 00 00 mov $0xb,%eax 122e71: eb c9 jmp 122e3c <== ALWAYS TAKEN 00122e74 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 122e74: 55 push %ebp 122e75: 89 e5 mov %esp,%ebp 122e77: 57 push %edi 122e78: 56 push %esi 122e79: 53 push %ebx 122e7a: 83 ec 1c sub $0x1c,%esp 122e7d: 8b 75 08 mov 0x8(%ebp),%esi 122e80: 8b 5d 0c mov 0xc(%ebp),%ebx 122e83: 8b 7d 10 mov 0x10(%ebp),%edi STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 122e86: 85 db test %ebx,%ebx 122e88: 74 3a je 122ec4 return RTEMS_INVALID_ADDRESS; errno = 0; 122e8a: e8 81 f6 01 00 call 142510 <__errno> 122e8f: c7 00 00 00 00 00 movl $0x0,(%eax) *n = 0; 122e95: c6 03 00 movb $0x0,(%ebx) #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); #elif defined(STRING_TO_POINTER) result = STRING_TO_METHOD( s, &end, 16 ); #elif defined(STRING_TO_INTEGER) result = STRING_TO_METHOD( s, &end, base ); 122e98: 50 push %eax 122e99: ff 75 14 pushl 0x14(%ebp) 122e9c: 8d 45 e4 lea -0x1c(%ebp),%eax 122e9f: 50 push %eax 122ea0: 56 push %esi 122ea1: e8 ae 66 02 00 call 149554 #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 122ea6: 83 c4 10 add $0x10,%esp 122ea9: 85 ff test %edi,%edi 122eab: 74 05 je 122eb2 *endptr = end; 122ead: 8b 55 e4 mov -0x1c(%ebp),%edx 122eb0: 89 17 mov %edx,(%edi) /* nothing was converted */ if ( end == s ) 122eb2: 39 75 e4 cmp %esi,-0x1c(%ebp) 122eb5: 74 1d je 122ed4 /* there was an underflow */ if ( (result == STRING_TO_MIN) && (errno == ERANGE)) return RTEMS_INVALID_NUMBER; #endif *n = (STRING_TO_TYPE) result; 122eb7: 88 03 mov %al,(%ebx) 122eb9: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; } 122ebb: 8d 65 f4 lea -0xc(%ebp),%esp 122ebe: 5b pop %ebx 122ebf: 5e pop %esi 122ec0: 5f pop %edi 122ec1: c9 leave 122ec2: c3 ret 122ec3: 90 nop <== NOT EXECUTED ) { STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 122ec4: b8 09 00 00 00 mov $0x9,%eax return RTEMS_INVALID_NUMBER; #endif *n = (STRING_TO_TYPE) result; return RTEMS_SUCCESSFUL; } 122ec9: 8d 65 f4 lea -0xc(%ebp),%esp 122ecc: 5b pop %ebx 122ecd: 5e pop %esi 122ece: 5f pop %edi 122ecf: c9 leave 122ed0: c3 ret 122ed1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED /* If the user wants the end pointer back, then return it. */ if ( endptr ) *endptr = end; /* nothing was converted */ if ( end == s ) 122ed4: b8 0b 00 00 00 mov $0xb,%eax 122ed9: eb e0 jmp 122ebb <== ALWAYS TAKEN 001110f0 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 1110f0: 55 push %ebp 1110f1: 89 e5 mov %esp,%ebp 1110f3: 57 push %edi 1110f4: 56 push %esi 1110f5: 53 push %ebx 1110f6: 83 ec 2c sub $0x2c,%esp 1110f9: 8b 75 08 mov 0x8(%ebp),%esi 1110fc: 8b 5d 0c mov 0xc(%ebp),%ebx 1110ff: 8b 7d 10 mov 0x10(%ebp),%edi STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 111102: 85 db test %ebx,%ebx 111104: 74 5e je 111164 return RTEMS_INVALID_ADDRESS; errno = 0; 111106: e8 91 2b 00 00 call 113c9c <__errno> 11110b: c7 00 00 00 00 00 movl $0x0,(%eax) *n = 0; 111111: 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 ); 111117: 50 push %eax 111118: ff 75 14 pushl 0x14(%ebp) 11111b: 8d 45 e4 lea -0x1c(%ebp),%eax 11111e: 50 push %eax 11111f: 56 push %esi 111120: e8 fb 5b 00 00 call 116d20 111125: 89 c2 mov %eax,%edx #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 111127: 83 c4 10 add $0x10,%esp 11112a: 85 ff test %edi,%edi 11112c: 74 05 je 111133 *endptr = end; 11112e: 8b 45 e4 mov -0x1c(%ebp),%eax 111131: 89 07 mov %eax,(%edi) /* nothing was converted */ if ( end == s ) 111133: 39 75 e4 cmp %esi,-0x1c(%ebp) 111136: 74 3c je 111174 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 111138: 83 fa ff cmp $0xffffffff,%edx 11113b: 74 0f je 11114c /* there was an underflow */ if ( (result == STRING_TO_MIN) && (errno == ERANGE)) return RTEMS_INVALID_NUMBER; #endif *n = (STRING_TO_TYPE) result; 11113d: 89 13 mov %edx,(%ebx) 11113f: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; } 111141: 8d 65 f4 lea -0xc(%ebp),%esp 111144: 5b pop %ebx 111145: 5e pop %esi 111146: 5f pop %edi 111147: c9 leave 111148: c3 ret 111149: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 11114c: 89 55 d4 mov %edx,-0x2c(%ebp) 11114f: e8 48 2b 00 00 call 113c9c <__errno> 111154: 83 38 22 cmpl $0x22,(%eax) 111157: 8b 55 d4 mov -0x2c(%ebp),%edx 11115a: 75 e1 jne 11113d <== ALWAYS TAKEN 11115c: b8 0a 00 00 00 mov $0xa,%eax 111161: eb de jmp 111141 <== ALWAYS TAKEN 111163: 90 nop <== NOT EXECUTED ) { STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 111164: b8 09 00 00 00 mov $0x9,%eax return RTEMS_INVALID_NUMBER; #endif *n = (STRING_TO_TYPE) result; return RTEMS_SUCCESSFUL; } 111169: 8d 65 f4 lea -0xc(%ebp),%esp 11116c: 5b pop %ebx 11116d: 5e pop %esi 11116e: 5f pop %edi 11116f: c9 leave 111170: c3 ret 111171: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED /* If the user wants the end pointer back, then return it. */ if ( endptr ) *endptr = end; /* nothing was converted */ if ( end == s ) 111174: b8 0b 00 00 00 mov $0xb,%eax 111179: eb c6 jmp 111141 <== ALWAYS TAKEN 00122edc : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 122edc: 55 push %ebp 122edd: 89 e5 mov %esp,%ebp 122edf: 57 push %edi 122ee0: 56 push %esi 122ee1: 53 push %ebx 122ee2: 83 ec 2c sub $0x2c,%esp 122ee5: 8b 75 08 mov 0x8(%ebp),%esi 122ee8: 8b 5d 0c mov 0xc(%ebp),%ebx 122eeb: 8b 7d 10 mov 0x10(%ebp),%edi STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 122eee: 85 db test %ebx,%ebx 122ef0: 74 5e je 122f50 return RTEMS_INVALID_ADDRESS; errno = 0; 122ef2: e8 19 f6 01 00 call 142510 <__errno> 122ef7: c7 00 00 00 00 00 movl $0x0,(%eax) *n = 0; 122efd: 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 ); 122f03: 50 push %eax 122f04: ff 75 14 pushl 0x14(%ebp) 122f07: 8d 45 e4 lea -0x1c(%ebp),%eax 122f0a: 50 push %eax 122f0b: 56 push %esi 122f0c: e8 43 66 02 00 call 149554 122f11: 89 c2 mov %eax,%edx #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 122f13: 83 c4 10 add $0x10,%esp 122f16: 85 ff test %edi,%edi 122f18: 74 05 je 122f1f *endptr = end; 122f1a: 8b 45 e4 mov -0x1c(%ebp),%eax 122f1d: 89 07 mov %eax,(%edi) /* nothing was converted */ if ( end == s ) 122f1f: 39 75 e4 cmp %esi,-0x1c(%ebp) 122f22: 74 3c je 122f60 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 122f24: 83 fa ff cmp $0xffffffff,%edx 122f27: 74 0f je 122f38 /* there was an underflow */ if ( (result == STRING_TO_MIN) && (errno == ERANGE)) return RTEMS_INVALID_NUMBER; #endif *n = (STRING_TO_TYPE) result; 122f29: 89 13 mov %edx,(%ebx) 122f2b: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; } 122f2d: 8d 65 f4 lea -0xc(%ebp),%esp 122f30: 5b pop %ebx 122f31: 5e pop %esi 122f32: 5f pop %edi 122f33: c9 leave 122f34: c3 ret 122f35: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 122f38: 89 55 d4 mov %edx,-0x2c(%ebp) 122f3b: e8 d0 f5 01 00 call 142510 <__errno> 122f40: 83 38 22 cmpl $0x22,(%eax) 122f43: 8b 55 d4 mov -0x2c(%ebp),%edx 122f46: 75 e1 jne 122f29 <== ALWAYS TAKEN 122f48: b8 0a 00 00 00 mov $0xa,%eax 122f4d: eb de jmp 122f2d <== ALWAYS TAKEN 122f4f: 90 nop <== NOT EXECUTED ) { STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 122f50: b8 09 00 00 00 mov $0x9,%eax return RTEMS_INVALID_NUMBER; #endif *n = (STRING_TO_TYPE) result; return RTEMS_SUCCESSFUL; } 122f55: 8d 65 f4 lea -0xc(%ebp),%esp 122f58: 5b pop %ebx 122f59: 5e pop %esi 122f5a: 5f pop %edi 122f5b: c9 leave 122f5c: c3 ret 122f5d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED /* If the user wants the end pointer back, then return it. */ if ( endptr ) *endptr = end; /* nothing was converted */ if ( end == s ) 122f60: b8 0b 00 00 00 mov $0xb,%eax 122f65: eb c6 jmp 122f2d <== ALWAYS TAKEN 0011117c : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 11117c: 55 push %ebp 11117d: 89 e5 mov %esp,%ebp 11117f: 57 push %edi 111180: 56 push %esi 111181: 53 push %ebx 111182: 83 ec 2c sub $0x2c,%esp 111185: 8b 7d 08 mov 0x8(%ebp),%edi 111188: 8b 5d 0c mov 0xc(%ebp),%ebx STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 11118b: 85 db test %ebx,%ebx 11118d: 74 6d je 1111fc return RTEMS_INVALID_ADDRESS; errno = 0; 11118f: e8 08 2b 00 00 call 113c9c <__errno> 111194: c7 00 00 00 00 00 movl $0x0,(%eax) *n = 0; 11119a: c7 03 00 00 00 00 movl $0x0,(%ebx) 1111a0: 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 ); 1111a7: 52 push %edx 1111a8: ff 75 14 pushl 0x14(%ebp) 1111ab: 8d 45 e4 lea -0x1c(%ebp),%eax 1111ae: 50 push %eax 1111af: 57 push %edi 1111b0: e8 87 5b 00 00 call 116d3c 1111b5: 89 c6 mov %eax,%esi #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 1111b7: 83 c4 10 add $0x10,%esp 1111ba: 8b 45 10 mov 0x10(%ebp),%eax 1111bd: 85 c0 test %eax,%eax 1111bf: 74 08 je 1111c9 *endptr = end; 1111c1: 8b 45 e4 mov -0x1c(%ebp),%eax 1111c4: 8b 4d 10 mov 0x10(%ebp),%ecx 1111c7: 89 01 mov %eax,(%ecx) /* nothing was converted */ if ( end == s ) 1111c9: 39 7d e4 cmp %edi,-0x1c(%ebp) 1111cc: 74 3e je 11120c return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 1111ce: 89 f0 mov %esi,%eax 1111d0: 21 d0 and %edx,%eax 1111d2: 40 inc %eax 1111d3: 74 0f je 1111e4 /* there was an underflow */ if ( (result == STRING_TO_MIN) && (errno == ERANGE)) return RTEMS_INVALID_NUMBER; #endif *n = (STRING_TO_TYPE) result; 1111d5: 89 33 mov %esi,(%ebx) 1111d7: 89 53 04 mov %edx,0x4(%ebx) 1111da: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; } 1111dc: 8d 65 f4 lea -0xc(%ebp),%esp 1111df: 5b pop %ebx 1111e0: 5e pop %esi 1111e1: 5f pop %edi 1111e2: c9 leave 1111e3: c3 ret return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 1111e4: 89 55 d4 mov %edx,-0x2c(%ebp) 1111e7: e8 b0 2a 00 00 call 113c9c <__errno> 1111ec: 83 38 22 cmpl $0x22,(%eax) 1111ef: 8b 55 d4 mov -0x2c(%ebp),%edx 1111f2: 75 e1 jne 1111d5 <== ALWAYS TAKEN 1111f4: b8 0a 00 00 00 mov $0xa,%eax 1111f9: eb e1 jmp 1111dc <== ALWAYS TAKEN 1111fb: 90 nop <== NOT EXECUTED ) { STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 1111fc: b8 09 00 00 00 mov $0x9,%eax return RTEMS_INVALID_NUMBER; #endif *n = (STRING_TO_TYPE) result; return RTEMS_SUCCESSFUL; } 111201: 8d 65 f4 lea -0xc(%ebp),%esp 111204: 5b pop %ebx 111205: 5e pop %esi 111206: 5f pop %edi 111207: c9 leave 111208: c3 ret 111209: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED /* If the user wants the end pointer back, then return it. */ if ( endptr ) *endptr = end; /* nothing was converted */ if ( end == s ) 11120c: b8 0b 00 00 00 mov $0xb,%eax 111211: eb c9 jmp 1111dc <== ALWAYS TAKEN 0010b6fc : size_t stack_size, rtems_mode initial_modes, rtems_attribute attribute_set, rtems_id *id ) { 10b6fc: 55 push %ebp 10b6fd: 89 e5 mov %esp,%ebp 10b6ff: 57 push %edi 10b700: 56 push %esi 10b701: 53 push %ebx 10b702: 83 ec 1c sub $0x1c,%esp 10b705: 8b 5d 08 mov 0x8(%ebp),%ebx 10b708: 8b 4d 0c mov 0xc(%ebp),%ecx 10b70b: 8b 7d 18 mov 0x18(%ebp),%edi 10b70e: 8b 75 1c mov 0x1c(%ebp),%esi Priority_Control core_priority; RTEMS_API_Control *api; ASR_Information *asr; if ( !id ) 10b711: 85 f6 test %esi,%esi 10b713: 0f 84 37 01 00 00 je 10b850 return RTEMS_INVALID_ADDRESS; if ( !rtems_is_name_valid( name ) ) 10b719: 85 db test %ebx,%ebx 10b71b: 0f 84 cb 00 00 00 je 10b7ec /* * Validate the RTEMS API priority and convert it to the core priority range. */ if ( !_Attributes_Is_system_task( the_attribute_set ) ) { 10b721: 66 85 ff test %di,%di 10b724: 78 1d js 10b743 */ RTEMS_INLINE_ROUTINE bool _RTEMS_tasks_Priority_is_valid ( rtems_task_priority the_priority ) { return ( ( the_priority >= RTEMS_MINIMUM_PRIORITY ) && 10b726: 85 c9 test %ecx,%ecx 10b728: 75 0e jne 10b738 } #endif _RTEMS_Unlock_allocator(); return RTEMS_SUCCESSFUL; 10b72a: b8 13 00 00 00 mov $0x13,%eax } 10b72f: 8d 65 f4 lea -0xc(%ebp),%esp 10b732: 5b pop %ebx 10b733: 5e pop %esi 10b734: 5f pop %edi 10b735: c9 leave 10b736: c3 ret 10b737: 90 nop <== NOT EXECUTED 10b738: 0f b6 05 14 32 12 00 movzbl 0x123214,%eax 10b73f: 39 c1 cmp %eax,%ecx 10b741: 77 e7 ja 10b72a */ /* * Lock the allocator mutex for protection */ _RTEMS_Lock_allocator(); 10b743: 83 ec 0c sub $0xc,%esp 10b746: ff 35 90 74 12 00 pushl 0x127490 10b74c: 89 4d e4 mov %ecx,-0x1c(%ebp) 10b74f: e8 ac 06 00 00 call 10be00 <_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 ); 10b754: c7 04 24 60 73 12 00 movl $0x127360,(%esp) 10b75b: e8 30 10 00 00 call 10c790 <_Objects_Allocate> 10b760: 89 c2 mov %eax,%edx * the event of an error. */ the_thread = _RTEMS_tasks_Allocate(); if ( !the_thread ) { 10b762: 83 c4 10 add $0x10,%esp 10b765: 85 c0 test %eax,%eax 10b767: 8b 4d e4 mov -0x1c(%ebp),%ecx 10b76a: 0f 84 c0 00 00 00 je 10b830 /* * Initialize the core thread for this task. */ status = _Thread_Initialize( 10b770: 50 push %eax 10b771: 53 push %ebx 10b772: 8b 45 14 mov 0x14(%ebp),%eax 10b775: 83 e0 01 and $0x1,%eax 10b778: 50 push %eax 10b779: 6a 00 push $0x0 10b77b: 8b 45 14 mov 0x14(%ebp),%eax 10b77e: c1 e8 09 shr $0x9,%eax 10b781: 83 e0 01 and $0x1,%eax 10b784: 50 push %eax 10b785: 8b 45 14 mov 0x14(%ebp),%eax 10b788: c1 e8 08 shr $0x8,%eax 10b78b: 83 f0 01 xor $0x1,%eax 10b78e: 83 e0 01 and $0x1,%eax 10b791: 50 push %eax 10b792: 51 push %ecx 10b793: 83 e7 01 and $0x1,%edi 10b796: 57 push %edi 10b797: ff 75 10 pushl 0x10(%ebp) 10b79a: 6a 00 push $0x0 10b79c: 52 push %edx 10b79d: 68 60 73 12 00 push $0x127360 10b7a2: 89 55 e4 mov %edx,-0x1c(%ebp) 10b7a5: e8 a6 1d 00 00 call 10d550 <_Thread_Initialize> NULL, /* no budget algorithm callout */ _Modes_Get_interrupt_level(initial_modes), (Objects_Name) name ); if ( !status ) { 10b7aa: 83 c4 30 add $0x30,%esp 10b7ad: 84 c0 test %al,%al 10b7af: 8b 55 e4 mov -0x1c(%ebp),%edx 10b7b2: 74 48 je 10b7fc } api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; asr->is_enabled = _Modes_Is_asr_disabled(initial_modes) ? false : true; 10b7b4: 8b 8a f4 00 00 00 mov 0xf4(%edx),%ecx 10b7ba: 8b 45 14 mov 0x14(%ebp),%eax 10b7bd: c1 e8 0a shr $0xa,%eax 10b7c0: 83 f0 01 xor $0x1,%eax 10b7c3: 83 e0 01 and $0x1,%eax 10b7c6: 88 41 08 mov %al,0x8(%ecx) *id = the_thread->Object.id; 10b7c9: 8b 42 08 mov 0x8(%edx),%eax 10b7cc: 89 06 mov %eax,(%esi) ); } #endif _RTEMS_Unlock_allocator(); 10b7ce: 83 ec 0c sub $0xc,%esp 10b7d1: ff 35 90 74 12 00 pushl 0x127490 10b7d7: e8 6c 06 00 00 call 10be48 <_API_Mutex_Unlock> <== ALWAYS TAKEN 10b7dc: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 10b7de: 83 c4 10 add $0x10,%esp } 10b7e1: 8d 65 f4 lea -0xc(%ebp),%esp 10b7e4: 5b pop %ebx 10b7e5: 5e pop %esi 10b7e6: 5f pop %edi 10b7e7: c9 leave 10b7e8: c3 ret 10b7e9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if ( !id ) return RTEMS_INVALID_ADDRESS; if ( !rtems_is_name_valid( name ) ) 10b7ec: b8 03 00 00 00 mov $0x3,%eax } #endif _RTEMS_Unlock_allocator(); return RTEMS_SUCCESSFUL; } 10b7f1: 8d 65 f4 lea -0xc(%ebp),%esp 10b7f4: 5b pop %ebx 10b7f5: 5e pop %esi 10b7f6: 5f pop %edi 10b7f7: c9 leave 10b7f8: c3 ret 10b7f9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void _RTEMS_tasks_Free ( Thread_Control *the_task ) { _Objects_Free( 10b7fc: 83 ec 0c sub $0xc,%esp 10b7ff: ff 72 08 pushl 0x8(%edx) 10b802: e8 79 13 00 00 call 10cb80 <_Objects_Get_information_id> 10b807: 5a pop %edx 10b808: 59 pop %ecx 10b809: 8b 55 e4 mov -0x1c(%ebp),%edx 10b80c: 52 push %edx 10b80d: 50 push %eax 10b80e: e8 fd 12 00 00 call 10cb10 <_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(); 10b813: 58 pop %eax 10b814: ff 35 90 74 12 00 pushl 0x127490 10b81a: e8 29 06 00 00 call 10be48 <_API_Mutex_Unlock> <== ALWAYS TAKEN 10b81f: b8 0d 00 00 00 mov $0xd,%eax return RTEMS_UNSATISFIED; 10b824: 83 c4 10 add $0x10,%esp } #endif _RTEMS_Unlock_allocator(); return RTEMS_SUCCESSFUL; } 10b827: 8d 65 f4 lea -0xc(%ebp),%esp 10b82a: 5b pop %ebx 10b82b: 5e pop %esi 10b82c: 5f pop %edi 10b82d: c9 leave 10b82e: c3 ret 10b82f: 90 nop <== NOT EXECUTED */ the_thread = _RTEMS_tasks_Allocate(); if ( !the_thread ) { _RTEMS_Unlock_allocator(); 10b830: 83 ec 0c sub $0xc,%esp 10b833: ff 35 90 74 12 00 pushl 0x127490 10b839: e8 0a 06 00 00 call 10be48 <_API_Mutex_Unlock> <== ALWAYS TAKEN 10b83e: b8 05 00 00 00 mov $0x5,%eax return RTEMS_TOO_MANY; 10b843: 83 c4 10 add $0x10,%esp } #endif _RTEMS_Unlock_allocator(); return RTEMS_SUCCESSFUL; } 10b846: 8d 65 f4 lea -0xc(%ebp),%esp 10b849: 5b pop %ebx 10b84a: 5e pop %esi 10b84b: 5f pop %edi 10b84c: c9 leave 10b84d: c3 ret 10b84e: 66 90 xchg %ax,%ax <== NOT EXECUTED Priority_Control core_priority; RTEMS_API_Control *api; ASR_Information *asr; if ( !id ) 10b850: b8 09 00 00 00 mov $0x9,%eax 10b855: e9 d5 fe ff ff jmp 10b72f <== ALWAYS TAKEN 0010b85c : */ rtems_status_code rtems_task_delete( rtems_id id ) { 10b85c: 55 push %ebp 10b85d: 89 e5 mov %esp,%ebp 10b85f: 53 push %ebx 10b860: 83 ec 20 sub $0x20,%esp register Thread_Control *the_thread; Objects_Locations location; Objects_Information *the_information; _RTEMS_Lock_allocator(); 10b863: ff 35 90 74 12 00 pushl 0x127490 10b869: e8 92 05 00 00 call 10be00 <_API_Mutex_Lock> <== ALWAYS TAKEN the_thread = _Thread_Get( id, &location ); 10b86e: 5a pop %edx 10b86f: 59 pop %ecx 10b870: 8d 45 f4 lea -0xc(%ebp),%eax 10b873: 50 push %eax 10b874: ff 75 08 pushl 0x8(%ebp) 10b877: e8 5c 1c 00 00 call 10d4d8 <_Thread_Get> 10b87c: 89 c3 mov %eax,%ebx switch ( location ) { 10b87e: 83 c4 10 add $0x10,%esp 10b881: 8b 45 f4 mov -0xc(%ebp),%eax 10b884: 85 c0 test %eax,%eax 10b886: 75 44 jne 10b8cc case OBJECTS_LOCAL: the_information = _Objects_Get_information_id( the_thread->Object.id ); 10b888: 83 ec 0c sub $0xc,%esp 10b88b: ff 73 08 pushl 0x8(%ebx) 10b88e: e8 ed 12 00 00 call 10cb80 <_Objects_Get_information_id> 0 /* Not used */ ); } #endif _Thread_Close( the_information, the_thread ); 10b893: 5a pop %edx 10b894: 59 pop %ecx 10b895: 53 push %ebx 10b896: 50 push %eax 10b897: e8 04 19 00 00 call 10d1a0 <_Thread_Close> 10b89c: 58 pop %eax 10b89d: ff 73 08 pushl 0x8(%ebx) 10b8a0: e8 db 12 00 00 call 10cb80 <_Objects_Get_information_id> 10b8a5: 5a pop %edx 10b8a6: 59 pop %ecx 10b8a7: 53 push %ebx 10b8a8: 50 push %eax 10b8a9: e8 62 12 00 00 call 10cb10 <_Objects_Free> _RTEMS_tasks_Free( the_thread ); _RTEMS_Unlock_allocator(); 10b8ae: 58 pop %eax 10b8af: ff 35 90 74 12 00 pushl 0x127490 10b8b5: e8 8e 05 00 00 call 10be48 <_API_Mutex_Unlock> <== ALWAYS TAKEN _Thread_Enable_dispatch(); 10b8ba: e8 f5 1b 00 00 call 10d4b4 <_Thread_Enable_dispatch> 10b8bf: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 10b8c1: 83 c4 10 add $0x10,%esp break; } _RTEMS_Unlock_allocator(); return RTEMS_INVALID_ID; } 10b8c4: 8b 5d fc mov -0x4(%ebp),%ebx 10b8c7: c9 leave 10b8c8: c3 ret 10b8c9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED case OBJECTS_ERROR: break; } _RTEMS_Unlock_allocator(); 10b8cc: 83 ec 0c sub $0xc,%esp 10b8cf: ff 35 90 74 12 00 pushl 0x127490 10b8d5: e8 6e 05 00 00 call 10be48 <_API_Mutex_Unlock> 10b8da: b8 04 00 00 00 mov $0x4,%eax return RTEMS_INVALID_ID; 10b8df: 83 c4 10 add $0x10,%esp } 10b8e2: 8b 5d fc mov -0x4(%ebp),%ebx 10b8e5: c9 leave 10b8e6: c3 ret 0010d2a8 : rtems_status_code rtems_task_get_note( rtems_id id, uint32_t notepad, uint32_t *note ) { 10d2a8: 55 push %ebp 10d2a9: 89 e5 mov %esp,%ebp 10d2ab: 56 push %esi 10d2ac: 53 push %ebx 10d2ad: 83 ec 10 sub $0x10,%esp 10d2b0: 8b 45 08 mov 0x8(%ebp),%eax 10d2b3: 8b 75 0c mov 0xc(%ebp),%esi 10d2b6: 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() ) 10d2b9: 80 3d c4 6c 12 00 00 cmpb $0x0,0x126cc4 10d2c0: 74 6e je 10d330 return RTEMS_NOT_CONFIGURED; if ( !note ) 10d2c2: 85 db test %ebx,%ebx 10d2c4: 74 7e je 10d344 /* * 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 ) 10d2c6: 83 fe 0f cmp $0xf,%esi 10d2c9: 77 3d ja 10d308 /* * Optimize the most likely case to avoid the Thread_Dispatch. */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || 10d2cb: 85 c0 test %eax,%eax 10d2cd: 74 45 je 10d314 _Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) { 10d2cf: 8b 15 58 b2 12 00 mov 0x12b258,%edx /* * Optimize the most likely case to avoid the Thread_Dispatch. */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || 10d2d5: 3b 42 08 cmp 0x8(%edx),%eax 10d2d8: 74 40 je 10d31a api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ]; *note = api->Notepads[ notepad ]; return RTEMS_SUCCESSFUL; } the_thread = _Thread_Get( id, &location ); 10d2da: 83 ec 08 sub $0x8,%esp 10d2dd: 8d 55 f4 lea -0xc(%ebp),%edx 10d2e0: 52 push %edx 10d2e1: 50 push %eax 10d2e2: e8 45 1f 00 00 call 10f22c <_Thread_Get> switch ( location ) { 10d2e7: 83 c4 10 add $0x10,%esp 10d2ea: 8b 55 f4 mov -0xc(%ebp),%edx 10d2ed: 85 d2 test %edx,%edx 10d2ef: 75 4b jne 10d33c case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; *note = api->Notepads[ notepad ]; 10d2f1: 8b 80 f4 00 00 00 mov 0xf4(%eax),%eax 10d2f7: 8b 44 b0 20 mov 0x20(%eax,%esi,4),%eax 10d2fb: 89 03 mov %eax,(%ebx) _Thread_Enable_dispatch(); 10d2fd: e8 06 1f 00 00 call 10f208 <_Thread_Enable_dispatch> 10d302: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 10d304: eb 07 jmp 10d30d <== ALWAYS TAKEN 10d306: 66 90 xchg %ax,%ax <== NOT EXECUTED /* * NOTE: There is no check for < RTEMS_NOTEPAD_FIRST because that would * be checking an unsigned number for being negative. */ if ( notepad > RTEMS_NOTEPAD_LAST ) 10d308: b8 0a 00 00 00 mov $0xa,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10d30d: 8d 65 f8 lea -0x8(%ebp),%esp 10d310: 5b pop %ebx 10d311: 5e pop %esi 10d312: c9 leave 10d313: c3 ret /* * Optimize the most likely case to avoid the Thread_Dispatch. */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || 10d314: 8b 15 58 b2 12 00 mov 0x12b258,%edx _Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) { api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ]; *note = api->Notepads[ notepad ]; 10d31a: 8b 82 f4 00 00 00 mov 0xf4(%edx),%eax 10d320: 8b 44 b0 20 mov 0x20(%eax,%esi,4),%eax 10d324: 89 03 mov %eax,(%ebx) 10d326: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10d328: 8d 65 f8 lea -0x8(%ebp),%esp 10d32b: 5b pop %ebx 10d32c: 5e pop %esi 10d32d: c9 leave 10d32e: c3 ret 10d32f: 90 nop <== NOT EXECUTED { register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; if ( !rtems_configuration_get_notepads_enabled() ) 10d330: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10d335: 8d 65 f8 lea -0x8(%ebp),%esp 10d338: 5b pop %ebx 10d339: 5e pop %esi 10d33a: c9 leave 10d33b: c3 ret *note = api->Notepads[ notepad ]; return RTEMS_SUCCESSFUL; } the_thread = _Thread_Get( id, &location ); switch ( location ) { 10d33c: b8 04 00 00 00 mov $0x4,%eax 10d341: eb ca jmp 10d30d <== ALWAYS TAKEN 10d343: 90 nop <== NOT EXECUTED RTEMS_API_Control *api; if ( !rtems_configuration_get_notepads_enabled() ) return RTEMS_NOT_CONFIGURED; if ( !note ) 10d344: b8 09 00 00 00 mov $0x9,%eax 10d349: eb c2 jmp 10d30d <== ALWAYS TAKEN 0010b8e8 : rtems_status_code rtems_task_ident( rtems_name name, uint32_t node, rtems_id *id ) { 10b8e8: 55 push %ebp 10b8e9: 89 e5 mov %esp,%ebp 10b8eb: 83 ec 08 sub $0x8,%esp 10b8ee: 8b 55 08 mov 0x8(%ebp),%edx 10b8f1: 8b 45 10 mov 0x10(%ebp),%eax Objects_Name_or_id_lookup_errors status; if ( !id ) 10b8f4: 85 c0 test %eax,%eax 10b8f6: 74 30 je 10b928 return RTEMS_INVALID_ADDRESS; if ( name == OBJECTS_ID_OF_SELF ) { 10b8f8: 85 d2 test %edx,%edx 10b8fa: 75 10 jne 10b90c *id = _Thread_Executing->Object.id; 10b8fc: 8b 15 98 74 12 00 mov 0x127498,%edx 10b902: 8b 52 08 mov 0x8(%edx),%edx 10b905: 89 10 mov %edx,(%eax) 10b907: 31 c0 xor %eax,%eax } status = _Objects_Name_to_id_u32( &_RTEMS_tasks_Information, name, node, id ); return _Status_Object_name_errors_to_status[ status ]; } 10b909: c9 leave 10b90a: c3 ret 10b90b: 90 nop <== NOT EXECUTED if ( name == OBJECTS_ID_OF_SELF ) { *id = _Thread_Executing->Object.id; return RTEMS_SUCCESSFUL; } status = _Objects_Name_to_id_u32( &_RTEMS_tasks_Information, name, node, id ); 10b90c: 50 push %eax 10b90d: ff 75 0c pushl 0xc(%ebp) 10b910: 52 push %edx 10b911: 68 60 73 12 00 push $0x127360 10b916: e8 a9 14 00 00 call 10cdc4 <_Objects_Name_to_id_u32> return _Status_Object_name_errors_to_status[ status ]; 10b91b: 8b 04 85 6c 0d 12 00 mov 0x120d6c(,%eax,4),%eax 10b922: 83 c4 10 add $0x10,%esp } 10b925: c9 leave 10b926: c3 ret 10b927: 90 nop <== NOT EXECUTED rtems_id *id ) { Objects_Name_or_id_lookup_errors status; if ( !id ) 10b928: b0 09 mov $0x9,%al } status = _Objects_Name_to_id_u32( &_RTEMS_tasks_Information, name, node, id ); return _Status_Object_name_errors_to_status[ status ]; } 10b92a: c9 leave 10b92b: c3 ret 00117cec : */ rtems_status_code rtems_task_is_suspended( rtems_id id ) { 117cec: 55 push %ebp 117ced: 89 e5 mov %esp,%ebp 117cef: 83 ec 20 sub $0x20,%esp register Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 117cf2: 8d 45 f4 lea -0xc(%ebp),%eax 117cf5: 50 push %eax 117cf6: ff 75 08 pushl 0x8(%ebp) 117cf9: e8 8e 38 00 00 call 11b58c <_Thread_Get> switch ( location ) { 117cfe: 83 c4 10 add $0x10,%esp 117d01: 8b 55 f4 mov -0xc(%ebp),%edx 117d04: 85 d2 test %edx,%edx 117d06: 74 08 je 117d10 117d08: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 117d0d: c9 leave 117d0e: c3 ret 117d0f: 90 nop <== NOT EXECUTED the_thread = _Thread_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_States_Is_suspended( the_thread->current_state ) ) { 117d10: f6 40 10 02 testb $0x2,0x10(%eax) 117d14: 74 0e je 117d24 _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 117d16: e8 21 38 00 00 call 11b53c <_Thread_Enable_dispatch> 117d1b: b8 0f 00 00 00 mov $0xf,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 117d20: c9 leave 117d21: c3 ret 117d22: 66 90 xchg %ax,%ax <== NOT EXECUTED the_thread = _Thread_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_States_Is_suspended( the_thread->current_state ) ) { _Thread_Enable_dispatch(); 117d24: e8 13 38 00 00 call 11b53c <_Thread_Enable_dispatch> 117d29: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 117d2b: c9 leave 117d2c: c3 ret 00112944 : rtems_status_code rtems_task_mode( rtems_mode mode_set, rtems_mode mask, rtems_mode *previous_mode_set ) { 112944: 55 push %ebp 112945: 89 e5 mov %esp,%ebp 112947: 57 push %edi 112948: 56 push %esi 112949: 53 push %ebx 11294a: 83 ec 1c sub $0x1c,%esp 11294d: 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 ) 112950: 85 c9 test %ecx,%ecx 112952: 0f 84 1c 01 00 00 je 112a74 return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; 112958: 8b 1d 98 74 12 00 mov 0x127498,%ebx api = executing->API_Extensions[ THREAD_API_RTEMS ]; 11295e: 8b bb f4 00 00 00 mov 0xf4(%ebx),%edi asr = &api->Signal; old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT; 112964: 80 7b 75 01 cmpb $0x1,0x75(%ebx) 112968: 19 f6 sbb %esi,%esi 11296a: 81 e6 00 01 00 00 and $0x100,%esi if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE ) 112970: 8b 53 7c mov 0x7c(%ebx),%edx 112973: 85 d2 test %edx,%edx 112975: 0f 85 b5 00 00 00 jne 112a30 if ( !previous_mode_set ) return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; api = executing->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; 11297b: 80 7f 08 01 cmpb $0x1,0x8(%edi) 11297f: 19 d2 sbb %edx,%edx 112981: 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(); 112987: 89 55 e4 mov %edx,-0x1c(%ebp) 11298a: 89 4d e0 mov %ecx,-0x20(%ebp) 11298d: e8 1a bf ff ff call 10e8ac <_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; 112992: 8b 55 e4 mov -0x1c(%ebp),%edx 112995: 09 d0 or %edx,%eax old_mode |= _ISR_Get_level(); *previous_mode_set = old_mode; 112997: 09 f0 or %esi,%eax 112999: 8b 4d e0 mov -0x20(%ebp),%ecx 11299c: 89 01 mov %eax,(%ecx) /* * These are generic thread scheduling characteristics. */ if ( mask & RTEMS_PREEMPT_MASK ) 11299e: f7 45 0c 00 01 00 00 testl $0x100,0xc(%ebp) 1129a5: 74 0f je 1129b6 executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false; 1129a7: 8b 45 08 mov 0x8(%ebp),%eax 1129aa: c1 e8 08 shr $0x8,%eax 1129ad: 83 f0 01 xor $0x1,%eax 1129b0: 83 e0 01 and $0x1,%eax 1129b3: 88 43 75 mov %al,0x75(%ebx) if ( mask & RTEMS_TIMESLICE_MASK ) { 1129b6: f7 45 0c 00 02 00 00 testl $0x200,0xc(%ebp) 1129bd: 74 18 je 1129d7 if ( _Modes_Is_timeslice(mode_set) ) { 1129bf: f7 45 08 00 02 00 00 testl $0x200,0x8(%ebp) 1129c6: 74 74 je 112a3c executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; 1129c8: c7 43 7c 01 00 00 00 movl $0x1,0x7c(%ebx) executing->cpu_time_budget = _Thread_Ticks_per_timeslice; 1129cf: a1 a4 73 12 00 mov 0x1273a4,%eax 1129d4: 89 43 78 mov %eax,0x78(%ebx) /* * Set the new interrupt level */ if ( mask & RTEMS_INTERRUPT_MASK ) 1129d7: f6 45 0c 01 testb $0x1,0xc(%ebp) 1129db: 74 07 je 1129e4 */ RTEMS_INLINE_ROUTINE void _Modes_Set_interrupt_level ( Modes_Control mode_set ) { _ISR_Set_level( _Modes_Get_interrupt_level( mode_set ) ); 1129dd: f6 45 08 01 testb $0x1,0x8(%ebp) 1129e1: 74 69 je 112a4c 1129e3: fa cli */ is_asr_enabled = false; needs_asr_dispatching = false; if ( mask & RTEMS_ASR_MASK ) { 1129e4: f7 45 0c 00 04 00 00 testl $0x400,0xc(%ebp) 1129eb: 74 2c je 112a19 * Output: * *previous_mode_set - previous mode set * always return RTEMS_SUCCESSFUL; */ rtems_status_code rtems_task_mode( 1129ed: 8b 45 08 mov 0x8(%ebp),%eax 1129f0: c1 e8 0a shr $0xa,%eax 1129f3: 83 f0 01 xor $0x1,%eax 1129f6: 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; 1129f9: 38 47 08 cmp %al,0x8(%edi) 1129fc: 74 1b je 112a19 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; 1129fe: 88 47 08 mov %al,0x8(%edi) ) { rtems_signal_set _signals; ISR_Level _level; _ISR_Disable( _level ); 112a01: 9c pushf 112a02: fa cli 112a03: 58 pop %eax _signals = information->signals_pending; 112a04: 8b 57 18 mov 0x18(%edi),%edx information->signals_pending = information->signals_posted; 112a07: 8b 4f 14 mov 0x14(%edi),%ecx 112a0a: 89 4f 18 mov %ecx,0x18(%edi) information->signals_posted = _signals; 112a0d: 89 57 14 mov %edx,0x14(%edi) _ISR_Enable( _level ); 112a10: 50 push %eax 112a11: 9d popf if ( !previous_mode_set ) return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; api = executing->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; 112a12: 8b 47 14 mov 0x14(%edi),%eax 112a15: 85 c0 test %eax,%eax 112a17: 75 53 jne 112a6c 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; 112a19: 31 db xor %ebx,%ebx } } } if ( _System_state_Is_up( _System_state_Get() ) ) 112a1b: 83 3d a0 75 12 00 03 cmpl $0x3,0x1275a0 112a22: 74 2c je 112a50 <== NEVER TAKEN if ( _Thread_Evaluate_mode() || needs_asr_dispatching ) _Thread_Dispatch(); 112a24: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; } 112a26: 83 c4 1c add $0x1c,%esp 112a29: 5b pop %ebx 112a2a: 5e pop %esi 112a2b: 5f pop %edi 112a2c: c9 leave 112a2d: c3 ret 112a2e: 66 90 xchg %ax,%ax <== NOT EXECUTED old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT; if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE ) old_mode |= RTEMS_NO_TIMESLICE; else old_mode |= RTEMS_TIMESLICE; 112a30: 81 ce 00 02 00 00 or $0x200,%esi 112a36: e9 40 ff ff ff jmp 11297b <== ALWAYS TAKEN 112a3b: 90 nop <== NOT EXECUTED if ( mask & RTEMS_TIMESLICE_MASK ) { if ( _Modes_Is_timeslice(mode_set) ) { executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; executing->cpu_time_budget = _Thread_Ticks_per_timeslice; } else executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; 112a3c: c7 43 7c 00 00 00 00 movl $0x0,0x7c(%ebx) /* * Set the new interrupt level */ if ( mask & RTEMS_INTERRUPT_MASK ) 112a43: f6 45 0c 01 testb $0x1,0xc(%ebp) 112a47: 74 9b je 1129e4 112a49: eb 92 jmp 1129dd <== ALWAYS TAKEN 112a4b: 90 nop <== NOT EXECUTED 112a4c: fb sti 112a4d: eb 95 jmp 1129e4 112a4f: 90 nop <== NOT EXECUTED } } } if ( _System_state_Is_up( _System_state_Get() ) ) if ( _Thread_Evaluate_mode() || needs_asr_dispatching ) 112a50: e8 a7 02 00 00 call 112cfc <_Thread_Evaluate_mode> <== ALWAYS TAKEN 112a55: 84 c0 test %al,%al 112a57: 75 04 jne 112a5d 112a59: 84 db test %bl,%bl 112a5b: 74 c7 je 112a24 _Thread_Dispatch(); 112a5d: e8 f6 a8 ff ff call 10d358 <_Thread_Dispatch> 112a62: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; } 112a64: 83 c4 1c add $0x1c,%esp 112a67: 5b pop %ebx 112a68: 5e pop %esi 112a69: 5f pop %edi 112a6a: c9 leave 112a6b: c3 ret 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; 112a6c: c6 43 74 01 movb $0x1,0x74(%ebx) 112a70: b3 01 mov $0x1,%bl 112a72: eb a7 jmp 112a1b <== ALWAYS TAKEN ASR_Information *asr; bool is_asr_enabled = false; bool needs_asr_dispatching = false; rtems_mode old_mode; if ( !previous_mode_set ) 112a74: b8 09 00 00 00 mov $0x9,%eax if ( _System_state_Is_up( _System_state_Get() ) ) if ( _Thread_Evaluate_mode() || needs_asr_dispatching ) _Thread_Dispatch(); return RTEMS_SUCCESSFUL; } 112a79: 83 c4 1c add $0x1c,%esp 112a7c: 5b pop %ebx 112a7d: 5e pop %esi 112a7e: 5f pop %edi 112a7f: c9 leave 112a80: c3 ret 0010c36c : rtems_status_code rtems_task_restart( rtems_id id, uint32_t argument ) { 10c36c: 55 push %ebp 10c36d: 89 e5 mov %esp,%ebp 10c36f: 83 ec 20 sub $0x20,%esp register Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 10c372: 8d 45 f4 lea -0xc(%ebp),%eax 10c375: 50 push %eax 10c376: ff 75 08 pushl 0x8(%ebp) 10c379: e8 32 1c 00 00 call 10dfb0 <_Thread_Get> switch ( location ) { 10c37e: 83 c4 10 add $0x10,%esp 10c381: 8b 4d f4 mov -0xc(%ebp),%ecx 10c384: 85 c9 test %ecx,%ecx 10c386: 75 20 jne 10c3a8 case OBJECTS_LOCAL: if ( _Thread_Restart( the_thread, NULL, argument ) ) { 10c388: 52 push %edx 10c389: ff 75 0c pushl 0xc(%ebp) 10c38c: 6a 00 push $0x0 10c38e: 50 push %eax 10c38f: e8 50 24 00 00 call 10e7e4 <_Thread_Restart> 10c394: 83 c4 10 add $0x10,%esp 10c397: 84 c0 test %al,%al 10c399: 75 15 jne 10c3b0 _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 10c39b: e8 ec 1b 00 00 call 10df8c <_Thread_Enable_dispatch> 10c3a0: b8 0e 00 00 00 mov $0xe,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10c3a5: c9 leave 10c3a6: c3 ret 10c3a7: 90 nop <== NOT EXECUTED { register Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); switch ( location ) { 10c3a8: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10c3ad: c9 leave 10c3ae: c3 ret 10c3af: 90 nop <== NOT EXECUTED the_thread = _Thread_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( _Thread_Restart( the_thread, NULL, argument ) ) { _Thread_Enable_dispatch(); 10c3b0: e8 d7 1b 00 00 call 10df8c <_Thread_Enable_dispatch> 10c3b5: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10c3b7: c9 leave 10c3b8: c3 ret 0010f0e8 : */ rtems_status_code rtems_task_resume( rtems_id id ) { 10f0e8: 55 push %ebp 10f0e9: 89 e5 mov %esp,%ebp 10f0eb: 83 ec 20 sub $0x20,%esp register Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 10f0ee: 8d 45 f4 lea -0xc(%ebp),%eax 10f0f1: 50 push %eax 10f0f2: ff 75 08 pushl 0x8(%ebp) 10f0f5: e8 12 1d 00 00 call 110e0c <_Thread_Get> switch ( location ) { 10f0fa: 83 c4 10 add $0x10,%esp 10f0fd: 8b 55 f4 mov -0xc(%ebp),%edx 10f100: 85 d2 test %edx,%edx 10f102: 74 08 je 10f10c 10f104: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10f109: c9 leave 10f10a: c3 ret 10f10b: 90 nop <== NOT EXECUTED the_thread = _Thread_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( _States_Is_suspended( the_thread->current_state ) ) { 10f10c: f6 40 10 02 testb $0x2,0x10(%eax) 10f110: 75 0e jne 10f120 _Thread_Resume( the_thread, true ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 10f112: e8 a5 1c 00 00 call 110dbc <_Thread_Enable_dispatch> 10f117: b8 0e 00 00 00 mov $0xe,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10f11c: c9 leave 10f11d: c3 ret 10f11e: 66 90 xchg %ax,%ax <== NOT EXECUTED the_thread = _Thread_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( _States_Is_suspended( the_thread->current_state ) ) { _Thread_Resume( the_thread, true ); 10f120: 83 ec 08 sub $0x8,%esp 10f123: 6a 01 push $0x1 10f125: 50 push %eax 10f126: e8 15 25 00 00 call 111640 <_Thread_Resume> _Thread_Enable_dispatch(); 10f12b: e8 8c 1c 00 00 call 110dbc <_Thread_Enable_dispatch> 10f130: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 10f132: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10f135: c9 leave 10f136: c3 ret 0010d420 : rtems_status_code rtems_task_set_note( rtems_id id, uint32_t notepad, uint32_t note ) { 10d420: 55 push %ebp 10d421: 89 e5 mov %esp,%ebp 10d423: 56 push %esi 10d424: 53 push %ebx 10d425: 83 ec 10 sub $0x10,%esp 10d428: 8b 45 08 mov 0x8(%ebp),%eax 10d42b: 8b 5d 0c mov 0xc(%ebp),%ebx 10d42e: 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() ) 10d431: 80 3d c4 6c 12 00 00 cmpb $0x0,0x126cc4 10d438: 74 66 je 10d4a0 /* * 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 ) 10d43a: 83 fb 0f cmp $0xf,%ebx 10d43d: 77 39 ja 10d478 /* * Optimize the most likely case to avoid the Thread_Dispatch. */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || 10d43f: 85 c0 test %eax,%eax 10d441: 74 41 je 10d484 _Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) { 10d443: 8b 15 58 b2 12 00 mov 0x12b258,%edx /* * Optimize the most likely case to avoid the Thread_Dispatch. */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || 10d449: 3b 42 08 cmp 0x8(%edx),%eax 10d44c: 74 3c je 10d48a api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ]; api->Notepads[ notepad ] = note; return RTEMS_SUCCESSFUL; } the_thread = _Thread_Get( id, &location ); 10d44e: 83 ec 08 sub $0x8,%esp 10d451: 8d 55 f4 lea -0xc(%ebp),%edx 10d454: 52 push %edx 10d455: 50 push %eax 10d456: e8 d1 1d 00 00 call 10f22c <_Thread_Get> switch ( location ) { 10d45b: 83 c4 10 add $0x10,%esp 10d45e: 8b 55 f4 mov -0xc(%ebp),%edx 10d461: 85 d2 test %edx,%edx 10d463: 75 47 jne 10d4ac case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; api->Notepads[ notepad ] = note; 10d465: 8b 80 f4 00 00 00 mov 0xf4(%eax),%eax 10d46b: 89 74 98 20 mov %esi,0x20(%eax,%ebx,4) _Thread_Enable_dispatch(); 10d46f: e8 94 1d 00 00 call 10f208 <_Thread_Enable_dispatch> 10d474: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 10d476: eb 05 jmp 10d47d <== ALWAYS TAKEN /* * NOTE: There is no check for < RTEMS_NOTEPAD_FIRST because that would * be checking an unsigned number for being negative. */ if ( notepad > RTEMS_NOTEPAD_LAST ) 10d478: b8 0a 00 00 00 mov $0xa,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10d47d: 8d 65 f8 lea -0x8(%ebp),%esp 10d480: 5b pop %ebx 10d481: 5e pop %esi 10d482: c9 leave 10d483: c3 ret /* * Optimize the most likely case to avoid the Thread_Dispatch. */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || 10d484: 8b 15 58 b2 12 00 mov 0x12b258,%edx _Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) { api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ]; api->Notepads[ notepad ] = note; 10d48a: 8b 82 f4 00 00 00 mov 0xf4(%edx),%eax 10d490: 89 74 98 20 mov %esi,0x20(%eax,%ebx,4) 10d494: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10d496: 8d 65 f8 lea -0x8(%ebp),%esp 10d499: 5b pop %ebx 10d49a: 5e pop %esi 10d49b: c9 leave 10d49c: c3 ret 10d49d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED { register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; if ( !rtems_configuration_get_notepads_enabled() ) 10d4a0: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10d4a5: 8d 65 f8 lea -0x8(%ebp),%esp 10d4a8: 5b pop %ebx 10d4a9: 5e pop %esi 10d4aa: c9 leave 10d4ab: c3 ret api->Notepads[ notepad ] = note; return RTEMS_SUCCESSFUL; } the_thread = _Thread_Get( id, &location ); switch ( location ) { 10d4ac: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10d4b1: 8d 65 f8 lea -0x8(%ebp),%esp 10d4b4: 5b pop %ebx 10d4b5: 5e pop %esi 10d4b6: c9 leave 10d4b7: c3 ret 0010fe6c : rtems_status_code rtems_task_set_priority( rtems_id id, rtems_task_priority new_priority, rtems_task_priority *old_priority ) { 10fe6c: 55 push %ebp 10fe6d: 89 e5 mov %esp,%ebp 10fe6f: 56 push %esi 10fe70: 53 push %ebx 10fe71: 83 ec 10 sub $0x10,%esp 10fe74: 8b 5d 0c mov 0xc(%ebp),%ebx 10fe77: 8b 75 10 mov 0x10(%ebp),%esi register Thread_Control *the_thread; Objects_Locations location; if ( new_priority != RTEMS_CURRENT_PRIORITY && 10fe7a: 85 db test %ebx,%ebx 10fe7c: 74 0b je 10fe89 */ RTEMS_INLINE_ROUTINE bool _RTEMS_tasks_Priority_is_valid ( rtems_task_priority the_priority ) { return ( ( the_priority >= RTEMS_MINIMUM_PRIORITY ) && 10fe7e: 0f b6 05 54 8d 12 00 movzbl 0x128d54,%eax 10fe85: 39 c3 cmp %eax,%ebx 10fe87: 77 5f ja 10fee8 <== ALWAYS TAKEN !_RTEMS_tasks_Priority_is_valid( new_priority ) ) return RTEMS_INVALID_PRIORITY; if ( !old_priority ) 10fe89: 85 f6 test %esi,%esi 10fe8b: 74 67 je 10fef4 <== ALWAYS TAKEN return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get( id, &location ); 10fe8d: 83 ec 08 sub $0x8,%esp 10fe90: 8d 45 f4 lea -0xc(%ebp),%eax 10fe93: 50 push %eax 10fe94: ff 75 08 pushl 0x8(%ebp) 10fe97: e8 68 1e 00 00 call 111d04 <_Thread_Get> switch ( location ) { 10fe9c: 83 c4 10 add $0x10,%esp 10fe9f: 8b 55 f4 mov -0xc(%ebp),%edx 10fea2: 85 d2 test %edx,%edx 10fea4: 75 36 jne 10fedc case OBJECTS_LOCAL: /* XXX need helper to "convert" from core priority */ *old_priority = the_thread->current_priority; 10fea6: 8b 50 14 mov 0x14(%eax),%edx 10fea9: 89 16 mov %edx,(%esi) if ( new_priority != RTEMS_CURRENT_PRIORITY ) { 10feab: 85 db test %ebx,%ebx 10fead: 74 1c je 10fecb the_thread->real_priority = new_priority; 10feaf: 89 58 18 mov %ebx,0x18(%eax) if ( the_thread->resource_count == 0 || 10feb2: 8b 48 1c mov 0x1c(%eax),%ecx 10feb5: 85 c9 test %ecx,%ecx 10feb7: 74 05 je 10febe the_thread->current_priority > new_priority ) 10feb9: 3b 58 14 cmp 0x14(%eax),%ebx 10febc: 73 0d jae 10fecb <== NEVER TAKEN _Thread_Change_priority( the_thread, new_priority, false ); 10febe: 52 push %edx 10febf: 6a 00 push $0x0 10fec1: 53 push %ebx 10fec2: 50 push %eax 10fec3: e8 04 19 00 00 call 1117cc <_Thread_Change_priority> 10fec8: 83 c4 10 add $0x10,%esp } _Thread_Enable_dispatch(); 10fecb: e8 e4 1d 00 00 call 111cb4 <_Thread_Enable_dispatch> 10fed0: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10fed2: 8d 65 f8 lea -0x8(%ebp),%esp 10fed5: 5b pop %ebx 10fed6: 5e pop %esi 10fed7: c9 leave 10fed8: c3 ret 10fed9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if ( !old_priority ) return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get( id, &location ); switch ( location ) { 10fedc: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10fee1: 8d 65 f8 lea -0x8(%ebp),%esp 10fee4: 5b pop %ebx 10fee5: 5e pop %esi 10fee6: c9 leave 10fee7: c3 ret 10fee8: b8 13 00 00 00 mov $0x13,%eax 10feed: 8d 65 f8 lea -0x8(%ebp),%esp 10fef0: 5b pop %ebx 10fef1: 5e pop %esi 10fef2: c9 leave 10fef3: c3 ret if ( new_priority != RTEMS_CURRENT_PRIORITY && !_RTEMS_tasks_Priority_is_valid( new_priority ) ) return RTEMS_INVALID_PRIORITY; if ( !old_priority ) 10fef4: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10fef9: 8d 65 f8 lea -0x8(%ebp),%esp 10fefc: 5b pop %ebx 10fefd: 5e pop %esi 10fefe: c9 leave 10feff: c3 ret 0010b9a0 : rtems_status_code rtems_task_start( rtems_id id, rtems_task_entry entry_point, rtems_task_argument argument ) { 10b9a0: 55 push %ebp 10b9a1: 89 e5 mov %esp,%ebp 10b9a3: 53 push %ebx 10b9a4: 83 ec 14 sub $0x14,%esp 10b9a7: 8b 5d 0c mov 0xc(%ebp),%ebx register Thread_Control *the_thread; Objects_Locations location; if ( entry_point == NULL ) 10b9aa: 85 db test %ebx,%ebx 10b9ac: 74 4e je 10b9fc return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get( id, &location ); 10b9ae: 83 ec 08 sub $0x8,%esp 10b9b1: 8d 45 f4 lea -0xc(%ebp),%eax 10b9b4: 50 push %eax 10b9b5: ff 75 08 pushl 0x8(%ebp) 10b9b8: e8 1b 1b 00 00 call 10d4d8 <_Thread_Get> switch ( location ) { 10b9bd: 83 c4 10 add $0x10,%esp 10b9c0: 8b 55 f4 mov -0xc(%ebp),%edx 10b9c3: 85 d2 test %edx,%edx 10b9c5: 75 29 jne 10b9f0 case OBJECTS_LOCAL: if ( _Thread_Start( 10b9c7: 83 ec 0c sub $0xc,%esp 10b9ca: ff 75 10 pushl 0x10(%ebp) 10b9cd: 6a 00 push $0x0 10b9cf: 53 push %ebx 10b9d0: 6a 00 push $0x0 10b9d2: 50 push %eax 10b9d3: e8 ec 25 00 00 call 10dfc4 <_Thread_Start> 10b9d8: 83 c4 20 add $0x20,%esp 10b9db: 84 c0 test %al,%al 10b9dd: 75 29 jne 10ba08 the_thread, THREAD_START_NUMERIC, entry_point, NULL, argument ) ) { _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 10b9df: e8 d0 1a 00 00 call 10d4b4 <_Thread_Enable_dispatch> 10b9e4: b8 0e 00 00 00 mov $0xe,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10b9e9: 8b 5d fc mov -0x4(%ebp),%ebx 10b9ec: c9 leave 10b9ed: c3 ret 10b9ee: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( entry_point == NULL ) return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get( id, &location ); switch ( location ) { 10b9f0: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10b9f5: 8b 5d fc mov -0x4(%ebp),%ebx 10b9f8: c9 leave 10b9f9: c3 ret 10b9fa: 66 90 xchg %ax,%ax <== NOT EXECUTED ) { register Thread_Control *the_thread; Objects_Locations location; if ( entry_point == NULL ) 10b9fc: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10ba01: 8b 5d fc mov -0x4(%ebp),%ebx 10ba04: c9 leave 10ba05: c3 ret 10ba06: 66 90 xchg %ax,%ax <== NOT EXECUTED switch ( location ) { case OBJECTS_LOCAL: if ( _Thread_Start( the_thread, THREAD_START_NUMERIC, entry_point, NULL, argument ) ) { _Thread_Enable_dispatch(); 10ba08: e8 a7 1a 00 00 call 10d4b4 <_Thread_Enable_dispatch> 10ba0d: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10ba0f: 8b 5d fc mov -0x4(%ebp),%ebx 10ba12: c9 leave 10ba13: c3 ret 00110874 : */ rtems_status_code rtems_task_suspend( rtems_id id ) { 110874: 55 push %ebp 110875: 89 e5 mov %esp,%ebp 110877: 83 ec 20 sub $0x20,%esp register Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 11087a: 8d 45 f4 lea -0xc(%ebp),%eax 11087d: 50 push %eax 11087e: ff 75 08 pushl 0x8(%ebp) 110881: e8 52 cc ff ff call 10d4d8 <_Thread_Get> switch ( location ) { 110886: 83 c4 10 add $0x10,%esp 110889: 8b 55 f4 mov -0xc(%ebp),%edx 11088c: 85 d2 test %edx,%edx 11088e: 74 08 je 110898 110890: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 110895: c9 leave 110896: c3 ret 110897: 90 nop <== NOT EXECUTED the_thread = _Thread_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_States_Is_suspended( the_thread->current_state ) ) { 110898: f6 40 10 02 testb $0x2,0x10(%eax) 11089c: 74 0e je 1108ac _Thread_Suspend( the_thread ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 11089e: e8 11 cc ff ff call 10d4b4 <_Thread_Enable_dispatch> 1108a3: b8 0f 00 00 00 mov $0xf,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1108a8: c9 leave 1108a9: c3 ret 1108aa: 66 90 xchg %ax,%ax <== NOT EXECUTED the_thread = _Thread_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_States_Is_suspended( the_thread->current_state ) ) { _Thread_Suspend( the_thread ); 1108ac: 83 ec 0c sub $0xc,%esp 1108af: 50 push %eax 1108b0: e8 5b 0a 00 00 call 111310 <_Thread_Suspend> _Thread_Enable_dispatch(); 1108b5: e8 fa cb ff ff call 10d4b4 <_Thread_Enable_dispatch> 1108ba: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 1108bc: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1108bf: c9 leave 1108c0: c3 ret 0012e344 : rtems_status_code rtems_task_variable_add( rtems_id tid, void **ptr, void (*dtor)(void *) ) { 12e344: 55 push %ebp 12e345: 89 e5 mov %esp,%ebp 12e347: 57 push %edi 12e348: 56 push %esi 12e349: 53 push %ebx 12e34a: 83 ec 1c sub $0x1c,%esp 12e34d: 8b 5d 0c mov 0xc(%ebp),%ebx 12e350: 8b 7d 10 mov 0x10(%ebp),%edi Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp, *new; if ( !ptr ) 12e353: 85 db test %ebx,%ebx 12e355: 0f 84 9d 00 00 00 je 12e3f8 return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get (tid, &location); 12e35b: 83 ec 08 sub $0x8,%esp 12e35e: 8d 45 e4 lea -0x1c(%ebp),%eax 12e361: 50 push %eax 12e362: ff 75 08 pushl 0x8(%ebp) 12e365: e8 66 56 fe ff call 1139d0 <_Thread_Get> 12e36a: 89 c6 mov %eax,%esi switch (location) { 12e36c: 83 c4 10 add $0x10,%esp 12e36f: 8b 45 e4 mov -0x1c(%ebp),%eax 12e372: 85 c0 test %eax,%eax 12e374: 74 0e je 12e384 12e376: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 12e37b: 8d 65 f4 lea -0xc(%ebp),%esp 12e37e: 5b pop %ebx 12e37f: 5e pop %esi 12e380: 5f pop %edi 12e381: c9 leave 12e382: c3 ret 12e383: 90 nop <== NOT EXECUTED case OBJECTS_LOCAL: /* * Figure out if the variable is already in this task's list. */ tvp = the_thread->task_variables; 12e384: 8b 86 04 01 00 00 mov 0x104(%esi),%eax while (tvp) { 12e38a: 85 c0 test %eax,%eax 12e38c: 75 44 jne 12e3d2 12e38e: 66 90 xchg %ax,%ax } /* * Now allocate memory for this task variable. */ new = (rtems_task_variable_t *) 12e390: 83 ec 0c sub $0xc,%esp 12e393: 6a 14 push $0x14 12e395: e8 9a 67 fe ff call 114b34 <_Workspace_Allocate> _Workspace_Allocate(sizeof(rtems_task_variable_t)); if (new == NULL) { 12e39a: 83 c4 10 add $0x10,%esp 12e39d: 85 c0 test %eax,%eax 12e39f: 74 4b je 12e3ec _Thread_Enable_dispatch(); return RTEMS_NO_MEMORY; } new->gval = *ptr; 12e3a1: 8b 13 mov (%ebx),%edx 12e3a3: 89 50 08 mov %edx,0x8(%eax) new->ptr = ptr; 12e3a6: 89 58 04 mov %ebx,0x4(%eax) new->dtor = dtor; 12e3a9: 89 78 10 mov %edi,0x10(%eax) new->next = (struct rtems_task_variable_tt *)the_thread->task_variables; 12e3ac: 8b 96 04 01 00 00 mov 0x104(%esi),%edx 12e3b2: 89 10 mov %edx,(%eax) the_thread->task_variables = new; 12e3b4: 89 86 04 01 00 00 mov %eax,0x104(%esi) _Thread_Enable_dispatch(); 12e3ba: e8 ed 55 fe ff call 1139ac <_Thread_Enable_dispatch> 12e3bf: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 12e3c1: 8d 65 f4 lea -0xc(%ebp),%esp 12e3c4: 5b pop %ebx 12e3c5: 5e pop %esi 12e3c6: 5f pop %edi 12e3c7: c9 leave 12e3c8: c3 ret 12e3c9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if (tvp->ptr == ptr) { tvp->dtor = dtor; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } tvp = (rtems_task_variable_t *)tvp->next; 12e3cc: 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) { 12e3ce: 85 c0 test %eax,%eax 12e3d0: 74 be je 12e390 if (tvp->ptr == ptr) { 12e3d2: 39 58 04 cmp %ebx,0x4(%eax) 12e3d5: 75 f5 jne 12e3cc tvp->dtor = dtor; 12e3d7: 89 78 10 mov %edi,0x10(%eax) _Thread_Enable_dispatch(); 12e3da: e8 cd 55 fe ff call 1139ac <_Thread_Enable_dispatch> 12e3df: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 12e3e1: 8d 65 f4 lea -0xc(%ebp),%esp 12e3e4: 5b pop %ebx 12e3e5: 5e pop %esi 12e3e6: 5f pop %edi 12e3e7: c9 leave 12e3e8: c3 ret 12e3e9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED * Now allocate memory for this task variable. */ new = (rtems_task_variable_t *) _Workspace_Allocate(sizeof(rtems_task_variable_t)); if (new == NULL) { _Thread_Enable_dispatch(); 12e3ec: e8 bb 55 fe ff call 1139ac <_Thread_Enable_dispatch> 12e3f1: b8 1a 00 00 00 mov $0x1a,%eax return RTEMS_NO_MEMORY; 12e3f6: eb 83 jmp 12e37b <== ALWAYS TAKEN { Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp, *new; if ( !ptr ) 12e3f8: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 12e3fd: 8d 65 f4 lea -0xc(%ebp),%esp 12e400: 5b pop %ebx 12e401: 5e pop %esi 12e402: 5f pop %edi 12e403: c9 leave 12e404: c3 ret 0012e408 : rtems_status_code rtems_task_variable_delete( rtems_id tid, void **ptr ) { 12e408: 55 push %ebp 12e409: 89 e5 mov %esp,%ebp 12e40b: 53 push %ebx 12e40c: 83 ec 14 sub $0x14,%esp 12e40f: 8b 5d 0c mov 0xc(%ebp),%ebx Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp, *prev; if ( !ptr ) 12e412: 85 db test %ebx,%ebx 12e414: 74 4c je 12e462 return RTEMS_INVALID_ADDRESS; prev = NULL; the_thread = _Thread_Get (tid, &location); 12e416: 83 ec 08 sub $0x8,%esp 12e419: 8d 45 f4 lea -0xc(%ebp),%eax 12e41c: 50 push %eax 12e41d: ff 75 08 pushl 0x8(%ebp) 12e420: e8 ab 55 fe ff call 1139d0 <_Thread_Get> switch (location) { 12e425: 83 c4 10 add $0x10,%esp 12e428: 8b 55 f4 mov -0xc(%ebp),%edx 12e42b: 85 d2 test %edx,%edx 12e42d: 74 0d je 12e43c 12e42f: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 12e434: 8b 5d fc mov -0x4(%ebp),%ebx 12e437: c9 leave 12e438: c3 ret 12e439: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED the_thread = _Thread_Get (tid, &location); switch (location) { case OBJECTS_LOCAL: tvp = the_thread->task_variables; 12e43c: 8b 90 04 01 00 00 mov 0x104(%eax),%edx while (tvp) { 12e442: 85 d2 test %edx,%edx 12e444: 74 17 je 12e45d if (tvp->ptr == ptr) { 12e446: 39 5a 04 cmp %ebx,0x4(%edx) 12e449: 75 0a jne 12e455 12e44b: eb 3c jmp 12e489 <== ALWAYS TAKEN 12e44d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 12e450: 39 5a 04 cmp %ebx,0x4(%edx) 12e453: 74 17 je 12e46c else the_thread->task_variables = (rtems_task_variable_t *)tvp->next; _RTEMS_Tasks_Invoke_task_variable_dtor( the_thread, tvp ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; 12e455: 89 d1 mov %edx,%ecx } prev = tvp; tvp = (rtems_task_variable_t *)tvp->next; 12e457: 8b 12 mov (%edx),%edx the_thread = _Thread_Get (tid, &location); switch (location) { case OBJECTS_LOCAL: tvp = the_thread->task_variables; while (tvp) { 12e459: 85 d2 test %edx,%edx 12e45b: 75 f3 jne 12e450 <== NEVER TAKEN return RTEMS_SUCCESSFUL; } prev = tvp; tvp = (rtems_task_variable_t *)tvp->next; } _Thread_Enable_dispatch(); 12e45d: e8 4a 55 fe ff call 1139ac <_Thread_Enable_dispatch> 12e462: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 12e467: 8b 5d fc mov -0x4(%ebp),%ebx 12e46a: c9 leave 12e46b: c3 ret case OBJECTS_LOCAL: tvp = the_thread->task_variables; while (tvp) { if (tvp->ptr == ptr) { if (prev) prev->next = tvp->next; 12e46c: 8b 1a mov (%edx),%ebx 12e46e: 89 19 mov %ebx,(%ecx) else the_thread->task_variables = (rtems_task_variable_t *)tvp->next; _RTEMS_Tasks_Invoke_task_variable_dtor( the_thread, tvp ); 12e470: 83 ec 08 sub $0x8,%esp 12e473: 52 push %edx 12e474: 50 push %eax 12e475: e8 a2 00 00 00 call 12e51c <_RTEMS_Tasks_Invoke_task_variable_dtor> <== ALWAYS TAKEN _Thread_Enable_dispatch(); 12e47a: e8 2d 55 fe ff call 1139ac <_Thread_Enable_dispatch> 12e47f: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 12e481: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 12e484: 8b 5d fc mov -0x4(%ebp),%ebx 12e487: c9 leave 12e488: c3 ret while (tvp) { if (tvp->ptr == ptr) { if (prev) prev->next = tvp->next; else the_thread->task_variables = (rtems_task_variable_t *)tvp->next; 12e489: 8b 0a mov (%edx),%ecx 12e48b: 89 88 04 01 00 00 mov %ecx,0x104(%eax) 12e491: eb dd jmp 12e470 <== ALWAYS TAKEN 0012e494 : rtems_status_code rtems_task_variable_get( rtems_id tid, void **ptr, void **result ) { 12e494: 55 push %ebp 12e495: 89 e5 mov %esp,%ebp 12e497: 56 push %esi 12e498: 53 push %ebx 12e499: 83 ec 10 sub $0x10,%esp 12e49c: 8b 5d 0c mov 0xc(%ebp),%ebx 12e49f: 8b 75 10 mov 0x10(%ebp),%esi Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp; if ( !ptr ) 12e4a2: 85 db test %ebx,%ebx 12e4a4: 74 56 je 12e4fc return RTEMS_INVALID_ADDRESS; if ( !result ) 12e4a6: 85 f6 test %esi,%esi 12e4a8: 74 52 je 12e4fc return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get (tid, &location); 12e4aa: 83 ec 08 sub $0x8,%esp 12e4ad: 8d 45 f4 lea -0xc(%ebp),%eax 12e4b0: 50 push %eax 12e4b1: ff 75 08 pushl 0x8(%ebp) 12e4b4: e8 17 55 fe ff call 1139d0 <_Thread_Get> switch (location) { 12e4b9: 83 c4 10 add $0x10,%esp 12e4bc: 8b 55 f4 mov -0xc(%ebp),%edx 12e4bf: 85 d2 test %edx,%edx 12e4c1: 75 2d jne 12e4f0 case OBJECTS_LOCAL: /* * Figure out if the variable is in this task's list. */ tvp = the_thread->task_variables; 12e4c3: 8b 80 04 01 00 00 mov 0x104(%eax),%eax while (tvp) { 12e4c9: 85 c0 test %eax,%eax 12e4cb: 75 09 jne 12e4d6 12e4cd: eb 39 jmp 12e508 <== ALWAYS TAKEN 12e4cf: 90 nop <== NOT EXECUTED */ *result = tvp->tval; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } tvp = (rtems_task_variable_t *)tvp->next; 12e4d0: 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) { 12e4d2: 85 c0 test %eax,%eax 12e4d4: 74 32 je 12e508 <== ALWAYS TAKEN if (tvp->ptr == ptr) { 12e4d6: 39 58 04 cmp %ebx,0x4(%eax) 12e4d9: 75 f5 jne 12e4d0 /* * Should this return the current (i.e not the * saved) value if `tid' is the current task? */ *result = tvp->tval; 12e4db: 8b 40 0c mov 0xc(%eax),%eax 12e4de: 89 06 mov %eax,(%esi) _Thread_Enable_dispatch(); 12e4e0: e8 c7 54 fe ff call 1139ac <_Thread_Enable_dispatch> 12e4e5: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 12e4e7: 8d 65 f8 lea -0x8(%ebp),%esp 12e4ea: 5b pop %ebx 12e4eb: 5e pop %esi 12e4ec: c9 leave 12e4ed: c3 ret 12e4ee: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( !result ) return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get (tid, &location); switch (location) { 12e4f0: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 12e4f5: 8d 65 f8 lea -0x8(%ebp),%esp 12e4f8: 5b pop %ebx 12e4f9: 5e pop %esi 12e4fa: c9 leave 12e4fb: c3 ret return RTEMS_SUCCESSFUL; } tvp = (rtems_task_variable_t *)tvp->next; } _Thread_Enable_dispatch(); return RTEMS_INVALID_ADDRESS; 12e4fc: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 12e501: 8d 65 f8 lea -0x8(%ebp),%esp 12e504: 5b pop %ebx 12e505: 5e pop %esi 12e506: c9 leave 12e507: c3 ret _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } tvp = (rtems_task_variable_t *)tvp->next; } _Thread_Enable_dispatch(); 12e508: e8 9f 54 fe ff call 1139ac <_Thread_Enable_dispatch> 12e50d: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 12e512: 8d 65 f8 lea -0x8(%ebp),%esp 12e515: 5b pop %ebx 12e516: 5e pop %esi 12e517: c9 leave 12e518: c3 ret 0010ba14 : */ rtems_status_code rtems_task_wake_after( rtems_interval ticks ) { 10ba14: 55 push %ebp 10ba15: 89 e5 mov %esp,%ebp 10ba17: 53 push %ebx 10ba18: 83 ec 04 sub $0x4,%esp 10ba1b: 8b 5d 08 mov 0x8(%ebp),%ebx 10ba1e: a1 d8 73 12 00 mov 0x1273d8,%eax 10ba23: 40 inc %eax 10ba24: a3 d8 73 12 00 mov %eax,0x1273d8 _Thread_Disable_dispatch(); if ( ticks == 0 ) { 10ba29: 85 db test %ebx,%ebx 10ba2b: 74 53 je 10ba80 _Thread_Yield_processor(); } else { _Thread_Set_state( _Thread_Executing, STATES_DELAYING ); 10ba2d: 83 ec 08 sub $0x8,%esp 10ba30: 6a 08 push $0x8 10ba32: ff 35 98 74 12 00 pushl 0x127498 10ba38: e8 3b 23 00 00 call 10dd78 <_Thread_Set_state> _Watchdog_Initialize( &_Thread_Executing->Timer, _Thread_Delay_ended, _Thread_Executing->Object.id, 10ba3d: a1 98 74 12 00 mov 0x127498,%eax _Thread_Disable_dispatch(); if ( ticks == 0 ) { _Thread_Yield_processor(); } else { _Thread_Set_state( _Thread_Executing, STATES_DELAYING ); _Watchdog_Initialize( 10ba42: 8b 50 08 mov 0x8(%eax),%edx Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 10ba45: c7 40 50 00 00 00 00 movl $0x0,0x50(%eax) the_watchdog->routine = routine; 10ba4c: c7 40 64 1c d3 10 00 movl $0x10d31c,0x64(%eax) the_watchdog->id = id; 10ba53: 89 50 68 mov %edx,0x68(%eax) the_watchdog->user_data = user_data; 10ba56: c7 40 6c 00 00 00 00 movl $0x0,0x6c(%eax) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 10ba5d: 89 58 54 mov %ebx,0x54(%eax) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 10ba60: 5a pop %edx 10ba61: 59 pop %ecx 10ba62: 83 c0 48 add $0x48,%eax 10ba65: 50 push %eax 10ba66: 68 b8 74 12 00 push $0x1274b8 10ba6b: e8 90 29 00 00 call 10e400 <_Watchdog_Insert> 10ba70: 83 c4 10 add $0x10,%esp _Thread_Executing->Object.id, NULL ); _Watchdog_Insert_ticks( &_Thread_Executing->Timer, ticks ); } _Thread_Enable_dispatch(); 10ba73: e8 3c 1a 00 00 call 10d4b4 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; } 10ba78: 31 c0 xor %eax,%eax 10ba7a: 8b 5d fc mov -0x4(%ebp),%ebx 10ba7d: c9 leave 10ba7e: c3 ret 10ba7f: 90 nop <== NOT EXECUTED rtems_interval ticks ) { _Thread_Disable_dispatch(); if ( ticks == 0 ) { _Thread_Yield_processor(); 10ba80: e8 0b 26 00 00 call 10e090 <_Thread_Yield_processor> _Thread_Executing->Object.id, NULL ); _Watchdog_Insert_ticks( &_Thread_Executing->Timer, ticks ); } _Thread_Enable_dispatch(); 10ba85: e8 2a 1a 00 00 call 10d4b4 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; } 10ba8a: 31 c0 xor %eax,%eax 10ba8c: 8b 5d fc mov -0x4(%ebp),%ebx 10ba8f: c9 leave 10ba90: c3 ret 0010c800 : */ rtems_status_code rtems_task_wake_when( rtems_time_of_day *time_buffer ) { 10c800: 55 push %ebp 10c801: 89 e5 mov %esp,%ebp 10c803: 53 push %ebx 10c804: 83 ec 14 sub $0x14,%esp 10c807: 8b 5d 08 mov 0x8(%ebp),%ebx Watchdog_Interval seconds; if ( !_TOD_Is_set ) 10c80a: 80 3d cc 9d 12 00 00 cmpb $0x0,0x129dcc 10c811: 0f 84 a9 00 00 00 je 10c8c0 return RTEMS_NOT_DEFINED; if ( !time_buffer ) 10c817: 85 db test %ebx,%ebx 10c819: 0f 84 ad 00 00 00 je 10c8cc return RTEMS_INVALID_ADDRESS; time_buffer->ticks = 0; 10c81f: c7 43 18 00 00 00 00 movl $0x0,0x18(%ebx) if ( !_TOD_Validate( time_buffer ) ) 10c826: 83 ec 0c sub $0xc,%esp 10c829: 53 push %ebx 10c82a: e8 d9 f3 ff ff call 10bc08 <_TOD_Validate> 10c82f: 83 c4 10 add $0x10,%esp 10c832: 84 c0 test %al,%al 10c834: 75 0a jne 10c840 _Watchdog_Insert_seconds( &_Thread_Executing->Timer, seconds - _TOD_Seconds_since_epoch() ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; 10c836: b8 14 00 00 00 mov $0x14,%eax } 10c83b: 8b 5d fc mov -0x4(%ebp),%ebx 10c83e: c9 leave 10c83f: c3 ret time_buffer->ticks = 0; if ( !_TOD_Validate( time_buffer ) ) return RTEMS_INVALID_CLOCK; seconds = _TOD_To_seconds( time_buffer ); 10c840: 83 ec 0c sub $0xc,%esp 10c843: 53 push %ebx 10c844: e8 33 f3 ff ff call 10bb7c <_TOD_To_seconds> if ( seconds <= _TOD_Seconds_since_epoch() ) 10c849: 83 c4 10 add $0x10,%esp 10c84c: 3b 05 4c 9e 12 00 cmp 0x129e4c,%eax 10c852: 76 e2 jbe 10c836 10c854: 8b 15 b8 9d 12 00 mov 0x129db8,%edx 10c85a: 42 inc %edx 10c85b: 89 15 b8 9d 12 00 mov %edx,0x129db8 return RTEMS_INVALID_CLOCK; _Thread_Disable_dispatch(); _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_TIME ); 10c861: 83 ec 08 sub $0x8,%esp 10c864: 6a 10 push $0x10 10c866: ff 35 78 9e 12 00 pushl 0x129e78 10c86c: 89 45 f4 mov %eax,-0xc(%ebp) 10c86f: e8 34 24 00 00 call 10eca8 <_Thread_Set_state> _Watchdog_Initialize( &_Thread_Executing->Timer, _Thread_Delay_ended, _Thread_Executing->Object.id, 10c874: 8b 15 78 9e 12 00 mov 0x129e78,%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( 10c87a: 8b 4a 08 mov 0x8(%edx),%ecx Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 10c87d: c7 42 50 00 00 00 00 movl $0x0,0x50(%edx) the_watchdog->routine = routine; 10c884: c7 42 64 4c e2 10 00 movl $0x10e24c,0x64(%edx) the_watchdog->id = id; 10c88b: 89 4a 68 mov %ecx,0x68(%edx) the_watchdog->user_data = user_data; 10c88e: c7 42 6c 00 00 00 00 movl $0x0,0x6c(%edx) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 10c895: 8b 45 f4 mov -0xc(%ebp),%eax 10c898: 2b 05 4c 9e 12 00 sub 0x129e4c,%eax 10c89e: 89 42 54 mov %eax,0x54(%edx) _Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog ); 10c8a1: 58 pop %eax 10c8a2: 59 pop %ecx 10c8a3: 83 c2 48 add $0x48,%edx 10c8a6: 52 push %edx 10c8a7: 68 8c 9e 12 00 push $0x129e8c 10c8ac: e8 f7 2a 00 00 call 10f3a8 <_Watchdog_Insert> ); _Watchdog_Insert_seconds( &_Thread_Executing->Timer, seconds - _TOD_Seconds_since_epoch() ); _Thread_Enable_dispatch(); 10c8b1: e8 2e 1b 00 00 call 10e3e4 <_Thread_Enable_dispatch> 10c8b6: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 10c8b8: 83 c4 10 add $0x10,%esp 10c8bb: e9 7b ff ff ff jmp 10c83b <== ALWAYS TAKEN rtems_time_of_day *time_buffer ) { Watchdog_Interval seconds; if ( !_TOD_Is_set ) 10c8c0: b8 0b 00 00 00 mov $0xb,%eax &_Thread_Executing->Timer, seconds - _TOD_Seconds_since_epoch() ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10c8c5: 8b 5d fc mov -0x4(%ebp),%ebx 10c8c8: c9 leave 10c8c9: c3 ret 10c8ca: 66 90 xchg %ax,%ax <== NOT EXECUTED Watchdog_Interval seconds; if ( !_TOD_Is_set ) return RTEMS_NOT_DEFINED; if ( !time_buffer ) 10c8cc: b8 09 00 00 00 mov $0x9,%eax &_Thread_Executing->Timer, seconds - _TOD_Seconds_since_epoch() ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10c8d1: 8b 5d fc mov -0x4(%ebp),%ebx 10c8d4: c9 leave 10c8d5: c3 ret 00109ff0 : #include int rtems_termios_baud_to_index( rtems_termios_baud_t termios_baud ) { 109ff0: 55 push %ebp 109ff1: 89 e5 mov %esp,%ebp 109ff3: 8b 45 08 mov 0x8(%ebp),%eax int baud_index; switch (termios_baud) { 109ff6: 83 f8 09 cmp $0x9,%eax 109ff9: 0f 84 f1 00 00 00 je 10a0f0 <== ALWAYS TAKEN 109fff: 7e 37 jle 10a038 <== NEVER TAKEN 10a001: 83 f8 0e cmp $0xe,%eax <== NOT EXECUTED 10a004: 0f 84 f6 00 00 00 je 10a100 <== NOT EXECUTED 10a00a: 7e 5c jle 10a068 <== NOT EXECUTED 10a00c: 3d 02 10 00 00 cmp $0x1002,%eax <== NOT EXECUTED 10a011: 0f 84 01 01 00 00 je 10a118 <== NOT EXECUTED 10a017: 0f 8e 97 00 00 00 jle 10a0b4 <== NOT EXECUTED 10a01d: 3d 03 10 00 00 cmp $0x1003,%eax <== NOT EXECUTED 10a022: 0f 84 e0 00 00 00 je 10a108 <== NOT EXECUTED 10a028: 3d 04 10 00 00 cmp $0x1004,%eax <== NOT EXECUTED 10a02d: 75 51 jne 10a080 <== 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; 10a02f: b8 13 00 00 00 mov $0x13,%eax <== NOT EXECUTED case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 10a034: c9 leave <== NOT EXECUTED 10a035: c3 ret <== NOT EXECUTED 10a036: 66 90 xchg %ax,%ax <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 10a038: 83 f8 04 cmp $0x4,%eax 10a03b: 0f 84 b7 00 00 00 je 10a0f8 <== ALWAYS TAKEN 10a041: 7f 45 jg 10a088 <== ALWAYS TAKEN 10a043: 83 f8 01 cmp $0x1,%eax 10a046: 0f 84 8c 00 00 00 je 10a0d8 <== ALWAYS TAKEN 10a04c: 0f 8e de 00 00 00 jle 10a130 <== NEVER TAKEN 10a052: 83 f8 02 cmp $0x2,%eax <== NOT EXECUTED 10a055: 0f 84 c5 00 00 00 je 10a120 <== NOT EXECUTED 10a05b: 83 f8 03 cmp $0x3,%eax <== NOT EXECUTED 10a05e: 75 20 jne 10a080 <== NOT EXECUTED case B0: baud_index = 0; break; case B50: baud_index = 1; break; case B75: baud_index = 2; break; 10a060: b8 03 00 00 00 mov $0x3,%eax <== NOT EXECUTED case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 10a065: c9 leave <== NOT EXECUTED 10a066: c3 ret <== NOT EXECUTED 10a067: 90 nop <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 10a068: 83 f8 0b cmp $0xb,%eax <== NOT EXECUTED 10a06b: 0f 84 9f 00 00 00 je 10a110 <== NOT EXECUTED 10a071: 7c 39 jl 10a0ac <== NOT EXECUTED 10a073: 83 f8 0c cmp $0xc,%eax <== NOT EXECUTED 10a076: 74 50 je 10a0c8 <== NOT EXECUTED 10a078: 83 f8 0d cmp $0xd,%eax <== NOT EXECUTED 10a07b: 74 62 je 10a0df <== NOT EXECUTED 10a07d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 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; 10a080: b8 ff ff ff ff mov $0xffffffff,%eax default: baud_index = -1; break; } return baud_index; } 10a085: c9 leave 10a086: c3 ret 10a087: 90 nop <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 10a088: 83 f8 06 cmp $0x6,%eax <== NOT EXECUTED 10a08b: 74 43 je 10a0d0 <== NOT EXECUTED 10a08d: 7c 15 jl 10a0a4 <== NOT EXECUTED 10a08f: 83 f8 07 cmp $0x7,%eax <== NOT EXECUTED 10a092: 0f 84 90 00 00 00 je 10a128 <== NOT EXECUTED 10a098: 83 f8 08 cmp $0x8,%eax <== NOT EXECUTED 10a09b: 75 e3 jne 10a080 <== 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; 10a09d: b8 08 00 00 00 mov $0x8,%eax <== NOT EXECUTED case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 10a0a2: c9 leave <== NOT EXECUTED 10a0a3: c3 ret <== NOT EXECUTED switch (termios_baud) { case B0: baud_index = 0; break; case B50: baud_index = 1; break; case B75: baud_index = 2; break; case B110: baud_index = 3; break; case B134: baud_index = 4; break; 10a0a4: b8 05 00 00 00 mov $0x5,%eax <== NOT EXECUTED case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 10a0a9: c9 leave <== NOT EXECUTED 10a0aa: c3 ret <== NOT EXECUTED 10a0ab: 90 nop <== NOT EXECUTED case B134: baud_index = 4; break; case B150: baud_index = 5; break; case B200: baud_index = 6; break; case B300: baud_index = 7; break; case B600: baud_index = 8; break; case B1200: baud_index = 9; break; 10a0ac: b8 0a 00 00 00 mov $0xa,%eax <== NOT EXECUTED case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 10a0b1: c9 leave <== NOT EXECUTED 10a0b2: c3 ret <== NOT EXECUTED 10a0b3: 90 nop <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 10a0b4: 83 f8 0f cmp $0xf,%eax <== NOT EXECUTED 10a0b7: 74 2f je 10a0e8 <== NOT EXECUTED 10a0b9: 3d 01 10 00 00 cmp $0x1001,%eax <== NOT EXECUTED 10a0be: 75 c0 jne 10a080 <== 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; 10a0c0: b8 10 00 00 00 mov $0x10,%eax <== NOT EXECUTED case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 10a0c5: c9 leave <== NOT EXECUTED 10a0c6: c3 ret <== NOT EXECUTED 10a0c7: 90 nop <== NOT EXECUTED case B200: baud_index = 6; break; case B300: baud_index = 7; break; case B600: baud_index = 8; break; case B1200: baud_index = 9; break; case B1800: baud_index = 10; break; case B2400: baud_index = 11; break; 10a0c8: b8 0c 00 00 00 mov $0xc,%eax <== NOT EXECUTED case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 10a0cd: c9 leave <== NOT EXECUTED 10a0ce: c3 ret <== NOT EXECUTED 10a0cf: 90 nop <== 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; 10a0d0: b8 06 00 00 00 mov $0x6,%eax <== NOT EXECUTED case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 10a0d5: c9 leave <== NOT EXECUTED 10a0d6: c3 ret <== NOT EXECUTED 10a0d7: 90 nop <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 10a0d8: b8 01 00 00 00 mov $0x1,%eax <== NOT EXECUTED case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 10a0dd: c9 leave <== NOT EXECUTED 10a0de: c3 ret <== 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; 10a0df: b8 0d 00 00 00 mov $0xd,%eax <== NOT EXECUTED case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 10a0e4: c9 leave <== NOT EXECUTED 10a0e5: c3 ret <== NOT EXECUTED 10a0e6: 66 90 xchg %ax,%ax <== 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; 10a0e8: b8 0f 00 00 00 mov $0xf,%eax <== NOT EXECUTED case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 10a0ed: c9 leave <== NOT EXECUTED 10a0ee: c3 ret <== NOT EXECUTED 10a0ef: 90 nop <== NOT EXECUTED 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; 10a0f0: b8 09 00 00 00 mov $0x9,%eax <== NOT EXECUTED case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 10a0f5: c9 leave <== NOT EXECUTED 10a0f6: c3 ret <== NOT EXECUTED 10a0f7: 90 nop <== NOT EXECUTED switch (termios_baud) { case B0: baud_index = 0; break; case B50: baud_index = 1; break; case B75: baud_index = 2; break; case B110: baud_index = 3; break; 10a0f8: b8 04 00 00 00 mov $0x4,%eax <== NOT EXECUTED case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 10a0fd: c9 leave <== NOT EXECUTED 10a0fe: c3 ret <== NOT EXECUTED 10a0ff: 90 nop <== 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; 10a100: b8 0e 00 00 00 mov $0xe,%eax <== NOT EXECUTED case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 10a105: c9 leave <== NOT EXECUTED 10a106: c3 ret <== NOT EXECUTED 10a107: 90 nop <== NOT EXECUTED case B4800: baud_index = 12; break; case B9600: baud_index = 13; break; case B19200: baud_index = 14; break; case B38400: baud_index = 15; break; case B57600: baud_index = 16; break; case B115200: baud_index = 17; break; 10a108: b8 12 00 00 00 mov $0x12,%eax <== NOT EXECUTED case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 10a10d: c9 leave <== NOT EXECUTED 10a10e: c3 ret <== NOT EXECUTED 10a10f: 90 nop <== NOT EXECUTED case B150: baud_index = 5; break; case B200: baud_index = 6; break; case B300: baud_index = 7; break; case B600: baud_index = 8; break; case B1200: baud_index = 9; break; case B1800: baud_index = 10; break; 10a110: b8 0b 00 00 00 mov $0xb,%eax <== NOT EXECUTED case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 10a115: c9 leave <== NOT EXECUTED 10a116: c3 ret <== NOT EXECUTED 10a117: 90 nop <== 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; 10a118: b8 11 00 00 00 mov $0x11,%eax <== NOT EXECUTED case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 10a11d: c9 leave <== NOT EXECUTED 10a11e: c3 ret <== NOT EXECUTED 10a11f: 90 nop <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 10a120: b8 02 00 00 00 mov $0x2,%eax <== NOT EXECUTED case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 10a125: c9 leave <== NOT EXECUTED 10a126: c3 ret <== NOT EXECUTED 10a127: 90 nop <== NOT EXECUTED case B50: baud_index = 1; break; case B75: baud_index = 2; break; case B110: baud_index = 3; break; case B134: baud_index = 4; break; case B150: baud_index = 5; break; case B200: baud_index = 6; break; 10a128: b8 07 00 00 00 mov $0x7,%eax <== NOT EXECUTED case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 10a12d: c9 leave <== NOT EXECUTED 10a12e: c3 ret <== NOT EXECUTED 10a12f: 90 nop <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 10a130: 85 c0 test %eax,%eax 10a132: 0f 85 48 ff ff ff jne 10a080 <== NEVER TAKEN 10a138: 31 c0 xor %eax,%eax <== NOT EXECUTED case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 10a13a: c9 leave <== NOT EXECUTED 10a13b: c3 ret <== NOT EXECUTED 00108d1c : #include int32_t rtems_termios_baud_to_number( int termios_baud ) { 108d1c: 55 push %ebp 108d1d: 89 e5 mov %esp,%ebp 108d1f: 8b 45 08 mov 0x8(%ebp),%eax int32_t baud; switch (termios_baud) { 108d22: 83 f8 09 cmp $0x9,%eax 108d25: 0f 84 f1 00 00 00 je 108e1c 108d2b: 7e 37 jle 108d64 108d2d: 83 f8 0e cmp $0xe,%eax 108d30: 0f 84 f6 00 00 00 je 108e2c 108d36: 7e 5c jle 108d94 108d38: 3d 02 10 00 00 cmp $0x1002,%eax 108d3d: 0f 84 01 01 00 00 je 108e44 108d43: 0f 8e 97 00 00 00 jle 108de0 108d49: 3d 03 10 00 00 cmp $0x1003,%eax 108d4e: 0f 84 e0 00 00 00 je 108e34 108d54: 3d 04 10 00 00 cmp $0x1004,%eax 108d59: 75 51 jne 108dac <== ALWAYS TAKEN 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; 108d5b: b8 00 08 07 00 mov $0x70800,%eax case B460800: baud = 460800; break; default: baud = -1; break; } return baud; } 108d60: c9 leave 108d61: c3 ret 108d62: 66 90 xchg %ax,%ax <== NOT EXECUTED int termios_baud ) { int32_t baud; switch (termios_baud) { 108d64: 83 f8 04 cmp $0x4,%eax 108d67: 0f 84 b7 00 00 00 je 108e24 108d6d: 7f 45 jg 108db4 108d6f: 83 f8 01 cmp $0x1,%eax 108d72: 0f 84 8c 00 00 00 je 108e04 108d78: 0f 8e de 00 00 00 jle 108e5c 108d7e: 83 f8 02 cmp $0x2,%eax 108d81: 0f 84 c5 00 00 00 je 108e4c 108d87: 83 f8 03 cmp $0x3,%eax 108d8a: 75 20 jne 108dac <== ALWAYS TAKEN case B0: baud = 0; break; case B50: baud = 50; break; case B75: baud = 75; break; 108d8c: b8 6e 00 00 00 mov $0x6e,%eax case B460800: baud = 460800; break; default: baud = -1; break; } return baud; } 108d91: c9 leave 108d92: c3 ret 108d93: 90 nop <== NOT EXECUTED int termios_baud ) { int32_t baud; switch (termios_baud) { 108d94: 83 f8 0b cmp $0xb,%eax 108d97: 0f 84 9f 00 00 00 je 108e3c 108d9d: 7c 39 jl 108dd8 108d9f: 83 f8 0c cmp $0xc,%eax 108da2: 74 50 je 108df4 108da4: 83 f8 0d cmp $0xd,%eax 108da7: 74 62 je 108e0b <== NEVER TAKEN 108da9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 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; 108dac: b8 ff ff ff ff mov $0xffffffff,%eax default: baud = -1; break; } return baud; } 108db1: c9 leave 108db2: c3 ret 108db3: 90 nop <== NOT EXECUTED int termios_baud ) { int32_t baud; switch (termios_baud) { 108db4: 83 f8 06 cmp $0x6,%eax 108db7: 74 43 je 108dfc 108db9: 7c 15 jl 108dd0 108dbb: 83 f8 07 cmp $0x7,%eax 108dbe: 0f 84 90 00 00 00 je 108e54 108dc4: 83 f8 08 cmp $0x8,%eax 108dc7: 75 e3 jne 108dac <== ALWAYS TAKEN 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; 108dc9: b8 58 02 00 00 mov $0x258,%eax case B460800: baud = 460800; break; default: baud = -1; break; } return baud; } 108dce: c9 leave 108dcf: c3 ret switch (termios_baud) { case B0: baud = 0; break; case B50: baud = 50; break; case B75: baud = 75; break; case B110: baud = 110; break; case B134: baud = 134; break; 108dd0: b8 96 00 00 00 mov $0x96,%eax case B460800: baud = 460800; break; default: baud = -1; break; } return baud; } 108dd5: c9 leave 108dd6: c3 ret 108dd7: 90 nop <== NOT EXECUTED case B134: baud = 134; break; case B150: baud = 150; break; case B200: baud = 200; break; case B300: baud = 300; break; case B600: baud = 600; break; case B1200: baud = 1200; break; 108dd8: b8 08 07 00 00 mov $0x708,%eax case B460800: baud = 460800; break; default: baud = -1; break; } return baud; } 108ddd: c9 leave 108dde: c3 ret 108ddf: 90 nop <== NOT EXECUTED int termios_baud ) { int32_t baud; switch (termios_baud) { 108de0: 83 f8 0f cmp $0xf,%eax 108de3: 74 2f je 108e14 108de5: 3d 01 10 00 00 cmp $0x1001,%eax 108dea: 75 c0 jne 108dac <== ALWAYS TAKEN 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; 108dec: b8 00 e1 00 00 mov $0xe100,%eax case B460800: baud = 460800; break; default: baud = -1; break; } return baud; } 108df1: c9 leave 108df2: c3 ret 108df3: 90 nop <== NOT EXECUTED case B200: baud = 200; break; case B300: baud = 300; break; case B600: baud = 600; break; case B1200: baud = 1200; break; case B1800: baud = 1800; break; case B2400: baud = 2400; break; 108df4: b8 c0 12 00 00 mov $0x12c0,%eax case B460800: baud = 460800; break; default: baud = -1; break; } return baud; } 108df9: c9 leave 108dfa: c3 ret 108dfb: 90 nop <== NOT EXECUTED 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; 108dfc: b8 c8 00 00 00 mov $0xc8,%eax case B460800: baud = 460800; break; default: baud = -1; break; } return baud; } 108e01: c9 leave 108e02: c3 ret 108e03: 90 nop <== NOT EXECUTED int termios_baud ) { int32_t baud; switch (termios_baud) { 108e04: b8 32 00 00 00 mov $0x32,%eax case B460800: baud = 460800; break; default: baud = -1; break; } return baud; } 108e09: c9 leave 108e0a: c3 ret 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; 108e0b: b8 80 25 00 00 mov $0x2580,%eax case B460800: baud = 460800; break; default: baud = -1; break; } return baud; } 108e10: c9 leave 108e11: c3 ret 108e12: 66 90 xchg %ax,%ax <== NOT EXECUTED case B1200: baud = 1200; break; case B1800: baud = 1800; break; case B2400: baud = 2400; break; case B4800: baud = 4800; break; case B9600: baud = 9600; break; case B19200: baud = 19200; break; 108e14: b8 00 96 00 00 mov $0x9600,%eax case B460800: baud = 460800; break; default: baud = -1; break; } return baud; } 108e19: c9 leave 108e1a: c3 ret 108e1b: 90 nop <== NOT EXECUTED 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; 108e1c: b8 b0 04 00 00 mov $0x4b0,%eax case B460800: baud = 460800; break; default: baud = -1; break; } return baud; } 108e21: c9 leave 108e22: c3 ret 108e23: 90 nop <== NOT EXECUTED switch (termios_baud) { case B0: baud = 0; break; case B50: baud = 50; break; case B75: baud = 75; break; case B110: baud = 110; break; 108e24: b8 86 00 00 00 mov $0x86,%eax case B460800: baud = 460800; break; default: baud = -1; break; } return baud; } 108e29: c9 leave 108e2a: c3 ret 108e2b: 90 nop <== NOT EXECUTED 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; 108e2c: b8 00 4b 00 00 mov $0x4b00,%eax case B460800: baud = 460800; break; default: baud = -1; break; } return baud; } 108e31: c9 leave 108e32: c3 ret 108e33: 90 nop <== NOT EXECUTED case B4800: baud = 4800; break; case B9600: baud = 9600; break; case B19200: baud = 19200; break; case B38400: baud = 38400; break; case B57600: baud = 57600; break; case B115200: baud = 115200; break; 108e34: b8 00 84 03 00 mov $0x38400,%eax case B460800: baud = 460800; break; default: baud = -1; break; } return baud; } 108e39: c9 leave 108e3a: c3 ret 108e3b: 90 nop <== NOT EXECUTED case B150: baud = 150; break; case B200: baud = 200; break; case B300: baud = 300; break; case B600: baud = 600; break; case B1200: baud = 1200; break; case B1800: baud = 1800; break; 108e3c: b8 60 09 00 00 mov $0x960,%eax case B460800: baud = 460800; break; default: baud = -1; break; } return baud; } 108e41: c9 leave 108e42: c3 ret 108e43: 90 nop <== NOT EXECUTED 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; 108e44: b8 00 c2 01 00 mov $0x1c200,%eax case B460800: baud = 460800; break; default: baud = -1; break; } return baud; } 108e49: c9 leave 108e4a: c3 ret 108e4b: 90 nop <== NOT EXECUTED int termios_baud ) { int32_t baud; switch (termios_baud) { 108e4c: b8 4b 00 00 00 mov $0x4b,%eax case B460800: baud = 460800; break; default: baud = -1; break; } return baud; } 108e51: c9 leave 108e52: c3 ret 108e53: 90 nop <== NOT EXECUTED case B50: baud = 50; break; case B75: baud = 75; break; case B110: baud = 110; break; case B134: baud = 134; break; case B150: baud = 150; break; case B200: baud = 200; break; 108e54: b8 2c 01 00 00 mov $0x12c,%eax case B460800: baud = 460800; break; default: baud = -1; break; } return baud; } 108e59: c9 leave 108e5a: c3 ret 108e5b: 90 nop <== NOT EXECUTED int termios_baud ) { int32_t baud; switch (termios_baud) { 108e5c: 85 c0 test %eax,%eax 108e5e: 0f 85 48 ff ff ff jne 108dac 108e64: 31 c0 xor %eax,%eax case B460800: baud = 460800; break; default: baud = -1; break; } return baud; } 108e66: c9 leave 108e67: c3 ret 00108ea4 : rtems_status_code rtems_termios_bufsize ( int cbufsize, int raw_input, int raw_output ) { 108ea4: 55 push %ebp <== NOT EXECUTED 108ea5: 89 e5 mov %esp,%ebp <== NOT EXECUTED rtems_termios_cbufsize = cbufsize; 108ea7: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 108eaa: a3 e8 4f 12 00 mov %eax,0x124fe8 <== NOT EXECUTED rtems_termios_raw_input_size = raw_input; 108eaf: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED 108eb2: a3 ec 4f 12 00 mov %eax,0x124fec <== NOT EXECUTED rtems_termios_raw_output_size = raw_output; 108eb7: 8b 45 10 mov 0x10(%ebp),%eax <== NOT EXECUTED 108eba: a3 f0 4f 12 00 mov %eax,0x124ff0 <== NOT EXECUTED return RTEMS_SUCCESSFUL; } 108ebf: 31 c0 xor %eax,%eax <== NOT EXECUTED 108ec1: c9 leave <== NOT EXECUTED 108ec2: c3 ret <== NOT EXECUTED 0010a350 : } } rtems_status_code rtems_termios_close (void *arg) { 10a350: 55 push %ebp 10a351: 89 e5 mov %esp,%ebp 10a353: 56 push %esi 10a354: 53 push %ebx 10a355: 8b 75 08 mov 0x8(%ebp),%esi rtems_libio_open_close_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 10a358: 8b 06 mov (%esi),%eax 10a35a: 8b 58 34 mov 0x34(%eax),%ebx rtems_status_code sc; sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 10a35d: 50 push %eax 10a35e: 6a 00 push $0x0 10a360: 6a 00 push $0x0 10a362: ff 35 98 72 12 00 pushl 0x127298 10a368: e8 f3 11 00 00 call 10b560 if (sc != RTEMS_SUCCESSFUL) 10a36d: 83 c4 10 add $0x10,%esp 10a370: 85 c0 test %eax,%eax 10a372: 0f 85 92 01 00 00 jne 10a50a <== ALWAYS TAKEN rtems_fatal_error_occurred (sc); if (--tty->refcount == 0) { 10a378: 8b 43 08 mov 0x8(%ebx),%eax 10a37b: 48 dec %eax 10a37c: 89 43 08 mov %eax,0x8(%ebx) 10a37f: 85 c0 test %eax,%eax 10a381: 0f 85 bf 00 00 00 jne 10a446 if (rtems_termios_linesw[tty->t_line].l_close != NULL) { 10a387: 8b 83 cc 00 00 00 mov 0xcc(%ebx),%eax 10a38d: c1 e0 05 shl $0x5,%eax 10a390: 8b 80 04 6f 12 00 mov 0x126f04(%eax),%eax 10a396: 85 c0 test %eax,%eax 10a398: 0f 84 12 01 00 00 je 10a4b0 <== NEVER TAKEN /* * call discipline-specific close */ sc = rtems_termios_linesw[tty->t_line].l_close(tty); 10a39e: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10a3a1: 53 push %ebx <== NOT EXECUTED 10a3a2: ff d0 call *%eax <== NOT EXECUTED 10a3a4: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_fatal_error_occurred (sc); } drainOutput (tty); } if (tty->device.outputUsesInterrupts 10a3a7: 83 bb b4 00 00 00 02 cmpl $0x2,0xb4(%ebx) <== NOT EXECUTED 10a3ae: 0f 84 24 01 00 00 je 10a4d8 <== NOT EXECUTED tty->txTaskId, TERMIOS_TX_TERMINATE_EVENT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); } if (tty->device.lastClose) 10a3b4: 8b 83 9c 00 00 00 mov 0x9c(%ebx),%eax 10a3ba: 85 c0 test %eax,%eax 10a3bc: 74 0d je 10a3cb (*tty->device.lastClose)(tty->major, tty->minor, arg); 10a3be: 52 push %edx 10a3bf: 56 push %esi 10a3c0: ff 73 10 pushl 0x10(%ebx) 10a3c3: ff 73 0c pushl 0xc(%ebx) 10a3c6: ff d0 call *%eax 10a3c8: 83 c4 10 add $0x10,%esp if (tty->forw == NULL) { 10a3cb: 8b 03 mov (%ebx),%eax 10a3cd: 85 c0 test %eax,%eax 10a3cf: 0f 84 9b 00 00 00 je 10a470 if ( rtems_termios_ttyTail != NULL ) { rtems_termios_ttyTail->forw = NULL; } } else { tty->forw->back = tty->back; 10a3d5: 8b 53 04 mov 0x4(%ebx),%edx 10a3d8: 89 50 04 mov %edx,0x4(%eax) } if (tty->back == NULL) { 10a3db: 8b 53 04 mov 0x4(%ebx),%edx 10a3de: 85 d2 test %edx,%edx 10a3e0: 0f 84 ae 00 00 00 je 10a494 <== NEVER TAKEN if ( rtems_termios_ttyHead != NULL ) { rtems_termios_ttyHead->back = NULL; } } else { tty->back->forw = tty->forw; 10a3e6: 89 02 mov %eax,(%edx) <== NOT EXECUTED } rtems_semaphore_delete (tty->isem); 10a3e8: 83 ec 0c sub $0xc,%esp 10a3eb: ff 73 14 pushl 0x14(%ebx) 10a3ee: e8 c9 10 00 00 call 10b4bc rtems_semaphore_delete (tty->osem); 10a3f3: 58 pop %eax 10a3f4: ff 73 18 pushl 0x18(%ebx) 10a3f7: e8 c0 10 00 00 call 10b4bc rtems_semaphore_delete (tty->rawOutBuf.Semaphore); 10a3fc: 5e pop %esi 10a3fd: ff b3 8c 00 00 00 pushl 0x8c(%ebx) 10a403: e8 b4 10 00 00 call 10b4bc if ((tty->device.pollRead == NULL) || 10a408: 83 c4 10 add $0x10,%esp 10a40b: 8b 8b a0 00 00 00 mov 0xa0(%ebx),%ecx 10a411: 85 c9 test %ecx,%ecx 10a413: 74 4b je 10a460 (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)) 10a415: 83 bb b4 00 00 00 02 cmpl $0x2,0xb4(%ebx) 10a41c: 74 42 je 10a460 <== ALWAYS TAKEN rtems_semaphore_delete (tty->rawInBuf.Semaphore); free (tty->rawInBuf.theBuf); 10a41e: 83 ec 0c sub $0xc,%esp 10a421: ff 73 58 pushl 0x58(%ebx) 10a424: e8 b3 db ff ff call 107fdc free (tty->rawOutBuf.theBuf); 10a429: 5a pop %edx 10a42a: ff 73 7c pushl 0x7c(%ebx) 10a42d: e8 aa db ff ff call 107fdc free (tty->cbuf); 10a432: 58 pop %eax 10a433: ff 73 1c pushl 0x1c(%ebx) 10a436: e8 a1 db ff ff call 107fdc free (tty); 10a43b: 89 1c 24 mov %ebx,(%esp) 10a43e: e8 99 db ff ff call 107fdc 10a443: 83 c4 10 add $0x10,%esp } rtems_semaphore_release (rtems_termios_ttyMutex); 10a446: 83 ec 0c sub $0xc,%esp 10a449: ff 35 98 72 12 00 pushl 0x127298 10a44f: e8 08 12 00 00 call 10b65c return RTEMS_SUCCESSFUL; } 10a454: 31 c0 xor %eax,%eax 10a456: 8d 65 f8 lea -0x8(%ebp),%esp 10a459: 5b pop %ebx 10a45a: 5e pop %esi 10a45b: c9 leave 10a45c: c3 ret 10a45d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED rtems_semaphore_delete (tty->isem); rtems_semaphore_delete (tty->osem); rtems_semaphore_delete (tty->rawOutBuf.Semaphore); if ((tty->device.pollRead == NULL) || (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)) rtems_semaphore_delete (tty->rawInBuf.Semaphore); 10a460: 83 ec 0c sub $0xc,%esp 10a463: ff 73 68 pushl 0x68(%ebx) 10a466: e8 51 10 00 00 call 10b4bc 10a46b: 83 c4 10 add $0x10,%esp 10a46e: eb ae jmp 10a41e <== ALWAYS TAKEN rtems_fatal_error_occurred (sc); } if (tty->device.lastClose) (*tty->device.lastClose)(tty->major, tty->minor, arg); if (tty->forw == NULL) { rtems_termios_ttyTail = tty->back; 10a470: 8b 43 04 mov 0x4(%ebx),%eax 10a473: a3 9c 72 12 00 mov %eax,0x12729c if ( rtems_termios_ttyTail != NULL ) { 10a478: 85 c0 test %eax,%eax 10a47a: 0f 84 94 00 00 00 je 10a514 <== NEVER TAKEN rtems_termios_ttyTail->forw = NULL; 10a480: c7 00 00 00 00 00 movl $0x0,(%eax) <== NOT EXECUTED 10a486: 8b 03 mov (%ebx),%eax <== NOT EXECUTED } } else { tty->forw->back = tty->back; } if (tty->back == NULL) { 10a488: 8b 53 04 mov 0x4(%ebx),%edx <== NOT EXECUTED 10a48b: 85 d2 test %edx,%edx <== NOT EXECUTED 10a48d: 0f 85 53 ff ff ff jne 10a3e6 <== NOT EXECUTED 10a493: 90 nop <== NOT EXECUTED rtems_termios_ttyHead = tty->forw; 10a494: a3 a0 72 12 00 mov %eax,0x1272a0 if ( rtems_termios_ttyHead != NULL ) { 10a499: 85 c0 test %eax,%eax 10a49b: 0f 84 47 ff ff ff je 10a3e8 <== ALWAYS TAKEN rtems_termios_ttyHead->back = NULL; 10a4a1: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax) 10a4a8: e9 3b ff ff ff jmp 10a3e8 <== ALWAYS TAKEN 10a4ad: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED } else { /* * default: just flush output buffer */ sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 10a4b0: 51 push %ecx 10a4b1: 6a 00 push $0x0 10a4b3: 6a 00 push $0x0 10a4b5: ff 73 18 pushl 0x18(%ebx) 10a4b8: e8 a3 10 00 00 call 10b560 if (sc != RTEMS_SUCCESSFUL) { 10a4bd: 83 c4 10 add $0x10,%esp 10a4c0: 85 c0 test %eax,%eax 10a4c2: 75 46 jne 10a50a <== ALWAYS TAKEN rtems_fatal_error_occurred (sc); } drainOutput (tty); 10a4c4: 89 d8 mov %ebx,%eax 10a4c6: e8 c1 f6 ff ff call 109b8c <== ALWAYS TAKEN } if (tty->device.outputUsesInterrupts 10a4cb: 83 bb b4 00 00 00 02 cmpl $0x2,0xb4(%ebx) 10a4d2: 0f 85 dc fe ff ff jne 10a3b4 <== NEVER TAKEN == TERMIOS_TASK_DRIVEN) { /* * send "terminate" to I/O tasks */ sc = rtems_event_send( 10a4d8: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 10a4db: 6a 01 push $0x1 <== NOT EXECUTED 10a4dd: ff b3 c4 00 00 00 pushl 0xc4(%ebx) <== NOT EXECUTED 10a4e3: e8 68 0b 00 00 call 10b050 <== NOT EXECUTED tty->rxTaskId, TERMIOS_RX_TERMINATE_EVENT); if (sc != RTEMS_SUCCESSFUL) 10a4e8: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10a4eb: 85 c0 test %eax,%eax <== NOT EXECUTED 10a4ed: 75 1b jne 10a50a <== NOT EXECUTED rtems_fatal_error_occurred (sc); sc = rtems_event_send( 10a4ef: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 10a4f2: 6a 01 push $0x1 <== NOT EXECUTED 10a4f4: ff b3 c8 00 00 00 pushl 0xc8(%ebx) <== NOT EXECUTED 10a4fa: e8 51 0b 00 00 call 10b050 <== NOT EXECUTED tty->txTaskId, TERMIOS_TX_TERMINATE_EVENT); if (sc != RTEMS_SUCCESSFUL) 10a4ff: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10a502: 85 c0 test %eax,%eax <== NOT EXECUTED 10a504: 0f 84 aa fe ff ff je 10a3b4 <== NOT EXECUTED rtems_fatal_error_occurred (sc); 10a50a: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10a50d: 50 push %eax <== NOT EXECUTED 10a50e: e8 89 16 00 00 call 10bb9c <== NOT EXECUTED 10a513: 90 nop <== NOT EXECUTED } else { tty->forw->back = tty->back; } if (tty->back == NULL) { rtems_termios_ttyHead = tty->forw; 10a514: c7 05 a0 72 12 00 00 movl $0x0,0x1272a0 10a51b: 00 00 00 10a51e: e9 c5 fe ff ff jmp 10a3e8 <== ALWAYS TAKEN 00109118 : * for each transmitted character. * It returns number of characters left to transmit */ int rtems_termios_dequeue_characters (void *ttyp, int len) { 109118: 55 push %ebp 109119: 89 e5 mov %esp,%ebp 10911b: 83 ec 08 sub $0x8,%esp 10911e: 8b 45 08 mov 0x8(%ebp),%eax rtems_status_code sc; /* * sum up character count already sent */ tty->t_dqlen += len; 109121: 8b 55 0c mov 0xc(%ebp),%edx 109124: 01 90 90 00 00 00 add %edx,0x90(%eax) if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 10912a: 83 b8 b4 00 00 00 02 cmpl $0x2,0xb4(%eax) 109131: 74 2d je 109160 <== ALWAYS TAKEN TERMIOS_TX_START_EVENT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); return 0; /* nothing to output in IRQ... */ } else if (tty->t_line == PPPDISC ) { 109133: 83 b8 cc 00 00 00 05 cmpl $0x5,0xcc(%eax) 10913a: 74 0c je 109148 <== ALWAYS TAKEN rtems_termios_linesw[tty->t_line].l_start(tty); } return 0; /* nothing to output in IRQ... */ } else { return rtems_termios_refill_transmitter(tty); 10913c: 89 45 08 mov %eax,0x8(%ebp) } } 10913f: 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); 109140: e9 9b fd ff ff jmp 108ee0 <== ALWAYS TAKEN 109145: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED } else if (tty->t_line == PPPDISC ) { /* * call any line discipline start function */ if (rtems_termios_linesw[tty->t_line].l_start != NULL) { 109148: 8b 15 b4 6f 12 00 mov 0x126fb4,%edx <== NOT EXECUTED 10914e: 85 d2 test %edx,%edx <== NOT EXECUTED 109150: 74 09 je 10915b <== NOT EXECUTED rtems_termios_linesw[tty->t_line].l_start(tty); 109152: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 109155: 50 push %eax <== NOT EXECUTED 109156: ff d2 call *%edx <== NOT EXECUTED 109158: 83 c4 10 add $0x10,%esp <== NOT EXECUTED return 0; /* nothing to output in IRQ... */ } else { return rtems_termios_refill_transmitter(tty); } } 10915b: 31 c0 xor %eax,%eax <== NOT EXECUTED 10915d: c9 leave <== NOT EXECUTED 10915e: c3 ret <== NOT EXECUTED 10915f: 90 nop <== NOT EXECUTED if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { /* * send wake up to transmitter task */ sc = rtems_event_send(tty->txTaskId, 109160: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 109163: 6a 02 push $0x2 <== NOT EXECUTED 109165: ff b0 c8 00 00 00 pushl 0xc8(%eax) <== NOT EXECUTED 10916b: e8 e0 1e 00 00 call 10b050 <== NOT EXECUTED TERMIOS_TX_START_EVENT); if (sc != RTEMS_SUCCESSFUL) 109170: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 109173: 85 c0 test %eax,%eax <== NOT EXECUTED 109175: 74 e4 je 10915b <== NOT EXECUTED rtems_fatal_error_occurred (sc); 109177: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10917a: 50 push %eax <== NOT EXECUTED 10917b: e8 1c 2a 00 00 call 10bb9c <== NOT EXECUTED 00109180 : * 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) { 109180: 55 push %ebp <== NOT EXECUTED 109181: 89 e5 mov %esp,%ebp <== NOT EXECUTED 109183: 57 push %edi <== NOT EXECUTED 109184: 56 push %esi <== NOT EXECUTED 109185: 53 push %ebx <== NOT EXECUTED 109186: 83 ec 3c sub $0x3c,%esp <== NOT EXECUTED 109189: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED 10918c: 8b 75 0c mov 0xc(%ebp),%esi <== NOT EXECUTED 10918f: 8b 7d 10 mov 0x10(%ebp),%edi <== 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) { 109192: 8b 83 cc 00 00 00 mov 0xcc(%ebx),%eax <== NOT EXECUTED 109198: c1 e0 05 shl $0x5,%eax <== NOT EXECUTED 10919b: 8b 80 10 6f 12 00 mov 0x126f10(%eax),%eax <== NOT EXECUTED 1091a1: 85 c0 test %eax,%eax <== NOT EXECUTED 1091a3: 0f 84 8b 00 00 00 je 109234 <== NOT EXECUTED while (len--) { 1091a9: 85 ff test %edi,%edi <== NOT EXECUTED 1091ab: 74 2e je 1091db <== NOT EXECUTED 1091ad: 31 d2 xor %edx,%edx <== NOT EXECUTED 1091af: 89 7d e4 mov %edi,-0x1c(%ebp) <== NOT EXECUTED 1091b2: 89 f7 mov %esi,%edi <== NOT EXECUTED 1091b4: 89 d6 mov %edx,%esi <== NOT EXECUTED 1091b6: eb 0f jmp 1091c7 <== NOT EXECUTED 1091b8: 8b 83 cc 00 00 00 mov 0xcc(%ebx),%eax <== NOT EXECUTED 1091be: c1 e0 05 shl $0x5,%eax <== NOT EXECUTED 1091c1: 8b 80 10 6f 12 00 mov 0x126f10(%eax),%eax <== NOT EXECUTED c = *buf++; rtems_termios_linesw[tty->t_line].l_rint(c,tty); 1091c7: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 1091ca: 53 push %ebx <== NOT EXECUTED 1091cb: 0f be 14 37 movsbl (%edi,%esi,1),%edx <== NOT EXECUTED 1091cf: 52 push %edx <== NOT EXECUTED 1091d0: ff d0 call *%eax <== NOT EXECUTED 1091d2: 46 inc %esi <== 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--) { 1091d3: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 1091d6: 39 75 e4 cmp %esi,-0x1c(%ebp) <== NOT EXECUTED 1091d9: 75 dd jne 1091b8 <== NOT EXECUTED } /* * check to see if rcv wakeup callback was set */ if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) { 1091db: 8b 93 e4 00 00 00 mov 0xe4(%ebx),%edx <== NOT EXECUTED 1091e1: 85 d2 test %edx,%edx <== NOT EXECUTED 1091e3: 75 3b jne 109220 <== NOT EXECUTED 1091e5: 8b 83 dc 00 00 00 mov 0xdc(%ebx),%eax <== NOT EXECUTED 1091eb: 85 c0 test %eax,%eax <== NOT EXECUTED 1091ed: 74 31 je 109220 <== NOT EXECUTED (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); 1091ef: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 1091f2: ff b3 e0 00 00 00 pushl 0xe0(%ebx) <== NOT EXECUTED 1091f8: 8d 53 30 lea 0x30(%ebx),%edx <== NOT EXECUTED 1091fb: 52 push %edx <== NOT EXECUTED 1091fc: ff d0 call *%eax <== NOT EXECUTED tty->tty_rcvwakeup = 1; 1091fe: c7 83 e4 00 00 00 01 movl $0x1,0xe4(%ebx) <== NOT EXECUTED 109205: 00 00 00 <== NOT EXECUTED 109208: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) <== NOT EXECUTED 10920f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } } tty->rawInBufDropped += dropped; rtems_semaphore_release (tty->rawInBuf.Semaphore); return dropped; } 109212: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED 109215: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 109218: 5b pop %ebx <== NOT EXECUTED 109219: 5e pop %esi <== NOT EXECUTED 10921a: 5f pop %edi <== NOT EXECUTED 10921b: c9 leave <== NOT EXECUTED 10921c: c3 ret <== NOT EXECUTED 10921d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED } } } tty->rawInBufDropped += dropped; rtems_semaphore_release (tty->rawInBuf.Semaphore); return dropped; 109220: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) <== NOT EXECUTED } 109227: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED 10922a: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 10922d: 5b pop %ebx <== NOT EXECUTED 10922e: 5e pop %esi <== NOT EXECUTED 10922f: 5f pop %edi <== NOT EXECUTED 109230: c9 leave <== NOT EXECUTED 109231: c3 ret <== NOT EXECUTED 109232: 66 90 xchg %ax,%ax <== 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, 109234: 8d 43 4a lea 0x4a(%ebx),%eax <== NOT EXECUTED 109237: 89 45 cc mov %eax,-0x34(%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); 10923a: 8d 53 30 lea 0x30(%ebx),%edx <== NOT EXECUTED 10923d: 89 55 d0 mov %edx,-0x30(%ebp) <== NOT EXECUTED 109240: c6 45 db 00 movb $0x0,-0x25(%ebp) <== NOT EXECUTED 109244: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) <== NOT EXECUTED tty->tty_rcvwakeup = 1; } return 0; } while (len--) { 10924b: 85 ff test %edi,%edi <== NOT EXECUTED 10924d: 0f 84 0b 01 00 00 je 10935e <== NOT EXECUTED 109253: 90 nop <== NOT EXECUTED c = *buf++; 109254: 8a 06 mov (%esi),%al <== NOT EXECUTED 109256: 88 45 e4 mov %al,-0x1c(%ebp) <== NOT EXECUTED /* FIXME: implement IXANY: any character restarts output */ /* if incoming XON/XOFF controls outgoing stream: */ if (tty->flow_ctrl & FL_MDXON) { 109259: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 10925f: f6 c4 02 test $0x2,%ah <== NOT EXECUTED 109262: 74 1c je 109280 <== NOT EXECUTED /* if received char is V_STOP and V_START (both are equal value) */ if (c == tty->termios.c_cc[VSTOP]) { 109264: 0f be 45 e4 movsbl -0x1c(%ebp),%eax <== NOT EXECUTED 109268: 0f b6 53 4a movzbl 0x4a(%ebx),%edx <== NOT EXECUTED 10926c: 39 d0 cmp %edx,%eax <== NOT EXECUTED 10926e: 0f 84 0c 01 00 00 je 109380 <== NOT EXECUTED /* stop output */ tty->flow_ctrl |= FL_ORCVXOF; } flow_rcv = true; } else if (c == tty->termios.c_cc[VSTART]) { 109274: 0f b6 53 49 movzbl 0x49(%ebx),%edx <== NOT EXECUTED 109278: 39 d0 cmp %edx,%eax <== NOT EXECUTED 10927a: 0f 84 54 01 00 00 je 1093d4 <== NOT EXECUTED /* restart output */ tty->flow_ctrl &= ~FL_ORCVXOF; flow_rcv = true; } } if (flow_rcv) { 109280: 80 7d db 00 cmpb $0x0,-0x25(%ebp) <== NOT EXECUTED 109284: 0f 85 11 01 00 00 jne 10939b <== NOT EXECUTED /* reenable interrupts */ rtems_interrupt_enable(level); } } else { newTail = (tty->rawInBuf.Tail + 1) % tty->rawInBuf.Size; 10928a: 8b 43 60 mov 0x60(%ebx),%eax <== NOT EXECUTED 10928d: 8b 53 64 mov 0x64(%ebx),%edx <== NOT EXECUTED 109290: 89 55 dc mov %edx,-0x24(%ebp) <== NOT EXECUTED 109293: 40 inc %eax <== NOT EXECUTED 109294: 31 d2 xor %edx,%edx <== NOT EXECUTED 109296: f7 75 dc divl -0x24(%ebp) <== NOT EXECUTED 109299: 89 d1 mov %edx,%ecx <== NOT EXECUTED /* if chars_in_buffer > highwater */ rtems_interrupt_disable(level); 10929b: 9c pushf <== NOT EXECUTED 10929c: fa cli <== NOT EXECUTED 10929d: 8f 45 d4 popl -0x2c(%ebp) <== NOT EXECUTED if ((((newTail - tty->rawInBuf.Head + tty->rawInBuf.Size) 1092a0: 8b 43 5c mov 0x5c(%ebx),%eax <== NOT EXECUTED 1092a3: 89 45 c4 mov %eax,-0x3c(%ebp) <== NOT EXECUTED 1092a6: 8b 43 64 mov 0x64(%ebx),%eax <== NOT EXECUTED 1092a9: 8b 53 64 mov 0x64(%ebx),%edx <== NOT EXECUTED 1092ac: 89 55 dc mov %edx,-0x24(%ebp) <== NOT EXECUTED 1092af: 2b 45 c4 sub -0x3c(%ebp),%eax <== NOT EXECUTED 1092b2: 01 c8 add %ecx,%eax <== NOT EXECUTED 1092b4: 31 d2 xor %edx,%edx <== NOT EXECUTED 1092b6: f7 75 dc divl -0x24(%ebp) <== NOT EXECUTED % tty->rawInBuf.Size) > tty->highwater) && 1092b9: 3b 93 c0 00 00 00 cmp 0xc0(%ebx),%edx <== NOT EXECUTED 1092bf: 76 47 jbe 109308 <== NOT EXECUTED !(tty->flow_ctrl & FL_IREQXOF)) { 1092c1: 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) 1092c7: a8 01 test $0x1,%al <== NOT EXECUTED 1092c9: 75 3d jne 109308 <== NOT EXECUTED % tty->rawInBuf.Size) > tty->highwater) && !(tty->flow_ctrl & FL_IREQXOF)) { /* incoming data stream should be stopped */ tty->flow_ctrl |= FL_IREQXOF; 1092cb: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 1092d1: 83 c8 01 or $0x1,%eax <== NOT EXECUTED 1092d4: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED if ((tty->flow_ctrl & (FL_MDXOF | FL_ISNTXOF)) 1092da: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 1092e0: 25 02 04 00 00 and $0x402,%eax <== NOT EXECUTED 1092e5: 3d 00 04 00 00 cmp $0x400,%eax <== NOT EXECUTED 1092ea: 0f 84 27 01 00 00 je 109417 <== NOT EXECUTED (*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTOP]), 1); } } else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF)) 1092f0: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 1092f6: 25 04 01 00 00 and $0x104,%eax <== NOT EXECUTED 1092fb: 3d 00 01 00 00 cmp $0x100,%eax <== NOT EXECUTED 109300: 0f 84 55 01 00 00 je 10945b <== NOT EXECUTED 109306: 66 90 xchg %ax,%ax <== NOT EXECUTED tty->device.stopRemoteTx(tty->minor); } } } /* reenable interrupts */ rtems_interrupt_enable(level); 109308: ff 75 d4 pushl -0x2c(%ebp) <== NOT EXECUTED 10930b: 9d popf <== NOT EXECUTED if (newTail == tty->rawInBuf.Head) { 10930c: 8b 43 5c mov 0x5c(%ebx),%eax <== NOT EXECUTED 10930f: 39 c8 cmp %ecx,%eax <== NOT EXECUTED 109311: 0f 84 b5 00 00 00 je 1093cc <== NOT EXECUTED dropped++; } else { tty->rawInBuf.theBuf[newTail] = c; 109317: 8b 43 58 mov 0x58(%ebx),%eax <== NOT EXECUTED 10931a: 8a 55 e4 mov -0x1c(%ebp),%dl <== NOT EXECUTED 10931d: 88 14 08 mov %dl,(%eax,%ecx,1) <== NOT EXECUTED tty->rawInBuf.Tail = newTail; 109320: 89 4b 60 mov %ecx,0x60(%ebx) <== NOT EXECUTED /* * check to see if rcv wakeup callback was set */ if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) { 109323: 8b 83 e4 00 00 00 mov 0xe4(%ebx),%eax <== NOT EXECUTED 109329: 85 c0 test %eax,%eax <== NOT EXECUTED 10932b: 75 27 jne 109354 <== NOT EXECUTED 10932d: 8b 83 dc 00 00 00 mov 0xdc(%ebx),%eax <== NOT EXECUTED 109333: 85 c0 test %eax,%eax <== NOT EXECUTED 109335: 74 1d je 109354 <== NOT EXECUTED (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); 109337: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 10933a: ff b3 e0 00 00 00 pushl 0xe0(%ebx) <== NOT EXECUTED 109340: ff 75 d0 pushl -0x30(%ebp) <== NOT EXECUTED 109343: ff d0 call *%eax <== NOT EXECUTED tty->tty_rcvwakeup = 1; 109345: c7 83 e4 00 00 00 01 movl $0x1,0xe4(%ebx) <== NOT EXECUTED 10934c: 00 00 00 <== NOT EXECUTED 10934f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 109352: 66 90 xchg %ax,%ax <== NOT EXECUTED } return 0; } while (len--) { c = *buf++; 109354: 46 inc %esi <== NOT EXECUTED 109355: 4f dec %edi <== NOT EXECUTED tty->tty_rcvwakeup = 1; } return 0; } while (len--) { 109356: 85 ff test %edi,%edi <== NOT EXECUTED 109358: 0f 85 f6 fe ff ff jne 109254 <== NOT EXECUTED tty->tty_rcvwakeup = 1; } } } } tty->rawInBufDropped += dropped; 10935e: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED 109361: 01 43 78 add %eax,0x78(%ebx) <== NOT EXECUTED rtems_semaphore_release (tty->rawInBuf.Semaphore); 109364: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 109367: ff 73 68 pushl 0x68(%ebx) <== NOT EXECUTED 10936a: e8 ed 22 00 00 call 10b65c <== NOT EXECUTED return dropped; 10936f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } 109372: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED 109375: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 109378: 5b pop %ebx <== NOT EXECUTED 109379: 5e pop %esi <== NOT EXECUTED 10937a: 5f pop %edi <== NOT EXECUTED 10937b: c9 leave <== NOT EXECUTED 10937c: c3 ret <== NOT EXECUTED 10937d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED /* FIXME: implement IXANY: any character restarts output */ /* if incoming XON/XOFF controls outgoing stream: */ if (tty->flow_ctrl & FL_MDXON) { /* if received char is V_STOP and V_START (both are equal value) */ if (c == tty->termios.c_cc[VSTOP]) { if (c == tty->termios.c_cc[VSTART]) { 109380: 0f b6 53 49 movzbl 0x49(%ebx),%edx <== NOT EXECUTED 109384: 39 d0 cmp %edx,%eax <== NOT EXECUTED 109386: 74 7e je 109406 <== NOT EXECUTED tty->flow_ctrl = tty->flow_ctrl ^ FL_ORCVXOF; } else { /* VSTOP received (other code than VSTART) */ /* stop output */ tty->flow_ctrl |= FL_ORCVXOF; 109388: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 10938e: 83 c8 10 or $0x10,%eax <== NOT EXECUTED 109391: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED } } } tty->rawInBufDropped += dropped; rtems_semaphore_release (tty->rawInBuf.Semaphore); return dropped; 109397: c6 45 db 01 movb $0x1,-0x25(%ebp) <== NOT EXECUTED flow_rcv = true; } } if (flow_rcv) { /* restart output according to FL_ORCVXOF flag */ if ((tty->flow_ctrl & (FL_ORCVXOF | FL_OSTOP)) == FL_OSTOP) { 10939b: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 1093a1: 83 e0 30 and $0x30,%eax <== NOT EXECUTED 1093a4: 83 f8 20 cmp $0x20,%eax <== NOT EXECUTED 1093a7: 75 ab jne 109354 <== NOT EXECUTED /* disable interrupts */ rtems_interrupt_disable(level); 1093a9: 9c pushf <== NOT EXECUTED 1093aa: fa cli <== NOT EXECUTED 1093ab: 5a pop %edx <== NOT EXECUTED tty->flow_ctrl &= ~FL_OSTOP; 1093ac: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 1093b2: 83 e0 df and $0xffffffdf,%eax <== NOT EXECUTED 1093b5: 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) { 1093bb: 8b 83 94 00 00 00 mov 0x94(%ebx),%eax <== NOT EXECUTED 1093c1: 85 c0 test %eax,%eax <== NOT EXECUTED 1093c3: 75 20 jne 1093e5 <== NOT EXECUTED /* if chars available, call write function... */ (*tty->device.write)(tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail], 1); } /* reenable interrupts */ rtems_interrupt_enable(level); 1093c5: 52 push %edx <== NOT EXECUTED 1093c6: 9d popf <== NOT EXECUTED } return 0; } while (len--) { c = *buf++; 1093c7: 46 inc %esi <== NOT EXECUTED 1093c8: 4f dec %edi <== NOT EXECUTED 1093c9: eb 8b jmp 109356 <== NOT EXECUTED 1093cb: 90 nop <== NOT EXECUTED } /* reenable interrupts */ rtems_interrupt_enable(level); if (newTail == tty->rawInBuf.Head) { dropped++; 1093cc: ff 45 e0 incl -0x20(%ebp) <== NOT EXECUTED } return 0; } while (len--) { c = *buf++; 1093cf: 46 inc %esi <== NOT EXECUTED 1093d0: 4f dec %edi <== NOT EXECUTED 1093d1: eb 83 jmp 109356 <== NOT EXECUTED 1093d3: 90 nop <== NOT EXECUTED flow_rcv = true; } else if (c == tty->termios.c_cc[VSTART]) { /* VSTART received */ /* restart output */ tty->flow_ctrl &= ~FL_ORCVXOF; 1093d4: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 1093da: 83 e0 ef and $0xffffffef,%eax <== NOT EXECUTED 1093dd: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED 1093e3: eb b2 jmp 109397 <== NOT EXECUTED tty->flow_ctrl &= ~FL_OSTOP; /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { /* if chars available, call write function... */ (*tty->device.write)(tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail], 1); 1093e5: 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, 1093eb: 51 push %ecx <== NOT EXECUTED 1093ec: 6a 01 push $0x1 <== NOT EXECUTED 1093ee: 03 43 7c add 0x7c(%ebx),%eax <== NOT EXECUTED 1093f1: 50 push %eax <== NOT EXECUTED 1093f2: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED 1093f5: 89 55 c8 mov %edx,-0x38(%ebp) <== NOT EXECUTED 1093f8: ff 93 a4 00 00 00 call *0xa4(%ebx) <== NOT EXECUTED 1093fe: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 109401: 8b 55 c8 mov -0x38(%ebp),%edx <== NOT EXECUTED 109404: eb bf jmp 1093c5 <== NOT EXECUTED /* if received char is V_STOP and V_START (both are equal value) */ if (c == tty->termios.c_cc[VSTOP]) { if (c == tty->termios.c_cc[VSTART]) { /* received VSTOP and VSTART==VSTOP? */ /* then toggle "stop output" status */ tty->flow_ctrl = tty->flow_ctrl ^ FL_ORCVXOF; 109406: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 10940c: 83 f0 10 xor $0x10,%eax <== NOT EXECUTED 10940f: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED 109415: eb 80 jmp 109397 <== NOT EXECUTED !(tty->flow_ctrl & FL_IREQXOF)) { /* incoming data stream should be stopped */ tty->flow_ctrl |= FL_IREQXOF; if ((tty->flow_ctrl & (FL_MDXOF | FL_ISNTXOF)) == (FL_MDXOF ) ){ if ((tty->flow_ctrl & FL_OSTOP) || 109417: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 10941d: a8 20 test $0x20,%al <== NOT EXECUTED 10941f: 75 0e jne 10942f <== NOT EXECUTED (tty->rawOutBufState == rob_idle)) { 109421: 8b 83 94 00 00 00 mov 0x94(%ebx),%eax <== NOT EXECUTED 109427: 85 c0 test %eax,%eax <== NOT EXECUTED 109429: 0f 85 d9 fe ff ff jne 109308 <== NOT EXECUTED /* if tx is stopped due to XOFF or out of data */ /* call write function here */ tty->flow_ctrl |= FL_ISNTXOF; 10942f: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 109435: 83 c8 02 or $0x2,%eax <== NOT EXECUTED 109438: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED (*tty->device.write)(tty->minor, 10943e: 52 push %edx <== NOT EXECUTED 10943f: 6a 01 push $0x1 <== NOT EXECUTED 109441: ff 75 cc pushl -0x34(%ebp) <== NOT EXECUTED 109444: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED 109447: 89 4d c8 mov %ecx,-0x38(%ebp) <== NOT EXECUTED 10944a: ff 93 a4 00 00 00 call *0xa4(%ebx) <== NOT EXECUTED 109450: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 109453: 8b 4d c8 mov -0x38(%ebp),%ecx <== NOT EXECUTED 109456: e9 ad fe ff ff jmp 109308 <== NOT EXECUTED 1); } } else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF)) == (FL_MDRTS ) ) { tty->flow_ctrl |= FL_IRTSOFF; 10945b: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 109461: 83 c8 04 or $0x4,%eax <== NOT EXECUTED 109464: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED /* deactivate RTS line */ if (tty->device.stopRemoteTx != NULL) { 10946a: 8b 83 ac 00 00 00 mov 0xac(%ebx),%eax <== NOT EXECUTED 109470: 85 c0 test %eax,%eax <== NOT EXECUTED 109472: 0f 84 90 fe ff ff je 109308 <== NOT EXECUTED tty->device.stopRemoteTx(tty->minor); 109478: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10947b: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED 10947e: 89 4d c8 mov %ecx,-0x38(%ebp) <== NOT EXECUTED 109481: ff d0 call *%eax <== NOT EXECUTED 109483: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 109486: 8b 4d c8 mov -0x38(%ebp),%ecx <== NOT EXECUTED 109489: e9 7a fe ff ff jmp 109308 <== NOT EXECUTED 00108e68 : struct rtems_termios_tty *rtems_termios_ttyTail; rtems_id rtems_termios_ttyMutex; void rtems_termios_initialize (void) { 108e68: 55 push %ebp 108e69: 89 e5 mov %esp,%ebp 108e6b: 83 ec 08 sub $0x8,%esp rtems_status_code sc; /* * Create the mutex semaphore for the tty list */ if (!rtems_termios_ttyMutex) { 108e6e: a1 98 72 12 00 mov 0x127298,%eax 108e73: 85 c0 test %eax,%eax 108e75: 74 05 je 108e7c RTEMS_NO_PRIORITY, &rtems_termios_ttyMutex); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); } } 108e77: c9 leave 108e78: c3 ret 108e79: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED /* * Create the mutex semaphore for the tty list */ if (!rtems_termios_ttyMutex) { sc = rtems_semaphore_create ( 108e7c: 83 ec 0c sub $0xc,%esp 108e7f: 68 98 72 12 00 push $0x127298 108e84: 6a 00 push $0x0 108e86: 6a 54 push $0x54 108e88: 6a 01 push $0x1 108e8a: 68 69 6d 52 54 push $0x54526d69 108e8f: e8 54 24 00 00 call 10b2e8 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) 108e94: 83 c4 20 add $0x20,%esp 108e97: 85 c0 test %eax,%eax 108e99: 74 dc je 108e77 <== NEVER TAKEN rtems_fatal_error_occurred (sc); 108e9b: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 108e9e: 50 push %eax <== NOT EXECUTED 108e9f: e8 f8 2c 00 00 call 10bb9c <== NOT EXECUTED 00109f38 : } } rtems_status_code rtems_termios_ioctl (void *arg) { 109f38: 55 push %ebp 109f39: 89 e5 mov %esp,%ebp 109f3b: 57 push %edi 109f3c: 56 push %esi 109f3d: 53 push %ebx 109f3e: 83 ec 20 sub $0x20,%esp 109f41: 8b 5d 08 mov 0x8(%ebp),%ebx rtems_libio_ioctl_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 109f44: 8b 03 mov (%ebx),%eax 109f46: 8b 40 34 mov 0x34(%eax),%eax 109f49: 89 45 e4 mov %eax,-0x1c(%ebp) struct ttywakeup *wakeup = (struct ttywakeup *)args->buffer; 109f4c: 8b 73 08 mov 0x8(%ebx),%esi rtems_status_code sc; args->ioctl_return = 0; 109f4f: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx) sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 109f56: 6a 00 push $0x0 109f58: 6a 00 push $0x0 109f5a: ff 70 18 pushl 0x18(%eax) 109f5d: e8 fe 15 00 00 call 10b560 109f62: 89 45 e0 mov %eax,-0x20(%ebp) if (sc != RTEMS_SUCCESSFUL) { 109f65: 83 c4 10 add $0x10,%esp 109f68: 85 c0 test %eax,%eax 109f6a: 75 24 jne 109f90 <== ALWAYS TAKEN args->ioctl_return = sc; return sc; } switch (args->command) { 109f6c: 8b 43 04 mov 0x4(%ebx),%eax 109f6f: 83 f8 04 cmp $0x4,%eax 109f72: 74 74 je 109fe8 <== ALWAYS TAKEN 109f74: 77 2a ja 109fa0 <== ALWAYS TAKEN 109f76: 83 f8 02 cmp $0x2,%eax 109f79: 0f 84 a1 00 00 00 je 10a020 109f7f: 0f 86 3b 02 00 00 jbe 10a1c0 if (tty->device.setAttributes) (*tty->device.setAttributes)(tty->minor, &tty->termios); break; case RTEMS_IO_TCDRAIN: drainOutput (tty); 109f85: 8b 45 e4 mov -0x1c(%ebp),%eax 109f88: e8 ff fb ff ff call 109b8c break; 109f8d: eb 6d jmp 109ffc <== ALWAYS TAKEN 109f8f: 90 nop <== NOT EXECUTED rtems_status_code sc; args->ioctl_return = 0; sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) { args->ioctl_return = sc; 109f90: 89 43 0c mov %eax,0xc(%ebx) <== NOT EXECUTED break; } rtems_semaphore_release (tty->osem); args->ioctl_return = sc; return sc; } 109f93: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED 109f96: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 109f99: 5b pop %ebx <== NOT EXECUTED 109f9a: 5e pop %esi <== NOT EXECUTED 109f9b: 5f pop %edi <== NOT EXECUTED 109f9c: c9 leave <== NOT EXECUTED 109f9d: c3 ret <== NOT EXECUTED 109f9e: 66 90 xchg %ax,%ax <== NOT EXECUTED sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) { args->ioctl_return = sc; return sc; } switch (args->command) { 109fa0: 3d 7f 66 04 40 cmp $0x4004667f,%eax <== NOT EXECUTED 109fa5: 0f 84 ed 01 00 00 je 10a198 <== NOT EXECUTED 109fab: 0f 87 2f 02 00 00 ja 10a1e0 <== NOT EXECUTED 109fb1: 83 f8 05 cmp $0x5,%eax <== NOT EXECUTED 109fb4: 0f 84 aa 02 00 00 je 10a264 <== NOT EXECUTED default: if (rtems_termios_linesw[tty->t_line].l_ioctl != NULL) { 109fba: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED 109fbd: 8b 82 cc 00 00 00 mov 0xcc(%edx),%eax <== NOT EXECUTED 109fc3: c1 e0 05 shl $0x5,%eax <== NOT EXECUTED 109fc6: 8b 80 18 6f 12 00 mov 0x126f18(%eax),%eax <== NOT EXECUTED 109fcc: 85 c0 test %eax,%eax <== NOT EXECUTED 109fce: 0f 84 ac 02 00 00 je 10a280 <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_ioctl(tty,args); 109fd4: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 109fd7: 53 push %ebx <== NOT EXECUTED 109fd8: ff 75 e4 pushl -0x1c(%ebp) <== NOT EXECUTED 109fdb: ff d0 call *%eax <== NOT EXECUTED 109fdd: 89 45 e0 mov %eax,-0x20(%ebp) <== NOT EXECUTED 109fe0: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 109fe3: eb 17 jmp 109ffc <== NOT EXECUTED 109fe5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED case RTEMS_IO_SNDWAKEUP: tty->tty_snd = *wakeup; break; case RTEMS_IO_RCVWAKEUP: tty->tty_rcv = *wakeup; 109fe8: 8b 06 mov (%esi),%eax <== NOT EXECUTED 109fea: 8b 56 04 mov 0x4(%esi),%edx <== NOT EXECUTED 109fed: 8b 4d e4 mov -0x1c(%ebp),%ecx <== NOT EXECUTED 109ff0: 89 81 dc 00 00 00 mov %eax,0xdc(%ecx) <== NOT EXECUTED 109ff6: 89 91 e0 00 00 00 mov %edx,0xe0(%ecx) <== NOT EXECUTED /* Half guess that this is the right operation */ *(int *)args->buffer = tty->ccount - tty->cindex + rawnc; } break; } rtems_semaphore_release (tty->osem); 109ffc: 83 ec 0c sub $0xc,%esp 109fff: 8b 45 e4 mov -0x1c(%ebp),%eax 10a002: ff 70 18 pushl 0x18(%eax) 10a005: e8 52 16 00 00 call 10b65c args->ioctl_return = sc; 10a00a: 8b 55 e0 mov -0x20(%ebp),%edx 10a00d: 89 53 0c mov %edx,0xc(%ebx) return sc; 10a010: 83 c4 10 add $0x10,%esp } 10a013: 8b 45 e0 mov -0x20(%ebp),%eax 10a016: 8d 65 f4 lea -0xc(%ebp),%esp 10a019: 5b pop %ebx 10a01a: 5e pop %esi 10a01b: 5f pop %edi 10a01c: c9 leave 10a01d: c3 ret 10a01e: 66 90 xchg %ax,%ax <== NOT EXECUTED case RTEMS_IO_GET_ATTRIBUTES: *(struct termios *)args->buffer = tty->termios; break; case RTEMS_IO_SET_ATTRIBUTES: tty->termios = *(struct termios *)args->buffer; 10a020: 8b 73 08 mov 0x8(%ebx),%esi 10a023: 8b 4d e4 mov -0x1c(%ebp),%ecx 10a026: 83 c1 30 add $0x30,%ecx 10a029: 89 4d dc mov %ecx,-0x24(%ebp) 10a02c: b9 09 00 00 00 mov $0x9,%ecx 10a031: 8b 7d dc mov -0x24(%ebp),%edi 10a034: 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) && 10a036: 8b 55 e4 mov -0x1c(%ebp),%edx 10a039: 8b 82 b8 00 00 00 mov 0xb8(%edx),%eax 10a03f: f6 c4 02 test $0x2,%ah 10a042: 74 44 je 10a088 10a044: f6 42 31 04 testb $0x4,0x31(%edx) 10a048: 75 3e jne 10a088 <== NEVER TAKEN !(tty->termios.c_iflag & IXON)) { /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDXON | FL_ORCVXOF); 10a04a: 8b 82 b8 00 00 00 mov 0xb8(%edx),%eax <== NOT EXECUTED 10a050: 25 ef fd ff ff and $0xfffffdef,%eax <== NOT EXECUTED 10a055: 89 82 b8 00 00 00 mov %eax,0xb8(%edx) <== NOT EXECUTED /* has output been stopped due to received XOFF? */ if (tty->flow_ctrl & FL_OSTOP) { 10a05b: 8b 82 b8 00 00 00 mov 0xb8(%edx),%eax <== NOT EXECUTED 10a061: a8 20 test $0x20,%al <== NOT EXECUTED 10a063: 74 23 je 10a088 <== NOT EXECUTED /* disable interrupts */ rtems_interrupt_disable(level); 10a065: 9c pushf <== NOT EXECUTED 10a066: fa cli <== NOT EXECUTED 10a067: 5e pop %esi <== NOT EXECUTED tty->flow_ctrl &= ~FL_OSTOP; 10a068: 8b 82 b8 00 00 00 mov 0xb8(%edx),%eax <== NOT EXECUTED 10a06e: 83 e0 df and $0xffffffdf,%eax <== NOT EXECUTED 10a071: 89 82 b8 00 00 00 mov %eax,0xb8(%edx) <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { 10a077: 8b ba 94 00 00 00 mov 0x94(%edx),%edi <== NOT EXECUTED 10a07d: 85 ff test %edi,%edi <== NOT EXECUTED 10a07f: 0f 85 ab 02 00 00 jne 10a330 <== NOT EXECUTED /* if chars available, call write function... */ (*tty->device.write)(tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1); } /* reenable interrupts */ rtems_interrupt_enable(level); 10a085: 56 push %esi <== NOT EXECUTED 10a086: 9d popf <== NOT EXECUTED 10a087: 90 nop <== NOT EXECUTED } } /* check for incoming XON/XOFF flow control switched off */ if (( tty->flow_ctrl & FL_MDXOF) && 10a088: 8b 4d e4 mov -0x1c(%ebp),%ecx 10a08b: 8b 81 b8 00 00 00 mov 0xb8(%ecx),%eax 10a091: f6 c4 04 test $0x4,%ah 10a094: 74 24 je 10a0ba <== NEVER TAKEN 10a096: f6 41 31 10 testb $0x10,0x31(%ecx) <== NOT EXECUTED 10a09a: 75 1e jne 10a0ba <== NOT EXECUTED !(tty->termios.c_iflag & IXOFF)) { /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDXOF); 10a09c: 8b 81 b8 00 00 00 mov 0xb8(%ecx),%eax <== NOT EXECUTED 10a0a2: 80 e4 fb and $0xfb,%ah <== NOT EXECUTED 10a0a5: 89 81 b8 00 00 00 mov %eax,0xb8(%ecx) <== NOT EXECUTED /* FIXME: what happens, if we had sent XOFF but not yet XON? */ tty->flow_ctrl &= ~(FL_ISNTXOF); 10a0ab: 8b 81 b8 00 00 00 mov 0xb8(%ecx),%eax <== NOT EXECUTED 10a0b1: 83 e0 fd and $0xfffffffd,%eax <== NOT EXECUTED 10a0b4: 89 81 b8 00 00 00 mov %eax,0xb8(%ecx) <== NOT EXECUTED } /* check for incoming RTS/CTS flow control switched off */ if (( tty->flow_ctrl & FL_MDRTS) && 10a0ba: 8b 55 e4 mov -0x1c(%ebp),%edx 10a0bd: 8b 82 b8 00 00 00 mov 0xb8(%edx),%eax 10a0c3: f6 c4 01 test $0x1,%ah 10a0c6: 74 4b je 10a113 <== NEVER TAKEN 10a0c8: 8b 7a 38 mov 0x38(%edx),%edi <== NOT EXECUTED 10a0cb: 85 ff test %edi,%edi <== NOT EXECUTED 10a0cd: 0f 88 09 02 00 00 js 10a2dc <== NOT EXECUTED !(tty->termios.c_cflag & CRTSCTS)) { /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDRTS); 10a0d3: 8b 82 b8 00 00 00 mov 0xb8(%edx),%eax <== NOT EXECUTED 10a0d9: 80 e4 fe and $0xfe,%ah <== NOT EXECUTED 10a0dc: 89 82 b8 00 00 00 mov %eax,0xb8(%edx) <== NOT EXECUTED /* restart remote Tx, if it was stopped */ if ((tty->flow_ctrl & FL_IRTSOFF) && 10a0e2: 8b 82 b8 00 00 00 mov 0xb8(%edx),%eax <== NOT EXECUTED 10a0e8: a8 04 test $0x4,%al <== NOT EXECUTED 10a0ea: 74 15 je 10a101 <== NOT EXECUTED (tty->device.startRemoteTx != NULL)) { 10a0ec: 8b 82 b0 00 00 00 mov 0xb0(%edx),%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) && 10a0f2: 85 c0 test %eax,%eax <== NOT EXECUTED 10a0f4: 74 0b je 10a101 <== NOT EXECUTED (tty->device.startRemoteTx != NULL)) { tty->device.startRemoteTx(tty->minor); 10a0f6: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10a0f9: ff 72 10 pushl 0x10(%edx) <== NOT EXECUTED 10a0fc: ff d0 call *%eax <== NOT EXECUTED 10a0fe: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } tty->flow_ctrl &= ~(FL_IRTSOFF); 10a101: 8b 4d e4 mov -0x1c(%ebp),%ecx <== NOT EXECUTED 10a104: 8b 81 b8 00 00 00 mov 0xb8(%ecx),%eax <== NOT EXECUTED 10a10a: 83 e0 fb and $0xfffffffb,%eax <== NOT EXECUTED 10a10d: 89 81 b8 00 00 00 mov %eax,0xb8(%ecx) <== NOT EXECUTED /* * check for flow control options to be switched on */ /* check for incoming RTS/CTS flow control switched on */ if (tty->termios.c_cflag & CRTSCTS) { 10a113: 8b 45 e4 mov -0x1c(%ebp),%eax 10a116: 8b 70 38 mov 0x38(%eax),%esi 10a119: 85 f6 test %esi,%esi 10a11b: 0f 88 bb 01 00 00 js 10a2dc <== ALWAYS TAKEN tty->flow_ctrl |= FL_MDRTS; } /* check for incoming XON/XOF flow control switched on */ if (tty->termios.c_iflag & IXOFF) { 10a121: 8b 4d e4 mov -0x1c(%ebp),%ecx 10a124: 8b 41 30 mov 0x30(%ecx),%eax 10a127: f6 c4 10 test $0x10,%ah 10a12a: 74 0f je 10a13b <== NEVER TAKEN tty->flow_ctrl |= FL_MDXOF; 10a12c: 8b 91 b8 00 00 00 mov 0xb8(%ecx),%edx <== NOT EXECUTED 10a132: 80 ce 04 or $0x4,%dh <== NOT EXECUTED 10a135: 89 91 b8 00 00 00 mov %edx,0xb8(%ecx) <== NOT EXECUTED } /* check for outgoing XON/XOF flow control switched on */ if (tty->termios.c_iflag & IXON) { 10a13b: f6 c4 04 test $0x4,%ah 10a13e: 74 12 je 10a152 <== ALWAYS TAKEN tty->flow_ctrl |= FL_MDXON; 10a140: 8b 55 e4 mov -0x1c(%ebp),%edx 10a143: 8b 82 b8 00 00 00 mov 0xb8(%edx),%eax 10a149: 80 cc 02 or $0x2,%ah 10a14c: 89 82 b8 00 00 00 mov %eax,0xb8(%edx) tty->termios = *(struct termios *)args->buffer; /* check for and process change in flow control options */ termios_set_flowctrl(tty); if (tty->termios.c_lflag & ICANON) { 10a152: 8b 4d e4 mov -0x1c(%ebp),%ecx 10a155: f6 41 3c 02 testb $0x2,0x3c(%ecx) 10a159: 0f 84 2d 01 00 00 je 10a28c <== ALWAYS TAKEN tty->rawInBufSemaphoreOptions = RTEMS_WAIT; 10a15f: c7 41 6c 00 00 00 00 movl $0x0,0x6c(%ecx) tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; 10a166: c7 41 70 00 00 00 00 movl $0x0,0x70(%ecx) tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; 10a16d: c7 41 74 00 00 00 00 movl $0x0,0x74(%ecx) else { tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT; } } } if (tty->device.setAttributes) 10a174: 8b 55 e4 mov -0x1c(%ebp),%edx 10a177: 8b 82 a8 00 00 00 mov 0xa8(%edx),%eax 10a17d: 85 c0 test %eax,%eax 10a17f: 0f 84 77 fe ff ff je 109ffc <== ALWAYS TAKEN (*tty->device.setAttributes)(tty->minor, &tty->termios); 10a185: 83 ec 08 sub $0x8,%esp 10a188: ff 75 dc pushl -0x24(%ebp) 10a18b: ff 72 10 pushl 0x10(%edx) 10a18e: ff d0 call *%eax 10a190: 83 c4 10 add $0x10,%esp 10a193: e9 64 fe ff ff jmp 109ffc <== ALWAYS TAKEN *(int*)(args->buffer)=tty->t_line; break; #endif case FIONREAD: { int rawnc = tty->rawInBuf.Tail - tty->rawInBuf.Head; 10a198: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED 10a19b: 8b 42 60 mov 0x60(%edx),%eax <== NOT EXECUTED 10a19e: 89 d1 mov %edx,%ecx <== NOT EXECUTED 10a1a0: 8b 52 5c mov 0x5c(%edx),%edx <== NOT EXECUTED if ( rawnc < 0 ) 10a1a3: 29 d0 sub %edx,%eax <== NOT EXECUTED 10a1a5: 0f 88 25 01 00 00 js 10a2d0 <== NOT EXECUTED rawnc += tty->rawInBuf.Size; /* Half guess that this is the right operation */ *(int *)args->buffer = tty->ccount - tty->cindex + rawnc; 10a1ab: 8b 53 08 mov 0x8(%ebx),%edx <== NOT EXECUTED 10a1ae: 8b 4d e4 mov -0x1c(%ebp),%ecx <== NOT EXECUTED 10a1b1: 03 41 20 add 0x20(%ecx),%eax <== NOT EXECUTED 10a1b4: 2b 41 24 sub 0x24(%ecx),%eax <== NOT EXECUTED 10a1b7: 89 02 mov %eax,(%edx) <== NOT EXECUTED 10a1b9: e9 3e fe ff ff jmp 109ffc <== NOT EXECUTED 10a1be: 66 90 xchg %ax,%ax <== NOT EXECUTED sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) { args->ioctl_return = sc; return sc; } switch (args->command) { 10a1c0: 48 dec %eax 10a1c1: 0f 85 f3 fd ff ff jne 109fba <== ALWAYS TAKEN sc = RTEMS_INVALID_NUMBER; } break; case RTEMS_IO_GET_ATTRIBUTES: *(struct termios *)args->buffer = tty->termios; 10a1c7: 8b 43 08 mov 0x8(%ebx),%eax 10a1ca: 8b 75 e4 mov -0x1c(%ebp),%esi 10a1cd: 83 c6 30 add $0x30,%esi 10a1d0: b9 09 00 00 00 mov $0x9,%ecx 10a1d5: 89 c7 mov %eax,%edi 10a1d7: f3 a5 rep movsl %ds:(%esi),%es:(%edi) break; 10a1d9: e9 1e fe ff ff jmp 109ffc <== ALWAYS TAKEN 10a1de: 66 90 xchg %ax,%ax <== NOT EXECUTED sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) { args->ioctl_return = sc; return sc; } switch (args->command) { 10a1e0: 3d 1a 74 04 40 cmp $0x4004741a,%eax <== NOT EXECUTED 10a1e5: 74 69 je 10a250 <== NOT EXECUTED 10a1e7: 3d 1b 74 04 80 cmp $0x8004741b,%eax <== NOT EXECUTED 10a1ec: 0f 85 c8 fd ff ff jne 109fba <== NOT EXECUTED #if 1 /* FIXME */ case TIOCSETD: /* * close old line discipline */ if (rtems_termios_linesw[tty->t_line].l_close != NULL) { 10a1f2: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED 10a1f5: 8b 82 cc 00 00 00 mov 0xcc(%edx),%eax <== NOT EXECUTED 10a1fb: c1 e0 05 shl $0x5,%eax <== NOT EXECUTED 10a1fe: 8b 80 04 6f 12 00 mov 0x126f04(%eax),%eax <== NOT EXECUTED 10a204: 85 c0 test %eax,%eax <== NOT EXECUTED 10a206: 74 0c je 10a214 <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_close(tty); 10a208: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10a20b: 52 push %edx <== NOT EXECUTED 10a20c: ff d0 call *%eax <== NOT EXECUTED 10a20e: 89 45 e0 mov %eax,-0x20(%ebp) <== NOT EXECUTED 10a211: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } tty->t_line=*(int*)(args->buffer); 10a214: 8b 43 08 mov 0x8(%ebx),%eax <== NOT EXECUTED 10a217: 8b 00 mov (%eax),%eax <== NOT EXECUTED 10a219: 8b 4d e4 mov -0x1c(%ebp),%ecx <== NOT EXECUTED 10a21c: 89 81 cc 00 00 00 mov %eax,0xcc(%ecx) <== NOT EXECUTED tty->t_sc = NULL; /* ensure that no more valid data */ 10a222: c7 81 d0 00 00 00 00 movl $0x0,0xd0(%ecx) <== NOT EXECUTED 10a229: 00 00 00 <== NOT EXECUTED /* * open new line discipline */ if (rtems_termios_linesw[tty->t_line].l_open != NULL) { 10a22c: c1 e0 05 shl $0x5,%eax <== NOT EXECUTED 10a22f: 8b 80 00 6f 12 00 mov 0x126f00(%eax),%eax <== NOT EXECUTED 10a235: 85 c0 test %eax,%eax <== NOT EXECUTED 10a237: 0f 84 bf fd ff ff je 109ffc <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_open(tty); 10a23d: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10a240: 51 push %ecx <== NOT EXECUTED 10a241: ff d0 call *%eax <== NOT EXECUTED 10a243: 89 45 e0 mov %eax,-0x20(%ebp) <== NOT EXECUTED 10a246: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10a249: e9 ae fd ff ff jmp 109ffc <== NOT EXECUTED 10a24e: 66 90 xchg %ax,%ax <== NOT EXECUTED } break; case TIOCGETD: *(int*)(args->buffer)=tty->t_line; 10a250: 8b 43 08 mov 0x8(%ebx),%eax <== NOT EXECUTED 10a253: 8b 4d e4 mov -0x1c(%ebp),%ecx <== NOT EXECUTED 10a256: 8b 91 cc 00 00 00 mov 0xcc(%ecx),%edx <== NOT EXECUTED 10a25c: 89 10 mov %edx,(%eax) <== NOT EXECUTED break; 10a25e: e9 99 fd ff ff jmp 109ffc <== NOT EXECUTED 10a263: 90 nop <== NOT EXECUTED case RTEMS_IO_TCDRAIN: drainOutput (tty); break; case RTEMS_IO_SNDWAKEUP: tty->tty_snd = *wakeup; 10a264: 8b 06 mov (%esi),%eax <== NOT EXECUTED 10a266: 8b 56 04 mov 0x4(%esi),%edx <== NOT EXECUTED 10a269: 8b 4d e4 mov -0x1c(%ebp),%ecx <== NOT EXECUTED 10a26c: 89 81 d4 00 00 00 mov %eax,0xd4(%ecx) <== NOT EXECUTED 10a272: 89 91 d8 00 00 00 mov %edx,0xd8(%ecx) <== NOT EXECUTED break; 10a278: e9 7f fd ff ff jmp 109ffc <== NOT EXECUTED 10a27d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED args->ioctl_return = sc; return sc; } switch (args->command) { default: if (rtems_termios_linesw[tty->t_line].l_ioctl != NULL) { 10a280: c7 45 e0 0a 00 00 00 movl $0xa,-0x20(%ebp) <== NOT EXECUTED 10a287: e9 70 fd ff ff jmp 109ffc <== NOT EXECUTED 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; 10a28c: 8b 45 e4 mov -0x1c(%ebp),%eax <== NOT EXECUTED 10a28f: 0f b6 70 46 movzbl 0x46(%eax),%esi <== NOT EXECUTED 10a293: e8 b8 0b 00 00 call 10ae50 <== NOT EXECUTED tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; } else { tty->vtimeTicks = tty->termios.c_cc[VTIME] * 10a298: 0f af c6 imul %esi,%eax <== NOT EXECUTED 10a29b: ba cd cc cc cc mov $0xcccccccd,%edx <== NOT EXECUTED 10a2a0: f7 e2 mul %edx <== NOT EXECUTED 10a2a2: c1 ea 03 shr $0x3,%edx <== NOT EXECUTED 10a2a5: 8b 4d e4 mov -0x1c(%ebp),%ecx <== NOT EXECUTED 10a2a8: 89 51 54 mov %edx,0x54(%ecx) <== NOT EXECUTED rtems_clock_get_ticks_per_second() / 10; if (tty->termios.c_cc[VTIME]) { 10a2ab: 80 79 46 00 cmpb $0x0,0x46(%ecx) <== NOT EXECUTED 10a2af: 74 42 je 10a2f3 <== NOT EXECUTED tty->rawInBufSemaphoreOptions = RTEMS_WAIT; 10a2b1: c7 41 6c 00 00 00 00 movl $0x0,0x6c(%ecx) <== NOT EXECUTED tty->rawInBufSemaphoreTimeout = tty->vtimeTicks; 10a2b8: 89 51 70 mov %edx,0x70(%ecx) <== NOT EXECUTED if (tty->termios.c_cc[VMIN]) 10a2bb: 80 79 47 00 cmpb $0x0,0x47(%ecx) <== NOT EXECUTED 10a2bf: 74 55 je 10a316 <== NOT EXECUTED tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; 10a2c1: c7 41 74 00 00 00 00 movl $0x0,0x74(%ecx) <== NOT EXECUTED 10a2c8: e9 a7 fe ff ff jmp 10a174 <== NOT EXECUTED 10a2cd: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED #endif case FIONREAD: { int rawnc = tty->rawInBuf.Tail - tty->rawInBuf.Head; if ( rawnc < 0 ) rawnc += tty->rawInBuf.Size; 10a2d0: 8b 51 64 mov 0x64(%ecx),%edx <== NOT EXECUTED 10a2d3: 01 d0 add %edx,%eax <== NOT EXECUTED 10a2d5: e9 d1 fe ff ff jmp 10a1ab <== NOT EXECUTED 10a2da: 66 90 xchg %ax,%ax <== NOT EXECUTED /* * check for flow control options to be switched on */ /* check for incoming RTS/CTS flow control switched on */ if (tty->termios.c_cflag & CRTSCTS) { tty->flow_ctrl |= FL_MDRTS; 10a2dc: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED 10a2df: 8b 82 b8 00 00 00 mov 0xb8(%edx),%eax <== NOT EXECUTED 10a2e5: 80 cc 01 or $0x1,%ah <== NOT EXECUTED 10a2e8: 89 82 b8 00 00 00 mov %eax,0xb8(%edx) <== NOT EXECUTED 10a2ee: e9 2e fe ff ff jmp 10a121 <== NOT EXECUTED tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; else tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks; } else { if (tty->termios.c_cc[VMIN]) { 10a2f3: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED 10a2f6: 80 7a 47 00 cmpb $0x0,0x47(%edx) <== NOT EXECUTED 10a2fa: 74 25 je 10a321 <== NOT EXECUTED tty->rawInBufSemaphoreOptions = RTEMS_WAIT; 10a2fc: c7 42 6c 00 00 00 00 movl $0x0,0x6c(%edx) <== NOT EXECUTED tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; 10a303: c7 42 70 00 00 00 00 movl $0x0,0x70(%edx) <== NOT EXECUTED tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; 10a30a: c7 42 74 00 00 00 00 movl $0x0,0x74(%edx) <== NOT EXECUTED 10a311: e9 5e fe ff ff jmp 10a174 <== NOT EXECUTED tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = tty->vtimeTicks; if (tty->termios.c_cc[VMIN]) tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; else tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks; 10a316: 8b 45 e4 mov -0x1c(%ebp),%eax <== NOT EXECUTED 10a319: 89 50 74 mov %edx,0x74(%eax) <== NOT EXECUTED 10a31c: e9 53 fe ff ff jmp 10a174 <== NOT EXECUTED tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; } else { tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT; 10a321: 8b 4d e4 mov -0x1c(%ebp),%ecx <== NOT EXECUTED 10a324: c7 41 6c 01 00 00 00 movl $0x1,0x6c(%ecx) <== NOT EXECUTED 10a32b: e9 44 fe ff ff jmp 10a174 <== NOT EXECUTED tty->flow_ctrl &= ~FL_OSTOP; /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { /* if chars available, call write function... */ (*tty->device.write)(tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1); 10a330: 8b 82 84 00 00 00 mov 0x84(%edx),%eax <== NOT EXECUTED rtems_interrupt_disable(level); tty->flow_ctrl &= ~FL_OSTOP; /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { /* if chars available, call write function... */ (*tty->device.write)(tty->minor, 10a336: 51 push %ecx <== NOT EXECUTED 10a337: 6a 01 push $0x1 <== NOT EXECUTED 10a339: 03 42 7c add 0x7c(%edx),%eax <== NOT EXECUTED 10a33c: 50 push %eax <== NOT EXECUTED 10a33d: ff 72 10 pushl 0x10(%edx) <== NOT EXECUTED 10a340: ff 92 a4 00 00 00 call *0xa4(%edx) <== NOT EXECUTED 10a346: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10a349: e9 37 fd ff ff jmp 10a085 <== NOT EXECUTED 0010a2c4 : #include int rtems_termios_number_to_baud( int32_t baud ) { 10a2c4: 55 push %ebp 10a2c5: 89 e5 mov %esp,%ebp 10a2c7: 8b 45 08 mov 0x8(%ebp),%eax int termios_baud; switch (baud) { 10a2ca: 3d b0 04 00 00 cmp $0x4b0,%eax 10a2cf: 0f 84 47 01 00 00 je 10a41c 10a2d5: 7e 3d jle 10a314 10a2d7: 3d 00 4b 00 00 cmp $0x4b00,%eax 10a2dc: 0f 84 4a 01 00 00 je 10a42c 10a2e2: 7e 64 jle 10a348 10a2e4: 3d 00 c2 01 00 cmp $0x1c200,%eax 10a2e9: 0f 84 15 01 00 00 je 10a404 10a2ef: 0f 8e af 00 00 00 jle 10a3a4 10a2f5: 3d 00 84 03 00 cmp $0x38400,%eax 10a2fa: 0f 84 fc 00 00 00 je 10a3fc 10a300: 3d 00 08 07 00 cmp $0x70800,%eax 10a305: 0f 85 89 00 00 00 jne 10a394 <== ALWAYS TAKEN 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; 10a30b: b8 04 10 00 00 mov $0x1004,%eax case 460800: termios_baud = B460800; break; default: termios_baud = -1; break; } return termios_baud; } 10a310: c9 leave 10a311: c3 ret 10a312: 66 90 xchg %ax,%ax <== NOT EXECUTED int32_t baud ) { int termios_baud; switch (baud) { 10a314: 3d 86 00 00 00 cmp $0x86,%eax 10a319: 0f 84 05 01 00 00 je 10a424 10a31f: 7e 4f jle 10a370 10a321: 3d c8 00 00 00 cmp $0xc8,%eax 10a326: 0f 84 b8 00 00 00 je 10a3e4 10a32c: 7e 5e jle 10a38c 10a32e: 3d 2c 01 00 00 cmp $0x12c,%eax 10a333: 0f 84 9b 00 00 00 je 10a3d4 10a339: 3d 58 02 00 00 cmp $0x258,%eax 10a33e: 75 54 jne 10a394 <== ALWAYS TAKEN 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; 10a340: b8 08 00 00 00 mov $0x8,%eax case 460800: termios_baud = B460800; break; default: termios_baud = -1; break; } return termios_baud; } 10a345: c9 leave 10a346: c3 ret 10a347: 90 nop <== NOT EXECUTED int32_t baud ) { int termios_baud; switch (baud) { 10a348: 3d 60 09 00 00 cmp $0x960,%eax 10a34d: 0f 84 c1 00 00 00 je 10a414 10a353: 7e 67 jle 10a3bc 10a355: 3d c0 12 00 00 cmp $0x12c0,%eax 10a35a: 0f 84 8c 00 00 00 je 10a3ec 10a360: 3d 80 25 00 00 cmp $0x2580,%eax 10a365: 75 2d jne 10a394 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; 10a367: b8 0d 00 00 00 mov $0xd,%eax case 460800: termios_baud = B460800; break; default: termios_baud = -1; break; } return termios_baud; } 10a36c: c9 leave 10a36d: c3 ret 10a36e: 66 90 xchg %ax,%ax <== NOT EXECUTED int32_t baud ) { int termios_baud; switch (baud) { 10a370: 83 f8 32 cmp $0x32,%eax 10a373: 74 7f je 10a3f4 10a375: 7e 25 jle 10a39c 10a377: 83 f8 4b cmp $0x4b,%eax 10a37a: 0f 84 8c 00 00 00 je 10a40c 10a380: 83 f8 6e cmp $0x6e,%eax 10a383: 75 0f jne 10a394 <== ALWAYS TAKEN case 0: termios_baud = B0; break; case 50: termios_baud = B50; break; case 75: termios_baud = B75; break; 10a385: b8 03 00 00 00 mov $0x3,%eax case 460800: termios_baud = B460800; break; default: termios_baud = -1; break; } return termios_baud; } 10a38a: c9 leave 10a38b: c3 ret int32_t baud ) { int termios_baud; switch (baud) { 10a38c: 3d 96 00 00 00 cmp $0x96,%eax 10a391: 74 39 je 10a3cc <== NEVER TAKEN 10a393: 90 nop <== NOT EXECUTED 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; 10a394: b8 ff ff ff ff mov $0xffffffff,%eax default: termios_baud = -1; break; } return termios_baud; } 10a399: c9 leave 10a39a: c3 ret 10a39b: 90 nop <== NOT EXECUTED int32_t baud ) { int termios_baud; switch (baud) { 10a39c: 85 c0 test %eax,%eax 10a39e: 75 f4 jne 10a394 10a3a0: 31 c0 xor %eax,%eax case 460800: termios_baud = B460800; break; default: termios_baud = -1; break; } return termios_baud; } 10a3a2: c9 leave 10a3a3: c3 ret int32_t baud ) { int termios_baud; switch (baud) { 10a3a4: 3d 00 96 00 00 cmp $0x9600,%eax 10a3a9: 74 31 je 10a3dc 10a3ab: 3d 00 e1 00 00 cmp $0xe100,%eax 10a3b0: 75 e2 jne 10a394 <== ALWAYS TAKEN 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; 10a3b2: b8 01 10 00 00 mov $0x1001,%eax case 460800: termios_baud = B460800; break; default: termios_baud = -1; break; } return termios_baud; } 10a3b7: c9 leave 10a3b8: c3 ret 10a3b9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED int32_t baud ) { int termios_baud; switch (baud) { 10a3bc: 3d 08 07 00 00 cmp $0x708,%eax 10a3c1: 75 d1 jne 10a394 <== ALWAYS TAKEN 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; 10a3c3: b8 0a 00 00 00 mov $0xa,%eax case 460800: termios_baud = B460800; break; default: termios_baud = -1; break; } return termios_baud; } 10a3c8: c9 leave 10a3c9: c3 ret 10a3ca: 66 90 xchg %ax,%ax <== NOT EXECUTED switch (baud) { case 0: termios_baud = B0; break; case 50: termios_baud = B50; break; case 75: termios_baud = B75; break; case 110: termios_baud = B110; break; case 134: termios_baud = B134; break; 10a3cc: b8 05 00 00 00 mov $0x5,%eax case 460800: termios_baud = B460800; break; default: termios_baud = -1; break; } return termios_baud; } 10a3d1: c9 leave 10a3d2: c3 ret 10a3d3: 90 nop <== NOT EXECUTED case 50: termios_baud = B50; break; case 75: termios_baud = B75; break; case 110: termios_baud = B110; break; case 134: termios_baud = B134; break; case 150: termios_baud = B150; break; case 200: termios_baud = B200; break; 10a3d4: b8 07 00 00 00 mov $0x7,%eax case 460800: termios_baud = B460800; break; default: termios_baud = -1; break; } return termios_baud; } 10a3d9: c9 leave 10a3da: c3 ret 10a3db: 90 nop <== NOT EXECUTED case 1200: termios_baud = B1200; break; case 1800: termios_baud = B1800; break; case 2400: termios_baud = B2400; break; case 4800: termios_baud = B4800; break; case 9600: termios_baud = B9600; break; case 19200: termios_baud = B19200; break; 10a3dc: b8 0f 00 00 00 mov $0xf,%eax case 460800: termios_baud = B460800; break; default: termios_baud = -1; break; } return termios_baud; } 10a3e1: c9 leave 10a3e2: c3 ret 10a3e3: 90 nop <== NOT EXECUTED case 0: termios_baud = B0; break; case 50: termios_baud = B50; break; case 75: termios_baud = B75; break; case 110: termios_baud = B110; break; case 134: termios_baud = B134; break; case 150: termios_baud = B150; break; 10a3e4: b8 06 00 00 00 mov $0x6,%eax case 460800: termios_baud = B460800; break; default: termios_baud = -1; break; } return termios_baud; } 10a3e9: c9 leave 10a3ea: c3 ret 10a3eb: 90 nop <== NOT EXECUTED case 200: termios_baud = B200; break; case 300: termios_baud = B300; break; case 600: termios_baud = B600; break; case 1200: termios_baud = B1200; break; case 1800: termios_baud = B1800; break; case 2400: termios_baud = B2400; break; 10a3ec: b8 0c 00 00 00 mov $0xc,%eax case 460800: termios_baud = B460800; break; default: termios_baud = -1; break; } return termios_baud; } 10a3f1: c9 leave 10a3f2: c3 ret 10a3f3: 90 nop <== NOT EXECUTED int32_t baud ) { int termios_baud; switch (baud) { 10a3f4: b8 01 00 00 00 mov $0x1,%eax case 460800: termios_baud = B460800; break; default: termios_baud = -1; break; } return termios_baud; } 10a3f9: c9 leave 10a3fa: c3 ret 10a3fb: 90 nop <== NOT EXECUTED case 4800: termios_baud = B4800; break; case 9600: termios_baud = B9600; break; case 19200: termios_baud = B19200; break; case 38400: termios_baud = B38400; break; case 57600: termios_baud = B57600; break; case 115200: termios_baud = B115200; break; 10a3fc: b8 03 10 00 00 mov $0x1003,%eax case 460800: termios_baud = B460800; break; default: termios_baud = -1; break; } return termios_baud; } 10a401: c9 leave 10a402: c3 ret 10a403: 90 nop <== NOT EXECUTED 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; 10a404: b8 02 10 00 00 mov $0x1002,%eax case 460800: termios_baud = B460800; break; default: termios_baud = -1; break; } return termios_baud; } 10a409: c9 leave 10a40a: c3 ret 10a40b: 90 nop <== NOT EXECUTED int32_t baud ) { int termios_baud; switch (baud) { 10a40c: b8 02 00 00 00 mov $0x2,%eax case 460800: termios_baud = B460800; break; default: termios_baud = -1; break; } return termios_baud; } 10a411: c9 leave 10a412: c3 ret 10a413: 90 nop <== NOT EXECUTED 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; 10a414: b8 0b 00 00 00 mov $0xb,%eax case 460800: termios_baud = B460800; break; default: termios_baud = -1; break; } return termios_baud; } 10a419: c9 leave 10a41a: c3 ret 10a41b: 90 nop <== NOT EXECUTED 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; 10a41c: b8 09 00 00 00 mov $0x9,%eax case 460800: termios_baud = B460800; break; default: termios_baud = -1; break; } return termios_baud; } 10a421: c9 leave 10a422: c3 ret 10a423: 90 nop <== NOT EXECUTED switch (baud) { case 0: termios_baud = B0; break; case 50: termios_baud = B50; break; case 75: termios_baud = B75; break; case 110: termios_baud = B110; break; 10a424: b8 04 00 00 00 mov $0x4,%eax case 460800: termios_baud = B460800; break; default: termios_baud = -1; break; } return termios_baud; } 10a429: c9 leave 10a42a: c3 ret 10a42b: 90 nop <== NOT EXECUTED 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; 10a42c: b8 0e 00 00 00 mov $0xe,%eax case 460800: termios_baud = B460800; break; default: termios_baud = -1; break; } return termios_baud; } 10a431: c9 leave 10a432: c3 ret 0010a524 : rtems_device_major_number major, rtems_device_minor_number minor, void *arg, const rtems_termios_callbacks *callbacks ) { 10a524: 55 push %ebp 10a525: 89 e5 mov %esp,%ebp 10a527: 57 push %edi 10a528: 56 push %esi 10a529: 53 push %ebx 10a52a: 83 ec 20 sub $0x20,%esp 10a52d: 8b 55 08 mov 0x8(%ebp),%edx struct rtems_termios_tty *tty; /* * See if the device has already been opened */ sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, 10a530: 6a 00 push $0x0 10a532: 6a 00 push $0x0 10a534: ff 35 98 72 12 00 pushl 0x127298 10a53a: 89 55 dc mov %edx,-0x24(%ebp) 10a53d: e8 1e 10 00 00 call 10b560 10a542: 89 45 e4 mov %eax,-0x1c(%ebp) RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 10a545: 83 c4 10 add $0x10,%esp 10a548: 85 c0 test %eax,%eax 10a54a: 8b 55 dc mov -0x24(%ebp),%edx 10a54d: 75 6f jne 10a5be <== ALWAYS TAKEN return sc; for (tty = rtems_termios_ttyHead ; tty != NULL ; tty = tty->forw) { 10a54f: 8b 1d a0 72 12 00 mov 0x1272a0,%ebx 10a555: 85 db test %ebx,%ebx 10a557: 0f 84 a7 00 00 00 je 10a604 10a55d: 8b 45 0c mov 0xc(%ebp),%eax 10a560: eb 0c jmp 10a56e <== ALWAYS TAKEN 10a562: 66 90 xchg %ax,%ax <== NOT EXECUTED 10a564: 8b 1b mov (%ebx),%ebx 10a566: 85 db test %ebx,%ebx 10a568: 0f 84 96 00 00 00 je 10a604 <== NEVER TAKEN if ((tty->major == major) && (tty->minor == minor)) 10a56e: 39 53 0c cmp %edx,0xc(%ebx) 10a571: 75 f1 jne 10a564 10a573: 39 43 10 cmp %eax,0x10(%ebx) 10a576: 75 ec jne 10a564 <== ALWAYS TAKEN */ if (c++ == 'z') c = 'a'; } args->iop->data1 = tty; 10a578: 8b 4d 10 mov 0x10(%ebp),%ecx 10a57b: 8b 01 mov (%ecx),%eax 10a57d: 89 58 34 mov %ebx,0x34(%eax) if (!tty->refcount++) { 10a580: 8b 43 08 mov 0x8(%ebx),%eax 10a583: 8d 48 01 lea 0x1(%eax),%ecx 10a586: 89 4b 08 mov %ecx,0x8(%ebx) 10a589: 85 c0 test %eax,%eax 10a58b: 75 20 jne 10a5ad if (tty->device.firstOpen) 10a58d: 8b 83 98 00 00 00 mov 0x98(%ebx),%eax 10a593: 85 c0 test %eax,%eax 10a595: 74 0d je 10a5a4 (*tty->device.firstOpen)(major, minor, arg); 10a597: 56 push %esi 10a598: ff 75 10 pushl 0x10(%ebp) 10a59b: ff 75 0c pushl 0xc(%ebp) 10a59e: 52 push %edx 10a59f: ff d0 call *%eax 10a5a1: 83 c4 10 add $0x10,%esp /* * start I/O tasks, if needed */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 10a5a4: 83 bb b4 00 00 00 02 cmpl $0x2,0xb4(%ebx) 10a5ab: 74 1c je 10a5c9 <== ALWAYS TAKEN (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); } } rtems_semaphore_release (rtems_termios_ttyMutex); 10a5ad: 83 ec 0c sub $0xc,%esp 10a5b0: ff 35 98 72 12 00 pushl 0x127298 10a5b6: e8 a1 10 00 00 call 10b65c return RTEMS_SUCCESSFUL; 10a5bb: 83 c4 10 add $0x10,%esp } 10a5be: 8b 45 e4 mov -0x1c(%ebp),%eax 10a5c1: 8d 65 f4 lea -0xc(%ebp),%esp 10a5c4: 5b pop %ebx 10a5c5: 5e pop %esi 10a5c6: 5f pop %edi 10a5c7: c9 leave 10a5c8: c3 ret (*tty->device.firstOpen)(major, minor, arg); /* * start I/O tasks, if needed */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { sc = rtems_task_start(tty->rxTaskId, 10a5c9: 51 push %ecx <== NOT EXECUTED 10a5ca: 53 push %ebx <== NOT EXECUTED 10a5cb: 68 38 aa 10 00 push $0x10aa38 <== NOT EXECUTED 10a5d0: ff b3 c4 00 00 00 pushl 0xc4(%ebx) <== NOT EXECUTED 10a5d6: e8 c5 13 00 00 call 10b9a0 <== NOT EXECUTED rtems_termios_rxdaemon, (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) 10a5db: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10a5de: 85 c0 test %eax,%eax <== NOT EXECUTED 10a5e0: 0f 85 3e 03 00 00 jne 10a924 <== NOT EXECUTED rtems_fatal_error_occurred (sc); sc = rtems_task_start(tty->txTaskId, 10a5e6: 52 push %edx <== NOT EXECUTED 10a5e7: 53 push %ebx <== NOT EXECUTED 10a5e8: 68 cc a9 10 00 push $0x10a9cc <== NOT EXECUTED 10a5ed: ff b3 c8 00 00 00 pushl 0xc8(%ebx) <== NOT EXECUTED 10a5f3: e8 a8 13 00 00 call 10b9a0 <== NOT EXECUTED rtems_termios_txdaemon, (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) 10a5f8: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10a5fb: 85 c0 test %eax,%eax <== NOT EXECUTED 10a5fd: 74 ae je 10a5ad <== NOT EXECUTED 10a5ff: e9 20 03 00 00 jmp 10a924 <== NOT EXECUTED static char c = 'a'; /* * Create a new device */ tty = calloc (1, sizeof (struct rtems_termios_tty)); 10a604: 83 ec 08 sub $0x8,%esp 10a607: 68 e8 00 00 00 push $0xe8 10a60c: 6a 01 push $0x1 10a60e: 89 55 dc mov %edx,-0x24(%ebp) 10a611: e8 a6 52 00 00 call 10f8bc 10a616: 89 45 e0 mov %eax,-0x20(%ebp) 10a619: 89 c3 mov %eax,%ebx if (tty == NULL) { 10a61b: 83 c4 10 add $0x10,%esp 10a61e: 85 c0 test %eax,%eax 10a620: 8b 55 dc mov -0x24(%ebp),%edx 10a623: 0f 84 79 02 00 00 je 10a8a2 <== ALWAYS TAKEN return RTEMS_NO_MEMORY; } /* * allocate raw input buffer */ tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE; 10a629: a1 ec 4f 12 00 mov 0x124fec,%eax 10a62e: 8b 4d e0 mov -0x20(%ebp),%ecx 10a631: 89 41 64 mov %eax,0x64(%ecx) tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size); 10a634: 8b 41 64 mov 0x64(%ecx),%eax 10a637: 83 ec 0c sub $0xc,%esp 10a63a: 50 push %eax 10a63b: 89 55 dc mov %edx,-0x24(%ebp) 10a63e: e8 e9 db ff ff call 10822c 10a643: 8b 75 e0 mov -0x20(%ebp),%esi 10a646: 89 46 58 mov %eax,0x58(%esi) if (tty->rawInBuf.theBuf == NULL) { 10a649: 83 c4 10 add $0x10,%esp 10a64c: 85 c0 test %eax,%eax 10a64e: 8b 55 dc mov -0x24(%ebp),%edx 10a651: 0f 84 68 02 00 00 je 10a8bf <== ALWAYS TAKEN return RTEMS_NO_MEMORY; } /* * allocate raw output buffer */ tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE; 10a657: a1 f0 4f 12 00 mov 0x124ff0,%eax 10a65c: 8b 4d e0 mov -0x20(%ebp),%ecx 10a65f: 89 81 88 00 00 00 mov %eax,0x88(%ecx) tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size); 10a665: 8b 81 88 00 00 00 mov 0x88(%ecx),%eax 10a66b: 83 ec 0c sub $0xc,%esp 10a66e: 50 push %eax 10a66f: 89 55 dc mov %edx,-0x24(%ebp) 10a672: e8 b5 db ff ff call 10822c 10a677: 8b 75 e0 mov -0x20(%ebp),%esi 10a67a: 89 46 7c mov %eax,0x7c(%esi) if (tty->rawOutBuf.theBuf == NULL) { 10a67d: 83 c4 10 add $0x10,%esp 10a680: 85 c0 test %eax,%eax 10a682: 8b 55 dc mov -0x24(%ebp),%edx 10a685: 0f 84 58 02 00 00 je 10a8e3 <== ALWAYS TAKEN return RTEMS_NO_MEMORY; } /* * allocate cooked buffer */ tty->cbuf = malloc (CBUFSIZE); 10a68b: 83 ec 0c sub $0xc,%esp 10a68e: ff 35 e8 4f 12 00 pushl 0x124fe8 10a694: 89 55 dc mov %edx,-0x24(%ebp) 10a697: e8 90 db ff ff call 10822c 10a69c: 8b 4d e0 mov -0x20(%ebp),%ecx 10a69f: 89 41 1c mov %eax,0x1c(%ecx) if (tty->cbuf == NULL) { 10a6a2: 83 c4 10 add $0x10,%esp 10a6a5: 85 c0 test %eax,%eax 10a6a7: 8b 55 dc mov -0x24(%ebp),%edx 10a6aa: 0f 84 7d 02 00 00 je 10a92d <== ALWAYS TAKEN return RTEMS_NO_MEMORY; } /* * Initialize wakeup callbacks */ tty->tty_snd.sw_pfn = NULL; 10a6b0: 8b 45 e0 mov -0x20(%ebp),%eax 10a6b3: c7 80 d4 00 00 00 00 movl $0x0,0xd4(%eax) 10a6ba: 00 00 00 tty->tty_snd.sw_arg = NULL; 10a6bd: c7 80 d8 00 00 00 00 movl $0x0,0xd8(%eax) 10a6c4: 00 00 00 tty->tty_rcv.sw_pfn = NULL; 10a6c7: c7 80 dc 00 00 00 00 movl $0x0,0xdc(%eax) 10a6ce: 00 00 00 tty->tty_rcv.sw_arg = NULL; 10a6d1: c7 80 e0 00 00 00 00 movl $0x0,0xe0(%eax) 10a6d8: 00 00 00 tty->tty_rcvwakeup = 0; 10a6db: c7 80 e4 00 00 00 00 movl $0x0,0xe4(%eax) 10a6e2: 00 00 00 /* * link tty */ tty->forw = rtems_termios_ttyHead; 10a6e5: a1 a0 72 12 00 mov 0x1272a0,%eax 10a6ea: 8b 4d e0 mov -0x20(%ebp),%ecx 10a6ed: 89 01 mov %eax,(%ecx) tty->back = NULL; 10a6ef: c7 41 04 00 00 00 00 movl $0x0,0x4(%ecx) if (rtems_termios_ttyHead != NULL) 10a6f6: 85 c0 test %eax,%eax 10a6f8: 74 03 je 10a6fd rtems_termios_ttyHead->back = tty; 10a6fa: 89 48 04 mov %ecx,0x4(%eax) rtems_termios_ttyHead = tty; 10a6fd: 8b 75 e0 mov -0x20(%ebp),%esi 10a700: 89 35 a0 72 12 00 mov %esi,0x1272a0 if (rtems_termios_ttyTail == NULL) 10a706: 8b 3d 9c 72 12 00 mov 0x12729c,%edi 10a70c: 85 ff test %edi,%edi 10a70e: 0f 84 ac 02 00 00 je 10a9c0 rtems_termios_ttyTail = tty; tty->minor = minor; 10a714: 8b 4d 0c mov 0xc(%ebp),%ecx 10a717: 8b 45 e0 mov -0x20(%ebp),%eax 10a71a: 89 48 10 mov %ecx,0x10(%eax) tty->major = major; 10a71d: 89 50 0c mov %edx,0xc(%eax) /* * Set up mutex semaphores */ sc = rtems_semaphore_create ( 10a720: 83 ec 0c sub $0xc,%esp 10a723: 83 c0 14 add $0x14,%eax 10a726: 50 push %eax 10a727: 6a 00 push $0x0 10a729: 6a 54 push $0x54 10a72b: 6a 01 push $0x1 10a72d: 0f be 05 f4 4f 12 00 movsbl 0x124ff4,%eax 10a734: 0d 00 69 52 54 or $0x54526900,%eax 10a739: 50 push %eax 10a73a: 89 55 dc mov %edx,-0x24(%ebp) 10a73d: e8 a6 0b 00 00 call 10b2e8 <== 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) 10a742: 83 c4 20 add $0x20,%esp 10a745: 85 c0 test %eax,%eax 10a747: 8b 55 dc mov -0x24(%ebp),%edx 10a74a: 0f 85 d4 01 00 00 jne 10a924 <== ALWAYS TAKEN rtems_fatal_error_occurred (sc); sc = rtems_semaphore_create ( 10a750: 83 ec 0c sub $0xc,%esp 10a753: 8b 45 e0 mov -0x20(%ebp),%eax 10a756: 83 c0 18 add $0x18,%eax 10a759: 50 push %eax 10a75a: 6a 00 push $0x0 10a75c: 6a 54 push $0x54 10a75e: 6a 01 push $0x1 10a760: 0f be 05 f4 4f 12 00 movsbl 0x124ff4,%eax 10a767: 0d 00 6f 52 54 or $0x54526f00,%eax 10a76c: 50 push %eax 10a76d: 89 55 dc mov %edx,-0x24(%ebp) 10a770: e8 73 0b 00 00 call 10b2e8 <== 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) 10a775: 83 c4 20 add $0x20,%esp 10a778: 85 c0 test %eax,%eax 10a77a: 8b 55 dc mov -0x24(%ebp),%edx 10a77d: 0f 85 a1 01 00 00 jne 10a924 <== ALWAYS TAKEN rtems_fatal_error_occurred (sc); sc = rtems_semaphore_create ( 10a783: 83 ec 0c sub $0xc,%esp 10a786: 8b 45 e0 mov -0x20(%ebp),%eax 10a789: 05 8c 00 00 00 add $0x8c,%eax 10a78e: 50 push %eax 10a78f: 6a 00 push $0x0 10a791: 6a 20 push $0x20 10a793: 6a 00 push $0x0 10a795: 0f be 05 f4 4f 12 00 movsbl 0x124ff4,%eax 10a79c: 0d 00 78 52 54 or $0x54527800,%eax 10a7a1: 50 push %eax 10a7a2: 89 55 dc mov %edx,-0x24(%ebp) 10a7a5: e8 3e 0b 00 00 call 10b2e8 <== 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) 10a7aa: 83 c4 20 add $0x20,%esp 10a7ad: 85 c0 test %eax,%eax 10a7af: 8b 55 dc mov -0x24(%ebp),%edx 10a7b2: 0f 85 6c 01 00 00 jne 10a924 <== ALWAYS TAKEN rtems_fatal_error_occurred (sc); tty->rawOutBufState = rob_idle; 10a7b8: 8b 75 e0 mov -0x20(%ebp),%esi 10a7bb: c7 86 94 00 00 00 00 movl $0x0,0x94(%esi) 10a7c2: 00 00 00 /* * Set callbacks */ tty->device = *callbacks; 10a7c5: 89 f7 mov %esi,%edi 10a7c7: 81 c7 98 00 00 00 add $0x98,%edi 10a7cd: b9 08 00 00 00 mov $0x8,%ecx 10a7d2: 8b 75 14 mov 0x14(%ebp),%esi 10a7d5: f3 a5 rep movsl %ds:(%esi),%es:(%edi) /* * Create I/O tasks */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 10a7d7: 8b 45 e0 mov -0x20(%ebp),%eax 10a7da: 83 b8 b4 00 00 00 02 cmpl $0x2,0xb4(%eax) 10a7e1: 0f 84 63 01 00 00 je 10a94a <== ALWAYS TAKEN &tty->rxTaskId); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); } if ((tty->device.pollRead == NULL) || 10a7e7: 8b 4d e0 mov -0x20(%ebp),%ecx 10a7ea: 8b b9 a0 00 00 00 mov 0xa0(%ecx),%edi 10a7f0: 85 ff test %edi,%edi 10a7f2: 0f 84 f9 00 00 00 je 10a8f1 (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)){ 10a7f8: 83 b9 b4 00 00 00 02 cmpl $0x2,0xb4(%ecx) 10a7ff: 0f 84 ec 00 00 00 je 10a8f1 <== ALWAYS TAKEN } /* * Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; 10a805: 8b 75 e0 mov -0x20(%ebp),%esi 10a808: c7 46 30 02 25 00 00 movl $0x2502,0x30(%esi) tty->termios.c_oflag = OPOST | ONLCR | XTABS; 10a80f: c7 46 34 05 18 00 00 movl $0x1805,0x34(%esi) tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL; 10a816: c7 46 38 bd 08 00 00 movl $0x8bd,0x38(%esi) tty->termios.c_lflag = ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL; 10a81d: c7 46 3c 3b 82 00 00 movl $0x823b,0x3c(%esi) tty->termios.c_cc[VINTR] = '\003'; 10a824: c6 46 41 03 movb $0x3,0x41(%esi) tty->termios.c_cc[VQUIT] = '\034'; 10a828: c6 46 42 1c movb $0x1c,0x42(%esi) tty->termios.c_cc[VERASE] = '\177'; 10a82c: c6 46 43 7f movb $0x7f,0x43(%esi) tty->termios.c_cc[VKILL] = '\025'; 10a830: c6 46 44 15 movb $0x15,0x44(%esi) tty->termios.c_cc[VEOF] = '\004'; 10a834: c6 46 45 04 movb $0x4,0x45(%esi) tty->termios.c_cc[VEOL] = '\000'; 10a838: c6 46 4c 00 movb $0x0,0x4c(%esi) tty->termios.c_cc[VEOL2] = '\000'; 10a83c: c6 46 51 00 movb $0x0,0x51(%esi) tty->termios.c_cc[VSTART] = '\021'; 10a840: c6 46 49 11 movb $0x11,0x49(%esi) tty->termios.c_cc[VSTOP] = '\023'; 10a844: c6 46 4a 13 movb $0x13,0x4a(%esi) tty->termios.c_cc[VSUSP] = '\032'; 10a848: c6 46 4b 1a movb $0x1a,0x4b(%esi) tty->termios.c_cc[VREPRINT] = '\022'; 10a84c: c6 46 4d 12 movb $0x12,0x4d(%esi) tty->termios.c_cc[VDISCARD] = '\017'; 10a850: c6 46 4e 0f movb $0xf,0x4e(%esi) tty->termios.c_cc[VWERASE] = '\027'; 10a854: c6 46 4f 17 movb $0x17,0x4f(%esi) tty->termios.c_cc[VLNEXT] = '\026'; 10a858: c6 46 50 16 movb $0x16,0x50(%esi) /* start with no flow control, clear flow control flags */ tty->flow_ctrl = 0; 10a85c: c7 86 b8 00 00 00 00 movl $0x0,0xb8(%esi) 10a863: 00 00 00 /* * set low/highwater mark for XON/XOFF support */ tty->lowwater = tty->rawInBuf.Size * 1/2; 10a866: 8b 46 64 mov 0x64(%esi),%eax 10a869: d1 e8 shr %eax 10a86b: 89 86 bc 00 00 00 mov %eax,0xbc(%esi) tty->highwater = tty->rawInBuf.Size * 3/4; 10a871: 8b 46 64 mov 0x64(%esi),%eax 10a874: 8d 04 40 lea (%eax,%eax,2),%eax 10a877: c1 e8 02 shr $0x2,%eax 10a87a: 89 86 c0 00 00 00 mov %eax,0xc0(%esi) /* * Bump name characer */ if (c++ == 'z') 10a880: a0 f4 4f 12 00 mov 0x124ff4,%al 10a885: 8d 48 01 lea 0x1(%eax),%ecx 10a888: 88 0d f4 4f 12 00 mov %cl,0x124ff4 10a88e: 3c 7a cmp $0x7a,%al 10a890: 0f 85 e2 fc ff ff jne 10a578 <== NEVER TAKEN c = 'a'; 10a896: c6 05 f4 4f 12 00 61 movb $0x61,0x124ff4 <== NOT EXECUTED 10a89d: e9 d6 fc ff ff jmp 10a578 <== NOT EXECUTED /* * Create a new device */ tty = calloc (1, sizeof (struct rtems_termios_tty)); if (tty == NULL) { rtems_semaphore_release (rtems_termios_ttyMutex); 10a8a2: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10a8a5: ff 35 98 72 12 00 pushl 0x127298 <== NOT EXECUTED 10a8ab: e8 ac 0d 00 00 call 10b65c <== NOT EXECUTED 10a8b0: c7 45 e4 1a 00 00 00 movl $0x1a,-0x1c(%ebp) <== NOT EXECUTED return RTEMS_NO_MEMORY; 10a8b7: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10a8ba: e9 ff fc ff ff jmp 10a5be <== NOT EXECUTED * allocate raw input buffer */ tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE; tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size); if (tty->rawInBuf.theBuf == NULL) { free(tty); 10a8bf: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED */ tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE; tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size); if (tty->rawOutBuf.theBuf == NULL) { free((void *)(tty->rawInBuf.theBuf)); free(tty); 10a8c2: 56 push %esi <== NOT EXECUTED 10a8c3: e8 14 d7 ff ff call 107fdc <== NOT EXECUTED rtems_semaphore_release (rtems_termios_ttyMutex); 10a8c8: 59 pop %ecx <== NOT EXECUTED 10a8c9: ff 35 98 72 12 00 pushl 0x127298 <== NOT EXECUTED 10a8cf: e8 88 0d 00 00 call 10b65c <== NOT EXECUTED 10a8d4: c7 45 e4 1a 00 00 00 movl $0x1a,-0x1c(%ebp) <== NOT EXECUTED return RTEMS_NO_MEMORY; 10a8db: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10a8de: e9 db fc ff ff jmp 10a5be <== NOT EXECUTED * allocate raw output buffer */ tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE; tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size); if (tty->rawOutBuf.theBuf == NULL) { free((void *)(tty->rawInBuf.theBuf)); 10a8e3: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10a8e6: ff 76 58 pushl 0x58(%esi) <== NOT EXECUTED 10a8e9: e8 ee d6 ff ff call 107fdc <== NOT EXECUTED free(tty); 10a8ee: 5b pop %ebx <== NOT EXECUTED 10a8ef: eb d1 jmp 10a8c2 <== NOT EXECUTED rtems_fatal_error_occurred (sc); } if ((tty->device.pollRead == NULL) || (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)){ sc = rtems_semaphore_create ( 10a8f1: 83 ec 0c sub $0xc,%esp 10a8f4: 8b 45 e0 mov -0x20(%ebp),%eax 10a8f7: 83 c0 68 add $0x68,%eax 10a8fa: 50 push %eax 10a8fb: 6a 00 push $0x0 10a8fd: 6a 24 push $0x24 10a8ff: 6a 00 push $0x0 10a901: 0f be 05 f4 4f 12 00 movsbl 0x124ff4,%eax 10a908: 0d 00 72 52 54 or $0x54527200,%eax 10a90d: 50 push %eax 10a90e: 89 55 dc mov %edx,-0x24(%ebp) 10a911: e8 d2 09 00 00 call 10b2e8 <== 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) 10a916: 83 c4 20 add $0x20,%esp 10a919: 85 c0 test %eax,%eax 10a91b: 8b 55 dc mov -0x24(%ebp),%edx 10a91e: 0f 84 e1 fe ff ff je 10a805 <== NEVER TAKEN sc = rtems_task_start(tty->txTaskId, rtems_termios_txdaemon, (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); 10a924: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10a927: 50 push %eax <== NOT EXECUTED 10a928: e8 6f 12 00 00 call 10bb9c <== NOT EXECUTED /* * allocate cooked buffer */ tty->cbuf = malloc (CBUFSIZE); if (tty->cbuf == NULL) { free((void *)(tty->rawOutBuf.theBuf)); 10a92d: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10a930: ff 71 7c pushl 0x7c(%ecx) <== NOT EXECUTED 10a933: e8 a4 d6 ff ff call 107fdc <== NOT EXECUTED free((void *)(tty->rawInBuf.theBuf)); 10a938: 5a pop %edx <== NOT EXECUTED 10a939: 8b 75 e0 mov -0x20(%ebp),%esi <== NOT EXECUTED 10a93c: ff 76 58 pushl 0x58(%esi) <== NOT EXECUTED 10a93f: e8 98 d6 ff ff call 107fdc <== NOT EXECUTED free(tty); 10a944: 58 pop %eax <== NOT EXECUTED 10a945: e9 78 ff ff ff jmp 10a8c2 <== NOT EXECUTED /* * Create I/O tasks */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { sc = rtems_task_create ( 10a94a: 51 push %ecx <== NOT EXECUTED 10a94b: 51 push %ecx <== NOT EXECUTED 10a94c: 05 c8 00 00 00 add $0xc8,%eax <== NOT EXECUTED 10a951: 50 push %eax <== NOT EXECUTED 10a952: 6a 00 push $0x0 <== NOT EXECUTED 10a954: 68 00 05 00 00 push $0x500 <== NOT EXECUTED 10a959: 68 00 04 00 00 push $0x400 <== NOT EXECUTED 10a95e: 6a 0a push $0xa <== NOT EXECUTED 10a960: 0f be 05 f4 4f 12 00 movsbl 0x124ff4,%eax <== NOT EXECUTED 10a967: 0d 00 54 78 54 or $0x54785400,%eax <== NOT EXECUTED 10a96c: 50 push %eax <== NOT EXECUTED 10a96d: 89 55 dc mov %edx,-0x24(%ebp) <== NOT EXECUTED 10a970: e8 87 0d 00 00 call 10b6fc <== 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) 10a975: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 10a978: 85 c0 test %eax,%eax <== NOT EXECUTED 10a97a: 8b 55 dc mov -0x24(%ebp),%edx <== NOT EXECUTED 10a97d: 75 a5 jne 10a924 <== NOT EXECUTED rtems_fatal_error_occurred (sc); sc = rtems_task_create ( 10a97f: 50 push %eax <== NOT EXECUTED 10a980: 50 push %eax <== NOT EXECUTED 10a981: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED 10a984: 05 c4 00 00 00 add $0xc4,%eax <== NOT EXECUTED 10a989: 50 push %eax <== NOT EXECUTED 10a98a: 6a 00 push $0x0 <== NOT EXECUTED 10a98c: 68 00 05 00 00 push $0x500 <== NOT EXECUTED 10a991: 68 00 04 00 00 push $0x400 <== NOT EXECUTED 10a996: 6a 09 push $0x9 <== NOT EXECUTED 10a998: 0f be 05 f4 4f 12 00 movsbl 0x124ff4,%eax <== NOT EXECUTED 10a99f: 0d 00 54 78 52 or $0x52785400,%eax <== NOT EXECUTED 10a9a4: 50 push %eax <== NOT EXECUTED 10a9a5: 89 55 dc mov %edx,-0x24(%ebp) <== NOT EXECUTED 10a9a8: e8 4f 0d 00 00 call 10b6fc <== 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) 10a9ad: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 10a9b0: 85 c0 test %eax,%eax <== NOT EXECUTED 10a9b2: 8b 55 dc mov -0x24(%ebp),%edx <== NOT EXECUTED 10a9b5: 0f 84 2c fe ff ff je 10a7e7 <== NOT EXECUTED 10a9bb: e9 64 ff ff ff jmp 10a924 <== NOT EXECUTED tty->back = NULL; if (rtems_termios_ttyHead != NULL) rtems_termios_ttyHead->back = tty; rtems_termios_ttyHead = tty; if (rtems_termios_ttyTail == NULL) rtems_termios_ttyTail = tty; 10a9c0: 89 35 9c 72 12 00 mov %esi,0x12729c 10a9c6: e9 49 fd ff ff jmp 10a714 <== ALWAYS TAKEN 00109490 : * Send characters to device-specific code */ void rtems_termios_puts ( const void *_buf, int len, struct rtems_termios_tty *tty) { 109490: 55 push %ebp 109491: 89 e5 mov %esp,%ebp 109493: 57 push %edi 109494: 56 push %esi 109495: 53 push %ebx 109496: 83 ec 1c sub $0x1c,%esp 109499: 8b 45 08 mov 0x8(%ebp),%eax 10949c: 8b 55 0c mov 0xc(%ebp),%edx 10949f: 89 55 e4 mov %edx,-0x1c(%ebp) 1094a2: 8b 5d 10 mov 0x10(%ebp),%ebx const unsigned char *buf = _buf; 1094a5: 89 c6 mov %eax,%esi unsigned int newHead; rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) { 1094a7: 8b bb b4 00 00 00 mov 0xb4(%ebx),%edi 1094ad: 85 ff test %edi,%edi 1094af: 0f 84 eb 00 00 00 je 1095a0 <== ALWAYS TAKEN (*tty->device.write)(tty->minor, (void *)buf, len); return; } newHead = tty->rawOutBuf.Head; 1094b5: 8b 83 80 00 00 00 mov 0x80(%ebx),%eax 1094bb: 89 45 e0 mov %eax,-0x20(%ebp) while (len) { 1094be: 8b 4d e4 mov -0x1c(%ebp),%ecx 1094c1: 85 c9 test %ecx,%ecx 1094c3: 0f 84 cf 00 00 00 je 109598 <== ALWAYS TAKEN 1094c9: 8d 76 00 lea 0x0(%esi),%esi * len -= ncopy * * To minimize latency, the memcpy should be done * with interrupts enabled. */ newHead = (newHead + 1) % tty->rawOutBuf.Size; 1094cc: 8b 45 e0 mov -0x20(%ebp),%eax 1094cf: 40 inc %eax 1094d0: 8b 8b 88 00 00 00 mov 0x88(%ebx),%ecx 1094d6: 31 d2 xor %edx,%edx 1094d8: f7 f1 div %ecx 1094da: 89 55 dc mov %edx,-0x24(%ebp) 1094dd: 89 55 e0 mov %edx,-0x20(%ebp) rtems_interrupt_disable (level); 1094e0: 9c pushf 1094e1: fa cli 1094e2: 5f pop %edi while (newHead == tty->rawOutBuf.Tail) { 1094e3: 8b 93 84 00 00 00 mov 0x84(%ebx),%edx 1094e9: 3b 55 e0 cmp -0x20(%ebp),%edx 1094ec: 75 3e jne 10952c 1094ee: 89 f8 mov %edi,%eax 1094f0: 89 f7 mov %esi,%edi 1094f2: 89 d6 mov %edx,%esi tty->rawOutBufState = rob_wait; 1094f4: c7 83 94 00 00 00 02 movl $0x2,0x94(%ebx) 1094fb: 00 00 00 rtems_interrupt_enable (level); 1094fe: 50 push %eax 1094ff: 9d popf sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore, 109500: 52 push %edx 109501: 6a 00 push $0x0 109503: 6a 00 push $0x0 109505: ff b3 8c 00 00 00 pushl 0x8c(%ebx) 10950b: e8 50 20 00 00 call 10b560 RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 109510: 83 c4 10 add $0x10,%esp 109513: 85 c0 test %eax,%eax 109515: 0f 85 a0 00 00 00 jne 1095bb <== ALWAYS TAKEN rtems_fatal_error_occurred (sc); rtems_interrupt_disable (level); 10951b: 9c pushf 10951c: fa cli 10951d: 58 pop %eax * To minimize latency, the memcpy should be done * with interrupts enabled. */ newHead = (newHead + 1) % tty->rawOutBuf.Size; rtems_interrupt_disable (level); while (newHead == tty->rawOutBuf.Tail) { 10951e: 8b 93 84 00 00 00 mov 0x84(%ebx),%edx 109524: 39 f2 cmp %esi,%edx 109526: 74 cc je 1094f4 <== ALWAYS TAKEN 109528: 89 fe mov %edi,%esi 10952a: 89 c7 mov %eax,%edi RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); rtems_interrupt_disable (level); } tty->rawOutBuf.theBuf[tty->rawOutBuf.Head] = *buf++; 10952c: 8b 83 80 00 00 00 mov 0x80(%ebx),%eax 109532: 8b 4b 7c mov 0x7c(%ebx),%ecx 109535: 8a 16 mov (%esi),%dl 109537: 88 14 01 mov %dl,(%ecx,%eax,1) tty->rawOutBuf.Head = newHead; 10953a: 8b 45 dc mov -0x24(%ebp),%eax 10953d: 89 83 80 00 00 00 mov %eax,0x80(%ebx) if (tty->rawOutBufState == rob_idle) { 109543: 8b 83 94 00 00 00 mov 0x94(%ebx),%eax 109549: 85 c0 test %eax,%eax 10954b: 75 23 jne 109570 /* check, whether XOFF has been received */ if (!(tty->flow_ctrl & FL_ORCVXOF)) { 10954d: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax 109553: a8 10 test $0x10,%al 109555: 74 26 je 10957d <== NEVER TAKEN (*tty->device.write)(tty->minor, (char *)&tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1); } else { /* remember that output has been stopped due to flow ctrl*/ tty->flow_ctrl |= FL_OSTOP; 109557: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 10955d: 83 c8 20 or $0x20,%eax <== NOT EXECUTED 109560: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED } tty->rawOutBufState = rob_busy; 109566: c7 83 94 00 00 00 01 movl $0x1,0x94(%ebx) 10956d: 00 00 00 } rtems_interrupt_enable (level); 109570: 57 push %edi 109571: 9d popf if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) { (*tty->device.write)(tty->minor, (void *)buf, len); return; } newHead = tty->rawOutBuf.Head; while (len) { 109572: ff 4d e4 decl -0x1c(%ebp) 109575: 74 21 je 109598 RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); rtems_interrupt_disable (level); } tty->rawOutBuf.theBuf[tty->rawOutBuf.Head] = *buf++; 109577: 46 inc %esi 109578: e9 4f ff ff ff jmp 1094cc <== ALWAYS TAKEN tty->rawOutBuf.Head = newHead; if (tty->rawOutBufState == rob_idle) { /* check, whether XOFF has been received */ if (!(tty->flow_ctrl & FL_ORCVXOF)) { (*tty->device.write)(tty->minor, (char *)&tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1); 10957d: 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, 109583: 51 push %ecx 109584: 6a 01 push $0x1 109586: 03 43 7c add 0x7c(%ebx),%eax 109589: 50 push %eax 10958a: ff 73 10 pushl 0x10(%ebx) 10958d: ff 93 a4 00 00 00 call *0xa4(%ebx) 109593: 83 c4 10 add $0x10,%esp 109596: eb ce jmp 109566 <== ALWAYS TAKEN tty->rawOutBufState = rob_busy; } rtems_interrupt_enable (level); len--; } } 109598: 8d 65 f4 lea -0xc(%ebp),%esp 10959b: 5b pop %ebx 10959c: 5e pop %esi 10959d: 5f pop %edi 10959e: c9 leave 10959f: c3 ret unsigned int newHead; rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) { (*tty->device.write)(tty->minor, (void *)buf, len); 1095a0: 89 55 10 mov %edx,0x10(%ebp) <== NOT EXECUTED 1095a3: 89 45 0c mov %eax,0xc(%ebp) <== NOT EXECUTED 1095a6: 8b 43 10 mov 0x10(%ebx),%eax <== NOT EXECUTED 1095a9: 89 45 08 mov %eax,0x8(%ebp) <== NOT EXECUTED 1095ac: 8b 83 a4 00 00 00 mov 0xa4(%ebx),%eax <== NOT EXECUTED tty->rawOutBufState = rob_busy; } rtems_interrupt_enable (level); len--; } } 1095b2: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 1095b5: 5b pop %ebx <== NOT EXECUTED 1095b6: 5e pop %esi <== NOT EXECUTED 1095b7: 5f pop %edi <== NOT EXECUTED 1095b8: 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); 1095b9: ff e0 jmp *%eax <== NOT EXECUTED rtems_interrupt_enable (level); sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); 1095bb: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1095be: 50 push %eax <== NOT EXECUTED 1095bf: e8 d8 25 00 00 call 10bb9c <== NOT EXECUTED 00109bfc : return RTEMS_SUCCESSFUL; } rtems_status_code rtems_termios_read (void *arg) { 109bfc: 55 push %ebp <== NOT EXECUTED 109bfd: 89 e5 mov %esp,%ebp <== NOT EXECUTED 109bff: 57 push %edi <== NOT EXECUTED 109c00: 56 push %esi <== NOT EXECUTED 109c01: 53 push %ebx <== NOT EXECUTED 109c02: 83 ec 30 sub $0x30,%esp <== NOT EXECUTED rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 109c05: 8b 55 08 mov 0x8(%ebp),%edx <== NOT EXECUTED 109c08: 8b 02 mov (%edx),%eax <== NOT EXECUTED 109c0a: 8b 58 34 mov 0x34(%eax),%ebx <== NOT EXECUTED uint32_t count = args->count; 109c0d: 8b 4a 10 mov 0x10(%edx),%ecx <== NOT EXECUTED 109c10: 89 4d dc mov %ecx,-0x24(%ebp) <== NOT EXECUTED char *buffer = args->buffer; 109c13: 8b 42 0c mov 0xc(%edx),%eax <== NOT EXECUTED 109c16: 89 45 d8 mov %eax,-0x28(%ebp) <== NOT EXECUTED rtems_status_code sc; sc = rtems_semaphore_obtain (tty->isem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 109c19: 6a 00 push $0x0 <== NOT EXECUTED 109c1b: 6a 00 push $0x0 <== NOT EXECUTED 109c1d: ff 73 14 pushl 0x14(%ebx) <== NOT EXECUTED 109c20: e8 3b 19 00 00 call 10b560 <== NOT EXECUTED 109c25: 89 45 e0 mov %eax,-0x20(%ebp) <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 109c28: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 109c2b: 85 c0 test %eax,%eax <== NOT EXECUTED 109c2d: 75 35 jne 109c64 <== NOT EXECUTED return sc; if (rtems_termios_linesw[tty->t_line].l_read != NULL) { 109c2f: 8b 83 cc 00 00 00 mov 0xcc(%ebx),%eax <== NOT EXECUTED 109c35: c1 e0 05 shl $0x5,%eax <== NOT EXECUTED 109c38: 8b 80 08 6f 12 00 mov 0x126f08(%eax),%eax <== NOT EXECUTED 109c3e: 85 c0 test %eax,%eax <== NOT EXECUTED 109c40: 74 2e je 109c70 <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_read(tty,args); 109c42: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 109c45: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED 109c48: 53 push %ebx <== NOT EXECUTED 109c49: ff d0 call *%eax <== NOT EXECUTED 109c4b: 89 45 e0 mov %eax,-0x20(%ebp) <== NOT EXECUTED tty->tty_rcvwakeup = 0; 109c4e: c7 83 e4 00 00 00 00 movl $0x0,0xe4(%ebx) <== NOT EXECUTED 109c55: 00 00 00 <== NOT EXECUTED rtems_semaphore_release (tty->isem); 109c58: 59 pop %ecx <== NOT EXECUTED 109c59: ff 73 14 pushl 0x14(%ebx) <== NOT EXECUTED 109c5c: e8 fb 19 00 00 call 10b65c <== NOT EXECUTED return sc; 109c61: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } args->bytes_moved = args->count - count; tty->tty_rcvwakeup = 0; rtems_semaphore_release (tty->isem); return sc; } 109c64: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED 109c67: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 109c6a: 5b pop %ebx <== NOT EXECUTED 109c6b: 5e pop %esi <== NOT EXECUTED 109c6c: 5f pop %edi <== NOT EXECUTED 109c6d: c9 leave <== NOT EXECUTED 109c6e: c3 ret <== NOT EXECUTED 109c6f: 90 nop <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_read(tty,args); tty->tty_rcvwakeup = 0; rtems_semaphore_release (tty->isem); return sc; } if (tty->cindex == tty->ccount) { 109c70: 8b 43 24 mov 0x24(%ebx),%eax <== NOT EXECUTED 109c73: 3b 43 20 cmp 0x20(%ebx),%eax <== NOT EXECUTED 109c76: 74 5f je 109cd7 <== NOT EXECUTED else sc = fillBufferQueue (tty); if (sc != RTEMS_SUCCESSFUL) tty->cindex = tty->ccount = 0; } while (count && (tty->cindex < tty->ccount)) { 109c78: 8b 4d dc mov -0x24(%ebp),%ecx <== NOT EXECUTED 109c7b: 85 c9 test %ecx,%ecx <== NOT EXECUTED 109c7d: 74 29 je 109ca8 <== NOT EXECUTED 109c7f: 8b 43 24 mov 0x24(%ebx),%eax <== NOT EXECUTED 109c82: 3b 43 20 cmp 0x20(%ebx),%eax <== NOT EXECUTED 109c85: 7d 21 jge 109ca8 <== NOT EXECUTED 109c87: 8b 55 d8 mov -0x28(%ebp),%edx <== NOT EXECUTED 109c8a: 8b 7d dc mov -0x24(%ebp),%edi <== NOT EXECUTED 109c8d: eb 06 jmp 109c95 <== NOT EXECUTED 109c8f: 90 nop <== NOT EXECUTED 109c90: 39 43 20 cmp %eax,0x20(%ebx) <== NOT EXECUTED 109c93: 7e 10 jle 109ca5 <== NOT EXECUTED *buffer++ = tty->cbuf[tty->cindex++]; 109c95: 8b 73 1c mov 0x1c(%ebx),%esi <== NOT EXECUTED 109c98: 8a 0c 06 mov (%esi,%eax,1),%cl <== NOT EXECUTED 109c9b: 88 0a mov %cl,(%edx) <== NOT EXECUTED 109c9d: 42 inc %edx <== NOT EXECUTED 109c9e: 40 inc %eax <== NOT EXECUTED 109c9f: 89 43 24 mov %eax,0x24(%ebx) <== NOT EXECUTED else sc = fillBufferQueue (tty); if (sc != RTEMS_SUCCESSFUL) tty->cindex = tty->ccount = 0; } while (count && (tty->cindex < tty->ccount)) { 109ca2: 4f dec %edi <== NOT EXECUTED 109ca3: 75 eb jne 109c90 <== NOT EXECUTED 109ca5: 89 7d dc mov %edi,-0x24(%ebp) <== NOT EXECUTED *buffer++ = tty->cbuf[tty->cindex++]; count--; } args->bytes_moved = args->count - count; 109ca8: 8b 55 08 mov 0x8(%ebp),%edx <== NOT EXECUTED 109cab: 8b 42 10 mov 0x10(%edx),%eax <== NOT EXECUTED 109cae: 2b 45 dc sub -0x24(%ebp),%eax <== NOT EXECUTED 109cb1: 89 42 18 mov %eax,0x18(%edx) <== NOT EXECUTED tty->tty_rcvwakeup = 0; 109cb4: c7 83 e4 00 00 00 00 movl $0x0,0xe4(%ebx) <== NOT EXECUTED 109cbb: 00 00 00 <== NOT EXECUTED rtems_semaphore_release (tty->isem); 109cbe: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 109cc1: ff 73 14 pushl 0x14(%ebx) <== NOT EXECUTED 109cc4: e8 93 19 00 00 call 10b65c <== NOT EXECUTED return sc; 109cc9: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } 109ccc: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED 109ccf: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 109cd2: 5b pop %ebx <== NOT EXECUTED 109cd3: 5e pop %esi <== NOT EXECUTED 109cd4: 5f pop %edi <== NOT EXECUTED 109cd5: c9 leave <== NOT EXECUTED 109cd6: c3 ret <== NOT EXECUTED tty->tty_rcvwakeup = 0; rtems_semaphore_release (tty->isem); return sc; } if (tty->cindex == tty->ccount) { tty->cindex = tty->ccount = 0; 109cd7: c7 43 20 00 00 00 00 movl $0x0,0x20(%ebx) <== NOT EXECUTED 109cde: c7 43 24 00 00 00 00 movl $0x0,0x24(%ebx) <== NOT EXECUTED tty->read_start_column = tty->column; 109ce5: 8b 43 28 mov 0x28(%ebx),%eax <== NOT EXECUTED 109ce8: 89 43 2c mov %eax,0x2c(%ebx) <== NOT EXECUTED if (tty->device.pollRead != NULL && tty->device.outputUsesInterrupts == TERMIOS_POLLED) 109ceb: 8b 83 a0 00 00 00 mov 0xa0(%ebx),%eax <== NOT EXECUTED return sc; } if (tty->cindex == tty->ccount) { tty->cindex = tty->ccount = 0; tty->read_start_column = tty->column; if (tty->device.pollRead != NULL 109cf1: 85 c0 test %eax,%eax <== NOT EXECUTED 109cf3: 74 0e je 109d03 <== NOT EXECUTED && tty->device.outputUsesInterrupts == TERMIOS_POLLED) 109cf5: 8b 93 b4 00 00 00 mov 0xb4(%ebx),%edx <== NOT EXECUTED 109cfb: 85 d2 test %edx,%edx <== NOT EXECUTED 109cfd: 0f 84 72 01 00 00 je 109e75 <== 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; 109d03: 8b 73 74 mov 0x74(%ebx),%esi <== 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, 109d06: 8d 53 49 lea 0x49(%ebx),%edx <== NOT EXECUTED 109d09: 89 55 d4 mov %edx,-0x2c(%ebp) <== NOT EXECUTED 109d0c: c7 45 e4 01 00 00 00 movl $0x1,-0x1c(%ebp) <== NOT EXECUTED 109d13: 90 nop <== NOT EXECUTED while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && 109d14: 8b 53 5c mov 0x5c(%ebx),%edx <== NOT EXECUTED 109d17: 8b 43 60 mov 0x60(%ebx),%eax <== NOT EXECUTED 109d1a: 39 c2 cmp %eax,%edx <== NOT EXECUTED 109d1c: 75 2c jne 109d4a <== NOT EXECUTED 109d1e: e9 f5 00 00 00 jmp 109e18 <== NOT EXECUTED 109d23: 90 nop <== NOT EXECUTED } } /* continue processing new character */ if (tty->termios.c_lflag & ICANON) { if (siproc (c, tty)) 109d24: 0f b6 c1 movzbl %cl,%eax <== NOT EXECUTED 109d27: 89 da mov %ebx,%edx <== NOT EXECUTED 109d29: e8 3e fd ff ff call 109a6c <== NOT EXECUTED 109d2e: 85 c0 test %eax,%eax <== NOT EXECUTED 109d30: 74 07 je 109d39 <== NOT EXECUTED wait = 0; } else { siproc (c, tty); if (tty->ccount >= tty->termios.c_cc[VMIN]) 109d32: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) <== NOT EXECUTED wait = 0; } timeout = tty->rawInBufSemaphoreTimeout; 109d39: 8b 73 70 mov 0x70(%ebx),%esi <== NOT EXECUTED while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && 109d3c: 8b 53 5c mov 0x5c(%ebx),%edx <== NOT EXECUTED 109d3f: 8b 43 60 mov 0x60(%ebx),%eax <== NOT EXECUTED 109d42: 39 c2 cmp %eax,%edx <== NOT EXECUTED 109d44: 0f 84 ce 00 00 00 je 109e18 <== NOT EXECUTED 109d4a: a1 e8 4f 12 00 mov 0x124fe8,%eax <== NOT EXECUTED 109d4f: 48 dec %eax <== NOT EXECUTED 109d50: 39 43 20 cmp %eax,0x20(%ebx) <== NOT EXECUTED 109d53: 0f 8d bf 00 00 00 jge 109e18 <== NOT EXECUTED (tty->ccount < (CBUFSIZE-1))) { unsigned char c; unsigned int newHead; newHead = (tty->rawInBuf.Head + 1) % tty->rawInBuf.Size; 109d59: 8b 43 5c mov 0x5c(%ebx),%eax <== NOT EXECUTED 109d5c: 8b 4b 64 mov 0x64(%ebx),%ecx <== NOT EXECUTED 109d5f: 40 inc %eax <== NOT EXECUTED 109d60: 31 d2 xor %edx,%edx <== NOT EXECUTED 109d62: f7 f1 div %ecx <== NOT EXECUTED c = tty->rawInBuf.theBuf[newHead]; 109d64: 8b 43 58 mov 0x58(%ebx),%eax <== NOT EXECUTED 109d67: 8a 0c 10 mov (%eax,%edx,1),%cl <== NOT EXECUTED tty->rawInBuf.Head = newHead; 109d6a: 89 53 5c mov %edx,0x5c(%ebx) <== NOT EXECUTED if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size) 109d6d: 8b 43 60 mov 0x60(%ebx),%eax <== NOT EXECUTED 109d70: 8b 7b 64 mov 0x64(%ebx),%edi <== NOT EXECUTED 109d73: 8b 73 64 mov 0x64(%ebx),%esi <== NOT EXECUTED 109d76: 8d 04 07 lea (%edi,%eax,1),%eax <== NOT EXECUTED 109d79: 29 d0 sub %edx,%eax <== NOT EXECUTED 109d7b: 31 d2 xor %edx,%edx <== NOT EXECUTED 109d7d: f7 f6 div %esi <== NOT EXECUTED 109d7f: 3b 93 bc 00 00 00 cmp 0xbc(%ebx),%edx <== NOT EXECUTED 109d85: 73 5d jae 109de4 <== NOT EXECUTED % tty->rawInBuf.Size) < tty->lowwater) { tty->flow_ctrl &= ~FL_IREQXOF; 109d87: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 109d8d: 83 e0 fe and $0xfffffffe,%eax <== NOT EXECUTED 109d90: 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)) 109d96: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 109d9c: 25 02 02 00 00 and $0x202,%eax <== NOT EXECUTED 109da1: 3d 02 02 00 00 cmp $0x202,%eax <== NOT EXECUTED 109da6: 0f 84 94 00 00 00 je 109e40 <== NOT EXECUTED /* XON should be sent now... */ (*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTART]), 1); } else if (tty->flow_ctrl & FL_MDRTS) { 109dac: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 109db2: f6 c4 01 test $0x1,%ah <== NOT EXECUTED 109db5: 74 2d je 109de4 <== NOT EXECUTED tty->flow_ctrl &= ~FL_IRTSOFF; 109db7: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 109dbd: 83 e0 fb and $0xfffffffb,%eax <== NOT EXECUTED 109dc0: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED /* activate RTS line */ if (tty->device.startRemoteTx != NULL) { 109dc6: 8b 83 b0 00 00 00 mov 0xb0(%ebx),%eax <== NOT EXECUTED 109dcc: 85 c0 test %eax,%eax <== NOT EXECUTED 109dce: 74 14 je 109de4 <== NOT EXECUTED tty->device.startRemoteTx(tty->minor); 109dd0: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 109dd3: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED 109dd6: 88 4d d0 mov %cl,-0x30(%ebp) <== NOT EXECUTED 109dd9: ff d0 call *%eax <== NOT EXECUTED 109ddb: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 109dde: 8a 4d d0 mov -0x30(%ebp),%cl <== NOT EXECUTED 109de1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED } } } /* continue processing new character */ if (tty->termios.c_lflag & ICANON) { 109de4: f6 43 3c 02 testb $0x2,0x3c(%ebx) <== NOT EXECUTED 109de8: 0f 85 36 ff ff ff jne 109d24 <== NOT EXECUTED if (siproc (c, tty)) wait = 0; } else { siproc (c, tty); 109dee: 0f b6 c1 movzbl %cl,%eax <== NOT EXECUTED 109df1: 89 da mov %ebx,%edx <== NOT EXECUTED 109df3: e8 74 fc ff ff call 109a6c <== NOT EXECUTED if (tty->ccount >= tty->termios.c_cc[VMIN]) 109df8: 0f b6 43 47 movzbl 0x47(%ebx),%eax <== NOT EXECUTED 109dfc: 39 43 20 cmp %eax,0x20(%ebx) <== NOT EXECUTED 109dff: 0f 8d 2d ff ff ff jge 109d32 <== NOT EXECUTED wait = 0; } timeout = tty->rawInBufSemaphoreTimeout; 109e05: 8b 73 70 mov 0x70(%ebx),%esi <== NOT EXECUTED while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && 109e08: 8b 53 5c mov 0x5c(%ebx),%edx <== NOT EXECUTED 109e0b: 8b 43 60 mov 0x60(%ebx),%eax <== NOT EXECUTED 109e0e: 39 c2 cmp %eax,%edx <== NOT EXECUTED 109e10: 0f 85 34 ff ff ff jne 109d4a <== NOT EXECUTED 109e16: 66 90 xchg %ax,%ax <== NOT EXECUTED } /* * Wait for characters */ if ( wait ) { 109e18: 8b 45 e4 mov -0x1c(%ebp),%eax <== NOT EXECUTED 109e1b: 85 c0 test %eax,%eax <== NOT EXECUTED 109e1d: 0f 84 55 fe ff ff je 109c78 <== NOT EXECUTED sc = rtems_semaphore_obtain (tty->rawInBuf.Semaphore, 109e23: 57 push %edi <== NOT EXECUTED 109e24: 56 push %esi <== NOT EXECUTED 109e25: ff 73 6c pushl 0x6c(%ebx) <== NOT EXECUTED 109e28: ff 73 68 pushl 0x68(%ebx) <== NOT EXECUTED 109e2b: e8 30 17 00 00 call 10b560 <== NOT EXECUTED tty->rawInBufSemaphoreOptions, timeout); if (sc != RTEMS_SUCCESSFUL) 109e30: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 109e33: 85 c0 test %eax,%eax <== NOT EXECUTED 109e35: 0f 84 d9 fe ff ff je 109d14 <== NOT EXECUTED 109e3b: e9 38 fe ff ff jmp 109c78 <== 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)) 109e40: 8b b3 94 00 00 00 mov 0x94(%ebx),%esi <== NOT EXECUTED 109e46: 85 f6 test %esi,%esi <== NOT EXECUTED 109e48: 74 0e je 109e58 <== NOT EXECUTED == (FL_MDXON | FL_ISNTXOF)) && ((tty->rawOutBufState == rob_idle) || (tty->flow_ctrl & FL_OSTOP))) { 109e4a: 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)) 109e50: a8 20 test $0x20,%al <== NOT EXECUTED 109e52: 0f 84 54 ff ff ff je 109dac <== 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, 109e58: 52 push %edx <== NOT EXECUTED 109e59: 6a 01 push $0x1 <== NOT EXECUTED 109e5b: ff 75 d4 pushl -0x2c(%ebp) <== NOT EXECUTED 109e5e: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED 109e61: 88 4d d0 mov %cl,-0x30(%ebp) <== NOT EXECUTED 109e64: ff 93 a4 00 00 00 call *0xa4(%ebx) <== NOT EXECUTED 109e6a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 109e6d: 8a 4d d0 mov -0x30(%ebp),%cl <== NOT EXECUTED 109e70: e9 6f ff ff ff jmp 109de4 <== NOT EXECUTED static rtems_status_code fillBufferPoll (struct rtems_termios_tty *tty) { int n; if (tty->termios.c_lflag & ICANON) { 109e75: f6 43 3c 02 testb $0x2,0x3c(%ebx) <== NOT EXECUTED 109e79: 75 1d jne 109e98 <== NOT EXECUTED 109e7b: eb 39 jmp 109eb6 <== NOT EXECUTED 109e7d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED n = (*tty->device.pollRead)(tty->minor); if (n < 0) { rtems_task_wake_after (1); } else { if (siproc (n, tty)) 109e80: 0f b6 c0 movzbl %al,%eax <== NOT EXECUTED 109e83: 89 da mov %ebx,%edx <== NOT EXECUTED 109e85: e8 e2 fb ff ff call 109a6c <== NOT EXECUTED 109e8a: 85 c0 test %eax,%eax <== NOT EXECUTED 109e8c: 0f 85 e6 fd ff ff jne 109c78 <== NOT EXECUTED static rtems_status_code fillBufferPoll (struct rtems_termios_tty *tty) { int n; if (tty->termios.c_lflag & ICANON) { 109e92: 8b 83 a0 00 00 00 mov 0xa0(%ebx),%eax <== NOT EXECUTED for (;;) { n = (*tty->device.pollRead)(tty->minor); 109e98: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 109e9b: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED 109e9e: ff d0 call *%eax <== NOT EXECUTED if (n < 0) { 109ea0: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 109ea3: 85 c0 test %eax,%eax <== NOT EXECUTED 109ea5: 79 d9 jns 109e80 <== NOT EXECUTED rtems_task_wake_after (1); 109ea7: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 109eaa: 6a 01 push $0x1 <== NOT EXECUTED 109eac: e8 63 1b 00 00 call 10ba14 <== NOT EXECUTED 109eb1: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 109eb4: eb dc jmp 109e92 <== NOT EXECUTED } } } else { rtems_interval then, now; then = rtems_clock_get_ticks_since_boot(); 109eb6: e8 a9 0f 00 00 call 10ae64 <== NOT EXECUTED 109ebb: 89 c6 mov %eax,%esi <== NOT EXECUTED 109ebd: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED for (;;) { n = (*tty->device.pollRead)(tty->minor); 109ec0: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 109ec3: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED 109ec6: ff 93 a0 00 00 00 call *0xa0(%ebx) <== NOT EXECUTED if (n < 0) { 109ecc: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 109ecf: 85 c0 test %eax,%eax <== NOT EXECUTED 109ed1: 78 25 js 109ef8 <== NOT EXECUTED } } rtems_task_wake_after (1); } else { siproc (n, tty); 109ed3: 0f b6 c0 movzbl %al,%eax <== NOT EXECUTED 109ed6: 89 da mov %ebx,%edx <== NOT EXECUTED 109ed8: e8 8f fb ff ff call 109a6c <== NOT EXECUTED if (tty->ccount >= tty->termios.c_cc[VMIN]) 109edd: 8a 43 47 mov 0x47(%ebx),%al <== NOT EXECUTED 109ee0: 0f b6 d0 movzbl %al,%edx <== NOT EXECUTED 109ee3: 39 53 20 cmp %edx,0x20(%ebx) <== NOT EXECUTED 109ee6: 0f 8d 8c fd ff ff jge 109c78 <== NOT EXECUTED break; if (tty->termios.c_cc[VMIN] && tty->termios.c_cc[VTIME]) 109eec: 84 c0 test %al,%al <== NOT EXECUTED 109eee: 74 d0 je 109ec0 <== NOT EXECUTED 109ef0: 80 7b 46 00 cmpb $0x0,0x46(%ebx) <== NOT EXECUTED 109ef4: 74 ca je 109ec0 <== NOT EXECUTED 109ef6: eb be jmp 109eb6 <== NOT EXECUTED rtems_interval then, now; then = rtems_clock_get_ticks_since_boot(); for (;;) { n = (*tty->device.pollRead)(tty->minor); if (n < 0) { if (tty->termios.c_cc[VMIN]) { 109ef8: 80 7b 47 00 cmpb $0x0,0x47(%ebx) <== NOT EXECUTED 109efc: 74 1d je 109f1b <== NOT EXECUTED if (tty->termios.c_cc[VTIME] && tty->ccount) { 109efe: 80 7b 46 00 cmpb $0x0,0x46(%ebx) <== NOT EXECUTED 109f02: 74 08 je 109f0c <== NOT EXECUTED 109f04: 8b 7b 20 mov 0x20(%ebx),%edi <== NOT EXECUTED 109f07: 85 ff test %edi,%edi <== NOT EXECUTED 109f09: 75 1a jne 109f25 <== NOT EXECUTED 109f0b: 90 nop <== NOT EXECUTED now = rtems_clock_get_ticks_since_boot(); if ((now - then) > tty->vtimeTicks) { break; } } rtems_task_wake_after (1); 109f0c: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 109f0f: 6a 01 push $0x1 <== NOT EXECUTED 109f11: e8 fe 1a 00 00 call 10ba14 <== NOT EXECUTED 109f16: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 109f19: eb a5 jmp 109ec0 <== NOT EXECUTED break; } } } else { if (!tty->termios.c_cc[VTIME]) 109f1b: 80 7b 46 00 cmpb $0x0,0x46(%ebx) <== NOT EXECUTED 109f1f: 0f 84 53 fd ff ff je 109c78 <== NOT EXECUTED break; now = rtems_clock_get_ticks_since_boot(); 109f25: e8 3a 0f 00 00 call 10ae64 <== NOT EXECUTED if ((now - then) > tty->vtimeTicks) { 109f2a: 29 f0 sub %esi,%eax <== NOT EXECUTED 109f2c: 3b 43 54 cmp 0x54(%ebx),%eax <== NOT EXECUTED 109f2f: 76 db jbe 109f0c <== NOT EXECUTED 109f31: e9 42 fd ff ff jmp 109c78 <== NOT EXECUTED 00108ee0 : * 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) { 108ee0: 55 push %ebp 108ee1: 89 e5 mov %esp,%ebp 108ee3: 57 push %edi 108ee4: 56 push %esi 108ee5: 53 push %ebx 108ee6: 83 ec 0c sub $0xc,%esp 108ee9: 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)) 108eec: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax 108ef2: 25 03 04 00 00 and $0x403,%eax 108ef7: 3d 01 04 00 00 cmp $0x401,%eax 108efc: 0f 84 86 01 00 00 je 109088 <== ALWAYS TAKEN tty->flow_ctrl |= FL_ISNTXOF; rtems_interrupt_enable(level); nToSend = 1; } else if ((tty->flow_ctrl & (FL_IREQXOF | FL_ISNTXOF)) 108f02: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax 108f08: 83 e0 03 and $0x3,%eax 108f0b: 83 f8 02 cmp $0x2,%eax 108f0e: 0f 84 b0 01 00 00 je 1090c4 <== ALWAYS TAKEN rtems_interrupt_enable(level); nToSend = 1; } else { if ( tty->rawOutBuf.Head == tty->rawOutBuf.Tail ) { 108f14: 8b 93 80 00 00 00 mov 0x80(%ebx),%edx 108f1a: 8b 83 84 00 00 00 mov 0x84(%ebx),%eax 108f20: 39 c2 cmp %eax,%edx 108f22: 0f 84 b0 00 00 00 je 108fd8 <== ALWAYS TAKEN rtems_semaphore_release (tty->rawOutBuf.Semaphore); } return 0; } rtems_interrupt_disable(level); 108f28: 9c pushf 108f29: fa cli 108f2a: 58 pop %eax len = tty->t_dqlen; 108f2b: 8b 8b 90 00 00 00 mov 0x90(%ebx),%ecx tty->t_dqlen = 0; 108f31: c7 83 90 00 00 00 00 movl $0x0,0x90(%ebx) 108f38: 00 00 00 rtems_interrupt_enable(level); 108f3b: 50 push %eax 108f3c: 9d popf newTail = (tty->rawOutBuf.Tail + len) % tty->rawOutBuf.Size; 108f3d: 8b 83 84 00 00 00 mov 0x84(%ebx),%eax 108f43: 8b bb 88 00 00 00 mov 0x88(%ebx),%edi 108f49: 8d 04 01 lea (%ecx,%eax,1),%eax 108f4c: 31 d2 xor %edx,%edx 108f4e: f7 f7 div %edi 108f50: 89 d6 mov %edx,%esi tty->rawOutBuf.Tail = newTail; 108f52: 89 93 84 00 00 00 mov %edx,0x84(%ebx) if (tty->rawOutBufState == rob_wait) { 108f58: 83 bb 94 00 00 00 02 cmpl $0x2,0x94(%ebx) 108f5f: 0f 84 e7 00 00 00 je 10904c /* * wake up any pending writer task */ rtems_semaphore_release (tty->rawOutBuf.Semaphore); } if (newTail == tty->rawOutBuf.Head) { 108f65: 8b 83 80 00 00 00 mov 0x80(%ebx),%eax 108f6b: 39 f0 cmp %esi,%eax 108f6d: 0f 84 81 00 00 00 je 108ff4 if ( tty->tty_snd.sw_pfn != NULL) { (*tty->tty_snd.sw_pfn)(&tty->termios, tty->tty_snd.sw_arg); } } /* check, whether output should stop due to received XOFF */ else if ((tty->flow_ctrl & (FL_MDXON | FL_ORCVXOF)) 108f73: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax 108f79: 25 10 02 00 00 and $0x210,%eax 108f7e: 3d 10 02 00 00 cmp $0x210,%eax 108f83: 0f 84 db 00 00 00 je 109064 <== ALWAYS TAKEN } else { /* * Buffer not empty, start tranmitter */ if (newTail > tty->rawOutBuf.Head) 108f89: 8b 83 80 00 00 00 mov 0x80(%ebx),%eax 108f8f: 39 c6 cmp %eax,%esi 108f91: 0f 87 95 00 00 00 ja 10902c nToSend = tty->rawOutBuf.Size - newTail; else nToSend = tty->rawOutBuf.Head - newTail; 108f97: 8b bb 80 00 00 00 mov 0x80(%ebx),%edi 108f9d: 29 f7 sub %esi,%edi /* when flow control XON or XOF, don't send blocks of data */ /* to allow fast reaction on incoming flow ctrl and low latency*/ /* for outgoing flow control */ if (tty->flow_ctrl & (FL_MDXON | FL_MDXOF)) { 108f9f: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax 108fa5: f6 c4 06 test $0x6,%ah 108fa8: 0f 84 95 00 00 00 je 109043 <== NEVER TAKEN 108fae: b8 01 00 00 00 mov $0x1,%eax <== NOT EXECUTED 108fb3: bf 01 00 00 00 mov $0x1,%edi <== NOT EXECUTED nToSend = 1; } tty->rawOutBufState = rob_busy; /*apm*/ 108fb8: c7 83 94 00 00 00 01 movl $0x1,0x94(%ebx) 108fbf: 00 00 00 (*tty->device.write)(tty->minor, 108fc2: 52 push %edx 108fc3: 50 push %eax 108fc4: 8b 43 7c mov 0x7c(%ebx),%eax 108fc7: 01 f0 add %esi,%eax 108fc9: 50 push %eax 108fca: ff 73 10 pushl 0x10(%ebx) 108fcd: ff 93 a4 00 00 00 call *0xa4(%ebx) 108fd3: 83 c4 10 add $0x10,%esp 108fd6: eb 44 jmp 10901c <== ALWAYS TAKEN else { if ( tty->rawOutBuf.Head == tty->rawOutBuf.Tail ) { /* * buffer was empty */ if (tty->rawOutBufState == rob_wait) { 108fd8: 83 bb 94 00 00 00 02 cmpl $0x2,0x94(%ebx) <== NOT EXECUTED 108fdf: 0f 84 1b 01 00 00 je 109100 <== NOT EXECUTED 108fe5: 31 ff xor %edi,%edi <== NOT EXECUTED nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ } return nToSend; } 108fe7: 89 f8 mov %edi,%eax <== NOT EXECUTED 108fe9: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 108fec: 5b pop %ebx <== NOT EXECUTED 108fed: 5e pop %esi <== NOT EXECUTED 108fee: 5f pop %edi <== NOT EXECUTED 108fef: c9 leave <== NOT EXECUTED 108ff0: c3 ret <== NOT EXECUTED 108ff1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED } if (newTail == tty->rawOutBuf.Head) { /* * Buffer has become empty */ tty->rawOutBufState = rob_idle; 108ff4: c7 83 94 00 00 00 00 movl $0x0,0x94(%ebx) 108ffb: 00 00 00 nToSend = 0; /* * check to see if snd wakeup callback was set */ if ( tty->tty_snd.sw_pfn != NULL) { 108ffe: 8b 83 d4 00 00 00 mov 0xd4(%ebx),%eax 109004: 85 c0 test %eax,%eax 109006: 74 7a je 109082 <== NEVER TAKEN (*tty->tty_snd.sw_pfn)(&tty->termios, tty->tty_snd.sw_arg); 109008: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 10900b: ff b3 d8 00 00 00 pushl 0xd8(%ebx) <== NOT EXECUTED 109011: 8d 53 30 lea 0x30(%ebx),%edx <== NOT EXECUTED 109014: 52 push %edx <== NOT EXECUTED 109015: ff d0 call *%eax <== NOT EXECUTED 109017: 31 ff xor %edi,%edi <== NOT EXECUTED 109019: 83 c4 10 add $0x10,%esp <== NOT EXECUTED tty->rawOutBufState = rob_busy; /*apm*/ (*tty->device.write)(tty->minor, &tty->rawOutBuf.theBuf[newTail], nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ 10901c: 89 b3 84 00 00 00 mov %esi,0x84(%ebx) } return nToSend; } 109022: 89 f8 mov %edi,%eax 109024: 8d 65 f4 lea -0xc(%ebp),%esp 109027: 5b pop %ebx 109028: 5e pop %esi 109029: 5f pop %edi 10902a: c9 leave 10902b: c3 ret else { /* * Buffer not empty, start tranmitter */ if (newTail > tty->rawOutBuf.Head) nToSend = tty->rawOutBuf.Size - newTail; 10902c: 8b bb 88 00 00 00 mov 0x88(%ebx),%edi 109032: 29 f7 sub %esi,%edi else nToSend = tty->rawOutBuf.Head - newTail; /* when flow control XON or XOF, don't send blocks of data */ /* to allow fast reaction on incoming flow ctrl and low latency*/ /* for outgoing flow control */ if (tty->flow_ctrl & (FL_MDXON | FL_MDXOF)) { 109034: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax 10903a: f6 c4 06 test $0x6,%ah 10903d: 0f 85 6b ff ff ff jne 108fae <== ALWAYS TAKEN 109043: 89 f8 mov %edi,%eax 109045: e9 6e ff ff ff jmp 108fb8 <== ALWAYS TAKEN 10904a: 66 90 xchg %ax,%ax <== NOT EXECUTED tty->rawOutBuf.Tail = newTail; if (tty->rawOutBufState == rob_wait) { /* * wake up any pending writer task */ rtems_semaphore_release (tty->rawOutBuf.Semaphore); 10904c: 83 ec 0c sub $0xc,%esp 10904f: ff b3 8c 00 00 00 pushl 0x8c(%ebx) 109055: e8 02 26 00 00 call 10b65c 10905a: 83 c4 10 add $0x10,%esp 10905d: e9 03 ff ff ff jmp 108f65 <== ALWAYS TAKEN 109062: 66 90 xchg %ax,%ax <== NOT EXECUTED /* check, whether output should stop due to received XOFF */ else if ((tty->flow_ctrl & (FL_MDXON | FL_ORCVXOF)) == (FL_MDXON | FL_ORCVXOF)) { /* Buffer not empty, but output stops due to XOFF */ /* set flag, that output has been stopped */ rtems_interrupt_disable(level); 109064: 9c pushf <== NOT EXECUTED 109065: fa cli <== NOT EXECUTED 109066: 5a pop %edx <== NOT EXECUTED tty->flow_ctrl |= FL_OSTOP; 109067: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 10906d: 83 c8 20 or $0x20,%eax <== NOT EXECUTED 109070: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED tty->rawOutBufState = rob_busy; /*apm*/ 109076: c7 83 94 00 00 00 01 movl $0x1,0x94(%ebx) <== NOT EXECUTED 10907d: 00 00 00 <== NOT EXECUTED rtems_interrupt_enable(level); 109080: 52 push %edx <== NOT EXECUTED 109081: 9d popf <== NOT EXECUTED 109082: 31 ff xor %edi,%edi 109084: eb 96 jmp 10901c <== ALWAYS TAKEN 109086: 66 90 xchg %ax,%ax <== NOT EXECUTED /* check for XOF/XON to send */ if ((tty->flow_ctrl & (FL_MDXOF | FL_IREQXOF | FL_ISNTXOF)) == (FL_MDXOF | FL_IREQXOF)) { /* XOFF should be sent now... */ (*tty->device.write)(tty->minor, 109088: 56 push %esi <== NOT EXECUTED 109089: 6a 01 push $0x1 <== NOT EXECUTED 10908b: 8d 43 4a lea 0x4a(%ebx),%eax <== NOT EXECUTED 10908e: 50 push %eax <== NOT EXECUTED 10908f: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED 109092: ff 93 a4 00 00 00 call *0xa4(%ebx) <== NOT EXECUTED (void *)&(tty->termios.c_cc[VSTOP]), 1); rtems_interrupt_disable(level); 109098: 9c pushf <== NOT EXECUTED 109099: fa cli <== NOT EXECUTED 10909a: 5a pop %edx <== NOT EXECUTED tty->t_dqlen--; 10909b: ff 8b 90 00 00 00 decl 0x90(%ebx) <== NOT EXECUTED tty->flow_ctrl |= FL_ISNTXOF; 1090a1: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 1090a7: 83 c8 02 or $0x2,%eax <== NOT EXECUTED 1090aa: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED rtems_interrupt_enable(level); 1090b0: 52 push %edx <== NOT EXECUTED 1090b1: 9d popf <== NOT EXECUTED 1090b2: bf 01 00 00 00 mov $0x1,%edi <== NOT EXECUTED 1090b7: 83 c4 10 add $0x10,%esp <== NOT EXECUTED nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ } return nToSend; } 1090ba: 89 f8 mov %edi,%eax <== NOT EXECUTED 1090bc: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 1090bf: 5b pop %ebx <== NOT EXECUTED 1090c0: 5e pop %esi <== NOT EXECUTED 1090c1: 5f pop %edi <== NOT EXECUTED 1090c2: c9 leave <== NOT EXECUTED 1090c3: c3 ret <== NOT EXECUTED * FIXME: this .write call will generate another * dequeue callback. This will advance the "Tail" in the data * buffer, although the corresponding data is not yet out! * Therefore the dequeue "length" should be reduced by 1 */ (*tty->device.write)(tty->minor, 1090c4: 51 push %ecx <== NOT EXECUTED 1090c5: 6a 01 push $0x1 <== NOT EXECUTED 1090c7: 8d 43 49 lea 0x49(%ebx),%eax <== NOT EXECUTED 1090ca: 50 push %eax <== NOT EXECUTED 1090cb: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED 1090ce: ff 93 a4 00 00 00 call *0xa4(%ebx) <== NOT EXECUTED (void *)&(tty->termios.c_cc[VSTART]), 1); rtems_interrupt_disable(level); 1090d4: 9c pushf <== NOT EXECUTED 1090d5: fa cli <== NOT EXECUTED 1090d6: 5a pop %edx <== NOT EXECUTED tty->t_dqlen--; 1090d7: ff 8b 90 00 00 00 decl 0x90(%ebx) <== NOT EXECUTED tty->flow_ctrl &= ~FL_ISNTXOF; 1090dd: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 1090e3: 83 e0 fd and $0xfffffffd,%eax <== NOT EXECUTED 1090e6: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED rtems_interrupt_enable(level); 1090ec: 52 push %edx <== NOT EXECUTED 1090ed: 9d popf <== NOT EXECUTED 1090ee: bf 01 00 00 00 mov $0x1,%edi <== NOT EXECUTED 1090f3: 83 c4 10 add $0x10,%esp <== NOT EXECUTED nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ } return nToSend; } 1090f6: 89 f8 mov %edi,%eax <== NOT EXECUTED 1090f8: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 1090fb: 5b pop %ebx <== NOT EXECUTED 1090fc: 5e pop %esi <== NOT EXECUTED 1090fd: 5f pop %edi <== NOT EXECUTED 1090fe: c9 leave <== NOT EXECUTED 1090ff: c3 ret <== NOT EXECUTED */ if (tty->rawOutBufState == rob_wait) { /* * this should never happen... */ rtems_semaphore_release (tty->rawOutBuf.Semaphore); 109100: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 109103: ff b3 8c 00 00 00 pushl 0x8c(%ebx) <== NOT EXECUTED 109109: e8 4e 25 00 00 call 10b65c <== NOT EXECUTED 10910e: 31 ff xor %edi,%edi <== NOT EXECUTED 109110: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 109113: e9 cf fe ff ff jmp 108fe7 <== NOT EXECUTED 0010aa38 : /* * this task actually processes any receive events */ static rtems_task rtems_termios_rxdaemon(rtems_task_argument argument) { 10aa38: 55 push %ebp <== NOT EXECUTED 10aa39: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10aa3b: 57 push %edi <== NOT EXECUTED 10aa3c: 56 push %esi <== NOT EXECUTED 10aa3d: 53 push %ebx <== NOT EXECUTED 10aa3e: 83 ec 1c sub $0x1c,%esp <== NOT EXECUTED 10aa41: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED 10aa44: 8d 75 e0 lea -0x20(%ebp),%esi <== NOT EXECUTED 10aa47: 8d 7d e7 lea -0x19(%ebp),%edi <== NOT EXECUTED 10aa4a: 66 90 xchg %ax,%ax <== NOT EXECUTED char c_buf; while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_RX_PROC_EVENT | 10aa4c: 56 push %esi <== NOT EXECUTED 10aa4d: 6a 00 push $0x0 <== NOT EXECUTED 10aa4f: 6a 02 push $0x2 <== NOT EXECUTED 10aa51: 6a 03 push $0x3 <== NOT EXECUTED 10aa53: e8 74 04 00 00 call 10aecc <== NOT EXECUTED TERMIOS_RX_TERMINATE_EVENT), RTEMS_EVENT_ANY | RTEMS_WAIT, RTEMS_NO_TIMEOUT, &the_event); if ((the_event & TERMIOS_RX_TERMINATE_EVENT) != 0) { 10aa58: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10aa5b: f6 45 e0 01 testb $0x1,-0x20(%ebp) <== NOT EXECUTED 10aa5f: 75 27 jne 10aa88 <== NOT EXECUTED } else { /* * do something */ c = tty->device.pollRead(tty->minor); 10aa61: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10aa64: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED 10aa67: ff 93 a0 00 00 00 call *0xa0(%ebx) <== NOT EXECUTED if (c != EOF) { 10aa6d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10aa70: 83 f8 ff cmp $0xffffffff,%eax <== NOT EXECUTED 10aa73: 74 d7 je 10aa4c <== NOT EXECUTED /* * pollRead did call enqueue on its own */ c_buf = c; 10aa75: 88 45 e7 mov %al,-0x19(%ebp) <== NOT EXECUTED rtems_termios_enqueue_raw_characters ( 10aa78: 50 push %eax <== NOT EXECUTED 10aa79: 6a 01 push $0x1 <== NOT EXECUTED 10aa7b: 57 push %edi <== NOT EXECUTED 10aa7c: 53 push %ebx <== NOT EXECUTED 10aa7d: e8 fe e6 ff ff call 109180 <== NOT EXECUTED 10aa82: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10aa85: eb c5 jmp 10aa4c <== NOT EXECUTED 10aa87: 90 nop <== NOT EXECUTED TERMIOS_RX_TERMINATE_EVENT), RTEMS_EVENT_ANY | RTEMS_WAIT, RTEMS_NO_TIMEOUT, &the_event); if ((the_event & TERMIOS_RX_TERMINATE_EVENT) != 0) { tty->rxTaskId = 0; 10aa88: c7 83 c4 00 00 00 00 movl $0x0,0xc4(%ebx) <== NOT EXECUTED 10aa8f: 00 00 00 <== NOT EXECUTED rtems_task_delete(RTEMS_SELF); 10aa92: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10aa95: 6a 00 push $0x0 <== NOT EXECUTED 10aa97: e8 c0 0d 00 00 call 10b85c <== NOT EXECUTED 10aa9c: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10aa9f: eb ab jmp 10aa4c <== NOT EXECUTED 00108ec4 : * 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) { 108ec4: 55 push %ebp <== NOT EXECUTED 108ec5: 89 e5 mov %esp,%ebp <== NOT EXECUTED 108ec7: 83 ec 10 sub $0x10,%esp <== NOT EXECUTED /* * send event to rx daemon task */ rtems_event_send(tty->rxTaskId,TERMIOS_RX_PROC_EVENT); 108eca: 6a 02 push $0x2 <== NOT EXECUTED 108ecc: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 108ecf: ff b0 c4 00 00 00 pushl 0xc4(%eax) <== NOT EXECUTED 108ed5: e8 76 21 00 00 call 10b050 <== NOT EXECUTED 108eda: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } 108edd: c9 leave <== NOT EXECUTED 108ede: c3 ret <== NOT EXECUTED 0010a9cc : /* * this task actually processes any transmit events */ static rtems_task rtems_termios_txdaemon(rtems_task_argument argument) { 10a9cc: 55 push %ebp <== NOT EXECUTED 10a9cd: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10a9cf: 56 push %esi <== NOT EXECUTED 10a9d0: 53 push %ebx <== NOT EXECUTED 10a9d1: 83 ec 10 sub $0x10,%esp <== NOT EXECUTED 10a9d4: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED 10a9d7: 8d 75 f4 lea -0xc(%ebp),%esi <== NOT EXECUTED 10a9da: 66 90 xchg %ax,%ax <== NOT EXECUTED while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_TX_START_EVENT | 10a9dc: 56 push %esi <== NOT EXECUTED 10a9dd: 6a 00 push $0x0 <== NOT EXECUTED 10a9df: 6a 02 push $0x2 <== NOT EXECUTED 10a9e1: 6a 03 push $0x3 <== NOT EXECUTED 10a9e3: e8 e4 04 00 00 call 10aecc <== NOT EXECUTED TERMIOS_TX_TERMINATE_EVENT), RTEMS_EVENT_ANY | RTEMS_WAIT, RTEMS_NO_TIMEOUT, &the_event); if ((the_event & TERMIOS_TX_TERMINATE_EVENT) != 0) { 10a9e8: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10a9eb: f6 45 f4 01 testb $0x1,-0xc(%ebp) <== NOT EXECUTED 10a9ef: 75 2b jne 10aa1c <== NOT EXECUTED } else { /* * call any line discipline start function */ if (rtems_termios_linesw[tty->t_line].l_start != NULL) { 10a9f1: 8b 83 cc 00 00 00 mov 0xcc(%ebx),%eax <== NOT EXECUTED 10a9f7: c1 e0 05 shl $0x5,%eax <== NOT EXECUTED 10a9fa: 8b 80 14 6f 12 00 mov 0x126f14(%eax),%eax <== NOT EXECUTED 10aa00: 85 c0 test %eax,%eax <== NOT EXECUTED 10aa02: 74 09 je 10aa0d <== NOT EXECUTED rtems_termios_linesw[tty->t_line].l_start(tty); 10aa04: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10aa07: 53 push %ebx <== NOT EXECUTED 10aa08: ff d0 call *%eax <== NOT EXECUTED 10aa0a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } /* * try to push further characters to device */ rtems_termios_refill_transmitter(tty); 10aa0d: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10aa10: 53 push %ebx <== NOT EXECUTED 10aa11: e8 ca e4 ff ff call 108ee0 <== NOT EXECUTED 10aa16: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10aa19: eb c1 jmp 10a9dc <== NOT EXECUTED 10aa1b: 90 nop <== NOT EXECUTED TERMIOS_TX_TERMINATE_EVENT), RTEMS_EVENT_ANY | RTEMS_WAIT, RTEMS_NO_TIMEOUT, &the_event); if ((the_event & TERMIOS_TX_TERMINATE_EVENT) != 0) { tty->txTaskId = 0; 10aa1c: c7 83 c8 00 00 00 00 movl $0x0,0xc8(%ebx) <== NOT EXECUTED 10aa23: 00 00 00 <== NOT EXECUTED rtems_task_delete(RTEMS_SELF); 10aa26: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10aa29: 6a 00 push $0x0 <== NOT EXECUTED 10aa2b: e8 2c 0e 00 00 call 10b85c <== NOT EXECUTED 10aa30: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10aa33: eb a7 jmp 10a9dc <== NOT EXECUTED 00109ac0 : rtems_termios_puts (&c, 1, tty); } rtems_status_code rtems_termios_write (void *arg) { 109ac0: 55 push %ebp 109ac1: 89 e5 mov %esp,%ebp 109ac3: 57 push %edi 109ac4: 56 push %esi 109ac5: 53 push %ebx 109ac6: 83 ec 20 sub $0x20,%esp 109ac9: 8b 7d 08 mov 0x8(%ebp),%edi rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 109acc: 8b 07 mov (%edi),%eax 109ace: 8b 70 34 mov 0x34(%eax),%esi rtems_status_code sc; sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 109ad1: 6a 00 push $0x0 109ad3: 6a 00 push $0x0 109ad5: ff 76 18 pushl 0x18(%esi) 109ad8: e8 83 1a 00 00 call 10b560 109add: 89 45 e4 mov %eax,-0x1c(%ebp) if (sc != RTEMS_SUCCESSFUL) 109ae0: 83 c4 10 add $0x10,%esp 109ae3: 85 c0 test %eax,%eax 109ae5: 75 29 jne 109b10 <== ALWAYS TAKEN return sc; if (rtems_termios_linesw[tty->t_line].l_write != NULL) { 109ae7: 8b 86 cc 00 00 00 mov 0xcc(%esi),%eax 109aed: c1 e0 05 shl $0x5,%eax 109af0: 8b 80 0c 6f 12 00 mov 0x126f0c(%eax),%eax 109af6: 85 c0 test %eax,%eax 109af8: 74 22 je 109b1c <== NEVER TAKEN sc = rtems_termios_linesw[tty->t_line].l_write(tty,args); 109afa: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 109afd: 57 push %edi <== NOT EXECUTED 109afe: 56 push %esi <== NOT EXECUTED 109aff: ff d0 call *%eax <== NOT EXECUTED 109b01: 89 45 e4 mov %eax,-0x1c(%ebp) <== NOT EXECUTED rtems_semaphore_release (tty->osem); 109b04: 5f pop %edi <== NOT EXECUTED 109b05: ff 76 18 pushl 0x18(%esi) <== NOT EXECUTED 109b08: e8 4f 1b 00 00 call 10b65c <== NOT EXECUTED return sc; 109b0d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_termios_puts (args->buffer, args->count, tty); args->bytes_moved = args->count; } rtems_semaphore_release (tty->osem); return sc; } 109b10: 8b 45 e4 mov -0x1c(%ebp),%eax <== NOT EXECUTED 109b13: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 109b16: 5b pop %ebx <== NOT EXECUTED 109b17: 5e pop %esi <== NOT EXECUTED 109b18: 5f pop %edi <== NOT EXECUTED 109b19: c9 leave <== NOT EXECUTED 109b1a: c3 ret <== NOT EXECUTED 109b1b: 90 nop <== NOT EXECUTED if (rtems_termios_linesw[tty->t_line].l_write != NULL) { sc = rtems_termios_linesw[tty->t_line].l_write(tty,args); rtems_semaphore_release (tty->osem); return sc; } if (tty->termios.c_oflag & OPOST) { 109b1c: f6 46 34 01 testb $0x1,0x34(%esi) 109b20: 74 4e je 109b70 <== ALWAYS TAKEN uint32_t count = args->count; 109b22: 8b 47 10 mov 0x10(%edi),%eax 109b25: 89 45 e0 mov %eax,-0x20(%ebp) char *buffer = args->buffer; 109b28: 8b 47 0c mov 0xc(%edi),%eax while (count--) 109b2b: 8b 5d e0 mov -0x20(%ebp),%ebx 109b2e: 85 db test %ebx,%ebx 109b30: 74 56 je 109b88 <== ALWAYS TAKEN 109b32: 31 db xor %ebx,%ebx 109b34: 89 7d dc mov %edi,-0x24(%ebp) 109b37: 89 c7 mov %eax,%edi 109b39: 8d 76 00 lea 0x0(%esi),%esi oproc (*buffer++, tty); 109b3c: 0f b6 04 1f movzbl (%edi,%ebx,1),%eax 109b40: 89 f2 mov %esi,%edx 109b42: e8 7d fa ff ff call 1095c4 <== ALWAYS TAKEN 109b47: 43 inc %ebx return sc; } if (tty->termios.c_oflag & OPOST) { uint32_t count = args->count; char *buffer = args->buffer; while (count--) 109b48: 3b 5d e0 cmp -0x20(%ebp),%ebx 109b4b: 75 ef jne 109b3c 109b4d: 8b 7d dc mov -0x24(%ebp),%edi 109b50: 8b 47 10 mov 0x10(%edi),%eax oproc (*buffer++, tty); args->bytes_moved = args->count; 109b53: 89 47 18 mov %eax,0x18(%edi) } else { rtems_termios_puts (args->buffer, args->count, tty); args->bytes_moved = args->count; } rtems_semaphore_release (tty->osem); 109b56: 83 ec 0c sub $0xc,%esp 109b59: ff 76 18 pushl 0x18(%esi) 109b5c: e8 fb 1a 00 00 call 10b65c return sc; 109b61: 83 c4 10 add $0x10,%esp } 109b64: 8b 45 e4 mov -0x1c(%ebp),%eax 109b67: 8d 65 f4 lea -0xc(%ebp),%esp 109b6a: 5b pop %ebx 109b6b: 5e pop %esi 109b6c: 5f pop %edi 109b6d: c9 leave 109b6e: c3 ret 109b6f: 90 nop <== NOT EXECUTED while (count--) oproc (*buffer++, tty); args->bytes_moved = args->count; } else { rtems_termios_puts (args->buffer, args->count, tty); 109b70: 51 push %ecx <== NOT EXECUTED 109b71: 56 push %esi <== NOT EXECUTED 109b72: ff 77 10 pushl 0x10(%edi) <== NOT EXECUTED 109b75: ff 77 0c pushl 0xc(%edi) <== NOT EXECUTED 109b78: e8 13 f9 ff ff call 109490 <== NOT EXECUTED args->bytes_moved = args->count; 109b7d: 8b 47 10 mov 0x10(%edi),%eax <== NOT EXECUTED 109b80: 89 47 18 mov %eax,0x18(%edi) <== NOT EXECUTED 109b83: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 109b86: eb ce jmp 109b56 <== NOT EXECUTED return sc; } if (tty->termios.c_oflag & OPOST) { uint32_t count = args->count; char *buffer = args->buffer; while (count--) 109b88: 31 c0 xor %eax,%eax <== NOT EXECUTED 109b8a: eb c7 jmp 109b53 <== NOT EXECUTED 00118258 : */ rtems_status_code rtems_timer_cancel( rtems_id id ) { 118258: 55 push %ebp 118259: 89 e5 mov %esp,%ebp 11825b: 83 ec 1c sub $0x1c,%esp RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Get ( Objects_Id id, Objects_Locations *location ) { return (Timer_Control *) 11825e: 8d 45 f4 lea -0xc(%ebp),%eax 118261: 50 push %eax 118262: ff 75 08 pushl 0x8(%ebp) 118265: 68 a0 25 14 00 push $0x1425a0 11826a: e8 e9 29 00 00 call 11ac58 <_Objects_Get> Timer_Control *the_timer; Objects_Locations location; the_timer = _Timer_Get( id, &location ); switch ( location ) { 11826f: 83 c4 10 add $0x10,%esp 118272: 8b 55 f4 mov -0xc(%ebp),%edx 118275: 85 d2 test %edx,%edx 118277: 74 07 je 118280 118279: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11827e: c9 leave 11827f: c3 ret the_timer = _Timer_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_Timer_Is_dormant_class( the_timer->the_class ) ) 118280: 83 78 38 04 cmpl $0x4,0x38(%eax) 118284: 74 0f je 118295 <== ALWAYS TAKEN (void) _Watchdog_Remove( &the_timer->Ticker ); 118286: 83 ec 0c sub $0xc,%esp 118289: 83 c0 10 add $0x10,%eax 11828c: 50 push %eax 11828d: e8 ee 46 00 00 call 11c980 <_Watchdog_Remove> 118292: 83 c4 10 add $0x10,%esp _Thread_Enable_dispatch(); 118295: e8 a2 32 00 00 call 11b53c <_Thread_Enable_dispatch> 11829a: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11829c: c9 leave 11829d: c3 ret 0010bd4c : rtems_status_code rtems_timer_create( rtems_name name, rtems_id *id ) { 10bd4c: 55 push %ebp 10bd4d: 89 e5 mov %esp,%ebp 10bd4f: 57 push %edi 10bd50: 56 push %esi 10bd51: 53 push %ebx 10bd52: 83 ec 0c sub $0xc,%esp 10bd55: 8b 5d 08 mov 0x8(%ebp),%ebx 10bd58: 8b 75 0c mov 0xc(%ebp),%esi Timer_Control *the_timer; if ( !rtems_is_name_valid( name ) ) 10bd5b: 85 db test %ebx,%ebx 10bd5d: 74 6d je 10bdcc return RTEMS_INVALID_NAME; if ( !id ) 10bd5f: 85 f6 test %esi,%esi 10bd61: 0f 84 89 00 00 00 je 10bdf0 10bd67: a1 b8 88 12 00 mov 0x1288b8,%eax 10bd6c: 40 inc %eax 10bd6d: a3 b8 88 12 00 mov %eax,0x1288b8 * 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 ); 10bd72: 83 ec 0c sub $0xc,%esp 10bd75: 68 a0 92 12 00 push $0x1292a0 10bd7a: e8 5d 0e 00 00 call 10cbdc <_Objects_Allocate> <== ALWAYS TAKEN _Thread_Disable_dispatch(); /* to prevent deletion */ the_timer = _Timer_Allocate(); if ( !the_timer ) { 10bd7f: 83 c4 10 add $0x10,%esp 10bd82: 85 c0 test %eax,%eax 10bd84: 74 56 je 10bddc _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } the_timer->the_class = TIMER_DORMANT; 10bd86: 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; 10bd8d: c7 40 18 00 00 00 00 movl $0x0,0x18(%eax) the_watchdog->routine = routine; 10bd94: c7 40 2c 00 00 00 00 movl $0x0,0x2c(%eax) the_watchdog->id = id; 10bd9b: c7 40 30 00 00 00 00 movl $0x0,0x30(%eax) the_watchdog->user_data = user_data; 10bda2: 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; 10bda9: 8b 50 08 mov 0x8(%eax),%edx 10bdac: 0f b7 fa movzwl %dx,%edi 10bdaf: 8b 0d bc 92 12 00 mov 0x1292bc,%ecx 10bdb5: 89 04 b9 mov %eax,(%ecx,%edi,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 10bdb8: 89 58 0c mov %ebx,0xc(%eax) &_Timer_Information, &the_timer->Object, (Objects_Name) name ); *id = the_timer->Object.id; 10bdbb: 89 16 mov %edx,(%esi) _Thread_Enable_dispatch(); 10bdbd: e8 3e 1b 00 00 call 10d900 <_Thread_Enable_dispatch> 10bdc2: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; } 10bdc4: 8d 65 f4 lea -0xc(%ebp),%esp 10bdc7: 5b pop %ebx 10bdc8: 5e pop %esi 10bdc9: 5f pop %edi 10bdca: c9 leave 10bdcb: c3 ret rtems_id *id ) { Timer_Control *the_timer; if ( !rtems_is_name_valid( name ) ) 10bdcc: b8 03 00 00 00 mov $0x3,%eax ); *id = the_timer->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10bdd1: 8d 65 f4 lea -0xc(%ebp),%esp 10bdd4: 5b pop %ebx 10bdd5: 5e pop %esi 10bdd6: 5f pop %edi 10bdd7: c9 leave 10bdd8: c3 ret 10bdd9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED _Thread_Disable_dispatch(); /* to prevent deletion */ the_timer = _Timer_Allocate(); if ( !the_timer ) { _Thread_Enable_dispatch(); 10bddc: e8 1f 1b 00 00 call 10d900 <_Thread_Enable_dispatch> 10bde1: b8 05 00 00 00 mov $0x5,%eax ); *id = the_timer->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10bde6: 8d 65 f4 lea -0xc(%ebp),%esp 10bde9: 5b pop %ebx 10bdea: 5e pop %esi 10bdeb: 5f pop %edi 10bdec: c9 leave 10bded: c3 ret 10bdee: 66 90 xchg %ax,%ax <== NOT EXECUTED Timer_Control *the_timer; if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; if ( !id ) 10bdf0: b8 09 00 00 00 mov $0x9,%eax ); *id = the_timer->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10bdf5: 8d 65 f4 lea -0xc(%ebp),%esp 10bdf8: 5b pop %ebx 10bdf9: 5e pop %esi 10bdfa: 5f pop %edi 10bdfb: c9 leave 10bdfc: c3 ret 00118354 : */ rtems_status_code rtems_timer_delete( rtems_id id ) { 118354: 55 push %ebp 118355: 89 e5 mov %esp,%ebp 118357: 53 push %ebx 118358: 83 ec 18 sub $0x18,%esp RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Get ( Objects_Id id, Objects_Locations *location ) { return (Timer_Control *) 11835b: 8d 45 f4 lea -0xc(%ebp),%eax 11835e: 50 push %eax 11835f: ff 75 08 pushl 0x8(%ebp) 118362: 68 a0 25 14 00 push $0x1425a0 118367: e8 ec 28 00 00 call 11ac58 <_Objects_Get> 11836c: 89 c3 mov %eax,%ebx Timer_Control *the_timer; Objects_Locations location; the_timer = _Timer_Get( id, &location ); switch ( location ) { 11836e: 83 c4 10 add $0x10,%esp 118371: 8b 4d f4 mov -0xc(%ebp),%ecx 118374: 85 c9 test %ecx,%ecx 118376: 75 38 jne 1183b0 case OBJECTS_LOCAL: _Objects_Close( &_Timer_Information, &the_timer->Object ); 118378: 83 ec 08 sub $0x8,%esp 11837b: 50 push %eax 11837c: 68 a0 25 14 00 push $0x1425a0 118381: e8 62 24 00 00 call 11a7e8 <_Objects_Close> (void) _Watchdog_Remove( &the_timer->Ticker ); 118386: 8d 43 10 lea 0x10(%ebx),%eax 118389: 89 04 24 mov %eax,(%esp) 11838c: e8 ef 45 00 00 call 11c980 <_Watchdog_Remove> */ RTEMS_INLINE_ROUTINE void _Timer_Free ( Timer_Control *the_timer ) { _Objects_Free( &_Timer_Information, &the_timer->Object ); 118391: 58 pop %eax 118392: 5a pop %edx 118393: 53 push %ebx 118394: 68 a0 25 14 00 push $0x1425a0 118399: e8 4e 27 00 00 call 11aaec <_Objects_Free> _Timer_Free( the_timer ); _Thread_Enable_dispatch(); 11839e: e8 99 31 00 00 call 11b53c <_Thread_Enable_dispatch> 1183a3: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 1183a5: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1183a8: 8b 5d fc mov -0x4(%ebp),%ebx 1183ab: c9 leave 1183ac: c3 ret 1183ad: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED { Timer_Control *the_timer; Objects_Locations location; the_timer = _Timer_Get( id, &location ); switch ( location ) { 1183b0: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1183b5: 8b 5d fc mov -0x4(%ebp),%ebx 1183b8: c9 leave 1183b9: c3 ret 0010be00 : rtems_id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { 10be00: 55 push %ebp 10be01: 89 e5 mov %esp,%ebp 10be03: 57 push %edi 10be04: 56 push %esi 10be05: 53 push %ebx 10be06: 83 ec 2c sub $0x2c,%esp 10be09: 8b 5d 0c mov 0xc(%ebp),%ebx 10be0c: 8b 75 10 mov 0x10(%ebp),%esi Timer_Control *the_timer; Objects_Locations location; ISR_Level level; if ( ticks == 0 ) 10be0f: 85 db test %ebx,%ebx 10be11: 0f 84 99 00 00 00 je 10beb0 return RTEMS_INVALID_NUMBER; if ( !routine ) 10be17: 85 f6 test %esi,%esi 10be19: 0f 84 b1 00 00 00 je 10bed0 RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Get ( Objects_Id id, Objects_Locations *location ) { return (Timer_Control *) 10be1f: 57 push %edi 10be20: 8d 45 e4 lea -0x1c(%ebp),%eax 10be23: 50 push %eax 10be24: ff 75 08 pushl 0x8(%ebp) 10be27: 68 a0 92 12 00 push $0x1292a0 10be2c: e8 5b 12 00 00 call 10d08c <_Objects_Get> 10be31: 89 c7 mov %eax,%edi return RTEMS_INVALID_ADDRESS; the_timer = _Timer_Get( id, &location ); switch ( location ) { 10be33: 83 c4 10 add $0x10,%esp 10be36: 8b 4d e4 mov -0x1c(%ebp),%ecx 10be39: 85 c9 test %ecx,%ecx 10be3b: 74 0f je 10be4c 10be3d: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10be42: 8d 65 f4 lea -0xc(%ebp),%esp 10be45: 5b pop %ebx 10be46: 5e pop %esi 10be47: 5f pop %edi 10be48: c9 leave 10be49: c3 ret 10be4a: 66 90 xchg %ax,%ax <== NOT EXECUTED the_timer = _Timer_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 10be4c: 8d 50 10 lea 0x10(%eax),%edx 10be4f: 83 ec 0c sub $0xc,%esp 10be52: 52 push %edx 10be53: 89 55 d4 mov %edx,-0x2c(%ebp) 10be56: e8 29 2b 00 00 call 10e984 <_Watchdog_Remove> _ISR_Disable( level ); 10be5b: 9c pushf 10be5c: fa cli 10be5d: 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 ) { 10be5e: 83 c4 10 add $0x10,%esp 10be61: 8b 57 18 mov 0x18(%edi),%edx 10be64: 85 d2 test %edx,%edx 10be66: 8b 55 d4 mov -0x2c(%ebp),%edx 10be69: 75 55 jne 10bec0 /* * 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; 10be6b: c7 47 38 00 00 00 00 movl $0x0,0x38(%edi) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 10be72: c7 47 18 00 00 00 00 movl $0x0,0x18(%edi) the_watchdog->routine = routine; 10be79: 89 77 2c mov %esi,0x2c(%edi) the_watchdog->id = id; 10be7c: 8b 4d 08 mov 0x8(%ebp),%ecx 10be7f: 89 4f 30 mov %ecx,0x30(%edi) the_watchdog->user_data = user_data; 10be82: 8b 4d 14 mov 0x14(%ebp),%ecx 10be85: 89 4f 34 mov %ecx,0x34(%edi) _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); _ISR_Enable( level ); 10be88: 50 push %eax 10be89: 9d popf Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 10be8a: 89 5f 1c mov %ebx,0x1c(%edi) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 10be8d: 83 ec 08 sub $0x8,%esp 10be90: 52 push %edx 10be91: 68 98 89 12 00 push $0x128998 10be96: e8 b1 29 00 00 call 10e84c <_Watchdog_Insert> _Watchdog_Insert_ticks( &the_timer->Ticker, ticks ); _Thread_Enable_dispatch(); 10be9b: e8 60 1a 00 00 call 10d900 <_Thread_Enable_dispatch> 10bea0: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 10bea2: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10bea5: 8d 65 f4 lea -0xc(%ebp),%esp 10bea8: 5b pop %ebx 10bea9: 5e pop %esi 10beaa: 5f pop %edi 10beab: c9 leave 10beac: c3 ret 10bead: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED { Timer_Control *the_timer; Objects_Locations location; ISR_Level level; if ( ticks == 0 ) 10beb0: b8 0a 00 00 00 mov $0xa,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10beb5: 8d 65 f4 lea -0xc(%ebp),%esp 10beb8: 5b pop %ebx 10beb9: 5e pop %esi 10beba: 5f pop %edi 10bebb: c9 leave 10bebc: c3 ret 10bebd: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED * Check to see if the watchdog has just been inserted by a * higher priority interrupt. If so, abandon this insert. */ if ( the_timer->Ticker.state != WATCHDOG_INACTIVE ) { _ISR_Enable( level ); 10bec0: 50 push %eax 10bec1: 9d popf _Thread_Enable_dispatch(); 10bec2: e8 39 1a 00 00 call 10d900 <_Thread_Enable_dispatch> 10bec7: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 10bec9: e9 74 ff ff ff jmp 10be42 <== ALWAYS TAKEN 10bece: 66 90 xchg %ax,%ax <== NOT EXECUTED ISR_Level level; if ( ticks == 0 ) return RTEMS_INVALID_NUMBER; if ( !routine ) 10bed0: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10bed5: 8d 65 f4 lea -0xc(%ebp),%esp 10bed8: 5b pop %ebx 10bed9: 5e pop %esi 10beda: 5f pop %edi 10bedb: c9 leave 10bedc: c3 ret 0011849c : rtems_id id, rtems_time_of_day *wall_time, rtems_timer_service_routine_entry routine, void *user_data ) { 11849c: 55 push %ebp 11849d: 89 e5 mov %esp,%ebp 11849f: 57 push %edi 1184a0: 56 push %esi 1184a1: 53 push %ebx 1184a2: 83 ec 2c sub $0x2c,%esp 1184a5: 8b 75 08 mov 0x8(%ebp),%esi 1184a8: 8b 7d 0c mov 0xc(%ebp),%edi 1184ab: 8b 5d 10 mov 0x10(%ebp),%ebx Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; if ( !_TOD_Is_set ) 1184ae: 80 3d cc 1b 14 00 00 cmpb $0x0,0x141bcc 1184b5: 75 0d jne 1184c4 1184b7: b8 0b 00 00 00 mov $0xb,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1184bc: 8d 65 f4 lea -0xc(%ebp),%esp 1184bf: 5b pop %ebx 1184c0: 5e pop %esi 1184c1: 5f pop %edi 1184c2: c9 leave 1184c3: c3 ret rtems_interval seconds; if ( !_TOD_Is_set ) return RTEMS_NOT_DEFINED; if ( !_TOD_Validate( wall_time ) ) 1184c4: 83 ec 0c sub $0xc,%esp 1184c7: 57 push %edi 1184c8: e8 67 d4 ff ff call 115934 <_TOD_Validate> <== ALWAYS TAKEN 1184cd: 83 c4 10 add $0x10,%esp 1184d0: 84 c0 test %al,%al 1184d2: 74 1e je 1184f2 return RTEMS_INVALID_CLOCK; if ( !routine ) 1184d4: 85 db test %ebx,%ebx 1184d6: 0f 84 a4 00 00 00 je 118580 return RTEMS_INVALID_ADDRESS; seconds = _TOD_To_seconds( wall_time ); 1184dc: 83 ec 0c sub $0xc,%esp 1184df: 57 push %edi 1184e0: e8 c3 d3 ff ff call 1158a8 <_TOD_To_seconds> 1184e5: 89 c7 mov %eax,%edi if ( seconds <= _TOD_Seconds_since_epoch() ) 1184e7: 83 c4 10 add $0x10,%esp 1184ea: 3b 05 4c 1c 14 00 cmp 0x141c4c,%eax 1184f0: 77 0e ja 118500 _Watchdog_Insert_seconds( &the_timer->Ticker, seconds - _TOD_Seconds_since_epoch() ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; 1184f2: b8 14 00 00 00 mov $0x14,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1184f7: 8d 65 f4 lea -0xc(%ebp),%esp 1184fa: 5b pop %ebx 1184fb: 5e pop %esi 1184fc: 5f pop %edi 1184fd: c9 leave 1184fe: c3 ret 1184ff: 90 nop <== NOT EXECUTED 118500: 50 push %eax 118501: 8d 45 e4 lea -0x1c(%ebp),%eax 118504: 50 push %eax 118505: 56 push %esi 118506: 68 a0 25 14 00 push $0x1425a0 11850b: e8 48 27 00 00 call 11ac58 <_Objects_Get> seconds = _TOD_To_seconds( wall_time ); if ( seconds <= _TOD_Seconds_since_epoch() ) return RTEMS_INVALID_CLOCK; the_timer = _Timer_Get( id, &location ); switch ( location ) { 118510: 83 c4 10 add $0x10,%esp 118513: 8b 4d e4 mov -0x1c(%ebp),%ecx 118516: 85 c9 test %ecx,%ecx 118518: 75 5a jne 118574 case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 11851a: 8d 48 10 lea 0x10(%eax),%ecx 11851d: 83 ec 0c sub $0xc,%esp 118520: 51 push %ecx 118521: 89 45 d4 mov %eax,-0x2c(%ebp) 118524: 89 4d d0 mov %ecx,-0x30(%ebp) 118527: e8 54 44 00 00 call 11c980 <_Watchdog_Remove> the_timer->the_class = TIMER_TIME_OF_DAY; 11852c: 8b 55 d4 mov -0x2c(%ebp),%edx 11852f: c7 42 38 02 00 00 00 movl $0x2,0x38(%edx) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 118536: c7 42 18 00 00 00 00 movl $0x0,0x18(%edx) the_watchdog->routine = routine; 11853d: 89 5a 2c mov %ebx,0x2c(%edx) the_watchdog->id = id; 118540: 89 72 30 mov %esi,0x30(%edx) the_watchdog->user_data = user_data; 118543: 8b 45 14 mov 0x14(%ebp),%eax 118546: 89 42 34 mov %eax,0x34(%edx) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 118549: 2b 3d 4c 1c 14 00 sub 0x141c4c,%edi 11854f: 89 7a 1c mov %edi,0x1c(%edx) _Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog ); 118552: 58 pop %eax 118553: 5a pop %edx 118554: 8b 4d d0 mov -0x30(%ebp),%ecx 118557: 51 push %ecx 118558: 68 8c 1c 14 00 push $0x141c8c 11855d: e8 e6 42 00 00 call 11c848 <_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(); 118562: e8 d5 2f 00 00 call 11b53c <_Thread_Enable_dispatch> 118567: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 118569: 83 c4 10 add $0x10,%esp 11856c: e9 4b ff ff ff jmp 1184bc <== ALWAYS TAKEN 118571: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED seconds = _TOD_To_seconds( wall_time ); if ( seconds <= _TOD_Seconds_since_epoch() ) return RTEMS_INVALID_CLOCK; the_timer = _Timer_Get( id, &location ); switch ( location ) { 118574: b8 04 00 00 00 mov $0x4,%eax 118579: e9 3e ff ff ff jmp 1184bc <== ALWAYS TAKEN 11857e: 66 90 xchg %ax,%ax <== NOT EXECUTED return RTEMS_NOT_DEFINED; if ( !_TOD_Validate( wall_time ) ) return RTEMS_INVALID_CLOCK; if ( !routine ) 118580: b8 09 00 00 00 mov $0x9,%eax 118585: e9 32 ff ff ff jmp 1184bc <== ALWAYS TAKEN 0011858c : rtems_status_code rtems_timer_get_information( rtems_id id, rtems_timer_information *the_info ) { 11858c: 55 push %ebp 11858d: 89 e5 mov %esp,%ebp 11858f: 53 push %ebx 118590: 83 ec 14 sub $0x14,%esp 118593: 8b 5d 0c mov 0xc(%ebp),%ebx Timer_Control *the_timer; Objects_Locations location; if ( !the_info ) 118596: 85 db test %ebx,%ebx 118598: 74 4a je 1185e4 11859a: 51 push %ecx 11859b: 8d 45 f4 lea -0xc(%ebp),%eax 11859e: 50 push %eax 11859f: ff 75 08 pushl 0x8(%ebp) 1185a2: 68 a0 25 14 00 push $0x1425a0 1185a7: e8 ac 26 00 00 call 11ac58 <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_timer = _Timer_Get( id, &location ); switch ( location ) { 1185ac: 83 c4 10 add $0x10,%esp 1185af: 8b 55 f4 mov -0xc(%ebp),%edx 1185b2: 85 d2 test %edx,%edx 1185b4: 74 0a je 1185c0 1185b6: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1185bb: 8b 5d fc mov -0x4(%ebp),%ebx 1185be: c9 leave 1185bf: c3 ret the_timer = _Timer_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: the_info->the_class = the_timer->the_class; 1185c0: 8b 50 38 mov 0x38(%eax),%edx 1185c3: 89 13 mov %edx,(%ebx) the_info->initial = the_timer->Ticker.initial; 1185c5: 8b 50 1c mov 0x1c(%eax),%edx 1185c8: 89 53 04 mov %edx,0x4(%ebx) the_info->start_time = the_timer->Ticker.start_time; 1185cb: 8b 50 24 mov 0x24(%eax),%edx 1185ce: 89 53 08 mov %edx,0x8(%ebx) the_info->stop_time = the_timer->Ticker.stop_time; 1185d1: 8b 40 28 mov 0x28(%eax),%eax 1185d4: 89 43 0c mov %eax,0xc(%ebx) _Thread_Enable_dispatch(); 1185d7: e8 60 2f 00 00 call 11b53c <_Thread_Enable_dispatch> 1185dc: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1185de: 8b 5d fc mov -0x4(%ebp),%ebx 1185e1: c9 leave 1185e2: c3 ret 1185e3: 90 nop <== NOT EXECUTED ) { Timer_Control *the_timer; Objects_Locations location; if ( !the_info ) 1185e4: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1185e9: 8b 5d fc mov -0x4(%ebp),%ebx 1185ec: c9 leave 1185ed: c3 ret 0011889c : rtems_status_code rtems_timer_initiate_server( uint32_t priority, uint32_t stack_size, rtems_attribute attribute_set ) { 11889c: 55 push %ebp 11889d: 89 e5 mov %esp,%ebp 11889f: 56 push %esi 1188a0: 53 push %ebx 1188a1: 83 ec 10 sub $0x10,%esp 1188a4: 8b 45 08 mov 0x8(%ebp),%eax 1188a7: 85 c0 test %eax,%eax 1188a9: 75 0d jne 1188b8 if (status) { initialized = false; } #endif return status; 1188ab: b8 13 00 00 00 mov $0x13,%eax } 1188b0: 8d 65 f8 lea -0x8(%ebp),%esp 1188b3: 5b pop %ebx 1188b4: 5e pop %esi 1188b5: c9 leave 1188b6: c3 ret 1188b7: 90 nop <== NOT EXECUTED 1188b8: 0f b6 15 d4 95 13 00 movzbl 0x1395d4,%edx 1188bf: 39 d0 cmp %edx,%eax 1188c1: 76 35 jbe 1188f8 * structured so we check it is invalid before looking for * a specific invalid value as the default. */ _priority = priority; if ( !_RTEMS_tasks_Priority_is_valid( priority ) ) { if ( priority != RTEMS_TIMER_SERVER_DEFAULT_PRIORITY ) 1188c3: 40 inc %eax 1188c4: 75 e5 jne 1188ab 1188c6: 31 f6 xor %esi,%esi 1188c8: 8b 15 b8 1b 14 00 mov 0x141bb8,%edx 1188ce: 42 inc %edx 1188cf: 89 15 b8 1b 14 00 mov %edx,0x141bb8 /* * Just to make sure this is only called once. */ _Thread_Disable_dispatch(); tmpInitialized = initialized; 1188d5: 8a 1d 20 d4 13 00 mov 0x13d420,%bl initialized = true; 1188db: c6 05 20 d4 13 00 01 movb $0x1,0x13d420 _Thread_Enable_dispatch(); 1188e2: e8 55 2c 00 00 call 11b53c <_Thread_Enable_dispatch> if ( tmpInitialized ) 1188e7: 84 db test %bl,%bl 1188e9: 74 11 je 1188fc 1188eb: b8 0e 00 00 00 mov $0xe,%eax initialized = false; } #endif return status; } 1188f0: 8d 65 f8 lea -0x8(%ebp),%esp 1188f3: 5b pop %ebx 1188f4: 5e pop %esi 1188f5: c9 leave 1188f6: c3 ret 1188f7: 90 nop <== NOT EXECUTED 1188f8: 89 c6 mov %eax,%esi 1188fa: eb cc jmp 1188c8 <== ALWAYS TAKEN * 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( 1188fc: 83 ec 08 sub $0x8,%esp 1188ff: 8d 45 f4 lea -0xc(%ebp),%eax 118902: 50 push %eax 118903: 8b 45 10 mov 0x10(%ebp),%eax 118906: 80 cc 80 or $0x80,%ah 118909: 50 push %eax 11890a: 68 00 01 00 00 push $0x100 11890f: ff 75 0c pushl 0xc(%ebp) 118912: 56 push %esi 118913: 68 45 4d 49 54 push $0x54494d45 118918: e8 87 f0 ff ff call 1179a4 <== 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) { 11891d: 83 c4 20 add $0x20,%esp 118920: 85 c0 test %eax,%eax 118922: 74 10 je 118934 initialized = false; 118924: c6 05 20 d4 13 00 00 movb $0x0,0x13d420 initialized = false; } #endif return status; } 11892b: 8d 65 f8 lea -0x8(%ebp),%esp 11892e: 5b pop %ebx 11892f: 5e pop %esi 118930: c9 leave 118931: c3 ret 118932: 66 90 xchg %ax,%ax <== NOT EXECUTED * We work with the TCB pointer, not the ID, so we need to convert * to a TCB pointer from here out. */ ts->thread = (Thread_Control *)_Objects_Get_local_object( &_RTEMS_tasks_Information, _Objects_Get_index(id) 118934: 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( 118937: 0f b7 c8 movzwl %ax,%ecx 11893a: 8b 15 5c 1b 14 00 mov 0x141b5c,%edx 118940: 8b 14 8a mov (%edx,%ecx,4),%edx 118943: 89 15 40 d4 13 00 mov %edx,0x13d440 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 118949: c7 05 70 d4 13 00 74 movl $0x13d474,0x13d470 118950: d4 13 00 the_chain->permanent_null = NULL; 118953: c7 05 74 d4 13 00 00 movl $0x0,0x13d474 11895a: 00 00 00 the_chain->last = _Chain_Head(the_chain); 11895d: c7 05 78 d4 13 00 70 movl $0x13d470,0x13d478 118964: d4 13 00 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 118967: c7 05 a8 d4 13 00 ac movl $0x13d4ac,0x13d4a8 11896e: d4 13 00 the_chain->permanent_null = NULL; 118971: c7 05 ac d4 13 00 00 movl $0x0,0x13d4ac 118978: 00 00 00 the_chain->last = _Chain_Head(the_chain); 11897b: c7 05 b0 d4 13 00 a8 movl $0x13d4a8,0x13d4b0 118982: d4 13 00 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 118985: c7 05 50 d4 13 00 00 movl $0x0,0x13d450 11898c: 00 00 00 the_watchdog->routine = routine; 11898f: c7 05 64 d4 13 00 a4 movl $0x11b3a4,0x13d464 118996: b3 11 00 the_watchdog->id = id; 118999: a3 68 d4 13 00 mov %eax,0x13d468 the_watchdog->user_data = user_data; 11899e: c7 05 6c d4 13 00 00 movl $0x0,0x13d46c 1189a5: 00 00 00 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 1189a8: c7 05 88 d4 13 00 00 movl $0x0,0x13d488 1189af: 00 00 00 the_watchdog->routine = routine; 1189b2: c7 05 9c d4 13 00 a4 movl $0x11b3a4,0x13d49c 1189b9: b3 11 00 the_watchdog->id = id; 1189bc: a3 a0 d4 13 00 mov %eax,0x13d4a0 the_watchdog->user_data = user_data; 1189c1: c7 05 a4 d4 13 00 00 movl $0x0,0x13d4a4 1189c8: 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; 1189cb: c7 05 44 d4 13 00 70 movl $0x118c70,0x13d444 1189d2: 8c 11 00 ts->Interval_watchdogs.last_snapshot = _Watchdog_Ticks_since_boot; 1189d5: 8b 15 24 1d 14 00 mov 0x141d24,%edx 1189db: 89 15 7c d4 13 00 mov %edx,0x13d47c ts->TOD_watchdogs.last_snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); 1189e1: 8b 15 4c 1c 14 00 mov 0x141c4c,%edx 1189e7: 89 15 b4 d4 13 00 mov %edx,0x13d4b4 ts->insert_chain = NULL; 1189ed: c7 05 b8 d4 13 00 00 movl $0x0,0x13d4b8 1189f4: 00 00 00 ts->active = false; 1189f7: c6 05 bc d4 13 00 00 movb $0x0,0x13d4bc /* * The default timer server is now available. */ _Timer_server = ts; 1189fe: c7 05 e0 25 14 00 40 movl $0x13d440,0x1425e0 118a05: d4 13 00 /* * Start the timer server */ status = rtems_task_start( 118a08: 52 push %edx 118a09: 68 40 d4 13 00 push $0x13d440 118a0e: 68 c4 8a 11 00 push $0x118ac4 118a13: 50 push %eax 118a14: e8 23 f6 ff ff call 11803c <== ALWAYS TAKEN if (status) { initialized = false; } #endif return status; 118a19: 83 c4 10 add $0x10,%esp 118a1c: e9 8f fe ff ff jmp 1188b0 <== ALWAYS TAKEN 00118614 : */ rtems_status_code rtems_timer_reset( rtems_id id ) { 118614: 55 push %ebp 118615: 89 e5 mov %esp,%ebp 118617: 56 push %esi 118618: 53 push %ebx 118619: 83 ec 24 sub $0x24,%esp 11861c: 8d 45 f4 lea -0xc(%ebp),%eax 11861f: 50 push %eax 118620: ff 75 08 pushl 0x8(%ebp) 118623: 68 a0 25 14 00 push $0x1425a0 118628: e8 2b 26 00 00 call 11ac58 <_Objects_Get> 11862d: 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 ) { 11862f: 83 c4 10 add $0x10,%esp 118632: 8b 45 f4 mov -0xc(%ebp),%eax 118635: 85 c0 test %eax,%eax 118637: 74 0f je 118648 118639: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11863e: 8d 65 f8 lea -0x8(%ebp),%esp 118641: 5b pop %ebx 118642: 5e pop %esi 118643: c9 leave 118644: c3 ret 118645: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED the_timer = _Timer_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( the_timer->the_class == TIMER_INTERVAL ) { 118648: 8b 43 38 mov 0x38(%ebx),%eax 11864b: 85 c0 test %eax,%eax 11864d: 74 1d je 11866c _Watchdog_Remove( &the_timer->Ticker ); _Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker ); } else if ( the_timer->the_class == TIMER_INTERVAL_ON_TASK ) { 11864f: 48 dec %eax 118650: 74 3a je 11868c 118652: b8 0b 00 00 00 mov $0xb,%eax * 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(); 118657: 89 45 e4 mov %eax,-0x1c(%ebp) 11865a: e8 dd 2e 00 00 call 11b53c <_Thread_Enable_dispatch> 11865f: 8b 45 e4 mov -0x1c(%ebp),%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 118662: 8d 65 f8 lea -0x8(%ebp),%esp 118665: 5b pop %ebx 118666: 5e pop %esi 118667: c9 leave 118668: c3 ret 118669: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED the_timer = _Timer_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( the_timer->the_class == TIMER_INTERVAL ) { _Watchdog_Remove( &the_timer->Ticker ); 11866c: 83 c3 10 add $0x10,%ebx 11866f: 83 ec 0c sub $0xc,%esp 118672: 53 push %ebx 118673: e8 08 43 00 00 call 11c980 <_Watchdog_Remove> _Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker ); 118678: 59 pop %ecx 118679: 5e pop %esi 11867a: 53 push %ebx 11867b: 68 98 1c 14 00 push $0x141c98 118680: e8 c3 41 00 00 call 11c848 <_Watchdog_Insert> 118685: 31 c0 xor %eax,%eax 118687: 83 c4 10 add $0x10,%esp 11868a: eb cb jmp 118657 <== ALWAYS TAKEN } else if ( the_timer->the_class == TIMER_INTERVAL_ON_TASK ) { Timer_server_Control *timer_server = _Timer_server; 11868c: 8b 35 e0 25 14 00 mov 0x1425e0,%esi if ( !timer_server ) { _Thread_Enable_dispatch(); return RTEMS_INCORRECT_STATE; } #endif _Watchdog_Remove( &the_timer->Ticker ); 118692: 83 ec 0c sub $0xc,%esp 118695: 8d 43 10 lea 0x10(%ebx),%eax 118698: 50 push %eax 118699: e8 e2 42 00 00 call 11c980 <_Watchdog_Remove> (*timer_server->schedule_operation)( timer_server, the_timer ); 11869e: 58 pop %eax 11869f: 5a pop %edx 1186a0: 53 push %ebx 1186a1: 56 push %esi 1186a2: ff 56 04 call *0x4(%esi) 1186a5: 31 c0 xor %eax,%eax 1186a7: 83 c4 10 add $0x10,%esp 1186aa: eb ab jmp 118657 <== ALWAYS TAKEN 001186ac : rtems_id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { 1186ac: 55 push %ebp 1186ad: 89 e5 mov %esp,%ebp 1186af: 57 push %edi 1186b0: 56 push %esi 1186b1: 53 push %ebx 1186b2: 83 ec 2c sub $0x2c,%esp 1186b5: 8b 7d 0c mov 0xc(%ebp),%edi 1186b8: 8b 75 10 mov 0x10(%ebp),%esi Timer_Control *the_timer; Objects_Locations location; ISR_Level level; Timer_server_Control *timer_server = _Timer_server; 1186bb: 8b 1d e0 25 14 00 mov 0x1425e0,%ebx if ( !timer_server ) 1186c1: 85 db test %ebx,%ebx 1186c3: 0f 84 9f 00 00 00 je 118768 return RTEMS_INCORRECT_STATE; if ( !routine ) 1186c9: 85 f6 test %esi,%esi 1186cb: 0f 84 a3 00 00 00 je 118774 return RTEMS_INVALID_ADDRESS; if ( ticks == 0 ) 1186d1: 85 ff test %edi,%edi 1186d3: 75 0f jne 1186e4 1186d5: b8 0a 00 00 00 mov $0xa,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1186da: 8d 65 f4 lea -0xc(%ebp),%esp 1186dd: 5b pop %ebx 1186de: 5e pop %esi 1186df: 5f pop %edi 1186e0: c9 leave 1186e1: c3 ret 1186e2: 66 90 xchg %ax,%ax <== NOT EXECUTED 1186e4: 52 push %edx 1186e5: 8d 45 e4 lea -0x1c(%ebp),%eax 1186e8: 50 push %eax 1186e9: ff 75 08 pushl 0x8(%ebp) 1186ec: 68 a0 25 14 00 push $0x1425a0 1186f1: e8 62 25 00 00 call 11ac58 <_Objects_Get> 1186f6: 89 c2 mov %eax,%edx if ( ticks == 0 ) return RTEMS_INVALID_NUMBER; the_timer = _Timer_Get( id, &location ); switch ( location ) { 1186f8: 83 c4 10 add $0x10,%esp 1186fb: 8b 45 e4 mov -0x1c(%ebp),%eax 1186fe: 85 c0 test %eax,%eax 118700: 75 56 jne 118758 case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 118702: 83 ec 0c sub $0xc,%esp 118705: 8d 42 10 lea 0x10(%edx),%eax 118708: 50 push %eax 118709: 89 55 d4 mov %edx,-0x2c(%ebp) 11870c: e8 6f 42 00 00 call 11c980 <_Watchdog_Remove> _ISR_Disable( level ); 118711: 9c pushf 118712: fa cli 118713: 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 ) { 118714: 83 c4 10 add $0x10,%esp 118717: 8b 55 d4 mov -0x2c(%ebp),%edx 11871a: 8b 4a 18 mov 0x18(%edx),%ecx 11871d: 85 c9 test %ecx,%ecx 11871f: 75 5f jne 118780 /* * 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; 118721: c7 42 38 01 00 00 00 movl $0x1,0x38(%edx) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 118728: c7 42 18 00 00 00 00 movl $0x0,0x18(%edx) the_watchdog->routine = routine; 11872f: 89 72 2c mov %esi,0x2c(%edx) the_watchdog->id = id; 118732: 8b 4d 08 mov 0x8(%ebp),%ecx 118735: 89 4a 30 mov %ecx,0x30(%edx) the_watchdog->user_data = user_data; 118738: 8b 4d 14 mov 0x14(%ebp),%ecx 11873b: 89 4a 34 mov %ecx,0x34(%edx) _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); the_timer->Ticker.initial = ticks; 11873e: 89 7a 1c mov %edi,0x1c(%edx) _ISR_Enable( level ); 118741: 50 push %eax 118742: 9d popf (*timer_server->schedule_operation)( timer_server, the_timer ); 118743: 83 ec 08 sub $0x8,%esp 118746: 52 push %edx 118747: 53 push %ebx 118748: ff 53 04 call *0x4(%ebx) _Thread_Enable_dispatch(); 11874b: e8 ec 2d 00 00 call 11b53c <_Thread_Enable_dispatch> 118750: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 118752: 83 c4 10 add $0x10,%esp 118755: eb 83 jmp 1186da <== ALWAYS TAKEN 118757: 90 nop <== NOT EXECUTED if ( ticks == 0 ) return RTEMS_INVALID_NUMBER; the_timer = _Timer_Get( id, &location ); switch ( location ) { 118758: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11875d: 8d 65 f4 lea -0xc(%ebp),%esp 118760: 5b pop %ebx 118761: 5e pop %esi 118762: 5f pop %edi 118763: c9 leave 118764: c3 ret 118765: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED Timer_Control *the_timer; Objects_Locations location; ISR_Level level; Timer_server_Control *timer_server = _Timer_server; if ( !timer_server ) 118768: b8 0e 00 00 00 mov $0xe,%eax 11876d: e9 68 ff ff ff jmp 1186da <== ALWAYS TAKEN 118772: 66 90 xchg %ax,%ax <== NOT EXECUTED return RTEMS_INCORRECT_STATE; if ( !routine ) 118774: b8 09 00 00 00 mov $0x9,%eax 118779: e9 5c ff ff ff jmp 1186da <== ALWAYS TAKEN 11877e: 66 90 xchg %ax,%ax <== NOT EXECUTED * Check to see if the watchdog has just been inserted by a * higher priority interrupt. If so, abandon this insert. */ if ( the_timer->Ticker.state != WATCHDOG_INACTIVE ) { _ISR_Enable( level ); 118780: 50 push %eax 118781: 9d popf _Thread_Enable_dispatch(); 118782: e8 b5 2d 00 00 call 11b53c <_Thread_Enable_dispatch> 118787: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 118789: e9 4c ff ff ff jmp 1186da <== ALWAYS TAKEN 00118790 : rtems_id id, rtems_time_of_day *wall_time, rtems_timer_service_routine_entry routine, void *user_data ) { 118790: 55 push %ebp 118791: 89 e5 mov %esp,%ebp 118793: 57 push %edi 118794: 56 push %esi 118795: 53 push %ebx 118796: 83 ec 2c sub $0x2c,%esp 118799: 8b 7d 0c mov 0xc(%ebp),%edi 11879c: 8b 75 10 mov 0x10(%ebp),%esi Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; Timer_server_Control *timer_server = _Timer_server; 11879f: 8b 1d e0 25 14 00 mov 0x1425e0,%ebx if ( !timer_server ) 1187a5: 85 db test %ebx,%ebx 1187a7: 0f 84 d7 00 00 00 je 118884 return RTEMS_INCORRECT_STATE; if ( !_TOD_Is_set ) 1187ad: 80 3d cc 1b 14 00 00 cmpb $0x0,0x141bcc 1187b4: 0f 84 aa 00 00 00 je 118864 <== ALWAYS TAKEN return RTEMS_NOT_DEFINED; if ( !routine ) 1187ba: 85 f6 test %esi,%esi 1187bc: 0f 84 b2 00 00 00 je 118874 return RTEMS_INVALID_ADDRESS; if ( !_TOD_Validate( wall_time ) ) 1187c2: 83 ec 0c sub $0xc,%esp 1187c5: 57 push %edi 1187c6: e8 69 d1 ff ff call 115934 <_TOD_Validate> 1187cb: 83 c4 10 add $0x10,%esp 1187ce: 84 c0 test %al,%al 1187d0: 75 0e jne 1187e0 the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch(); (*timer_server->schedule_operation)( timer_server, the_timer ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; 1187d2: b8 14 00 00 00 mov $0x14,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1187d7: 8d 65 f4 lea -0xc(%ebp),%esp 1187da: 5b pop %ebx 1187db: 5e pop %esi 1187dc: 5f pop %edi 1187dd: c9 leave 1187de: c3 ret 1187df: 90 nop <== NOT EXECUTED return RTEMS_INVALID_ADDRESS; if ( !_TOD_Validate( wall_time ) ) return RTEMS_INVALID_CLOCK; seconds = _TOD_To_seconds( wall_time ); 1187e0: 83 ec 0c sub $0xc,%esp 1187e3: 57 push %edi 1187e4: e8 bf d0 ff ff call 1158a8 <_TOD_To_seconds> 1187e9: 89 c7 mov %eax,%edi if ( seconds <= _TOD_Seconds_since_epoch() ) 1187eb: 83 c4 10 add $0x10,%esp 1187ee: 3b 05 4c 1c 14 00 cmp 0x141c4c,%eax 1187f4: 76 dc jbe 1187d2 1187f6: 52 push %edx 1187f7: 8d 45 e4 lea -0x1c(%ebp),%eax 1187fa: 50 push %eax 1187fb: ff 75 08 pushl 0x8(%ebp) 1187fe: 68 a0 25 14 00 push $0x1425a0 118803: e8 50 24 00 00 call 11ac58 <_Objects_Get> 118808: 89 c2 mov %eax,%edx return RTEMS_INVALID_CLOCK; the_timer = _Timer_Get( id, &location ); switch ( location ) { 11880a: 83 c4 10 add $0x10,%esp 11880d: 8b 45 e4 mov -0x1c(%ebp),%eax 118810: 85 c0 test %eax,%eax 118812: 75 7c jne 118890 case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 118814: 83 ec 0c sub $0xc,%esp 118817: 8d 42 10 lea 0x10(%edx),%eax 11881a: 50 push %eax 11881b: 89 55 d4 mov %edx,-0x2c(%ebp) 11881e: e8 5d 41 00 00 call 11c980 <_Watchdog_Remove> the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK; 118823: 8b 55 d4 mov -0x2c(%ebp),%edx 118826: c7 42 38 03 00 00 00 movl $0x3,0x38(%edx) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 11882d: c7 42 18 00 00 00 00 movl $0x0,0x18(%edx) the_watchdog->routine = routine; 118834: 89 72 2c mov %esi,0x2c(%edx) the_watchdog->id = id; 118837: 8b 45 08 mov 0x8(%ebp),%eax 11883a: 89 42 30 mov %eax,0x30(%edx) the_watchdog->user_data = user_data; 11883d: 8b 45 14 mov 0x14(%ebp),%eax 118840: 89 42 34 mov %eax,0x34(%edx) _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch(); 118843: 2b 3d 4c 1c 14 00 sub 0x141c4c,%edi 118849: 89 7a 1c mov %edi,0x1c(%edx) (*timer_server->schedule_operation)( timer_server, the_timer ); 11884c: 58 pop %eax 11884d: 59 pop %ecx 11884e: 52 push %edx 11884f: 53 push %ebx 118850: ff 53 04 call *0x4(%ebx) _Thread_Enable_dispatch(); 118853: e8 e4 2c 00 00 call 11b53c <_Thread_Enable_dispatch> 118858: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 11885a: 83 c4 10 add $0x10,%esp 11885d: e9 75 ff ff ff jmp 1187d7 <== ALWAYS TAKEN 118862: 66 90 xchg %ax,%ax <== NOT EXECUTED Timer_server_Control *timer_server = _Timer_server; if ( !timer_server ) return RTEMS_INCORRECT_STATE; if ( !_TOD_Is_set ) 118864: b8 0b 00 00 00 mov $0xb,%eax <== NOT EXECUTED case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 118869: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 11886c: 5b pop %ebx <== NOT EXECUTED 11886d: 5e pop %esi <== NOT EXECUTED 11886e: 5f pop %edi <== NOT EXECUTED 11886f: c9 leave <== NOT EXECUTED 118870: c3 ret <== NOT EXECUTED 118871: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED return RTEMS_INCORRECT_STATE; if ( !_TOD_Is_set ) return RTEMS_NOT_DEFINED; if ( !routine ) 118874: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 118879: 8d 65 f4 lea -0xc(%ebp),%esp 11887c: 5b pop %ebx 11887d: 5e pop %esi 11887e: 5f pop %edi 11887f: c9 leave 118880: c3 ret 118881: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; Timer_server_Control *timer_server = _Timer_server; if ( !timer_server ) 118884: b8 0e 00 00 00 mov $0xe,%eax 118889: e9 49 ff ff ff jmp 1187d7 <== ALWAYS TAKEN 11888e: 66 90 xchg %ax,%ax <== NOT EXECUTED seconds = _TOD_To_seconds( wall_time ); if ( seconds <= _TOD_Seconds_since_epoch() ) return RTEMS_INVALID_CLOCK; the_timer = _Timer_Get( id, &location ); switch ( location ) { 118890: b8 04 00 00 00 mov $0x4,%eax 118895: e9 3d ff ff ff jmp 1187d7 <== ALWAYS TAKEN 0010cb40 : static int rtems_verror( rtems_error_code_t error_flag, const char *printf_format, va_list arglist ) { 10cb40: 55 push %ebp <== NOT EXECUTED 10cb41: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10cb43: 57 push %edi <== NOT EXECUTED 10cb44: 56 push %esi <== NOT EXECUTED 10cb45: 53 push %ebx <== NOT EXECUTED 10cb46: 83 ec 1c sub $0x1c,%esp <== NOT EXECUTED 10cb49: 89 c3 mov %eax,%ebx <== NOT EXECUTED 10cb4b: 89 d6 mov %edx,%esi <== NOT EXECUTED int local_errno = 0; int chars_written = 0; rtems_status_code status; if (error_flag & RTEMS_ERROR_PANIC) 10cb4d: 25 00 00 00 20 and $0x20000000,%eax <== NOT EXECUTED 10cb52: 89 45 e0 mov %eax,-0x20(%ebp) <== NOT EXECUTED 10cb55: 74 2b je 10cb82 <== NOT EXECUTED { if (rtems_panic_in_progress++) 10cb57: 8b 15 c0 f6 12 00 mov 0x12f6c0,%edx <== NOT EXECUTED 10cb5d: 8d 42 01 lea 0x1(%edx),%eax <== NOT EXECUTED 10cb60: a3 c0 f6 12 00 mov %eax,0x12f6c0 <== NOT EXECUTED 10cb65: 85 d2 test %edx,%edx <== NOT EXECUTED 10cb67: 74 10 je 10cb79 <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10cb69: a1 58 f8 12 00 mov 0x12f858,%eax <== NOT EXECUTED 10cb6e: 40 inc %eax <== NOT EXECUTED 10cb6f: a3 58 f8 12 00 mov %eax,0x12f858 <== NOT EXECUTED RTEMS_COMPILER_MEMORY_BARRIER(); 10cb74: a1 c0 f6 12 00 mov 0x12f6c0,%eax <== NOT EXECUTED _Thread_Disable_dispatch(); /* disable task switches */ /* don't aggravate things */ if (rtems_panic_in_progress > 2) 10cb79: 83 f8 02 cmp $0x2,%eax <== NOT EXECUTED 10cb7c: 0f 8f e6 00 00 00 jg 10cc68 <== NOT EXECUTED return 0; } (void) fflush(stdout); /* in case stdout/stderr same */ 10cb82: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10cb85: a1 80 d4 12 00 mov 0x12d480,%eax <== NOT EXECUTED 10cb8a: ff 70 08 pushl 0x8(%eax) <== NOT EXECUTED 10cb8d: 89 4d dc mov %ecx,-0x24(%ebp) <== NOT EXECUTED 10cb90: e8 13 d6 00 00 call 11a1a8 <== NOT EXECUTED status = error_flag & ~RTEMS_ERROR_MASK; 10cb95: 89 d8 mov %ebx,%eax <== NOT EXECUTED 10cb97: 25 ff ff ff 8f and $0x8fffffff,%eax <== NOT EXECUTED 10cb9c: 89 45 e4 mov %eax,-0x1c(%ebp) <== NOT EXECUTED if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */ 10cb9f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10cba2: f7 c3 00 00 00 40 test $0x40000000,%ebx <== NOT EXECUTED 10cba8: 8b 4d dc mov -0x24(%ebp),%ecx <== NOT EXECUTED 10cbab: 0f 85 d7 00 00 00 jne 10cc88 <== NOT EXECUTED 10cbb1: 31 ff xor %edi,%edi <== 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); 10cbb3: 52 push %edx <== NOT EXECUTED 10cbb4: 51 push %ecx <== NOT EXECUTED 10cbb5: 56 push %esi <== NOT EXECUTED 10cbb6: a1 80 d4 12 00 mov 0x12d480,%eax <== NOT EXECUTED 10cbbb: ff 70 0c pushl 0xc(%eax) <== NOT EXECUTED 10cbbe: e8 e9 30 01 00 call 11fcac <== NOT EXECUTED 10cbc3: 89 c6 mov %eax,%esi <== NOT EXECUTED if (status) 10cbc5: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10cbc8: 8b 45 e4 mov -0x1c(%ebp),%eax <== NOT EXECUTED 10cbcb: 85 c0 test %eax,%eax <== NOT EXECUTED 10cbcd: 0f 85 c9 00 00 00 jne 10cc9c <== NOT EXECUTED chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status)); if (local_errno) 10cbd3: 83 ff 00 cmp $0x0,%edi <== NOT EXECUTED 10cbd6: 74 30 je 10cc08 <== NOT EXECUTED { if ((local_errno > 0) && *strerror(local_errno)) 10cbd8: 7e 15 jle 10cbef <== NOT EXECUTED 10cbda: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10cbdd: 57 push %edi <== NOT EXECUTED 10cbde: e8 81 e0 00 00 call 11ac64 <== NOT EXECUTED 10cbe3: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10cbe6: 80 38 00 cmpb $0x0,(%eax) <== NOT EXECUTED 10cbe9: 0f 85 d9 00 00 00 jne 10ccc8 <== NOT EXECUTED chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno)); else chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno); 10cbef: 51 push %ecx <== NOT EXECUTED 10cbf0: 57 push %edi <== NOT EXECUTED 10cbf1: 68 29 7f 12 00 push $0x127f29 <== NOT EXECUTED 10cbf6: a1 80 d4 12 00 mov 0x12d480,%eax <== NOT EXECUTED 10cbfb: ff 70 0c pushl 0xc(%eax) <== NOT EXECUTED 10cbfe: e8 ed d8 00 00 call 11a4f0 <== NOT EXECUTED 10cc03: 01 c6 add %eax,%esi <== NOT EXECUTED 10cc05: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } chars_written += fprintf(stderr, "\n"); 10cc08: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 10cc0b: 68 6b 72 12 00 push $0x12726b <== NOT EXECUTED 10cc10: a1 80 d4 12 00 mov 0x12d480,%eax <== NOT EXECUTED 10cc15: ff 70 0c pushl 0xc(%eax) <== NOT EXECUTED 10cc18: e8 d3 d8 00 00 call 11a4f0 <== NOT EXECUTED 10cc1d: 89 45 e4 mov %eax,-0x1c(%ebp) <== NOT EXECUTED (void) fflush(stderr); 10cc20: 5a pop %edx <== NOT EXECUTED 10cc21: a1 80 d4 12 00 mov 0x12d480,%eax <== NOT EXECUTED 10cc26: ff 70 0c pushl 0xc(%eax) <== NOT EXECUTED 10cc29: e8 7a d5 00 00 call 11a1a8 <== NOT EXECUTED if (error_flag & (RTEMS_ERROR_PANIC | RTEMS_ERROR_ABORT)) 10cc2e: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10cc31: 81 e3 00 00 00 30 and $0x30000000,%ebx <== NOT EXECUTED 10cc37: 74 1f je 10cc58 <== NOT EXECUTED { if (error_flag & RTEMS_ERROR_PANIC) 10cc39: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED 10cc3c: 85 c0 test %eax,%eax <== NOT EXECUTED 10cc3e: 74 34 je 10cc74 <== NOT EXECUTED { rtems_error(0, "fatal error, exiting"); 10cc40: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 10cc43: 68 3d 7f 12 00 push $0x127f3d <== NOT EXECUTED 10cc48: 6a 00 push $0x0 <== NOT EXECUTED 10cc4a: e8 a9 00 00 00 call 10ccf8 <== NOT EXECUTED _exit(local_errno); 10cc4f: 89 3c 24 mov %edi,(%esp) <== NOT EXECUTED 10cc52: e8 d1 0a 00 00 call 10d728 <_exit> <== NOT EXECUTED 10cc57: 90 nop <== 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"); 10cc58: 8b 45 e4 mov -0x1c(%ebp),%eax <== NOT EXECUTED 10cc5b: 01 f0 add %esi,%eax <== NOT EXECUTED rtems_error(0, "fatal error, aborting"); abort(); } } return chars_written; } 10cc5d: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 10cc60: 5b pop %ebx <== NOT EXECUTED 10cc61: 5e pop %esi <== NOT EXECUTED 10cc62: 5f pop %edi <== NOT EXECUTED 10cc63: c9 leave <== NOT EXECUTED 10cc64: c3 ret <== NOT EXECUTED 10cc65: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED _exit(local_errno); } else { rtems_error(0, "fatal error, aborting"); abort(); 10cc68: 31 c0 xor %eax,%eax <== NOT EXECUTED } } return chars_written; } 10cc6a: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 10cc6d: 5b pop %ebx <== NOT EXECUTED 10cc6e: 5e pop %esi <== NOT EXECUTED 10cc6f: 5f pop %edi <== NOT EXECUTED 10cc70: c9 leave <== NOT EXECUTED 10cc71: c3 ret <== NOT EXECUTED 10cc72: 66 90 xchg %ax,%ax <== NOT EXECUTED rtems_error(0, "fatal error, exiting"); _exit(local_errno); } else { rtems_error(0, "fatal error, aborting"); 10cc74: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 10cc77: 68 52 7f 12 00 push $0x127f52 <== NOT EXECUTED 10cc7c: 6a 00 push $0x0 <== NOT EXECUTED 10cc7e: e8 75 00 00 00 call 10ccf8 <== NOT EXECUTED abort(); 10cc83: e8 98 d1 00 00 call 119e20 <== NOT EXECUTED (void) fflush(stdout); /* in case stdout/stderr same */ status = error_flag & ~RTEMS_ERROR_MASK; if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */ local_errno = errno; 10cc88: 89 4d dc mov %ecx,-0x24(%ebp) <== NOT EXECUTED 10cc8b: e8 c4 d1 00 00 call 119e54 <__errno> <== NOT EXECUTED 10cc90: 8b 38 mov (%eax),%edi <== NOT EXECUTED 10cc92: 8b 4d dc mov -0x24(%ebp),%ecx <== NOT EXECUTED 10cc95: e9 19 ff ff ff jmp 10cbb3 <== NOT EXECUTED 10cc9a: 66 90 xchg %ax,%ax <== NOT EXECUTED #endif chars_written += vfprintf(stderr, printf_format, arglist); if (status) chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status)); 10cc9c: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10cc9f: ff 75 e4 pushl -0x1c(%ebp) <== NOT EXECUTED 10cca2: e8 81 fe ff ff call 10cb28 <== NOT EXECUTED 10cca7: 83 c4 0c add $0xc,%esp <== NOT EXECUTED 10ccaa: 50 push %eax <== NOT EXECUTED 10ccab: 68 0e 7f 12 00 push $0x127f0e <== NOT EXECUTED 10ccb0: a1 80 d4 12 00 mov 0x12d480,%eax <== NOT EXECUTED 10ccb5: ff 70 0c pushl 0xc(%eax) <== NOT EXECUTED 10ccb8: e8 33 d8 00 00 call 11a4f0 <== NOT EXECUTED 10ccbd: 01 c6 add %eax,%esi <== NOT EXECUTED 10ccbf: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10ccc2: e9 0c ff ff ff jmp 10cbd3 <== NOT EXECUTED 10ccc7: 90 nop <== NOT EXECUTED if (local_errno) { if ((local_errno > 0) && *strerror(local_errno)) chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno)); 10ccc8: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10cccb: 57 push %edi <== NOT EXECUTED 10cccc: e8 93 df 00 00 call 11ac64 <== NOT EXECUTED 10ccd1: 83 c4 0c add $0xc,%esp <== NOT EXECUTED 10ccd4: 50 push %eax <== NOT EXECUTED 10ccd5: 68 1c 7f 12 00 push $0x127f1c <== NOT EXECUTED 10ccda: e9 17 ff ff ff jmp 10cbf6 <== NOT EXECUTED 0012b85c : /* * Extract an integer value from the database */ static int scanInt(FILE *fp, int *val) { 12b85c: 55 push %ebp 12b85d: 89 e5 mov %esp,%ebp 12b85f: 57 push %edi 12b860: 56 push %esi 12b861: 53 push %ebx 12b862: 83 ec 1c sub $0x1c,%esp 12b865: 89 c6 mov %eax,%esi 12b867: 89 55 e0 mov %edx,-0x20(%ebp) 12b86a: 31 ff xor %edi,%edi 12b86c: c7 45 e4 ff ff ff 7f movl $0x7fffffff,-0x1c(%ebp) 12b873: 31 db xor %ebx,%ebx unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp); 12b875: 8b 46 04 mov 0x4(%esi),%eax 12b878: 48 dec %eax 12b879: 89 46 04 mov %eax,0x4(%esi) 12b87c: 85 c0 test %eax,%eax 12b87e: 78 52 js 12b8d2 <== ALWAYS TAKEN 12b880: 8b 06 mov (%esi),%eax 12b882: 0f b6 08 movzbl (%eax),%ecx 12b885: 40 inc %eax 12b886: 89 06 mov %eax,(%esi) if (c == ':') 12b888: 83 f9 3a cmp $0x3a,%ecx 12b88b: 74 5f je 12b8ec break; if (sign == 0) { 12b88d: 85 ff test %edi,%edi 12b88f: 75 0e jne 12b89f <== ALWAYS TAKEN if (c == '-') { 12b891: 83 f9 2d cmp $0x2d,%ecx 12b894: 0f 84 8a 00 00 00 je 12b924 <== ALWAYS TAKEN sign = -1; limit++; continue; 12b89a: bf 01 00 00 00 mov $0x1,%edi } sign = 1; } if (!isdigit(c)) 12b89f: a1 48 9c 16 00 mov 0x169c48,%eax 12b8a4: f6 44 08 01 04 testb $0x4,0x1(%eax,%ecx,1) 12b8a9: 74 6d je 12b918 <== ALWAYS TAKEN return 0; d = c - '0'; if ((i > (limit / 10)) 12b8ab: b8 cd cc cc cc mov $0xcccccccd,%eax 12b8b0: f7 65 e4 mull -0x1c(%ebp) 12b8b3: c1 ea 03 shr $0x3,%edx 12b8b6: 39 d3 cmp %edx,%ebx 12b8b8: 77 5e ja 12b918 <== ALWAYS TAKEN } sign = 1; } if (!isdigit(c)) return 0; d = c - '0'; 12b8ba: 83 e9 30 sub $0x30,%ecx if ((i > (limit / 10)) 12b8bd: 39 d3 cmp %edx,%ebx 12b8bf: 74 47 je 12b908 <== ALWAYS TAKEN || ((i == (limit / 10)) && (d > (limit % 10)))) return 0; i = i * 10 + d; 12b8c1: 8d 04 9b lea (%ebx,%ebx,4),%eax 12b8c4: 8d 1c 41 lea (%ecx,%eax,2),%ebx unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp); 12b8c7: 8b 46 04 mov 0x4(%esi),%eax 12b8ca: 48 dec %eax 12b8cb: 89 46 04 mov %eax,0x4(%esi) 12b8ce: 85 c0 test %eax,%eax 12b8d0: 79 ae jns 12b880 <== NEVER TAKEN 12b8d2: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 12b8d5: 56 push %esi <== NOT EXECUTED 12b8d6: ff 35 60 9c 16 00 pushl 0x169c60 <== NOT EXECUTED 12b8dc: e8 87 b6 01 00 call 146f68 <__srget_r> <== NOT EXECUTED 12b8e1: 89 c1 mov %eax,%ecx <== NOT EXECUTED 12b8e3: 83 c4 10 add $0x10,%esp <== NOT EXECUTED if (c == ':') 12b8e6: 83 f9 3a cmp $0x3a,%ecx <== NOT EXECUTED 12b8e9: 75 a2 jne 12b88d <== NOT EXECUTED 12b8eb: 90 nop <== NOT EXECUTED if ((i > (limit / 10)) || ((i == (limit / 10)) && (d > (limit % 10)))) return 0; i = i * 10 + d; } if (sign == 0) 12b8ec: 85 ff test %edi,%edi 12b8ee: 74 28 je 12b918 <== ALWAYS TAKEN return 0; *val = i * sign; 12b8f0: 0f af df imul %edi,%ebx 12b8f3: 8b 45 e0 mov -0x20(%ebp),%eax 12b8f6: 89 18 mov %ebx,(%eax) 12b8f8: b8 01 00 00 00 mov $0x1,%eax return 1; } 12b8fd: 8d 65 f4 lea -0xc(%ebp),%esp 12b900: 5b pop %ebx 12b901: 5e pop %esi 12b902: 5f pop %edi 12b903: c9 leave 12b904: c3 ret 12b905: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED sign = 1; } if (!isdigit(c)) return 0; d = c - '0'; if ((i > (limit / 10)) 12b908: 8d 04 9b lea (%ebx,%ebx,4),%eax <== NOT EXECUTED 12b90b: d1 e0 shl %eax <== NOT EXECUTED 12b90d: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED 12b910: 29 c2 sub %eax,%edx <== NOT EXECUTED 12b912: 39 d1 cmp %edx,%ecx <== NOT EXECUTED 12b914: 76 ab jbe 12b8c1 <== NOT EXECUTED 12b916: 66 90 xchg %ax,%ax <== NOT EXECUTED i = i * 10 + d; } if (sign == 0) return 0; *val = i * sign; return 1; 12b918: 31 c0 xor %eax,%eax <== NOT EXECUTED } 12b91a: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 12b91d: 5b pop %ebx <== NOT EXECUTED 12b91e: 5e pop %esi <== NOT EXECUTED 12b91f: 5f pop %edi <== NOT EXECUTED 12b920: c9 leave <== NOT EXECUTED 12b921: c3 ret <== NOT EXECUTED 12b922: 66 90 xchg %ax,%ax <== NOT EXECUTED if (c == ':') break; if (sign == 0) { if (c == '-') { sign = -1; limit++; 12b924: ff 45 e4 incl -0x1c(%ebp) <== NOT EXECUTED 12b927: bf ff ff ff ff mov $0xffffffff,%edi <== NOT EXECUTED continue; 12b92c: e9 44 ff ff ff jmp 12b875 <== NOT EXECUTED 0012b934 : /* * Extract a string value from the database */ static int scanString(FILE *fp, char **name, char **bufp, size_t *nleft, int nlFlag) { 12b934: 55 push %ebp 12b935: 89 e5 mov %esp,%ebp 12b937: 57 push %edi 12b938: 56 push %esi 12b939: 53 push %ebx 12b93a: 83 ec 0c sub $0xc,%esp 12b93d: 89 c3 mov %eax,%ebx 12b93f: 89 ce mov %ecx,%esi 12b941: 8b 7d 08 mov 0x8(%ebp),%edi int c; *name = *bufp; 12b944: 8b 01 mov (%ecx),%eax 12b946: 89 02 mov %eax,(%edx) 12b948: eb 26 jmp 12b970 <== ALWAYS TAKEN 12b94a: 66 90 xchg %ax,%ax <== NOT EXECUTED for (;;) { c = getc(fp); 12b94c: 8b 13 mov (%ebx),%edx 12b94e: 0f b6 02 movzbl (%edx),%eax 12b951: 42 inc %edx 12b952: 89 13 mov %edx,(%ebx) if (c == ':') { 12b954: 83 f8 3a cmp $0x3a,%eax 12b957: 74 3b je 12b994 if (nlFlag) return 0; break; } if (c == '\n') { 12b959: 83 f8 0a cmp $0xa,%eax 12b95c: 74 56 je 12b9b4 if (!nlFlag) return 0; break; } if (c == EOF) 12b95e: 83 f8 ff cmp $0xffffffff,%eax 12b961: 74 59 je 12b9bc <== ALWAYS TAKEN return 0; if (*nleft < 2) 12b963: 83 3f 01 cmpl $0x1,(%edi) 12b966: 76 54 jbe 12b9bc <== ALWAYS TAKEN return 0; **bufp = c; 12b968: 8b 16 mov (%esi),%edx 12b96a: 88 02 mov %al,(%edx) ++(*bufp); 12b96c: ff 06 incl (%esi) --(*nleft); 12b96e: ff 0f decl (%edi) { int c; *name = *bufp; for (;;) { c = getc(fp); 12b970: 8b 43 04 mov 0x4(%ebx),%eax 12b973: 48 dec %eax 12b974: 89 43 04 mov %eax,0x4(%ebx) 12b977: 85 c0 test %eax,%eax 12b979: 79 d1 jns 12b94c 12b97b: 83 ec 08 sub $0x8,%esp 12b97e: 53 push %ebx 12b97f: ff 35 60 9c 16 00 pushl 0x169c60 12b985: e8 de b5 01 00 call 146f68 <__srget_r> 12b98a: 83 c4 10 add $0x10,%esp if (c == ':') { 12b98d: 83 f8 3a cmp $0x3a,%eax 12b990: 75 c7 jne 12b959 <== NEVER TAKEN 12b992: 66 90 xchg %ax,%ax <== NOT EXECUTED if (nlFlag) 12b994: 8b 55 0c mov 0xc(%ebp),%edx 12b997: 85 d2 test %edx,%edx 12b999: 75 21 jne 12b9bc <== ALWAYS TAKEN return 0; **bufp = c; ++(*bufp); --(*nleft); } **bufp = '\0'; 12b99b: 8b 06 mov (%esi),%eax 12b99d: c6 00 00 movb $0x0,(%eax) ++(*bufp); 12b9a0: ff 06 incl (%esi) --(*nleft); 12b9a2: ff 0f decl (%edi) 12b9a4: b8 01 00 00 00 mov $0x1,%eax return 1; } 12b9a9: 8d 65 f4 lea -0xc(%ebp),%esp 12b9ac: 5b pop %ebx 12b9ad: 5e pop %esi 12b9ae: 5f pop %edi 12b9af: c9 leave 12b9b0: c3 ret 12b9b1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if (nlFlag) return 0; break; } if (c == '\n') { if (!nlFlag) 12b9b4: 8b 45 0c mov 0xc(%ebp),%eax 12b9b7: 85 c0 test %eax,%eax 12b9b9: 75 e0 jne 12b99b <== NEVER TAKEN 12b9bb: 90 nop <== NOT EXECUTED --(*nleft); } **bufp = '\0'; ++(*bufp); --(*nleft); return 1; 12b9bc: 31 c0 xor %eax,%eax <== NOT EXECUTED } 12b9be: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 12b9c1: 5b pop %ebx <== NOT EXECUTED 12b9c2: 5e pop %esi <== NOT EXECUTED 12b9c3: 5f pop %edi <== NOT EXECUTED 12b9c4: c9 leave <== NOT EXECUTED 12b9c5: c3 ret <== NOT EXECUTED 0012b9c8 : FILE *fp, struct group *grp, char *buffer, size_t bufsize ) { 12b9c8: 55 push %ebp 12b9c9: 89 e5 mov %esp,%ebp 12b9cb: 57 push %edi 12b9cc: 56 push %esi 12b9cd: 53 push %ebx 12b9ce: 83 ec 34 sub $0x34,%esp 12b9d1: 89 c6 mov %eax,%esi 12b9d3: 89 d3 mov %edx,%ebx 12b9d5: 89 4d d4 mov %ecx,-0x2c(%ebp) int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 12b9d8: 8d 7d d4 lea -0x2c(%ebp),%edi 12b9db: 6a 00 push $0x0 12b9dd: 8d 45 08 lea 0x8(%ebp),%eax 12b9e0: 50 push %eax 12b9e1: 89 f9 mov %edi,%ecx 12b9e3: 89 f0 mov %esi,%eax 12b9e5: e8 4a ff ff ff call 12b934 <== ALWAYS TAKEN 12b9ea: 83 c4 10 add $0x10,%esp 12b9ed: 85 c0 test %eax,%eax 12b9ef: 75 0b jne 12b9fc <== NEVER TAKEN *cp = '\0'; grp->gr_mem[memcount++] = cp + 1; } } grp->gr_mem[memcount] = NULL; return 1; 12b9f1: 31 c0 xor %eax,%eax <== NOT EXECUTED } 12b9f3: 8d 65 f4 lea -0xc(%ebp),%esp 12b9f6: 5b pop %ebx 12b9f7: 5e pop %esi 12b9f8: 5f pop %edi 12b9f9: c9 leave 12b9fa: c3 ret 12b9fb: 90 nop <== NOT EXECUTED int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) || !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0) 12b9fc: 83 ec 08 sub $0x8,%esp 12b9ff: 8d 53 04 lea 0x4(%ebx),%edx 12ba02: 6a 00 push $0x0 12ba04: 8d 45 08 lea 0x8(%ebp),%eax 12ba07: 50 push %eax 12ba08: 89 f9 mov %edi,%ecx 12ba0a: 89 f0 mov %esi,%eax 12ba0c: e8 23 ff ff ff call 12b934 <== ALWAYS TAKEN { int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 12ba11: 83 c4 10 add $0x10,%esp 12ba14: 85 c0 test %eax,%eax 12ba16: 74 d9 je 12b9f1 <== ALWAYS TAKEN || !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &grgid) 12ba18: 8d 55 e4 lea -0x1c(%ebp),%edx 12ba1b: 89 f0 mov %esi,%eax 12ba1d: e8 3a fe ff ff call 12b85c <== ALWAYS TAKEN { int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 12ba22: 85 c0 test %eax,%eax 12ba24: 74 cb je 12b9f1 <== ALWAYS TAKEN || !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &grgid) || !scanString(fp, &grmem, &buffer, &bufsize, 1)) 12ba26: 83 ec 08 sub $0x8,%esp 12ba29: 8d 55 e0 lea -0x20(%ebp),%edx 12ba2c: 6a 01 push $0x1 12ba2e: 8d 45 08 lea 0x8(%ebp),%eax 12ba31: 50 push %eax 12ba32: 89 f9 mov %edi,%ecx 12ba34: 89 f0 mov %esi,%eax 12ba36: e8 f9 fe ff ff call 12b934 <== ALWAYS TAKEN { int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 12ba3b: 83 c4 10 add $0x10,%esp 12ba3e: 85 c0 test %eax,%eax 12ba40: 74 af je 12b9f1 <== 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; 12ba42: 8b 45 e4 mov -0x1c(%ebp),%eax 12ba45: 66 89 43 08 mov %ax,0x8(%ebx) /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 12ba49: 8b 75 e0 mov -0x20(%ebp),%esi 12ba4c: 8a 06 mov (%esi),%al 12ba4e: 84 c0 test %al,%al 12ba50: 74 7d je 12bacf <== ALWAYS TAKEN 12ba52: 89 f2 mov %esi,%edx 12ba54: b9 01 00 00 00 mov $0x1,%ecx 12ba59: eb 08 jmp 12ba63 <== ALWAYS TAKEN 12ba5b: 90 nop <== NOT EXECUTED 12ba5c: 42 inc %edx 12ba5d: 8a 02 mov (%edx),%al 12ba5f: 84 c0 test %al,%al 12ba61: 74 09 je 12ba6c if(*cp == ',') 12ba63: 3c 2c cmp $0x2c,%al 12ba65: 75 f5 jne 12ba5c <== NEVER TAKEN memcount++; 12ba67: 41 inc %ecx <== NOT EXECUTED 12ba68: eb f2 jmp 12ba5c <== NOT EXECUTED 12ba6a: 66 90 xchg %ax,%ax <== NOT EXECUTED grp->gr_gid = grgid; /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 12ba6c: 8d 04 8d 13 00 00 00 lea 0x13(,%ecx,4),%eax } /* * Hack to produce (hopefully) a suitably-aligned array of pointers */ if (bufsize < (((memcount+1)*sizeof(char *)) + 15)) 12ba73: 39 45 08 cmp %eax,0x8(%ebp) 12ba76: 0f 82 75 ff ff ff jb 12b9f1 <== ALWAYS TAKEN return 0; grp->gr_mem = (char **)(((uintptr_t)buffer + 15) & ~15); 12ba7c: 8b 45 d4 mov -0x2c(%ebp),%eax 12ba7f: 83 c0 0f add $0xf,%eax 12ba82: 83 e0 f0 and $0xfffffff0,%eax 12ba85: 89 43 0c mov %eax,0xc(%ebx) /* * Fill in pointer array */ grp->gr_mem[0] = grmem; 12ba88: 89 30 mov %esi,(%eax) for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 12ba8a: 8b 45 e0 mov -0x20(%ebp),%eax 12ba8d: 8a 10 mov (%eax),%dl 12ba8f: 84 d2 test %dl,%dl 12ba91: 74 43 je 12bad6 <== ALWAYS TAKEN 12ba93: 40 inc %eax 12ba94: b9 01 00 00 00 mov $0x1,%ecx 12ba99: eb 08 jmp 12baa3 <== ALWAYS TAKEN 12ba9b: 90 nop <== NOT EXECUTED 12ba9c: 8a 10 mov (%eax),%dl 12ba9e: 40 inc %eax 12ba9f: 84 d2 test %dl,%dl 12baa1: 74 15 je 12bab8 if(*cp == ',') { 12baa3: 80 fa 2c cmp $0x2c,%dl 12baa6: 75 f4 jne 12ba9c <== NEVER TAKEN *cp = '\0'; 12baa8: c6 40 ff 00 movb $0x0,-0x1(%eax) <== NOT EXECUTED grp->gr_mem[memcount++] = cp + 1; 12baac: 8b 53 0c mov 0xc(%ebx),%edx <== NOT EXECUTED 12baaf: 89 04 8a mov %eax,(%edx,%ecx,4) <== NOT EXECUTED 12bab2: 41 inc %ecx <== NOT EXECUTED 12bab3: eb e7 jmp 12ba9c <== NOT EXECUTED 12bab5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED /* * Fill in pointer array */ grp->gr_mem[0] = grmem; for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 12bab8: c1 e1 02 shl $0x2,%ecx if(*cp == ',') { *cp = '\0'; grp->gr_mem[memcount++] = cp + 1; } } grp->gr_mem[memcount] = NULL; 12babb: 8b 43 0c mov 0xc(%ebx),%eax 12babe: c7 04 08 00 00 00 00 movl $0x0,(%eax,%ecx,1) 12bac5: b8 01 00 00 00 mov $0x1,%eax return 1; 12baca: e9 24 ff ff ff jmp 12b9f3 <== ALWAYS TAKEN grp->gr_gid = grgid; /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 12bacf: b8 17 00 00 00 mov $0x17,%eax <== NOT EXECUTED 12bad4: eb 9d jmp 12ba73 <== NOT EXECUTED /* * Fill in pointer array */ grp->gr_mem[0] = grmem; for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 12bad6: b9 04 00 00 00 mov $0x4,%ecx <== NOT EXECUTED 12badb: eb de jmp 12babb <== NOT EXECUTED 0012bb1c : FILE *fp, struct passwd *pwd, char *buffer, size_t bufsize ) { 12bb1c: 55 push %ebp 12bb1d: 89 e5 mov %esp,%ebp 12bb1f: 57 push %edi 12bb20: 56 push %esi 12bb21: 53 push %ebx 12bb22: 83 ec 34 sub $0x34,%esp 12bb25: 89 c6 mov %eax,%esi 12bb27: 89 d3 mov %edx,%ebx 12bb29: 89 4d d4 mov %ecx,-0x2c(%ebp) int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 12bb2c: 8d 7d d4 lea -0x2c(%ebp),%edi 12bb2f: 6a 00 push $0x0 12bb31: 8d 45 08 lea 0x8(%ebp),%eax 12bb34: 50 push %eax 12bb35: 89 f9 mov %edi,%ecx 12bb37: 89 f0 mov %esi,%eax 12bb39: e8 f6 fd ff ff call 12b934 <== ALWAYS TAKEN 12bb3e: 83 c4 10 add $0x10,%esp 12bb41: 85 c0 test %eax,%eax 12bb43: 75 0b jne 12bb50 <== NEVER TAKEN || !scanString(fp, &pwd->pw_dir, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_shell, &buffer, &bufsize, 1)) return 0; pwd->pw_uid = pwuid; pwd->pw_gid = pwgid; return 1; 12bb45: 31 c0 xor %eax,%eax <== NOT EXECUTED } 12bb47: 8d 65 f4 lea -0xc(%ebp),%esp 12bb4a: 5b pop %ebx 12bb4b: 5e pop %esi 12bb4c: 5f pop %edi 12bb4d: c9 leave 12bb4e: c3 ret 12bb4f: 90 nop <== NOT EXECUTED ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) 12bb50: 83 ec 08 sub $0x8,%esp 12bb53: 8d 53 04 lea 0x4(%ebx),%edx 12bb56: 6a 00 push $0x0 12bb58: 8d 45 08 lea 0x8(%ebp),%eax 12bb5b: 50 push %eax 12bb5c: 89 f9 mov %edi,%ecx 12bb5e: 89 f0 mov %esi,%eax 12bb60: e8 cf fd ff ff call 12b934 <== ALWAYS TAKEN size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 12bb65: 83 c4 10 add $0x10,%esp 12bb68: 85 c0 test %eax,%eax 12bb6a: 74 d9 je 12bb45 <== ALWAYS TAKEN || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &pwuid) 12bb6c: 8d 55 e4 lea -0x1c(%ebp),%edx 12bb6f: 89 f0 mov %esi,%eax 12bb71: e8 e6 fc ff ff call 12b85c <== ALWAYS TAKEN size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 12bb76: 85 c0 test %eax,%eax 12bb78: 74 cb je 12bb45 <== ALWAYS TAKEN || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &pwuid) || !scanInt(fp, &pwgid) 12bb7a: 8d 55 e0 lea -0x20(%ebp),%edx 12bb7d: 89 f0 mov %esi,%eax 12bb7f: e8 d8 fc ff ff call 12b85c <== ALWAYS TAKEN size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 12bb84: 85 c0 test %eax,%eax 12bb86: 74 bd je 12bb45 <== ALWAYS TAKEN || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &pwuid) || !scanInt(fp, &pwgid) || !scanString(fp, &pwd->pw_comment, &buffer, &bufsize, 0) 12bb88: 83 ec 08 sub $0x8,%esp 12bb8b: 8d 53 0c lea 0xc(%ebx),%edx 12bb8e: 6a 00 push $0x0 12bb90: 8d 45 08 lea 0x8(%ebp),%eax 12bb93: 50 push %eax 12bb94: 89 f9 mov %edi,%ecx 12bb96: 89 f0 mov %esi,%eax 12bb98: e8 97 fd ff ff call 12b934 <== ALWAYS TAKEN size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 12bb9d: 83 c4 10 add $0x10,%esp 12bba0: 85 c0 test %eax,%eax 12bba2: 74 a1 je 12bb45 <== 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) 12bba4: 83 ec 08 sub $0x8,%esp 12bba7: 8d 53 10 lea 0x10(%ebx),%edx 12bbaa: 6a 00 push $0x0 12bbac: 8d 45 08 lea 0x8(%ebp),%eax 12bbaf: 50 push %eax 12bbb0: 89 f9 mov %edi,%ecx 12bbb2: 89 f0 mov %esi,%eax 12bbb4: e8 7b fd ff ff call 12b934 <== ALWAYS TAKEN size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 12bbb9: 83 c4 10 add $0x10,%esp 12bbbc: 85 c0 test %eax,%eax 12bbbe: 74 85 je 12bb45 <== 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) 12bbc0: 83 ec 08 sub $0x8,%esp 12bbc3: 8d 53 14 lea 0x14(%ebx),%edx 12bbc6: 6a 00 push $0x0 12bbc8: 8d 45 08 lea 0x8(%ebp),%eax 12bbcb: 50 push %eax 12bbcc: 89 f9 mov %edi,%ecx 12bbce: 89 f0 mov %esi,%eax 12bbd0: e8 5f fd ff ff call 12b934 <== ALWAYS TAKEN size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 12bbd5: 83 c4 10 add $0x10,%esp 12bbd8: 85 c0 test %eax,%eax 12bbda: 0f 84 65 ff ff ff je 12bb45 <== 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)) 12bbe0: 83 ec 08 sub $0x8,%esp 12bbe3: 8d 53 18 lea 0x18(%ebx),%edx 12bbe6: 6a 01 push $0x1 12bbe8: 8d 45 08 lea 0x8(%ebp),%eax 12bbeb: 50 push %eax 12bbec: 89 f9 mov %edi,%ecx 12bbee: 89 f0 mov %esi,%eax 12bbf0: e8 3f fd ff ff call 12b934 <== ALWAYS TAKEN size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 12bbf5: 83 c4 10 add $0x10,%esp 12bbf8: 85 c0 test %eax,%eax 12bbfa: 0f 84 45 ff ff ff je 12bb45 <== 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; 12bc00: 8b 45 e4 mov -0x1c(%ebp),%eax 12bc03: 66 89 43 08 mov %ax,0x8(%ebx) pwd->pw_gid = pwgid; 12bc07: 8b 45 e0 mov -0x20(%ebp),%eax 12bc0a: 66 89 43 0a mov %ax,0xa(%ebx) 12bc0e: b8 01 00 00 00 mov $0x1,%eax return 1; 12bc13: e9 2f ff ff ff jmp 12bb47 <== ALWAYS TAKEN 0010bc9c : #include int sched_get_priority_max( int policy ) { 10bc9c: 55 push %ebp 10bc9d: 89 e5 mov %esp,%ebp 10bc9f: 83 ec 08 sub $0x8,%esp switch ( policy ) { 10bca2: 83 7d 08 03 cmpl $0x3,0x8(%ebp) 10bca6: 76 14 jbe 10bcbc case SCHED_RR: case SCHED_SPORADIC: break; default: rtems_set_errno_and_return_minus_one( EINVAL ); 10bca8: e8 bb 87 00 00 call 114468 <__errno> 10bcad: c7 00 16 00 00 00 movl $0x16,(%eax) 10bcb3: b8 ff ff ff ff mov $0xffffffff,%eax } return POSIX_SCHEDULER_MAXIMUM_PRIORITY; } 10bcb8: c9 leave 10bcb9: c3 ret 10bcba: 66 90 xchg %ax,%ax <== NOT EXECUTED default: rtems_set_errno_and_return_minus_one( EINVAL ); } return POSIX_SCHEDULER_MAXIMUM_PRIORITY; 10bcbc: 0f b6 05 5c 45 12 00 movzbl 0x12455c,%eax 10bcc3: 48 dec %eax } 10bcc4: c9 leave 10bcc5: c3 ret 0010bcc8 : #include int sched_get_priority_min( int policy ) { 10bcc8: 55 push %ebp 10bcc9: 89 e5 mov %esp,%ebp 10bccb: 83 ec 08 sub $0x8,%esp switch ( policy ) { 10bcce: 83 7d 08 03 cmpl $0x3,0x8(%ebp) 10bcd2: 76 14 jbe 10bce8 case SCHED_RR: case SCHED_SPORADIC: break; default: rtems_set_errno_and_return_minus_one( EINVAL ); 10bcd4: e8 8f 87 00 00 call 114468 <__errno> 10bcd9: c7 00 16 00 00 00 movl $0x16,(%eax) 10bcdf: b8 ff ff ff ff mov $0xffffffff,%eax } return POSIX_SCHEDULER_MINIMUM_PRIORITY; } 10bce4: c9 leave 10bce5: c3 ret 10bce6: 66 90 xchg %ax,%ax <== NOT EXECUTED int sched_get_priority_min( int policy ) { switch ( policy ) { 10bce8: b8 01 00 00 00 mov $0x1,%eax default: rtems_set_errno_and_return_minus_one( EINVAL ); } return POSIX_SCHEDULER_MINIMUM_PRIORITY; } 10bced: c9 leave 10bcee: c3 ret 0010bcf0 : int sched_rr_get_interval( pid_t pid, struct timespec *interval ) { 10bcf0: 55 push %ebp 10bcf1: 89 e5 mov %esp,%ebp 10bcf3: 56 push %esi 10bcf4: 53 push %ebx 10bcf5: 8b 75 08 mov 0x8(%ebp),%esi 10bcf8: 8b 5d 0c mov 0xc(%ebp),%ebx /* * Only supported for the "calling process" (i.e. this node). */ if ( pid && pid != getpid() ) 10bcfb: 85 f6 test %esi,%esi 10bcfd: 75 21 jne 10bd20 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ESRCH ); if ( !interval ) 10bcff: 85 db test %ebx,%ebx 10bd01: 74 38 je 10bd3b rtems_set_errno_and_return_minus_one( EINVAL ); _Timespec_From_ticks( _Thread_Ticks_per_timeslice, interval ); 10bd03: 83 ec 08 sub $0x8,%esp 10bd06: 53 push %ebx 10bd07: ff 35 c4 86 12 00 pushl 0x1286c4 10bd0d: e8 f2 33 00 00 call 10f104 <_Timespec_From_ticks> 10bd12: 31 c0 xor %eax,%eax return 0; 10bd14: 83 c4 10 add $0x10,%esp } 10bd17: 8d 65 f8 lea -0x8(%ebp),%esp 10bd1a: 5b pop %ebx 10bd1b: 5e pop %esi 10bd1c: c9 leave 10bd1d: c3 ret 10bd1e: 66 90 xchg %ax,%ax <== NOT EXECUTED { /* * Only supported for the "calling process" (i.e. this node). */ if ( pid && pid != getpid() ) 10bd20: e8 d3 c9 ff ff call 1086f8 10bd25: 39 f0 cmp %esi,%eax 10bd27: 74 d6 je 10bcff rtems_set_errno_and_return_minus_one( ESRCH ); 10bd29: e8 3a 87 00 00 call 114468 <__errno> 10bd2e: c7 00 03 00 00 00 movl $0x3,(%eax) 10bd34: b8 ff ff ff ff mov $0xffffffff,%eax 10bd39: eb dc jmp 10bd17 <== ALWAYS TAKEN if ( !interval ) rtems_set_errno_and_return_minus_one( EINVAL ); 10bd3b: e8 28 87 00 00 call 114468 <__errno> 10bd40: c7 00 16 00 00 00 movl $0x16,(%eax) 10bd46: b8 ff ff ff ff mov $0xffffffff,%eax 10bd4b: eb ca jmp 10bd17 <== ALWAYS TAKEN 0010e1d4 : */ int sem_close( sem_t *sem ) { 10e1d4: 55 push %ebp 10e1d5: 89 e5 mov %esp,%ebp 10e1d7: 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 *) 10e1da: 8d 45 f4 lea -0xc(%ebp),%eax 10e1dd: 50 push %eax 10e1de: 8b 45 08 mov 0x8(%ebp),%eax 10e1e1: ff 30 pushl (%eax) 10e1e3: 68 60 d3 12 00 push $0x12d360 10e1e8: e8 0b 21 00 00 call 1102f8 <_Objects_Get> register POSIX_Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _POSIX_Semaphore_Get( sem, &location ); switch ( location ) { 10e1ed: 83 c4 10 add $0x10,%esp 10e1f0: 8b 55 f4 mov -0xc(%ebp),%edx 10e1f3: 85 d2 test %edx,%edx 10e1f5: 74 15 je 10e20c #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 10e1f7: e8 f0 95 00 00 call 1177ec <__errno> 10e1fc: c7 00 16 00 00 00 movl $0x16,(%eax) 10e202: b8 ff ff ff ff mov $0xffffffff,%eax } 10e207: c9 leave 10e208: c3 ret 10e209: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED the_semaphore = _POSIX_Semaphore_Get( sem, &location ); switch ( location ) { case OBJECTS_LOCAL: the_semaphore->open_count -= 1; 10e20c: ff 48 18 decl 0x18(%eax) _POSIX_Semaphore_Delete( the_semaphore ); 10e20f: 83 ec 0c sub $0xc,%esp 10e212: 50 push %eax 10e213: e8 e0 5c 00 00 call 113ef8 <_POSIX_Semaphore_Delete> _Thread_Enable_dispatch(); 10e218: e8 9f 29 00 00 call 110bbc <_Thread_Enable_dispatch> 10e21d: 31 c0 xor %eax,%eax return 0; 10e21f: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); } 10e222: c9 leave 10e223: c3 ret 0010e224 : */ int sem_destroy( sem_t *sem ) { 10e224: 55 push %ebp 10e225: 89 e5 mov %esp,%ebp 10e227: 83 ec 1c sub $0x1c,%esp 10e22a: 8d 45 f4 lea -0xc(%ebp),%eax 10e22d: 50 push %eax 10e22e: 8b 45 08 mov 0x8(%ebp),%eax 10e231: ff 30 pushl (%eax) 10e233: 68 60 d3 12 00 push $0x12d360 10e238: e8 bb 20 00 00 call 1102f8 <_Objects_Get> register POSIX_Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _POSIX_Semaphore_Get( sem, &location ); switch ( location ) { 10e23d: 83 c4 10 add $0x10,%esp 10e240: 8b 55 f4 mov -0xc(%ebp),%edx 10e243: 85 d2 test %edx,%edx 10e245: 74 15 je 10e25c #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 10e247: e8 a0 95 00 00 call 1177ec <__errno> 10e24c: c7 00 16 00 00 00 movl $0x16,(%eax) 10e252: b8 ff ff ff ff mov $0xffffffff,%eax } 10e257: c9 leave 10e258: c3 ret 10e259: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED case OBJECTS_LOCAL: /* * Undefined operation on a named semaphore. */ if ( the_semaphore->named == true ) { 10e25c: 80 78 14 00 cmpb $0x0,0x14(%eax) 10e260: 75 16 jne 10e278 _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EINVAL ); } _POSIX_Semaphore_Delete( the_semaphore ); 10e262: 83 ec 0c sub $0xc,%esp 10e265: 50 push %eax 10e266: e8 8d 5c 00 00 call 113ef8 <_POSIX_Semaphore_Delete> _Thread_Enable_dispatch(); 10e26b: e8 4c 29 00 00 call 110bbc <_Thread_Enable_dispatch> 10e270: 31 c0 xor %eax,%eax return 0; 10e272: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); } 10e275: c9 leave 10e276: c3 ret 10e277: 90 nop <== NOT EXECUTED /* * Undefined operation on a named semaphore. */ if ( the_semaphore->named == true ) { _Thread_Enable_dispatch(); 10e278: e8 3f 29 00 00 call 110bbc <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EINVAL ); 10e27d: e8 6a 95 00 00 call 1177ec <__errno> 10e282: c7 00 16 00 00 00 movl $0x16,(%eax) 10e288: b8 ff ff ff ff mov $0xffffffff,%eax case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); } 10e28d: c9 leave 10e28e: c3 ret 0010e290 : int sem_getvalue( sem_t *sem, int *sval ) { 10e290: 55 push %ebp 10e291: 89 e5 mov %esp,%ebp 10e293: 83 ec 1c sub $0x1c,%esp 10e296: 8d 45 f4 lea -0xc(%ebp),%eax 10e299: 50 push %eax 10e29a: 8b 45 08 mov 0x8(%ebp),%eax 10e29d: ff 30 pushl (%eax) 10e29f: 68 60 d3 12 00 push $0x12d360 10e2a4: e8 4f 20 00 00 call 1102f8 <_Objects_Get> register POSIX_Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _POSIX_Semaphore_Get( sem, &location ); switch ( location ) { 10e2a9: 83 c4 10 add $0x10,%esp 10e2ac: 8b 55 f4 mov -0xc(%ebp),%edx 10e2af: 85 d2 test %edx,%edx 10e2b1: 74 15 je 10e2c8 #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 10e2b3: e8 34 95 00 00 call 1177ec <__errno> 10e2b8: c7 00 16 00 00 00 movl $0x16,(%eax) 10e2be: b8 ff ff ff ff mov $0xffffffff,%eax } 10e2c3: c9 leave 10e2c4: c3 ret 10e2c5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED the_semaphore = _POSIX_Semaphore_Get( sem, &location ); switch ( location ) { case OBJECTS_LOCAL: *sval = _CORE_semaphore_Get_count( &the_semaphore->Semaphore ); 10e2c8: 8b 50 64 mov 0x64(%eax),%edx 10e2cb: 8b 45 0c mov 0xc(%ebp),%eax 10e2ce: 89 10 mov %edx,(%eax) _Thread_Enable_dispatch(); 10e2d0: e8 e7 28 00 00 call 110bbc <_Thread_Enable_dispatch> 10e2d5: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); } 10e2d7: c9 leave 10e2d8: c3 ret 0010e2dc : int sem_init( sem_t *sem, int pshared, unsigned int value ) { 10e2dc: 55 push %ebp 10e2dd: 89 e5 mov %esp,%ebp 10e2df: 53 push %ebx 10e2e0: 83 ec 14 sub $0x14,%esp 10e2e3: 8b 5d 08 mov 0x8(%ebp),%ebx int status; POSIX_Semaphore_Control *the_semaphore; if ( !sem ) 10e2e6: 85 db test %ebx,%ebx 10e2e8: 74 26 je 10e310 rtems_set_errno_and_return_minus_one( EINVAL ); status = _POSIX_Semaphore_Create_support( 10e2ea: 8d 45 f4 lea -0xc(%ebp),%eax 10e2ed: 50 push %eax 10e2ee: ff 75 10 pushl 0x10(%ebp) 10e2f1: ff 75 0c pushl 0xc(%ebp) 10e2f4: 6a 00 push $0x0 10e2f6: e8 f1 5a 00 00 call 113dec <_POSIX_Semaphore_Create_support> pshared, value, &the_semaphore ); if ( status != -1 ) 10e2fb: 83 c4 10 add $0x10,%esp 10e2fe: 83 f8 ff cmp $0xffffffff,%eax 10e301: 74 08 je 10e30b *sem = the_semaphore->Object.id; 10e303: 8b 55 f4 mov -0xc(%ebp),%edx 10e306: 8b 52 08 mov 0x8(%edx),%edx 10e309: 89 13 mov %edx,(%ebx) return status; } 10e30b: 8b 5d fc mov -0x4(%ebp),%ebx 10e30e: c9 leave 10e30f: c3 ret { int status; POSIX_Semaphore_Control *the_semaphore; if ( !sem ) rtems_set_errno_and_return_minus_one( EINVAL ); 10e310: e8 d7 94 00 00 call 1177ec <__errno> 10e315: c7 00 16 00 00 00 movl $0x16,(%eax) 10e31b: b8 ff ff ff ff mov $0xffffffff,%eax 10e320: eb e9 jmp 10e30b <== ALWAYS TAKEN 0010e324 : int oflag, ... /* mode_t mode, */ /* unsigned int value */ ) { 10e324: 55 push %ebp 10e325: 89 e5 mov %esp,%ebp 10e327: 57 push %edi 10e328: 56 push %esi 10e329: 53 push %ebx 10e32a: 83 ec 2c sub $0x2c,%esp 10e32d: 8b 75 08 mov 0x8(%ebp),%esi rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10e330: a1 18 d0 12 00 mov 0x12d018,%eax 10e335: 40 inc %eax 10e336: a3 18 d0 12 00 mov %eax,0x12d018 POSIX_Semaphore_Control *the_semaphore; Objects_Locations location; _Thread_Disable_dispatch(); if ( oflag & O_CREAT ) { 10e33b: 8b 7d 0c mov 0xc(%ebp),%edi 10e33e: 81 e7 00 02 00 00 and $0x200,%edi 10e344: 0f 85 86 00 00 00 jne 10e3d0 10e34a: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp) mode = (mode_t) va_arg( arg, unsigned int ); value = va_arg( arg, unsigned int ); va_end(arg); } status = _POSIX_Semaphore_Name_to_id( name, &the_semaphore_id ); 10e351: 83 ec 08 sub $0x8,%esp 10e354: 8d 45 e4 lea -0x1c(%ebp),%eax 10e357: 50 push %eax 10e358: 56 push %esi 10e359: e8 ea 5b 00 00 call 113f48 <_POSIX_Semaphore_Name_to_id> 10e35e: 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 ) { 10e360: 83 c4 10 add $0x10,%esp 10e363: 85 c0 test %eax,%eax 10e365: 74 25 je 10e38c /* * 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) ) ) { 10e367: 83 f8 02 cmp $0x2,%eax 10e36a: 75 04 jne 10e370 <== ALWAYS TAKEN 10e36c: 85 ff test %edi,%edi 10e36e: 75 6c jne 10e3dc _Thread_Enable_dispatch(); 10e370: e8 47 28 00 00 call 110bbc <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one_cast( status, sem_t * ); 10e375: e8 72 94 00 00 call 1177ec <__errno> 10e37a: 89 18 mov %ebx,(%eax) 10e37c: b8 ff ff ff ff mov $0xffffffff,%eax id = &the_semaphore->Semaphore_id; #else id = (sem_t *)&the_semaphore->Object.id; #endif return id; } 10e381: 8d 65 f4 lea -0xc(%ebp),%esp 10e384: 5b pop %ebx 10e385: 5e pop %esi 10e386: 5f pop %edi 10e387: c9 leave 10e388: c3 ret 10e389: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED /* * Check for existence with creation. */ if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) { 10e38c: 8b 45 0c mov 0xc(%ebp),%eax 10e38f: 25 00 0a 00 00 and $0xa00,%eax 10e394: 3d 00 0a 00 00 cmp $0xa00,%eax 10e399: 74 65 je 10e400 10e39b: 50 push %eax 10e39c: 8d 45 dc lea -0x24(%ebp),%eax 10e39f: 50 push %eax 10e3a0: ff 75 e4 pushl -0x1c(%ebp) 10e3a3: 68 60 d3 12 00 push $0x12d360 10e3a8: e8 4b 1f 00 00 call 1102f8 <_Objects_Get> _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one_cast( EEXIST, sem_t * ); } the_semaphore = _POSIX_Semaphore_Get( &the_semaphore_id, &location ); 10e3ad: 89 45 e0 mov %eax,-0x20(%ebp) the_semaphore->open_count += 1; 10e3b0: ff 40 18 incl 0x18(%eax) _Thread_Enable_dispatch(); 10e3b3: e8 04 28 00 00 call 110bbc <_Thread_Enable_dispatch> _Thread_Enable_dispatch(); 10e3b8: e8 ff 27 00 00 call 110bbc <_Thread_Enable_dispatch> goto return_id; 10e3bd: 83 c4 10 add $0x10,%esp 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; 10e3c0: 8b 45 e0 mov -0x20(%ebp),%eax 10e3c3: 83 c0 08 add $0x8,%eax #endif return id; } 10e3c6: 8d 65 f4 lea -0xc(%ebp),%esp 10e3c9: 5b pop %ebx 10e3ca: 5e pop %esi 10e3cb: 5f pop %edi 10e3cc: c9 leave 10e3cd: c3 ret 10e3ce: 66 90 xchg %ax,%ax <== NOT EXECUTED _Thread_Disable_dispatch(); if ( oflag & O_CREAT ) { va_start(arg, oflag); mode = (mode_t) va_arg( arg, unsigned int ); value = va_arg( arg, unsigned int ); 10e3d0: 8b 45 14 mov 0x14(%ebp),%eax 10e3d3: 89 45 d4 mov %eax,-0x2c(%ebp) 10e3d6: e9 76 ff ff ff jmp 10e351 <== ALWAYS TAKEN 10e3db: 90 nop <== NOT EXECUTED /* * 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( 10e3dc: 8d 45 e0 lea -0x20(%ebp),%eax 10e3df: 50 push %eax 10e3e0: ff 75 d4 pushl -0x2c(%ebp) 10e3e3: 6a 00 push $0x0 10e3e5: 56 push %esi 10e3e6: e8 01 5a 00 00 call 113dec <_POSIX_Semaphore_Create_support> 10e3eb: 89 c3 mov %eax,%ebx /* * errno was set by Create_support, so don't set it again. */ _Thread_Enable_dispatch(); 10e3ed: e8 ca 27 00 00 call 110bbc <_Thread_Enable_dispatch> if ( status == -1 ) 10e3f2: 83 c4 10 add $0x10,%esp 10e3f5: 43 inc %ebx 10e3f6: 75 c8 jne 10e3c0 10e3f8: b8 ff ff ff ff mov $0xffffffff,%eax 10e3fd: eb c7 jmp 10e3c6 <== ALWAYS TAKEN 10e3ff: 90 nop <== NOT EXECUTED /* * Check for existence with creation. */ if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) { _Thread_Enable_dispatch(); 10e400: e8 b7 27 00 00 call 110bbc <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one_cast( EEXIST, sem_t * ); 10e405: e8 e2 93 00 00 call 1177ec <__errno> 10e40a: c7 00 11 00 00 00 movl $0x11,(%eax) 10e410: b8 ff ff ff ff mov $0xffffffff,%eax 10e415: eb af jmp 10e3c6 <== ALWAYS TAKEN 0010e418 : */ int sem_post( sem_t *sem ) { 10e418: 55 push %ebp 10e419: 89 e5 mov %esp,%ebp 10e41b: 83 ec 1c sub $0x1c,%esp 10e41e: 8d 45 f4 lea -0xc(%ebp),%eax 10e421: 50 push %eax 10e422: 8b 45 08 mov 0x8(%ebp),%eax 10e425: ff 30 pushl (%eax) 10e427: 68 60 d3 12 00 push $0x12d360 10e42c: e8 c7 1e 00 00 call 1102f8 <_Objects_Get> register POSIX_Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _POSIX_Semaphore_Get( sem, &location ); switch ( location ) { 10e431: 83 c4 10 add $0x10,%esp 10e434: 8b 4d f4 mov -0xc(%ebp),%ecx 10e437: 85 c9 test %ecx,%ecx 10e439: 74 15 je 10e450 #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 10e43b: e8 ac 93 00 00 call 1177ec <__errno> 10e440: c7 00 16 00 00 00 movl $0x16,(%eax) 10e446: b8 ff ff ff ff mov $0xffffffff,%eax } 10e44b: c9 leave 10e44c: c3 ret 10e44d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED the_semaphore = _POSIX_Semaphore_Get( sem, &location ); switch ( location ) { case OBJECTS_LOCAL: _CORE_semaphore_Surrender( 10e450: 52 push %edx 10e451: 6a 00 push $0x0 10e453: ff 70 08 pushl 0x8(%eax) 10e456: 83 c0 1c add $0x1c,%eax 10e459: 50 push %eax 10e45a: e8 3d 15 00 00 call 10f99c <_CORE_semaphore_Surrender> NULL /* XXX need to define a routine to handle this case */ #else NULL #endif ); _Thread_Enable_dispatch(); 10e45f: e8 58 27 00 00 call 110bbc <_Thread_Enable_dispatch> 10e464: 31 c0 xor %eax,%eax return 0; 10e466: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); } 10e469: c9 leave 10e46a: c3 ret 0010e46c : int sem_timedwait( sem_t *sem, const struct timespec *abstime ) { 10e46c: 55 push %ebp 10e46d: 89 e5 mov %esp,%ebp 10e46f: 53 push %ebx 10e470: 83 ec 1c sub $0x1c,%esp 10e473: 8b 5d 08 mov 0x8(%ebp),%ebx * * 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 ); 10e476: 8d 45 f4 lea -0xc(%ebp),%eax 10e479: 50 push %eax 10e47a: ff 75 0c pushl 0xc(%ebp) 10e47d: e8 ce 50 00 00 call 113550 <_POSIX_Absolute_timeout_to_ticks> if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE ) 10e482: 83 c4 10 add $0x10,%esp 10e485: 83 f8 03 cmp $0x3,%eax 10e488: 74 16 je 10e4a0 <== NEVER TAKEN do_wait = false; lock_status = _POSIX_Semaphore_Wait_support( sem, do_wait, ticks ); 10e48a: 50 push %eax <== NOT EXECUTED 10e48b: ff 75 f4 pushl -0xc(%ebp) <== NOT EXECUTED 10e48e: 6a 00 push $0x0 <== NOT EXECUTED 10e490: 53 push %ebx <== NOT EXECUTED 10e491: e8 1e 5b 00 00 call 113fb4 <_POSIX_Semaphore_Wait_support> <== NOT EXECUTED 10e496: 83 c4 10 add $0x10,%esp <== NOT EXECUTED break; } } return lock_status; } 10e499: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 10e49c: c9 leave <== NOT EXECUTED 10e49d: c3 ret <== NOT EXECUTED 10e49e: 66 90 xchg %ax,%ax <== NOT EXECUTED */ status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks ); if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE ) do_wait = false; lock_status = _POSIX_Semaphore_Wait_support( sem, do_wait, ticks ); 10e4a0: 52 push %edx 10e4a1: ff 75 f4 pushl -0xc(%ebp) 10e4a4: 6a 01 push $0x1 10e4a6: 53 push %ebx 10e4a7: e8 08 5b 00 00 call 113fb4 <_POSIX_Semaphore_Wait_support> 10e4ac: 83 c4 10 add $0x10,%esp break; } } return lock_status; } 10e4af: 8b 5d fc mov -0x4(%ebp),%ebx 10e4b2: c9 leave 10e4b3: c3 ret 0010e4c8 : */ int sem_unlink( const char *name ) { 10e4c8: 55 push %ebp 10e4c9: 89 e5 mov %esp,%ebp 10e4cb: 53 push %ebx 10e4cc: 83 ec 1c sub $0x1c,%esp 10e4cf: a1 18 d0 12 00 mov 0x12d018,%eax 10e4d4: 40 inc %eax 10e4d5: a3 18 d0 12 00 mov %eax,0x12d018 register POSIX_Semaphore_Control *the_semaphore; sem_t the_semaphore_id; _Thread_Disable_dispatch(); status = _POSIX_Semaphore_Name_to_id( name, &the_semaphore_id ); 10e4da: 8d 45 f4 lea -0xc(%ebp),%eax 10e4dd: 50 push %eax 10e4de: ff 75 08 pushl 0x8(%ebp) 10e4e1: e8 62 5a 00 00 call 113f48 <_POSIX_Semaphore_Name_to_id> 10e4e6: 89 c3 mov %eax,%ebx if ( status != 0 ) { 10e4e8: 83 c4 10 add $0x10,%esp 10e4eb: 85 c0 test %eax,%eax 10e4ed: 75 35 jne 10e524 _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( status ); } the_semaphore = (POSIX_Semaphore_Control *) _Objects_Get_local_object( 10e4ef: 0f b7 55 f4 movzwl -0xc(%ebp),%edx 10e4f3: a1 7c d3 12 00 mov 0x12d37c,%eax 10e4f8: 8b 1c 90 mov (%eax,%edx,4),%ebx &_POSIX_Semaphore_Information, _Objects_Get_index( the_semaphore_id ) ); the_semaphore->linked = false; 10e4fb: c6 43 15 00 movb $0x0,0x15(%ebx) RTEMS_INLINE_ROUTINE void _POSIX_Semaphore_Namespace_remove ( POSIX_Semaphore_Control *the_semaphore ) { _Objects_Namespace_remove( 10e4ff: 83 ec 08 sub $0x8,%esp 10e502: 53 push %ebx 10e503: 68 60 d3 12 00 push $0x12d360 10e508: e8 3b 1f 00 00 call 110448 <_Objects_Namespace_remove> _POSIX_Semaphore_Namespace_remove( the_semaphore ); _POSIX_Semaphore_Delete( the_semaphore ); 10e50d: 89 1c 24 mov %ebx,(%esp) 10e510: e8 e3 59 00 00 call 113ef8 <_POSIX_Semaphore_Delete> _Thread_Enable_dispatch(); 10e515: e8 a2 26 00 00 call 110bbc <_Thread_Enable_dispatch> 10e51a: 31 c0 xor %eax,%eax return 0; 10e51c: 83 c4 10 add $0x10,%esp } 10e51f: 8b 5d fc mov -0x4(%ebp),%ebx 10e522: c9 leave 10e523: c3 ret _Thread_Disable_dispatch(); status = _POSIX_Semaphore_Name_to_id( name, &the_semaphore_id ); if ( status != 0 ) { _Thread_Enable_dispatch(); 10e524: e8 93 26 00 00 call 110bbc <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( status ); 10e529: e8 be 92 00 00 call 1177ec <__errno> 10e52e: 89 18 mov %ebx,(%eax) 10e530: b8 ff ff ff ff mov $0xffffffff,%eax 10e535: eb e8 jmp 10e51f <== ALWAYS TAKEN 0012b7f0 : */ int setgid( gid_t gid ) { 12b7f0: 55 push %ebp <== NOT EXECUTED 12b7f1: 89 e5 mov %esp,%ebp <== NOT EXECUTED _POSIX_types_Gid = gid; 12b7f3: a1 c4 93 16 00 mov 0x1693c4,%eax <== NOT EXECUTED 12b7f8: 8b 55 08 mov 0x8(%ebp),%edx <== NOT EXECUTED 12b7fb: 66 89 50 34 mov %dx,0x34(%eax) <== NOT EXECUTED return 0; } 12b7ff: 31 c0 xor %eax,%eax <== NOT EXECUTED 12b801: c9 leave <== NOT EXECUTED 12b802: c3 ret <== NOT EXECUTED 0012bd54 : return NULL; return &grent; } void setgrent(void) { 12bd54: 55 push %ebp <== NOT EXECUTED 12bd55: 89 e5 mov %esp,%ebp <== NOT EXECUTED 12bd57: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED init_etc_passwd_group(); 12bd5a: e8 f5 fe ff ff call 12bc54 <== NOT EXECUTED if (group_fp != NULL) 12bd5f: a1 84 ea 16 00 mov 0x16ea84,%eax <== NOT EXECUTED 12bd64: 85 c0 test %eax,%eax <== NOT EXECUTED 12bd66: 74 0c je 12bd74 <== NOT EXECUTED fclose(group_fp); 12bd68: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12bd6b: 50 push %eax <== NOT EXECUTED 12bd6c: e8 eb 68 01 00 call 14265c <== NOT EXECUTED 12bd71: 83 c4 10 add $0x10,%esp <== NOT EXECUTED group_fp = fopen("/etc/group", "r"); 12bd74: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 12bd77: 68 4d bc 15 00 push $0x15bc4d <== NOT EXECUTED 12bd7c: 68 97 89 15 00 push $0x158997 <== NOT EXECUTED 12bd81: e8 c6 70 01 00 call 142e4c <== NOT EXECUTED 12bd86: a3 84 ea 16 00 mov %eax,0x16ea84 <== NOT EXECUTED 12bd8b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } 12bd8e: c9 leave <== NOT EXECUTED 12bd8f: c3 ret <== NOT EXECUTED 0010b1b0 : int setitimer( int which, const struct itimerval *value, struct itimerval *ovalue ) { 10b1b0: 55 push %ebp 10b1b1: 89 e5 mov %esp,%ebp 10b1b3: 83 ec 08 sub $0x8,%esp if ( !value ) 10b1b6: 8b 55 0c mov 0xc(%ebp),%edx 10b1b9: 85 d2 test %edx,%edx 10b1bb: 74 33 je 10b1f0 rtems_set_errno_and_return_minus_one( EFAULT ); if ( !ovalue ) 10b1bd: 8b 45 10 mov 0x10(%ebp),%eax 10b1c0: 85 c0 test %eax,%eax 10b1c2: 74 2c je 10b1f0 rtems_set_errno_and_return_minus_one( EFAULT ); switch ( which ) { 10b1c4: 83 7d 08 02 cmpl $0x2,0x8(%ebp) 10b1c8: 76 12 jbe 10b1dc case ITIMER_PROF: rtems_set_errno_and_return_minus_one( ENOSYS ); default: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 10b1ca: e8 4d 8d 00 00 call 113f1c <__errno> 10b1cf: c7 00 16 00 00 00 movl $0x16,(%eax) } 10b1d5: b8 ff ff ff ff mov $0xffffffff,%eax 10b1da: c9 leave 10b1db: c3 ret switch ( which ) { case ITIMER_REAL: case ITIMER_VIRTUAL: case ITIMER_PROF: rtems_set_errno_and_return_minus_one( ENOSYS ); 10b1dc: e8 3b 8d 00 00 call 113f1c <__errno> 10b1e1: c7 00 58 00 00 00 movl $0x58,(%eax) default: break; } rtems_set_errno_and_return_minus_one( EINVAL ); } 10b1e7: b8 ff ff ff ff mov $0xffffffff,%eax 10b1ec: c9 leave 10b1ed: c3 ret 10b1ee: 66 90 xchg %ax,%ax <== NOT EXECUTED { if ( !value ) rtems_set_errno_and_return_minus_one( EFAULT ); if ( !ovalue ) rtems_set_errno_and_return_minus_one( EFAULT ); 10b1f0: e8 27 8d 00 00 call 113f1c <__errno> 10b1f5: c7 00 0e 00 00 00 movl $0xe,(%eax) 10b1fb: eb d8 jmp 10b1d5 <== ALWAYS TAKEN 0012bf20 : return NULL; return &pwent; } void setpwent(void) { 12bf20: 55 push %ebp <== NOT EXECUTED 12bf21: 89 e5 mov %esp,%ebp <== NOT EXECUTED 12bf23: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED init_etc_passwd_group(); 12bf26: e8 29 fd ff ff call 12bc54 <== NOT EXECUTED if (passwd_fp != NULL) 12bf2b: a1 84 e9 16 00 mov 0x16e984,%eax <== NOT EXECUTED 12bf30: 85 c0 test %eax,%eax <== NOT EXECUTED 12bf32: 74 0c je 12bf40 <== NOT EXECUTED fclose(passwd_fp); 12bf34: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12bf37: 50 push %eax <== NOT EXECUTED 12bf38: e8 1f 67 01 00 call 14265c <== NOT EXECUTED 12bf3d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED passwd_fp = fopen("/etc/passwd", "r"); 12bf40: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 12bf43: 68 4d bc 15 00 push $0x15bc4d <== NOT EXECUTED 12bf48: 68 8b 89 15 00 push $0x15898b <== NOT EXECUTED 12bf4d: e8 fa 6e 01 00 call 142e4c <== NOT EXECUTED 12bf52: a3 84 e9 16 00 mov %eax,0x16e984 <== NOT EXECUTED 12bf57: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } 12bf5a: c9 leave <== NOT EXECUTED 12bf5b: c3 ret <== NOT EXECUTED 0010d008 : */ int setuid( uid_t uid ) { 10d008: 55 push %ebp <== NOT EXECUTED 10d009: 89 e5 mov %esp,%ebp <== NOT EXECUTED _POSIX_types_Uid = uid; 10d00b: a1 c4 93 16 00 mov 0x1693c4,%eax <== NOT EXECUTED 10d010: 8b 55 08 mov 0x8(%ebp),%edx <== NOT EXECUTED 10d013: 66 89 50 32 mov %dx,0x32(%eax) <== NOT EXECUTED return 0; } 10d017: 31 c0 xor %eax,%eax <== NOT EXECUTED 10d019: c9 leave <== NOT EXECUTED 10d01a: c3 ret <== NOT EXECUTED 0010bbdc : int sigaction( int sig, const struct sigaction *act, struct sigaction *oact ) { 10bbdc: 55 push %ebp 10bbdd: 89 e5 mov %esp,%ebp 10bbdf: 57 push %edi 10bbe0: 56 push %esi 10bbe1: 53 push %ebx 10bbe2: 83 ec 1c sub $0x1c,%esp 10bbe5: 8b 5d 08 mov 0x8(%ebp),%ebx 10bbe8: 8b 45 0c mov 0xc(%ebp),%eax 10bbeb: 8b 55 10 mov 0x10(%ebp),%edx ISR_Level level; if ( oact ) 10bbee: 85 d2 test %edx,%edx 10bbf0: 74 13 je 10bc05 *oact = _POSIX_signals_Vectors[ sig ]; 10bbf2: 8d 0c 5b lea (%ebx,%ebx,2),%ecx 10bbf5: 8d 34 8d a0 99 12 00 lea 0x1299a0(,%ecx,4),%esi 10bbfc: b9 03 00 00 00 mov $0x3,%ecx 10bc01: 89 d7 mov %edx,%edi 10bc03: f3 a5 rep movsl %ds:(%esi),%es:(%edi) if ( !sig ) 10bc05: 85 db test %ebx,%ebx 10bc07: 74 6f je 10bc78 rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) ) 10bc09: 8d 53 ff lea -0x1(%ebx),%edx 10bc0c: 83 fa 1f cmp $0x1f,%edx 10bc0f: 77 67 ja 10bc78 * * NOTE: Solaris documentation claims to "silently enforce" this which * contradicts the POSIX specification. */ if ( sig == SIGKILL ) 10bc11: 83 fb 09 cmp $0x9,%ebx 10bc14: 74 62 je 10bc78 /* * Evaluate the new action structure and set the global signal vector * appropriately. */ if ( act ) { 10bc16: 85 c0 test %eax,%eax 10bc18: 74 37 je 10bc51 <== 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 ); 10bc1a: 9c pushf 10bc1b: fa cli 10bc1c: 8f 45 e4 popl -0x1c(%ebp) if ( act->sa_handler == SIG_DFL ) { 10bc1f: 8b 50 08 mov 0x8(%eax),%edx 10bc22: 85 d2 test %edx,%edx 10bc24: 74 36 je 10bc5c _POSIX_signals_Vectors[ sig ] = _POSIX_signals_Default_vectors[ sig ]; } else { _POSIX_signals_Clear_process_signals( sig ); 10bc26: 83 ec 0c sub $0xc,%esp 10bc29: 53 push %ebx 10bc2a: 89 45 e0 mov %eax,-0x20(%ebp) 10bc2d: e8 da 53 00 00 call 11100c <_POSIX_signals_Clear_process_signals> _POSIX_signals_Vectors[ sig ] = *act; 10bc32: 8d 14 5b lea (%ebx,%ebx,2),%edx 10bc35: 8d 3c 95 a0 99 12 00 lea 0x1299a0(,%edx,4),%edi 10bc3c: b9 03 00 00 00 mov $0x3,%ecx 10bc41: 8b 45 e0 mov -0x20(%ebp),%eax 10bc44: 89 c6 mov %eax,%esi 10bc46: f3 a5 rep movsl %ds:(%esi),%es:(%edi) 10bc48: 83 c4 10 add $0x10,%esp } _ISR_Enable( level ); 10bc4b: ff 75 e4 pushl -0x1c(%ebp) 10bc4e: 9d popf 10bc4f: 31 c0 xor %eax,%eax * + If we are now ignoring a signal that was previously pending, * we clear the pending signal indicator. */ return 0; } 10bc51: 8d 65 f4 lea -0xc(%ebp),%esp 10bc54: 5b pop %ebx 10bc55: 5e pop %esi 10bc56: 5f pop %edi 10bc57: c9 leave 10bc58: c3 ret 10bc59: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED * we can just copy the provided sigaction structure into the vectors. */ _ISR_Disable( level ); if ( act->sa_handler == SIG_DFL ) { _POSIX_signals_Vectors[ sig ] = _POSIX_signals_Default_vectors[ sig ]; 10bc5c: 8d 34 5b lea (%ebx,%ebx,2),%esi 10bc5f: c1 e6 02 shl $0x2,%esi 10bc62: 8d be a0 99 12 00 lea 0x1299a0(%esi),%edi 10bc68: 81 c6 40 2f 12 00 add $0x122f40,%esi 10bc6e: b9 03 00 00 00 mov $0x3,%ecx 10bc73: f3 a5 rep movsl %ds:(%esi),%es:(%edi) 10bc75: eb d4 jmp 10bc4b <== ALWAYS TAKEN 10bc77: 90 nop <== NOT EXECUTED * NOTE: Solaris documentation claims to "silently enforce" this which * contradicts the POSIX specification. */ if ( sig == SIGKILL ) rtems_set_errno_and_return_minus_one( EINVAL ); 10bc78: e8 7f 89 00 00 call 1145fc <__errno> 10bc7d: c7 00 16 00 00 00 movl $0x16,(%eax) 10bc83: b8 ff ff ff ff mov $0xffffffff,%eax 10bc88: eb c7 jmp 10bc51 <== ALWAYS TAKEN 0010bc8c : int sigaddset( sigset_t *set, int signo ) { 10bc8c: 55 push %ebp 10bc8d: 89 e5 mov %esp,%ebp 10bc8f: 83 ec 08 sub $0x8,%esp 10bc92: 8b 45 08 mov 0x8(%ebp),%eax 10bc95: 8b 4d 0c mov 0xc(%ebp),%ecx if ( !set ) 10bc98: 85 c0 test %eax,%eax 10bc9a: 74 18 je 10bcb4 rtems_set_errno_and_return_minus_one( EINVAL ); if ( !signo ) 10bc9c: 85 c9 test %ecx,%ecx 10bc9e: 74 14 je 10bcb4 10bca0: 49 dec %ecx rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(signo) ) 10bca1: 83 f9 1f cmp $0x1f,%ecx 10bca4: 77 0e ja 10bcb4 rtems_set_errno_and_return_minus_one( EINVAL ); *set |= signo_to_mask(signo); 10bca6: ba 01 00 00 00 mov $0x1,%edx 10bcab: d3 e2 shl %cl,%edx 10bcad: 09 10 or %edx,(%eax) 10bcaf: 31 c0 xor %eax,%eax return 0; } 10bcb1: c9 leave 10bcb2: c3 ret 10bcb3: 90 nop <== NOT EXECUTED if ( !signo ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(signo) ) rtems_set_errno_and_return_minus_one( EINVAL ); 10bcb4: e8 43 89 00 00 call 1145fc <__errno> 10bcb9: c7 00 16 00 00 00 movl $0x16,(%eax) 10bcbf: b8 ff ff ff ff mov $0xffffffff,%eax *set |= signo_to_mask(signo); return 0; } 10bcc4: c9 leave 10bcc5: c3 ret 0010d614 : int sigdelset( sigset_t *set, int signo ) { 10d614: 55 push %ebp 10d615: 89 e5 mov %esp,%ebp 10d617: 83 ec 08 sub $0x8,%esp 10d61a: 8b 45 08 mov 0x8(%ebp),%eax 10d61d: 8b 4d 0c mov 0xc(%ebp),%ecx if ( !set ) 10d620: 85 c0 test %eax,%eax 10d622: 74 18 je 10d63c rtems_set_errno_and_return_minus_one( EINVAL ); if ( !signo ) 10d624: 85 c9 test %ecx,%ecx 10d626: 74 0f je 10d637 10d628: 49 dec %ecx return 0; if ( !is_valid_signo(signo) ) 10d629: 83 f9 1f cmp $0x1f,%ecx 10d62c: 77 0e ja 10d63c rtems_set_errno_and_return_minus_one( EINVAL ); *set &= ~signo_to_mask(signo); 10d62e: ba fe ff ff ff mov $0xfffffffe,%edx 10d633: d3 c2 rol %cl,%edx 10d635: 21 10 and %edx,(%eax) 10d637: 31 c0 xor %eax,%eax return 0; } 10d639: c9 leave 10d63a: c3 ret 10d63b: 90 nop <== NOT EXECUTED if ( !signo ) return 0; if ( !is_valid_signo(signo) ) rtems_set_errno_and_return_minus_one( EINVAL ); 10d63c: e8 e7 89 00 00 call 116028 <__errno> 10d641: c7 00 16 00 00 00 movl $0x16,(%eax) 10d647: b8 ff ff ff ff mov $0xffffffff,%eax *set &= ~signo_to_mask(signo); return 0; } 10d64c: c9 leave 10d64d: c3 ret 0010d6a8 : int sigismember( const sigset_t *set, int signo ) { 10d6a8: 55 push %ebp 10d6a9: 89 e5 mov %esp,%ebp 10d6ab: 83 ec 08 sub $0x8,%esp 10d6ae: 8b 45 08 mov 0x8(%ebp),%eax 10d6b1: 8b 4d 0c mov 0xc(%ebp),%ecx if ( !set ) 10d6b4: 85 c0 test %eax,%eax 10d6b6: 74 20 je 10d6d8 rtems_set_errno_and_return_minus_one( EINVAL ); if ( !signo ) 10d6b8: 85 c9 test %ecx,%ecx 10d6ba: 74 18 je 10d6d4 10d6bc: 49 dec %ecx return 0; if ( !is_valid_signo(signo) ) 10d6bd: 83 f9 1f cmp $0x1f,%ecx 10d6c0: 77 16 ja 10d6d8 rtems_set_errno_and_return_minus_one( EINVAL ); 10d6c2: ba 01 00 00 00 mov $0x1,%edx 10d6c7: d3 e2 shl %cl,%edx 10d6c9: 85 10 test %edx,(%eax) 10d6cb: 0f 95 c0 setne %al 10d6ce: 0f b6 c0 movzbl %al,%eax if ( *set & signo_to_mask(signo) ) return 1; return 0; } 10d6d1: c9 leave 10d6d2: c3 ret 10d6d3: 90 nop <== NOT EXECUTED ) { if ( !set ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( !signo ) 10d6d4: 31 c0 xor %eax,%eax if ( *set & signo_to_mask(signo) ) return 1; return 0; } 10d6d6: c9 leave 10d6d7: c3 ret if ( !signo ) return 0; if ( !is_valid_signo(signo) ) rtems_set_errno_and_return_minus_one( EINVAL ); 10d6d8: e8 4b 89 00 00 call 116028 <__errno> 10d6dd: c7 00 16 00 00 00 movl $0x16,(%eax) 10d6e3: b8 ff ff ff ff mov $0xffffffff,%eax if ( *set & signo_to_mask(signo) ) return 1; return 0; } 10d6e8: c9 leave 10d6e9: c3 ret 0010b9f4 : sighandler_t signal( int signum, sighandler_t handler ) { 10b9f4: 55 push %ebp 10b9f5: 89 e5 mov %esp,%ebp 10b9f7: 53 push %ebx 10b9f8: 83 ec 30 sub $0x30,%esp struct sigaction s; struct sigaction old; s.sa_handler = handler ; 10b9fb: 8b 45 0c mov 0xc(%ebp),%eax 10b9fe: 89 45 f4 mov %eax,-0xc(%ebp) sigemptyset(&s.sa_mask); 10ba01: 8d 5d ec lea -0x14(%ebp),%ebx 10ba04: 8d 45 f0 lea -0x10(%ebp),%eax 10ba07: 50 push %eax 10ba08: e8 bb ff ff ff call 10b9c8 <== 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; 10ba0d: c7 45 ec 00 00 00 00 movl $0x0,-0x14(%ebp) #endif sigaction( signum, &s, &old ); 10ba14: 83 c4 0c add $0xc,%esp 10ba17: 8d 45 e0 lea -0x20(%ebp),%eax 10ba1a: 50 push %eax 10ba1b: 53 push %ebx 10ba1c: ff 75 08 pushl 0x8(%ebp) 10ba1f: e8 b8 fe ff ff call 10b8dc <== ALWAYS TAKEN return (sighandler_t) old.sa_handler; } 10ba24: 8b 45 e8 mov -0x18(%ebp),%eax 10ba27: 8b 5d fc mov -0x4(%ebp),%ebx 10ba2a: c9 leave 10ba2b: c3 ret 0010bd30 : int sigprocmask( int how, const sigset_t *set, sigset_t *oset ) { 10bd30: 55 push %ebp 10bd31: 89 e5 mov %esp,%ebp 10bd33: 83 ec 08 sub $0x8,%esp #if defined(RTEMS_POSIX_API) return pthread_sigmask( how, set, oset ); #else return -1; #endif } 10bd36: c9 leave /* * P1003.1c/Draft 10, p. 38 maps sigprocmask to pthread_sigmask. */ #if defined(RTEMS_POSIX_API) return pthread_sigmask( how, set, oset ); 10bd37: e9 0c 58 00 00 jmp 111548 <== ALWAYS TAKEN 0010d74c : #include int sigsuspend( const sigset_t *sigmask ) { 10d74c: 55 push %ebp 10d74d: 89 e5 mov %esp,%ebp 10d74f: 56 push %esi 10d750: 53 push %ebx 10d751: 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 ); 10d754: 8d 5d f4 lea -0xc(%ebp),%ebx 10d757: 53 push %ebx 10d758: ff 75 08 pushl 0x8(%ebp) 10d75b: 6a 01 push $0x1 10d75d: e8 c6 ff ff ff call 10d728 <== ALWAYS TAKEN (void) sigfillset( &all_signals ); 10d762: 8d 75 f0 lea -0x10(%ebp),%esi 10d765: 89 34 24 mov %esi,(%esp) 10d768: e8 0f ff ff ff call 10d67c <== ALWAYS TAKEN status = sigtimedwait( &all_signals, NULL, NULL ); 10d76d: 83 c4 0c add $0xc,%esp 10d770: 6a 00 push $0x0 10d772: 6a 00 push $0x0 10d774: 56 push %esi 10d775: e8 76 00 00 00 call 10d7f0 <== ALWAYS TAKEN 10d77a: 89 c6 mov %eax,%esi (void) sigprocmask( SIG_SETMASK, &saved_signals_blocked, NULL ); 10d77c: 83 c4 0c add $0xc,%esp 10d77f: 6a 00 push $0x0 10d781: 53 push %ebx 10d782: 6a 00 push $0x0 10d784: e8 9f ff ff ff call 10d728 <== ALWAYS TAKEN /* * sigtimedwait() returns the signal number while sigsuspend() * is supposed to return -1 and EINTR when a signal is caught. */ if ( status != -1 ) 10d789: 83 c4 10 add $0x10,%esp 10d78c: 46 inc %esi 10d78d: 75 0d jne 10d79c <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EINTR ); return status; } 10d78f: b8 ff ff ff ff mov $0xffffffff,%eax 10d794: 8d 65 f8 lea -0x8(%ebp),%esp 10d797: 5b pop %ebx 10d798: 5e pop %esi 10d799: c9 leave 10d79a: c3 ret 10d79b: 90 nop <== NOT EXECUTED /* * sigtimedwait() returns the signal number while sigsuspend() * is supposed to return -1 and EINTR when a signal is caught. */ if ( status != -1 ) rtems_set_errno_and_return_minus_one( EINTR ); 10d79c: e8 87 88 00 00 call 116028 <__errno> 10d7a1: c7 00 04 00 00 00 movl $0x4,(%eax) 10d7a7: eb e6 jmp 10d78f <== ALWAYS TAKEN 0010bf88 : int sigtimedwait( const sigset_t *set, siginfo_t *info, const struct timespec *timeout ) { 10bf88: 55 push %ebp 10bf89: 89 e5 mov %esp,%ebp 10bf8b: 57 push %edi 10bf8c: 56 push %esi 10bf8d: 53 push %ebx 10bf8e: 83 ec 2c sub $0x2c,%esp 10bf91: 8b 75 08 mov 0x8(%ebp),%esi 10bf94: 8b 5d 0c mov 0xc(%ebp),%ebx 10bf97: 8b 7d 10 mov 0x10(%ebp),%edi ISR_Level level; /* * Error check parameters before disabling interrupts. */ if ( !set ) 10bf9a: 85 f6 test %esi,%esi 10bf9c: 0f 84 7a 01 00 00 je 10c11c /* NOTE: This is very specifically a RELATIVE not ABSOLUTE time * in the Open Group specification. */ interval = 0; if ( timeout ) { 10bfa2: 85 ff test %edi,%edi 10bfa4: 0f 84 1e 01 00 00 je 10c0c8 if ( !_Timespec_Is_valid( timeout ) ) 10bfaa: 83 ec 0c sub $0xc,%esp 10bfad: 57 push %edi 10bfae: e8 91 34 00 00 call 10f444 <_Timespec_Is_valid> 10bfb3: 83 c4 10 add $0x10,%esp 10bfb6: 84 c0 test %al,%al 10bfb8: 0f 84 5e 01 00 00 je 10c11c rtems_set_errno_and_return_minus_one( EINVAL ); interval = _Timespec_To_ticks( timeout ); 10bfbe: 83 ec 0c sub $0xc,%esp 10bfc1: 57 push %edi 10bfc2: e8 e1 34 00 00 call 10f4a8 <_Timespec_To_ticks> if ( !interval ) 10bfc7: 83 c4 10 add $0x10,%esp 10bfca: 85 c0 test %eax,%eax 10bfcc: 0f 84 4a 01 00 00 je 10c11c <== ALWAYS TAKEN /* * Initialize local variables. */ the_info = ( info ) ? info : &signal_information; 10bfd2: 85 db test %ebx,%ebx 10bfd4: 0f 84 f8 00 00 00 je 10c0d2 <== ALWAYS TAKEN the_thread = _Thread_Executing; 10bfda: 8b 15 58 98 12 00 mov 0x129858,%edx api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 10bfe0: 8b ba f8 00 00 00 mov 0xf8(%edx),%edi * What if they are already pending? */ /* API signals pending? */ _ISR_Disable( level ); 10bfe6: 9c pushf 10bfe7: fa cli 10bfe8: 8f 45 d0 popl -0x30(%ebp) if ( *set & api->signals_pending ) { 10bfeb: 8b 0e mov (%esi),%ecx 10bfed: 89 4d d4 mov %ecx,-0x2c(%ebp) 10bff0: 8b 8f c8 00 00 00 mov 0xc8(%edi),%ecx 10bff6: 85 4d d4 test %ecx,-0x2c(%ebp) 10bff9: 0f 85 dd 00 00 00 jne 10c0dc return the_info->si_signo; } /* Process pending signals? */ if ( *set & _POSIX_signals_Pending ) { 10bfff: 8b 0d 60 9f 12 00 mov 0x129f60,%ecx 10c005: 85 4d d4 test %ecx,-0x2c(%ebp) 10c008: 75 7e jne 10c088 the_info->si_code = SI_USER; the_info->si_value.sival_int = 0; return signo; } the_info->si_signo = -1; 10c00a: c7 03 ff ff ff ff movl $0xffffffff,(%ebx) 10c010: 8b 0d 98 97 12 00 mov 0x129798,%ecx 10c016: 41 inc %ecx 10c017: 89 0d 98 97 12 00 mov %ecx,0x129798 _Thread_Disable_dispatch(); the_thread->Wait.queue = &_POSIX_signals_Wait_queue; 10c01d: c7 42 44 20 9f 12 00 movl $0x129f20,0x44(%edx) the_thread->Wait.return_code = EINTR; 10c024: c7 42 34 04 00 00 00 movl $0x4,0x34(%edx) the_thread->Wait.option = *set; 10c02b: 8b 0e mov (%esi),%ecx 10c02d: 89 4a 30 mov %ecx,0x30(%edx) the_thread->Wait.return_argument = the_info; 10c030: 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; 10c033: c7 05 50 9f 12 00 01 movl $0x1,0x129f50 10c03a: 00 00 00 _Thread_queue_Enter_critical_section( &_POSIX_signals_Wait_queue ); _ISR_Enable( level ); 10c03d: ff 75 d0 pushl -0x30(%ebp) 10c040: 9d popf _Thread_queue_Enqueue( &_POSIX_signals_Wait_queue, interval ); 10c041: 52 push %edx 10c042: 68 e8 ef 10 00 push $0x10efe8 10c047: 50 push %eax 10c048: 68 20 9f 12 00 push $0x129f20 10c04d: e8 86 2c 00 00 call 10ecd8 <_Thread_queue_Enqueue_with_handler> _Thread_Enable_dispatch(); 10c052: e8 71 27 00 00 call 10e7c8 <_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 ); 10c057: c7 04 24 00 00 00 00 movl $0x0,(%esp) 10c05e: 6a 00 push $0x0 10c060: 53 push %ebx 10c061: ff 33 pushl (%ebx) 10c063: 57 push %edi 10c064: e8 2f 56 00 00 call 111698 <_POSIX_signals_Clear_signals> errno = _Thread_Executing->Wait.return_code; 10c069: 83 c4 20 add $0x20,%esp 10c06c: e8 d3 88 00 00 call 114944 <__errno> 10c071: 8b 15 58 98 12 00 mov 0x129858,%edx 10c077: 8b 52 34 mov 0x34(%edx),%edx 10c07a: 89 10 mov %edx,(%eax) return the_info->si_signo; 10c07c: 8b 33 mov (%ebx),%esi } 10c07e: 89 f0 mov %esi,%eax 10c080: 8d 65 f4 lea -0xc(%ebp),%esp 10c083: 5b pop %ebx 10c084: 5e pop %esi 10c085: 5f pop %edi 10c086: c9 leave 10c087: c3 ret } /* Process pending signals? */ if ( *set & _POSIX_signals_Pending ) { signo = _POSIX_signals_Get_highest( _POSIX_signals_Pending ); 10c088: 83 ec 0c sub $0xc,%esp 10c08b: 51 push %ecx 10c08c: e8 b3 fe ff ff call 10bf44 <_POSIX_signals_Get_highest> <== ALWAYS TAKEN 10c091: 89 c6 mov %eax,%esi _POSIX_signals_Clear_signals( api, signo, the_info, true, false ); 10c093: c7 04 24 00 00 00 00 movl $0x0,(%esp) 10c09a: 6a 01 push $0x1 10c09c: 53 push %ebx 10c09d: 50 push %eax 10c09e: 57 push %edi 10c09f: e8 f4 55 00 00 call 111698 <_POSIX_signals_Clear_signals> _ISR_Enable( level ); 10c0a4: ff 75 d0 pushl -0x30(%ebp) 10c0a7: 9d popf the_info->si_signo = signo; 10c0a8: 89 33 mov %esi,(%ebx) the_info->si_code = SI_USER; 10c0aa: c7 43 04 01 00 00 00 movl $0x1,0x4(%ebx) the_info->si_value.sival_int = 0; 10c0b1: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx) return signo; 10c0b8: 83 c4 20 add $0x20,%esp */ _POSIX_signals_Clear_signals( api, the_info->si_signo, the_info, false, false ); errno = _Thread_Executing->Wait.return_code; return the_info->si_signo; } 10c0bb: 89 f0 mov %esi,%eax 10c0bd: 8d 65 f4 lea -0xc(%ebp),%esp 10c0c0: 5b pop %ebx 10c0c1: 5e pop %esi 10c0c2: 5f pop %edi 10c0c3: c9 leave 10c0c4: c3 ret 10c0c5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); interval = _Timespec_To_ticks( timeout ); if ( !interval ) rtems_set_errno_and_return_minus_one( EINVAL ); 10c0c8: 31 c0 xor %eax,%eax /* * Initialize local variables. */ the_info = ( info ) ? info : &signal_information; 10c0ca: 85 db test %ebx,%ebx 10c0cc: 0f 85 08 ff ff ff jne 10bfda 10c0d2: 8d 5d dc lea -0x24(%ebp),%ebx 10c0d5: e9 00 ff ff ff jmp 10bfda <== ALWAYS TAKEN 10c0da: 66 90 xchg %ax,%ax <== NOT EXECUTED /* API signals pending? */ _ISR_Disable( level ); if ( *set & api->signals_pending ) { /* XXX real info later */ the_info->si_signo = _POSIX_signals_Get_highest( api->signals_pending ); 10c0dc: 83 ec 0c sub $0xc,%esp 10c0df: 51 push %ecx 10c0e0: e8 5f fe ff ff call 10bf44 <_POSIX_signals_Get_highest> <== ALWAYS TAKEN 10c0e5: 89 03 mov %eax,(%ebx) _POSIX_signals_Clear_signals( 10c0e7: c7 04 24 00 00 00 00 movl $0x0,(%esp) 10c0ee: 6a 00 push $0x0 10c0f0: 53 push %ebx 10c0f1: 50 push %eax 10c0f2: 57 push %edi 10c0f3: e8 a0 55 00 00 call 111698 <_POSIX_signals_Clear_signals> the_info->si_signo, the_info, false, false ); _ISR_Enable( level ); 10c0f8: ff 75 d0 pushl -0x30(%ebp) 10c0fb: 9d popf the_info->si_code = SI_USER; 10c0fc: c7 43 04 01 00 00 00 movl $0x1,0x4(%ebx) the_info->si_value.sival_int = 0; 10c103: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx) return the_info->si_signo; 10c10a: 8b 33 mov (%ebx),%esi 10c10c: 83 c4 20 add $0x20,%esp */ _POSIX_signals_Clear_signals( api, the_info->si_signo, the_info, false, false ); errno = _Thread_Executing->Wait.return_code; return the_info->si_signo; } 10c10f: 89 f0 mov %esi,%eax 10c111: 8d 65 f4 lea -0xc(%ebp),%esp 10c114: 5b pop %ebx 10c115: 5e pop %esi 10c116: 5f pop %edi 10c117: c9 leave 10c118: c3 ret 10c119: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); interval = _Timespec_To_ticks( timeout ); if ( !interval ) rtems_set_errno_and_return_minus_one( EINVAL ); 10c11c: e8 23 88 00 00 call 114944 <__errno> 10c121: c7 00 16 00 00 00 movl $0x16,(%eax) 10c127: be ff ff ff ff mov $0xffffffff,%esi 10c12c: e9 4d ff ff ff jmp 10c07e <== ALWAYS TAKEN 0010d9b4 : int sigwait( const sigset_t *set, int *sig ) { 10d9b4: 55 push %ebp 10d9b5: 89 e5 mov %esp,%ebp 10d9b7: 53 push %ebx 10d9b8: 83 ec 08 sub $0x8,%esp 10d9bb: 8b 5d 0c mov 0xc(%ebp),%ebx int status; status = sigtimedwait( set, NULL, NULL ); 10d9be: 6a 00 push $0x0 10d9c0: 6a 00 push $0x0 10d9c2: ff 75 08 pushl 0x8(%ebp) 10d9c5: e8 26 fe ff ff call 10d7f0 <== ALWAYS TAKEN if ( status != -1 ) { 10d9ca: 83 c4 10 add $0x10,%esp 10d9cd: 83 f8 ff cmp $0xffffffff,%eax 10d9d0: 74 0e je 10d9e0 if ( sig ) 10d9d2: 85 db test %ebx,%ebx 10d9d4: 74 02 je 10d9d8 <== ALWAYS TAKEN *sig = status; 10d9d6: 89 03 mov %eax,(%ebx) 10d9d8: 31 c0 xor %eax,%eax return 0; } return errno; } 10d9da: 8b 5d fc mov -0x4(%ebp),%ebx 10d9dd: c9 leave 10d9de: c3 ret 10d9df: 90 nop <== NOT EXECUTED if ( sig ) *sig = status; return 0; } return errno; 10d9e0: e8 43 86 00 00 call 116028 <__errno> 10d9e5: 8b 00 mov (%eax),%eax } 10d9e7: 8b 5d fc mov -0x4(%ebp),%ebx 10d9ea: c9 leave 10d9eb: c3 ret 0010d99c : int sigwaitinfo( const sigset_t *set, siginfo_t *info ) { 10d99c: 55 push %ebp 10d99d: 89 e5 mov %esp,%ebp 10d99f: 83 ec 0c sub $0xc,%esp return sigtimedwait( set, info, NULL ); 10d9a2: 6a 00 push $0x0 10d9a4: ff 75 0c pushl 0xc(%ebp) 10d9a7: ff 75 08 pushl 0x8(%ebp) 10d9aa: e8 41 fe ff ff call 10d7f0 <== ALWAYS TAKEN } 10d9af: c9 leave 10d9b0: c3 ret 00109a6c : /* * Process input character, with semaphore. */ static int siproc (unsigned char c, struct rtems_termios_tty *tty) { 109a6c: 55 push %ebp <== NOT EXECUTED 109a6d: 89 e5 mov %esp,%ebp <== NOT EXECUTED 109a6f: 56 push %esi <== NOT EXECUTED 109a70: 53 push %ebx <== NOT EXECUTED 109a71: 89 d3 mov %edx,%ebx <== NOT EXECUTED 109a73: 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)) { 109a75: f7 42 3c 78 0e 00 00 testl $0xe78,0x3c(%edx) <== NOT EXECUTED 109a7c: 75 12 jne 109a90 <== 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); 109a7e: 0f b6 c0 movzbl %al,%eax <== NOT EXECUTED 109a81: 89 da mov %ebx,%edx <== NOT EXECUTED } return i; } 109a83: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED 109a86: 5b pop %ebx <== NOT EXECUTED 109a87: 5e pop %esi <== NOT EXECUTED 109a88: 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); 109a89: e9 a2 fe ff ff jmp 109930 <== NOT EXECUTED 109a8e: 66 90 xchg %ax,%ax <== NOT EXECUTED /* * Obtain output semaphore if character will be echoed */ if (tty->termios.c_lflag & (ECHO|ECHOE|ECHOK|ECHONL|ECHOPRT|ECHOCTL|ECHOKE)) { rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 109a90: 52 push %edx <== NOT EXECUTED 109a91: 6a 00 push $0x0 <== NOT EXECUTED 109a93: 6a 00 push $0x0 <== NOT EXECUTED 109a95: ff 73 18 pushl 0x18(%ebx) <== NOT EXECUTED 109a98: e8 c3 1a 00 00 call 10b560 <== NOT EXECUTED i = iproc (c, tty); 109a9d: 89 f2 mov %esi,%edx <== NOT EXECUTED 109a9f: 0f b6 c2 movzbl %dl,%eax <== NOT EXECUTED 109aa2: 89 da mov %ebx,%edx <== NOT EXECUTED 109aa4: e8 87 fe ff ff call 109930 <== NOT EXECUTED 109aa9: 89 c6 mov %eax,%esi <== NOT EXECUTED rtems_semaphore_release (tty->osem); 109aab: 58 pop %eax <== NOT EXECUTED 109aac: ff 73 18 pushl 0x18(%ebx) <== NOT EXECUTED 109aaf: e8 a8 1b 00 00 call 10b65c <== NOT EXECUTED 109ab4: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } else { i = iproc (c, tty); } return i; } 109ab7: 89 f0 mov %esi,%eax <== NOT EXECUTED 109ab9: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED 109abc: 5b pop %ebx <== NOT EXECUTED 109abd: 5e pop %esi <== NOT EXECUTED 109abe: c9 leave <== NOT EXECUTED 109abf: c3 ret <== NOT EXECUTED 0010e3e0 : int _STAT_NAME( const char *path, struct stat *buf ) { 10e3e0: 55 push %ebp 10e3e1: 89 e5 mov %esp,%ebp 10e3e3: 57 push %edi 10e3e4: 56 push %esi 10e3e5: 53 push %ebx 10e3e6: 83 ec 2c sub $0x2c,%esp 10e3e9: 8b 55 08 mov 0x8(%ebp),%edx 10e3ec: 8b 75 0c mov 0xc(%ebp),%esi /* * Check to see if we were passed a valid pointer. */ if ( !buf ) 10e3ef: 85 f6 test %esi,%esi 10e3f1: 0f 84 9d 00 00 00 je 10e494 rtems_set_errno_and_return_minus_one( EFAULT ); status = rtems_filesystem_evaluate_path( path, strlen( path ), 10e3f7: b9 ff ff ff ff mov $0xffffffff,%ecx 10e3fc: 89 d7 mov %edx,%edi 10e3fe: 31 c0 xor %eax,%eax 10e400: f2 ae repnz scas %es:(%edi),%al 10e402: f7 d1 not %ecx 10e404: 49 dec %ecx 10e405: 83 ec 0c sub $0xc,%esp 10e408: 6a 01 push $0x1 10e40a: 8d 5d d4 lea -0x2c(%ebp),%ebx 10e40d: 53 push %ebx 10e40e: 6a 00 push $0x0 10e410: 51 push %ecx 10e411: 52 push %edx 10e412: e8 29 ea ff ff call 10ce40 0, &loc, _STAT_FOLLOW_LINKS ); if ( status != 0 ) 10e417: 83 c4 20 add $0x20,%esp 10e41a: 85 c0 test %eax,%eax 10e41c: 75 66 jne 10e484 return -1; if ( !loc.handlers->fstat_h ){ 10e41e: 8b 55 dc mov -0x24(%ebp),%edx 10e421: 8b 42 18 mov 0x18(%edx),%eax 10e424: 85 c0 test %eax,%eax 10e426: 74 39 je 10e461 <== ALWAYS TAKEN /* * Zero out the stat structure so the various support * versions of stat don't have to. */ memset( buf, 0, sizeof(struct stat) ); 10e428: b9 44 00 00 00 mov $0x44,%ecx 10e42d: 89 f7 mov %esi,%edi 10e42f: 31 c0 xor %eax,%eax 10e431: f3 aa rep stos %al,%es:(%edi) status = (*loc.handlers->fstat_h)( &loc, buf ); 10e433: 83 ec 08 sub $0x8,%esp 10e436: 56 push %esi 10e437: 53 push %ebx 10e438: ff 52 18 call *0x18(%edx) 10e43b: 89 c6 mov %eax,%esi rtems_filesystem_freenode( &loc ); 10e43d: 8b 45 e0 mov -0x20(%ebp),%eax 10e440: 83 c4 10 add $0x10,%esp 10e443: 85 c0 test %eax,%eax 10e445: 74 10 je 10e457 <== ALWAYS TAKEN 10e447: 8b 40 1c mov 0x1c(%eax),%eax 10e44a: 85 c0 test %eax,%eax 10e44c: 74 09 je 10e457 <== ALWAYS TAKEN 10e44e: 83 ec 0c sub $0xc,%esp 10e451: 53 push %ebx 10e452: ff d0 call *%eax 10e454: 83 c4 10 add $0x10,%esp return status; } 10e457: 89 f0 mov %esi,%eax 10e459: 8d 65 f4 lea -0xc(%ebp),%esp 10e45c: 5b pop %ebx 10e45d: 5e pop %esi 10e45e: 5f pop %edi 10e45f: c9 leave 10e460: c3 ret 0, &loc, _STAT_FOLLOW_LINKS ); if ( status != 0 ) return -1; if ( !loc.handlers->fstat_h ){ rtems_filesystem_freenode( &loc ); 10e461: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED 10e464: 85 c0 test %eax,%eax <== NOT EXECUTED 10e466: 74 10 je 10e478 <== NOT EXECUTED 10e468: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 10e46b: 85 c0 test %eax,%eax <== NOT EXECUTED 10e46d: 74 09 je 10e478 <== NOT EXECUTED 10e46f: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10e472: 53 push %ebx <== NOT EXECUTED 10e473: ff d0 call *%eax <== NOT EXECUTED 10e475: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 10e478: e8 93 40 03 00 call 142510 <__errno> <== NOT EXECUTED 10e47d: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 10e483: 90 nop <== NOT EXECUTED 10e484: be ff ff ff ff mov $0xffffffff,%esi status = (*loc.handlers->fstat_h)( &loc, buf ); rtems_filesystem_freenode( &loc ); return status; } 10e489: 89 f0 mov %esi,%eax 10e48b: 8d 65 f4 lea -0xc(%ebp),%esp 10e48e: 5b pop %ebx 10e48f: 5e pop %esi 10e490: 5f pop %edi 10e491: c9 leave 10e492: c3 ret 10e493: 90 nop <== NOT EXECUTED /* * Check to see if we were passed a valid pointer. */ if ( !buf ) rtems_set_errno_and_return_minus_one( EFAULT ); 10e494: e8 77 40 03 00 call 142510 <__errno> 10e499: c7 00 0e 00 00 00 movl $0xe,(%eax) 10e49f: be ff ff ff ff mov $0xffffffff,%esi status = (*loc.handlers->fstat_h)( &loc, buf ); rtems_filesystem_freenode( &loc ); return status; } 10e4a4: 89 f0 mov %esi,%eax 10e4a6: 8d 65 f4 lea -0xc(%ebp),%esp 10e4a9: 5b pop %ebx 10e4aa: 5e pop %esi 10e4ab: 5f pop %edi 10e4ac: c9 leave 10e4ad: c3 ret 0012cad4 : */ extern rtems_chain_control rtems_filesystem_mount_table_control; int statvfs (const char *path, struct statvfs *sb) { 12cad4: 55 push %ebp <== NOT EXECUTED 12cad5: 89 e5 mov %esp,%ebp <== NOT EXECUTED 12cad7: 57 push %edi <== NOT EXECUTED 12cad8: 56 push %esi <== NOT EXECUTED 12cad9: 53 push %ebx <== NOT EXECUTED 12cada: 83 ec 38 sub $0x38,%esp <== NOT EXECUTED 12cadd: 8b 55 08 mov 0x8(%ebp),%edx <== NOT EXECUTED 12cae0: 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 ) ) 12cae3: b9 ff ff ff ff mov $0xffffffff,%ecx <== NOT EXECUTED 12cae8: 89 d7 mov %edx,%edi <== NOT EXECUTED 12caea: 31 c0 xor %eax,%eax <== NOT EXECUTED 12caec: f2 ae repnz scas %es:(%edi),%al <== NOT EXECUTED 12caee: f7 d1 not %ecx <== NOT EXECUTED 12caf0: 49 dec %ecx <== NOT EXECUTED 12caf1: 6a 01 push $0x1 <== NOT EXECUTED 12caf3: 8d 5d d4 lea -0x2c(%ebp),%ebx <== NOT EXECUTED 12caf6: 53 push %ebx <== NOT EXECUTED 12caf7: 6a 00 push $0x0 <== NOT EXECUTED 12caf9: 51 push %ecx <== NOT EXECUTED 12cafa: 52 push %edx <== NOT EXECUTED 12cafb: e8 40 03 fe ff call 10ce40 <== NOT EXECUTED 12cb00: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 12cb03: 85 c0 test %eax,%eax <== NOT EXECUTED 12cb05: 75 59 jne 12cb60 <== NOT EXECUTED return -1; mt_entry = loc.mt_entry; 12cb07: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED fs_mount_root = &mt_entry->mt_fs_root; 12cb0a: 8b 42 28 mov 0x28(%edx),%eax <== NOT EXECUTED 12cb0d: 8b 40 44 mov 0x44(%eax),%eax <== NOT EXECUTED 12cb10: 85 c0 test %eax,%eax <== NOT EXECUTED 12cb12: 74 3f je 12cb53 <== NOT EXECUTED if ( !fs_mount_root->ops->statvfs_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); memset (sb, 0, sizeof (struct statvfs)); 12cb14: b9 38 00 00 00 mov $0x38,%ecx <== NOT EXECUTED 12cb19: 89 f7 mov %esi,%edi <== NOT EXECUTED 12cb1b: 31 c0 xor %eax,%eax <== NOT EXECUTED 12cb1d: f3 aa rep stos %al,%es:(%edi) <== NOT EXECUTED result = ( fs_mount_root->ops->statvfs_h )( fs_mount_root, sb ); 12cb1f: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 12cb22: 8b 42 28 mov 0x28(%edx),%eax <== NOT EXECUTED 12cb25: 56 push %esi <== NOT EXECUTED 12cb26: 83 c2 1c add $0x1c,%edx <== NOT EXECUTED 12cb29: 52 push %edx <== NOT EXECUTED 12cb2a: ff 50 44 call *0x44(%eax) <== NOT EXECUTED 12cb2d: 89 c6 mov %eax,%esi <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 12cb2f: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED 12cb32: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 12cb35: 85 c0 test %eax,%eax <== NOT EXECUTED 12cb37: 74 10 je 12cb49 <== NOT EXECUTED 12cb39: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 12cb3c: 85 c0 test %eax,%eax <== NOT EXECUTED 12cb3e: 74 09 je 12cb49 <== NOT EXECUTED 12cb40: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12cb43: 53 push %ebx <== NOT EXECUTED 12cb44: ff d0 call *%eax <== NOT EXECUTED 12cb46: 83 c4 10 add $0x10,%esp <== NOT EXECUTED return result; } 12cb49: 89 f0 mov %esi,%eax <== NOT EXECUTED 12cb4b: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 12cb4e: 5b pop %ebx <== NOT EXECUTED 12cb4f: 5e pop %esi <== NOT EXECUTED 12cb50: 5f pop %edi <== NOT EXECUTED 12cb51: c9 leave <== NOT EXECUTED 12cb52: c3 ret <== NOT EXECUTED mt_entry = loc.mt_entry; fs_mount_root = &mt_entry->mt_fs_root; if ( !fs_mount_root->ops->statvfs_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 12cb53: e8 b8 59 01 00 call 142510 <__errno> <== NOT EXECUTED 12cb58: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 12cb5e: 66 90 xchg %ax,%ax <== NOT EXECUTED 12cb60: be ff ff ff ff mov $0xffffffff,%esi <== NOT EXECUTED result = ( fs_mount_root->ops->statvfs_h )( fs_mount_root, sb ); rtems_filesystem_freenode( &loc ); return result; } 12cb65: 89 f0 mov %esi,%eax <== NOT EXECUTED 12cb67: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 12cb6a: 5b pop %ebx <== NOT EXECUTED 12cb6b: 5e pop %esi <== NOT EXECUTED 12cb6c: 5f pop %edi <== NOT EXECUTED 12cb6d: c9 leave <== NOT EXECUTED 12cb6e: c3 ret <== NOT EXECUTED 0012cb70 : int symlink( const char *actualpath, const char *sympath ) { 12cb70: 55 push %ebp 12cb71: 89 e5 mov %esp,%ebp 12cb73: 57 push %edi 12cb74: 56 push %esi 12cb75: 53 push %ebx 12cb76: 83 ec 2c sub $0x2c,%esp 12cb79: 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 ); 12cb7c: 8a 10 mov (%eax),%dl 12cb7e: 80 fa 2f cmp $0x2f,%dl 12cb81: 74 09 je 12cb8c 12cb83: 80 fa 5c cmp $0x5c,%dl 12cb86: 74 04 je 12cb8c <== ALWAYS TAKEN 12cb88: 84 d2 test %dl,%dl 12cb8a: 75 70 jne 12cbfc <== NEVER TAKEN 12cb8c: 8d 5d d0 lea -0x30(%ebp),%ebx 12cb8f: 8b 35 c4 93 16 00 mov 0x1693c4,%esi 12cb95: 83 c6 18 add $0x18,%esi 12cb98: b9 05 00 00 00 mov $0x5,%ecx 12cb9d: 89 df mov %ebx,%edi 12cb9f: f3 a5 rep movsl %ds:(%esi),%es:(%edi) 12cba1: b1 01 mov $0x1,%cl if ( !loc.ops->evalformake_h ) { 12cba3: 8b 55 dc mov -0x24(%ebp),%edx 12cba6: 8b 52 04 mov 0x4(%edx),%edx 12cba9: 85 d2 test %edx,%edx 12cbab: 74 6e je 12cc1b <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.ops->evalformake_h)( &sympath[i], &loc, &name_start ); 12cbad: 56 push %esi 12cbae: 8d 75 e4 lea -0x1c(%ebp),%esi 12cbb1: 56 push %esi 12cbb2: 53 push %ebx 12cbb3: 01 c8 add %ecx,%eax 12cbb5: 50 push %eax 12cbb6: ff d2 call *%edx if ( result != 0 ) 12cbb8: 83 c4 10 add $0x10,%esp 12cbbb: 85 c0 test %eax,%eax 12cbbd: 75 67 jne 12cc26 return -1; if ( !loc.ops->symlink_h ) { 12cbbf: 8b 55 dc mov -0x24(%ebp),%edx 12cbc2: 8b 42 38 mov 0x38(%edx),%eax 12cbc5: 85 c0 test %eax,%eax 12cbc7: 74 6c je 12cc35 <== ALWAYS TAKEN rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.ops->symlink_h)( &loc, actualpath, name_start); 12cbc9: 52 push %edx 12cbca: ff 75 e4 pushl -0x1c(%ebp) 12cbcd: ff 75 08 pushl 0x8(%ebp) 12cbd0: 53 push %ebx 12cbd1: ff d0 call *%eax 12cbd3: 89 c6 mov %eax,%esi rtems_filesystem_freenode( &loc ); 12cbd5: 8b 45 dc mov -0x24(%ebp),%eax 12cbd8: 83 c4 10 add $0x10,%esp 12cbdb: 85 c0 test %eax,%eax 12cbdd: 74 10 je 12cbef <== ALWAYS TAKEN 12cbdf: 8b 40 1c mov 0x1c(%eax),%eax 12cbe2: 85 c0 test %eax,%eax 12cbe4: 74 09 je 12cbef <== ALWAYS TAKEN 12cbe6: 83 ec 0c sub $0xc,%esp 12cbe9: 53 push %ebx 12cbea: ff d0 call *%eax 12cbec: 83 c4 10 add $0x10,%esp return result; } 12cbef: 89 f0 mov %esi,%eax 12cbf1: 8d 65 f4 lea -0xc(%ebp),%esp 12cbf4: 5b pop %ebx 12cbf5: 5e pop %esi 12cbf6: 5f pop %edi 12cbf7: c9 leave 12cbf8: c3 ret 12cbf9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED rtems_filesystem_location_info_t loc; int i; const char *name_start; int result; rtems_filesystem_get_start_loc( sympath, &i, &loc ); 12cbfc: 8d 5d d0 lea -0x30(%ebp),%ebx 12cbff: 8b 35 c4 93 16 00 mov 0x1693c4,%esi 12cc05: 83 c6 04 add $0x4,%esi 12cc08: b9 05 00 00 00 mov $0x5,%ecx 12cc0d: 89 df mov %ebx,%edi 12cc0f: f3 a5 rep movsl %ds:(%esi),%es:(%edi) if ( !loc.ops->evalformake_h ) { 12cc11: 8b 55 dc mov -0x24(%ebp),%edx 12cc14: 8b 52 04 mov 0x4(%edx),%edx 12cc17: 85 d2 test %edx,%edx 12cc19: 75 92 jne 12cbad <== NEVER TAKEN if ( result != 0 ) return -1; if ( !loc.ops->symlink_h ) { rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); 12cc1b: e8 f0 58 01 00 call 142510 <__errno> <== NOT EXECUTED 12cc20: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 12cc26: be ff ff ff ff mov $0xffffffff,%esi result = (*loc.ops->symlink_h)( &loc, actualpath, name_start); rtems_filesystem_freenode( &loc ); return result; } 12cc2b: 89 f0 mov %esi,%eax 12cc2d: 8d 65 f4 lea -0xc(%ebp),%esp 12cc30: 5b pop %ebx 12cc31: 5e pop %esi 12cc32: 5f pop %edi 12cc33: c9 leave 12cc34: c3 ret result = (*loc.ops->evalformake_h)( &sympath[i], &loc, &name_start ); if ( result != 0 ) return -1; if ( !loc.ops->symlink_h ) { rtems_filesystem_freenode( &loc ); 12cc35: 8b 42 1c mov 0x1c(%edx),%eax <== NOT EXECUTED 12cc38: 85 c0 test %eax,%eax <== NOT EXECUTED 12cc3a: 74 df je 12cc1b <== NOT EXECUTED 12cc3c: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12cc3f: 53 push %ebx <== NOT EXECUTED 12cc40: ff d0 call *%eax <== NOT EXECUTED 12cc42: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 12cc45: eb d4 jmp 12cc1b <== NOT EXECUTED 0010a594 : fdatasync(fn); } /* iterate over all FILE *'s for this thread */ static void sync_per_thread(Thread_Control *t) { 10a594: 55 push %ebp 10a595: 89 e5 mov %esp,%ebp 10a597: 53 push %ebx 10a598: 83 ec 04 sub $0x4,%esp 10a59b: 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; 10a59e: 8b 90 f0 00 00 00 mov 0xf0(%eax),%edx if ( this_reent ) { 10a5a4: 85 d2 test %edx,%edx 10a5a6: 74 33 je 10a5db <== ALWAYS TAKEN current_reent = _Thread_Executing->libc_reent; 10a5a8: 8b 0d b8 aa 12 00 mov 0x12aab8,%ecx 10a5ae: 8b 99 f0 00 00 00 mov 0xf0(%ecx),%ebx _Thread_Executing->libc_reent = this_reent; 10a5b4: 89 91 f0 00 00 00 mov %edx,0xf0(%ecx) _fwalk (t->libc_reent, sync_wrapper); 10a5ba: 83 ec 08 sub $0x8,%esp 10a5bd: 68 08 a6 10 00 push $0x10a608 10a5c2: ff b0 f0 00 00 00 pushl 0xf0(%eax) 10a5c8: e8 8f c6 00 00 call 116c5c <_fwalk> _Thread_Executing->libc_reent = current_reent; 10a5cd: a1 b8 aa 12 00 mov 0x12aab8,%eax 10a5d2: 89 98 f0 00 00 00 mov %ebx,0xf0(%eax) 10a5d8: 83 c4 10 add $0x10,%esp } } 10a5db: 8b 5d fc mov -0x4(%ebp),%ebx 10a5de: c9 leave 10a5df: c3 ret 0010b060 : */ long sysconf( int name ) { 10b060: 55 push %ebp 10b061: 89 e5 mov %esp,%ebp 10b063: 83 ec 08 sub $0x8,%esp 10b066: 8b 45 08 mov 0x8(%ebp),%eax if ( name == _SC_CLK_TCK ) 10b069: 83 f8 02 cmp $0x2,%eax 10b06c: 74 16 je 10b084 return (TOD_MICROSECONDS_PER_SECOND / rtems_configuration_get_microseconds_per_tick()); if ( name == _SC_OPEN_MAX ) 10b06e: 83 f8 04 cmp $0x4,%eax 10b071: 74 21 je 10b094 return rtems_libio_number_iops; if ( name == _SC_GETPW_R_SIZE_MAX ) 10b073: 83 f8 33 cmp $0x33,%eax 10b076: 74 24 je 10b09c return 1024; if ( name == _SC_PAGESIZE ) 10b078: 83 f8 08 cmp $0x8,%eax 10b07b: 75 27 jne 10b0a4 10b07d: 66 b8 00 10 mov $0x1000,%ax if ( name == 515 ) /* Solaris _SC_STACK_PROT */ return 0; #endif rtems_set_errno_and_return_minus_one( EINVAL ); } 10b081: c9 leave 10b082: c3 ret 10b083: 90 nop <== NOT EXECUTED long sysconf( int name ) { if ( name == _SC_CLK_TCK ) return (TOD_MICROSECONDS_PER_SECOND / 10b084: b8 40 42 0f 00 mov $0xf4240,%eax 10b089: 31 d2 xor %edx,%edx 10b08b: f7 35 6c 42 12 00 divl 0x12426c if ( name == 515 ) /* Solaris _SC_STACK_PROT */ return 0; #endif rtems_set_errno_and_return_minus_one( EINVAL ); } 10b091: c9 leave 10b092: c3 ret 10b093: 90 nop <== NOT EXECUTED if ( name == _SC_CLK_TCK ) return (TOD_MICROSECONDS_PER_SECOND / rtems_configuration_get_microseconds_per_tick()); if ( name == _SC_OPEN_MAX ) return rtems_libio_number_iops; 10b094: a1 4c 41 12 00 mov 0x12414c,%eax if ( name == 515 ) /* Solaris _SC_STACK_PROT */ return 0; #endif rtems_set_errno_and_return_minus_one( EINVAL ); } 10b099: c9 leave 10b09a: c3 ret 10b09b: 90 nop <== NOT EXECUTED rtems_configuration_get_microseconds_per_tick()); if ( name == _SC_OPEN_MAX ) return rtems_libio_number_iops; if ( name == _SC_GETPW_R_SIZE_MAX ) 10b09c: 66 b8 00 04 mov $0x400,%ax if ( name == 515 ) /* Solaris _SC_STACK_PROT */ return 0; #endif rtems_set_errno_and_return_minus_one( EINVAL ); } 10b0a0: c9 leave 10b0a1: c3 ret 10b0a2: 66 90 xchg %ax,%ax <== NOT EXECUTED #if defined(__sparc__) if ( name == 515 ) /* Solaris _SC_STACK_PROT */ return 0; #endif rtems_set_errno_and_return_minus_one( EINVAL ); 10b0a4: e8 23 8d 00 00 call 113dcc <__errno> 10b0a9: c7 00 16 00 00 00 movl $0x16,(%eax) 10b0af: b8 ff ff ff ff mov $0xffffffff,%eax } 10b0b4: c9 leave 10b0b5: c3 ret 00117200 : int tcsetattr( int fd, int opt, struct termios *tp ) { 117200: 55 push %ebp 117201: 89 e5 mov %esp,%ebp 117203: 56 push %esi 117204: 53 push %ebx 117205: 8b 5d 08 mov 0x8(%ebp),%ebx 117208: 8b 45 0c mov 0xc(%ebp),%eax 11720b: 8b 75 10 mov 0x10(%ebp),%esi switch (opt) { 11720e: 85 c0 test %eax,%eax 117210: 74 2c je 11723e <== NEVER TAKEN 117212: 48 dec %eax <== NOT EXECUTED 117213: 74 17 je 11722c <== NOT EXECUTED default: rtems_set_errno_and_return_minus_one( ENOTSUP ); 117215: e8 16 4c 00 00 call 11be30 <__errno> <== NOT EXECUTED 11721a: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED * Fall through to.... */ case TCSANOW: return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp ); } } 117220: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 117225: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED 117228: 5b pop %ebx <== NOT EXECUTED 117229: 5e pop %esi <== NOT EXECUTED 11722a: c9 leave <== NOT EXECUTED 11722b: c3 ret <== NOT EXECUTED switch (opt) { default: rtems_set_errno_and_return_minus_one( ENOTSUP ); case TCSADRAIN: if (ioctl( fd, RTEMS_IO_TCDRAIN, NULL ) < 0) 11722c: 50 push %eax <== NOT EXECUTED 11722d: 6a 00 push $0x0 <== NOT EXECUTED 11722f: 6a 03 push $0x3 <== NOT EXECUTED 117231: 53 push %ebx <== NOT EXECUTED 117232: e8 95 36 00 00 call 11a8cc <== NOT EXECUTED 117237: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 11723a: 85 c0 test %eax,%eax <== NOT EXECUTED 11723c: 78 e2 js 117220 <== NOT EXECUTED return -1; /* * Fall through to.... */ case TCSANOW: return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp ); 11723e: 89 75 10 mov %esi,0x10(%ebp) 117241: c7 45 0c 02 00 00 00 movl $0x2,0xc(%ebp) 117248: 89 5d 08 mov %ebx,0x8(%ebp) } } 11724b: 8d 65 f8 lea -0x8(%ebp),%esp 11724e: 5b pop %ebx 11724f: 5e pop %esi 117250: c9 leave return -1; /* * Fall through to.... */ case TCSANOW: return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp ); 117251: e9 76 36 00 00 jmp 11a8cc 0010b3a0 : int timer_create( clockid_t clock_id, struct sigevent *evp, timer_t *timerid ) { 10b3a0: 55 push %ebp 10b3a1: 89 e5 mov %esp,%ebp 10b3a3: 56 push %esi 10b3a4: 53 push %ebx 10b3a5: 8b 5d 0c mov 0xc(%ebp),%ebx 10b3a8: 8b 75 10 mov 0x10(%ebp),%esi POSIX_Timer_Control *ptimer; if ( clock_id != CLOCK_REALTIME ) 10b3ab: 83 7d 08 01 cmpl $0x1,0x8(%ebp) 10b3af: 0f 85 db 00 00 00 jne 10b490 rtems_set_errno_and_return_minus_one( EINVAL ); if ( !timerid ) 10b3b5: 85 f6 test %esi,%esi 10b3b7: 0f 84 d3 00 00 00 je 10b490 /* * The data of the structure evp are checked in order to verify if they * are coherent. */ if (evp != NULL) { 10b3bd: 85 db test %ebx,%ebx 10b3bf: 74 21 je 10b3e2 /* The structure has data */ if ( ( evp->sigev_notify != SIGEV_NONE ) && 10b3c1: 8b 03 mov (%ebx),%eax 10b3c3: 48 dec %eax 10b3c4: 83 f8 01 cmp $0x1,%eax 10b3c7: 0f 87 c3 00 00 00 ja 10b490 <== 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 ) 10b3cd: 8b 43 04 mov 0x4(%ebx),%eax 10b3d0: 85 c0 test %eax,%eax 10b3d2: 0f 84 b8 00 00 00 je 10b490 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(evp->sigev_signo) ) 10b3d8: 48 dec %eax 10b3d9: 83 f8 1f cmp $0x1f,%eax 10b3dc: 0f 87 ae 00 00 00 ja 10b490 <== ALWAYS TAKEN rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10b3e2: a1 b8 93 12 00 mov 0x1293b8,%eax 10b3e7: 40 inc %eax 10b3e8: a3 b8 93 12 00 mov %eax,0x1293b8 * 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 ); 10b3ed: 83 ec 0c sub $0xc,%esp 10b3f0: 68 40 97 12 00 push $0x129740 10b3f5: e8 2a 1e 00 00 call 10d224 <_Objects_Allocate> /* * Allocate a timer */ ptimer = _POSIX_Timer_Allocate(); if ( !ptimer ) { 10b3fa: 83 c4 10 add $0x10,%esp 10b3fd: 85 c0 test %eax,%eax 10b3ff: 0f 84 a2 00 00 00 je 10b4a7 rtems_set_errno_and_return_minus_one( EAGAIN ); } /* The data of the created timer are stored to use them later */ ptimer->state = POSIX_TIMER_STATE_CREATE_NEW; 10b405: c6 40 3c 02 movb $0x2,0x3c(%eax) ptimer->thread_id = _Thread_Executing->Object.id; 10b409: 8b 15 78 94 12 00 mov 0x129478,%edx 10b40f: 8b 52 08 mov 0x8(%edx),%edx 10b412: 89 50 38 mov %edx,0x38(%eax) if ( evp != NULL ) { 10b415: 85 db test %ebx,%ebx 10b417: 74 11 je 10b42a ptimer->inf.sigev_notify = evp->sigev_notify; 10b419: 8b 13 mov (%ebx),%edx 10b41b: 89 50 40 mov %edx,0x40(%eax) ptimer->inf.sigev_signo = evp->sigev_signo; 10b41e: 8b 53 04 mov 0x4(%ebx),%edx 10b421: 89 50 44 mov %edx,0x44(%eax) ptimer->inf.sigev_value = evp->sigev_value; 10b424: 8b 53 08 mov 0x8(%ebx),%edx 10b427: 89 50 48 mov %edx,0x48(%eax) } ptimer->overrun = 0; 10b42a: c7 40 68 00 00 00 00 movl $0x0,0x68(%eax) ptimer->timer_data.it_value.tv_sec = 0; 10b431: c7 40 5c 00 00 00 00 movl $0x0,0x5c(%eax) ptimer->timer_data.it_value.tv_nsec = 0; 10b438: c7 40 60 00 00 00 00 movl $0x0,0x60(%eax) ptimer->timer_data.it_interval.tv_sec = 0; 10b43f: c7 40 54 00 00 00 00 movl $0x0,0x54(%eax) ptimer->timer_data.it_interval.tv_nsec = 0; 10b446: 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; 10b44d: c7 40 18 00 00 00 00 movl $0x0,0x18(%eax) the_watchdog->routine = routine; 10b454: c7 40 2c 00 00 00 00 movl $0x0,0x2c(%eax) the_watchdog->id = id; 10b45b: c7 40 30 00 00 00 00 movl $0x0,0x30(%eax) the_watchdog->user_data = user_data; 10b462: 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; 10b469: 8b 50 08 mov 0x8(%eax),%edx 10b46c: 0f b7 da movzwl %dx,%ebx 10b46f: 8b 0d 5c 97 12 00 mov 0x12975c,%ecx 10b475: 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; 10b478: 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; 10b47f: 89 16 mov %edx,(%esi) _Thread_Enable_dispatch(); 10b481: e8 c2 2a 00 00 call 10df48 <_Thread_Enable_dispatch> 10b486: 31 c0 xor %eax,%eax return 0; } 10b488: 8d 65 f8 lea -0x8(%ebp),%esp 10b48b: 5b pop %ebx 10b48c: 5e pop %esi 10b48d: c9 leave 10b48e: c3 ret 10b48f: 90 nop <== NOT EXECUTED if ( !evp->sigev_signo ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(evp->sigev_signo) ) rtems_set_errno_and_return_minus_one( EINVAL ); 10b490: e8 9f 8e 00 00 call 114334 <__errno> 10b495: c7 00 16 00 00 00 movl $0x16,(%eax) 10b49b: b8 ff ff ff ff mov $0xffffffff,%eax _Objects_Open_u32(&_POSIX_Timer_Information, &ptimer->Object, 0); *timerid = ptimer->Object.id; _Thread_Enable_dispatch(); return 0; } 10b4a0: 8d 65 f8 lea -0x8(%ebp),%esp 10b4a3: 5b pop %ebx 10b4a4: 5e pop %esi 10b4a5: c9 leave 10b4a6: c3 ret /* * Allocate a timer */ ptimer = _POSIX_Timer_Allocate(); if ( !ptimer ) { _Thread_Enable_dispatch(); 10b4a7: e8 9c 2a 00 00 call 10df48 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EAGAIN ); 10b4ac: e8 83 8e 00 00 call 114334 <__errno> 10b4b1: c7 00 0b 00 00 00 movl $0xb,(%eax) 10b4b7: b8 ff ff ff ff mov $0xffffffff,%eax 10b4bc: eb ca jmp 10b488 <== ALWAYS TAKEN 0010b890 : int timer_delete( timer_t timerid ) { 10b890: 55 push %ebp 10b891: 89 e5 mov %esp,%ebp 10b893: 53 push %ebx 10b894: 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 *) 10b897: 8d 45 f4 lea -0xc(%ebp),%eax 10b89a: 50 push %eax 10b89b: ff 75 08 pushl 0x8(%ebp) 10b89e: 68 60 97 12 00 push $0x129760 10b8a3: e8 34 21 00 00 call 10d9dc <_Objects_Get> 10b8a8: 89 c3 mov %eax,%ebx */ POSIX_Timer_Control *ptimer; Objects_Locations location; ptimer = _POSIX_Timer_Get( timerid, &location ); switch ( location ) { 10b8aa: 83 c4 10 add $0x10,%esp 10b8ad: 8b 4d f4 mov -0xc(%ebp),%ecx 10b8b0: 85 c9 test %ecx,%ecx 10b8b2: 74 18 je 10b8cc #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 10b8b4: e8 37 91 00 00 call 1149f0 <__errno> 10b8b9: c7 00 16 00 00 00 movl $0x16,(%eax) 10b8bf: b8 ff ff ff ff mov $0xffffffff,%eax } 10b8c4: 8b 5d fc mov -0x4(%ebp),%ebx 10b8c7: c9 leave 10b8c8: c3 ret 10b8c9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED ptimer = _POSIX_Timer_Get( timerid, &location ); switch ( location ) { case OBJECTS_LOCAL: _Objects_Close( &_POSIX_Timer_Information, &ptimer->Object ); 10b8cc: 83 ec 08 sub $0x8,%esp 10b8cf: 50 push %eax 10b8d0: 68 60 97 12 00 push $0x129760 10b8d5: e8 ce 1c 00 00 call 10d5a8 <_Objects_Close> ptimer->state = POSIX_TIMER_STATE_FREE; 10b8da: c6 43 3c 01 movb $0x1,0x3c(%ebx) (void) _Watchdog_Remove( &ptimer->Timer ); 10b8de: 8d 43 10 lea 0x10(%ebx),%eax 10b8e1: 89 04 24 mov %eax,(%esp) 10b8e4: e8 ab 3a 00 00 call 10f394 <_Watchdog_Remove> RTEMS_INLINE_ROUTINE void _POSIX_Timer_Free ( POSIX_Timer_Control *the_timer ) { _Objects_Free( &_POSIX_Timer_Information, &the_timer->Object ); 10b8e9: 58 pop %eax 10b8ea: 5a pop %edx 10b8eb: 53 push %ebx 10b8ec: 68 60 97 12 00 push $0x129760 10b8f1: e8 b6 1f 00 00 call 10d8ac <_Objects_Free> _POSIX_Timer_Free( ptimer ); _Thread_Enable_dispatch(); 10b8f6: e8 55 29 00 00 call 10e250 <_Thread_Enable_dispatch> 10b8fb: 31 c0 xor %eax,%eax return 0; 10b8fd: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); } 10b900: 8b 5d fc mov -0x4(%ebp),%ebx 10b903: c9 leave 10b904: c3 ret 0010c774 : * its execution, _POSIX_Timer_TSR will have to set this counter to 0. */ int timer_getoverrun( timer_t timerid ) { 10c774: 55 push %ebp 10c775: 89 e5 mov %esp,%ebp 10c777: 53 push %ebx 10c778: 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 *) 10c77b: 8d 45 f4 lea -0xc(%ebp),%eax 10c77e: 50 push %eax 10c77f: ff 75 08 pushl 0x8(%ebp) 10c782: 68 80 b0 12 00 push $0x12b080 10c787: e8 bc 20 00 00 call 10e848 <_Objects_Get> int overrun; POSIX_Timer_Control *ptimer; Objects_Locations location; ptimer = _POSIX_Timer_Get( timerid, &location ); switch ( location ) { 10c78c: 83 c4 10 add $0x10,%esp 10c78f: 8b 55 f4 mov -0xc(%ebp),%edx 10c792: 85 d2 test %edx,%edx 10c794: 74 1a je 10c7b0 #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 10c796: e8 35 8d 00 00 call 1154d0 <__errno> 10c79b: c7 00 16 00 00 00 movl $0x16,(%eax) 10c7a1: bb ff ff ff ff mov $0xffffffff,%ebx } 10c7a6: 89 d8 mov %ebx,%eax 10c7a8: 8b 5d fc mov -0x4(%ebp),%ebx 10c7ab: c9 leave 10c7ac: c3 ret 10c7ad: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED ptimer = _POSIX_Timer_Get( timerid, &location ); switch ( location ) { case OBJECTS_LOCAL: overrun = ptimer->overrun; 10c7b0: 8b 58 68 mov 0x68(%eax),%ebx ptimer->overrun = 0; 10c7b3: c7 40 68 00 00 00 00 movl $0x0,0x68(%eax) _Thread_Enable_dispatch(); 10c7ba: e8 fd 28 00 00 call 10f0bc <_Thread_Enable_dispatch> case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); } 10c7bf: 89 d8 mov %ebx,%eax 10c7c1: 8b 5d fc mov -0x4(%ebp),%ebx 10c7c4: c9 leave 10c7c5: c3 ret 0010c7c8 : int timer_gettime( timer_t timerid, struct itimerspec *value ) { 10c7c8: 55 push %ebp 10c7c9: 89 e5 mov %esp,%ebp 10c7cb: 56 push %esi 10c7cc: 53 push %ebx 10c7cd: 83 ec 10 sub $0x10,%esp 10c7d0: 8b 5d 0c mov 0xc(%ebp),%ebx POSIX_Timer_Control *ptimer; Objects_Locations location; struct timespec current_time; Watchdog_Interval left; if ( !value ) 10c7d3: 85 db test %ebx,%ebx 10c7d5: 74 65 je 10c83c rtems_set_errno_and_return_minus_one( EINVAL ); /* Reads the current time */ _TOD_Get( ¤t_time ); 10c7d7: 83 ec 0c sub $0xc,%esp 10c7da: 8d 45 ec lea -0x14(%ebp),%eax 10c7dd: 50 push %eax 10c7de: e8 cd 16 00 00 call 10deb0 <_TOD_Get> 10c7e3: 83 c4 0c add $0xc,%esp 10c7e6: 8d 45 f4 lea -0xc(%ebp),%eax 10c7e9: 50 push %eax 10c7ea: ff 75 08 pushl 0x8(%ebp) 10c7ed: 68 80 b0 12 00 push $0x12b080 10c7f2: e8 51 20 00 00 call 10e848 <_Objects_Get> 10c7f7: 89 c6 mov %eax,%esi ptimer = _POSIX_Timer_Get( timerid, &location ); switch ( location ) { 10c7f9: 83 c4 10 add $0x10,%esp 10c7fc: 8b 45 f4 mov -0xc(%ebp),%eax 10c7ff: 85 c0 test %eax,%eax 10c801: 75 39 jne 10c83c case OBJECTS_LOCAL: /* Calculates the time left before the timer finishes */ left = (ptimer->Timer.start_time + ptimer->Timer.initial) - /* expire */ 10c803: a1 64 ae 12 00 mov 0x12ae64,%eax _Watchdog_Ticks_since_boot; /* now */ _Timespec_From_ticks( left, &value->it_value ); 10c808: 83 ec 08 sub $0x8,%esp 10c80b: 8d 53 08 lea 0x8(%ebx),%edx 10c80e: 52 push %edx 10c80f: 8b 56 1c mov 0x1c(%esi),%edx 10c812: 03 56 24 add 0x24(%esi),%edx 10c815: 29 c2 sub %eax,%edx 10c817: 52 push %edx 10c818: e8 1b 35 00 00 call 10fd38 <_Timespec_From_ticks> value->it_interval = ptimer->timer_data.it_interval; 10c81d: 8b 46 54 mov 0x54(%esi),%eax 10c820: 8b 56 58 mov 0x58(%esi),%edx 10c823: 89 03 mov %eax,(%ebx) 10c825: 89 53 04 mov %edx,0x4(%ebx) _Thread_Enable_dispatch(); 10c828: e8 8f 28 00 00 call 10f0bc <_Thread_Enable_dispatch> 10c82d: 31 c0 xor %eax,%eax return 0; 10c82f: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); } 10c832: 8d 65 f8 lea -0x8(%ebp),%esp 10c835: 5b pop %ebx 10c836: 5e pop %esi 10c837: c9 leave 10c838: c3 ret 10c839: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 10c83c: e8 8f 8c 00 00 call 1154d0 <__errno> 10c841: c7 00 16 00 00 00 movl $0x16,(%eax) 10c847: b8 ff ff ff ff mov $0xffffffff,%eax 10c84c: eb e4 jmp 10c832 <== ALWAYS TAKEN 0010b4c0 : timer_t timerid, int flags, const struct itimerspec *value, struct itimerspec *ovalue ) { 10b4c0: 55 push %ebp 10b4c1: 89 e5 mov %esp,%ebp 10b4c3: 57 push %edi 10b4c4: 56 push %esi 10b4c5: 53 push %ebx 10b4c6: 83 ec 3c sub $0x3c,%esp 10b4c9: 8b 4d 0c mov 0xc(%ebp),%ecx 10b4cc: 8b 5d 10 mov 0x10(%ebp),%ebx Objects_Locations location; bool activated; uint32_t initial_period; struct itimerspec normalize; if ( !value ) 10b4cf: 85 db test %ebx,%ebx 10b4d1: 0f 84 39 01 00 00 je 10b610 <== 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 ) || 10b4d7: 81 7b 0c ff c9 9a 3b cmpl $0x3b9ac9ff,0xc(%ebx) 10b4de: 0f 87 2c 01 00 00 ja 10b610 ( value->it_value.tv_nsec < 0 ) || ( value->it_interval.tv_nsec >= TOD_NANOSECONDS_PER_SECOND) || 10b4e4: 81 7b 04 ff c9 9a 3b cmpl $0x3b9ac9ff,0x4(%ebx) 10b4eb: 0f 87 1f 01 00 00 ja 10b610 <== 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 ) { 10b4f1: 83 f9 04 cmp $0x4,%ecx 10b4f4: 0f 84 da 00 00 00 je 10b5d4 10b4fa: 85 c9 test %ecx,%ecx 10b4fc: 0f 85 0e 01 00 00 jne 10b610 rtems_set_errno_and_return_minus_one( EINVAL ); } normalize = *value; 10b502: 8d 45 cc lea -0x34(%ebp),%eax 10b505: 89 45 c4 mov %eax,-0x3c(%ebp) 10b508: b9 04 00 00 00 mov $0x4,%ecx 10b50d: 89 c7 mov %eax,%edi 10b50f: 89 de mov %ebx,%esi 10b511: f3 a5 rep movsl %ds:(%esi),%es:(%edi) RTEMS_INLINE_ROUTINE POSIX_Timer_Control *_POSIX_Timer_Get ( timer_t id, Objects_Locations *location ) { return (POSIX_Timer_Control *) 10b513: 50 push %eax 10b514: 8d 45 e4 lea -0x1c(%ebp),%eax 10b517: 50 push %eax 10b518: ff 75 08 pushl 0x8(%ebp) 10b51b: 68 40 97 12 00 push $0x129740 10b520: e8 af 21 00 00 call 10d6d4 <_Objects_Get> 10b525: 89 c2 mov %eax,%edx * something with the structure of times of the timer: to stop, start * or start it again */ ptimer = _POSIX_Timer_Get( timerid, &location ); switch ( location ) { 10b527: 83 c4 10 add $0x10,%esp 10b52a: 8b 7d e4 mov -0x1c(%ebp),%edi 10b52d: 85 ff test %edi,%edi 10b52f: 0f 85 db 00 00 00 jne 10b610 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 ) { 10b535: 8b 75 d4 mov -0x2c(%ebp),%esi 10b538: 85 f6 test %esi,%esi 10b53a: 75 0b jne 10b547 10b53c: 8b 4d d8 mov -0x28(%ebp),%ecx 10b53f: 85 c9 test %ecx,%ecx 10b541: 0f 84 e1 00 00 00 je 10b628 _Thread_Enable_dispatch(); return 0; } /* Convert from seconds and nanoseconds to ticks */ ptimer->ticks = _Timespec_To_ticks( &value->it_interval ); 10b547: 83 ec 0c sub $0xc,%esp 10b54a: 53 push %ebx 10b54b: 89 55 c0 mov %edx,-0x40(%ebp) 10b54e: e8 d1 36 00 00 call 10ec24 <_Timespec_To_ticks> 10b553: 8b 55 c0 mov -0x40(%ebp),%edx 10b556: 89 42 64 mov %eax,0x64(%edx) initial_period = _Timespec_To_ticks( &normalize.it_value ); 10b559: 8d 45 d4 lea -0x2c(%ebp),%eax 10b55c: 89 04 24 mov %eax,(%esp) 10b55f: e8 c0 36 00 00 call 10ec24 <_Timespec_To_ticks> activated = _POSIX_Timer_Insert_helper( 10b564: 8b 55 c0 mov -0x40(%ebp),%edx 10b567: 89 14 24 mov %edx,(%esp) 10b56a: 68 94 b6 10 00 push $0x10b694 10b56f: ff 72 08 pushl 0x8(%edx) 10b572: 50 push %eax 10b573: 8d 42 10 lea 0x10(%edx),%eax 10b576: 50 push %eax 10b577: e8 88 5a 00 00 call 111004 <_POSIX_Timer_Insert_helper> initial_period, ptimer->Object.id, _POSIX_Timer_TSR, ptimer ); if ( !activated ) { 10b57c: 83 c4 20 add $0x20,%esp 10b57f: 84 c0 test %al,%al 10b581: 8b 55 c0 mov -0x40(%ebp),%edx 10b584: 0f 84 ea 00 00 00 je 10b674 /* * The timer has been started and is running. So we return the * old ones in "ovalue" */ if ( ovalue ) 10b58a: 8b 45 14 mov 0x14(%ebp),%eax 10b58d: 85 c0 test %eax,%eax 10b58f: 0f 84 ef 00 00 00 je 10b684 *ovalue = ptimer->timer_data; 10b595: 8d 42 54 lea 0x54(%edx),%eax 10b598: b9 04 00 00 00 mov $0x4,%ecx 10b59d: 8b 7d 14 mov 0x14(%ebp),%edi 10b5a0: 89 c6 mov %eax,%esi 10b5a2: f3 a5 rep movsl %ds:(%esi),%es:(%edi) ptimer->timer_data = normalize; 10b5a4: b9 04 00 00 00 mov $0x4,%ecx 10b5a9: 89 c7 mov %eax,%edi 10b5ab: 8b 75 c4 mov -0x3c(%ebp),%esi 10b5ae: f3 a5 rep movsl %ds:(%esi),%es:(%edi) /* Indicate that the time is running */ ptimer->state = POSIX_TIMER_STATE_CREATE_RUN; 10b5b0: c6 42 3c 03 movb $0x3,0x3c(%edx) _TOD_Get( &ptimer->time ); 10b5b4: 83 ec 0c sub $0xc,%esp 10b5b7: 83 c2 6c add $0x6c,%edx 10b5ba: 52 push %edx 10b5bb: e8 a0 17 00 00 call 10cd60 <_TOD_Get> _Thread_Enable_dispatch(); 10b5c0: e8 83 29 00 00 call 10df48 <_Thread_Enable_dispatch> 10b5c5: 31 c0 xor %eax,%eax return 0; 10b5c7: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); } 10b5ca: 8d 65 f4 lea -0xc(%ebp),%esp 10b5cd: 5b pop %ebx 10b5ce: 5e pop %esi 10b5cf: 5f pop %edi 10b5d0: c9 leave 10b5d1: c3 ret 10b5d2: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( flags != TIMER_ABSTIME && flags != POSIX_TIMER_RELATIVE ) { rtems_set_errno_and_return_minus_one( EINVAL ); } normalize = *value; 10b5d4: 8d 45 cc lea -0x34(%ebp),%eax 10b5d7: 89 45 c4 mov %eax,-0x3c(%ebp) 10b5da: 89 c7 mov %eax,%edi 10b5dc: 89 de mov %ebx,%esi 10b5de: f3 a5 rep movsl %ds:(%esi),%es:(%edi) /* Convert absolute to relative time */ if (flags == TIMER_ABSTIME) { struct timespec now; _TOD_Get( &now ); 10b5e0: 83 ec 0c sub $0xc,%esp 10b5e3: 8d 75 dc lea -0x24(%ebp),%esi 10b5e6: 56 push %esi 10b5e7: e8 74 17 00 00 call 10cd60 <_TOD_Get> /* Check for seconds in the past */ if ( _Timespec_Greater_than( &now, &normalize.it_value ) ) 10b5ec: 59 pop %ecx 10b5ed: 5f pop %edi 10b5ee: 8d 7d d4 lea -0x2c(%ebp),%edi 10b5f1: 57 push %edi 10b5f2: 56 push %esi 10b5f3: e8 cc 35 00 00 call 10ebc4 <_Timespec_Greater_than> 10b5f8: 83 c4 10 add $0x10,%esp 10b5fb: 84 c0 test %al,%al 10b5fd: 75 11 jne 10b610 rtems_set_errno_and_return_minus_one( EINVAL ); _Timespec_Subtract( &now, &normalize.it_value, &normalize.it_value ); 10b5ff: 52 push %edx 10b600: 57 push %edi 10b601: 57 push %edi 10b602: 56 push %esi 10b603: e8 e0 35 00 00 call 10ebe8 <_Timespec_Subtract> 10b608: 83 c4 10 add $0x10,%esp 10b60b: e9 03 ff ff ff jmp 10b513 <== ALWAYS TAKEN #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 10b610: e8 1f 8d 00 00 call 114334 <__errno> 10b615: c7 00 16 00 00 00 movl $0x16,(%eax) 10b61b: b8 ff ff ff ff mov $0xffffffff,%eax } 10b620: 8d 65 f4 lea -0xc(%ebp),%esp 10b623: 5b pop %ebx 10b624: 5e pop %esi 10b625: 5f pop %edi 10b626: c9 leave 10b627: c3 ret 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 ) { /* Stop the timer */ (void) _Watchdog_Remove( &ptimer->Timer ); 10b628: 83 ec 0c sub $0xc,%esp 10b62b: 8d 40 10 lea 0x10(%eax),%eax 10b62e: 50 push %eax 10b62f: 89 55 c0 mov %edx,-0x40(%ebp) 10b632: e8 0d 3a 00 00 call 10f044 <_Watchdog_Remove> /* The old data of the timer are returned */ if ( ovalue ) 10b637: 83 c4 10 add $0x10,%esp 10b63a: 8b 55 14 mov 0x14(%ebp),%edx 10b63d: 85 d2 test %edx,%edx 10b63f: 8b 55 c0 mov -0x40(%ebp),%edx 10b642: 74 48 je 10b68c *ovalue = ptimer->timer_data; 10b644: 8d 42 54 lea 0x54(%edx),%eax 10b647: b9 04 00 00 00 mov $0x4,%ecx 10b64c: 8b 7d 14 mov 0x14(%ebp),%edi 10b64f: 89 c6 mov %eax,%esi 10b651: f3 a5 rep movsl %ds:(%esi),%es:(%edi) /* The new data are set */ ptimer->timer_data = normalize; 10b653: b9 04 00 00 00 mov $0x4,%ecx 10b658: 89 c7 mov %eax,%edi 10b65a: 8b 75 c4 mov -0x3c(%ebp),%esi 10b65d: f3 a5 rep movsl %ds:(%esi),%es:(%edi) /* Indicates that the timer is created and stopped */ ptimer->state = POSIX_TIMER_STATE_CREATE_STOP; 10b65f: c6 42 3c 04 movb $0x4,0x3c(%edx) /* Returns with success */ _Thread_Enable_dispatch(); 10b663: e8 e0 28 00 00 call 10df48 <_Thread_Enable_dispatch> 10b668: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); } 10b66a: 8d 65 f4 lea -0xc(%ebp),%esp 10b66d: 5b pop %ebx 10b66e: 5e pop %esi 10b66f: 5f pop %edi 10b670: c9 leave 10b671: c3 ret 10b672: 66 90 xchg %ax,%ax <== NOT EXECUTED ptimer->Object.id, _POSIX_Timer_TSR, ptimer ); if ( !activated ) { _Thread_Enable_dispatch(); 10b674: e8 cf 28 00 00 call 10df48 <_Thread_Enable_dispatch> 10b679: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); } 10b67b: 8d 65 f4 lea -0xc(%ebp),%esp 10b67e: 5b pop %ebx 10b67f: 5e pop %esi 10b680: 5f pop %edi 10b681: c9 leave 10b682: c3 ret 10b683: 90 nop <== NOT EXECUTED 10b684: 8d 42 54 lea 0x54(%edx),%eax 10b687: e9 18 ff ff ff jmp 10b5a4 <== ALWAYS TAKEN 10b68c: 8d 42 54 lea 0x54(%edx),%eax 10b68f: eb c2 jmp 10b653 <== ALWAYS TAKEN 0010d308 : int truncate( const char *path, off_t length ) { 10d308: 55 push %ebp 10d309: 89 e5 mov %esp,%ebp 10d30b: 56 push %esi 10d30c: 53 push %ebx int status; int fd; fd = open( path, O_WRONLY ); 10d30d: 83 ec 08 sub $0x8,%esp 10d310: 6a 01 push $0x1 10d312: ff 75 08 pushl 0x8(%ebp) 10d315: e8 e6 db ff ff call 10af00 10d31a: 89 c3 mov %eax,%ebx if ( fd == -1 ) 10d31c: 83 c4 10 add $0x10,%esp 10d31f: 83 f8 ff cmp $0xffffffff,%eax 10d322: 74 24 je 10d348 return -1; status = ftruncate( fd, length ); 10d324: 83 ec 08 sub $0x8,%esp 10d327: ff 75 0c pushl 0xc(%ebp) 10d32a: 50 push %eax 10d32b: e8 48 5f 00 00 call 113278 10d330: 89 c6 mov %eax,%esi (void) close( fd ); 10d332: 89 1c 24 mov %ebx,(%esp) 10d335: e8 6a ca ff ff call 109da4 return status; 10d33a: 83 c4 10 add $0x10,%esp } 10d33d: 89 f0 mov %esi,%eax 10d33f: 8d 65 f8 lea -0x8(%ebp),%esp 10d342: 5b pop %ebx 10d343: 5e pop %esi 10d344: c9 leave 10d345: c3 ret 10d346: 66 90 xchg %ax,%ax <== NOT EXECUTED { int status; int fd; fd = open( path, O_WRONLY ); if ( fd == -1 ) 10d348: be ff ff ff ff mov $0xffffffff,%esi status = ftruncate( fd, length ); (void) close( fd ); return status; } 10d34d: 89 f0 mov %esi,%eax 10d34f: 8d 65 f8 lea -0x8(%ebp),%esp 10d352: 5b pop %ebx 10d353: 5e pop %esi 10d354: c9 leave 10d355: c3 ret 001103a4 : useconds_t ualarm( useconds_t useconds, useconds_t interval ) { 1103a4: 55 push %ebp 1103a5: 89 e5 mov %esp,%ebp 1103a7: 57 push %edi 1103a8: 56 push %esi 1103a9: 53 push %ebx 1103aa: 83 ec 2c sub $0x2c,%esp 1103ad: 8b 5d 08 mov 0x8(%ebp),%ebx /* * Initialize the timer used to implement alarm(). */ if ( !the_timer->routine ) { 1103b0: 8b 0d 5c 7d 12 00 mov 0x127d5c,%ecx 1103b6: 85 c9 test %ecx,%ecx 1103b8: 0f 84 8e 00 00 00 je 11044c _Watchdog_Initialize( the_timer, _POSIX_signals_Ualarm_TSR, 0, NULL ); } else { Watchdog_States state; state = _Watchdog_Remove( the_timer ); 1103be: 83 ec 0c sub $0xc,%esp 1103c1: 68 40 7d 12 00 push $0x127d40 1103c6: e8 6d e1 ff ff call 10e538 <_Watchdog_Remove> if ( (state == WATCHDOG_ACTIVE) || (state == WATCHDOG_REMOVE_IT) ) { 1103cb: 83 e8 02 sub $0x2,%eax 1103ce: 83 c4 10 add $0x10,%esp 1103d1: 83 f8 01 cmp $0x1,%eax 1103d4: 0f 86 a2 00 00 00 jbe 11047c <== NEVER TAKEN 1103da: 31 f6 xor %esi,%esi <== NOT EXECUTED /* * 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 ) { 1103dc: 85 db test %ebx,%ebx 1103de: 74 62 je 110442 Watchdog_Interval ticks; tp.tv_sec = useconds / TOD_MICROSECONDS_PER_SECOND; 1103e0: ba 83 de 1b 43 mov $0x431bde83,%edx 1103e5: 89 d8 mov %ebx,%eax 1103e7: f7 e2 mul %edx 1103e9: c1 ea 12 shr $0x12,%edx 1103ec: 89 55 e0 mov %edx,-0x20(%ebp) tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000; 1103ef: 8d 04 92 lea (%edx,%edx,4),%eax 1103f2: 8d 04 80 lea (%eax,%eax,4),%eax 1103f5: 8d 04 80 lea (%eax,%eax,4),%eax 1103f8: 8d 04 80 lea (%eax,%eax,4),%eax 1103fb: 8d 04 80 lea (%eax,%eax,4),%eax 1103fe: 8d 04 80 lea (%eax,%eax,4),%eax 110401: c1 e0 06 shl $0x6,%eax 110404: 29 c3 sub %eax,%ebx 110406: 8d 04 9b lea (%ebx,%ebx,4),%eax 110409: 8d 04 80 lea (%eax,%eax,4),%eax 11040c: 8d 04 80 lea (%eax,%eax,4),%eax 11040f: c1 e0 03 shl $0x3,%eax 110412: 89 45 e4 mov %eax,-0x1c(%ebp) ticks = _Timespec_To_ticks( &tp ); 110415: 83 ec 0c sub $0xc,%esp 110418: 8d 5d e0 lea -0x20(%ebp),%ebx 11041b: 53 push %ebx 11041c: e8 17 10 00 00 call 111438 <_Timespec_To_ticks> if ( ticks == 0 ) ticks = 1; _Watchdog_Insert_ticks( the_timer, _Timespec_To_ticks( &tp ) ); 110421: 89 1c 24 mov %ebx,(%esp) 110424: e8 0f 10 00 00 call 111438 <_Timespec_To_ticks> Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 110429: a3 4c 7d 12 00 mov %eax,0x127d4c _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 11042e: 58 pop %eax 11042f: 5a pop %edx 110430: 68 40 7d 12 00 push $0x127d40 110435: 68 b8 74 12 00 push $0x1274b8 11043a: e8 c1 df ff ff call 10e400 <_Watchdog_Insert> 11043f: 83 c4 10 add $0x10,%esp } return remaining; } 110442: 89 f0 mov %esi,%eax 110444: 8d 65 f4 lea -0xc(%ebp),%esp 110447: 5b pop %ebx 110448: 5e pop %esi 110449: 5f pop %edi 11044a: c9 leave 11044b: c3 ret Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 11044c: c7 05 48 7d 12 00 00 movl $0x0,0x127d48 110453: 00 00 00 the_watchdog->routine = routine; 110456: c7 05 5c 7d 12 00 d8 movl $0x1104d8,0x127d5c 11045d: 04 11 00 the_watchdog->id = id; 110460: c7 05 60 7d 12 00 00 movl $0x0,0x127d60 110467: 00 00 00 the_watchdog->user_data = user_data; 11046a: c7 05 64 7d 12 00 00 movl $0x0,0x127d64 110471: 00 00 00 110474: 31 f6 xor %esi,%esi 110476: e9 61 ff ff ff jmp 1103dc <== ALWAYS TAKEN 11047b: 90 nop <== NOT EXECUTED * 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); 11047c: a1 54 7d 12 00 mov 0x127d54,%eax 110481: 03 05 4c 7d 12 00 add 0x127d4c,%eax /* remaining is now in ticks */ _Timespec_From_ticks( ticks, &tp ); 110487: 83 ec 08 sub $0x8,%esp 11048a: 8d 55 e0 lea -0x20(%ebp),%edx 11048d: 52 push %edx 11048e: 2b 05 58 7d 12 00 sub 0x127d58,%eax 110494: 50 push %eax 110495: e8 56 0f 00 00 call 1113f0 <_Timespec_From_ticks> remaining = tp.tv_sec * TOD_MICROSECONDS_PER_SECOND; 11049a: 8b 45 e0 mov -0x20(%ebp),%eax 11049d: 8d 04 80 lea (%eax,%eax,4),%eax 1104a0: 8d 04 80 lea (%eax,%eax,4),%eax 1104a3: 8d 04 80 lea (%eax,%eax,4),%eax 1104a6: 8d 04 80 lea (%eax,%eax,4),%eax 1104a9: 8d 04 80 lea (%eax,%eax,4),%eax 1104ac: 8d 3c 80 lea (%eax,%eax,4),%edi 1104af: c1 e7 06 shl $0x6,%edi remaining += tp.tv_nsec / 1000; 1104b2: b9 d3 4d 62 10 mov $0x10624dd3,%ecx 1104b7: 8b 45 e4 mov -0x1c(%ebp),%eax 1104ba: f7 e9 imul %ecx 1104bc: 89 45 d0 mov %eax,-0x30(%ebp) 1104bf: 89 55 d4 mov %edx,-0x2c(%ebp) 1104c2: 8b 75 d4 mov -0x2c(%ebp),%esi 1104c5: c1 fe 06 sar $0x6,%esi 1104c8: 8b 45 e4 mov -0x1c(%ebp),%eax 1104cb: 99 cltd 1104cc: 29 d6 sub %edx,%esi 1104ce: 01 fe add %edi,%esi 1104d0: 83 c4 10 add $0x10,%esp 1104d3: e9 04 ff ff ff jmp 1103dc <== ALWAYS TAKEN 0010b15c : */ int uname( struct utsname *name ) { 10b15c: 55 push %ebp 10b15d: 89 e5 mov %esp,%ebp 10b15f: 57 push %edi 10b160: 56 push %esi 10b161: 53 push %ebx 10b162: 83 ec 0c sub $0xc,%esp 10b165: 8b 5d 08 mov 0x8(%ebp),%ebx release = 5.3 version = Generic_101318-12 machine = sun4m */ if ( !name ) 10b168: 85 db test %ebx,%ebx 10b16a: 74 57 je 10b1c3 rtems_set_errno_and_return_minus_one( EFAULT ); strcpy( name->sysname, "RTEMS" ); 10b16c: c7 03 52 54 45 4d movl $0x4d455452,(%ebx) 10b172: 66 c7 43 04 53 00 movw $0x53,0x4(%ebx) sprintf( name->nodename, "Node %" PRId16, _Objects_Local_node ); 10b178: 50 push %eax 10b179: 6a 01 push $0x1 10b17b: 68 b0 1d 12 00 push $0x121db0 10b180: 8d 43 20 lea 0x20(%ebx),%eax 10b183: 50 push %eax 10b184: e8 5f 9b 00 00 call 114ce8 strcpy( name->release, RTEMS_VERSION ); 10b189: 8d 43 40 lea 0x40(%ebx),%eax 10b18c: be b8 1d 12 00 mov $0x121db8,%esi 10b191: b9 09 00 00 00 mov $0x9,%ecx 10b196: 89 c7 mov %eax,%edi 10b198: f3 a4 rep movsb %ds:(%esi),%es:(%edi) strcpy( name->version, "" ); 10b19a: c6 43 60 00 movb $0x0,0x60(%ebx) sprintf( name->machine, "%s/%s", CPU_NAME, CPU_MODEL_NAME ); 10b19e: 68 c1 1d 12 00 push $0x121dc1 10b1a3: 68 d0 1d 12 00 push $0x121dd0 10b1a8: 68 db 1d 12 00 push $0x121ddb 10b1ad: 83 eb 80 sub $0xffffff80,%ebx 10b1b0: 53 push %ebx 10b1b1: e8 32 9b 00 00 call 114ce8 10b1b6: 31 c0 xor %eax,%eax return 0; 10b1b8: 83 c4 20 add $0x20,%esp } 10b1bb: 8d 65 f4 lea -0xc(%ebp),%esp 10b1be: 5b pop %ebx 10b1bf: 5e pop %esi 10b1c0: 5f pop %edi 10b1c1: c9 leave 10b1c2: c3 ret version = Generic_101318-12 machine = sun4m */ if ( !name ) rtems_set_errno_and_return_minus_one( EFAULT ); 10b1c3: e8 a0 92 00 00 call 114468 <__errno> 10b1c8: c7 00 0e 00 00 00 movl $0xe,(%eax) 10b1ce: b8 ff ff ff ff mov $0xffffffff,%eax 10b1d3: eb e6 jmp 10b1bb <== ALWAYS TAKEN 00113048 : #include int unlink( const char *path ) { 113048: 55 push %ebp 113049: 89 e5 mov %esp,%ebp 11304b: 57 push %edi 11304c: 56 push %esi 11304d: 53 push %ebx 11304e: 83 ec 58 sub $0x58,%esp 113051: 8b 55 08 mov 0x8(%ebp),%edx /* * Get the node to be unlinked. Find the parent path first. */ parentpathlen = rtems_filesystem_dirname ( path ); 113054: 52 push %edx 113055: 89 55 ac mov %edx,-0x54(%ebp) 113058: e8 a7 4d ff ff call 107e04 11305d: 89 c3 mov %eax,%ebx if ( parentpathlen == 0 ) 11305f: 83 c4 10 add $0x10,%esp 113062: 85 c0 test %eax,%eax 113064: 8b 55 ac mov -0x54(%ebp),%edx 113067: 0f 85 7b 01 00 00 jne 1131e8 rtems_filesystem_get_start_loc( path, &i, &parentloc ); 11306d: 8a 02 mov (%edx),%al 11306f: 3c 2f cmp $0x2f,%al 113071: 74 0c je 11307f <== NEVER TAKEN 113073: 3c 5c cmp $0x5c,%al <== NOT EXECUTED 113075: 74 08 je 11307f <== NOT EXECUTED 113077: 84 c0 test %al,%al <== NOT EXECUTED 113079: 0f 85 ed 00 00 00 jne 11316c <== NOT EXECUTED 11307f: 8d 45 d4 lea -0x2c(%ebp),%eax 113082: 89 45 b4 mov %eax,-0x4c(%ebp) 113085: 8b 35 f8 4f 12 00 mov 0x124ff8,%esi 11308b: 83 c6 18 add $0x18,%esi 11308e: b9 05 00 00 00 mov $0x5,%ecx 113093: 89 c7 mov %eax,%edi 113095: f3 a5 rep movsl %ds:(%esi),%es:(%edi) 113097: c6 45 b3 00 movb $0x0,-0x4d(%ebp) /* * Start from the parent to find the node that should be under it. */ loc = parentloc; 11309b: 8d 7d c0 lea -0x40(%ebp),%edi 11309e: b9 05 00 00 00 mov $0x5,%ecx 1130a3: 8b 75 b4 mov -0x4c(%ebp),%esi 1130a6: f3 a5 rep movsl %ds:(%esi),%es:(%edi) name = path + parentpathlen; 1130a8: 8d 1c 1a lea (%edx,%ebx,1),%ebx name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 1130ab: be ff ff ff ff mov $0xffffffff,%esi 1130b0: 89 f1 mov %esi,%ecx 1130b2: 89 df mov %ebx,%edi 1130b4: 31 c0 xor %eax,%eax 1130b6: f2 ae repnz scas %es:(%edi),%al 1130b8: f7 d1 not %ecx 1130ba: 49 dec %ecx 1130bb: 83 ec 08 sub $0x8,%esp 1130be: 51 push %ecx 1130bf: 53 push %ebx 1130c0: e8 03 4d ff ff call 107dc8 1130c5: 01 c3 add %eax,%ebx result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 1130c7: 89 f1 mov %esi,%ecx 1130c9: 89 df mov %ebx,%edi 1130cb: 31 c0 xor %eax,%eax 1130cd: f2 ae repnz scas %es:(%edi),%al 1130cf: f7 d1 not %ecx 1130d1: 49 dec %ecx 1130d2: c7 04 24 00 00 00 00 movl $0x0,(%esp) 1130d9: 8d 75 c0 lea -0x40(%ebp),%esi 1130dc: 56 push %esi 1130dd: 6a 00 push $0x0 1130df: 51 push %ecx 1130e0: 53 push %ebx 1130e1: e8 6e 4d ff ff call 107e54 0, &loc, false ); if ( result != 0 ) { 1130e6: 83 c4 20 add $0x20,%esp 1130e9: 85 c0 test %eax,%eax 1130eb: 0f 85 9f 00 00 00 jne 113190 if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); return -1; } if ( !loc.ops->node_type_h ) { 1130f1: 8b 55 cc mov -0x34(%ebp),%edx 1130f4: 8b 42 10 mov 0x10(%edx),%eax 1130f7: 85 c0 test %eax,%eax 1130f9: 0f 84 a5 00 00 00 je 1131a4 <== ALWAYS TAKEN 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 ) { 1130ff: 83 ec 0c sub $0xc,%esp 113102: 56 push %esi 113103: ff d0 call *%eax 113105: 83 c4 10 add $0x10,%esp 113108: 48 dec %eax 113109: 0f 84 05 01 00 00 je 113214 if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); rtems_set_errno_and_return_minus_one( EISDIR ); } if ( !loc.ops->unlink_h ) { 11310f: 8b 55 cc mov -0x34(%ebp),%edx 113112: 8b 42 0c mov 0xc(%edx),%eax 113115: 85 c0 test %eax,%eax 113117: 0f 84 87 00 00 00 je 1131a4 <== ALWAYS TAKEN if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.ops->unlink_h)( &parentloc, &loc ); 11311d: 83 ec 08 sub $0x8,%esp 113120: 56 push %esi 113121: ff 75 b4 pushl -0x4c(%ebp) 113124: ff d0 call *%eax 113126: 89 c3 mov %eax,%ebx rtems_filesystem_freenode( &loc ); 113128: 8b 45 cc mov -0x34(%ebp),%eax 11312b: 83 c4 10 add $0x10,%esp 11312e: 85 c0 test %eax,%eax 113130: 74 10 je 113142 <== ALWAYS TAKEN 113132: 8b 40 1c mov 0x1c(%eax),%eax 113135: 85 c0 test %eax,%eax 113137: 74 09 je 113142 <== ALWAYS TAKEN 113139: 83 ec 0c sub $0xc,%esp 11313c: 56 push %esi 11313d: ff d0 call *%eax 11313f: 83 c4 10 add $0x10,%esp if ( free_parentloc ) 113142: 80 7d b3 00 cmpb $0x0,-0x4d(%ebp) 113146: 74 19 je 113161 <== ALWAYS TAKEN rtems_filesystem_freenode( &parentloc ); 113148: 8b 45 e0 mov -0x20(%ebp),%eax 11314b: 85 c0 test %eax,%eax 11314d: 74 12 je 113161 <== ALWAYS TAKEN 11314f: 8b 40 1c mov 0x1c(%eax),%eax 113152: 85 c0 test %eax,%eax 113154: 74 0b je 113161 <== ALWAYS TAKEN 113156: 83 ec 0c sub $0xc,%esp 113159: ff 75 b4 pushl -0x4c(%ebp) 11315c: ff d0 call *%eax 11315e: 83 c4 10 add $0x10,%esp return result; } 113161: 89 d8 mov %ebx,%eax 113163: 8d 65 f4 lea -0xc(%ebp),%esp 113166: 5b pop %ebx 113167: 5e pop %esi 113168: 5f pop %edi 113169: c9 leave 11316a: c3 ret 11316b: 90 nop <== NOT EXECUTED */ parentpathlen = rtems_filesystem_dirname ( path ); if ( parentpathlen == 0 ) rtems_filesystem_get_start_loc( path, &i, &parentloc ); 11316c: 8d 45 d4 lea -0x2c(%ebp),%eax <== NOT EXECUTED 11316f: 89 45 b4 mov %eax,-0x4c(%ebp) <== NOT EXECUTED 113172: 8b 35 f8 4f 12 00 mov 0x124ff8,%esi <== NOT EXECUTED 113178: 83 c6 04 add $0x4,%esi <== NOT EXECUTED 11317b: b9 05 00 00 00 mov $0x5,%ecx <== NOT EXECUTED 113180: 89 c7 mov %eax,%edi <== NOT EXECUTED 113182: f3 a5 rep movsl %ds:(%esi),%es:(%edi) <== NOT EXECUTED 113184: c6 45 b3 00 movb $0x0,-0x4d(%ebp) <== NOT EXECUTED 113188: e9 0e ff ff ff jmp 11309b <== NOT EXECUTED 11318d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED name += rtems_filesystem_prefix_separators( name, strlen( name ) ); result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 0, &loc, false ); if ( result != 0 ) { if ( free_parentloc ) 113190: 80 7d b3 00 cmpb $0x0,-0x4d(%ebp) 113194: 0f 85 c5 00 00 00 jne 11325f <== NEVER TAKEN result = (*loc.ops->unlink_h)( &parentloc, &loc ); rtems_filesystem_freenode( &loc ); if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); 11319a: bb ff ff ff ff mov $0xffffffff,%ebx <== NOT EXECUTED 11319f: eb c0 jmp 113161 <== NOT EXECUTED 1131a1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED rtems_filesystem_freenode( &parentloc ); rtems_set_errno_and_return_minus_one( EISDIR ); } if ( !loc.ops->unlink_h ) { rtems_filesystem_freenode( &loc ); 1131a4: 8b 42 1c mov 0x1c(%edx),%eax <== NOT EXECUTED 1131a7: 85 c0 test %eax,%eax <== NOT EXECUTED 1131a9: 74 09 je 1131b4 <== NOT EXECUTED 1131ab: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1131ae: 56 push %esi <== NOT EXECUTED 1131af: ff d0 call *%eax <== NOT EXECUTED 1131b1: 83 c4 10 add $0x10,%esp <== NOT EXECUTED if ( free_parentloc ) 1131b4: 80 7d b3 00 cmpb $0x0,-0x4d(%ebp) <== NOT EXECUTED 1131b8: 74 19 je 1131d3 <== NOT EXECUTED rtems_filesystem_freenode( &parentloc ); 1131ba: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED 1131bd: 85 c0 test %eax,%eax <== NOT EXECUTED 1131bf: 74 12 je 1131d3 <== NOT EXECUTED 1131c1: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 1131c4: 85 c0 test %eax,%eax <== NOT EXECUTED 1131c6: 74 0b je 1131d3 <== NOT EXECUTED 1131c8: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1131cb: ff 75 b4 pushl -0x4c(%ebp) <== NOT EXECUTED 1131ce: ff d0 call *%eax <== NOT EXECUTED 1131d0: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 1131d3: e8 38 06 00 00 call 113810 <__errno> <== NOT EXECUTED 1131d8: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 1131de: bb ff ff ff ff mov $0xffffffff,%ebx <== NOT EXECUTED 1131e3: e9 79 ff ff ff jmp 113161 <== NOT EXECUTED parentpathlen = rtems_filesystem_dirname ( path ); if ( parentpathlen == 0 ) rtems_filesystem_get_start_loc( path, &i, &parentloc ); else { result = rtems_filesystem_evaluate_path( path, parentpathlen, 1131e8: 83 ec 0c sub $0xc,%esp 1131eb: 6a 00 push $0x0 1131ed: 8d 45 d4 lea -0x2c(%ebp),%eax 1131f0: 89 45 b4 mov %eax,-0x4c(%ebp) 1131f3: 50 push %eax 1131f4: 6a 02 push $0x2 1131f6: 53 push %ebx 1131f7: 52 push %edx 1131f8: 89 55 ac mov %edx,-0x54(%ebp) 1131fb: e8 28 4d ff ff call 107f28 RTEMS_LIBIO_PERMS_WRITE, &parentloc, false ); if ( result != 0 ) 113200: 83 c4 20 add $0x20,%esp 113203: 85 c0 test %eax,%eax 113205: 8b 55 ac mov -0x54(%ebp),%edx 113208: 75 90 jne 11319a <== ALWAYS TAKEN 11320a: c6 45 b3 01 movb $0x1,-0x4d(%ebp) 11320e: e9 88 fe ff ff jmp 11309b <== ALWAYS TAKEN 113213: 90 nop <== NOT EXECUTED rtems_filesystem_freenode( &parentloc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) { rtems_filesystem_freenode( &loc ); 113214: 8b 45 cc mov -0x34(%ebp),%eax 113217: 85 c0 test %eax,%eax 113219: 74 10 je 11322b <== ALWAYS TAKEN 11321b: 8b 40 1c mov 0x1c(%eax),%eax 11321e: 85 c0 test %eax,%eax 113220: 74 09 je 11322b <== ALWAYS TAKEN 113222: 83 ec 0c sub $0xc,%esp 113225: 56 push %esi 113226: ff d0 call *%eax 113228: 83 c4 10 add $0x10,%esp if ( free_parentloc ) 11322b: 80 7d b3 00 cmpb $0x0,-0x4d(%ebp) 11322f: 74 19 je 11324a <== NEVER TAKEN rtems_filesystem_freenode( &parentloc ); 113231: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED 113234: 85 c0 test %eax,%eax <== NOT EXECUTED 113236: 74 12 je 11324a <== NOT EXECUTED 113238: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 11323b: 85 c0 test %eax,%eax <== NOT EXECUTED 11323d: 74 0b je 11324a <== NOT EXECUTED 11323f: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 113242: ff 75 b4 pushl -0x4c(%ebp) <== NOT EXECUTED 113245: ff d0 call *%eax <== NOT EXECUTED 113247: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EISDIR ); 11324a: e8 c1 05 00 00 call 113810 <__errno> 11324f: c7 00 15 00 00 00 movl $0x15,(%eax) 113255: bb ff ff ff ff mov $0xffffffff,%ebx 11325a: e9 02 ff ff ff jmp 113161 <== ALWAYS TAKEN result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 0, &loc, false ); if ( result != 0 ) { if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); 11325f: 8b 45 e0 mov -0x20(%ebp),%eax 113262: 85 c0 test %eax,%eax 113264: 0f 84 30 ff ff ff je 11319a <== ALWAYS TAKEN 11326a: 8b 40 1c mov 0x1c(%eax),%eax 11326d: 85 c0 test %eax,%eax 11326f: 0f 84 25 ff ff ff je 11319a <== ALWAYS TAKEN 113275: 83 ec 0c sub $0xc,%esp 113278: ff 75 b4 pushl -0x4c(%ebp) 11327b: ff d0 call *%eax 11327d: 83 cb ff or $0xffffffff,%ebx 113280: 83 c4 10 add $0x10,%esp 113283: e9 d9 fe ff ff jmp 113161 <== ALWAYS TAKEN 001104ec : */ int unmount( const char *path ) { 1104ec: 55 push %ebp 1104ed: 89 e5 mov %esp,%ebp 1104ef: 57 push %edi 1104f0: 56 push %esi 1104f1: 53 push %ebx 1104f2: 83 ec 38 sub $0x38,%esp 1104f5: 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 ) ) 1104f8: 31 c0 xor %eax,%eax 1104fa: b9 ff ff ff ff mov $0xffffffff,%ecx 1104ff: 89 d7 mov %edx,%edi 110501: f2 ae repnz scas %es:(%edi),%al 110503: f7 d1 not %ecx 110505: 49 dec %ecx 110506: 6a 01 push $0x1 110508: 8d 75 d4 lea -0x2c(%ebp),%esi 11050b: 56 push %esi 11050c: 6a 00 push $0x0 11050e: 51 push %ecx 11050f: 52 push %edx 110510: e8 2b c9 ff ff call 10ce40 110515: 83 c4 20 add $0x20,%esp 110518: 85 c0 test %eax,%eax 11051a: 0f 85 92 00 00 00 jne 1105b2 return -1; mt_entry = loc.mt_entry; 110520: 8b 5d e4 mov -0x1c(%ebp),%ebx fs_mount_loc = &mt_entry->mt_point_node; fs_root_loc = &mt_entry->mt_fs_root; 110523: 8b 43 1c mov 0x1c(%ebx),%eax 110526: 3b 45 d4 cmp -0x2c(%ebp),%eax 110529: 0f 85 a9 00 00 00 jne 1105d8 /* * Free the loc node and just use the nodes from the mt_entry . */ rtems_filesystem_freenode( &loc ); 11052f: 8b 45 e0 mov -0x20(%ebp),%eax 110532: 85 c0 test %eax,%eax 110534: 74 10 je 110546 <== ALWAYS TAKEN 110536: 8b 40 1c mov 0x1c(%eax),%eax 110539: 85 c0 test %eax,%eax 11053b: 74 09 je 110546 <== ALWAYS TAKEN 11053d: 83 ec 0c sub $0xc,%esp 110540: 56 push %esi 110541: ff d0 call *%eax 110543: 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; 110546: 8b 43 14 mov 0x14(%ebx),%eax 110549: 8b 50 28 mov 0x28(%eax),%edx 11054c: 85 d2 test %edx,%edx 11054e: 0f 84 20 01 00 00 je 110674 <== ALWAYS TAKEN fs_root_loc = &mt_entry->mt_fs_root; 110554: 8b 43 28 mov 0x28(%ebx),%eax 110557: 8b 40 2c mov 0x2c(%eax),%eax 11055a: 85 c0 test %eax,%eax 11055c: 0f 84 12 01 00 00 je 110674 <== ALWAYS TAKEN * 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 ) 110562: a1 c4 93 16 00 mov 0x1693c4,%eax 110567: 39 58 14 cmp %ebx,0x14(%eax) 11056a: 74 54 je 1105c0 /* * Search the mount table for any mount entries referencing this * mount entry. */ for ( the_node = rtems_filesystem_mount_table_control.first; 11056c: a1 ec ee 16 00 mov 0x16eeec,%eax 110571: 3d f0 ee 16 00 cmp $0x16eef0,%eax 110576: 74 1a je 110592 <== ALWAYS TAKEN !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 ) { 110578: 8b 53 2c mov 0x2c(%ebx),%edx 11057b: 39 50 18 cmp %edx,0x18(%eax) 11057e: 75 09 jne 110589 <== NEVER TAKEN 110580: eb 3e jmp 1105c0 <== NOT EXECUTED 110582: 66 90 xchg %ax,%ax <== NOT EXECUTED 110584: 3b 50 18 cmp 0x18(%eax),%edx 110587: 74 37 je 1105c0 * 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 ) { 110589: 8b 00 mov (%eax),%eax /* * Search the mount table for any mount entries referencing this * mount entry. */ for ( the_node = rtems_filesystem_mount_table_control.first; 11058b: 3d f0 ee 16 00 cmp $0x16eef0,%eax 110590: 75 f2 jne 110584 * 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 ) 110592: 83 ec 0c sub $0xc,%esp 110595: 53 push %ebx 110596: e8 c9 cb ff ff call 10d164 11059b: 83 c4 10 add $0x10,%esp 11059e: 48 dec %eax 11059f: 74 1f je 1105c0 * 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 ) 1105a1: 83 ec 0c sub $0xc,%esp 1105a4: 8b 43 14 mov 0x14(%ebx),%eax 1105a7: 53 push %ebx 1105a8: ff 50 28 call *0x28(%eax) 1105ab: 83 c4 10 add $0x10,%esp 1105ae: 85 c0 test %eax,%eax 1105b0: 74 56 je 110608 <== NEVER TAKEN */ rtems_filesystem_freenode( fs_mount_loc ); free( mt_entry ); return 0; 1105b2: b8 ff ff ff ff mov $0xffffffff,%eax } 1105b7: 8d 65 f4 lea -0xc(%ebp),%esp 1105ba: 5b pop %ebx 1105bb: 5e pop %esi 1105bc: 5f pop %edi 1105bd: c9 leave 1105be: c3 ret 1105bf: 90 nop <== NOT EXECUTED * 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 ); 1105c0: e8 4b 1f 03 00 call 142510 <__errno> 1105c5: c7 00 10 00 00 00 movl $0x10,(%eax) 1105cb: b8 ff ff ff ff mov $0xffffffff,%eax rtems_filesystem_freenode( fs_mount_loc ); free( mt_entry ); return 0; } 1105d0: 8d 65 f4 lea -0xc(%ebp),%esp 1105d3: 5b pop %ebx 1105d4: 5e pop %esi 1105d5: 5f pop %edi 1105d6: c9 leave 1105d7: c3 ret /* * 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 ); 1105d8: 8b 45 e0 mov -0x20(%ebp),%eax 1105db: 85 c0 test %eax,%eax 1105dd: 74 10 je 1105ef <== ALWAYS TAKEN 1105df: 8b 40 1c mov 0x1c(%eax),%eax 1105e2: 85 c0 test %eax,%eax 1105e4: 74 09 je 1105ef <== ALWAYS TAKEN 1105e6: 83 ec 0c sub $0xc,%esp 1105e9: 56 push %esi 1105ea: ff d0 call *%eax 1105ec: 83 c4 10 add $0x10,%esp rtems_set_errno_and_return_minus_one( EACCES ); 1105ef: e8 1c 1f 03 00 call 142510 <__errno> 1105f4: c7 00 0d 00 00 00 movl $0xd,(%eax) 1105fa: b8 ff ff ff ff mov $0xffffffff,%eax rtems_filesystem_freenode( fs_mount_loc ); free( mt_entry ); return 0; } 1105ff: 8d 65 f4 lea -0xc(%ebp),%esp 110602: 5b pop %ebx 110603: 5e pop %esi 110604: 5f pop %edi 110605: c9 leave 110606: c3 ret 110607: 90 nop <== NOT EXECUTED * NOTE: Fatal error is called in a case which should never happen * This was response was questionable but the best we could * come up with. */ if ((fs_root_loc->ops->fsunmount_me_h )( mt_entry ) != 0){ 110608: 83 ec 0c sub $0xc,%esp 11060b: 8b 43 28 mov 0x28(%ebx),%eax 11060e: 53 push %ebx 11060f: ff 50 2c call *0x2c(%eax) 110612: 83 c4 10 add $0x10,%esp 110615: 85 c0 test %eax,%eax 110617: 75 3c jne 110655 <== ALWAYS TAKEN */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 110619: 83 ec 0c sub $0xc,%esp 11061c: 53 push %ebx 11061d: e8 96 18 00 00 call 111eb8 <_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 ); 110622: 8b 43 14 mov 0x14(%ebx),%eax 110625: 83 c4 10 add $0x10,%esp 110628: 85 c0 test %eax,%eax 11062a: 74 13 je 11063f <== ALWAYS TAKEN 11062c: 8b 40 1c mov 0x1c(%eax),%eax 11062f: 85 c0 test %eax,%eax 110631: 74 0c je 11063f <== ALWAYS TAKEN 110633: 83 ec 0c sub $0xc,%esp 110636: 8d 53 08 lea 0x8(%ebx),%edx 110639: 52 push %edx 11063a: ff d0 call *%eax 11063c: 83 c4 10 add $0x10,%esp free( mt_entry ); 11063f: 83 ec 0c sub $0xc,%esp 110642: 53 push %ebx 110643: e8 ac c8 ff ff call 10cef4 110648: 31 c0 xor %eax,%eax return 0; 11064a: 83 c4 10 add $0x10,%esp } 11064d: 8d 65 f4 lea -0xc(%ebp),%esp 110650: 5b pop %ebx 110651: 5e pop %esi 110652: 5f pop %edi 110653: c9 leave 110654: c3 ret * This was response was questionable but the best we could * come up with. */ if ((fs_root_loc->ops->fsunmount_me_h )( mt_entry ) != 0){ if (( fs_mount_loc->ops->mount_h )( mt_entry ) != 0 ) 110655: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 110658: 8b 43 14 mov 0x14(%ebx),%eax <== NOT EXECUTED 11065b: 53 push %ebx <== NOT EXECUTED 11065c: ff 50 20 call *0x20(%eax) <== NOT EXECUTED 11065f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 110662: 85 c0 test %eax,%eax <== NOT EXECUTED 110664: 0f 84 48 ff ff ff je 1105b2 <== NOT EXECUTED rtems_fatal_error_occurred( 0 ); 11066a: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 11066d: 6a 00 push $0x0 <== NOT EXECUTED 11066f: e8 44 15 00 00 call 111bb8 <== NOT EXECUTED 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 ); 110674: e8 97 1e 03 00 call 142510 <__errno> <== NOT EXECUTED 110679: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 11067f: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 110682: e9 30 ff ff ff jmp 1105b7 <== NOT EXECUTED 0012cce0 : int utime( const char *path, const struct utimbuf *times ) { 12cce0: 55 push %ebp 12cce1: 89 e5 mov %esp,%ebp 12cce3: 57 push %edi 12cce4: 56 push %esi 12cce5: 53 push %ebx 12cce6: 83 ec 38 sub $0x38,%esp 12cce9: 8b 55 08 mov 0x8(%ebp),%edx 12ccec: 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 ) ) 12ccef: 31 c0 xor %eax,%eax 12ccf1: b9 ff ff ff ff mov $0xffffffff,%ecx 12ccf6: 89 d7 mov %edx,%edi 12ccf8: f2 ae repnz scas %es:(%edi),%al 12ccfa: f7 d1 not %ecx 12ccfc: 49 dec %ecx 12ccfd: 6a 01 push $0x1 12ccff: 8d 75 d4 lea -0x2c(%ebp),%esi 12cd02: 56 push %esi 12cd03: 6a 00 push $0x0 12cd05: 51 push %ecx 12cd06: 52 push %edx 12cd07: e8 34 01 fe ff call 10ce40 12cd0c: 83 c4 20 add $0x20,%esp 12cd0f: 85 c0 test %eax,%eax 12cd11: 75 55 jne 12cd68 return -1; if ( !temp_loc.ops->utime_h ){ 12cd13: 8b 55 e0 mov -0x20(%ebp),%edx 12cd16: 8b 42 30 mov 0x30(%edx),%eax 12cd19: 85 c0 test %eax,%eax 12cd1b: 74 2f je 12cd4c <== ALWAYS TAKEN rtems_filesystem_freenode( &temp_loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*temp_loc.ops->utime_h)( &temp_loc, times->actime, times->modtime ); 12cd1d: 52 push %edx 12cd1e: ff 73 04 pushl 0x4(%ebx) 12cd21: ff 33 pushl (%ebx) 12cd23: 56 push %esi 12cd24: ff d0 call *%eax 12cd26: 89 c3 mov %eax,%ebx rtems_filesystem_freenode( &temp_loc ); 12cd28: 8b 45 e0 mov -0x20(%ebp),%eax 12cd2b: 83 c4 10 add $0x10,%esp 12cd2e: 85 c0 test %eax,%eax 12cd30: 74 10 je 12cd42 <== ALWAYS TAKEN 12cd32: 8b 40 1c mov 0x1c(%eax),%eax 12cd35: 85 c0 test %eax,%eax 12cd37: 74 09 je 12cd42 <== ALWAYS TAKEN 12cd39: 83 ec 0c sub $0xc,%esp 12cd3c: 56 push %esi 12cd3d: ff d0 call *%eax 12cd3f: 83 c4 10 add $0x10,%esp return result; } 12cd42: 89 d8 mov %ebx,%eax 12cd44: 8d 65 f4 lea -0xc(%ebp),%esp 12cd47: 5b pop %ebx 12cd48: 5e pop %esi 12cd49: 5f pop %edi 12cd4a: c9 leave 12cd4b: c3 ret if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x00, &temp_loc, true ) ) return -1; if ( !temp_loc.ops->utime_h ){ rtems_filesystem_freenode( &temp_loc ); 12cd4c: 8b 42 1c mov 0x1c(%edx),%eax <== NOT EXECUTED 12cd4f: 85 c0 test %eax,%eax <== NOT EXECUTED 12cd51: 74 09 je 12cd5c <== NOT EXECUTED 12cd53: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12cd56: 56 push %esi <== NOT EXECUTED 12cd57: ff d0 call *%eax <== NOT EXECUTED 12cd59: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 12cd5c: e8 af 57 01 00 call 142510 <__errno> <== NOT EXECUTED 12cd61: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 12cd67: 90 nop <== NOT EXECUTED 12cd68: bb ff ff ff ff mov $0xffffffff,%ebx result = (*temp_loc.ops->utime_h)( &temp_loc, times->actime, times->modtime ); rtems_filesystem_freenode( &temp_loc ); return result; } 12cd6d: 89 d8 mov %ebx,%eax 12cd6f: 8d 65 f4 lea -0xc(%ebp),%esp 12cd72: 5b pop %ebx 12cd73: 5e pop %esi 12cd74: 5f pop %edi 12cd75: c9 leave 12cd76: c3 ret 0010aaa4 : */ void vprintk( const char *fmt, va_list ap ) { 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 4c sub $0x4c,%esp 10aaad: 8b 75 08 mov 0x8(%ebp),%esi 10aab0: 8b 7d 0c mov 0xc(%ebp),%edi for (; *fmt != '\0'; fmt++) { 10aab3: 8a 06 mov (%esi),%al 10aab5: 84 c0 test %al,%al 10aab7: 75 28 jne 10aae1 <== NEVER TAKEN 10aab9: e9 d1 01 00 00 jmp 10ac8f <== NOT EXECUTED 10aabe: 66 90 xchg %ax,%ax <== NOT EXECUTED bool sign = false; char lead = ' '; char c; if (*fmt != '%') { BSP_output_char(*fmt); 10aac0: 83 ec 0c sub $0xc,%esp 10aac3: 0f be c0 movsbl %al,%eax 10aac6: 50 push %eax 10aac7: ff 15 84 32 12 00 call *0x123284 10aacd: 89 7d bc mov %edi,-0x44(%ebp) continue; 10aad0: 83 c4 10 add $0x10,%esp void vprintk( const char *fmt, va_list ap ) { for (; *fmt != '\0'; fmt++) { 10aad3: 46 inc %esi 10aad4: 8a 06 mov (%esi),%al 10aad6: 84 c0 test %al,%al 10aad8: 0f 84 b1 01 00 00 je 10ac8f 10aade: 8b 7d bc mov -0x44(%ebp),%edi bool minus = false; bool sign = false; char lead = ' '; char c; if (*fmt != '%') { 10aae1: 3c 25 cmp $0x25,%al 10aae3: 75 db jne 10aac0 BSP_output_char(*fmt); continue; } fmt++; 10aae5: 46 inc %esi if (*fmt == '0' ) { 10aae6: 8a 0e mov (%esi),%cl 10aae8: 80 f9 30 cmp $0x30,%cl 10aaeb: 0f 84 b7 01 00 00 je 10aca8 10aaf1: b2 20 mov $0x20,%dl lead = '0'; fmt++; } if (*fmt == '-' ) { 10aaf3: 80 f9 2d cmp $0x2d,%cl 10aaf6: 0f 84 ba 01 00 00 je 10acb6 10aafc: c6 45 c4 00 movb $0x0,-0x3c(%ebp) minus = true; fmt++; } while (*fmt >= '0' && *fmt <= '9' ) { 10ab00: 8d 41 d0 lea -0x30(%ecx),%eax 10ab03: 3c 09 cmp $0x9,%al 10ab05: 0f 87 bd 01 00 00 ja 10acc8 10ab0b: 31 db xor %ebx,%ebx 10ab0d: 8d 76 00 lea 0x0(%esi),%esi width *= 10; width += ((unsigned) *fmt - '0'); 10ab10: 8d 04 9b lea (%ebx,%ebx,4),%eax 10ab13: 0f be c9 movsbl %cl,%ecx 10ab16: 8d 5c 41 d0 lea -0x30(%ecx,%eax,2),%ebx fmt++; 10ab1a: 46 inc %esi } if (*fmt == '-' ) { minus = true; fmt++; } while (*fmt >= '0' && *fmt <= '9' ) { 10ab1b: 8a 0e mov (%esi),%cl 10ab1d: 8d 41 d0 lea -0x30(%ecx),%eax 10ab20: 3c 09 cmp $0x9,%al 10ab22: 76 ec jbe 10ab10 width *= 10; width += ((unsigned) *fmt - '0'); fmt++; } if ((c = *fmt) == 'l') { 10ab24: 80 f9 6c cmp $0x6c,%cl 10ab27: 0f 84 a7 01 00 00 je 10acd4 lflag = true; c = *++fmt; } if ( c == 'c' ) { 10ab2d: 80 f9 63 cmp $0x63,%cl 10ab30: 0f 84 aa 01 00 00 je 10ace0 /* need a cast here since va_arg() only takes fully promoted types */ char chr = (char) va_arg(ap, int); BSP_output_char(chr); continue; } if ( c == 's' ) { 10ab36: 80 f9 73 cmp $0x73,%cl 10ab39: 0f 84 bd 01 00 00 je 10acfc continue; } /* must be a numeric format or something unsupported */ if ( c == 'o' || c == 'O' ) { 10ab3f: 80 f9 6f cmp $0x6f,%cl 10ab42: 0f 84 50 01 00 00 je 10ac98 <== ALWAYS TAKEN 10ab48: 80 f9 4f cmp $0x4f,%cl 10ab4b: 0f 84 47 01 00 00 je 10ac98 base = 8; sign = false; } else if ( c == 'i' || c == 'I' || 10ab51: 80 f9 69 cmp $0x69,%cl 10ab54: 74 56 je 10abac 10ab56: 80 f9 49 cmp $0x49,%cl 10ab59: 74 51 je 10abac 10ab5b: 80 f9 64 cmp $0x64,%cl 10ab5e: 74 4c je 10abac 10ab60: 80 f9 44 cmp $0x44,%cl 10ab63: 74 47 je 10abac c == 'd' || c == 'D' ) { base = 10; sign = true; } else if ( c == 'u' || c == 'U' ) { 10ab65: 80 f9 75 cmp $0x75,%cl 10ab68: 0f 84 62 02 00 00 je 10add0 10ab6e: 80 f9 55 cmp $0x55,%cl 10ab71: 0f 84 59 02 00 00 je 10add0 base = 10; sign = false; } else if ( c == 'x' || c == 'X' ) { 10ab77: 80 f9 78 cmp $0x78,%cl 10ab7a: 0f 84 97 02 00 00 je 10ae17 10ab80: 80 f9 58 cmp $0x58,%cl 10ab83: 0f 84 8e 02 00 00 je 10ae17 base = 16; sign = false; } else if ( c == 'p' ) { 10ab89: 80 f9 70 cmp $0x70,%cl 10ab8c: 0f 84 a8 02 00 00 je 10ae3a base = 16; sign = false; lflag = true; } else { BSP_output_char(c); 10ab92: 83 ec 0c sub $0xc,%esp 10ab95: 0f be c9 movsbl %cl,%ecx 10ab98: 51 push %ecx 10ab99: ff 15 84 32 12 00 call *0x123284 10ab9f: 89 7d bc mov %edi,-0x44(%ebp) continue; 10aba2: 83 c4 10 add $0x10,%esp 10aba5: e9 29 ff ff ff jmp 10aad3 <== ALWAYS TAKEN 10abaa: 66 90 xchg %ax,%ax <== NOT EXECUTED 10abac: b1 01 mov $0x1,%cl 10abae: c7 45 b8 0a 00 00 00 movl $0xa,-0x48(%ebp) } printNum( 10abb5: 0f be d2 movsbl %dl,%edx 10abb8: 89 55 b4 mov %edx,-0x4c(%ebp) lflag ? va_arg(ap, long) : (long) va_arg(ap, int), 10abbb: 8d 47 04 lea 0x4(%edi),%eax 10abbe: 89 45 bc mov %eax,-0x44(%ebp) } else { BSP_output_char(c); continue; } printNum( 10abc1: 8b 3f mov (%edi),%edi unsigned long unsigned_num; unsigned long n; unsigned count; char toPrint[20]; if ( sign && (num < 0) ) { 10abc3: 84 c9 test %cl,%cl 10abc5: 74 08 je 10abcf 10abc7: 85 ff test %edi,%edi 10abc9: 0f 88 0f 02 00 00 js 10adde BSP_output_char('-'); unsigned_num = (unsigned long) -num; if (maxwidth) maxwidth--; } else { unsigned_num = (unsigned long) num; 10abcf: 89 7d c0 mov %edi,-0x40(%ebp) } count = 0; while ((n = unsigned_num / base) > 0) { 10abd2: 8b 45 c0 mov -0x40(%ebp),%eax 10abd5: 31 d2 xor %edx,%edx 10abd7: f7 75 b8 divl -0x48(%ebp) 10abda: 89 c1 mov %eax,%ecx 10abdc: 85 c0 test %eax,%eax 10abde: 0f 84 25 02 00 00 je 10ae09 10abe4: 8a 45 b8 mov -0x48(%ebp),%al 10abe7: 88 45 c4 mov %al,-0x3c(%ebp) 10abea: 31 ff xor %edi,%edi 10abec: 89 5d b0 mov %ebx,-0x50(%ebp) 10abef: 8b 55 c0 mov -0x40(%ebp),%edx 10abf2: 8b 5d b8 mov -0x48(%ebp),%ebx 10abf5: eb 05 jmp 10abfc <== ALWAYS TAKEN 10abf7: 90 nop <== NOT EXECUTED 10abf8: 89 ca mov %ecx,%edx 10abfa: 89 c1 mov %eax,%ecx toPrint[count++] = (char) (unsigned_num - (n * base)); 10abfc: 8a 45 c4 mov -0x3c(%ebp),%al 10abff: f6 e1 mul %cl 10ac01: 28 c2 sub %al,%dl 10ac03: 88 54 3d d4 mov %dl,-0x2c(%ebp,%edi,1) 10ac07: 47 inc %edi } else { unsigned_num = (unsigned long) num; } count = 0; while ((n = unsigned_num / base) > 0) { 10ac08: 89 c8 mov %ecx,%eax 10ac0a: 31 d2 xor %edx,%edx 10ac0c: f7 f3 div %ebx 10ac0e: 85 c0 test %eax,%eax 10ac10: 75 e6 jne 10abf8 10ac12: 8b 5d b0 mov -0x50(%ebp),%ebx 10ac15: 8d 47 01 lea 0x1(%edi),%eax 10ac18: 89 45 c4 mov %eax,-0x3c(%ebp) 10ac1b: 89 4d c0 mov %ecx,-0x40(%ebp) toPrint[count++] = (char) (unsigned_num - (n * base)); unsigned_num = n; } toPrint[count++] = (char) unsigned_num; 10ac1e: 8a 45 c0 mov -0x40(%ebp),%al 10ac21: 88 44 3d d4 mov %al,-0x2c(%ebp,%edi,1) for (n=maxwidth ; n > count; n-- ) 10ac25: 3b 5d c4 cmp -0x3c(%ebp),%ebx 10ac28: 76 1f jbe 10ac49 10ac2a: 8b 7d c4 mov -0x3c(%ebp),%edi 10ac2d: 89 75 c0 mov %esi,-0x40(%ebp) 10ac30: 8b 75 b4 mov -0x4c(%ebp),%esi 10ac33: 90 nop BSP_output_char(lead); 10ac34: 83 ec 0c sub $0xc,%esp 10ac37: 56 push %esi 10ac38: ff 15 84 32 12 00 call *0x123284 toPrint[count++] = (char) (unsigned_num - (n * base)); unsigned_num = n; } toPrint[count++] = (char) unsigned_num; for (n=maxwidth ; n > count; n-- ) 10ac3e: 4b dec %ebx 10ac3f: 83 c4 10 add $0x10,%esp 10ac42: 39 fb cmp %edi,%ebx 10ac44: 77 ee ja 10ac34 10ac46: 8b 75 c0 mov -0x40(%ebp),%esi BSP_output_char(lead); for (n = 0; n < count; n++) { 10ac49: 8b 45 c4 mov -0x3c(%ebp),%eax 10ac4c: 85 c0 test %eax,%eax 10ac4e: 0f 84 7f fe ff ff je 10aad3 <== ALWAYS TAKEN 10ac54: 8b 45 c4 mov -0x3c(%ebp),%eax 10ac57: 8d 7c 05 d3 lea -0x2d(%ebp,%eax,1),%edi 10ac5b: 31 db xor %ebx,%ebx 10ac5d: 89 75 c0 mov %esi,-0x40(%ebp) 10ac60: 89 c6 mov %eax,%esi 10ac62: 66 90 xchg %ax,%ax BSP_output_char("0123456789ABCDEF"[(int)(toPrint[count-(n+1)])]); 10ac64: 83 ec 0c sub $0xc,%esp 10ac67: 0f be 07 movsbl (%edi),%eax 10ac6a: 0f be 80 d0 0c 12 00 movsbl 0x120cd0(%eax),%eax 10ac71: 50 push %eax 10ac72: ff 15 84 32 12 00 call *0x123284 toPrint[count++] = (char) unsigned_num; for (n=maxwidth ; n > count; n-- ) BSP_output_char(lead); for (n = 0; n < count; n++) { 10ac78: 43 inc %ebx 10ac79: 4f dec %edi 10ac7a: 83 c4 10 add $0x10,%esp 10ac7d: 39 f3 cmp %esi,%ebx 10ac7f: 72 e3 jb 10ac64 10ac81: 8b 75 c0 mov -0x40(%ebp),%esi void vprintk( const char *fmt, va_list ap ) { for (; *fmt != '\0'; fmt++) { 10ac84: 46 inc %esi 10ac85: 8a 06 mov (%esi),%al 10ac87: 84 c0 test %al,%al 10ac89: 0f 85 4f fe ff ff jne 10aade <== NEVER TAKEN sign, width, lead ); } } 10ac8f: 8d 65 f4 lea -0xc(%ebp),%esp 10ac92: 5b pop %ebx 10ac93: 5e pop %esi 10ac94: 5f pop %edi 10ac95: c9 leave 10ac96: c3 ret 10ac97: 90 nop <== NOT EXECUTED base = 16; sign = false; } else if ( c == 'p' ) { base = 16; sign = false; lflag = true; } else { BSP_output_char(c); continue; 10ac98: 31 c9 xor %ecx,%ecx 10ac9a: c7 45 b8 08 00 00 00 movl $0x8,-0x48(%ebp) 10aca1: e9 0f ff ff ff jmp 10abb5 <== ALWAYS TAKEN 10aca6: 66 90 xchg %ax,%ax <== NOT EXECUTED continue; } fmt++; if (*fmt == '0' ) { lead = '0'; fmt++; 10aca8: 46 inc %esi 10aca9: 8a 0e mov (%esi),%cl 10acab: b2 30 mov $0x30,%dl } if (*fmt == '-' ) { 10acad: 80 f9 2d cmp $0x2d,%cl 10acb0: 0f 85 46 fe ff ff jne 10aafc <== NEVER TAKEN minus = true; fmt++; 10acb6: 46 inc %esi 10acb7: 8a 0e mov (%esi),%cl 10acb9: c6 45 c4 01 movb $0x1,-0x3c(%ebp) } while (*fmt >= '0' && *fmt <= '9' ) { 10acbd: 8d 41 d0 lea -0x30(%ecx),%eax 10acc0: 3c 09 cmp $0x9,%al 10acc2: 0f 86 43 fe ff ff jbe 10ab0b <== NEVER TAKEN 10acc8: 31 db xor %ebx,%ebx width *= 10; width += ((unsigned) *fmt - '0'); fmt++; } if ((c = *fmt) == 'l') { 10acca: 80 f9 6c cmp $0x6c,%cl 10accd: 0f 85 5a fe ff ff jne 10ab2d 10acd3: 90 nop lflag = true; c = *++fmt; 10acd4: 46 inc %esi 10acd5: 8a 0e mov (%esi),%cl } if ( c == 'c' ) { 10acd7: 80 f9 63 cmp $0x63,%cl 10acda: 0f 85 56 fe ff ff jne 10ab36 <== NEVER TAKEN /* need a cast here since va_arg() only takes fully promoted types */ char chr = (char) va_arg(ap, int); 10ace0: 8d 47 04 lea 0x4(%edi),%eax 10ace3: 89 45 bc mov %eax,-0x44(%ebp) BSP_output_char(chr); 10ace6: 83 ec 0c sub $0xc,%esp 10ace9: 0f be 07 movsbl (%edi),%eax 10acec: 50 push %eax 10aced: ff 15 84 32 12 00 call *0x123284 continue; 10acf3: 83 c4 10 add $0x10,%esp 10acf6: e9 d8 fd ff ff jmp 10aad3 <== ALWAYS TAKEN 10acfb: 90 nop <== NOT EXECUTED } if ( c == 's' ) { unsigned i, len; char *s, *str; str = va_arg(ap, char *); 10acfc: 8d 47 04 lea 0x4(%edi),%eax 10acff: 89 45 bc mov %eax,-0x44(%ebp) 10ad02: 8b 07 mov (%edi),%eax if ( str == NULL ) { 10ad04: 85 c0 test %eax,%eax 10ad06: 0f 84 19 01 00 00 je 10ae25 str = ""; } /* calculate length of string */ for ( len=0, s=str ; *s ; len++, s++ ) 10ad0c: 80 38 00 cmpb $0x0,(%eax) 10ad0f: 0f 84 1e 01 00 00 je 10ae33 10ad15: 31 ff xor %edi,%edi 10ad17: 90 nop 10ad18: 47 inc %edi 10ad19: 80 3c 38 00 cmpb $0x0,(%eax,%edi,1) 10ad1d: 75 f9 jne 10ad18 ; /* leading spaces */ if ( !minus ) 10ad1f: 80 7d c4 00 cmpb $0x0,-0x3c(%ebp) 10ad23: 75 30 jne 10ad55 for ( i=len ; i 10ad29: 89 fa mov %edi,%edx 10ad2b: 89 7d c0 mov %edi,-0x40(%ebp) 10ad2e: 89 c7 mov %eax,%edi 10ad30: 89 75 b8 mov %esi,-0x48(%ebp) 10ad33: 89 de mov %ebx,%esi 10ad35: 89 d3 mov %edx,%ebx 10ad37: 90 nop BSP_output_char(' '); 10ad38: 83 ec 0c sub $0xc,%esp 10ad3b: 6a 20 push $0x20 10ad3d: ff 15 84 32 12 00 call *0x123284 for ( len=0, s=str ; *s ; len++, s++ ) ; /* leading spaces */ if ( !minus ) for ( i=len ; i 10ad4b: 89 f3 mov %esi,%ebx 10ad4d: 89 f8 mov %edi,%eax 10ad4f: 8b 7d c0 mov -0x40(%ebp),%edi 10ad52: 8b 75 b8 mov -0x48(%ebp),%esi BSP_output_char(' '); /* no width option */ if (width == 0) { 10ad55: 85 db test %ebx,%ebx 10ad57: 75 06 jne 10ad5f width = len; } /* output the string */ for ( i=0 ; i 10ad5d: 89 fb mov %edi,%ebx 10ad5f: 8a 10 mov (%eax),%dl 10ad61: 84 d2 test %dl,%dl 10ad63: 74 3f je 10ada4 <== ALWAYS TAKEN BSP_output_char(*str); 10ad65: 83 ec 0c sub $0xc,%esp 10ad68: 0f be d2 movsbl %dl,%edx 10ad6b: 52 push %edx 10ad6c: 89 45 ac mov %eax,-0x54(%ebp) 10ad6f: ff 15 84 32 12 00 call *0x123284 if (width == 0) { width = len; } /* output the string */ for ( i=0 ; i <== ALWAYS TAKEN 10ad85: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED BSP_output_char(*str); 10ad88: 83 ec 0c sub $0xc,%esp 10ad8b: 0f be d2 movsbl %dl,%edx 10ad8e: 52 push %edx 10ad8f: ff 15 84 32 12 00 call *0x123284 if (width == 0) { width = len; } /* output the string */ for ( i=0 ; i 10ad9f: 89 f3 mov %esi,%ebx 10ada1: 8b 75 c0 mov -0x40(%ebp),%esi BSP_output_char(*str); /* trailing spaces */ if ( minus ) 10ada4: 80 7d c4 00 cmpb $0x0,-0x3c(%ebp) 10ada8: 0f 84 25 fd ff ff je 10aad3 for ( i=len ; i 10adb6: 66 90 xchg %ax,%ax BSP_output_char(' '); 10adb8: 83 ec 0c sub $0xc,%esp 10adbb: 6a 20 push $0x20 10adbd: ff 15 84 32 12 00 call *0x123284 for ( i=0 ; i 10adcb: e9 03 fd ff ff jmp 10aad3 <== ALWAYS TAKEN base = 16; sign = false; } else if ( c == 'p' ) { base = 16; sign = false; lflag = true; } else { BSP_output_char(c); continue; 10add0: 31 c9 xor %ecx,%ecx 10add2: c7 45 b8 0a 00 00 00 movl $0xa,-0x48(%ebp) 10add9: e9 d7 fd ff ff jmp 10abb5 <== ALWAYS TAKEN unsigned long n; unsigned count; char toPrint[20]; if ( sign && (num < 0) ) { BSP_output_char('-'); 10adde: 83 ec 0c sub $0xc,%esp 10ade1: 6a 2d push $0x2d 10ade3: ff 15 84 32 12 00 call *0x123284 unsigned_num = (unsigned long) -num; 10ade9: f7 df neg %edi 10adeb: 89 7d c0 mov %edi,-0x40(%ebp) if (maxwidth) maxwidth--; 10adee: 83 c4 10 add $0x10,%esp 10adf1: 83 fb 01 cmp $0x1,%ebx 10adf4: 83 d3 ff adc $0xffffffff,%ebx } else { unsigned_num = (unsigned long) num; } count = 0; while ((n = unsigned_num / base) > 0) { 10adf7: 8b 45 c0 mov -0x40(%ebp),%eax 10adfa: 31 d2 xor %edx,%edx 10adfc: f7 75 b8 divl -0x48(%ebp) 10adff: 89 c1 mov %eax,%ecx 10ae01: 85 c0 test %eax,%eax 10ae03: 0f 85 db fd ff ff jne 10abe4 <== NEVER TAKEN 10ae09: c7 45 c4 01 00 00 00 movl $0x1,-0x3c(%ebp) 10ae10: 31 ff xor %edi,%edi 10ae12: e9 07 fe ff ff jmp 10ac1e <== ALWAYS TAKEN base = 16; sign = false; } else if ( c == 'p' ) { base = 16; sign = false; lflag = true; } else { BSP_output_char(c); continue; 10ae17: 31 c9 xor %ecx,%ecx 10ae19: c7 45 b8 10 00 00 00 movl $0x10,-0x48(%ebp) 10ae20: e9 90 fd ff ff jmp 10abb5 <== ALWAYS TAKEN unsigned i, len; char *s, *str; str = va_arg(ap, char *); if ( str == NULL ) { 10ae25: b8 cf 0c 12 00 mov $0x120ccf,%eax str = ""; } /* calculate length of string */ for ( len=0, s=str ; *s ; len++, s++ ) 10ae2a: 80 38 00 cmpb $0x0,(%eax) 10ae2d: 0f 85 e2 fe ff ff jne 10ad15 <== ALWAYS TAKEN 10ae33: 31 ff xor %edi,%edi 10ae35: e9 e5 fe ff ff jmp 10ad1f <== ALWAYS TAKEN } else { BSP_output_char(c); continue; } printNum( 10ae3a: 0f be d2 movsbl %dl,%edx 10ae3d: 89 55 b4 mov %edx,-0x4c(%ebp) 10ae40: 31 c9 xor %ecx,%ecx 10ae42: c7 45 b8 10 00 00 00 movl $0x10,-0x48(%ebp) 10ae49: e9 6d fd ff ff jmp 10abbb <== ALWAYS TAKEN 0011eea0 : ssize_t write( int fd, const void *buffer, size_t count ) { 11eea0: 55 push %ebp 11eea1: 89 e5 mov %esp,%ebp 11eea3: 53 push %ebx 11eea4: 83 ec 04 sub $0x4,%esp 11eea7: 8b 5d 08 mov 0x8(%ebp),%ebx 11eeaa: 8b 45 0c mov 0xc(%ebp),%eax 11eead: 8b 55 10 mov 0x10(%ebp),%edx ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 11eeb0: 3b 1d 4c 31 12 00 cmp 0x12314c,%ebx 11eeb6: 73 50 jae 11ef08 <== ALWAYS TAKEN iop = rtems_libio_iop( fd ); 11eeb8: c1 e3 06 shl $0x6,%ebx 11eebb: 03 1d 40 72 12 00 add 0x127240,%ebx rtems_libio_check_is_open( iop ); 11eec1: 8b 4b 14 mov 0x14(%ebx),%ecx 11eec4: f6 c5 01 test $0x1,%ch 11eec7: 74 3f je 11ef08 <== ALWAYS TAKEN rtems_libio_check_buffer( buffer ); 11eec9: 85 c0 test %eax,%eax 11eecb: 74 4f je 11ef1c <== ALWAYS TAKEN rtems_libio_check_count( count ); 11eecd: 85 d2 test %edx,%edx 11eecf: 74 2f je 11ef00 rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 11eed1: 83 e1 04 and $0x4,%ecx 11eed4: 74 46 je 11ef1c <== ALWAYS TAKEN /* * Now process the write() request. */ if ( !iop->handlers->write_h ) 11eed6: 8b 4b 3c mov 0x3c(%ebx),%ecx 11eed9: 8b 49 0c mov 0xc(%ecx),%ecx 11eedc: 85 c9 test %ecx,%ecx 11eede: 74 4e je 11ef2e <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); rc = (*iop->handlers->write_h)( iop, buffer, count ); 11eee0: 83 ec 04 sub $0x4,%esp 11eee3: 52 push %edx 11eee4: 50 push %eax 11eee5: 53 push %ebx 11eee6: ff d1 call *%ecx if ( rc > 0 ) 11eee8: 83 c4 10 add $0x10,%esp 11eeeb: 85 c0 test %eax,%eax 11eeed: 7e 0b jle 11eefa <== ALWAYS TAKEN iop->offset += rc; 11eeef: 89 c1 mov %eax,%ecx 11eef1: c1 f9 1f sar $0x1f,%ecx 11eef4: 01 43 0c add %eax,0xc(%ebx) 11eef7: 11 4b 10 adc %ecx,0x10(%ebx) return rc; } 11eefa: 8b 5d fc mov -0x4(%ebp),%ebx 11eefd: c9 leave 11eefe: c3 ret 11eeff: 90 nop <== NOT EXECUTED rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open( iop ); rtems_libio_check_buffer( buffer ); rtems_libio_check_count( count ); 11ef00: 31 c0 xor %eax,%eax if ( rc > 0 ) iop->offset += rc; return rc; } 11ef02: 8b 5d fc mov -0x4(%ebp),%ebx 11ef05: c9 leave 11ef06: c3 ret 11ef07: 90 nop <== NOT EXECUTED ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open( iop ); 11ef08: e8 03 49 ff ff call 113810 <__errno> <== NOT EXECUTED 11ef0d: c7 00 09 00 00 00 movl $0x9,(%eax) <== NOT EXECUTED 11ef13: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 11ef18: eb e0 jmp 11eefa <== NOT EXECUTED 11ef1a: 66 90 xchg %ax,%ax <== NOT EXECUTED rtems_libio_check_buffer( buffer ); rtems_libio_check_count( count ); rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 11ef1c: e8 ef 48 ff ff call 113810 <__errno> <== NOT EXECUTED 11ef21: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 11ef27: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 11ef2c: eb cc jmp 11eefa <== NOT EXECUTED /* * Now process the write() request. */ if ( !iop->handlers->write_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 11ef2e: e8 dd 48 ff ff call 113810 <__errno> <== NOT EXECUTED 11ef33: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 11ef39: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 11ef3e: eb ba jmp 11eefa <== NOT EXECUTED 0010c24c : ssize_t writev( int fd, const struct iovec *iov, int iovcnt ) { 10c24c: 55 push %ebp 10c24d: 89 e5 mov %esp,%ebp 10c24f: 57 push %edi 10c250: 56 push %esi 10c251: 53 push %ebx 10c252: 83 ec 3c sub $0x3c,%esp 10c255: 8b 45 08 mov 0x8(%ebp),%eax 10c258: 8b 5d 0c mov 0xc(%ebp),%ebx 10c25b: 8b 7d 10 mov 0x10(%ebp),%edi int bytes; rtems_libio_t *iop; ssize_t old; bool all_zeros; rtems_libio_check_fd( fd ); 10c25e: 3b 05 4c 61 12 00 cmp 0x12614c,%eax 10c264: 0f 83 f2 00 00 00 jae 10c35c <== ALWAYS TAKEN iop = rtems_libio_iop( fd ); 10c26a: c1 e0 06 shl $0x6,%eax 10c26d: 8b 15 40 aa 12 00 mov 0x12aa40,%edx 10c273: 01 d0 add %edx,%eax 10c275: 89 45 e4 mov %eax,-0x1c(%ebp) rtems_libio_check_is_open( iop ); 10c278: 8b 40 14 mov 0x14(%eax),%eax 10c27b: f6 c4 01 test $0x1,%ah 10c27e: 0f 84 d8 00 00 00 je 10c35c rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 10c284: a8 04 test $0x4,%al 10c286: 74 7c je 10c304 <== ALWAYS TAKEN /* * Argument validation on IO vector */ if ( !iov ) 10c288: 85 db test %ebx,%ebx 10c28a: 74 78 je 10c304 rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt <= 0 ) 10c28c: 85 ff test %edi,%edi 10c28e: 7e 74 jle 10c304 rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt > IOV_MAX ) 10c290: 81 ff 00 04 00 00 cmp $0x400,%edi 10c296: 7f 6c jg 10c304 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); if ( !iop->handlers->write_h ) 10c298: 8b 55 e4 mov -0x1c(%ebp),%edx 10c29b: 8b 42 3c mov 0x3c(%edx),%eax 10c29e: 8b 48 0c mov 0xc(%eax),%ecx 10c2a1: 85 c9 test %ecx,%ecx 10c2a3: 0f 84 c5 00 00 00 je 10c36e <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); 10c2a9: be 01 00 00 00 mov $0x1,%esi 10c2ae: 31 c0 xor %eax,%eax 10c2b0: 31 c9 xor %ecx,%ecx 10c2b2: eb 02 jmp 10c2b6 <== 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++ ) { 10c2b4: 89 d1 mov %edx,%ecx if ( !iov[v].iov_base ) 10c2b6: 8b 14 c3 mov (%ebx,%eax,8),%edx 10c2b9: 85 d2 test %edx,%edx 10c2bb: 74 47 je 10c304 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 ) 10c2bd: 8b 54 c3 04 mov 0x4(%ebx,%eax,8),%edx 10c2c1: 85 d2 test %edx,%edx 10c2c3: 74 02 je 10c2c7 <== ALWAYS TAKEN 10c2c5: 31 f6 xor %esi,%esi all_zeros = false; /* check for wrap */ old = total; total += iov[v].iov_len; 10c2c7: 8d 14 11 lea (%ecx,%edx,1),%edx if ( total < old || total > SSIZE_MAX ) 10c2ca: 39 d1 cmp %edx,%ecx 10c2cc: 7f 36 jg 10c304 10c2ce: 81 fa ff 7f 00 00 cmp $0x7fff,%edx 10c2d4: 7f 2e jg 10c304 * 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++ ) { 10c2d6: 40 inc %eax 10c2d7: 39 c7 cmp %eax,%edi 10c2d9: 7f d9 jg 10c2b4 <== NEVER TAKEN } /* * A writev with all zeros is supposed to have no effect per OpenGroup. */ if ( all_zeros == true ) { 10c2db: 89 f1 mov %esi,%ecx <== NOT EXECUTED 10c2dd: 84 c9 test %cl,%cl <== NOT EXECUTED 10c2df: 75 3d jne 10c31e <== NOT EXECUTED 10c2e1: 31 f6 xor %esi,%esi <== NOT EXECUTED 10c2e3: 31 d2 xor %edx,%edx <== NOT EXECUTED 10c2e5: 89 55 c0 mov %edx,-0x40(%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 ) 10c2e8: 8b 44 f3 04 mov 0x4(%ebx,%esi,8),%eax <== NOT EXECUTED 10c2ec: 85 c0 test %eax,%eax <== NOT EXECUTED 10c2ee: 75 32 jne 10c322 <== NOT EXECUTED } /* * Now process the writev(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { 10c2f0: 46 inc %esi <== NOT EXECUTED 10c2f1: 39 f7 cmp %esi,%edi <== NOT EXECUTED 10c2f3: 7f f3 jg 10c2e8 <== NOT EXECUTED 10c2f5: 8b 55 c0 mov -0x40(%ebp),%edx <== NOT EXECUTED if (bytes != iov[ v ].iov_len) break; } return total; } 10c2f8: 89 d0 mov %edx,%eax <== NOT EXECUTED 10c2fa: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 10c2fd: 5b pop %ebx <== NOT EXECUTED 10c2fe: 5e pop %esi <== NOT EXECUTED 10c2ff: 5f pop %edi <== NOT EXECUTED 10c300: c9 leave <== NOT EXECUTED 10c301: c3 ret <== NOT EXECUTED 10c302: 66 90 xchg %ax,%ax <== NOT EXECUTED /* check for wrap */ old = total; total += iov[v].iov_len; if ( total < old || total > SSIZE_MAX ) rtems_set_errno_and_return_minus_one( EINVAL ); 10c304: e8 9f 97 00 00 call 115aa8 <__errno> 10c309: c7 00 16 00 00 00 movl $0x16,(%eax) 10c30f: ba ff ff ff ff mov $0xffffffff,%edx if (bytes != iov[ v ].iov_len) break; } return total; } 10c314: 89 d0 mov %edx,%eax 10c316: 8d 65 f4 lea -0xc(%ebp),%esp 10c319: 5b pop %ebx 10c31a: 5e pop %esi 10c31b: 5f pop %edi 10c31c: c9 leave 10c31d: c3 ret } /* * A writev with all zeros is supposed to have no effect per OpenGroup. */ if ( all_zeros == true ) { 10c31e: 31 d2 xor %edx,%edx <== NOT EXECUTED 10c320: eb f2 jmp 10c314 <== NOT EXECUTED for ( total=0, v=0 ; v < iovcnt ; v++ ) { /* all zero lengths has no effect */ if ( iov[v].iov_len == 0 ) continue; bytes = (*iop->handlers->write_h)( iop, iov[v].iov_base, iov[v].iov_len ); 10c322: 52 push %edx <== NOT EXECUTED 10c323: 8b 4d e4 mov -0x1c(%ebp),%ecx <== NOT EXECUTED 10c326: 8b 51 3c mov 0x3c(%ecx),%edx <== NOT EXECUTED 10c329: 50 push %eax <== NOT EXECUTED 10c32a: ff 34 f3 pushl (%ebx,%esi,8) <== NOT EXECUTED 10c32d: 51 push %ecx <== NOT EXECUTED 10c32e: ff 52 0c call *0xc(%edx) <== NOT EXECUTED 10c331: 89 45 c4 mov %eax,-0x3c(%ebp) <== NOT EXECUTED if ( bytes < 0 ) 10c334: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10c337: 83 f8 00 cmp $0x0,%eax <== NOT EXECUTED 10c33a: 7c 42 jl 10c37e <== NOT EXECUTED return -1; if ( bytes > 0 ) { 10c33c: 74 13 je 10c351 <== NOT EXECUTED iop->offset += bytes; 10c33e: 8b 45 c4 mov -0x3c(%ebp),%eax <== NOT EXECUTED 10c341: 99 cltd <== NOT EXECUTED 10c342: 8b 4d e4 mov -0x1c(%ebp),%ecx <== NOT EXECUTED 10c345: 01 41 0c add %eax,0xc(%ecx) <== NOT EXECUTED 10c348: 11 51 10 adc %edx,0x10(%ecx) <== NOT EXECUTED total += bytes; 10c34b: 8b 45 c4 mov -0x3c(%ebp),%eax <== NOT EXECUTED 10c34e: 01 45 c0 add %eax,-0x40(%ebp) <== NOT EXECUTED } if (bytes != iov[ v ].iov_len) 10c351: 8b 55 c4 mov -0x3c(%ebp),%edx <== NOT EXECUTED 10c354: 3b 54 f3 04 cmp 0x4(%ebx,%esi,8),%edx <== NOT EXECUTED 10c358: 74 96 je 10c2f0 <== NOT EXECUTED 10c35a: eb 99 jmp 10c2f5 <== NOT EXECUTED ssize_t old; bool all_zeros; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open( iop ); 10c35c: e8 47 97 00 00 call 115aa8 <__errno> 10c361: c7 00 09 00 00 00 movl $0x9,(%eax) 10c367: ba ff ff ff ff mov $0xffffffff,%edx 10c36c: eb a6 jmp 10c314 <== ALWAYS TAKEN if ( iovcnt > IOV_MAX ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( !iop->handlers->write_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 10c36e: e8 35 97 00 00 call 115aa8 <__errno> <== NOT EXECUTED 10c373: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 10c379: 83 ca ff or $0xffffffff,%edx <== NOT EXECUTED 10c37c: eb 96 jmp 10c314 <== NOT EXECUTED if ( iov[v].iov_len == 0 ) continue; bytes = (*iop->handlers->write_h)( iop, iov[v].iov_base, iov[v].iov_len ); if ( bytes < 0 ) 10c37e: 83 ca ff or $0xffffffff,%edx <== NOT EXECUTED 10c381: eb 91 jmp 10c314 <== NOT EXECUTED